# ncurses

ncurses is a terminal-independent library for reading keyboard and mouse input and writing to character-cell displays with optimized output.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Bitwise - Terminal based bit manipulator

DevFeed: [Bitwise - Terminal based bit manipulator](<https://devfeed.tech/articles/bitwise-terminal-based-bit-manipulator-21706.md>)

Original publisher: [Read original article](<https://nativeguru.wordpress.com/2019/05/02/bitwise-terminal-based-bit-manipulator/>)

Author: Ramon

Published: 2019-05-02T20:50:13Z

Content type: release

Language: en

Sources: [Ramon Fried](<https://devfeed.tech/sources/ramon-fried.md>)

Topics: [Text-based user interface](<https://devfeed.tech/topics/tui.md>), [ncurses](<https://devfeed.tech/topics/ncurses.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>)

Tags: [app](<https://devfeed.tech/tags/app.md>), [application](<https://devfeed.tech/tags/application.md>), [bits](<https://devfeed.tech/tags/bits.md>), [calculator](<https://devfeed.tech/tags/calculator.md>), [github](<https://devfeed.tech/tags/github.md>), [hex](<https://devfeed.tech/tags/hex.md>), [kde](<https://devfeed.tech/tags/kde.md>), [low-level](<https://devfeed.tech/tags/low-level.md>), [masks](<https://devfeed.tech/tags/masks.md>), [ncurses](<https://devfeed.tech/tags/ncurses.md>), [number](<https://devfeed.tech/tags/number.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>), [window](<https://devfeed.tech/tags/window.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

Bitwise is a basic ncurses terminal app the author created to manipulate bits and masks and convert between number bases, such as hexadecimal and decimal. It is intended for low-level work in a terminal, avoiding the need to open a graphical calculator. The excerpt does not describe its features or usage in further detail.

### Source excerpt

I Recently complete a basic ncurses based terminal application for minglinng with bits. I'm working low level most of the times and need to tinker with bits, masks and to translate between number bases (hex to dec, and vice verse). As I'm working 99% of my time in a terminal, I found it very annoying [...]

## Using C Dynamic Libraries In Go Programs

DevFeed: [Using C Dynamic Libraries In Go Programs](<https://devfeed.tech/articles/using-c-dynamic-libraries-in-go-programs-22067.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2013/08/using-c-dynamic-libraries-in-go-programs.html>)

Published: 2013-08-20T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [ncurses](<https://devfeed.tech/topics/ncurses.md>), [Text-based user interface](<https://devfeed.tech/topics/tui.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [console](<https://devfeed.tech/topics/console.md>), [IO](<https://devfeed.tech/topics/io.md>), [make](<https://devfeed.tech/topics/make.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [c](<https://devfeed.tech/tags/c.md>), [c-c-plus-plus](<https://devfeed.tech/tags/c-c-plus-plus.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [code](<https://devfeed.tech/tags/code.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [input](<https://devfeed.tech/tags/input.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [library](<https://devfeed.tech/tags/library.md>), [linux](<https://devfeed.tech/tags/linux.md>), [mac](<https://devfeed.tech/tags/mac.md>), [make](<https://devfeed.tech/tags/make.md>), [ncurses](<https://devfeed.tech/tags/ncurses.md>), [program](<https://devfeed.tech/tags/program.md>), [programming](<https://devfeed.tech/tags/programming.md>), [services](<https://devfeed.tech/tags/services.md>), [static](<https://devfeed.tech/tags/static.md>)

### AI overview

To read keystrokes without waiting for Enter in a Go console game, the author turned to C and ncurses after two Go libraries they tried did not work. They first built a standalone C test using ncurses: initialize terminal input with `initscr`, `noecho`, `cbreak`, and `keypad`, read characters with `getch`, then restore the terminal with `endwin`. The excerpt ends as the author begins showing a GCC makefile; it does not provide the subsequent Go integration steps or establish that the build command shown is complete.

### Source excerpt

My son and I were having fun last weekend building a console based game in Go. I was recreating a game from my youth, back when I was programming on a Kaypro II. View linked image: kayproii I loved this computer. I would write games in BASIC on it all day and night. Did I mention it was portable. The keyboard would strap in and you could carry it around. LOL. But I digress, back to my Go program. I figured out a way to use the VT100 escape character codes to draw out a simple screen and started programming some of the logic. Then something horrible happened and I had a major flashback. I could not get input from stdin without hitting the enter key. Ahhhhh I spent all weekend reading up on how to make this happen. I even found two Go libraries that had support for this but they didn't work. I realized that if I was going to make this happen I needed to build the functionality in C and link that to my Go program. After a 4 hour coding session at the local Irish pub, I figured it out. I would like to thank Guinness for the inspiration and encouragement I needed. Understand that for the past 10 years I have been writing windows services in C#. For 10 years before that I was writing C/C++ but on the Microsoft stack. Everything I was reading: gcc, gco, static and shared libraries on the Mac and Linux, etc, was foreign to me. I had a lot to learn and still do. After all my research it became clear I needed to use the ncurses dynamic library. I decided to write a simple program in C using the library. If I could make it work in a compiled C program, I was sure I could get it to work in Go. View linked image: Screen Shot