Skip to content

Instantly share code, notes, and snippets.

Created September 8, 2017 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a07655f21354d9e4d07d1773a7c221dc to your computer and use it in GitHub Desktop.
Save anonymous/a07655f21354d9e4d07d1773a7c221dc to your computer and use it in GitHub Desktop.
use NativeCall;
sub gets(Buf $s --> uint64) is export is native { * };
my $a = Buf[int8].new(0 xx 20);
gets($a);
say $a.decode('utf-8');
gets($a);
say $a.decode('utf-8');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment