Skip to content

Instantly share code, notes, and snippets.

@moritz
Created August 21, 2012 15:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/3416731 to your computer and use it in GitHub Desktop.
Save moritz/3416731 to your computer and use it in GitHub Desktop.
Basic ncurses example
use v6;
use NativeCall;
constant lib = 'libncurses.so.5';
sub initscr() is native(lib) { * }
sub endwin() is native(lib) { * }
sub printw(Str) is native(lib) { * }
sub update() is native(lib) is symbol<refresh> { * }
initscr();
printw("foo");
update();
sleep 2;
endwin();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment