Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created March 20, 2017 19:47
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 zoffixznet/f714072a07c4c98b42adacb5125719be to your computer and use it in GitHub Desktop.
Save zoffixznet/f714072a07c4c98b42adacb5125719be to your computer and use it in GitHub Desktop.
zoffix@VirtualBox:~/CPANPRC/judo$ ./perl6-j -e 'my $f = "foo"; spurt($f,"a"); my $h = open($f, :bin); my $s = $h.Supply(:size(1),:bin); my $x; $s.tap( { $x = $_ } ); $h.close; my $y = Buf[uint8].new(ord "a"); dd $x; dd $y; say $x eqv $y'
Buf[uint8] $x = Buf[uint8].new(97)
Buf[uint8] $y = Buf[uint8].new(97)
False
zoffix@VirtualBox:~/CPANPRC/judo$ ./perl6-j -e 'my $f = "foo"; spurt($f,"a"); my $h = open($f, :bin); my $s = $h.Supply(:size(1),:bin); my $x; $s.tap( { $x = $_ } ); $h.close; $x = Buf[uint8].new(97); my $y = Buf[uint8].new(97); dd $x; dd $y; say $x eqv $y'
Buf[uint8] $x = Buf[uint8].new(97)
Buf[uint8] $y = Buf[uint8].new(97)
True
zoffix@VirtualBox:~/CPANPRC/judo$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment