| Time |
S |
Nick |
Message |
| 00:19 |
|
skids |
r: sub p (*@a) { a(@a); }; proto sub a (|c) { "dispatcher".say; {*} }; multi sub a (*@a) {sink for (@a) { a($_) }}; multi sub a (Int $i) { }; multi sub a ($a) { $a.perl.say; die("wantedInt"); };a(3); p(3); |
| 00:19 |
|
p6eval |
rakudo 935c90: OUTPUT«dispatcherdispatcher[3]wantedInt in sub a at /tmp/X1ckBTjz1W:1 in sub a at /tmp/X1ckBTjz1W:1 in sub p at /tmp/X1ckBTjz1W:1 in block at /tmp/X1ckBTjz1W:1» |
| 00:21 |
|
|
Targen joined #perl6 |
| 00:25 |
|
|
dayangkun joined #perl6 |
| 00:42 |
|
|
krunen joined #perl6 |
| 00:54 |
|
|
doomrobo joined #perl6 |
| 00:55 |
|
|
awwaiid joined #perl6 |
| 01:04 |
|
|
Ayiko joined #perl6 |
| 01:05 |
|
|
anuby joined #perl6 |
| 01:10 |
|
swarley |
What is the build chain recommended to build parrot/nqp/rakudo natively under windows? |
| 01:10 |
|
diakopter |
what compiler would you like to use? microsoft? msvc is the one jnthn and I use on Windows |
| 01:11 |
|
diakopter |
last time I tried gcc/strawberry, I couldn't get it to work for the life of me |
| 01:12 |
|
diakopter |
rurban maintains the cygwin parrot; I bet it works there |
| 01:21 |
|
|
hypolin joined #perl6 |
| 01:38 |
|
* benabik |
has used Strawberry Perl to build Parrot and Rakudo |
| 01:38 |
|
benabik |
(Although not terribly recently, I'll admit.) |
| 01:39 |
|
skids |
r: role A { method a {...} }; role B does A { }; role C does B { method a { "OHAI".say } }; class D does C { }; my D $f .= new(); # OK, as expected |
| 01:39 |
|
p6eval |
rakudo 935c90: ( no output ) |
| 01:39 |
|
swarley |
Im using strawberry perl right now |
| 01:39 |
|
skids |
r: role A { method a {...} }; role B does A { }; # Rakudo seems to want to pun this even when not used |
| 01:39 |
|
p6eval |
rakudo 935c90: OUTPUT«Method 'a' must be implemented by B because it is required by a rolecurrent instr.: '' pc 24148 (src/gen/perl6-metamodel.pir:10984) (src/gen/Metamodel.pm:2187)called from Sub 'compose_method_table' pc 23943 (src/gen/perl6-metamodel.pir:10913) (src/gen/Metamodel.p… |
| 01:40 |
|
swarley |
I use strawberry on windows |
| 01:40 |
|
swarley |
I dislike activestate |
| 01:40 |
|
skids |
r: role A { method a {...} }; role B does A { }; 1; # ...but it seems to be due to the final sink context |
| 01:40 |
|
p6eval |
rakudo 935c90: ( no output ) |
| 01:41 |
|
|
mynameis joined #perl6 |
| 01:42 |
|
benabik |
I think I just used Strawberry and msysgit. I don't _think_ I needed anything else. |
| 01:43 |
|
swarley |
I'm using powershell and strawberry right now |
| 01:43 |
|
swarley |
lets see how it goes |
| 01:43 |
|
swarley |
tests for parrot seem to be passing |
| 01:43 |
|
swarley |
what is gmake by the way/ |
| 01:44 |
|
benabik |
GNU make |
| 01:44 |
|
swarley |
ah |
| 01:44 |
|
benabik |
(usually) |
| 01:44 |
|
swarley |
I've never seen another make.. well cmake |
| 01:44 |
|
swarley |
But I rarely see that used |
| 01:46 |
|
benabik |
There's nmake on Windows and BSD Make. I've seen other makes on things like Solaris (although they may use GNU now). |
| 01:46 |
|
benabik |
Generally there's no certainty what make is, but gmake is always GNU. |
| 01:54 |
|
swarley |
It fails to build nqp |
| 01:54 |
|
swarley |
/usr/bin/sh: line 0: cd: srcpmc: No such file or directory |
| 01:54 |
|
swarley |
gmake: *** [src\pmc\nqp_group.dll] Error 1 |
| 02:00 |
|
benabik |
I'm guessing that the Makefile got src\pmc from somewhere, but Strawberry's make doesn't understand backslashes. |
| 02:07 |
|
swarley |
it works up until that specific one |
| 02:18 |
|
|
FROGGS_ joined #perl6 |
| 02:47 |
|
|
szbalint joined #perl6 |
| 02:51 |
|
swarley |
Swarley OcctaviasViolin /cygdrive/c/Users/Swarley/Documents/GitHub/rakudo/nqp/parrot |
| 02:51 |
|
swarley |
$ make install |
| 02:51 |
|
swarley |
', needed by `src/pmc/addrregistry.o'. Stop.rot/memory.h |
| 02:51 |
|
swarley |
What kind of error is that?? |
| 02:52 |
|
geekosaur |
one with a control-m in the middle |
| 02:52 |
|
geekosaur |
something expecting unix style line endings got a dos line ending instead |
| 02:55 |
|
swarley |
i did `make distclean' and now i get this |
| 02:55 |
|
swarley |
CONST_STRING split across lines at 461 in src/string/api.c |
| 03:23 |
|
swarley |
nqp: say("hello" ~~ s/l/r/g); |
| 03:23 |
|
p6eval |
nqp: OUTPUT«Divide by zerocurrent instr.: '' pc 114 ((file unknown):64) (/tmp/Wi6x2I0hGw:1)» |
| 03:23 |
|
TimToady |
n: say("hello" ~~ s/l/r/g); |
| 03:24 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«===[0mSORRY!===[0m��Unsupported use of suffix regex modifiers; in Perl 6 please use prefix adverbs at /tmp/YPgT99eXie line 1:�------> say("hello" ~~ s/l/r/g�);�Other potential difficulties:� Unsupported use of /g; in Perl 6 … |
| 03:25 |
|
swarley |
r: my $foo = "hello"; $foo ~~ s/l/r/g; say $foo; # Works in perl5 with the equivalent expressions |
| 03:25 |
|
p6eval |
rakudo 935c90: OUTPUT«===[0mSORRY!===[0m�Unsupported use of /g; in Perl 6 please use :g�at /tmp/5QCHSOy5bW:1�------> my $foo = "hello"; $foo ~~ s/l/r/g�; say $foo; # Works in perl5 with the eq�» |
| 03:26 |
|
swarley |
So.. what should i use instead of /g? |
| 03:26 |
|
swarley |
oh |
| 03:26 |
|
swarley |
:g |
| 03:27 |
|
swarley |
uhm.. How do I use :g? |
| 03:28 |
|
TimToady |
nr: say("hello" ~~ s:g/l/r/); |
| 03:28 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«Unhandled exception: Writing to readonly scalar at /home/p6eval/niecza/lib/CORE.setting line 593 (Cool.subst @ 88)  at /tmp/uCSjS87C3G line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4218 (ANON @ 3)  at /home/p6eval/niecza/lib/C… |
| 03:28 |
|
p6eval |
..rakudo 935c90: OUTPUT«Cannot assign to a non-container in sub infix:<=> at src/gen/CORE.setting:12434 in block at /tmp/zpTeDrW8Hf:1» |
| 03:28 |
|
TimToady |
nr: $_ = "hello"; s:g/l/r/; .say |
| 03:28 |
|
p6eval |
rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«herro» |
| 03:28 |
|
swarley |
ah |
| 03:29 |
|
swarley |
nqp: my $test := "hello"; $test ~~ s:g/l/r/; say($test) |
| 03:29 |
|
p6eval |
nqp: OUTPUT«Confused at line 2, near "$test ~~ s"current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)» |
| 03:29 |
|
* swarley |
sighs |
| 03:30 |
|
TimToady |
nr: my $test := "hello"; $test ~~ s:g/l/r/; say($test) |
| 03:30 |
|
swarley |
I suppose I'll write my own gsub then |
| 03:30 |
|
p6eval |
rakudo 935c90: OUTPUT«Cannot assign to a non-container in sub infix:<=> at src/gen/CORE.setting:12434 in block at /tmp/scmR2cMj6Q:1» |
| 03:30 |
|
p6eval |
..niecza v24-18-gaf64300: OUTPUT«Unhandled exception: Writing to readonly scalar at /home/p6eval/niecza/lib/CORE.setting line 593 (Cool.subst @ 88)  at /tmp/onm5UnZxNK line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 4218 (ANON @ 3)  at /home/p6eval/niecza/lib/C… |
| 03:30 |
|
TimToady |
nr: my $test = "hello"; $test ~~ s:g/l/r/; say($test) |
| 03:30 |
|
p6eval |
rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«herro» |
| 03:31 |
|
TimToady |
nqp doesn't have assignment, so can't actually set a mutable container |
| 03:31 |
|
swarley |
Well, I'm trying to change all occurances of ' (not \') to \' |
| 03:33 |
|
TimToady |
nqp: my $test := "hello"; say $test.subst(/l/, 'r', :g); |
| 03:33 |
|
p6eval |
nqp: OUTPUT«Confused at line 2, near "say $test."current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)» |
| 03:33 |
|
TimToady |
nqp: my $test := "hello"; say($test.subst(/l/, 'r', :g)); |
| 03:33 |
|
p6eval |
nqp: OUTPUT«Method 'subst' not found for invocant of class 'String'current instr.: '' pc 117 ((file unknown):60) (/tmp/L3neICYvi9:1)» |
| 03:34 |
|
* TimToady |
is not quite an nqp expert |
| 03:34 |
|
swarley |
I would understand if it didn't modify the value |
| 03:34 |
|
swarley |
but it seems odd to be missing to many standard functions |
| 03:34 |
|
|
hulu joined #perl6 |
| 03:35 |
|
benabik |
NQP is the minimum needed to implement Rakudo, so it's 'missing' alot. |
| 03:35 |
|
swarley |
So I notice |
| 03:35 |
|
* TimToady |
prefers Perl 6 :) |
| 03:35 |
|
hulu |
helo |
| 03:35 |
|
hulu |
what does 'my @digits = roll 4, 1..9;' mean? |
| 03:36 |
|
benabik |
nqp: subst('hello', /l/, 'r', :global) |
| 03:36 |
|
p6eval |
nqp: ( no output ) |
| 03:36 |
|
swarley |
I like NQP, don't get me wrong. If it was a full implementation of the syntax handling, i'd reinvent the wheel each time i needed it if i needed to |
| 03:36 |
|
benabik |
nqp: say(subst('hello', /l/, 'r', :global)) |
| 03:36 |
|
p6eval |
nqp: OUTPUT«herro» |
| 03:36 |
|
benabik |
swarley: ^ |
| 03:36 |
|
|
adu joined #perl6 |
| 03:36 |
|
swarley |
oh thank you benabik |
| 03:36 |
|
benabik |
ack is your friend. (Found it with ack subst) |
| 03:37 |
|
swarley |
does that modify the value of the first argument or return a new value? |
| 03:37 |
|
benabik |
Appears to return a new value. |
| 03:37 |
|
hulu |
who can help me |
| 03:37 |
|
swarley |
nqp: my $foo = "bar"; subst($foo, /r/,'z'); say($foo) |
| 03:37 |
|
p6eval |
nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " \"bar\"; su"current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)» |
| 03:37 |
|
benabik |
r: my @digits = roll 4, 1..9; say @digits |
| 03:37 |
|
p6eval |
rakudo 935c90: OUTPUT«3 7 9 5» |
| 03:37 |
|
swarley |
nqp: my $foo := "bar"; subst($foo, /r/,'z'); say($foo) |
| 03:37 |
|
p6eval |
nqp: OUTPUT«bar» |
| 03:37 |
|
swarley |
Okay, just returns the value |
| 03:37 |
|
swarley |
I should have known that anyway |
| 03:37 |
|
adu |
omg, I just blew my mind |
| 03:39 |
|
adu |
the reason why closures are so powerful is that they're the procedural equivalent of XML |
| 03:39 |
|
hulu |
benabik: what does 'roll' mean? |
| 03:39 |
|
benabik |
hulu: roll is like rolling a die. roll( N, @list ) returns N random selections from the list (or more OO: @list.roll(N)) |
| 03:39 |
|
swarley |
nqp: my $str = "'hello world'!"; say("'{subst($str, /<!after \\> \'/, "\\'", :global)}'") |
| 03:39 |
|
p6eval |
nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " \"'hello w"current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)» |
| 03:39 |
|
swarley |
nqp: my $str := "'hello world'!"; say("'{subst($str, /<!after \\> \'/, "\\'", :global)}'") |
| 03:39 |
|
p6eval |
nqp: OUTPUT«Could not find sub cuid_1_1360035592.93306current instr.: '' pc 653 ((file unknown):148248208) (/tmp/dtF26ZLVCc:1)» |
| 03:40 |
|
swarley |
oh, i need to include QRegex for after i think.. |
| 03:40 |
|
* swarley |
goes to msg |
| 03:41 |
|
swarley |
or maybe not |
| 03:44 |
|
swarley |
nqp: /<!after foo>/ |
| 03:44 |
|
p6eval |
nqp: ( no output ) |
| 03:44 |
|
swarley |
okay, so that's not the issue |
| 03:46 |
|
hulu |
benabik: what does '?Exp24' mean? |
| 03:47 |
|
benabik |
hulu: Convert Exp24 to a boolean, although it seems like odd P6 code. |
| 03:48 |
|
|
diakopte1 joined #perl6 |
| 03:54 |
|
|
xinming joined #perl6 |
| 03:54 |
|
swarley |
x`Alright, I finally got an answer |
| 03:54 |
|
swarley |
nqp: my $old_str := "'hello \\\'world\\\'!\'"; my $str := subst(subst($old_str, /\\/, "\\\\", :global), /\'/, "\\'", :global); say("'{$str}'") |
| 03:54 |
|
p6eval |
nqp: OUTPUT«'\'hello \\\'world\\\'!\''» |
| 03:55 |
|
swarley |
'hello \'world\'! |
| 04:05 |
|
|
preflex_ joined #perl6 |
| 04:12 |
|
|
viewonly joined #perl6 |
| 04:23 |
|
|
wtw joined #perl6 |
| 04:27 |
|
|
sevin joined #perl6 |
| 04:34 |
|
|
lorn joined #perl6 |
| 04:42 |
|
|
lorn joined #perl6 |
| 05:05 |
|
hulu |
grammar Exp24 { token TOP { ^ <exp> $ } token exp { <term> [ <op> <term> ]* } token term { '(' <exp> ')' | \d } token op { '+' | '-' | '*' | '/' } } |
| 05:05 |
|
hulu |
what's does '3 + 5' mean? |
| 05:07 |
|
hulu |
r: grammar Exp24 { token TOP { ^ <exp> $ } token exp { <term> [ <op> <term> ]* } token term { '(' <exp> ')' | \d } token op { '+' | '-' | '*' | '/' } }; Exp24.parse('3+5'); |
| 05:08 |
|
p6eval |
rakudo 935c90: OUTPUT«===[0mSORRY!===[0m�Two terms in a row�at /tmp/p8QSCCsI6F:1�------> Exp24 { token TOP { ^ <exp> $ } �token exp { <term> [ <op> <term> ]* } � expecting any of:� statement list� prefix or term� prefix or… |
| 05:08 |
|
hulu |
r: grammar Exp24 { token TOP { ^ <exp> $ } token exp { <term> [ <op> <term> ]* } token term { '(' <exp> ')' | \d } token op { '+' | '-' | '*' | '/' } }; ?Exp24.parse('3+5'); |
| 05:08 |
|
p6eval |
rakudo 935c90: OUTPUT«===[0mSORRY!===[0m�Two terms in a row�at /tmp/ESj0IW1Gg8:1�------> Exp24 { token TOP { ^ <exp> $ } �token exp { <term> [ <op> <term> ]* } � expecting any of:� statement list� prefix or term� prefix or… |
| 05:09 |
|
hulu |
benabik: why ‘3+5’ not parse |
| 05:09 |
|
mst |
hulu: '3 + 5' |
| 05:09 |
|
mst |
perhaps |
| 05:09 |
|
hulu |
r: grammar Exp24 { token TOP { ^ <exp> $ } token exp { <term> [ <op> <term> ]* } token term { '(' <exp> ')' | \d } token op { '+' | '-' | '*' | '/' } }; ?Exp24.parse('3 + 5'); |
| 05:09 |
|
p6eval |
rakudo 935c90: OUTPUT«===[0mSORRY!===[0m�Two terms in a row�at /tmp/_8yY2nU7zX:1�------> Exp24 { token TOP { ^ <exp> $ } �token exp { <term> [ <op> <term> ]* } � expecting any of:� statement list� prefix or term� prefix or… |
| 05:09 |
|
skids |
hulu: when you put things all on one line, curly braces that normally end constructs need a ; after them. |
| 05:09 |
|
geekosaur |
you're not getting that far; it's throwing an error in the middle of your definitions |
| 05:10 |
|
hulu |
r: grammar Exp24 { token TOP { ^ <exp> $ } ; token exp { <term> [ <op> <term> ]* } ; token term { '(' <exp> ')' | \d }; token op { '+' | '-' | '*' | '/' } ;}; ?Exp24.parse('3 + 5'); |
| 05:10 |
|
p6eval |
rakudo 935c90: ( no output ) |
| 05:10 |
|
hulu |
r: grammar Exp24 { token TOP { ^ <exp> $ } ; token exp { <term> [ <op> <term> ]* } ; token term { '(' <exp> ')' | \d }; token op { '+' | '-' | '*' | '/' } ;}; say ?Exp24.parse('3 + 5'); |
| 05:10 |
|
p6eval |
rakudo 935c90: OUTPUT«False» |
| 05:10 |
|
hulu |
skids: why not parse |
| 05:11 |
|
mst |
hulu: maybe take back out the spaces I suggested ? |
| 05:11 |
|
hulu |
r: grammar Exp24 { token TOP { ^ <exp> $ } ; token exp { <term> [ <op> <term> ]* } ; token term { '(' <exp> ')' | \d }; token op { '+' | '-' | '*' | '/' } ;}; say ?Exp24.parse('3+5'); |
| 05:11 |
|
p6eval |
rakudo 935c90: OUTPUT«True» |
| 05:12 |
|
mst |
I misunderstood the problem before, sorry |
| 05:12 |
|
hulu |
thx |
| 05:12 |
|
skids |
tokens are not :sigspace |
| 05:12 |
|
mst |
skids: that was my fault, I misunderstood earlier and suggested the spaces in the string to parse |
| 05:12 |
|
skids |
ah |
| 05:17 |
|
|
xinming_ joined #perl6 |
| 05:21 |
|
|
sevin joined #perl6 |
| 05:34 |
|
hulu |
repeat while --$b { .say for "&b($b) on the wall", b($b), 'Take one down, pass it around', "&b($b-1) on the wall", ''; } |
| 05:34 |
|
hulu |
what does '&b($b)' mean |
| 05:36 |
|
hulu |
sub b($b) { "$b bottle{'s'.substr($b == 1)} of beer"; };repeat while --$b { .say for "&b($b) on the wall", b($b), 'Take one down, pass it around', "&b($b-1) on the wall", ''; } |
| 05:36 |
|
hulu |
mst: what does '&b($b)' mean? |
| 05:36 |
|
benabik |
hulu: Call sub b with argument $b. & is the sigil for a function. |
| 05:36 |
|
hulu |
benabik: why not 'b($b)' |
| 05:37 |
|
benabik |
In code you don't generally need the &, but in a string you do. |
| 05:37 |
|
hulu |
benabik: ic |
| 05:37 |
|
hulu |
benabik: thx |
| 05:37 |
|
benabik |
hulu: np |
| 05:56 |
|
|
marloshouse joined #perl6 |
| 05:57 |
|
|
colomon joined #perl6 |
| 06:04 |
|
|
SamuraiJack joined #perl6 |
| 06:18 |
|
|
Psyche^ joined #perl6 |
| 06:36 |
|
|
sevin joined #perl6 |
| 06:38 |
|
|
FROGGS_ joined #perl6 |
| 06:38 |
|
|
am0c joined #perl6 |
| 06:41 |
|
|
kaleem joined #perl6 |
| 06:46 |
|
|
benabik joined #perl6 |
| 06:46 |
|
|
domidumont joined #perl6 |
| 06:51 |
|
FROGGS |
morning |
| 06:59 |
|
moritz |
\o morning |
| 06:59 |
|
FROGGS |
nr: my @var = <a b c>; say "b" ~~ / @var / |
| 06:59 |
|
p6eval |
rakudo 935c90: OUTPUT«#<failed match>» |
| 06:59 |
|
p6eval |
..niecza v24-18-gaf64300: OUTPUT«#<match from(0) to(1) text(b) pos([].list) named({}.hash)>» |
| 06:59 |
|
FROGGS |
nr: my @var = <a b c>; say "abc" ~~ / @var / |
| 06:59 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«#<match from(0) to(1) text(a) pos([].list) named({}.hash)>» |
| 06:59 |
|
p6eval |
..rakudo 935c90: OUTPUT«#<failed match>» |
| 07:00 |
|
FROGGS |
nr: my @var = <a b c>; say "abc" ~~ / @var+ / |
| 07:00 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«#<match from(0) to(3) text(abc) pos([].list) named({}.hash)>» |
| 07:00 |
|
p6eval |
..rakudo 935c90: OUTPUT«#<failed match>» |
| 07:00 |
|
FROGGS |
cool |
| 07:00 |
|
|
quester joined #perl6 |
| 07:00 |
|
FROGGS |
nr: say "abc" ~~ / @( <a b c> )+ / |
| 07:00 |
|
p6eval |
rakudo 935c90: OUTPUT«===[0mSORRY!===[0m�Unrecognized regex metacharacter @ (must be quoted to match literally)�at /tmp/nGlhM5uDEJ:1�------> say "abc" ~~ / �@( <a b c> )+ /�Unable to parse regex; couldn't find final '/'�at /tmp/nGlhM5uDEJ:1�------> sa… |
| 07:00 |
|
p6eval |
..niecza v24-18-gaf64300: OUTPUT«#<match from(0) to(3) text(abc) pos([].list) named({}.hash)>» |
| 07:02 |
|
FROGGS |
array interpolation still doesnt work locally with my changes to nom |
| 07:02 |
|
FROGGS |
only $( ... ) is working |
| 07:03 |
|
FROGGS |
dunno what %( ... ) should do |
| 07:03 |
|
|
alec__1 joined #perl6 |
| 07:04 |
|
FROGGS |
maybe ... |
| 07:04 |
|
FROGGS |
n: my %var = ( a => b ); say "abc" ~~ / %var<a> / |
| 07:04 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«===[0mSORRY!===[0m��Only $ and @ variables may be used in regexes for now at /tmp/hVtxku9evh line 1:�------> y %var = ( a => b ); say "abc" ~~ / %var�<a> /��Undeclared routine:� 'b' used at line 1��Potential difficulties:� A… |
| 07:04 |
|
FROGGS |
n: my %var = ( a => "b" ); say "abc" ~~ / %var<a> / |
| 07:04 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«===[0mSORRY!===[0m��Only $ and @ variables may be used in regexes for now at /tmp/ZugQXJyYLI line 1:�------> %var = ( a => "b" ); say "abc" ~~ / %var�<a> /��Potential difficulties:� Apparent subscript will be treated as rege… |
| 07:04 |
|
FROGGS |
weird |
| 07:12 |
|
|
sevin joined #perl6 |
| 07:16 |
|
|
sevin_ joined #perl6 |
| 07:26 |
|
|
xiaoyafeng joined #perl6 |
| 07:37 |
|
|
am0c joined #perl6 |
| 07:46 |
|
diakopter |
.. .. . ... . . . .... . . . . . |
| 07:49 |
|
|
domidumont joined #perl6 |
| 07:51 |
|
moritz |
iis se ee h e e e e e ? |
| 07:51 |
|
tadzik |
good morning |
| 07:51 |
|
moritz |
good morning tadzik |
| 07:54 |
|
sorear |
mornign |
| 07:54 |
|
FROGGS |
o/ |
| 07:57 |
|
|
krunen joined #perl6 |
| 07:58 |
|
|
domidumont joined #perl6 |
| 08:05 |
|
|
dayangkun joined #perl6 |
| 08:11 |
|
|
quester left #perl6 |
| 08:18 |
|
|
sevin_ joined #perl6 |
| 08:20 |
|
|
daxim joined #perl6 |
| 08:30 |
|
|
bruges_ joined #perl6 |
| 08:39 |
|
|
Pompel joined #perl6 |
| 08:39 |
|
|
nebuchadnezzar joined #perl6 |
| 08:44 |
|
|
s0rear joined #perl6 |
| 08:59 |
|
tadzik |
for you, fellow vim-junkies: https://twitter.com/null |
| 08:59 |
|
tadzik |
er, what |
| 09:00 |
|
tadzik |
that was supposed to be http://valloric.github.com/YouCompleteMe/ :) |
| 09:03 |
|
hoelzro |
tadzik: ah, I saw that, but I haven't read about it yet |
| 09:05 |
|
tadzik |
it takes some effort to get running, but I'd say it's worth it |
| 09:05 |
|
tadzik |
vim could use some package manager that's not completely horrible :) |
| 09:07 |
|
|
fhelmberger joined #perl6 |
| 09:08 |
|
hoelzro |
heh |
| 09:33 |
|
|
sqirrel joined #perl6 |
| 09:34 |
|
|
xinming joined #perl6 |
| 09:35 |
|
tadzik |
oh hm, my nqp-jvm patches are both wrong :| |
| 09:42 |
|
|
benabik joined #perl6 |
| 09:43 |
|
|
Psyche^ joined #perl6 |
| 09:53 |
|
|
dakkar joined #perl6 |
| 09:55 |
|
|
sizz joined #perl6 |
| 09:59 |
|
masak |
mornin', #perl6 |
| 10:01 |
|
tadzik |
morning' masak' |
| 10:02 |
|
hulu |
@quantities Z @bottles Z @actions Z @quantities[1 .. *] Z @bottles[1 .. *] |
| 10:03 |
|
hulu |
benabik: what does '1 .. *' mean? |
| 10:04 |
|
moritz |
it's an infinite range starting from 1 |
| 10:05 |
|
hulu |
moritz: what does 'infinite range' mean? |
| 10:05 |
|
|
szbalint joined #perl6 |
| 10:06 |
|
moritz |
hulu: which part are you having trouble with? 'infinite' or 'range'? |
| 10:06 |
|
hulu |
infinite |
| 10:06 |
|
moritz |
it doesn't have an end |
| 10:06 |
|
moritz |
it goes one forever |
| 10:07 |
|
hulu |
for @quantities Z @bottles Z @actions Z @quantities[1 .. *] Z @bottles[1 .. *] -> $a, $b, $c, $d, $e { say "$a $b of beer on the wall"; say "$a $b of beer"; say $c; say "$d $e of beer on the wall\n"; } |
| 10:07 |
|
hulu |
moritz: please look at this |
| 10:07 |
|
|
xinming joined #perl6 |
| 10:08 |
|
* moritz |
looks at it |
| 10:08 |
|
tadzik |
masak: I have a shiny new rakudobug for you |
| 10:08 |
|
masak |
ooh |
| 10:08 |
|
tadzik |
r: sub prefix:<\o/>($) { } |
| 10:08 |
|
p6eval |
rakudo 935c90: OUTPUT«Null PMC access in find_method('clone') in block at /tmp/1ZhASdkYfl:1» |
| 10:08 |
|
|
kivutar joined #perl6 |
| 10:08 |
|
masak |
when I make a language, I'm going to avoid the word "infinite". it's often more a question of "unbound". |
| 10:08 |
|
masak |
er, "unbounded". |
| 10:08 |
|
* masak |
submits rakudobug |
| 10:09 |
|
masak |
r: sub prefix:<\p>($) {} |
| 10:09 |
|
p6eval |
rakudo 935c90: OUTPUT«Null PMC access in find_method('clone') in block at /tmp/bUTogzfhSm:1» |
| 10:09 |
|
masak |
r: sub prefix:<\a>($) {} |
| 10:09 |
|
p6eval |
rakudo 935c90: OUTPUT«Null PMC access in find_method('clone') in block at /tmp/mgwCG0Vtyl:1» |
| 10:09 |
|
masak |
r: sub prefix:<\\>($) {} |
| 10:09 |
|
p6eval |
rakudo 935c90: OUTPUT«Null PMC access in find_method('clone') in block at /tmp/J8FFRNqtwK:1» |
| 10:09 |
|
masak |
r: sub prefix:<q>($) {} |
| 10:09 |
|
p6eval |
rakudo 935c90: ( no output ) |
| 10:09 |
|
masak |
ok, backslashes in preifx ops. got it. |
| 10:09 |
|
masak |
r: sub postfix:<\\>($) {} |
| 10:09 |
|
p6eval |
rakudo 935c90: OUTPUT«Null PMC access in find_method('clone') in block at /tmp/eWTbkYG8X8:1» |
| 10:09 |
|
masak |
r: sub infix:<\\>($) {} |
| 10:09 |
|
p6eval |
rakudo 935c90: OUTPUT«Null PMC access in find_method('clone') in block at /tmp/zadixk05uL:1» |
| 10:09 |
|
* masak |
submits rakudobug |
| 10:14 |
|
|
hulu joined #perl6 |
| 10:16 |
|
hulu |
masak: 'Adding to an entry that is not in the hash yet will cause that entry to spring into existence just-in-time, with a value starting at zero.' 这句话中文怎么说? |
| 10:19 |
|
masak |
hulu: 坚持住,我将它翻译。 |
| 10:20 |
|
hulu |
masak: 谢谢 |
| 10:20 |
|
hulu |
moritz: what does 'infinite range' mean? |
| 10:21 |
|
FROGGS |
r: say -Inf .. Inf |
| 10:21 |
|
p6eval |
rakudo 935c90: OUTPUT«-Inf..Inf» |
| 10:21 |
|
moritz |
hulu: didn't we have that discussion a while ago? |
| 10:21 |
|
masak |
moritz: I think hulu doesn't understand the word "infinite". |
| 10:21 |
|
hulu |
for @quantities Z @bottles Z @actions Z @quantities[1 .. *] Z @bottles[1 .. *] -> $a, $b, $c, $d, $e { say "$a $b of beer on the wall"; say "$a $b of beer"; say $c; say "$d $e of beer on the wall\n"; } |
| 10:22 |
|
hulu |
masak: 我无法理解这句 |
| 10:22 |
|
masak |
no no wait |
| 10:23 |
|
masak |
hulu: 如果你这样做 'my %h; %h<foo> += 42', 那么这个值 %h<foo> 被自动设置为0前增加了42 |
| 10:24 |
|
masak |
hulu: 你明白吗?我明白的说吗? |
| 10:24 |
|
hulu |
spring into existence just-in-time 是什么意思? |
| 10:25 |
|
masak |
hulu: 开始存在,在最后一刻 |
| 10:25 |
|
moritz |
masak: which is why I've tried to explain it |
| 10:26 |
|
masak |
moritz: nodnod. it didn't stick. |
| 10:26 |
|
masak |
for whatever reason. |
| 10:26 |
|
masak |
communication is hard ;) |
| 10:26 |
|
hulu |
with a value starting at zero 什么意思 |
| 10:27 |
|
hulu |
masak: 请看看是什么意思 |
| 10:27 |
|
masak |
hulu: %h<foo> 从0开始 |
| 10:28 |
|
hulu |
我试着翻译一下 |
| 10:28 |
|
au |
对哈希表内的某个项目进行增值,如果该项目不存在,哈希表会先自动将该项目设为零。 |
| 10:28 |
|
phenny |
au: 15 Jan 18:50Z <[Coke]> tell au cleaned up pugs, we're back up to 38.55% |
| 10:28 |
|
masak |
au: thank you. |
| 10:28 |
|
au |
np :p |
| 10:29 |
|
hulu |
au: thx |
| 10:29 |
|
masak |
au: and now I feel a little embarrassed... I'm leaning heavily on GT here, and probably making a mess of word order and tone and word choice. *^_^* |
| 10:29 |
|
hulu |
au: that entry to spring into existence just-in-time 什么意思 |
| 10:30 |
|
sorear |
au! \o/ |
| 10:30 |
|
arnsholt |
masak: Still better than the rest of us =) |
| 10:30 |
|
au |
该项目在用到时,会预先自动生成。 |
| 10:30 |
|
masak |
heh, hulu likes to make sure he really understood... :) |
| 10:30 |
|
au |
yeah, there's no easy zh equiv of just-in-time |
| 10:31 |
|
masak |
ah, there's the problem, then ;) |
| 10:31 |
|
au |
the literal rendering is probably 「值到用时方生成」 after 「书到用时上网找」 |
| 10:31 |
|
masak |
hulu: "just-in-time" means 在最后的时刻 |
| 10:31 |
|
hulu |
我不理解 spring into existence |
| 10:31 |
|
au |
except that, literally, means "at the armageddon" |
| 10:32 |
|
masak |
au: that's a bit too late :P |
| 10:32 |
|
sorear |
just in time is a bit of a funny idiom anyway. I wonder if there are other common ways of handling things like that |
| 10:32 |
|
masak |
though kind of a nice feature... |
| 10:32 |
|
au |
hulu: spring = 跳, into = 进, existence = 存在 |
| 10:32 |
|
au |
spring into existence = 生成 |
| 10:32 |
|
sorear |
i wonder what they do with Gödel's completeness theorem? |
| 10:32 |
|
masak |
sorear: what's the connection to just-in-time? |
| 10:33 |
|
sorear |
masak: every consistant set of axioms can be realized using a model (set of objects + relations), the basic idea is to lazily construct objects while taking a countable closure |
| 10:34 |
|
sorear |
it's interesting because it's not a temporal/dynamic process at all |
| 10:34 |
|
sorear |
but it has the same character of only caring about concepts which are in a sense accessible |
| 10:35 |
|
masak |
hm... never thought of it that way. nice. |
| 10:35 |
|
masak |
I've only recently started using "model" in that way, though. it feels very central to programming, somehow. |
| 10:36 |
|
masak |
where does "taking a countable closure" come in? when is that done? |
| 10:36 |
|
hulu |
au: 我试着翻译一下:向哈希结构中添加一个不存在的项目,将导致这个项目在最后时刻以零为值创建 |
| 10:36 |
|
sorear |
masak: A countable closure covers all possible finite sequences of deductions. |
| 10:36 |
|
masak |
yes, I realize that. |
| 10:37 |
|
masak |
so it's what you construct when you somehow want to talk about the whole model... |
| 10:37 |
|
sorear |
unlike autovivification, which only closes over the single path which is taken |
| 10:37 |
|
au |
hulu: that's fine, except "add to an entry" here means "increment / 增值 / 递加 (+=, ++)" not "adding an entry "assignment / 赋值 / 添加" |
| 10:37 |
|
masak |
sorear: ah! |
| 10:37 |
|
masak |
there's the connection :) |
| 10:38 |
|
hulu |
au: 谢谢 |
| 10:38 |
|
masak |
au++ |
| 10:38 |
|
au |
hulu: 没事儿 :) |
| 10:42 |
|
hulu |
au: for @quantities Z @bottles Z @actions Z @quantities[1 .. *] Z @bottles[1 .. *] -> $a, $b, $c, $d, $e { say "$a $b of beer on the wall"; say "$a $b of beer"; say $c; say "$d $e of beer on the wall\n"; } |
| 10:42 |
|
hulu |
au: 这段程序中的 1 .. * 是什么意思 |
| 10:43 |
|
au |
hulu: 建构一个 range 区间序列,以 integer 整数为值,下限为 1,没有上限。 |
| 10:43 |
|
hulu |
au: 没有上限,如何停止? |
| 10:44 |
|
masak |
moritz: <au> "...and there is no upper limit", <hulu> "if there's no upper limit, how to stop?" -- seems there was a conceptual difficulty in understanding. |
| 10:44 |
|
au |
因为是用作阵列索引,@quantities 内元素用完时就会停止。 |
| 10:45 |
|
masak |
...which ties nicely into what sorear said about finite deductions inside a countable closure. :) |
| 10:45 |
|
au |
yup. |
| 10:45 |
|
hulu |
au: 什么是 阵列索引 |
| 10:46 |
|
au |
hulu: 阵列结构一般以整数为索引,相当于哈希结构的键。 |
| 10:46 |
|
masak |
heh. I usually assume array knowledge and explain hashes using it, not the other way around. ;) |
| 10:46 |
|
* au |
assumes very little :) |
| 10:46 |
|
masak |
:P |
| 10:48 |
|
masak |
hulu: a range only specifies the two endpoints. it doesn't force you to count from one to the other. |
| 10:48 |
|
masak |
...which would, indeed, take a very long time. |
| 10:51 |
|
hulu |
r: my @quantities = (99 ... 1), 'No more', 99; my @bottles = 'bottles' xx 98, 'bottle', 'bottles' xx 2; my @actions = 'Take one down, pass it around' xx 99, 'Go to the store, buy some more';say @quantities Z @bottles Z @actions Z @quantities[1 .. *] Z @bottles[1 .. *]; |
| 10:51 |
|
p6eval |
rakudo 935c90: OUTPUT«99 bottles Take one down, pass it around 98 bottles 98 bottles Take one down, pass it around 97 bottles 97 bottles Take one down, pass it around 96 bottles 96 bottles Take one down, pass it around 95 bottles 95 bottles Take one down, pass it around 94 bottles 94 bo… |
| 10:56 |
|
sorear |
A range is just a pair endowed with semantics. |
| 10:56 |
|
sorear |
r: my $r = 2 .. "green"; $r.end |
| 10:56 |
|
p6eval |
rakudo 935c90: OUTPUT«Cannot call 'Real'; none of these signatures match::(Mu:U \v: Mu *%_) in method Real at src/gen/CORE.setting:872 in method Real at src/gen/CORE.setting:2391 in method new at src/gen/CORE.setting:5255 in sub infix:<..> at src/gen/CORE.setting:5436 in blo… |
| 10:57 |
|
moritz |
that's LTA |
| 10:58 |
|
hulu |
r: my @quantities = (99 ... 1), 'No more', 99; my @bottles = 'bottles' xx 98, 'bottle', 'bottles' xx 2; my @actions = 'Take one down, pass it around' xx 99, 'Go to the store, buy some more'; #for @quantities Z @bottles Z @actions Z # @quantities[1 .. *] Z @bottles[1 .. *] # -> $a, $b, $c, $d, $e { for @quantities Z @bottles Z @actions -> $a, $b, $c { say "$a $b of beer on the wall"; say "$a $b of beer"; say $c; # say "$d $e o |
| 10:58 |
|
p6eval |
rakudo 935c90: ( no output ) |
| 10:59 |
|
hulu |
r: my @quantities = (99 ... 1), 'No more', 99; my @bottles = 'bottles' xx 98, 'bottle', 'bottles' xx 2; my @actions = 'Take one down, pass it around' xx 99, 'Go to the store, buy some more'; for @quantities Z @bottles Z @actions -> $a, $b, $c { say "$a $b of beer on the wall"; say "$a $b of beer"; say $c; } |
| 10:59 |
|
p6eval |
rakudo 935c90: OUTPUT«99 bottles of beer on the wall99 bottles of beerTake one down, pass it around98 bottles of beer on the wall98 bottles of beerTake one down, pass it around97 bottles of beer on the wall97 bottles of beerTake one down, pass it around96 bottles of beer on the… |
| 11:00 |
|
masak |
hehe, I read sorear's "just a pair" comment, and then apparently thought exactly the same thing as moritz did. :P |
| 11:00 |
|
moritz |
hulu: do you know any other programming languages? |
| 11:00 |
|
masak |
surely the things in the pair need to be "on the same continuum" in some sense? |
| 11:00 |
|
hulu |
moritz: 3,5 |
| 11:01 |
|
moritz |
hulu: which languages? |
| 11:01 |
|
hulu |
C |
| 11:01 |
|
hulu |
c++ |
| 11:01 |
|
hulu |
python |
| 11:01 |
|
hulu |
ruby |
| 11:01 |
|
hulu |
java |
| 11:01 |
|
masak |
is Ruby the .5 ? |
| 11:01 |
|
masak |
oh wait, that's five languages. |
| 11:01 |
|
au |
it's a range :p |
| 11:01 |
|
masak |
:P |
| 11:02 |
|
au |
...expressed as a pair, endowed with semantics |
| 11:03 |
|
hulu |
au: 我还是不理解 for @quantities Z @bottles Z @actions Z @quantities[1 .. *] Z @bottles[1 .. *] |
| 11:05 |
|
hulu |
au: @quantities和 quantities[1 .. *]有什么不同 |
| 11:05 |
|
|
SmokeMachine joined #perl6 |
| 11:06 |
|
hulu |
moritz: what diff between @quantities @quantities[1 .. *] |
| 11:07 |
|
masak |
I find the "endowed with semantics" much too weak. that could be either an ADT or an OO class. |
| 11:07 |
|
moritz |
hulu: @quantities[1 .. *] misses the first element (index 0) |
| 11:07 |
|
masak |
also, it correctly describes a complex number just as much as a range. and those are quite different. |
| 11:07 |
|
moritz |
my @quant = <a b c d>; say @quant; say @quant[1..*] |
| 11:08 |
|
moritz |
r: my @quant = <a b c d>; say @quant; say @quant[1..*] |
| 11:08 |
|
p6eval |
rakudo 935c90: OUTPUT«a b c db c d» |
| 11:08 |
|
masak |
moritz++ # pedagogic |
| 11:08 |
|
moritz |
r: my @quant = <a b c d>; say @quant Z~ @quant[1..*] |
| 11:08 |
|
p6eval |
rakudo 935c90: OUTPUT«ab bc cd» |
| 11:08 |
|
* moritz |
kinda likes that idiom |
| 11:09 |
|
|
Su-Shee_ joined #perl6 |
| 11:09 |
|
moritz |
masak: I hereby officially inform you that I'm impatient regarding the p6cc reviews |
| 11:09 |
|
moritz |
:-) |
| 11:09 |
|
masak |
noted. |
| 11:09 |
|
hulu |
moritz: thx |
| 11:10 |
|
masak |
moritz: FOSDEM/Brussels took too many cycles for me to look at it then. but I'll have some time today. will report progress later this evening. |
| 11:11 |
|
masak |
by the way, it was lovely to have a Perl 6 presence at FOSDEM. we should do that again. |
| 11:11 |
|
masak |
r: my @quant = <a b c d>; say @quant Z~ @quant.rotate |
| 11:11 |
|
p6eval |
rakudo 935c90: OUTPUT«ab bc cd da» |
| 11:12 |
|
* masak |
likes that idiom ;) |
| 11:14 |
|
moritz |
aye, that one is nice too |
| 11:14 |
|
|
marloshouse joined #perl6 |
| 11:16 |
|
masak |
r: my @quant = <a b c d>; say @quant Z~ @quant.reverse |
| 11:16 |
|
p6eval |
rakudo 935c90: OUTPUT«ad bc cb da» |
| 11:16 |
|
masak |
r: my @quant = <a b c d>; say @quant Z~ @quant.pick(*) |
| 11:16 |
|
p6eval |
rakudo 935c90: OUTPUT«aa bc cd db» |
| 11:17 |
|
hulu |
r: my @quantities = (99 ... 1), 'No more', 99; my @bottles = 'bottles' xx 98, 'bottle', 'bottles' xx 2; my @actions = 'Take one down, pass it around' xx 99, 'Go to the store, buy some more'; for @quantities Z @bottles Z @actions Z @quantities[1 .. *] Z @bottles[1 .. *] -> $a, $b, $c, $d, $e { say $a, $b, $c, $d, $e; } |
| 11:17 |
|
p6eval |
rakudo 935c90: OUTPUT«99bottlesTake one down, pass it around98bottles98bottlesTake one down, pass it around97bottles97bottlesTake one down, pass it around96bottles96bottlesTake one down, pass it around95bottles95bottlesTake one down, pass it around94bottles94bottlesTake one down, p… |
| 11:19 |
|
Juerd |
Nice. |
| 11:20 |
|
hulu |
my @quant = <a b c d>; say @quant Z @quant.reverse Z @quant |
| 11:20 |
|
hulu |
r: my @quant = <a b c d>; say @quant Z @quant.reverse Z @quant |
| 11:20 |
|
p6eval |
rakudo 935c90: OUTPUT«a d a b c b c b c d a d» |
| 11:21 |
|
hulu |
r: my @quant = <a b c d>; say @quant Z @quant.reverse Z @quant: |
| 11:21 |
|
p6eval |
rakudo 935c90: OUTPUT«===[0mSORRY!===[0m�Two terms in a row�at /tmp/GM7Tmgz5Jz:1�------> d>; say @quant Z @quant.reverse Z @quant�:� expecting any of:� postfix� infix or meta-infix� infix stopper� statement end� statem… |
| 11:21 |
|
hulu |
r: my @quant = <a b c d>; say @quant Z @quant.reverse Z @quant; |
| 11:21 |
|
p6eval |
rakudo 935c90: OUTPUT«a d a b c b c b c d a d» |
| 11:21 |
|
hulu |
r: my @quant = <a b c d>; say @quant Z~ @quant.reverse Z~ @quant; |
| 11:21 |
|
p6eval |
rakudo 935c90: OUTPUT«ada bcb cbc dad» |
| 11:25 |
|
masak |
hulu: Z makes a list of separate items, Z~ concatenates things. |
| 11:35 |
|
hulu |
masak: ic |
| 11:35 |
|
hulu |
masak: thx |
| 11:37 |
|
masak |
np :) |
| 11:41 |
|
hulu |
r: say [+] .words for lines |
| 11:41 |
|
p6eval |
rakudo 935c90: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Land' (indicated by ⏏)current instr.: 'throw' pc 332433 (src/gen/CORE.setting.pir:149253) (src/gen/CORE.setting:9296)called from Sub 'Numeric' pc 363983 (src/gen/CORE.setting… |
| 11:43 |
|
hulu |
au: [+] <2 3 4>;[+] .words for <2 3 4> 有什么不同? |
| 11:44 |
|
hulu |
r: [+] .words for <2 3 4> |
| 11:44 |
|
p6eval |
rakudo 935c90: ( no output ) |
| 11:44 |
|
hulu |
r: say [+] .words for <2 3 4> |
| 11:44 |
|
p6eval |
rakudo 935c90: OUTPUT«234» |
| 11:45 |
|
hulu |
masak: what does 'say [+] .words for <2 3 4>' mean? |
| 11:50 |
|
hulu |
who can help me |
| 11:51 |
|
hulu |
what does 'say [+] .words for <2 3 4>' mean? |
| 12:00 |
|
masak |
hulu: let's look at '[+] .words for lines' instead. it makes more sense. |
| 12:01 |
|
masak |
hulu: it means "read all the lines of $*IN" (lines), "split each line into words" (.words for), and "convert all the words to numbers and sum them" ([+]) |
| 12:02 |
|
masak |
r: say [+] 10, 2000, 4_000_000 |
| 12:02 |
|
p6eval |
rakudo 935c90: OUTPUT«4002010» |
| 12:03 |
|
masak |
r: say "Beverly Hills", [+] <10 200 90_000> |
| 12:03 |
|
p6eval |
rakudo 935c90: OUTPUT«Beverly Hills90210» |
| 12:03 |
|
masak |
r: say "Beverly Hills, ", [+] <10 200 90_000> |
| 12:03 |
|
p6eval |
rakudo 935c90: OUTPUT«Beverly Hills, 90210» |
| 12:03 |
|
masak |
r: .say for "Observe how this sentence is split up into parts".words |
| 12:03 |
|
p6eval |
rakudo 935c90: OUTPUT«Observehowthissentenceissplitupintoparts» |
| 12:04 |
|
masak |
hulu: does that answer your question? |
| 12:09 |
|
masak |
today's autopun spotting: https://twitter.com/luqui/stat[…]98739823492079616 |
| 12:11 |
|
|
kresike joined #perl6 |
| 12:11 |
|
kresike |
hello all you happy perl6 people |
| 12:19 |
|
|
kivutar joined #perl6 |
| 12:21 |
|
|
dayangkun joined #perl6 |
| 12:21 |
|
|
brrt joined #perl6 |
| 12:25 |
|
masak |
kresike! \o/ |
| 12:26 |
|
kresike |
masak, o/ |
| 12:26 |
|
kresike |
long time no see ! |
| 12:28 |
|
hulu |
r: [+] .words for lines |
| 12:28 |
|
p6eval |
rakudo 935c90: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Land' (indicated by ⏏)current instr.: 'throw' pc 332433 (src/gen/CORE.setting.pir:149253) (src/gen/CORE.setting:9296)called from Sub 'Numeric' pc 363983 (src/gen/CORE.setting… |
| 12:29 |
|
hulu |
r: say [+] .words for lines |
| 12:29 |
|
p6eval |
rakudo 935c90: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Land' (indicated by ⏏)current instr.: 'throw' pc 332433 (src/gen/CORE.setting.pir:149253) (src/gen/CORE.setting:9296)called from Sub 'Numeric' pc 363983 (src/gen/CORE.setting… |
| 12:29 |
|
hulu |
masak: why this not run |
| 12:35 |
|
|
shinobicl joined #perl6 |
| 12:42 |
|
moritz |
it runs |
| 12:43 |
|
moritz |
but it dies when trying to convert the word 'Land' to a number |
| 12:43 |
|
hulu |
moritz: ? |
| 12:43 |
|
moritz |
as the error message tells you |
| 12:43 |
|
FROGGS |
r: say [+] .words for lines |
| 12:43 |
|
p6eval |
rakudo 935c90: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Land' (indicated by ⏏)current instr.: 'throw' pc 332433 (src/gen/CORE.setting.pir:149253) (src/gen/CORE.setting:9296)called from Sub 'Numeric' pc 363983 (src/gen/CORE.setting… |
| 12:43 |
|
FROGGS |
r: say .words for lines |
| 12:43 |
|
p6eval |
rakudo 935c90: OUTPUT«Land der Berge, Land am Strome,Land der Äcker, Land der Dome,Land der Hämmer, zukunftsreich!Heimat bist du großer Söhne,Volk, begnadet für das Schöne,vielgerühmtes Österreich,vielgerühmtes Österreich!Heiß umfehdet, wild umstrittenliegst dem Erdteil du inmi… |
| 12:43 |
|
FROGGS |
you can't sum words |
| 12:44 |
|
FROGGS |
r: say 'Land' + 'der' |
| 12:44 |
|
p6eval |
rakudo 935c90: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Land' (indicated by ⏏) in method Numeric at src/gen/CORE.setting:10508 in sub infix:<+> at src/gen/CORE.setting:2834 in sub infix:<+> at src/gen/CORE.setting:2834 in bl… |
| 12:44 |
|
hulu |
how to do |
| 12:44 |
|
FROGGS |
to do what? |
| 12:44 |
|
hulu |
[+] |
| 12:44 |
|
FROGGS |
well, it works on numbers |
| 12:44 |
|
moritz |
hulu: what do you want the output to be? |
| 12:45 |
|
hulu |
words of line |
| 12:45 |
|
nwc10 |
masak: sorry if this is a FAQ - why thie *Austrian* national anthem? |
| 12:45 |
|
FROGGS |
you just want to split a line to a list of words? |
| 12:46 |
|
FROGGS |
hulu^^ |
| 12:46 |
|
moritz |
hulu: do you want to know the number of words per line? |
| 12:46 |
|
moritz |
nwc10: I think it's vaguely related to the YAPC::EU in Vienna |
| 12:47 |
|
moritz |
but the details are lost in the mists of time |
| 12:48 |
|
hulu |
moritz: http://rosettacode.org/wiki/A%2BB#Perl_6 |
| 12:49 |
|
moritz |
hulu: well yes, you can sum them, but only if the words in the input are actually numbers |
| 12:49 |
|
hulu |
r: say [+] .words for "1 2" |
| 12:49 |
|
p6eval |
rakudo 935c90: OUTPUT«3» |
| 12:49 |
|
FROGGS |
r: say [+] .words for "1 2 3 4 5 6 7 8" |
| 12:49 |
|
p6eval |
rakudo 935c90: OUTPUT«36» |
| 12:50 |
|
hulu |
moritz: why lines not run |
| 12:51 |
|
|
shinobicl left #perl6 |
| 12:51 |
|
|
shinobicl joined #perl6 |
| 12:51 |
|
moritz |
hulu: lines() reads from standard input |
| 12:51 |
|
moritz |
hulu: and what it reads there aren't numbers |
| 12:51 |
|
moritz |
r: say [+] .words for "these are not numbers" |
| 12:51 |
|
p6eval |
rakudo 935c90: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏these' (indicated by ⏏)current instr.: 'throw' pc 332433 (src/gen/CORE.setting.pir:149253) (src/gen/CORE.setting:9296)called from Sub 'Numeric' pc 363983 (src/gen/CORE.settin… |
| 12:52 |
|
nwc10 |
moritz: mists of time, and incomplete version control history imports. But it was in 2009: http://irclog.perlgeek.de/perl[…]9-04-30#i_1108448 |
| 12:52 |
|
hulu |
moritz: i c |
| 12:53 |
|
nwc10 |
which is 1 month after the QA hackathon in Birmingham |
| 12:54 |
|
moritz |
nwc10: I must protest the "incomplete version control history imports": https://github.com/perl6/evalb[…]0b35612c9ccf90e37 |
| 12:57 |
|
nwc10 |
you got me there |
| 12:57 |
|
nwc10 |
but the searches don't find that |
| 13:03 |
|
hulu |
moritz: sub accum ($n is copy) { sub { $n += $^x } };my $a = accum 5; $a(4.5); say $a(.5); |
| 13:03 |
|
masak |
nwc10: for a very silly reason: this blog post. http://strangelyconsistent.org[…]-success-of-proto |
| 13:03 |
|
hulu |
why 10, not 5.5 |
| 13:04 |
|
nwc10 |
aha. :-) |
| 13:04 |
|
TimToady |
masak: "infinite" vs "unbounded": your precision is obscure and confusing to newbies, and if we're going to banish concepts like infinity because of mere physical limitations, our dictionary will be sadly depleted |
| 13:05 |
|
hulu |
who can help me |
| 13:05 |
|
masak |
TimToady: you have a point. |
| 13:06 |
|
masak |
hulu: because you initialize $n to 5, add 4.5 (so we're up to 9.5) and then add .5 (so we're up to 10). the 10 is returned. |
| 13:06 |
|
FROGGS |
hulu: 5 + 4.5 + 0.5 |
| 13:06 |
|
masak |
hulu: your questions seem related less to how Perl 6 works and more to how programs work. |
| 13:08 |
|
masak |
TimToady: that said, many times it feels like what we want to say (especially when we do '*' and not 'Inf', which I think turned out to be more common that anticipated), is "just keep going", not "this one goes up to infinity". |
| 13:08 |
|
hulu |
masak: 哪句是初始化 $n |
| 13:08 |
|
masak |
hulu: ah, I see what's going on. |
| 13:08 |
|
masak |
hulu: you're confused as to the nature of closures. |
| 13:09 |
|
masak |
I have *no* idea how to explain closures to you across the very narrow inter-language bandwidth we've established. :/ |
| 13:09 |
|
masak |
even though I understand them well at this point myself. |
| 13:11 |
|
hulu |
FROGGS: where initialize $n to 5 |
| 13:11 |
|
hulu |
FROGGS: wher initialize $n to 5 |
| 13:12 |
|
masak |
hulu: 'accum 5' and '$n is copy'. |
| 13:12 |
|
FROGGS |
right |
| 13:12 |
|
masak |
peeps, I'm watching http://www.infoq.com/presentat[…]allel-Programming -- heartily recommended to anyone who's interested in parallelism. |
| 13:12 |
|
FROGGS |
sorry for the delay, I'm doing hundreds of things at once |
| 13:13 |
|
masak |
it's a Guy Steele talk. |
| 13:13 |
|
hulu |
masak: $n is copy 是产生拷贝,如何 能继续 +4.5+.5 |
| 13:14 |
|
masak |
hulu: because closures. |
| 13:14 |
|
masak |
hulu: which I can't explain to you, because there is not enough bandwidth. |
| 13:15 |
|
masak |
I *can* show how they work empirically, but I can't explain. |
| 13:15 |
|
hulu |
masak: thx |
| 13:16 |
|
masak |
r: sub make-counter { my $i = 0; return { ++$i } }; my $c1 = make-counter(); say $c1(); say $c1(); say $c1() |
| 13:16 |
|
p6eval |
rakudo 935c90: OUTPUT«123» |
| 13:16 |
|
masak |
r: sub make-counter { my $i = 0; return { ++$i } }; my $c1 = make-counter(); my $c2 = make-counter(); $c1(); $c1(); $c2(); $c1() |
| 13:16 |
|
p6eval |
rakudo 935c90: ( no output ) |
| 13:16 |
|
masak |
r: sub make-counter { my $i = 0; return { ++$i } }; my $c1 = make-counter(); my $c2 = make-counter(); say $c1(); say $c1(); say $c2(); say $c1() |
| 13:16 |
|
p6eval |
rakudo 935c90: OUTPUT«1213» |
| 13:16 |
|
masak |
hulu: study that. when you understand why that works, you'll understand closures, and your own example. |
| 13:17 |
|
masak |
hulu: it's also explained at the end of S04, but I wouldn't recommend that explanation. it's not for the faint of heart. |
| 13:18 |
|
TimToady |
.oO(The Zen master hit the student on the head with a closure, and then the student was enlightened.) |
| 13:18 |
|
masak |
:P |
| 13:18 |
|
hulu |
masak: closures 的意思是闭包 |
| 13:19 |
|
masak |
according to GT, yes. |
| 13:19 |
|
masak |
but I would need something au-complete to verify it for sure. |
| 13:20 |
|
hulu |
au: sub accum ($n is copy) { sub { $n += $^x } };my $a = accum 5; $a(4.5); say $a(.5); 为什么是 10 |
| 13:21 |
|
masak |
hulu: here's the important bit: a closure *remembers its environment* and all the variables (like $n) that's in it, between calls. |
| 13:21 |
|
masak |
in the end that is 为什么是 10. |
| 13:22 |
|
masak |
if you want it to be 5.5, remove the '$a(4.5)' bit in the middle :P |
| 13:22 |
|
hulu |
masak: 我还是看不懂 |
| 13:23 |
|
hulu |
masak: my $a = accum 5; 是什么意思 |
| 13:25 |
|
masak |
hulu: 'accum 5' calls the subroutine &accum, passing in the value 5, which is then stored in $n. the 'is copy' means that it's a "new" 5 being stored in $n. |
| 13:26 |
|
au |
hulu: the ruby equivalent is |
| 13:26 |
|
au |
def accum n; lambda { |x| n += x }; end; a = accum 5; a.call 4.5; puts a.call 0.5 |
| 13:26 |
|
TimToady |
masak: I usually say "an arbitrary number of" when I feel uncomfy with "infinite" |
| 13:27 |
|
hulu |
masak: 我还是不明白 |
| 13:27 |
|
TimToady |
arbitrary is an arbitrary word, but at least it's un-self-negated as limitless or unbounded are |
| 13:27 |
|
masak |
TimToady: yes, that rings a little of induction, I guess. |
| 13:27 |
|
masak |
hulu: I told you we didn't have enough bandwidth for me to explaing this. :/ |
| 13:28 |
|
masak |
explain* |
| 13:28 |
|
|
felipe joined #perl6 |
| 13:29 |
|
masak |
there's something weird about closures, such that they go wildly against your intuitions as a BASIC or C or Assembly programmer, but they're actually fundamentally *simple*. |
| 13:30 |
|
masak |
people have to go through the same kind of trial by fire as with git, coming out the other end having essentially unlearned some stuff. |
| 13:31 |
|
au |
hulu: try http://tc.wangchao.net.cn/bbs/detail_69548.html |
| 13:31 |
|
|
lizmat left #perl6 |
| 13:31 |
|
masak |
when I explain this in class, I usually go: "what's the shape of an array? it's a sequence of elements." -- "what's the shape of a hash? it's an unordered collection of key/value pairs". |
| 13:32 |
|
masak |
"what's the shape of a routine? it's a signature, a body, and *an environment*". |
| 13:32 |
|
masak |
that last bit is what makes closures work. |
| 13:33 |
|
TimToady |
a set of bindings, a set of not-yet-bound-ings, and the desired relationship between them :) |
| 13:33 |
|
au |
((n)->(n+=)) 5 => .. 4.5; .. 0.5 |> console.log # livescript version, fwiw |
| 13:34 |
|
masak |
lambda calculus has made me a better programmer. |
| 13:35 |
|
* TimToady |
refrains from asking masak++ to define "better" |
| 13:35 |
|
masak |
;) |
| 13:37 |
|
masak |
the axes I was thinking of were a linear combination of "able to design programs" and "able to reason about behavior". |
| 13:39 |
|
TimToady |
but perhaps not "able to explain your program easily to some person on IRC" :) |
| 13:39 |
|
TimToady |
ss/some person/some arbitrary person/ :) |
| 13:39 |
|
hulu |
au: 我想问一下 $n 是如何在 my $a = accum 6;$a(4.5); say $a(.5); 之间传递的。 |
| 13:42 |
|
* TimToady |
has never seen someone try to learn programming by proceeding through an RC page in alphabetical order before |
| 13:42 |
|
au |
hulu: accum() 运行时,记住了参数 $n 的值,并且传回一个新定义的函式物件给 $a。之后呼叫 $a 时,該函式可以直接存取定義時的 $n 變數。這個機制稱為「閉包」。請見以上網址。 |
| 13:43 |
|
TimToady |
it's kinda refreshingly different |
| 13:43 |
|
au |
well, agentzh started by, iirc, transcribing Synopses to paper by hand |
| 13:43 |
|
TimToady |
in a difficult sort of way |
| 13:44 |
|
masak |
TimToady: I'm not sure closures can be explained. I teach them regularly, but I always get the impression that when people get it, they get it because of themselves, not because of me. |
| 13:45 |
|
hulu |
au: 之后呼叫 $a 时,該函式可以直接存取定義時的 $n 變數 什么意思? |
| 13:45 |
|
clkao |
iirc SICP has pretty figures about closures |
| 13:46 |
|
au |
hulu: 請見以上網址 http://wj.cnblogs.com/archive/[…]04/22/381851.html ... 在构造函数内,内部函数总是可以访问函数外部的变量和参数的。就算在内部函数return后,闭包内的所有变量都会被保存起来,就好像一个上下文一样。 |
| 13:46 |
|
brrt |
closures kill the nice stack behavior that you would otherwise have in c-like-language |
| 13:46 |
|
brrt |
s |
| 13:46 |
|
Juerd |
TimToady: My most important resource when learning Perl was perlfunc. |
| 13:47 |
|
TimToady |
masak: all containers have to be elaborated/initialized, it's just that closure are inside out, and are elaborated/initialized with their outsides |
| 13:47 |
|
au |
hulu: 这概念用 IRC 著实没法讲清楚,很抱歉。 |
| 13:47 |
|
masak |
TimToady: I guess that's why they're useful for IoC. |
| 13:47 |
|
Juerd |
TimToady: I simply started there, and read it from top to bottom, so in alphabetical order. After reading it, I had a HUGE list of things that I didn't understand, which I then looked up in other perldocs. |
| 13:47 |
|
Juerd |
TimToady: Then, I read perlfunc again and I could make a lot more sense of it. |
| 13:48 |
|
masak |
brrt: yes, they do. but the model they replace it with, while less simple, feels like "the next step up", and is occasionally *really* useful. |
| 13:48 |
|
TimToady |
Juerd: that's how I learned things when I was younger |
| 13:48 |
|
* au |
<- pretty much did the same thing as Juerd ... haven't read the Camel book until 2005 or so |
| 13:48 |
|
masak |
hm, would it be possible to create a lambda calculus without closure semantics? would it still be Turing complete? |
| 13:49 |
|
Juerd |
TimToady: I still learn like this, only now my primary focus is syntax, not functions. |
| 13:49 |
|
Juerd |
Perl's to blame for that, I'm sure. |
| 13:50 |
|
brrt |
masak, its true, i think closures are really useful and nice |
| 13:50 |
|
brrt |
but |
| 13:50 |
|
brrt |
they can be prohibitively painful |
| 13:51 |
|
|
kaleem joined #perl6 |
| 13:51 |
|
au |
masak: sure, it's called Combinatory logic |
| 13:52 |
|
au |
(or, more specifically, SKI calculus) |
| 13:52 |
|
masak |
oh, right. |
| 13:52 |
|
masak |
and that feels equal in power. which makes sense, because the Turing machine doesn't think in closures either. |
| 13:53 |
|
|
atrodo joined #perl6 |
| 13:56 |
|
|
sftp joined #perl6 |
| 13:56 |
|
|
denisboyun joined #perl6 |
| 14:05 |
|
masak |
wonderful, Guy Steele defines algebraic properties in terms of what things don't matter. |
| 14:06 |
|
masak |
"associative: grouping doesn't matter" -- "commutative: order doesn't matter" -- "idempotent: duplicates don't matter" -- "identity: this value doesn't matter" -- "zero: other values don't matter" |
| 14:06 |
|
masak |
very nice. |
| 14:06 |
|
tadzik |
curious |
| 14:07 |
|
|
denisboyun joined #perl6 |
| 14:08 |
|
|
FROGGS joined #perl6 |
| 14:14 |
|
|
denisboyun__ joined #perl6 |
| 14:17 |
|
|
PacoAir joined #perl6 |
| 14:18 |
|
|
b1rkh0ff joined #perl6 |
| 14:20 |
|
|
xinming joined #perl6 |
| 14:21 |
|
|
FROGGS[mobile] joined #perl6 |
| 14:21 |
|
|
bluescreen10 joined #perl6 |
| 14:22 |
|
FROGGS[mobile] |
airports are boring |
| 14:22 |
|
|
PacoAir joined #perl6 |
| 14:22 |
|
|
domidumont joined #perl6 |
| 14:25 |
|
masak |
FROGGS[mobile]: http://sethgodin.typepad.com/s[…]om-airports-.html |
| 14:35 |
|
masak |
wow, someone should do http://search.cpan.org/dist/Ac[…]/Acme/Pythonic.pm as soon as we have savvy enough slangs, and then blog about why slangs are better than source filters ;) |
| 14:36 |
|
|
fgomez joined #perl6 |
| 14:38 |
|
|
krunen joined #perl6 |
| 14:40 |
|
|
kaare_ joined #perl6 |
| 14:44 |
|
|
denisboyun joined #perl6 |
| 14:52 |
|
|
stopbit joined #perl6 |
| 14:53 |
|
|
denisboyun_ joined #perl6 |
| 14:56 |
|
diakopter |
masak: all Turing machines run on Chuck Norris' brain |
| 14:57 |
|
brrt |
chuck norris is the reference turing machine |
| 14:57 |
|
masak |
:) |
| 14:58 |
|
masak |
Turing machines work because Chuck Norris allows them to do so. |
| 14:59 |
|
brrt |
turing completeness is a subset of norris-completeness |
| 15:10 |
|
FROGGS[mobile] |
:op |
| 15:12 |
|
|
arlinius joined #perl6 |
| 15:12 |
|
|
kivutar joined #perl6 |
| 15:17 |
|
|
skids joined #perl6 |
| 15:21 |
|
|
tojatoja joined #perl6 |
| 15:44 |
|
|
isBEKaml joined #perl6 |
| 15:48 |
|
|
kresike left #perl6 |
| 15:49 |
|
isBEKaml |
hello, #perl6! |
| 15:49 |
|
masak |
isBEKaml! \o/ |
| 15:50 |
|
masak |
sorear: in the category of sets, why are singletons terminal objects? |
| 15:50 |
|
|
am0c joined #perl6 |
| 15:50 |
|
masak |
more specifically, what is the unique morphism leading to a singleton object? |
| 15:53 |
|
isBEKaml |
Categorical greetings, masak! :) |
| 15:53 |
|
hoelzro |
greeting :: IO () |
| 15:54 |
|
masak |
monomorphic salutations! |
| 15:55 |
|
isBEKaml |
.oO(Greetings are perpetually trapped in IO monad) |
| 15:57 |
|
|
steven__ joined #perl6 |
| 16:02 |
|
isBEKaml |
http://acm.wustl.edu/functional/io-monad.jpg =) |
| 16:03 |
|
|
65MAAHZSY joined #perl6 |
| 16:07 |
|
masak |
aww |
| 16:08 |
|
masak |
yes, it's a little-known fact, that the inside of the IO monad looks like a shower. |
| 16:11 |
|
isBEKaml |
that's why people do unsafePerformIO? :P |
| 16:15 |
|
masak |
I doubt that. under the analogy, unsafePerformIO needs to look like a shower with pipes exposed or something. |
| 16:19 |
|
isBEKaml |
I could pull in another analogy, but it won't be safe on IRC. :) |
| 16:20 |
|
masak |
unsafeAnalogyIO |
| 16:26 |
|
isBEKaml |
eggjactly |
| 16:36 |
|
|
MikeFair_ joined #perl6 |
| 16:41 |
|
|
spider-mario joined #perl6 |
| 16:47 |
|
jnthn |
fail, I was reading day's hot shoe on the subway and I missed my stop... |
| 16:47 |
|
phenny |
jnthn: 04 Feb 22:52Z <tadzik> tell jnthn deletepos pullrequested as well :) |
| 16:48 |
|
masak |
jnthn: that's how interesting the backlog is! :P |
| 16:49 |
|
isBEKaml |
jnthn: day's hot "shoe" ? |
| 16:49 |
|
|
Su-Shee left #perl6 |
| 16:50 |
|
masak |
isBEKaml: IR clogs are warm, because infrared is warm. |
| 16:51 |
|
masak |
isBEKaml: "IR clogs", "IRC logs". bad pun. |
| 16:51 |
|
masak |
groan now. |
| 16:51 |
|
hoelzro |
haha, IR clogs |
| 16:51 |
|
* isBEKaml |
groans |
| 16:51 |
|
hoelzro |
nightvision clogs. |
| 16:52 |
|
grondilu |
r: say (pi+20)**i |
| 16:52 |
|
p6eval |
rakudo 935c90: OUTPUT«-0.99999999924368-3.88926694022219e-05i» |
| 16:53 |
|
isBEKaml |
r: my $foo = 4.0 * atan(1.0); say $foo; |
| 16:53 |
|
p6eval |
rakudo 935c90: OUTPUT«3.14159265358979» |
| 16:54 |
|
|
FROGGS joined #perl6 |
| 16:54 |
|
|
cognominal joined #perl6 |
| 16:57 |
|
FROGGS |
masak: would it be possible to do Inline::C as a slang? |
| 16:57 |
|
FROGGS |
are there resources about slangs? |
| 16:57 |
|
FROGGS |
couldn't find any right now |
| 16:57 |
|
|
SunilJoshi joined #perl6 |
| 16:57 |
|
isBEKaml |
r: my $foo = 4.0 * atan(1.0); say $foo; ($foo == pi).say |
| 16:58 |
|
p6eval |
rakudo 935c90: OUTPUT«3.14159265358979True» |
| 16:59 |
|
masak |
FROGGS: we don't know nearly enough about slangs yet. |
| 17:01 |
|
FROGGS |
k |
| 17:03 |
|
GlitchMr- |
.u į |
| 17:03 |
|
phenny |
U+012F LATIN SMALL LETTER I WITH OGONEK (į) |
| 17:03 |
|
GlitchMr- |
.u ǫ̈ |
| 17:03 |
|
phenny |
U+01EB LATIN SMALL LETTER O WITH OGONEK (ǫ) |
| 17:03 |
|
phenny |
U+0308 COMBINING DIAERESIS (◌̈) |
| 17:03 |
|
jnthn |
FROGGS: Yes, if only we knew how slangs worked ;) |
| 17:04 |
|
|
SunilJoshi1 joined #perl6 |
| 17:06 |
|
FROGGS |
no specs? |
| 17:07 |
|
FROGGS |
sounds like a job for TimToady++ |
| 17:07 |
|
FROGGS |
:o) |
| 17:07 |
|
GlitchMr- |
.u fi |
| 17:07 |
|
phenny |
U+FB01 LATIN SMALL LIGATURE FI (fi) |
| 17:07 |
|
GlitchMr- |
rn: 'fi' ~~ m:i/ fi / |
| 17:07 |
|
p6eval |
rakudo 935c90, niecza v24-18-gaf64300: ( no output ) |
| 17:07 |
|
GlitchMr- |
rn: say 'fi' ~~ m:i/ fi / |
| 17:07 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«False» |
| 17:07 |
|
p6eval |
..rakudo 935c90: OUTPUT«#<failed match>» |
| 17:07 |
|
GlitchMr- |
rn: say 'fi' ~~ m:i/ fi / |
| 17:08 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«False» |
| 17:08 |
|
p6eval |
..rakudo 935c90: OUTPUT«#<failed match>» |
| 17:08 |
|
GlitchMr- |
eval: use utf8; 'fi' ~~ m/fi/i ? 'true' : 'false' |
| 17:09 |
|
GlitchMr- |
rn: say uc 'fi' |
| 17:09 |
|
p6eval |
rakudo 935c90: OUTPUT«FI» |
| 17:09 |
|
p6eval |
..niecza v24-18-gaf64300: OUTPUT«fi» |
| 17:09 |
|
GlitchMr- |
niecza bug? |
| 17:11 |
|
flussence |
hard to tell... perl5 agrees with rakudo, but vim agrees with niecza :) |
| 17:12 |
|
GlitchMr- |
Unicode standards |
| 17:13 |
|
flussence |
.oO( the great thing about them is there's so much reading material! ) |
| 17:14 |
|
|
domidumont joined #perl6 |
| 17:29 |
|
jnthn |
nom & |
| 17:36 |
|
|
grondilu joined #perl6 |
| 17:37 |
|
[Coke] |
anyone know who "sue spence" is? |
| 17:40 |
|
|
Vlavv_ joined #perl6 |
| 17:43 |
|
|
rindolf joined #perl6 |
| 17:43 |
|
rindolf |
Hi all. |
| 17:43 |
|
rindolf |
TimToady: hi, here? |
| 17:45 |
|
masak |
ho, rindolf. |
| 17:46 |
|
masak |
[Coke]: looks like a CPAN author (SUE) with two modules. |
| 17:46 |
|
masak |
[Coke]: first I thought it was a corny pun (something with "suspence") |
| 17:46 |
|
masak |
er, "suspense". |
| 17:47 |
|
rindolf |
SUE? |
| 17:47 |
|
rindolf |
Sue is short for Susan. |
| 17:47 |
|
rindolf |
Or an alternative word for litigate. |
| 17:48 |
|
[Coke] |
rindolf: yes, but neither of those are really helpful. :) |
| 17:48 |
|
rindolf |
[Coke]: ah. |
| 17:48 |
|
[Coke] |
Just wondering if she's lurking in here or perhaps she's linked-in-ing everyone with a pause account. |
| 17:49 |
|
diakopter |
oh, I got that too |
| 17:49 |
|
rindolf |
[Coke]: ah, oh. |
| 17:49 |
|
rindolf |
[Coke]: if she's indeed a she. ;-) |
| 17:50 |
|
masak |
[Coke]: hm, I'm on PAUSE but I don't have any CPAN modules. didn't get a LinkedIn invitation from any Sue. |
| 17:53 |
|
BinGOs |
I doubt that Sue is aware that linkedIn is doing that |
| 17:54 |
|
geekosaur |
linkedin like to rifle your address book and invite everyone, yeh |
| 17:54 |
|
cosimo |
[Coke]: she's a London.pm member IIRC |
| 17:54 |
|
nwc10 |
She has a daughter. And I think I've seen her husband |
| 17:54 |
|
nwc10 |
s/seen/met/ |
| 17:54 |
|
nwc10 |
I've certainly seen pictures |
| 17:54 |
|
nwc10 |
so I think the evidence is that she is a she :-) |
| 18:00 |
|
|
cognominal joined #perl6 |
| 18:02 |
|
masak |
BinGOs, geekosaur: which is why you should never, as a general principle, allow a third-party service to log into your email account. |
| 18:03 |
|
geekosaur |
yep |
| 18:03 |
|
geekosaur |
unforutnately many third party services go to some effort to trick unsuspecting users into allowing it |
| 18:04 |
|
rindolf |
geekosaur: yes. :-( |
| 18:04 |
|
geekosaur |
and/or hide the opt-out |
| 18:05 |
|
geekosaur |
(and then there's the really evil ones; anyone remember spock.com?) |
| 18:07 |
|
|
cognominal joined #perl6 |
| 18:18 |
|
moritz |
http://www.perlmonks.org/?node_id=1017212 # Code golf with a readable and short-ish Perl 6 solution |
| 18:18 |
|
|
Chillance joined #perl6 |
| 18:19 |
|
|
xinming joined #perl6 |
| 18:19 |
|
TimToady |
masak: yes, GS's definitions are very like how we define our contexts by what we're promising we don't care about |
| 18:21 |
|
TimToady |
he and I have similar ideas on the way forward with parallelism, though obviously he expresses it much better than I do |
| 18:21 |
|
TimToady |
kind of a shame they gave up on Fortress... |
| 18:26 |
|
rindolf |
TimToady: meow! |
| 18:27 |
|
TimToady |
rindolf: meow meow, meow... |
| 18:27 |
|
rindolf |
TimToady: so nice you have to meow thrice! |
| 18:28 |
|
rindolf |
TimToady: what's up? |
| 18:28 |
|
|
xinming joined #perl6 |
| 18:29 |
|
TimToady |
I dunno, but whatever it is is stuck in the IO monad... |
| 18:30 |
|
colomon |
moritz++ |
| 18:40 |
|
masak |
TimToady: programming seems to map well to a constructivist subset of mathematics, but not always so well to parts involving proofs or infinities. to me, the challenge of what Steele is talking about is to find nice models/isomorphisms that are pleasant to program with. |
| 18:41 |
|
TimToady |
my challenge is a step beyond that, to find models that *other* people find pleasant to program in :) |
| 18:41 |
|
masak |
moritz++ |
| 18:41 |
|
TimToady |
in my experience, other people do not always take pleasure in the same things I do... |
| 18:41 |
|
masak |
moritz: I love how we folded the Schwartzian transform into the language, so that it really isn't a trick at all :) |
| 18:42 |
|
TimToady |
yes, moritz++, though I was trying to figure out what the +* prefix operator does... |
| 18:42 |
|
masak |
TimToady: heh. |
| 18:42 |
|
masak |
numify? |
| 18:42 |
|
masak |
oh, you read it as '+*', I see :P |
| 18:42 |
|
colomon |
numify whatever! |
| 18:42 |
|
TimToady |
if I were writing it in production, I'd probably do +(*.split...) |
| 18:43 |
|
* colomon |
agrees with TimToady |
| 18:43 |
|
masak |
meh. just learn to read Perl 6 :P |
| 18:43 |
|
colomon |
I actually read it as (+*).split... then realized that didn't make sense |
| 18:44 |
|
TimToady |
there's a real weight problem between the methodcall postfix precedence level and the looser symbolic prefix level |
| 18:45 |
|
TimToady |
I keep wanting special parens that don't require a matching paren |
| 18:46 |
|
TimToady |
could even replace 'do' with the left version of that |
| 18:47 |
|
moritz |
or maybe even *.split(':')[2].Int |
| 18:47 |
|
TimToady |
or that |
| 18:48 |
|
masak |
moritz: do you ever get chewed out for posting Perl 6 solutions to people's problems on PerlMonks? |
| 18:49 |
|
TimToady |
hope so |
| 18:49 |
|
TimToady |
'cuz then it means we're to the "Then they fight you" stage |
| 18:50 |
|
PerlJam |
TimToady: but I want to be at the "then you win" stage! :) |
| 18:50 |
|
TimToady |
we're still in the "ignore you" stage for most of the rest of the world |
| 18:50 |
|
masak |
the problem with the Ghandi model is that projects that ultimately fail also often go through "ignore" and "fight" stages... |
| 18:51 |
|
masak |
er, Gandhi |
| 18:51 |
|
TimToady |
PerlJam: the only thing that will get us there is cussed stubbornness |
| 18:51 |
|
masak |
* |
| 18:51 |
|
* masak |
.oO( don't let the bastards Gandhi you down ) |
| 18:52 |
|
moritz |
masak: rarely. Sometimes people silently upvote it, sometimes they ask how a particular feature works |
| 18:53 |
|
PerlJam |
whenever I give a Perl 6 solution to some Perl 5 problem on #perl (granted, I haven't done that in a while), I get questions about the code or Perl 6 or whatever, but no one has been particularly upset about it |
| 18:54 |
|
TimToady |
in addition to being stuborn, I'm very good at tuning out most of the noise, including the entire maelstrom around forking Perl 5 |
| 18:54 |
|
TimToady |
*stubborn |
| 18:55 |
|
masak |
I may have said it already, but my two impressions from talking about Perl 6 at FOSDEM (to mostly Perl 5 people) were similar: (a) people *like* Perl 6, overall, and (b) I had partly forgotten what an improvement it is, and the crowd's reaction reminded me. |
| 18:56 |
|
rindolf |
TimToady: can I PM you for a sec? |
| 18:56 |
|
masak |
both of these surprised me a little. guess using Perl 6 for all these years have gotten me used to how nice it is :) |
| 18:56 |
|
PerlJam |
masak: if only we had an implementation that hit the magic sweet spot of being featureful enough and fast enough ;-) |
| 18:56 |
|
rindolf |
TimToady: I mean private msg. |
| 18:56 |
|
masak |
PerlJam: featureful, fast, threads, CPAN. |
| 18:56 |
|
TimToady |
darn, was hoping to be a prime minister |
| 18:57 |
|
TimToady |
rindolf: nobody else asks first :) |
| 18:57 |
|
rindolf |
TimToady: I think you should run for .us government. |
| 18:57 |
|
rindolf |
TimToady: OK. |
| 18:57 |
|
rindolf |
TimToady: well, it's common courtesy. |
| 18:57 |
|
PerlJam |
masak: why does everyone want threads? |
| 18:57 |
|
rindolf |
Nobody gets threads! Larry gets threads. |
| 18:58 |
|
masak |
PerlJam: (a) because we promised. (b) because "the free lunch is over" and "welcome to the jungle". |
| 18:58 |
|
PerlJam |
I think "threads" are the catchall for "doing multiple things simultaneously" even if/when we have ways to do that already. |
| 18:59 |
|
PerlJam |
I'm fairly sure many people say "threads" but are really thinking about async IO |
| 18:59 |
|
PerlJam |
(for instancE) |
| 18:59 |
|
masak |
PerlJam: yes, what I really mean is solid support for concurrent and parallel programming. |
| 18:59 |
|
masak |
but events and async sort of gets pulled into that model. |
| 19:03 |
|
masak |
by the way, if anyone likes such topics, check out the Rx framework and "LINQ to events". real cool stuff. |
| 19:21 |
|
|
cognominal joined #perl6 |
| 19:22 |
|
|
arnsholt joined #perl6 |
| 19:23 |
|
arnsholt |
'lo \o |
| 19:24 |
|
|
Liz joined #perl6 |
| 19:24 |
|
|
benabik joined #perl6 |
| 19:26 |
|
arnsholt |
phenny: tell jnthn I think I give up this bootstrapping thing. Somehow, once I get NQP updated to the new stuff, I break Rakudo: "Method 'get_lex_type' not found for invocant of class 'Perl6LexPad'" something about "Cannot unbox argument to '$name' as a native str" |
| 19:26 |
|
phenny |
arnsholt: I'll pass that on when jnthn is around. |
| 19:33 |
|
|
geekosaur joined #perl6 |
| 19:39 |
|
|
arlinius joined #perl6 |
| 19:48 |
|
* masak |
looks at p6cc2012's t1 |
| 19:51 |
|
tadzik |
jnthn: warning: apparently both of my patches to nqp-jvm are Rong :( |
| 19:52 |
|
tadzik |
I'll fix them soon |
| 19:56 |
|
masak |
tadzik: what happened to them why what why |
| 19:57 |
|
tadzik |
masak: they have the 'start' attribute, which I forgot to respect |
| 19:57 |
|
tadzik |
it's almost always 0, except when it's not, e.g. you shift() from the array |
| 19:57 |
|
masak |
ah. |
| 20:01 |
|
tadzik |
so you need specially crafted tests to catch that :) |
| 20:03 |
|
masak |
mmm, tests. |
| 20:05 |
|
arnsholt |
tadzik: What do you mean, tests don't automatically reveal every defect simply by virtue of existing? |
| 20:05 |
|
arnsholt |
I'm shocked, I tell you, shocked =) |
| 20:05 |
|
masak |
remember the lesson of the TDD Sudoku incident. |
| 20:06 |
|
arnsholt |
The TDD sudoku incident? |
| 20:06 |
|
masak |
the TDD Sudoku incident! |
| 20:06 |
|
arnsholt |
Is this like the Perl 6 noodle incident? =) |
| 20:06 |
|
* masak |
finds link |
| 20:06 |
|
masak |
http://ravimohan.blogspot.se/2[…]doku-solvers.html |
| 20:07 |
|
masak |
the takeaway from that post and subsequent discussion -- for me, anyway -- is that TDD is fine as a methodology, but nothing beats knowing what the heck you're doing. knowing APIs, algorithms, data structures. |
| 20:07 |
|
tadzik |
arnsholt: I'm offended |
| 20:08 |
|
arnsholt |
Indeed. If you're not actually sure what you're making, TDD is only so useful |
| 20:09 |
|
|
colomon joined #perl6 |
| 20:09 |
|
arnsholt |
Which is why there are no tests yet for the project I started today. Still noodling around and prodding the problem space to see what happens |
| 20:09 |
|
|
bruges joined #perl6 |
| 20:11 |
|
arnsholt |
Is there a Nordic Perl Workshop scheduled for 2013, a propos nothing? |
| 20:12 |
|
masak |
it's on its way, it seems. |
| 20:12 |
|
masak |
Copenhagen! \o/ |
| 20:13 |
|
* moritz |
has fond memory of eating Japenese food and hacking Perl 6 in Copenhagen |
| 20:14 |
|
|
MikeFair__ joined #perl6 |
| 20:14 |
|
masak |
moritz: just before the Japanese food, you and I were talking about Eiffel. |
| 20:14 |
|
swarley |
mmmm Eiffel |
| 20:14 |
|
masak |
(I have an episodic memory. when I remember places, soundbites pop up with them.) |
| 20:15 |
|
moritz |
masak: we were? I don't remember the particular details, but I talk about that language occasionally :-) |
| 20:15 |
|
* arnsholt |
has good memories of Copenhagen as well |
| 20:15 |
|
masak |
moritz: "variants", right? non-negative magnitudes that have to decrease with each loop iteration, proving that the loop terminates. |
| 20:15 |
|
masak |
TimToady: oh! |
| 20:16 |
|
masak |
TimToady: that's an *excellent* example of "comfortably mapping to a constructivist part of math". |
| 20:16 |
|
moritz |
masak: correct. Integers even. |
| 20:16 |
|
masak |
yes, 'course. |
| 20:17 |
|
moritz |
and I remember discussing macros at breakfast, when we both alternated between "oh, looks like closures" and "htf is anybody going to implement that?" |
| 20:20 |
|
masak |
moritz: we were groping after all the problems I've now identified and solved. |
| 20:20 |
|
masak |
moritz: I distinctly remembered there was something that *bothered* us about the closure-like properties. |
| 20:21 |
|
masak |
like "wait, doesn't it all work out?" -- "hm, oh wait, no..." -- "now I don't even see a problem anymore..." |
| 20:30 |
|
|
benabik joined #perl6 |
| 20:31 |
|
|
Liz_ joined #perl6 |
| 20:34 |
|
timotimo |
masak: you did a talk at fosdem, right? will there be a recording? |
| 20:34 |
|
|
domidumont joined #perl6 |
| 20:35 |
|
lizmat |
I've made the recording. Not sure if it is good enough, or complete. |
| 20:36 |
|
timotimo |
fosdem is big, isn't it? why are there no proper recordings of all talks? |
| 20:36 |
|
lizmat |
In any case, it will need to be downgraded to something that is easily downloadable |
| 20:36 |
|
masak |
I think my prepared talk got recorded, but the battery was out by the second, impromptu one. |
| 20:36 |
|
masak |
lizmat! \o/ |
| 20:36 |
|
lizmat |
yes, only the first one got recorded |
| 20:36 |
|
masak |
lizmat: thanks again for an awesome weekend. :) |
| 20:36 |
|
timotimo |
proper as in: taking the audio directly from the speaker's microphones |
| 20:36 |
|
lizmat |
masak: you're welcome, it was fun! |
| 20:36 |
|
|
FROGGS joined #perl6 |
| 20:37 |
|
masak |
lizmat: I'm safely back home. a bit tired, but happy I went. |
| 20:37 |
|
masak |
lizmat: now the only problem is that I will want to do FOSDEM again ;) |
| 20:37 |
|
tadzik |
I'm jealous |
| 20:37 |
|
lizmat |
hehe… it is addictive, I know |
| 20:38 |
|
lizmat |
I just checked: I got the first 20 minutes, which is almost the whole presentation |
| 20:38 |
|
lizmat |
it is in HD and it is out of focus :-( |
| 20:38 |
|
masak |
:/ |
| 20:38 |
|
tadzik |
slides! |
| 20:38 |
|
lizmat |
but I think good enough to put out in the world |
| 20:39 |
|
masak |
tadzik: coming right up. |
| 20:39 |
|
tadzik |
\o/ |
| 20:39 |
|
tadzik |
North, you mean |
| 20:41 |
|
lizmat |
but not today.. we're at the Amsterdam.pm meeting right now… |
| 20:41 |
|
FROGGS |
lizmat: and after that you all join booking.com? |
| 20:42 |
|
masak |
tadzik: :P |
| 20:42 |
|
masak |
tadzik: http://masak.org/carl/fosdem-2[…]ying-car/talk.pdf |
| 20:42 |
|
lizmat |
FROGGS: been there, done that |
| 20:42 |
|
masak |
*lol* |
| 20:42 |
|
FROGGS |
I've read yesterday they are hunting for 25 devs again |
| 20:42 |
|
FROGGS |
ahh |
| 20:42 |
|
FROGGS |
;o) |
| 20:42 |
|
masak |
today's laugh. :) |
| 20:42 |
|
tadzik |
:D |
| 20:42 |
|
tadzik |
yeah, Warsaw.pm got the message too |
| 20:42 |
|
tadzik |
I wonder if that means they wish to sponsor PLPW |
| 20:43 |
|
FROGGS |
I guess they would |
| 20:43 |
|
FROGGS |
I'd love to work for them, but I dont wanna move :/ |
| 20:45 |
|
masak |
not even... to Sweden? :P :P |
| 20:46 |
|
masak |
(guess who's also hunting for devs) |
| 20:46 |
|
lizmat |
FROGGS: FWIW, if you like working in a fast growing organization in the center of Amsterdam, Booking.com is the place to be |
| 20:46 |
|
|
slavik1 joined #perl6 |
| 20:47 |
|
lizmat |
but don't expect too much time writing tests (at least not in most of the areas of Booking.com) |
| 20:47 |
|
lizmat |
you should realize that almost all coding at Booking.com is aimed at getting more reservations. |
| 20:48 |
|
masak |
...which makes sense, since that's what they do ;) |
| 20:48 |
|
FROGGS |
masak++ # the cards example is very good |
| 20:48 |
|
lizmat |
if errors in the code cause more reservations (without causing more cancellations), then the code will stay, even if it was in error :) |
| 20:48 |
|
masak |
pmichaud++, then :) |
| 20:49 |
|
FROGGS |
lizmat: I can live with that, currently I have to care what tests I write and which not... |
| 20:49 |
|
FROGGS |
there is nobody who would care |
| 20:50 |
|
FROGGS |
masak: scotland is the only place I'd move to |
| 20:50 |
|
FROGGS |
.... except maybe risa |
| 20:51 |
|
lizmat |
masak: Wendy and I slept most of yesterday, after having brought back the van before 8am :-) |
| 20:51 |
|
* geekosaur |
could see moving to sweden, aside from little issues like being able to afford it. and being rather more sysadmin than dev |
| 20:51 |
|
* colomon |
would definitely consider moving to Newfoundland.... |
| 20:52 |
|
arnsholt |
geekosaur: The main challenge there is getting the job in Scandinavia. The pay scales with the living expenses =) |
| 20:52 |
|
arnsholt |
(Also, greetings fellow XMonader =) |
| 20:52 |
|
timotimo |
i liked the slides already |
| 20:52 |
|
FROGGS |
spaces for free \o/ |
| 20:52 |
|
geekosaur |
there's thre challenge of *getting* there... |
| 20:54 |
|
FROGGS |
the slides are very good, it covers it well |
| 20:54 |
|
masak |
\o/ |
| 20:55 |
|
masak |
people were more positive about the live demo, though. |
| 20:55 |
|
timotimo |
what did you demo? |
| 20:55 |
|
masak |
I sat down and started implementing MineSweeper. |
| 20:55 |
|
masak |
TDD style. |
| 20:55 |
|
timotimo |
did you demo the enhanced error messages i recently made? :P |
| 20:55 |
|
tadzik |
cool |
| 20:55 |
|
timotimo |
oh, that's neat |
| 20:55 |
|
masak |
timotimo: oh! |
| 20:55 |
|
masak |
timotimo: I *totally* should've done that, and pretended I had made a typo :P |
| 20:56 |
|
masak |
photo: https://twitter.com/habanerd/s[…]97753325011628033 |
| 20:56 |
|
timotimo |
there's really no need, though ;) |
| 20:56 |
|
timotimo |
i think i'll try to do moreinput today |
| 21:03 |
|
lizmat |
fwiw, Wendy uploaded some time lapse movies from FOSDEM to Youtube |
| 21:03 |
|
lizmat |
http://www.youtube.com/watch?v=5AOUpfAwmAA |
| 21:06 |
|
skids |
masak: why not wait until you do make a typo, and pretend you didn't :-) |
| 21:06 |
|
cognominal |
lizmat: with some the usual [french] suspects at the left of the first frame (Maddingue, dolmen?, elbeho) |
| 21:06 |
|
lizmat |
indeed…. :-) |
| 21:14 |
|
tadzik |
bah. I'm sure my deletepos is buggy, but I can't reproduce a bug :/ |
| 21:14 |
|
arnsholt |
I hate those |
| 21:15 |
|
masak |
a... heisenbug? |
| 21:15 |
|
tadzik |
not really |
| 21:15 |
|
tadzik |
it makes me think I don't understand the problem |
| 21:15 |
|
tadzik |
masak, my dear bug wizard.. |
| 21:15 |
|
TimToady |
nr: sub r2cf(Rat $x is copy) { gather $x [R/]= 1 while ($x -= take $x.floor) > 0 }; say r2cf(1.4142136) |
| 21:15 |
|
p6eval |
rakudo 935c90: OUTPUT«===[0mSORRY!===[0m�Preceding context expects a term, but found infix = instead�at /tmp/WXbDH1h_R_:1�------> b r2cf(Rat $x is copy) { gather $x [R/]=� 1 while ($x -= take $x.floor) > 0 }; sa�» |
| 21:15 |
|
p6eval |
..niecza v24-18-gaf64300: OUTPUT«1 2 2 2 2 2 2 2 2 2 6 1 2 4 1 1 2» |
| 21:16 |
|
TimToady |
dunno if you have that one yet |
| 21:16 |
|
|
benabik joined #perl6 |
| 21:16 |
|
tadzik |
masak: if you could look at https://github.com/tadzik/nqp-[…]Instance.java#L37 |
| 21:16 |
|
masak |
don't think so. |
| 21:16 |
|
FROGGS |
TimToady: \o/ |
| 21:16 |
|
* masak |
submits TimToady's rakudobug |
| 21:16 |
|
tadzik |
I think it's wrong 'cos it doesn't respect this.start |
| 21:17 |
|
FROGGS |
TimToady: do you have time to look at my pull request? |
| 21:17 |
|
tadzik |
so in my opinion, a following should trigger a bug: |
| 21:17 |
|
masak |
tadzik: sorry, a bit too distracted right now. |
| 21:17 |
|
tadzik |
oh, sure |
| 21:17 |
|
masak |
tadzik: if you could produce a golfed failing test... :) |
| 21:17 |
|
tadzik |
but that's the problem! :) |
| 21:17 |
|
masak |
yes, I know. |
| 21:17 |
|
masak |
no excuses. try it. |
| 21:18 |
|
TimToady |
FROGGS: I'll try to get to it |
| 21:18 |
|
masak |
if the bug escapes your grasp, it simply means that your net is too sparse. |
| 21:18 |
|
FROGGS |
thanks |
| 21:18 |
|
FROGGS |
:o) |
| 21:18 |
|
tadzik |
masak: that's the whole point. I can't write a failing test :P |
| 21:19 |
|
raiph__ |
"Longest token match shouldn't make any difference on the speed of parsing" |
| 21:19 |
|
raiph__ |
true? partly? false? |
| 21:19 |
|
masak |
tadzik: then what makes you think it's a bug? |
| 21:20 |
|
masak |
raiph__: compared to ordinary Recursive Descent? I think LTM performs better. |
| 21:20 |
|
arnsholt |
A big piece of code that fails, I guess |
| 21:20 |
|
tadzik |
masak: instinct and pencil+paper simulations |
| 21:20 |
|
tadzik |
and it makes me think I'm stupid :) |
| 21:20 |
|
masak |
tadzik: reduce, reduce, reduce. |
| 21:20 |
|
masak |
tadzik: inside every big interesting problem is a small interesting problem, fighting to get out. |
| 21:21 |
|
tadzik |
I got it reduced to 3 calls, still works |
| 21:21 |
|
masak |
r: my $x; $x [R/]= 1 |
| 21:21 |
|
p6eval |
rakudo 935c90: OUTPUT«===[0mSORRY!===[0m�Preceding context expects a term, but found infix = instead�at /tmp/95XYnmRMtC:1�------> my $x; $x [R/]=� 1�» |
| 21:23 |
|
FROGGS |
n: my $x; say $x [R/]= 1 |
| 21:23 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«Use of uninitialized value in numeric context at /home/p6eval/niecza/lib/CORE.setting line 1287 (warn @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 294 (Any.Numeric @ 8)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/lib/CORE.s… |
| 21:23 |
|
FROGGS |
n: my $x = 0; say $x [R/]= 1 |
| 21:23 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«Inf» |
| 21:23 |
|
FROGGS |
n: my $x = 1; say $x [R/]= 1 |
| 21:23 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«1» |
| 21:23 |
|
FROGGS |
ahh |
| 21:23 |
|
masak |
n: my $x = 1; $x [R/]= 2, 3, 4; say $x |
| 21:23 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«2» |
| 21:23 |
|
masak |
n: my $x = 1; $x [R/]= (2, 3, 4); say $x |
| 21:23 |
|
p6eval |
niecza v24-18-gaf64300: OUTPUT«3» |
| 21:25 |
|
raiph__ |
masak: the longer comment (by someone else) was "NFA precomputation is constructing an lr-0 or lr-n automaton and using lookahead to eliminate states. Once you have the rule, you can order your backtracking search across the states. For packrat, it goes in left-to-right, for perl 6 rules, it goes by the length. The speed is relatively unchanged by order." |
| 21:27 |
|
TimToady |
.oO("but what's 3 orders of magnitude among friends") |
| 21:28 |
|
masak |
raiph__: ok, then it seems like it's comparing packrat (which I don't know) against LTM. |
| 21:28 |
|
masak |
s/LTM/Perl 6 LTM/ |
| 21:28 |
|
raiph__ |
masak: my intuition was that for many grammars/inputs LTM declarative prefixes make a good pragmatic match and *would* be significantly faster |
| 21:30 |
|
masak |
raiph__: faster than *what*? |
| 21:30 |
|
masak |
you can't avoid scanning the source string once. |
| 21:30 |
|
TimToady |
well, P6 uses LTM to drive a recursive descent engine, so it really depends on how well we drive :) |
| 21:31 |
|
masak |
I mean, with Boyer-Moore, you can sometimes do good guesses and beat O(n), but... |
| 21:31 |
|
TimToady |
currently we do end up matching everything twice |
| 21:31 |
|
masak |
Recursive Descent is not well-known for being fast, IIUC. |
| 21:31 |
|
TimToady |
in the absence of captures or other side effects, we could optimize away some of the duplicate matching |
| 21:32 |
|
sorear |
masak: The unique morphism from a general set S to a singleton set {x} is... a constant function! |
| 21:32 |
|
TimToady |
masak: that's mostly the fault of precedence hierarchies, which we sidestep |
| 21:32 |
|
TimToady |
and secondarily the fault of making bad probes, which LTM bypasses |
| 21:34 |
|
masak |
sorear: oh urgh. that was too easy :P |
| 21:35 |
|
TimToady |
what you'd really like to do is cache activation records relative to the beginning of the token, then magically do a goto the middle of a matcher that is several levels down, where it will eventually be with the cursor at the end of the token |
| 21:36 |
|
masak |
sorear: does that mean that "doubleton sets" {x, y} are also terminal sets? I'm confuzzled again. |
| 21:36 |
|
TimToady |
but I don't think anyone has invented future continuations quite yet |
| 21:36 |
|
masak |
s/terminal sets/terminal objects/ |
| 21:36 |
|
sorear |
masak: No, because there are two inequivalent functions from {x} to {x,y} |
| 21:36 |
|
sorear |
masak: The number of functions from S to T is #T ** #S. It is 1 if #S == 0 or #T == 1 |
| 21:37 |
|
masak |
gotcha. |
| 21:37 |
|
masak |
nice. |
| 21:37 |
|
diakopter |
TimToady: can you explain that more? |
| 21:38 |
|
TimToady |
when you match LTM, the returned "fate" determines the next one or several recursive calls and their associated decisions, until the RD parser catches up to the position that the LTM got to |
| 21:39 |
|
diakopter |
that's conceivably doable |
| 21:39 |
|
TimToady |
it would be nice to have a way to cache those activation records, and any associated new Cursors (they'd have to encode relative positions somehow), such that it looks after taking the "continuation" like you did all the code without doing it |
| 21:40 |
|
TimToady |
well, sure, I just conceived it, but that's not quite doing it :P |
| 21:41 |
|
diakopter |
I would maintain a stack of descent commands while NFAing |
| 21:41 |
|
TimToady |
I suppose one approach would be to emulate recursive descent with your own stack, making sure that the "continuation" was self contained, then remembering it |
| 21:41 |
|
TimToady |
depending on what you mean by "commands", that's what STD did with its "fates" |
| 21:42 |
|
TimToady |
but that didn't prevent actually having to do the calls afterward |
| 21:42 |
|
diakopter |
which alternation to take |
| 21:42 |
|
TimToady |
that bit is a solved problem |
| 21:42 |
|
TimToady |
STD already did it |
| 21:43 |
|
TimToady |
(not sure if the current version still does though) |
| 21:45 |
|
TimToady |
I'm talking about doing something a bit more stackless, that you could look at the set of pads and Cursors that would be created by a particular LTM, and somehow bundling that up to a reusable thing you just poke somewhere and you're magically already several levels deep in call, and at the correct cursor position to begin the non-declarative bits of the pattern |
| 21:46 |
|
TimToady |
(I'm not suggesting anyone try this soonish, it's just an idea for an eventual optimization) |
| 21:46 |
|
TimToady |
Cursors currently hold an absolute position, so could not be reused that way without relocation logic |
| 21:47 |
|
diakopter |
which alternation to take, also how many times each quant succeeded |
| 21:48 |
|
TimToady |
and the parser currently relies rather too heavily on dynamic variables, which would also have to be accounted for somehow |
| 21:48 |
|
masak |
TimToady: with enough effort, anything can be CPS-transformed into a state machine. then you can do the trick you mention. |
| 21:48 |
|
masak |
I'd certainly like to try it at some point. |
| 21:50 |
|
raiph__ |
TimToady: thanks |
| 21:51 |
|
TimToady |
we're using recursive descent not because it's fast, but because mere mortals can understand it a little more easily; that doesn't preclude cheating^Woptimization, as long as we don't get caught |
| 21:51 |
|
[Coke] |
aloha, seen bacek? |
| 21:52 |
|
masak |
ENOALOHA |
| 21:53 |
|
[Coke] |
masak: http://irclog.perlgeek.de/sear[…]ick=bacek&q=aloha |
| 21:53 |
|
dalek |
std: 3725e26 | (Tobias Leich)++ | STD.pm6: |
| 21:53 |
|
dalek |
std: move $( ~ ) into variable token |
| 21:53 |
|
dalek |
std: |
| 21:53 |
|
dalek |
std: This way contextualizers in code, quotes _and_ regexes behave the same. |
| 21:53 |
|
dalek |
std: review: https://github.com/perl6/std/commit/3725e264b9 |
| 21:53 |
|
dalek |
std: da06458 | (Tobias Leich)++ | CORE.setting: |
| 21:53 |
|
dalek |
std: Merge branch 'master' of git://github.com/perl6/std |
| 21:53 |
|
dalek |
std: review: https://github.com/perl6/std/commit/da0645832d |
| 21:53 |
|
dalek |
std: 7551b8f | larry++ | STD.pm6: |
| 21:53 |
|
dalek |
std: Merge pull request #4 from FROGGS/master |
| 21:53 |
|
dalek |
std: |
| 21:53 |
|
dalek |
std: move $( ~ ) into variable token |
| 21:53 |
|
dalek |
std: review: https://github.com/perl6/std/commit/7551b8f9d5 |
| 21:53 |
|
[Coke] |
at a guess, we might have lost any data it had accumulated. |
| 21:53 |
|
FROGGS |
yay |
| 21:54 |
|
TimToady |
FROGGS++ |
| 21:54 |
|
raiph__ |
FROGGS++ |
| 21:54 |
|
FROGGS |
thanks :o) |
| 21:54 |
|
[Coke] |
who maintains dalek on feather? can we run aloha next to dalek? |
| 21:54 |
|
TimToady |
FROGGS++ # for persistence |
| 21:55 |
|
raiph__ |
TimToady++ # for persistence (25 years and counting) |
| 21:56 |
|
TimToady |
.oO("He was fishing with the persistence that many mistake for patience." --Field and Stream) |
| 21:58 |
|
|
benabik joined #perl6 |
| 21:59 |
|
TimToady |
I remember reading that when I was a teenager. |
| 22:03 |
|
masak |
TimToady: Leslie Hawthorn's FOSDEM talk about community leaders made me ask myself whether you've ever had a burnout relating to the Perl venture. |
| 22:03 |
|
raiph__ |
TimToady: what a striking quote |
| 22:13 |
|
|
donaldh joined #perl6 |
| 22:14 |
|
TimToady |
masak: as long as each burnout is matched by a subsequent burnin, nobody can tell the difference between that and bipolar disorder :) |
| 22:16 |
|
|
Juerd joined #perl6 |
| 22:18 |
|
masak |
I guess. :) |
| 22:19 |
|
masak |
TimToady: was there ever a point when you went, "hm, this Perl thing could turn out to be quite popular. maybe even dozens of users"? :) |
| 22:21 |
|
TimToady |
I never didn't think that. |
| 22:21 |
|
TimToady |
I'd already released several popular things. |
| 22:22 |
|
TimToady |
so Perl was born popular :) |
| 22:22 |
|
masak |
hehe. |
| 22:25 |
|
|
cognominal__ joined #perl6 |
| 22:29 |
|
swarley |
I wish I better understood how virtual machines work, I always day dream about having the know how to plan it out. I made my own tiny little vm once, but it was just like ObjC's retain/release, didn't really do much |
| 22:31 |
|
masak |
swarley: follow your dreams. learn by building stuff. |
| 22:31 |
|
geekosaur |
they execute code, they provide some way t evoke system services from the vmm (either via emulated hardware or special instructions) |
| 22:33 |
|
swarley |
well that I understand |
| 22:33 |
|
geekosaur |
and there are different varieties of virtual machine --- they can emulate hardware like vmware/parallels/virtualbox, or provide their own custom environment like the JVM/CLR/most Smalltalk VMs, or be something like LLVM which is sort of the latter but whose bytecode can be further "compiled" into optimized (if suitably annotated) native code |
| 22:33 |
|
swarley |
But there is much more theory to it than that, that i don't understand |
| 22:35 |
|
dalek |
nqp: 09bd1bc | (Tobias Leich)++ | src/QRegex/P6Regex/ (2 files): |
| 22:35 |
|
dalek |
nqp: removed metachar:sym<$( )> |
| 22:35 |
|
dalek |
nqp: |
| 22:35 |
|
dalek |
nqp: Which was my first approach to support contextualizers. |
| 22:35 |
|
dalek |
nqp: Since this is not the way STD does it, and since it doesnt work right, |
| 22:35 |
|
dalek |
nqp: it gets reverted. |
| 22:35 |
|
dalek |
nqp: review: https://github.com/perl6/nqp/commit/09bd1bc7bc |
| 22:35 |
|
dalek |
nqp: 1fb778f | (Tobias Leich)++ | src/HLL/Grammar.pm: |
| 22:35 |
|
dalek |
nqp: move <sigil> and <twigil> |
| 22:35 |
|
dalek |
nqp: |
| 22:35 |
|
dalek |
nqp: ... to HLL::Grammar since we are using it from NQP::Grammar |
| 22:35 |
|
swarley |
the main issue i have is thinking of how to abstract types, like the idea of class inheritance is very blurry for me when i start thinking as to how it would be when everything is compiled |
| 22:35 |
|
dalek |
nqp: and Perl6::Grammar. |
| 22:35 |
|
dalek |
nqp: review: https://github.com/perl6/nqp/commit/1fb778ff13 |
| 22:35 |
|
dalek |
nqp: 2c13753 | (Tobias Leich)++ | src/NQP/ (2 files): |
| 22:35 |
|
dalek |
nqp: move $( ~ ) into variable token |
| 22:35 |
|
dalek |
nqp: |
| 22:35 |
|
dalek |
nqp: This way contextualizers in code, quote and regexes do all the same, |
| 22:35 |
|
dalek |
nqp: and we can get rid of circumfix:sym<sigil>. |
| 22:35 |
|
dalek |
nqp: review: https://github.com/perl6/nqp/commit/2c13753ac8 |
| 22:36 |
|
dalek |
rakudo/nom: d77b765 | (Tobias Leich)++ | / (3 files): |
| 22:36 |
|
dalek |
rakudo/nom: move $( ~ ) into variable token |
| 22:36 |
|
dalek |
rakudo/nom: |
| 22:36 |
|
dalek |
rakudo/nom: Contextualizers do work and litvar.t is parseable now. |
| 22:36 |
|
dalek |
rakudo/nom: review: https://github.com/rakudo/raku[…]commit/d77b7656df |
| 22:36 |
|
dalek |
rakudo/nom: 0dda4c8 | (Tobias Leich)++ | tools/build/NQP_REVISION: |
| 22:36 |
|
dalek |
rakudo/nom: bump NQP revision |
| 22:36 |
|
dalek |
rakudo/nom: review: https://github.com/rakudo/raku[…]commit/0dda4c8712 |
| 22:37 |
|
swarley |
And prehaps more sophisticated garbage collection techniques |
| 22:38 |
|
benabik |
GC is "exciting" to program, since errors express themselves as creeping memory corruption instead of big errors. |
| 22:39 |
|
|
cognominal__ joined #perl6 |
| 22:41 |
|
swarley |
I really wish I had a better idea of how to implement a language like nqp. It's quite fascinating. I stopped development on the nqp-yarv because i benchmarked a large code sample and it's terribly inefficient.. I'd love to try it in llvm, but I really know next to nothing about llvm |
| 22:41 |
|
benabik |
NQP on LLVM would be interesting, but also painful. LLVM provides _no_ language support, so you have to build everything from scratch. |
| 22:42 |
|
benabik |
Things like GC, objects, IO, etc. |
| 22:42 |
|
swarley |
ah |
| 22:42 |
|
swarley |
Well, I don't imagine it would be too terrible |
| 22:43 |
|
benabik |
It is a *low-level* virtual machine, after all. :-D |
| 22:43 |
|
swarley |
I think the hardest part would just be learning llvm |
| 22:43 |
|
swarley |
I was trying to decide on a parser generator. I'm not sure if I want to go with flex/bison or ANTLR3 |
| 22:43 |
|
PerlJam |
swarley: Perl 6 ;) |
| 22:44 |
|
swarley |
I want it output in C/C++ :p |
| 22:45 |
|
swarley |
I looked at lemon, and I thought it was neat, until I saw how terribly inconvenient it was |
| 22:45 |
|
PerlJam |
Using Perl 6 does not preclude outputting C |
| 22:45 |
|
PerlJam |
:-) |
| 22:45 |
|
swarley |
Oh, I suppose you're right.. |
| 22:45 |
|
tadzik |
swarley: did you consider JVM? |
| 22:46 |
|
swarley |
We already have nqp-jvm, I believe jnthn is working on it |
| 22:47 |
|
swarley |
hm.. I wonder how I would output C++ with perl6 |
| 22:47 |
|
tadzik |
yeah |
| 22:47 |
|
tadzik |
it's pretty nice, if you ask me :) nqp-jvm |
| 22:47 |
|
|
shinobicl left #perl6 |
| 22:47 |
|
tadzik |
and performance is promising so far, even surpassing Perl 5 |
| 22:47 |
|
swarley |
I guess I would create nodes and just have them dump to text? |
| 22:47 |
|
benabik |
swarley: You can skip the nodes if you don't intend to manipulate them. Just have action methods that print code. |
| 22:48 |
|
swarley |
I'm not sure really. I need to learn more about llvm |
| 22:49 |
|
swarley |
I have __no__ idea how it does classes |
| 22:49 |
|
benabik |
It doesn't. |
| 22:49 |
|
swarley |
yeah, i know |
| 22:49 |
|
swarley |
I mean how it fakes them |
| 22:49 |
|
swarley |
Or how _you_ would fake them |
| 22:50 |
|
swarley |
Well, NQP isn't supposed to have dynamically generated methods is it? |
| 22:50 |
|
benabik |
Any way you want. :-D Learning LLVM is not so different from learning assembly. |
| 22:50 |
|
swarley |
You say that like it's not a bad thing :p |
| 22:50 |
|
|
shinobicl joined #perl6 |
| 22:51 |
|
benabik |
I'm a big fan of learning how computers actually do their thing. High-level languages are great, but if you don't know how it's put together you can create horrible code. |
| 22:52 |
|
swarley |
Yeah, I like assembly, but it's not a walk in the park to learn |
| 22:52 |
|
timotimo |
first attempt at "moreinput" handling in rakudo is compiling now :) |
| 22:52 |
|
timotimo |
i've got pretty much no idea how to properly test this short of running a perl6 interpreter and communicating with it, or writing a different frontend or something |
| 22:53 |
|
dalek |
roast: cdf2b0a | (Tobias Leich)++ | S05-metasyntax/litvar.t: |
| 22:53 |
|
dalek |
roast: first tests for contextualizer $( ), cleanup |
| 22:53 |
|
dalek |
roast: review: https://github.com/perl6/roast/commit/cdf2b0a3ec |
| 22:53 |
|
benabik |
To some extent, LLVM IR is assembly-lite. It handles things like register allocation, calling conventions, etc. |
| 22:55 |
|
timotimo |
it seems like i broke it |
| 22:55 |
|
swarley |
Oh alright.. I see how you fake classes in llvm |
| 22:55 |
|
benabik |
s/fake/implement/ |
| 22:56 |
|
swarley |
I prefer fake |
| 22:56 |
|
swarley |
Because it's not a class |
| 22:56 |
|
swarley |
It's a struct |
| 22:56 |
|
geekosaur |
how do you fake classes in x86 assembly? much the same answer for llvm... |
| 22:56 |
|
swarley |
And then you just name the functions with a namespace |
| 22:56 |
|
geekosaur |
"class" is kinda at a diferent level of abstraction |
| 22:57 |
|
geekosaur |
whicg gets back to what I was saying about the different kinds of VMs |
| 22:58 |
|
timotimo |
i kind of dislike that rakudo signalises "wrong grammar" not by an error but by not terminating when trying to build the seting :( |
| 23:10 |
|
timotimo |
oh, *now* it compiles |
| 23:11 |
|
|
cognominal joined #perl6 |
| 23:11 |
|
|
pmurias joined #perl6 |
| 23:11 |
|
swarley |
It would be neat to use the erlang vm as well. But I'm sure that, that is more hellish than llvm |
| 23:12 |
|
pmurias |
swarley: re terribly inefficient, yarv itself or the code nqp-yarv generated? |
| 23:12 |
|
swarley |
the way that you have to load the yarv sequence |
| 23:12 |
|
swarley |
it turns into a massive ruby data structure |
| 23:13 |
|
swarley |
There is no way to just use the yarv vm independently as of yet |
| 23:14 |
|
pmurias |
and creating the data structure is slow? or converting it to yarv bytecode? |
| 23:14 |
|
swarley |
It's just that once your program gets anywhere past a few tens of lines, you have a thousand element array |
| 23:15 |
|
swarley |
so, trying to run NQP would end up with a massive array sitting in memory |
| 23:16 |
|
pmurias |
shouldn't the number of opcodes for a line be relatively small? |
| 23:16 |
|
pmurias |
like 10x |
| 23:18 |
|
swarley |
well, each opcode is wrapped in an array |
| 23:18 |
|
swarley |
and each arg, if it's any sort of complex type |
| 23:18 |
|
swarley |
is wrapped in an array |
| 23:19 |
|
swarley |
I'll continue the project if they expose an API for compiling it to actual bytecode that doesn't require it to be in a ruby data structure |
| 23:19 |
|
jnthn |
phenny: tell me stuff |
| 23:19 |
|
phenny |
Hey, I'm not as stupid as Monty you know! |
| 23:19 |
|
phenny |
jnthn: 19:26Z <arnsholt> tell jnthn I think I give up this bootstrapping thing. Somehow, once I get NQP updated to the new stuff, I break Rakudo: "Method 'get_lex_type' not found for invocant of class 'Perl6LexPad'" something about "Cannot unbox argument to '$name' as a native str" |
| 23:20 |
|
jnthn |
phenny: tell arnsholt I'll look at it once I'm home tomorrow, or maybe on Thursday when I don't have to care about anything other than Perl 6 stuff :0 |
| 23:20 |
|
phenny |
jnthn: I'll pass that on when arnsholt is around. |
| 23:20 |
|
timotimo |
this moreinput stuff doesn't quite seem to work yet >_< |
| 23:21 |
|
|
cognominal joined #perl6 |
| 23:21 |
|
swarley |
i dislike that the parsing method that llvm recommends is just creating your own |
| 23:22 |
|
swarley |
i can't imagine doing that for anything of scale |
| 23:22 |
|
pmurias |
you mean just creating your own parser? |
| 23:23 |
|
pmurias |
swarley: which ruby version do I need for RubyVM::InstructionSequence.load(iseq_structure) to work? |
| 23:23 |
|
timotimo |
not being able to debug the grammar rakudo uses to parse your code makes this a bit harder than i'd like :( |
| 23:25 |
|
jnthn |
swarley: The ONLY way that is sane to parse Perl 6 (NQP included) is to write the grammar in perl 6. |
| 23:26 |
|
timotimo |
(which is still better than how to parse perl5) |
| 23:26 |
|
jnthn |
Which menas you take an existing Perl 6 of NQP parser and write a backend. |
| 23:26 |
|
timotimo |
Error while compiling, type X::::::::C::o::m::p::::::::N::Y::I feature: multi-dimensional indexes - lol wut? |
| 23:27 |
|
diakopter |
lol |
| 23:28 |
|
masak |
something went wrong in that error message... :) |
| 23:28 |
|
timotimo |
can't hack on the grammar without weeeiird things happening |
| 23:28 |
|
huf |
still not as good as Error: Success (0) |
| 23:29 |
|
timotimo |
yeah, but at least that one's understood pretty well |
| 23:29 |
|
|
cognominal joined #perl6 |
| 23:30 |
|
pmurias |
jnthn: what features of NQP make it diffcult to parse? |
| 23:31 |
|
timotimo |
did moreinput work in STD at all, ever? |
| 23:31 |
|
swarley |
pmurias, 2.0 |
| 23:31 |
|
|
skids joined #perl6 |
| 23:31 |
|
pmurias |
jnthn: it has a inmutable grammar, so any old tool (yacc, handcoded recursive descent) should be sane |
| 23:31 |
|
timotimo |
it seems like a good idea to put an alteration into <ws> to match end-of-string and then grab more text, but it doesn't seem like it gets hit at all?! |
| 23:32 |
|
swarley |
jnthn, why is it insane to try something else? |
| 23:32 |
|
pmurias |
swarley: because the grammar in Perl6 is extendable |
| 23:33 |
|
jnthn |
OK, fine, do what you like. I don't care, I'll do it the way I've spent the last however meany yars figuring out. |
| 23:33 |
|
swarley |
i was just wondering |
| 23:33 |
|
jnthn |
Because it all hangs of protoregexes and they hang off LTM. |
| 23:34 |
|
pmurias |
jnthn: that was aimed at me? |
| 23:34 |
|
jnthn |
Doing a Perl 6 parser depends on being able to mix in to the grammar. The roles you mix in then in turn affect LTM. |
| 23:34 |
|
masak |
'night, #perl6 |
| 23:34 |
|
diakopter |
o/ |
| 23:35 |
|
jnthn |
pmurias: Not aimed at anyone, just general frustration at trying to do stuff in ways I know won't lead to something viable to build a Perl 6 implementation on... |
| 23:35 |
|
jnthn |
anyways, sleep & |
| 23:35 |
|
timotimo |
night masak! |
| 23:35 |
|
timotimo |
night jnthn :) |
| 23:35 |
|
pmurias |
jnthn: night |
| 23:36 |
|
swarley |
so wait.. The language can change itself at compile time? |
| 23:36 |
|
timotimo |
sure, it's called Slangs |
| 23:36 |
|
jnthn |
swarley: Yes, and Perl 6 does every time you declare a custom operator. |
| 23:36 |
|
timotimo |
also, every time you add an operator it happens |
| 23:36 |
|
timotimo |
and macros can have "is parsed /regex/" |
| 23:36 |
|
swarley |
alright then.. |
| 23:37 |
|
swarley |
that seems like it would make lexing terrible |
| 23:37 |
|
pmurias |
jnthn: re frustration, we should have an perl6-implementation-faq "why don't we use llvm?" ;) |
| 23:37 |
|
timotimo |
so, in a perl6 grammar, $ should match "end of string", right? and $( .meth ) should call .meth and try to parse the return value? |
| 23:37 |
|
diakopter |
what's this thing you call lexing |
| 23:37 |
|
jnthn |
That's why Perl 6 grammars generate the lexer rather than making he user do it ;) |
| 23:38 |
|
jnthn |
pmurias: Yes, probably :) |
| 23:38 |
|
swarley |
well then |
| 23:38 |
|
pmurias |
jnthn: elf had a grammar written in ruby (handcompiled from STD) |
| 23:38 |
|
swarley |
this sounds like i'm.. in for not having a fun time! |
| 23:38 |
|
pmurias |
jnthn: it was definitely insane |
| 23:39 |
|
jnthn |
Porting NQP is *hard*. But if it's ported and self-hosts then there's a good chance of running on Raudo. |
| 23:39 |
|
timotimo |
or should that really be { $¢.moreinput } |
| 23:39 |
|
timotimo |
like in STD? because that didn't seem to work in rakudos grammar at all :( |
| 23:39 |
|
diakopter |
jnthn: it's not hard; I ported 8 rakudos before breakfast |
| 23:39 |
|
timotimo |
jnthn: did you mean "running Rakudo"? |
| 23:39 |
|
jnthn |
timotimo: yes, sorry |
| 23:39 |
|
jnthn |
EVERYTIRED :) |
| 23:40 |
|
diakopter |
every tire what? |
| 23:40 |
|
timotimo |
man who runs in front of car gets tired, man who runs behind car gets exhausted |
| 23:40 |
|
timotimo |
it's as easy as that |
| 23:40 |
|
jnthn |
timotimo: *lol* |
| 23:41 |
|
skids |
:D |
| 23:41 |
|
pmurias |
jnthn: go to sleep, you can always backlog later ;) |
| 23:41 |
|
timotimo |
unfortunately you can't throw in remarks and comments into the backlog |
| 23:41 |
|
jnthn |
pmurias: Yes, I took your JavaScript effort much more enthusiasticly since I saw the bounded serialization stuff getting ported. A good port of that and 6model and the grammar engine = we can really get Rakudo on JavaScript :) |
| 23:42 |
|
skids |
.oO(MST6P?) |
| 23:44 |
|
timotimo |
https://github.com/perl6/std/b[…]ster/STD.pm6#L626 - would this even work in rakudo? i'm not even sure any more if it could, or why. |
| 23:44 |
|
|
thundergnat joined #perl6 |
| 23:45 |
|
jnthn |
timotimo: Well, that's like { $/.CURSOR.moreinput } |
| 23:45 |
|
jnthn |
timotimo: The hard part is writing moreinput |
| 23:45 |
|
jnthn |
timotimo: Take a look at ParseCommon or something in src/nqp/Cursor.nqp |
| 23:45 |
|
timotimo |
it seemed like i would just have to return a string with more text, that's obviously wrong? |
| 23:46 |
|
timotimo |
the point is, moreinput isn't even being called when i write incomplete things |
| 23:46 |
|
jnthn |
timotimo: No, you need to diddle the orig and target in parsecommon :) |
| 23:46 |
|
jnthn |
m |
| 23:46 |
|
jnthn |
oops |
| 23:46 |
|
timotimo |
diddle, eh? |
| 23:46 |
|
jnthn |
timotimo: A few months ago we didn't even have the parse common thing, so this woulda been practically impossible to implement :) |
| 23:46 |
|
timotimo |
heh. all right |
| 23:47 |
|
jnthn |
I changed it partly for doing highwater stuff, but also for moreinput and for textual macros ;-) |
| 23:47 |
|
timotimo |
oh, textual macros, eh? |
| 23:47 |
|
jnthn |
Anyway, you can now change the target string the grammar is parsing. |
| 23:48 |
|
timotimo |
src/QRegex/Cursor, this one? |
| 23:48 |
|
jnthn |
aye |
| 23:49 |
|
timotimo |
i don't see a parsecommon in there :( |
| 23:49 |
|
timotimo |
maybe ParseShared? |
| 23:49 |
|
jnthn |
That's 'cus it's called ParseShared :) |
| 23:49 |
|
jnthn |
It's $!orig and $!target in there that need to change when there's more input. |
| 23:50 |
|
timotimo |
right. would i then restart the parse from the beginning, though? |
| 23:51 |
|
* lue |
wonders what moreinput is |
| 23:52 |
|
timotimo |
lue: when you type something like sub blubb() { and hit newline, in "good" repls, you're asked to enter another line |
| 23:52 |
|
thundergnat |
jnthn: Is there any way to manually refresh the method cache for augmented types? |
| 23:52 |
|
timotimo |
rakudo will currently just say "there's stuff missing!" and you'd have to retype everything into one line |
| 23:52 |
|
lue |
ah, OK |
| 23:53 |
|
timotimo |
i see i bit off more than i can chew ... again |
| 23:54 |
|
jnthn |
thundergnat: It's the method cache of its subtypes that is the problem. |
| 23:54 |
|
thundergnat |
Yeah |
| 23:54 |
|
jnthn |
thundergnat: SubType.^publish_method_cache() # should do it |
| 23:55 |
|
thundergnat |
That has to be done for each subtype I want to see the method? |
| 23:55 |
|
jnthn |
thundergnat: Yeah. I need to fix it to actually do sub kinda publish/subscribe. Problem: anonymous subtypes (like mixins) need it to be a weak ref... |
| 23:55 |
|
jnthn |
Which is...fun ;) |
| 23:56 |
|
thundergnat |
Heh... I could imagine... |
| 23:57 |
|
jnthn |
It's on my todo list. But my todo list is like...well. :) |
| 23:57 |
|
timotimo |
i suppose i'll try to do i another time |
| 23:57 |
|
moritz |
jnthn: I tried to make variables in sink context warn, but the problem is that we introspect the LHS QAST tree for stuff like binding and assignment |
| 23:57 |
|
thundergnat |
jnthn: Yeah... I could imagine that too. Thanks. |
| 23:57 |
|
moritz |
and also it immensely increased the size of the QAST tree when I wrapped each variable in a QAST::Want |
| 23:58 |
|
jnthn |
moritz: Yeah, but maybe the optimizer can track it. |
| 23:58 |
|
moritz |
jnthn: so my next idea: maybe we could set up a callback in QAST::Compiler that is called for each QAST node in void context that's not a QAST::Want |
| 23:59 |
|
jnthn |
moritz: hmmm. I'm too tired to know if that's a hack or a great idea ;) |
| 23:59 |
|
jnthn |
Lemme sleep on it :) |
| 23:59 |
|
timotimo |
"that hack is a great idea!" |
| 23:59 |
|
moritz |
jnthn: sure |