This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
const PNG = require('pngjs').PNG; | |
const pixelmatch = require('pixelmatch'); | |
const dir1 = 'dev4'; | |
const dir2 = 'dev5'; | |
fs.readdir(dir1, (err, files) => { | |
if (err) throw err; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use of uninitialized value %ENV of type Any in string context | |
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at /home/local/filip.sergot/p6/sambal/lib/Sambal.pm:171 | |
Use of uninitialized value %ENV of type Any in string context | |
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at /home/local/filip.sergot/p6/sambal/lib/Sambal.pm:171 | |
Use of uninitialized value %ENV of type Any in string context | |
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at /home/local/filip.sergot/p6/sambal/lib/Sambal.pm:171 | |
Use of uninitialized value %ENV of type Any in string context | |
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at /home/local/filip.sergot/p6/sambal/lib/Sambal.pm:171 | |
Use of uninitialized value %ENV of type Any in string context | |
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at /home/local/filip.sergot/p6/samb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> Testing NativeCall | |
t/01-argless.t ......... ok | |
t/02-simple-args.t ..... ok | |
t/03-simple-returns.t .. ok | |
t/04-pointers.t ........ ok | |
t/05-arrays.t .......... 1/26 # Looks like you planned 26 tests, but ran 20 | |
t/05-arrays.t .......... ok | |
t/06-struct.t .......... 1/30 # Looks like you planned 30 tests, but ran 19 | |
t/06-struct.t .......... ok | |
t/07-writebarrier.t .... ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey! | |
This is a poll about VMs for Perl 6. It would be awesome if you fill it, | |
just write a comment with your answers or fork it and edit. | |
I need it because I work on a huge summary (including, among the others, statistics, tests) | |
of VMs and Perl 6 itself. | |
Thank you very much in advance! | |
sergot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
multi sub infix:<->(Str $a, Str $b) { | |
nqp::join('', nqp::split($b, $a)); | |
} | |
say 'a b c' - ' ' - 'a'; | |
say 5 - 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub unlink($path) { | |
die "$path is not a file." if $path.IO.d; | |
try { | |
pir::new__PS('OS').rm($path); | |
} | |
$! ?? fail($!) !! Bool::True | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
sub rmdir($path) { | |
die "$path does not exist." unless $path.IO.e; | |
die "$path is not a directory." unless $path.IO.d; | |
die "$path directory is not empty." if dir $path; | |
try { | |
pir::new__PS('OS').rm($path); | |
} | |
$! ?? fail($!) !! Bool::True; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use File::Find; | |
sub rm_rf(*@files) is export { | |
for @files -> $path { | |
for find(dir => $path).map({ .Str }).reverse -> $f { | |
$f.IO.d ?? rmdir($f) !! unlink($f); | |
} | |
rmdir $path; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void dump(const unsigned char *data_buffer, const unsigned int length) { | |
unsigned char byte; | |
unsigned int i, j; | |
for(i=0; i < length; i++) { | |
byte = data_buffer[i]; | |
printf("%02x ", data_buffer[i]); | |
if(((i%16)==15) || (i==length-1)) { | |
for(j=0; j < 15-(i%16); j++) | |
printf(" "); | |
printf("| "); |