I built this file with:
./bdfconv -y 0 -th 2 -tv 3 -v -f 2 -m '37,46,67,91-100,176' ../bdf/profont29.bdf -o u8x8_font_profont29_2x3_j.c -n u8x8_font_profont29_2x3_j
package main | |
import ( | |
"fmt" | |
"math" | |
"math/big" | |
"os" | |
) | |
func main() { |
use v6.d; | |
my Supplier $pinger .= new; | |
my Supplier $ponger .= new; | |
react { | |
say 'Beginning ping/pong...'; | |
whenever $pinger.Supply.throttle: 1, 1 { | |
.say; | |
$ponger.emit: 'pong'; |
I can't help myself... I think Perl 6 is easier to read than Python... so I toook the best practices here and added Perl 6 translations instead.
Okay, so I'm not really trying to one-up Python (well, maybe just a little). I think Python, especially Python 3, is a very able language and use it for a several projects. I also appreciate the work of Raymond Hettinger and Jeff Paine in putting together these best practices and summarizing them, respectively.
However, I think Perl 6 has a truly ingenious syntax that has taken 15+ years to assemble from lessons learned from 20+ years of language development in Perl preceding it and hundreds of years of experience from other languages. Perl 6 unashamedly steals language features from many others. I sincerely hope that languages will start learning from Perl 6 and stealing back (actually, I'm certain so
#!/usr/bin/env perl6 | |
use v6; | |
my $sideeffect = 0; | |
sub app(%env) { | |
start { | |
note "APP RESPONSE"; | |
200, [ Content-Type => 'text/plain' ], supply { | |
note "SENDING REQUEST"; |
#!/usr/bin/env perl6 | |
use v6; | |
my $sideeffect = 0; | |
sub app(%env) { | |
start { | |
my Supplier $content .= new; | |
start { | |
note "WAITING FOR READY ", %env<p6w.ready>.WHICH; |
% ulimit -a | |
-t: cpu time (seconds) unlimited | |
-f: file size (blocks) unlimited | |
-d: data seg size (kbytes) unlimited | |
-s: stack size (kbytes) 8192 | |
-c: core file size (blocks) 0 | |
-m: resident set size (kbytes) unlimited | |
-u: processes 15691 | |
-n: file descriptors 1024 | |
-l: locked-in-memory size (kbytes) 64 |
% ulimit -a | |
-t: cpu time (seconds) unlimited | |
-f: file size (blocks) unlimited | |
-d: data seg size (kbytes) unlimited | |
-s: stack size (kbytes) 8192 | |
-c: core file size (blocks) 0 | |
-v: address space (kbytes) unlimited | |
-l: locked-in-memory size (kbytes) unlimited | |
-u: processes 709 | |
-n: file descriptors 256 |
[11:10] sterling@Weasley Smack#master% perl6 -Ilib --ll-exception t/sent.t | |
# Unhandled exception: Cannot unbox a type object | |
# at <unknown>:1 (/Users/sterling/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:print_exception:4294967295) | |
# from gen/moar/m-CORE.setting:17236 (/Users/sterling/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:<anon>:40) | |
# from gen/moar/stage2/NQPHLL.nqp:1425 (/Users/sterling/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_eval:380) | |
# from src/Perl6/Compiler.nqp:59 (/Users/sterling/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval:93) | |
# from gen/moar/stage2/NQPHLL.nqp:1365 (/Users/sterling/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_line:114) | |
# from gen/moar/m-main.nqp:39 (/Users/sterling/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:MAIN:18) | |
# from gen/moar/m-main.nqp:35 (/Users/sterling/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moar |
Okay, so I am at a loss so far as to what is happening here, but something | |
broke. | |
In Template::Anti, the node-set.t test is failing: | |
t/node-set.t ........... | |
ok 1 - text works | |
ok 2 - attrib one works | |
ok 3 - attrib two works | |
ok 4 - attrib three works |