»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by lichtkind on 5 March 2010. |
|||
00:06
ruoso joined
|
|||
quietfanatic | rakudo: state $x = 0; say $x | 00:07 | |
p6eval | rakudo e6863e: OUTPUT«Symbol '$x' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
quietfanatic | state variables not working? | ||
[particle] | do state variables need scope? | 00:11 | |
rakudo: my state $x = 0; say $x | |||
p6eval | rakudo e6863e: OUTPUT«Malformed my at line 11, near "state $x ="current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
[particle] | well, either they're not implemented, or they don't need scoping and they're not implemented :) | ||
00:13
lest_away is now known as lestrrat
00:16
yinyin joined
|
|||
sjohnson | rakudo: sub cool { state $n = 0; $n++; say $n; }; cool() for ^5; | 00:19 | |
p6eval | rakudo e6863e: OUTPUT«Symbol '$n' not predeclared in coolcurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
00:20
tylerni7 left
|
|||
sjohnson | rakudo: sub cool { my state $n = 0; $n++; say $n; }; cool() for ^5; | 00:20 | |
p6eval | rakudo e6863e: OUTPUT«Malformed my at line 11, near "state $n ="current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
sjohnson | yeah, i have no idea :/ | ||
TimToady | state is a scope declarator already | 00:23 | |
00:25
rgrau_ left
|
|||
pugssvn | r30733 | lwall++ | [STD] not all expression terminators are valid statement terminators | 00:27 | |
sjohnson | it is possible... that the online rakudo here, isn't up to snuff with the latest perl6 technologies. | 00:29 | |
lue | ohai | ||
sjohnson | and by that, i mean... latest rakudo build | ||
i wonder if you can get rakudo to spill the beans as to what build it is | |||
quietfanatic | alpha: state $x = 0; say $x | 00:31 | |
p6eval | alpha 30e0ed: OUTPUT«0» | ||
lue | rakudo: exec('ls ./') | 00:33 | |
p6eval | rakudo e6863e: OUTPUT«Could not find sub &execcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
lue | What was it again... | ||
rakudo: run('ls ./') | 00:37 | ||
p6eval | rakudo e6863e: OUTPUT«buildConfigure.plCREDITSdocsdynextlibLICENSEMakefileparrotperl6perl6.cperl6_group.cperl6_group.hperl6_group.operl6.operl6.pbcREADMEsrctTest.pirTest.pmtools» | ||
lue | rakudo: run ('./perl6 -v') | ||
p6eval | rakudo e6863e: OUTPUT«This compiler is built with the Parrot Compiler Toolkit, parrot revision 46819.» | ||
diakopter | grr | ||
lue | sorry. | 00:38 | |
bkeeler | rakudo: class C does Positional does Associative { } | ||
p6eval | rakudo e6863e: OUTPUT«get_attr_str() not implemented in class 'Sub'current instr.: 'perl6;Code;multi' pc 13975 (src/builtins/Num.pir:234)» | ||
bkeeler | rakudo: class C does Positional { } | ||
p6eval | rakudo e6863e: ( no output ) | ||
bkeeler | rakudo: class C does Associative { } | 00:39 | |
p6eval | rakudo e6863e: ( no output ) | ||
bkeeler | rakudo: class C does Associative { }; use MONKEY_TYPING; augment class C does Positional { } | ||
p6eval | rakudo e6863e: OUTPUT«get_attr_str() not implemented in class 'Sub'current instr.: 'perl6;Code;multi' pc 13975 (src/builtins/Num.pir:234)» | ||
bkeeler | Hmmmmmmm. Seems impossible for a class to do both Associative and Positional | 00:40 | |
lue | std: class C does Positional does Associative { } | ||
p6eval | std 30732: OUTPUT«ok 00:01 110m» | ||
TimToady | yeah well | ||
std: class C does Foo does Bar { } | 00:41 | ||
p6eval | std 30732: OUTPUT«ok 00:01 110m» | ||
lue | syntactically correct though. [can't wait for the std interpreter! :)] | ||
TimToady | std: say 1 if 2 if 3 { say 3 } | ||
p6eval | std 30732: OUTPUT«ok 00:01 111m» | ||
TimToady | ENOTYET | ||
quietfanatic | Okay, what on earth did I do to get 'Can only transform an Object to p6opaque'? | ||
TimToady | bbl & | 00:42 | |
quietfanatic | EGOTTAGO | ||
00:42
quietfanatic left
|
|||
snarkyboojum | std: use MONKEY_TYPING; my class C does Associative { }; augment class C { } | 00:46 | |
p6eval | std 30732: OUTPUT«ok 00:01 122m ./lib/MONKEY_TYPING.pm6ok 00:01 111m» | ||
snarkyboojum | rakudo: use MONKEY_TYPING; my class C does Associative { }; augment class C { } | ||
p6eval | rakudo e6863e: OUTPUT«Method 'HOW' not found for non-objectcurrent instr.: 'perl6;C;!class_init_11' pc 490 (EVAL_1:214)» | ||
snarkyboojum | rakudo: use MONKEY_TYPING; class C does Associative { }; augment class C { } | ||
p6eval | rakudo e6863e: ( no output ) | ||
00:51
jaldhar left
|
|||
diakopter | "Since the four-based genetic code is read in three-letter triplet combinations, the scientists devised a new code in which the 64 possible triplets symbolize the letters of the alphabet and punctuation. | 00:55 | |
Read more: www.time.com/time/health/article/0,...z0oWN1y2DO | |||
wheh | |||
ooo a "new code" | 00:56 | ||
00:56
jaldhar joined
00:57
rdesfo joined
|
|||
rdesfo | hello Diaspora is an open source facebook alternative project written in ruby. Does any one know it there is a similar perl project? | 00:59 | |
diakopter | probably not in Perl 6, yet | 01:01 | |
lue | diakopter: I thought of DNA being a secret code first! :) | 01:05 | |
The ironic thing this is the D* team love Ruby because, to put it in P6 terms, of its TIMTOWTDI-ness. :) | 01:06 | ||
diakopter | std: say 1 if 2 if 3 { say 3 } | ||
p6eval | std 30733: OUTPUT«===SORRY!===Missing semicolon at /tmp/9kQNhL52Zn line 1:------> say 1 if 2⏏ if 3 { say 3 }Parse failedFAILED 00:01 111m» | ||
01:07
wknight8111 left
|
|||
diakopter | std: say 1 if 2 = 3 | 01:08 | |
p6eval | std 30733: OUTPUT«ok 00:01 111m» | ||
diakopter | rakudo: say 1 if 2 = 3 | ||
p6eval | rakudo e6863e: OUTPUT«Cannot assign to readonly valuecurrent instr.: '&die' pc 18058 (src/builtins/Junction.pir:381)» | ||
lue | .oO(diakopter: This Time article is talking about _everything_ I've been thinking of, but done by the dark side) |
||
The only difference between me and *Venter* is that I'm trying to make DNA fit Unicode [I know it's crazy, but hey] to find messages in the human genome. | 01:10 | ||
( That, and I want to throw DNA into the proverbial blender and make a TARDIS :D ) | |||
01:11
Arroz_ is now known as saaki
|
|||
diakopter | lue: I thought you were writing an NES emulator | 01:11 | |
lue | That, and a sidequest to decode DNA. | 01:13 | |
I can actually upload a zip file that contains a rudimentary DNA "decoder" (P6 of course), and several "decoded" noncoding DNA sequences. | |||
s/zip/tar.bz2/ | |||
lue goes and preps the archive, JIC | 01:14 | ||
01:20
meppl left
|
|||
lue | .oO(I actually could upload this dna-to-binary script as a perl6 example, but it's horribly rudimentary) |
01:20 | |
01:21
masonkramer joined
01:26
s1n joined
01:37
rdesfo left,
masonkramer left,
masonkramer joined
01:38
Exodist_ joined,
Exodist left
|
|||
lue | I curious as to what the "standard perl library" should be. [one of the TBD specs] | 01:40 | |
01:40
gbacon joined
01:45
tylerni7 joined
01:53
[Coke] left
01:54
[Coke] joined
02:03
supernovus left
02:06
[Coke] left
02:09
quester_ joined
|
|||
snarkyboojum | let's have a social network of social network sites :P | 02:11 | |
lue | I think that's actually an eventual goal of D* | 02:13 | |
although not quite phrased that way by them :) | 02:14 | ||
snarkyboojum | lue: put your decoder on github :) | ||
lue | The fight to stop Venter (again)! | ||
...from patenting the creation of Life, specifically. | 02:15 | ||
[right now I'm working on euler problems for fun] | |||
02:18
[Coke] joined
|
|||
diakopter | I guess I need to set my blog's timezone to new zealand to ensure its place in the planetsix roll is better | 02:19 | |
Fiji will work. | 02:21 | ||
weird. | 02:22 | ||
it shows the last-edited time of the post | |||
oh well. | |||
lue | That's flawed :D | 02:23 | |
(great advertising for Fiji though :) ) | |||
02:26
JimmyZ joined
02:30
JimmyZ left,
JimmyZ joined
02:31
agentzh joined
02:40
quietfanatic joined,
gbacon left
02:43
patspam left
|
|||
sorear ponders making viv output use MooseX::Role::Parameterized | 02:44 | ||
quietfanatic | So, 'Can only transform an Object to p6opaque'... | 02:46 | |
does that mean 'only Objects can be transformed to p6opaque' | |||
or 'Objects can only be transformed to p6opaque'? | |||
diakopter | 'Objects can be transformed only to p6opaque' is slightly more clear, imho | 02:48 | |
quietfanatic | Actually it seems to mean the latter, examining the source | 02:49 | |
*former | |||
not latter | |||
diakopter | oh | ||
'Can transform only Objects to p6opaque' then | |||
quietfanatic | That only leaves the mystery of why I'm getting this error. | ||
Somebody's /* Sanity check. */ is doing its job :) | 02:50 | ||
dalek | meta: r283 | diakopter++ | trunk/Sprixel/ (4 files): [perlesque] first try to fix bug(s) exposed by self.t |
02:53 | |
pugssvn | r30734 | coke++ | ignore more *.rakudo files. | 02:54 | |
diakopter | hrm. didn't work. | 02:55 | |
[Coke] | perl6: say <a b c d e>.map: * ~ 'A' | 03:00 | |
p6eval | pugs: OUTPUT«*** Cannot cast from VList [VStr "InfA"] to Pugs.AST.Types.VCode (VCode) at /tmp/H341JnEJpl line 1, column 5 - line 2, column 1» | ||
..rakudo e6863e: OUTPUT«No candidates found to invokecurrent instr.: '_block14' pc 29 (EVAL_1:0)» | |||
..elf 30734: OUTPUT«Use of uninitialized value in subroutine entry at ./elf_h line 197.Can't use string ("") as a subroutine ref while "strict refs" in use at ./elf_h line 197. at ./elf_h line 5881» | |||
pugssvn | r30735 | svatsan++ | [u4x] use HTML::Template | 03:04 | |
[Coke] | code in day 22 complains about needing MONKEY_TYPING. | 03:06 | |
lue | rakudo: say fac(5) | 03:11 | |
p6eval | rakudo e6863e: OUTPUT«Could not find sub &faccurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
lue | rakudo: say factorial(5) | ||
p6eval | rakudo e6863e: OUTPUT«Could not find sub &factorialcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
lue | grr... Is there a factorial function? | 03:12 | |
rakudo: say 5! | |||
p6eval | rakudo e6863e: OUTPUT«Confused at line 11, near "say 5!"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
[Coke] | class PieceOfString { has Int $.length; } ; multi sub infix:<+>(PieceOfString $lhs, PieceOfString $rhs) { PieceOfString.new(:length($lhs.length, $rhs.length)); }; my $a = PieceOfString.new(:length(4)); my $b = PieceOfString.new(:length(6)); my $c = $a + $b; say $c.length; | ||
lue: no, but it's easy to write one, here: | |||
multi sub postfix:<!>(Int $n) { [*] 1..$n; | |||
lue | Ok. | ||
[Coke] | } | ||
lue | dankon | 03:13 | |
[Coke] | see: perl6advent.wordpress.com/2009/12/2...erloading/ | ||
rakudo: class PieceOfString { has Int $.length; } ; multi sub infix:<+>(PieceOfString $lhs, PieceOfString $rhs) { PieceOfString.new(:length($lhs.length, $rhs.length)); }; my $a = PieceOfString.new(:length(4)); my $b = PieceOfString.new(:length(6)); my $c = $a + $b; say $c.length; | |||
p6eval | rakudo e6863e: OUTPUT«46» | ||
[Coke] | that sample code from day 22 looks wrong. what is the + supposed to be doing there? | 03:14 | |
it's creating a new POS but is passing a list to :length? | 03:15 | ||
(you end up with a POS of length (4,6) | |||
quietfanatic | It ought to conflict with the type constraint of Int. | 03:16 | |
rakudo: class PieceOfString { has Int $.length; } ; multi sub infix:<+>(PieceOfString $lhs, PieceOfString $rhs) { PieceOfString.new(:length($lhs.length, $rhs.length)); }; my $a = PieceOfString.new(:length(4)); my $b = PieceOfString.new(:length(6)); my $c = $a + $b; say $c.length.WHAT; | |||
p6eval | rakudo e6863e: OUTPUT«Seq()» | 03:17 | |
lue | .oO(now to create a combinatronics thingy :) ) |
||
.oO(that's what the factorial is for) |
|||
snarkyboojum | rakudo: say pir::fact__ii(5) | 03:21 | |
heh | |||
p6eval | rakudo e6863e: OUTPUT«120» | ||
pugssvn | r30736 | coke++ | add day 22 spec tests (one fudged, one dodgy, and one spec change?) | 03:22 | |
[Coke] | that's probably faster (but less portable.) | 03:23 | |
snarkyboojum | aye :) | ||
rakudo: say pir::fact__ii(20) | |||
p6eval | rakudo e6863e: OUTPUT«2432902008176640000» | ||
lue | rakudo: multi sub postfix:<!>(Int $n) { [*] 1..$n; }; say 0! | 03:28 | |
p6eval | rakudo e6863e: OUTPUT«1» | ||
JimmyZ | rakudo: Q:PIR{ .loadlib 'obscure_ops' }; say pir::gcd_iii(6,20); | ||
p6eval | rakudo e6863e: OUTPUT«error:imcc:syntax error, unexpected LOADLIB ('.loadlib') in file 'EVAL_1' line 63error:imcc:syntax error, unexpected PREG, expecting '(' ('$P45') in file 'EVAL_1' line 68syntax error ... somewherecurrent instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 987 | ||
..(compilers/pct/src/PCT/HLL… | |||
03:32
Limbic_Region left
|
|||
snarkyboojum | rakudo: say pir::fact__ii(60) | 03:33 | |
p6eval | rakudo e6863e: OUTPUT«-8718968878589280256» | ||
snarkyboojum | rakudo: multi sub postfix:<!>(Int $n) { [*] 1..$n; }; say 60! | ||
p6eval | rakudo e6863e: OUTPUT«8.32098711274139e+81» | ||
snarkyboojum | yay rakudo! | ||
boo parrot | |||
lue | .oO(here here!) |
||
JimmyZ | rakudo: say pir::gcd_iii(6,20); | 03:34 | |
p6eval | rakudo e6863e: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P45') in file 'EVAL_1' line 22837763syntax error ... somewherecurrent instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 987 (compilers/pct/src/PCT/HLLCompiler.pir:542)» | ||
JimmyZ | :( | ||
snarkyboojum | rakudo: say pir::gcd__iii(6, 20) | 03:35 | |
p6eval | rakudo e6863e: OUTPUT«2» | ||
snarkyboojum | rakudo: say pir::gcd__iii(612, 64) | 03:36 | |
03:36
[mark] joined
|
|||
p6eval | rakudo e6863e: OUTPUT«4» | 03:36 | |
JimmyZ | rakudo: say pir::lcm_iii(6, 20); | 03:37 | |
p6eval | rakudo e6863e: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P45') in file 'EVAL_1' line 22837763syntax error ... somewherecurrent instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 987 (compilers/pct/src/PCT/HLLCompiler.pir:542)» | ||
snarkyboojum | rakudo: say pir::lcm__iii(12, 64) | ||
p6eval | rakudo e6863e: OUTPUT«192» | ||
snarkyboojum | JimmyZ: double _ | ||
JimmyZ | rakudo: say pir::lcm__iii(6,20); | ||
p6eval | rakudo e6863e: OUTPUT«60» | ||
JimmyZ | oh | 03:38 | |
TimToady | pugs: multi sub postfix:<!>(Int $n) { [*] 1..$n; }; say 60! | ||
p6eval | pugs: OUTPUT«8320987112741390144276341183223364380754172606361245952449277696409600000000000000» | ||
JimmyZ | rakudo: multi sub postfix:<!>(Int $n) { [*] 1..$n; }; say ~60! | ||
p6eval | rakudo e6863e: OUTPUT«8.32098711274139e+81» | ||
spinclad | rakudo: class PieceOfString { has Int $.length; } ; multi sub infix:<+>(PieceOfString $lhs, PieceOfString $rhs) { PieceOfString.new(:length($lhs.length + $rhs.length)); }; my $a = PieceOfString.new(:length(4)); my $b = PieceOfString.new(:length(6)); my $c = $a + $b; say $c.length | 03:39 | |
p6eval | rakudo e6863e: OUTPUT«No applicable candidates found to dispatch to for 'infix:<+>'. Available candidates are::(PieceOfString $lhs, PieceOfString $rhs)current instr.: 'infix:<+>' pc 415 (EVAL_1:0)» | ||
spinclad | [Coke]: i suspect the lengths should be added. | 03:40 | |
rakudo: class PieceOfString { has Int $.length; } ; multi sub infix:<`>(PieceOfString $lhs, PieceOfString $rhs) { PieceOfString.new(:length($lhs.length + $rhs.length)); }; my $a = PieceOfString.new(:length(4)); my $b = PieceOfString.new(:length(6)); my $c = $a ` $b; say $c.length | 03:41 | ||
p6eval | rakudo e6863e: OUTPUT«10» | ||
snarkyboojum | or use our? | 03:42 | |
rakudo: class PieceOfString { has Int $.length; } ; our multi sub infix:<+>(PieceOfString $lhs, PieceOfString $rhs) { PieceOfString.new(:length($lhs.length + $rhs.length)); }; my $a = PieceOfString.new(:length(4)); my $b = PieceOfString.new(:length(6)); my $c = $a + $b; say $c.length | |||
spinclad | [Coke]: (and one infix:<+> hides the other) | ||
p6eval | rakudo e6863e: OUTPUT«10» | ||
spinclad | ooh, yes, that's better. our++ | ||
(though it's still debatable whether 'adding' two bits of string is 'more like' addition or catenation-of-strings-of-characters) | 03:45 | ||
(it builds a nice bridge between operators) | 03:46 | ||
snarkyboojum | or tying :) | ||
sorear | quietfanatic: sounds like you're running into the metamodel fault line between perl6 and parrot | 03:47 | |
spinclad | snarkyboojum: alas, knot theory lies outside both arithmetic and lexicology | ||
snarkyboojum | :) | 03:48 | |
quietfanatic | sorear: I figured that was the issue, but I can't reproduce it i nsimpler code. | ||
snarkyboojum | the ⌘ infix operator :) | ||
sorear | "box" | 03:49 | |
snarkyboojum isn't fluent in unicode (yet) | |||
sorear | try .u | ||
sorear has finally figured out what mangle.pl is for | 03:50 | ||
spinclad | .u ⌘ | ||
phenny | U+2318 PLACE OF INTEREST SIGN (⌘) | ||
snarkyboojum | that won't do then :) | ||
spinclad | how about apple's command sign? except that only works on macs | 03:51 | |
.u knot | 03:53 | ||
phenny | spinclad: Sorry, no results for 'knot'. | ||
spinclad | unicode, what good are you? | 03:54 | |
.u trefoil | |||
phenny | spinclad: Sorry, no results for 'trefoil'. | ||
spinclad | .u square | ||
phenny | U+32CC SQUARE HG (㋌) | ||
sorear | spinclad: apple's command sign IS place of interest sign | ||
spinclad | .u granny | ||
phenny | spinclad: Sorry, no results for 'granny'. | ||
spinclad | sorear: thanks, i wondered | 03:55 | |
03:57
[mark] left
03:58
[mark] joined,
envi^home joined
|
|||
TimToady | .oO(Sweets for the sweet, and knots for the naughty...) |
04:00 | |
04:03
shade_ joined
04:05
shade_ left
04:06
shade_ joined,
alester left
04:08
shade_ is now known as {shade}
|
|||
sorear | TimToady: Do you know what's up with STD parsing of sigspace? | 04:09 | |
04:09
dju joined
|
|||
pugssvn | r30737 | sorear++ | [viv] Implement role translation | 04:18 | |
sorear | I love how prompt pugssvn is | ||
TimToady | I haven't looked at the sigspace problem yet, but might be related to using EXPR to parse regexes, since EXPR tosses whitespace between terms and infixes | 04:20 | |
sorear | in theory, STD::Regex::ws only matches the null string if %*RX<s> | ||
I've done a cursory look | 04:21 | ||
pugssvn | r30738 | lwall++ | [STD] don't accidentally use the same lexpad for different multis | ||
sorear | in VAST::package_def::emit_p5, what is the call to _AUTOLEXpeek for? | ||
TimToady | there was some hanky panky in gimme5 to load in termish before EXPR gets called, since EXPR doesn't have a peek routine, iirc | 04:24 | |
sorear is having this urge to refactor VAST::package_def::emit_p5 | |||
TimToady | it might be forced a different way now though, so possibly a fossil | ||
sorear | ok I'll throw it out | 04:25 | |
viv-STD.pmc won't work the first time anyway | |||
TimToady | not without something to feed the LTM generator | ||
sorear | oh sure | ||
TimToady | and VAST isn't quite the same as the ast that gimme5 uses anyway | ||
sorear | I'm going to implement /that/ real soon now | 04:26 | |
I mean more like... small bugs | |||
since I don't really have a way to test viv | |||
TimToady | I actually have code sitting around to try to switch gimme5 to using Data::Dumper instead of YAML::XS, but it turned out to be buggier than YAML | ||
sorear | ultimately I'd like to just use Storable | ||
TimToady | I just tested by translating little bits and seeing if they came out identical to gimme5's | 04:27 | |
sorear | perl5 has no trouble with 8-bit data in heredocs | ||
TimToady | well, ultimately I'd like to just ask the function object itself what it things :) | ||
but that sort of thing was too hair for p5 | |||
*hairy | 04:28 | ||
sorear | from a performance standpoint, how do slangs and LTM interact? | 04:30 | |
TimToady | at the moment it has to rederive any affected LTM tables every time you derive a new slang | ||
sorear has been running thought experiments on a regex -> C compiler | |||
TimToady | it does shortcut those categories that are not affected, however | ||
sorear | right; I wonder if things can be done better | 04:31 | |
TimToady | and just reuses the parent's LTM table on those | ||
I'm sure they can, I was just going for clean first | |||
FSDO clean | |||
in particular, the operator defs in CORE.setting actually produce deep recursion warnings currently | |||
because each def derives a new language | 04:32 | ||
sorear | what is the function of $lvl? | ||
TimToady | in viv? | ||
04:32
[circuitbreaker] is now known as synth
|
|||
TimToady | generally those will just be for indent levels on diagnostics | 04:33 | |
but they could also be used to manage a stack of contexts such as a highlighter would run off of. | 04:34 | ||
and, in fact, we do use it currently to examine contexts | 04:35 | ||
$context[$lvl] = $self in Base's emit_p5 | |||
sorear | oops. | 04:36 | |
I've been rewriting that stuff into contextuals | |||
or maybe that's a good thing? | 04:37 | ||
TimToady | hard to look at your grandparent contextual without CALLER::CALLER though | ||
04:37
jaldhar left
|
|||
TimToady | or even your parent, unless you store it before clobbering it | 04:37 | |
sorear hasn't used SUPER::emit_p5 | 04:38 | ||
TimToady | it's more useful in the un6 bits, where mostly you're just copying stuff over with tweaks | ||
sorear | yeah | 04:39 | |
04:43
alester joined
04:47
stephenlb left
|
|||
dalek | meta: r284 | diakopter++ | trunk/Sprixel/ (12 files): [perlesque] made all the tests pass again. I think. Also added new Assertion |
04:50 | |
sorear | my greatest annoyance with viv right now is that I can never remember if $self->{foo} is going to be VAST::foo or an array of VAST::foo | 04:53 | |
04:54
\shade\ left,
\shade\ joined
|
|||
dalek | meta: r285 | diakopter++ | trunk/Sprixel/ (2 files): [perlesque] sigh. remove debugging again. |
04:55 | |
diakopter | hm, now that parrot svn is off perl.org, dalek's polling interval could be safely reduced significantly | 04:59 | |
dalek | meta: r286 | diakopter++ | trunk/Sprixel/ (2 files): [perlesque] still more fix(es) |
05:00 | |
diakopter | [OT, slightly] are you *kidding* me?!? www.physorg.com/news193551675.html | 05:02 | |
phenny: tell pmurias after much travail, all tests successful again. | |||
phenny | diakopter: I'll pass that on when pmurias is around. | ||
05:04
xinming_ joined
05:06
Jedai left
05:07
plobsing joined,
xinming left
05:14
hercynium joined
|
|||
dalek | meta: r287 | diakopter++ | trunk/Sprixel/ (2 files): [perlesque] spello |
05:15 | |
pugssvn | r30739 | sorear++ | [viv] Implement parametric role translation | 05:17 | |
diakopter | goodness gracious | ||
sorear | ? | 05:18 | |
diakopter | at this rate emit_p5 will be done by July | ||
a few hundred months sooner than I could've done it | |||
05:25
\shade\ left
|
|||
diakopter | thinking about what to do next...(and dreading Cursor translation, manual or automatic), my heart tells me to jump right into making all the runtime system objects (non-user-visible, or at least non-user-extensible) for Perl 6.. in a naive, totally-unoptimized fashion, a la yapsi | 05:26 | |
urk | 05:27 | ||
05:28
kel_ joined
|
|||
diakopter | 'cept.. that wouldn't help the bootstrapping effort. | 05:33 | |
:'( | |||
:`( | 05:34 | ||
:,( | |||
sorear | in a few hours, I'll be out of town for 4-5 days (and away from 'net) | 05:47 | |
so... don't wait for me | |||
I'll make do with whatever's there when I get back | |||
05:50
kaare joined
05:51
kaare is now known as Guest84005
|
|||
sorear | TimToady: Can you explain the fields in a RE_ast tree? | 05:53 | |
method: a,i,r,s,dba,min,rest | |||
(name makes sense) | |||
sequence: a,i,r,s,dba,min,zyg | 05:54 | ||
ast: decl,min,pkg | |||
min seems to be 12345 a lot | 05:55 | ||
a,i,r,s seem to be the eponymous regex flags | 05:58 | ||
diakopter | dba is doing-business-as | ||
(as in, alias) | 05:59 | ||
06:12
alester left
06:13
uniejo joined
06:22
Su-Shee joined
|
|||
snarkyboojum | this is an utterly ridiculous way of testing colomon++s beautiful advent day17 mandlebrot post isn't it gist.github.com/408538 :) | 06:31 | |
06:33
iblechbot joined
|
|||
snarkyboojum | esp. considering that it takes over 50 seconds on my laptop to run that one test :P | 06:33 | |
m6locks | :< | 06:36 | |
pugssvn | r30740 | sorear++ | [viv] Add a framework for generating LTM ASTs | 06:43 | |
snarkyboojum | or there's this one which runs $height tests, e.g. 32, (instead of just one) gist.github.com/408545 | 06:44 | |
:) | |||
06:48
JimmyZ_ joined
06:49
JimmyZ left
|
|||
sorear | diakopter: finishing the regex compiler should be pretty smoppy at this point | 06:49 | |
06:49
JimmyZ_ is now known as JimmyZ
|
|||
TimToady | zyg is zygotes == kids, but sorts last :) | 06:49 | |
a,i,r,s are :i, :r, :s flags, yes | 06:50 | ||
sorear | STD parsing does not make :dba easy to access | 06:51 | |
TimToady | could just ->Str a higher node and parse | 06:54 | |
pugssvn | r30741 | snarkyboojum++ | [t/spec] Initial tests for Perl 6 Advent Calendar Day 17: Making Snowmen | 06:55 | |
TimToady | iirc, decl are like :my nodes | ||
and rest is usually random stuff to add on, like method args | 06:56 | ||
sorear | "is usually"? | 06:59 | |
moritz_ | good morning | ||
sorear | where is the code that interprets re_ast? | ||
hello moritz_ | |||
07:00
jaldhar joined
|
|||
snarkyboojum | moritz_ o/ | 07:01 | |
diakopter | sorear: finishing the regex compiler in csmeta you mean? or your work in viv? | ||
fell asleep during Mentalist. now for Fringe. | 07:02 | ||
sorear | diakopter: the one in viv | 07:04 | |
07:09
quester_ left
|
|||
lue | I bid you adieu | 07:10 | |
snarkyboojum | lue: adieu | 07:11 | |
pugssvn | r30742 | lwall++ | [Spec] :() is now always signature. Use foofix:[...] as the general op form | 07:15 | |
moritz_ | now that's some to and fro | 07:16 | |
didn't we have :{} first? :-) | |||
pugssvn | r30743 | lwall++ | [sub.t] switch to foofix:['op'] form from :() which is reserved for sigs now | 07:17 | |
07:18
am0c joined
|
|||
pugssvn | r30744 | lwall++ | [Cursor] now treat :() on name extension as a sig always | 07:21 | |
r30744 | [Cursor] don't introduce a stopper for circumfix until we're *in* the circumfix | |||
r30744 | (actually, don't set stopper there either, just use a $*GOAL) | |||
r30744 | [STD] stop correctly on goal that is set by a circumfix | |||
r30745 | snarkyboojum++ | [t/spec] Updated tests for Advent Calendar Day 17 to include the snowman operator and feedback from moritz_++ | |||
07:24
plobsing left
07:41
gfx joined,
szabgab left
07:42
szabgab joined
|
|||
sorear | TimToady: what's min in RE_ast? | 07:44 | |
diakopter | maybe the minimum number of chars the pattern must match? | 07:50 | |
(I don't know) | |||
07:52
Trashlord left
|
|||
sorear | diakopter: it shouldn't have 5 digits that way ... | 08:03 | |
08:04
agentzh left
08:08
JimmyZ_ joined
08:09
JimmyZ left,
JimmyZ_ is now known as JimmyZ
08:18
JimmyZ left
08:22
XaeroOne joined
08:30
ejs joined,
dakkar joined
08:32
am0c left
08:37
gfx left
08:40
proller left
08:41
proller joined
08:49
jaldhar left,
jaldhar joined
08:51
Sarten-X left
08:53
TiMBuS joined
08:56
BrowserUk joined
09:05
ejs left
09:06
ejs joined
09:14
_abs joined,
agentzh joined
09:18
_abs left
09:21
Sarten-X joined
|
|||
BrowserUk | ? | 09:24 | |
moritz_ | good morning BrowserUk | 09:26 | |
09:31
ejs left
09:36
ejs joined
09:40
lestrrat is now known as lest_away
|
|||
BrowserUk | Morning moritz. | 09:43 | |
09:44
araujo left
|
|||
moritz_ seeks spec clarification for the MAIN sub table in S06 | 09:53 | ||
the S06 table talks about spacey values | 09:54 | ||
but the system shell decomposes the argument string into array items (unless quoted) | |||
should the runtime support try to re-assemble them to support "spacey" values? | 09:55 | ||
or do we exepct the user to properly quote them? (I'd prefer that) | |||
BrowserUk | On Win, there's a system call to retrieve the raw command line if it helps? | 09:56 | |
moritz_ | BrowserUk: that's interesting to note | ||
BrowserUk | But it doesn't do wildcard expansions. | 09:57 | |
moritz_ | aye, I've put things like BEGIN { @ARGV = map glob, @ARGV if $^O eq 'Win32' } or so into some of my scripts | 09:59 | |
09:59
proller left
10:00
proller joined
|
|||
BrowserUk | There is a file (library of source I don;t remember) kicking around the P5 sources that if enabled at build time, gives perl wild-card expansion. I think Tye wrote it, but I don;t think it gets used much. | 10:01 | |
moritz_ | well, if it's a build option it's nothing I can rely on as a module author | ||
anyway, I'm pretty happy with the eval/die/warn/$@ changes in perl 5.13.1 | 10:02 | ||
BrowserUk | Agreed. (on both matters.) | 10:03 | |
That one change is (IMO) more significant than all of those in 5.12. (The yadda yadda thing doesn't really float my boat :) | 10:04 | ||
10:04
jaldhar left
|
|||
mathw | I think I need to see the changelog for 5.13.1 | 10:05 | |
moritz_ | well, the Unicode improvements in 5.12 were pretty neat | 10:06 | |
BrowserUk | Jenda has (or had) a module called G.pm that did tranparent wild card expansion on @ARGV also but it conflicted with -s, so I stopped using it (I like the simplicity of -s for quick scripts). | ||
moritz_ | but only relevant for you if you actually do Unicode text processing | ||
BrowserUk | I'm sure tehy were, but I have had to use Unicode on exactly 2 occasions in the last 8 years. And they were only for pulling stuff off the web. But I can t would be important to those that use it. | 10:08 | |
Eek. s/can t/can see/ (freudian!) | |||
Getting back to the SO6 thing, ... it's very hard to see how you would reconstruct spacey things without the user quoting them? | 10:11 | ||
10:14
jaldhar joined
10:15
agentzh left
|
|||
moritz_ | it would be mostly guessing | 10:17 | |
looking for unbalanced quote characters or so | |||
mathw | Oh that is nice. | 10:22 | |
mathw looks forward to Perl 5.14 now | |||
10:25
krakan_ joined
10:33
clintongormley joined
10:35
meppl joined
|
|||
BrowserUk | ruoso: I've been exploring the Erlang experience of adding SMP support on top of their green threads. They do run green threads inside each kernel thread. it also seems that they started out running socket IO in a separate IO scheduler (green threads inside a dedicated kernel thread), but then reverted to doing it inline (cooperatively). **Upshot** It looks like you are right to want to not use a dedicated IO kernel thread. (At least for sockets. I | 10:37 | |
haven't seen anything about file IO yet) | |||
10:48
renormalist left,
renormalist joined
10:54
yinyin left
10:56
ruoso left
10:59
pnate left
11:01
pnate joined
11:17
ejs left,
ejs joined
11:20
viklund joined
11:39
masonkramer left
11:40
merlin1978 joined
11:41
merlin1978 left
11:42
islandmyth joined
|
|||
islandmyth | hello | 11:42 | |
moritz_ | hi | 11:43 | |
islandmyth | <tag>some text here</tag> - i wanted to search and replace this tag with XXX . is it possible? | 11:44 | |
moritz_ | with Perl 6? | 11:45 | |
rakudo: say 'some text with <tag>some text here</tag>, really'.subst(/ '<tag>' .*? '</tag>'/, 'XXX', :g) | |||
p6eval | rakudo e6863e: OUTPUT«some text with XXX, really» | 11:46 | |
islandmyth | thank you | 11:47 | |
by the way can i use regular expression? | 11:48 | ||
moritz_ | the things inside /.../ is a regular expression | 11:49 | |
*thing | |||
11:50
XaeroOne left
|
|||
islandmyth | @moritz_ gracias | 11:53 | |
moritz_ | de rien | 11:54 | |
moritz_ has to learn Spanish at some point | |||
pmichaud | good morning, #perl6 | 11:59 | |
moritz_ | good morning, pmichaud | ||
hugme: reload | 12:00 | ||
hugme | moritz_: reloaded successfully | ||
moritz_ | hugme: add patrickas to process-cmd-args | 12:01 | |
hugme hugs patrickas. Welcome to process-cmd-args! | |||
pmichaud | exit | 12:02 | |
ww | |||
moritz_ | I'm pleased to announce that patrickas++ took up this week's challenge, and wrote some code to support the MAIN sub in Rakudo | 12:05 | |
it's in this repo for now: github.com/moritz/process-cmd-args (I forked so that I can use hugme to add contributors, in accordance to patrickas' wishes) | |||
12:06
[mark] left,
masak joined
|
|||
pmichaud | excellent. patrickas++ moritz_++ | 12:06 | |
masak | oh hai, #perl6 | ||
12:07
ejs left
|
|||
moritz_ | pmichaud: if you have any ideas for LHF to attract new contributors, dump them here or in misc/helpnow/README in the pugs repo | 12:07 | |
pmichaud | moritz_: will do | 12:08 | |
masak | moritz_: what are your observations about contributors so far? I've not been paying enough attention -- do different types of tasks attract different amounts of people? | ||
moritz_ | masak: yes. Web stuff (which doesn't require Perl 6) attracts more people :-) | 12:09 | |
masak | thought so. :) | ||
moritz_ | masak: we've had two takers for writing Perl 6 code/tests so far, patrickas++ and bubaflub++ | ||
masak | \o/ | ||
moritz_ | even if we don't gain any more contributors, having two is already great | 12:10 | |
masak | Web stuff doesn't have the Perl 6 learning curve attached to it. also, it's very visible and has a tight development loop. | ||
moritz_ | right | ||
we *really* should do that tryrakudo website | 12:11 | ||
12:11
jaldhar left
12:12
ejs joined
|
|||
moritz_ | but I'd like for persistent REPL before starting with it | 12:12 | |
s/<before 'for'>/to wait / | |||
12:13
fridim joined
12:14
patrickas joined
|
|||
patrickas | speaking of the devil :-) ola! | 12:14 | |
moritz_ | \o/ | 12:15 | |
pmichaud | unless my day gets more unpleasant surprises, I think I'll be able to have sorear++'s patches in today (for REPL) | ||
masak shivers in anticipation | 12:16 | ||
moritz_ has high hopes | |||
masak | it's be like Christmas in May. | ||
s/s/ll/ | |||
moritz_ | speaking of christmas in may, I'm please to read that Debian has enabled parallel execution of startup scripts by default | 12:18 | |
patrickas | what does the patch add? | 12:19 | |
moritz_ | you'll be able to say | ||
my $x = 3; | |||
say $x; | |||
on the interactive rakudo prompt | |||
previously all lexical variables were forgotten | |||
patrickas | so it remembers vars between lines whcih I guess it didn't ? | 12:20 | |
cool! | |||
moritz_ | (or rather went out of scope, not forgotten) | ||
right | |||
12:21
jaldhar joined
12:26
[Coke] left
12:28
araujo joined
12:29
[Coke] joined
12:33
JimmyZ joined
12:34
rv2733 joined
12:46
ejs left
|
|||
bbkr | rakudo: my $x = Inf; say ($x.Int / 1).WHAT; | 12:48 | |
p6eval | rakudo e6863e: OUTPUT«Rat()» | ||
12:49
ejs joined
12:53
fridim left
12:55
ejs left
|
|||
bbkr | what does "use MONKEY_TYPING;" do ? | 12:56 | |
JimmyZ | rakudo: augment | 12:57 | |
p6eval | rakudo e6863e: OUTPUT«Malformed augment at line 11, near ""current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
JimmyZ | bbkr: augment | ||
masak | bbkr: it allows you to modify the definition of classes after they've already been defined. | ||
12:57
_jaldhar joined
|
|||
masak | bbkr: en.wikipedia.org/wiki/Monkey_patch | 12:57 | |
bbkr | thanks :) | ||
12:58
jaldhar left
|
|||
masak | it's both very useful and quite frowned-upon, so it's been hidden behind a capital-letters pragma. | 12:58 | |
bbkr | rakudo: class Quill {}; my $a = Quill.new(); | 13:00 | |
p6eval | rakudo e6863e: OUTPUT«Confused at line 11, near "my $a = Qu"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
13:00
ejs joined
|
|||
masak | any leads on that one yet? | 13:00 | |
bbkr | rakudo: say '16'{'%x'} # checking if rt.perl.org/rt3/Ticket/Display.html?id=74112 is fixed | 13:02 | |
p6eval | rakudo e6863e: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Str'current instr.: '!postcircumfix:<{ }>' pc 14645 (src/builtins/Code.pir:20)» | ||
13:02
ruoso joined
|
|||
bbkr | looks like fixed, where tests for such case should go str or blocks-and-statements ? | 13:05 | |
13:06
JimmyZ left
|
|||
bbkr | rakudo: grammar G { regex foo { (\d+) <?{ $0.chars > 4 }> '!' | 13:08 | |
} }; say $_ ~~ /<G::foo>/ for '1234!', '123456!' | |||
p6eval | rakudo e6863e: OUTPUT«Malformed regex at line 11, near "foo { (\\d+"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
bbkr | rakudo: grammar G { regex foo { (\d+) <?{ $0.chars > 4 }> '!' } }; say $_ ~~ /<G::foo>/ for '1234!', '123456!' | ||
p6eval | rakudo e6863e: OUTPUT«regex assertion not terminated by angle bracket at line 11, near "::foo>/ fo"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
13:11
fridim joined,
JimmyZ joined
|
|||
dalek | kudo: c950dec | pmichaud++ | docs/spectest-progress.csv: spectest-progress.csv update: 448 files, 32347 (82.2% of 39356) pass, 0 fail |
13:13 | |
13:14
pmurias joined
13:15
ejs left
|
|||
ruoso | BrowserUk, So I think we're settling with the cooperative-coroutine-scheduler running in each kernel thread. I think the next step is thinking about the "shared values" infraestructure. I'm getting convinced the actor model can be implemented by an independent module. | 13:19 | |
13:20
islandmyth is now known as bobi
13:26
am0c joined,
am0c left
13:28
pmurias left
13:35
fridim left
13:47
bobi left
13:49
plobsing joined
13:52
sahadev joined
14:02
Guest84005 left
14:03
uniejo left,
am0c joined
14:04
am0c left
14:06
dual left
14:07
tlb joined
14:08
rv2733 left
14:09
gbacon joined
|
|||
ruoso | Proposed Perl 6 threading model twitpic.com/1poh13 | 14:11 | |
phenny, tell BrowserUk irclog.perlgeek.de/perl6/2010-05-21#i_2353688 | 14:13 | ||
phenny | ruoso: I'll pass that on when BrowserUk is around. | ||
JimmyZ | sign...I can't open it | 14:14 | |
masak | twitpic is petty-borgeoise and must be resisted! | ||
ruoso++ | |||
ruoso accepts suggestions on where to post the image | |||
will the list accept a 300K attachment/ | 14:15 | ||
? | |||
(or maybe the 34k svg file instead) | |||
14:24
jotr^afk is now known as jotr,
justatheory joined
|
|||
ruoso re-started the threading thread in another thread | 14:24 | ||
masak has blogged: use.perl.org/~masak/journal/40361 | 14:25 | ||
Su-Shee | ruoso: do you use thread-view for the thread about threads? | ||
ruoso | :) | ||
14:32
alester joined
|
|||
ruoso | JimmyZ, the image is now on the p6-l list also | 14:37 | |
14:39
iblechbot left
|
|||
JimmyZ | ruoso: thanks. I got it | 14:44 | |
14:51
Exodist_ left
|
|||
diakopter | "'Pro tip': when booking, check an extra time that chosen dates are actually correct." (masak) -- I gave away $400 to this last week. :[ | 14:54 | |
masak | something like that sum for me as well. | 14:55 | |
14:55
smash_ joined
|
|||
smash_ | hello everyone | 14:55 | |
masak | still, I greatly preferred that to remaining in Russia and facing the Visa Control Squad. | ||
diakopter | ruoso: did you see buk's msgs here 4.3 hours ago? | 14:57 | |
sorear: oh :) | 14:59 | ||
pmichaud | sorear: ping | 15:02 | |
15:04
jotr is now known as jotr^avk,
jotr^avk is now known as jotr^afk
15:05
diakopter sets mode: +oooo sorear smash_ masak JimmyZ,
diakopter sets mode: +oo ruoso Su-Shee
15:06
plobsing left
|
|||
diakopter | ruoso: how closely does your latest match the scheme outlined in that paper I linked [the one about scala] | 15:06 | |
15:06
orafu left
|
|||
ruoso | diakopter, yes... I saw... | 15:07 | |
15:07
orafu joined,
ejs joined
|
|||
ruoso | diakopter, about the paper, it's quite close, actually... | 15:07 | |
diakopter | <whew> that was my feeling | ||
I was hoping I wasn't having a wrong feeling | |||
oh goody; that'll be quite easy to implement on the CLR | 15:08 | ||
15:08
justatheory left
|
|||
dalek | kudo: f9c987e | moritz++ | t/spectest.data: run three more integration test files |
15:09 | |
15:10
justatheory joined
15:12
TiMBuS left
15:13
alanhaggai joined
15:14
alanhaggai left,
alanhaggai joined
|
|||
bbkr | rakudo: grammar G { token TOP { [ <single> | <pair> ]+ }; token single { . }; token pair { .. }; }; class A { method single ($/) { say "single" }; method pair ($/) { say "pair" };}; G.parse("kot", actions => A.new); # alternation '|' should get longest token matched. so why do i get single,single,single instead of pair,single ? | 15:14 | |
p6eval | rakudo c950de: OUTPUT«singlesinglesingle» | ||
moritz_ | bbkr: because longest token matching is NYI | 15:15 | |
bbkr | thanks | ||
moritz_ | bbkr: putting <pair> before <single> "helps" | ||
15:17
polettix joined
15:20
am0c joined
|
|||
moritz_ | quick question about S03:4057 | 15:27 | |
15:27
constant left
|
|||
moritz_ | it says "per operators are defined recursively on shaped arrays" | 15:27 | |
S09 uses "shaped arrays" as "predeclared with a certain structure/dimensionality" | 15:28 | ||
but the example that follows seems to indicate otherwise | |||
-« [[1, 2], 3] # [-«[1, 2], -«3] | |||
# == [[-1, -2], -3] | |||
rakudo: say [1, 2] ~~ Iterable | |||
p6eval | rakudo c950de: OUTPUT«1» | ||
masak | moritz_: maybe S03 doesn't mean 'shaped arrays' there, but something more like 'nested arrays'. | 15:29 | |
bbkr | std: / . || . | . /; | ||
p6eval | std 30745: OUTPUT«ok 00:01 114m» | ||
moritz_ | masak: probably | 15:30 | |
15:31
clintongormley left
|
|||
BrowserUk | Ruoso: You pic looks good, but limited. How do you handle for example: Matrix multiplication? Socket server? Genome matching (find all possible offsets; for each of thousands of short (25) sequences; fuzzy matching at least 15 positions; within 1 GB sequence)? I've more scenarios. I'd like to gather many more. | 15:36 | |
phenny | BrowserUk: 14:13Z <ruoso> tell BrowserUk irclog.perlgeek.de/perl6/2010-05-21#i_2353688 | ||
15:37
constant joined,
constant left,
constant joined
|
|||
masak | I'm not sure I understand the question "How do you handle matrix multiplication?" I can only assume that there is some threading challenge in that problem, or otherwise you wouldn't bring it up. but what, in more detail, is it? | 15:37 | |
sahadev | rakudo: my @a = 1, 2, 3; @a>>++; say @a.perl | 15:39 | |
p6eval | rakudo c950de: OUTPUT«[2, 3, 4]» | ||
ruoso | BrowserUk, mostly, it's much more explicit than I first thought... hyper operators, feeds, gather/take should be able to make it | 15:40 | |
diakopter | I blogd diakopter.blogspot.com/2010/05/perl...nable.html | ||
moritz_ | are there any 2-arg operators that modify in-place? | ||
15:41
[Coke] left
|
|||
arnsholt_ | moritz_: += et al I suppose | 15:41 | |
moritz_ | arnsholt_: right, thanks | ||
15:41
eternaleye left,
moritz_ sets mode: +oo arnsholt_ sahadev
|
|||
ruoso | rakudo: my @a = 1,2,3; my @b = 4,5,6; say join ', ', (@a >>*<< @b) | 15:41 | |
p6eval | rakudo c950de: OUTPUT«4, 10, 18» | 15:42 | |
ruoso | BrowserUk, the above could, theoretically, be run in parallel | ||
BrowserUk | ruoso: mat mult (and scaling) on large mats is very parallisable...but it requires partitoning & SMP (or GPUizing) for scalability. | ||
ruoso | since the hyper operator is a "threading hint" | ||
15:42
[Coke] joined
|
|||
moritz_ | and it requires proper aligning so that SSE can be used | 15:43 | |
ruoso | my bet is on the high-level of the operators | ||
masak | diakopter++ # nice post | ||
ruoso | >>*<< can be turned into anything, low-level speaking | ||
moritz_ | rakudo: my @a = 1, 2, 3; sub f(@b) { $_++ for @b }; say @b.perl | 15:44 | |
p6eval | rakudo c950de: OUTPUT«Symbol '@b' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
BrowserUk | It really just a "thread hinting" problem.... | ||
moritz_ | rakudo: my @a = 1, 2, 3; sub f(@b) { $_++ for @b }; f(@a); say @a.perl | ||
p6eval | rakudo c950de: OUTPUT«[2, 3, 4]» | ||
moritz_ | sahadev: this is how in-place unary hyper ops work right now | ||
polettix | moritz_: I'm curious about two changes in the perl6-examples, namely github.com/perl6/perl6-examples/bla...olettix.pl and github.com/perl6/perl6-examples/bla...olettix.pl | 15:47 | |
moritz_: the latter seems better imho | |||
moritz_: anyway thanks for both :) | |||
BrowserUk | Ruoso: See www.slideshare.net/pkpramit/matrix-...rogramming | 15:49 | |
moritz_ | polettix: int() got removed from the language | ||
polettix: so I removed it from the scripts to get it running again | |||
polettix | moritz_: yep, the thing is that the int() removal was done in two different ways but modifying basically the same thing | ||
15:49
JimmyZ left
|
|||
ruoso looking | 15:50 | ||
BrowserUk | Ruoso: Efficient (direct) shared memory + fast (user space) locking is required. | ||
moritz_ | rakudo: say 6 div 2.5 | ||
p6eval | rakudo c950de: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are::(Int $a, Int $b)current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
moritz_ | polettix: div works only with integers on both sides | ||
polettix: so I only took 'div' when I was sure that both sides actually are integers | 15:51 | ||
15:51
Trashlord joined
|
|||
polettix | moritz_: yep, we only have integers in both cases. Just curious anyway, both are valid solutions and... TIMTOWTDI :) | 15:52 | |
moritz_ | polettix: if it's only integers, I agree that 'div' looks better | ||
ruoso | BrowserUk, yes... as I said earlier, I don't think we should target remote processes (or even forks) in the core threading model... such extra functionality can be provided by modules | 15:53 | |
BrowserUk, so in the basic threading model, I think we just use process memory amongst threads.... | |||
sorear | pmichaud: pong, but make it quick - I'm leaving townin a few minutes | ||
pmichaud | sorear: I was just reviewing the lexical persistence branch. Many parts look good, but HLL::Compiler should not be manipulating PAST structures either | 15:54 | |
I'm cherry picking a few items into master and then will work on it a bit from there. | |||
BrowserUk | ruoso: I completely agree about remote processes and fork. (Did anything I've suggested indicate otherwise?) | ||
ruoso | nope... I was just making my agreement explicit ;) | ||
sorear | pmichaud: if the PAST isn't manipulated, PAST::Compiler throws a "lexical $whatever not found" error | 15:55 | |
pmichaud | I didn't say the PAST shouldn't be manipulated, just that HLL::Compiler shouldn't be doing it. | ||
BrowserUk | Ruoso: WHat I mean by "directly shared" is non-copying sharing. That is | ||
pmichaud | that should be handled by the individual compiler. | ||
sorear | Perl6::Compiler? | 15:56 | |
pmichaud | in the case of Perl6, yes. | ||
but it does that anyway, as part of eval() | |||
15:56
tlb left
|
|||
pmichaud | Perl6::Compiler already knows to look at the outer_ctx option and update its symbol table | 15:56 | |
BrowserUk | ... if you tried to scale a large matrix using a purely message passing model, copying and sharing reduces you to a snail-pace. | ||
ruoso | BrowserUk, yes... yes... the idea is that most data won't be seen between threads (i.e. the map closure doesn't use most of the variables in the current lexical scope), but the data that is seen, must be made thread-safe through locking | 15:57 | |
sorear | pmichaud: lexical-persistence-2 already goes somewhat in that direction | ||
pmichaud: the reason past is so heavily factored is so that compilers can write their own overrides | 15:58 | ||
pmichaud | sorear: sure, but there are simpler mechanisms to do this | ||
sorear | ? | ||
pmichaud | in general, I don't want HLL::Compiler doing past manipulations that a compiler writer has to know about | ||
BrowserUk | Therefore, for efficiency, you need to be able to have multiple kthreads operate concurrently upon difference slices of a single perl object (array of ints or array of reals) concurrently, without locking--because they are operating on different parts of the memory, so locking is redundant. | ||
pmichaud | it breaks encapsulation | ||
sorear | how about just removing method post from HLL::Compiler? | 15:59 | |
ruoso | BrowserUk, if the array is immutable, it doesn't require locking | ||
pmichaud | that's one step, yes. | ||
sorear | all the tools are there for a compiler writer to easily put together one of their own | ||
masak | has anyone ever gotten the error 'No result object' before during compilation to .pir? | ||
pmichaud | sure, but the thing is that past manipulations belong in HLL::Actions or HLL::Grammar, not HLL::Compiler | ||
if we're going to provide them for others to use | 16:00 | ||
16:00
dual joined
|
|||
pmichaud | in general, ::Compiler doesn't manipulate PAST -- that's what grammars and actions do. | 16:00 | |
BrowserUk | You cannot scale (multiple all elements by a value), if the array is immutable. | ||
sorear | ...didn't you reject the first version simply because it did past manipulations in Actions | ||
ruoso | BrowserUk, the source array, I mean | ||
pmichaud | no, because the past manipulations were specific to the interactive mode | 16:01 | |
not because they were in actions | |||
BrowserUk | Unless you're going to allocate and populate an new equal-sized matrix to hold the results and discard the original... | ||
TimToady | by default, arrays are mutable in Perl 6 | ||
that doesn't mean you couldn't have shaped immutable values though | 16:02 | ||
16:02
REPLeffect joined
|
|||
BrowserUk | and that is so costly as to be pointless using concurrency. Quicker to mutate a lexical array in place on one thread. (But then you loose th potential of 2/12/48/next year cores). | 16:02 | |
TimToady | but certainly @array »+=» 1 would be illiegal if @array were immutable | ||
*leg | 16:03 | ||
[Coke] now hears * in a valley girl accent all the time, btw. curse you all. | |||
masak | rakudo: "\e" | 16:04 | |
p6eval | rakudo c950de: OUTPUT«Unrecognized backslash sequence: '\e' at line 11, near "\""current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
masak | perl6: say "\e" | ||
p6eval | rakudo c950de: OUTPUT«Unrecognized backslash sequence: '\e' at line 11, near "\""current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
..elf 30745, pugs: OUTPUT«e» | |||
masak | std: "\e" | ||
p6eval | std 30745: OUTPUT«ok 00:01 114m» | ||
sorear | pmichaud: so, what if wrap_past and friends were moved to HLL::Actions, and post was removed? | ||
masak submits rakudobug | |||
TimToady | [Coke]: well, I married a valley girl, so it, like, stands to reason, and stuff. | ||
pmichaud | sorear: that might be better, yes. | ||
sorear | pmichaud: what would be better than that? | 16:05 | |
pmichaud | sorear: I need to play with it a bit. | ||
s/I/we/ | |||
anyway, I'll work on it a bit in master and cherry pick things from the branch, and we can go from there. | |||
TimToady | and all my kids are valley girls, except for the ones who are boys | 16:06 | |
pmichaud | I was a little surprised that NQP itself wasn't using lexical persistence in the branch yet | ||
ruoso | BrowserUk, TimToady, but the compiler could optimize "@array »+=» 1" very easily if @a is a compact array... | ||
pmichaud | oh, I guess it was | ||
moritz_ | masak: that one is already re-opened in RT | ||
masak: IIRC | |||
16:06
arnsholt_ is now known as arnsholt
|
|||
sorear | pmichaud: you're welcome to experiment; I won't be able to give feedback for a few days though | 16:06 | |
masak | oh, ok. | ||
pmichaud | but it was all buried in HLL::Compiler | ||
BrowserUk | Of course, it may be that GPGPU (or even SIMD instructions are quicker for MAT MULT than can be done with SMP ktrheading, but there are other tasks that have similar parallelisation requirements. (Partitoning of large datasets to run non-GPGPU-able, dientical algorithm in separate kthreads, directly on shread memory) | ||
pmichaud | sorear: I'll move it along a bit more and then I'll be happy to have you pick it up again when you have time | 16:07 | |
sorear | pmichaud: yes, I had this silly idea that "normal" compilers should get it for free | ||
pmichaud | sorear: it's a bit too free | ||
they should get it for free, but not at the cost of manipulating their PAST structures unexpectedly | |||
ruoso | BrowserUk, the compiler could even create subsets of the array with proxy variables that would access the data without locking... | 16:08 | |
pmichaud | it's too actiony-at-a-distance | ||
they should get it by following a relatively clean-ish api | |||
BrowserUk | Ruoso: The compiler probably "could", if it was GHC-like...but on-the-fly? | 16:09 | |
[Coke] | TimToady: aha! | ||
masak | moritz_: do you know which RT ticket mentions \e? I don't seem to be able to find it. | ||
ruoso | BrowserUk, I think so... | 16:10 | |
arnsholt | [Coke]: And now I want to listen to Frank Zappa, but he's not on Spotify, and all my vinyl is elsewhere. So curse you =p | 16:11 | |
sahadev | rakudo: my @a = 1, 2, 3, [4, 5]; for @a { $_++ unless $_ ~~ Iterable }; say @a.perl | ||
p6eval | rakudo c950de: OUTPUT«[2, 3, 4, [4, 5]]» | ||
sahadev | rakudo: my @a = 1, 2, 3, [4, 5]; for @a { unless $_ ~~ Iterable {$_++} }; say @a.perl | ||
p6eval | rakudo c950de: OUTPUT«[1, 2, 3, [4, 5]]» | ||
BrowserUk | Go has a 'mutable slice' type--which doesn't have real memory, but overlays with bounds, slices of an array type. I effect they are very similar to substr refs in Perl 5. It's a very powerful concept (ripe for stealing). I think D has them also. But the main point is that they are programmer constructions, not compiler magic. | ||
ruoso | Perl has too much polymorphism for that to be a programming construct... | 16:12 | |
it needs to be done as optimization | |||
BrowserUk | Nope. It cannot be done that way. | ||
TimToady | @array[1; *; 0..10] »+=« 1 will do such a slice | 16:13 | |
sorear | pmichaud: excellent | ||
masak | EALREADYWORKS | ||
sahadev | using unless (or if) as a non-modifier seems to make $_ lose its binding to the array element? | ||
BrowserUk | TimToady: That a programmer explicit slice? It knows its bounds? | ||
TimToady | building slices into the language such that they can do PDLish things is most of what S09 is about | ||
if you declared it with bounds, yes | 16:14 | ||
BrowserUk | Nice++ | ||
TimToady | see S09:178 | ||
BrowserUk off to read S09 | |||
16:16
sorear left
|
|||
TimToady | BrowserUk: but note that there are passages in S09 that are still somewhat speculative, and may not get into 6.0.0, or into Perl 6 ever | 16:17 | |
S09 has had several different authors... | 16:18 | ||
PerlJam | TimToady: you have to leave a little something for future generations to work out .. :) | ||
TimToady | and very little implementation to back up the notions | ||
16:18
BrowserUk left
16:20
polettix left
16:21
rgrau_ joined
|
|||
masak times out and submits the e bug anyway | 16:21 | ||
better having dups than holes in RT. | |||
[Coke] | masak: agreed. | 16:22 | |
masak | this one was brought to my attention by GGE, by the way. I'm trying to port it to Rakudo master. | ||
colomon | masak++ | 16:23 | |
masak | std: "\q" | 16:24 | |
TimToady | \e is supposed to produce an esc char | ||
p6eval | std 30745: OUTPUT«===SORRY!===Couldn't find terminator " at /tmp/ZM7AoEHnsf line 1 (EOF):------> "\q"⏏<EOL>Parse failedFAILED 00:01 111m» | ||
masak | TimToady: yes, and I used it as such in GGE. now it has regressed in Rakudo master, so I have to do \c[27] or chr(27) instead. | 16:25 | |
TimToady | std: "\q"hi" there" | ||
p6eval | std 30745: OUTPUT«===SORRY!===Confused at /tmp/dYCMxdbuLx line 1:------> "\q"h⏏i" there" expecting escapeParse failedFAILED 00:01 111m» | ||
TimToady | std: "\qq"hi" there" | ||
p6eval | std 30745: OUTPUT«===SORRY!===Confused at /tmp/4tSX5xnKgt line 1:------> "\qq"h⏏i" there" expecting escapeParse failedFAILED 00:01 111m» | ||
masak | std: "\g" | ||
p6eval | std 30745: OUTPUT«===SORRY!===Unrecognized backslash sequence: '\g' at /tmp/9s5c0WERiO line 1:------> "\g⏏"Check failedFAILED 00:01 111m» | ||
16:25
BrowserUk joined
|
|||
TimToady | std: '\qq"hi" there' | 16:25 | |
p6eval | std 30745: OUTPUT«ok 00:01 111m» | ||
BrowserUk | Grr. Bloody ISP :@ | 16:26 | |
TimToady | std: say "\c[" | ||
p6eval | std 30745: OUTPUT«===SORRY!===Unrecognized character name at /tmp/qYzciEJTyL line 1:------> say "\c[⏏"Unrecognized \c character at /tmp/qYzciEJTyL line 1:------> say "\c⏏["Check failedFAILED 00:01 111m» | ||
TimToady | right | ||
16:27
clintongormley joined
|
|||
masak | "Unable to find module 'GGE' in the @*INC directories." -- would it be a bad idea to list those directories? | 16:28 | |
(liek Perl 5 does) | |||
s/iek/ike/ | |||
16:28
justatheory left
|
|||
moritz_ | not bad at all | 16:30 | |
and easy to implement, I think | |||
masak | it would be SMA, IMO. | ||
pmichaud | might be a good challenge task | 16:31 | |
BrowserUk | TimToady: Can you take (and pass) a reference to a slice? (Or would you have to pass a ref to the array and the "bounds"?) | ||
moritz_ was just about to do it himself | |||
pmichaud | either ways works :) | ||
*way | |||
moritz_ | it's a good idea | ||
anyway, I disagree with calling exit() after the error message | 16:32 | ||
mberends++ did that to avoide the backtrace | |||
but it means that it's not easily catchable, for example if it happens in an eval() | |||
masak | *nod* | ||
moritz_ | or try { require ... } | ||
masak | the intent was noble, but the method isn't correct. | 16:33 | |
moritz_ | agreed | ||
masak | but for once, it was nice not to get one of those horrible stacktraces. mberends++ | ||
that shows how nice it could be, at some point in the future. | 16:34 | ||
PerlJam | for some reason I read "the internet was noble ..." | 16:37 | |
masak | if only :) | ||
moritz_ | rakudo: say pir::join('a', <b c d>) | 16:38 | |
p6eval | rakudo c950de: OUTPUT«bacad» | ||
PerlJam | wishful thinking perhaps | ||
16:40
cdarroch joined,
cdarroch left,
cdarroch joined
|
|||
TimToady | BrowserUk: the intent is to allow the possibility of slice refs, but perhaps not as the default semantics, but it's easy to apply an adverb to a subscript, just as you can to any other operator | 16:44 | |
afk & | |||
moritz_ | masak: do you prefer each @*INC entry on a new line? or rather delimited by quotes and joined by ', '? | ||
ruoso | @a := @b[0;*;1..10]; | ||
? | 16:45 | ||
moritz_ | or space delimited_ | ||
BrowserUk | ruoso: I assume that's meant to bind @a to the slice of the 3-dim array @b? | 16:46 | |
And yu can pass arrays to subs by reference in P6? | 16:47 | ||
masak | moritz_: I prefer space separated, like in Perl 5. | 16:48 | |
moritz_: '(@*INC contains: X Y Z)' | |||
BrowserUk | masak: what if the paths contain spaces? | 16:49 | |
masak checks what Perl 5 does about that | |||
ruoso | BrowserUk, it always goes as references... it's the signature that decides to take it as value | ||
16:49
patrickas left
|
|||
moritz_ | Unable to find module 'Foo' in the @*INC directories. | 16:50 | |
@*INC contains: '.', '/home/moritz/.perl6/lib', '/home/moritz/rakudo/parrot_install/lib/2.4.0-devel/languages/perl6/lib'. | |||
masak | Perl 5 doesn't distinguish between a space in a path and one between paths. | ||
moritz_ | that's my current patch, but easy enough to change to spaces | ||
masak | either works. | ||
but I kinda liked the parentheses of Perl 5. | |||
moritz_ | I thought maybe newlines (and indented two spaces or so) because newlines in pathes are rather rare | 16:51 | |
ruoso | rakudo: sub foo($a,$b;$c,$d) { say $a,$b,$c,$d }; foo((1,2),(3,4)) | ||
p6eval | rakudo f9c987: OUTPUT«Not enough positional parameters passed; got 2 but expected 4current instr.: 'foo' pc 204 (EVAL_1:-805598962)» | ||
16:51
aindilis` left
|
|||
masak | it's an idea, though pehaps that would make the error message rather long. | 16:52 | |
vertically, that is. | |||
ruoso | rakudo: sub foo($a,$b;$c,$d) { say $a,$b,$c,$d }; foo(1,2;3,4) | ||
p6eval | rakudo f9c987: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1696 (ext/nqp-rx/src/stage0/Regex-s0.pir:932)» | ||
masak stops bikeshedding | |||
moritz_++ | |||
BrowserUk trying to think through the implications of passing a bound reference to a slice of an array to another kthread? | |||
ruoso .oO( if you send different views of a bigger array to different threads, it means you don't need locking ? ) | 16:55 | ||
BrowserUk | So long as those views don't overlap, then there is no conflict. | 16:57 | |
masak | nom & | 16:58 | |
16:58
masak left
|
|||
BrowserUk | It's more complex if you have fat datastructures (as in perl). It means that you cannot safely change the nature (dimensions etc.) of the structure without locking. | 16:59 | |
17:01
ejs left
|
|||
[Coke] | any reason why autounfudge needs threads? | 17:02 | |
moritz_ | [Coke]: to run parallel | 17:03 | |
[Coke] | yes, but that's more of a nice to have, yes? | 17:04 | |
(presuming you have lots of free time.) | |||
moritz_ | well, I'm impatient, and my computer has two cores | ||
[Coke] | I will float a patch that allows 'no threads' and implies -j=1. | ||
moritz_ | wfm if parallel execution still works | 17:05 | |
17:06
iblechbot joined
|
|||
BrowserUk | The mat mult is a good (hard) test example, especially if you multiply in-place(eg: @a *= @b with appropriate >><< bits) of parallelisation because of the trade off between a threaded version of the naive algorithm versus the complexity of trying to paralellise the Strassens algorithm. (Even if in reality, it much quicker to just pass Mat Mult off to GPGPU or SIMD) | 17:09 | |
[Coke] | moritz_: ugh. PITA to remove. Ah well. I'll just let you run it. =-) | 17:11 | |
moritz_ | [Coke]: I do it regularly anyway | 17:12 | |
17:13
dakkar left
|
|||
moritz_ | and it's a PITA to run if your ulimit doesn't work :-) | 17:13 | |
dalek | kudo: 6a7ded6 | moritz++ | src/Perl6/Module/Loader.pm: Not finding a module throws an exception again. it very hard (if not impossible) to catch the error with a try { } block, or form within an eval. Also awesomeified the error message to include report contents of @*INC. |
17:15 | |
17:15
isBEKaml joined
17:26
justatheory joined
17:30
araujo left
17:31
araujo joined
|
|||
moritz_ | rakudo: my @a = 1, 2; say 1 xx @a | 17:33 | |
p6eval | rakudo f9c987: OUTPUT«1» | ||
moritz_ | weird, I've found a case where that loops infinitely | ||
17:35
pmurias joined,
smash_ left
17:36
graffiti joined
|
|||
graffiti | hello | 17:36 | |
moritz_ | hi | ||
\o/ I have working code for MAIN | 17:39 | ||
it's just not in Rakudo yet :-) | |||
colomon | moritz_++ | 17:40 | |
I'm assuming you mostly didn't write said code? :) | |||
pmichaud | back from lunch | ||
graffiti | ... | 17:46 | |
17:49
quietfanatic left,
pmurias left
|
|||
graffiti | i want to write something in perl | 17:51 | |
[Coke] | perl 5? perl 6? | 17:53 | |
graffiti | Perl5 | ||
PerlJam | graffiti: you want ot write something in Perl 5 that will help Perl 6? | 17:55 | |
s/ot/to/ | |||
graffiti: if you just want to write some Perl 5 and need help or resources, try #perl instead. | 17:56 | ||
18:04
pmurias joined
18:05
proller left
|
|||
pmurias | diakopter: is it possible to call a method with a dynamically determined name at runtime in the CLR? | 18:09 | |
phenny | pmurias: 05:02Z <diakopter> tell pmurias after much travail, all tests successful again. | ||
pmurias | like my $method_name='foo';$obj.$method_name(1,2,3); ? | 18:10 | |
diakopter: hi | 18:11 | ||
diakopter: see the new failing test | |||
18:14
graffiti left
|
|||
dalek | meta: r288 | pawelmurias++ | trunk/Sprixel/Main.cs: toggle a flag so the perlesque accepts user defined input |
18:14 | |
meta: r289 | pawelmurias++ | trunk/Sprixel/t/virtual.t: add a failing test for virtual methods |
|||
18:19
XaeroOne joined
18:20
circuitbreaker joined
18:22
synth left,
uniejo joined
18:23
_jaldhar left
18:25
XaeroOne left
|
|||
moritz_ | github.com/moritz/process-cmd-args now contains an example that actually calls a sub MAIN | 18:32 | |
next step: plug it into Rakudo | |||
moritz_ looks at alpha branch to find out how it was done there | |||
18:34
envi^home left
|
|||
moritz_ | differently :( | 18:36 | |
since it's now lexically scoped... | |||
we can't do the namespace-lookup anymore | |||
pmichaud | it can be done in the mainline code that rakudo generates, though. | 18:38 | |
moritz_ | aye, thought so | ||
I'll write a sub RUN_MAIN or so | |||
diakopter | pmurias: ok | ||
pmichaud | I think it could go directly in the PAST generation | ||
and we can easily look up lexically to see if &MAIN exists | 18:39 | ||
dalek | p-rx: def10fd | sorear++ | src/HLL/Compiler.pm: Write NQP replacements for eval and interactive |
||
p-rx: 528fb67 | sorear++ | src/HLL/Compiler.pm: Add the autoprint hook |
|||
p-rx: c4649e1 | pmichaud++ | src/HLL/Compiler.pm: Refactor outer_ctx handling a bit in HLL::Compiler. |
|||
p-rx: fca4ee1 | pmichaud++ | src/HLL/Compiler.pm: HLL::Compiler.eval() needs to pass its slurpy args to the code it evals. |
|||
diakopter | pmurias: to answer your question, sorta... | ||
pmichaud | actually, UNIT_START can do it. | 18:40 | |
diakopter | pmurias: if the dispatch method takes a params object[] | ||
pmurias: and each of the invocant's possible methods are string-compared | |||
pmurias: and if a match is found, casts are done to the params, and the method is invoked | |||
that way it's all "type safe" | 18:41 | ||
18:42
ash_ joined
|
|||
moritz_ | pmichaud: mind if I remove src/old from rakudo? | 18:42 | |
pmichaud | moritz_: +1 | ||
moritz_ | backporting stuff from alpha doesn't happen all that often anymore | ||
pmichaud | I agree. | ||
diakopter | pmurias: why do you ask | 18:43 | |
moritz_ | if nobody objects in the next few minutes I'll delete it | 18:44 | |
diakopter | pmurias: hopefully you'll want to write p6 methods as perlesque closures and not as clr methods | ||
pmurias: perlesque methods/classes are intended to be runtime classes/routines, not user-code (or setting-code) routines. | 18:47 | ||
18:48
circuitbreaker left
|
|||
diakopter | pmurias: where by "runtime" I mean all the supporting/scaffolding code | 18:50 | |
pmurias: another somewhat equivalent way to do the method lookup (but which doesn't avoid the casts) is to store the methods in an optimized-for-retrieval hash/dictionary, but for invocants with only a few methods, it may not be worth it. | 18:57 | ||
pmurias: re virtual.t - it's actually not a virtual call there. I assume you discovered it "works" if you mark $foo as a Bar (or leave off the type annotation entirely). | 19:02 | ||
19:02
rokoteko joined
|
|||
diakopter | pmurias: a cleaner way to do that is just to do this: | 19:02 | |
my $foo_as_bar = Bar.new(); $foo_as_bar.foo(); my Foo $bar = $foo; $bar.foo(); # DTRT | 19:04 | ||
er | 19:05 | ||
moritz_ | opinion question: most GNU tools allow switches/options after arguments | ||
diakopter | my $foo_as_bar = Bar.new(); $foo_as_bar.foo(); my Foo $bar = $foo_as_bar; $bar.foo(); # DTRT | ||
19:05
ShaneC joined
|
|||
moritz_ | S06 says that for the MAIN sub that's disallowed | 19:05 | |
19:05
ShaneC left
|
|||
moritz_ | ie more strict argument parsing | 19:05 | |
what would you prefer? | 19:06 | ||
diakopter | pmurias: do you see how that's a virtual call there in my example, but not how you wrote it in virtual.t ? | ||
19:07
stephenlb joined
|
|||
BrowserUk | moritz: maybe the restriction is to allow switches to the interpreter and switches to the script being run to coexist. | 19:11 | |
dalek | meta: r290 | diakopter++ | trunk/Sprixel/ (3 files): [perlesque] clarify semantics of casting and variable declaration, for virtual |
19:12 | |
rokoteko | so how did perl6 get rid of globs in a nutshell? | 19:17 | |
moritz_ | rokoteko: with clever ideas | 19:19 | |
was that sufficiently "in a nutshell" | |||
rokoteko | moritz_: you've got a briliantly tiny nut. | ||
19:19
colomon left
|
|||
moritz_ | there are actually multiple ways | 19:20 | |
one is the idea of having a "setting" | |||
which is an outer lexical scope to the program | |||
and contains all the built-ins | |||
another tools is "contextual" variables | |||
rokoteko | to the program as in the perl interpreter? | ||
moritz_ | which are passed along the call chain, and can be overridden in lexical scopes | ||
19:21
colomon joined
|
|||
moritz_ | builtins; { user code } | 19:21 | |
rokoteko | so is it really just a work-around that hides them? | ||
snarkyboojum | .'\] | ||
rokoteko | in builtins they still exist? lately, (sorry to distract from the perl6 topic), I learnt about Internals:: namespace in perl5 | 19:23 | |
19:24
BrowserUk left
|
|||
moritz_ | rokoteko: they are not globals | 19:25 | |
rokoteko: you can also run code outside the setting if you wish | 19:26 | ||
or in a different, self-written setting | |||
and you can lexically override them | |||
rokoteko | got a link that explains this? I could study it instead of bothering you. :) | ||
moritz_ | rokoteko: I think it's specified in either perlcabal.org/syn/S02.html or perlcabal.org/syn/S06.html | 19:27 | |
S02, search for SETTING | 19:28 | ||
rokoteko | hm. ok. I comment no more, before studying this. thanks a bunch! | ||
moritz_ | S06 discusses how you can run stuff in a different setting, search for MAIN | ||
diakopter | pmurias: o wait, I erred; ... fixing | 19:29 | |
moritz_ | rakudo: YOU_ARE_HERE(sub { say "hi"}) | 19:32 | |
p6eval | rakudo 6a7ded: OUTPUT«Could not find sub &YOU_ARE_HEREcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
19:33
rokoteko left
19:34
patrickas joined
|
|||
patrickas | hello | 19:37 | |
moritz_ | hi patrickas | 19:38 | |
patrickas: I've pushed a bit of stuff into the repo, including a new failing test | |||
patrickas | moritz_: I have a question about short options... how do I map -n to --long-name ? should that be another parameter added to process-cmd-args ? | ||
moritz_ | patrickas: I guess that iin the long run, process-cmd-args needs to know the names of all named parameters | ||
patrickas: and it can then decide if 'n' as a prefix is ambiguous or not | 19:39 | ||
dalek | p-rx: 3ad3114 | pmichaud++ | src/HLL/Compiler.pm: Improve autoprint so that it only outputs the result value if the |
19:40 | |
moritz_ | I also re-read the spec and found that named parameters which are declared as arrays need special treatment (ie slurp up all following arguments unless they are switches again) | ||
so we need more than just Bool anyway | 19:41 | ||
pmichaud | I' | ||
I've remarked in the past that S19 is self-inconsistent in these respects | |||
not sure where my comments are/went ... looking | |||
moritz_ | I'm talking about S06, not S19 | ||
pmichaud | oh, S06 also, since it's related | 19:42 | |
patrickas | I guess I'll start with the easy cases then. | ||
the skeleton should be able to handle arrays as is ... | |||
moritz_ | -- as separator should be easy to do | ||
I'm trying to figure out how to call MAIN automatically in Rakudo | 19:43 | ||
it's non-trivial | |||
pmichaud | I think it should be done from !UNIT_START | ||
patrickas | yes I noticed you added the tests ... I'll add a few tests too .. and if no one picks them up I suppose I can fix them myself on Sunday | 19:44 | |
moritz_ | pmichaud: how can !UNIT_START inspect the lexpad of mainline? | ||
diakopter | pmurias: fixed :) | ||
pmichaud | moritz_: it can call mainline, then grab its context and look to see if there's a &MAIN in it | ||
for that matter, it could look at the lexinfo of the sub prior to ever calling the mainline | 19:45 | ||
moritz_ | that only works for determining if there's a MAIN | ||
pmichaud | true | ||
moritz_ | calling it is the hard part | ||
pmichaud | but the first version (grab the context) would also give you the &MAIN sub to be invoked | 19:46 | |
since it'll be stored in the lexpad | |||
moritz_ | ok, how do I grab the context of a function that already exited? | ||
pmichaud | it's an attribute of the Sub PMC | ||
moritz_ | ok | ||
pmichaud | (unless it got cloned somewhere, which is entirely possible.) | 19:47 | |
....but not in this case, I don't think. | |||
moritz_ | I'll try | ||
pmichaud | it's also possible that we'll have the mainline code store its context in a dynamic var somewhere | ||
that seems a bit more likely. | |||
then UNIT_START could just run the mainline and get the context from the dynamic var | 19:48 | ||
19:48
snarkyboojum left
|
|||
moritz_ | dynamic? I thought that's reset when mainline exits? | 19:49 | |
pmichaud | not if the dynamic var is outside of the mainline's context | ||
moritz_ | ah | ||
pmichaud | dynamic, not temp | ||
e.g., $*MAINLINE_CTX | |||
moritz_ | I'll try getting the context first | ||
pmichaud | or perhaps $*COMPUNIT_CTX | 19:50 | |
right now I'm trying to figure out a good way to flag a block/sub as being the one that represents the compunit | 19:51 | ||
dalek | meta: r291 | diakopter++ | trunk/Sprixel/ (3 files): [perlesque] make every perlesque method "override" and make every invocation |
||
pmichaud | I guess a special :subid() seems most likely. | 19:52 | |
19:52
k23z__ joined
|
|||
k23z__ | any way to see where sorear is and when he was last time here ? | 19:53 | |
!seen sorear | |||
ah yes | |||
pmichaud | he was here about 3 hours ago | ||
moritz_ | k23z__: check the IRC logs | ||
k23z__ | ok | 19:54 | |
moritz_ | get_attr_str() not implemented in class 'Sub' | 19:59 | |
so a simple getattribute isn't enough to obtain the context | |||
moritz_ continues his research into parrot land | 20:00 | ||
pmichaud | hmmmm | ||
Parrot might not be exposing the ctx at the moment | 20:01 | ||
do we have a way yet for a comp unit to know if it's the mainline? | |||
I think we do. | |||
perhaps related to YOU_ARE_HERE | |||
no, that doesn't appear to be it | 20:03 | ||
hrm. | |||
moritz_ | YOU_ARE_HERE is for everything that's executed in the context of the setting | 20:05 | |
pmichaud | that doesn't quite make sense to me yet, but I need to review what's happened there | 20:06 | |
I need to focus on REPL a bit...will come back to MAIN a bit later | 20:08 | ||
moritz_ | sure | ||
pmichaud | the two have very similar issues involved, however. | ||
patrickas | moritz_: --name "spacey value" :namexAB'spacey value'xBB even if not declared bool ? | 20:12 | |
I would have guessed it would be the same as : --name non-spacey-value | 20:13 | ||
moritz_ | patrickas: me too. I don't understand that part of the spec... | 20:14 | |
patrickas | I'll skip testing this part then | ||
moritz_ | patrickas: except that there are some OS (win32) where you can actually get the command line string before it's broken up into an array | ||
pmichaud | my comments about S19 are at irclog.perlgeek.de/perl6/2009-11-02#i_1675622 | 20:17 | |
patrickas | I also don't understand some notations .... | ||
what is the difference between this :namexAB'spacey value'xBB | |||
and this :namexABval1 'val 2' etcxBB | |||
the first means a hash with a key name and a value the string 'spacey value' | 20:18 | ||
but what about the second ? | |||
moritz_ | it's a three-item list | ||
patrickas | ok | 20:19 | |
moritz_ | ie name => ("val1", "'val2'", "val3") | ||
patrickas | obvious now that you explain it :-) | ||
moritz_ | oh wait | 20:20 | |
probably without quotes around val2 | 20:21 | ||
rakudo: say «val1 'val2' val3».perl # probably wrong, because «...» is mostly NYI | |||
p6eval | rakudo 6a7ded: OUTPUT«("val1", "'val2'", "val3")» | ||
pmichaud | alpha: say «val1 'val2' val3».perl | 20:22 | |
p6eval | alpha 30e0ed: OUTPUT«["val1", "val2", "val3"]» | ||
moritz_ is in favour of disallowing multi MAIN | 20:24 | ||
you can't generate reliable, comprehensible usage messages if you allow it | |||
20:25
thepler joined
|
|||
patrickas | The syntax for specifying array arguments would be: process-cmd-args(@args, {name=>'Array'}) | 20:27 | |
TimToady | me, I'd just poke a conditional call to MAIN at the end of the mainline when I compile it... | ||
pmichaud | "conditional call"? | 20:28 | |
moritz_ | patrickas: I'd pass the type object as value | ||
patrickas: ie name => Array, name2 => Bool etc. | |||
pmichaud | I'd probably introspect the signature and use it | 20:29 | |
moritz_ | that's what I do right now | ||
TimToady | S06:3055 lists the conditions | ||
moritz_ | github.com/moritz/process-cmd-args/...md-args.p6 | 20:30 | |
I don't know if we have knowledge of a) in rakudo at compile time | |||
pmichaud | it has to be a runtime selection, I think | 20:31 | |
but no, in the general case we don't yet know (a) at compile time in Rakudo | |||
TimToady | you don't need the info at compile time | 20:32 | |
that's why you wrap the call in a conditional! | 20:33 | ||
pmichaud | more to the point, we don't have a reliable condition to test at the moment | ||
TimToady | a contextual set up by the start code would be appropriate, methinks | 20:34 | |
pmichaud | *which* start code is the problem. | ||
especially if we're doing pre-compiled modules | |||
TimToady | the one that knows it's starting the mainline | ||
pmichaud | for a precompiled module, there's not something that "starts the mainline" | 20:35 | |
at least, not in Parrot | |||
TimToady stares at pmichaud :) | |||
moritz_ knows that kind of stares | 20:36 | ||
patrickas shivers | |||
TimToady also thinks people who can't introspect multis and come up with a decent usage message are somehow defective :) | 20:37 | ||
moritz_ | thanks :-) | ||
TimToady stares at moritz_ | |||
moritz_ | for certain values of "decent" I could manage that | 20:38 | |
pmichaud | I mean, sure, we can do something like "if $*YOU_ARE_MAINLINE { MAIN(...); } | ||
moritz_ | but probably not for decent eq awesome | ||
pmichaud | but the hard part in Rakudo is being able to reliably set $*YOU_ARE_MAINLINE | ||
TimToady | It's a lofty goal to strive for, I'm sure :) | ||
pmichaud | because for precompilation, every module thinks it's potentially the mainline | ||
moritz_ | "your command line arguments are wrong" # decent? | 20:39 | |
TimToady | I suspect we can do a bit better | ||
you can at least list the candidates like jnthn++ does | |||
moritz_ | and show the user Perl 6 code when there's a constraint on an argument? | 20:40 | |
TimToady | eventually someone will write the p6 shell, and then everyone will be happy. :) | 20:42 | |
20:42
_buno_ joined
|
|||
TimToady | if CALLER eqv SETTING { MAIN(...) } | 20:44 | |
hmm, maybe === instead | |||
pmichaud | does the caller have to be the setting? | ||
TimToady | or some such | ||
pmichaud | or is it just that the setting is the outer context? | ||
TimToady | for the outer scope of the mainline code? | ||
pmichaud | yeah | ||
TimToady | hmm | 20:45 | |
pmichaud | in our case, the setting isn't always the caller | ||
(it's an outer context, yes, but not necessarily the direct caller) | |||
TimToady | well, caller === some kind of you-are-here thing | ||
20:46
polettix joined
|
|||
TimToady | I can't believe that this is impossible to know somehow... :) | 20:46 | |
pmichaud | oh, I don't think it's impossible | ||
I just haven't stumbled on the appropriate magic yet | |||
20:46
polettix left
20:47
uniejo left
20:48
wasy_ joined
20:49
wasy_ left
|
|||
TimToady | my point was that you don't necessarily have to turn the lexical scope inside out, is all. | 20:49 | |
pmichaud | right, I'm not thinking of anything like that | ||
TimToady | well, that's what the UNIT_START stuff was sounding like to me | ||
pmichaud | UNIT_START is essentially some glue that says "okay, some module got here, I have to figure out how to execute its mainline" | 20:50 | |
if we do "use Test" (which in turn loads Test.pbc) .... something has to cause the mainline code of Test.pbc to be invoked properly | 20:51 | ||
TimToady | sure, just stirring the pot... | ||
didn't want it to burn :) | |||
pmichaud | we can't just mark the mainline code with a :load flag, because then the mainline executes before any of its nested init/check/etc blocks | ||
20:51
_buno_ left
|
|||
pmichaud | we can't put the mainline code at the end, because Parrot requires lexically nested blocks to come after the block they're nested in | 20:52 | |
patrickas | rakudo: my %h={'t'=>Bool}; say 'truthy' if %h{'t'}; | ||
p6eval | rakudo 6a7ded: ( no output ) | ||
pmichaud | so, we put it at the beginning, and have a :load sub at the end that calls UNIT_START and passes the mainline as an argument | ||
UNIT_START takes care of setting an appropriate outer context, invoking the mainline, and returning the result | 20:53 | ||
(passing command line arguments if there are any, etc.) | 20:54 | ||
patrickas | pugs: my %h={'t'=>Bool}; say 'truthy' if %h{'t'}; | ||
p6eval | pugs: ( no output ) | ||
patrickas | bug ? | ||
pmichaud | type objects are undefined (and hence "false") | 20:55 | |
%h{'t'} is a type object | |||
so no, not a bug | |||
patrickas | I guess that makes sense ... but I did not expect it to be that way. | 20:57 | |
20:57
quietfanatic joined
|
|||
moritz_ | %h.exists{'t'} | 20:57 | |
ash_ | pugs: say Bool.defined | ||
p6eval | pugs: OUTPUT«» | ||
moritz_ | or $h<t> ~~ Bool | ||
ash_ | i think the smart match is probably the functionality you wanted | 20:58 | |
pugs: my %h={'t'=>Bool::False}; say 'truthy' if %h<t> ~~ Bool; | |||
p6eval | pugs: OUTPUT«truthy» | ||
pmichaud | moritz_: I'm guessing we'll likely have a dynamic var that indicates a given block is to act as mainline code | 20:59 | |
pmurias | diakopter: re perlesque closures vs runtime closures what do you mean? | ||
pmichaud | so we'll have something like if $*YOU_ARE_MAIN { Main() } added to the code generation whenever Main is defined in the compilation unit | ||
er, &MAIN | |||
patrickas | moritz_: I added a bunch of tests, most of which are failing, even ones that were passing are now failing (because I used {'t'=>Bool} instead of {'t'=>'Bool'} ) | 21:00 | |
I guess that's good since it gives people and easy way to start fixing :-) | |||
pmichaud | afk, walk to think about repl and main | 21:01 | |
21:04
BrowserUk joined
|
|||
diakopter | pmurias: I mean that you shouldn't plan to make a 1:1 between p6 classes/objects and clr classes/objects | 21:05 | |
pmurias: make another layer of object system | |||
moritz_ | patrickas: I disagree - fixing code requires deeper understanding than extending | ||
diakopter | with its entirely own dispatch/resolution | ||
pmurias | why? | 21:06 | |
diakopter | pmurias: b/c it needs its own dispatch/resolution | ||
21:06
alester left
|
|||
pmurias | diakopter: will the continuations work with the perlesque methods | 21:07 | |
diakopter | pmurias: explain? | 21:08 | |
patrickas | moritz_ you're probably right ... my impression is tainted by the fact that I know the commit that messed it up contains a single change ... I guess I'll fix that one myself then. | 21:09 | |
pmurias | class Foo {method foo() {# can i save the continuation here?}};my $foo = Foo.new;$foo.foo(); | ||
diakopter | you can save the continuation, but what will you do with it? you have to have something to "catch" it | ||
pmurias | "catch"? | 21:10 | |
21:10
ruoso left
|
|||
patrickas | I'll also add the first negation case cause it seems easy as it does not require a "looks Truethy but false" situation. | 21:10 | |
diakopter | pmurias: yes, a continuation is a typed object just like everything else. you'll need to store it someplace. a closure is a good spot. | 21:11 | |
and you need something that knows how to execute it | |||
moritz_ | patrickas: we should also re-name the hash passed to process-cmd-args, since it's now not only the boolean named | 21:12 | |
patrickas | %special-names ? | ||
pmurias | diakopter: i can store a continuation in a variable | ||
moritz_ | %named-params or %typed-named or so | ||
or just %named | |||
diakopter | pmurias: yes. | 21:13 | |
but it's difficult to know its type beforehand, so you'd have to do something like this: | |||
pmurias | diakopter: show an example of what do you mean by a continuation type | 21:14 | |
moritz_ | patrickas: I've updated the support code at the end of the file to actually pass the types along | 21:15 | |
pmurias | as i can imagine it being something other than Continuation | ||
s/can/can't | |||
diakopter | yes, it's parametric on the signature of the routine it would return to | 21:16 | |
<still writing an example> | |||
pmurias waits patiently | 21:17 | ||
21:21
gbacon left
|
|||
quietfanatic | rakudo: say (multi say (Int $x) {...}).candidates | 21:23 | |
p6eval | rakudo 6a7ded: OUTPUT«saysay» | ||
quietfanatic | I'd go in and make a patch to fix this bug but Rakudo's internals are too scary. | ||
diakopter | perlesquel: sub a(-->int) { say(frame); return 1}; a(); | 21:24 | |
p6eval | perlesquel: OUTPUT«Sprixel.Framereal 0.04user 0.02sys 0.00» | ||
moritz_ | quietfanatic: I've recently patched something which I thought was quite scary, and it turned ot not to be scary at all | ||
diakopter | pmurias: hunh. I guess it is the base type (Sprixel.Frame) | ||
oh, I see | |||
moritz_ | quietfanatic: and then I've worked on something which looked quite straight forward, and turns out to be scary :/ | ||
diakopter | pmurias: the type of the continuation frame will be enforced when the frame "returns" | 21:25 | |
21:25
justatheory left
|
|||
diakopter | pmurias: (when it is casted to the interface that represents its return value) | 21:25 | |
pmurias: (sorry for the diversion into sprixel internals) | |||
pmurias: it should "just work". You can write your own "call/cc" now | |||
quietfanatic | I'm guessing it's the ".sub 'new'" section of src/builtins/Code.pir | 21:26 | |
no maybe not | |||
21:27
Su-Shee left
|
|||
moritz_ guesses method routine_def($/) in src/Perl6/Actions.pm | 21:28 | ||
that new method seems to return the candidate, not the multi | |||
specifically lines 1041 and onwards (of Actions.pm) | 21:30 | ||
quietfanatic | Yeah I found that...but I have no clue how Actions.pm works | 21:31 | |
jnthn | I'm not sure how best to fix that issue. | ||
moritz_ | shouldn't it be as simple as having one variable containing the PAST for the current candidate | 21:32 | |
jnthn | Probably does need a change in routine_def though. | ||
moritz_ | and then emit PAST node that first does whatever it does now, and then returns that candidate? | 21:33 | |
jnthn | moritz_: Don't think it wants an extra variable really...the other problem is that the thingy that installs all the candidates isn't necesarily in the same block as the candidate itself. | ||
21:33
justatheory joined
|
|||
jnthn | But yes, changing what routine_def will "make" is the right answer. | 21:33 | |
moritz_ | and luckily it's "just" 102 lines long :-) | 21:34 | |
jnthn | EMORETHANDALMATIANS | ||
moritz_ | lol | 21:35 | |
pmichaud | won't routine_def continue to make PAST for a wrapper object? | ||
(and calls to code to install the wrapper into the appropriate multi?) | |||
jnthn | pmichaud: Well, at the moemnt it makes a node that looks it up. | ||
oh heh | |||
dalek | meta: r292 | diakopter++ | trunk/Sprixel/src/Perlesque/Terminals.cs: [perlesque] change frame keyword to _cc so it doesn't conflict with sensitive) |
21:36 | |
patrickas | moritz_: starting seeing some strange is() and is_deeply() nehaviour! | ||
jnthn | I wonder what happens if we toss that code and let the code that handles anonymous subs always return whatever it would. | ||
patrickas | rakudo: use Test; sub p() {my (@a ,%h);@a = ();%h = {}; return @a, %h; }; plan *; is( p() , ( [] , {} ) ); done_testing; | ||
p6eval | rakudo 6a7ded: OUTPUT«not ok 1 - # got: ([], {})# expected: ([], {})1..1# Looks like you failed 1 tests of 1» | ||
jnthn | (Which would be the specific candidate.) | ||
pmichaud | right | ||
moritz_ | patrickas: yeah, it's fragile :( | ||
patrickas | the got and expected seem the same to me ... but the tests are failing anyway .. same thing is happening for is_deeply | ||
jnthn | (fixing bugs by deleting code)++ ;-) | ||
I'm tired to the point that I don't trust myself to do any code tonight. But I have a pretty free weekend. Or someone else feel free to beat me to it. :-) | 21:38 | ||
diakopter | pmurias: I'll work on that... and get back to you. | ||
quietfanatic | does the make $past statement determine what it returns? | ||
moritz_ | yes | 21:39 | |
quietfanatic | oh (just read above) never mind, I see. | ||
patrickas | moritz_: Could that be the Weekly challenge number 4 ? | ||
fix is_deeply :-) | |||
or at least make it less broken | 21:40 | ||
quietfanatic | I'm guessing it's this "$past := PAST::Var.new( :name($name) );" | ||
jnthn | quietfanatic: Yup, that's the thingy. | ||
(the wrong thingy) | |||
moritz_ | patrickas: I guess it's more involved... probably is_deeply is right, and everything else is wrong | ||
quietfanatic | that's making it the wrong return value | ||
moritz_ | jnthn: I'm compling now without that line... built Test.pir | ||
jnthn | moritz_: It's probably not quite that simple. | 21:41 | |
Well | |||
Maybe it is | |||
:-) | |||
patrickas | oh ok :-( too bad | ||
moritz_ | patrickas: [] and () don't return objects of the same kind, but .perl sometimes produces identical output | ||
jnthn: it's not | |||
jnthn didn't check out the code, it just feels too simple | |||
moritz_ | patrickas: we have what feels like a dozen listy types, and .perl only produces two different kinds | 21:42 | |
() and [] | |||
patrickas | moritz_ I figured about [] and () being different ... but [] was even worse :-) | ||
pmurias | diakopter: when i invoke a continuation why should it's return type matter? | ||
patrickas | rakudo: use Test; sub p() {my (@a ,%h);@a = [];%h = {}; return @a, %h; }; plan *; is( p() , ( [] , {} ) ); done_testing; | ||
21:42
sahadev left
|
|||
p6eval | rakudo 6a7ded: OUTPUT«ok 1 - 1..1» | 21:42 | |
moritz_ | rakudo: say <a b c>.WHAT; say (1, 2).WHAT; sub f { return 1, 2 }; say f().WHAT | 21:43 | |
p6eval | rakudo 6a7ded: OUTPUT«Parcel()Parcel()Parcel()» | ||
patrickas | Who! I am getting a different output here ! time to pull again :-) | ||
jnthn | moritz_: | ||
$past := create_code_object($past, 'Sub', $multi_flag, $sig_setup_block); | |||
On that line try | |||
my $final_result := $past := create_code_object($past, 'Sub', $multi_flag, $sig_setup_block); | |||
diakopter | pmurias: you're right; it doesn't. | ||
jnthn | And change $past := PAST::Var.new( :name($name) ); to make $final_result; | 21:44 | |
(or another equivalent neater change) | |||
That may do it. | |||
diakopter | pmurias: but it does throw away the entire intermediary stack(s) branched from when the continuation was saved. | ||
moritz_ | jnthn: I'm not quite following you, and I'm quite tired too... so maybe it's better to leave it for tomorrow :-) | 21:45 | |
jnthn | moritz_: :-) | ||
pmurias | diakopter: continuations shouldn't do that | ||
quietfanatic | I could try that I suppose. | ||
diakopter | pmurias: what do you mean; explain? | ||
moritz_ | bed& | 21:46 | |
jnthn | night o/ | ||
moritz_ | \o | ||
patrickas | good ight | ||
pmurias | what do you mean by throwing away the intermediary stack? | ||
diakopter | the stack created/initiated by the call/cc | 21:47 | |
invocation | |||
pmurias | invoking a continuation sets the stack to the state when the continuation was saved | 21:48 | |
diakopter | I know; I thought that's what I said; sorry if I was confusing. | 21:49 | |
pmurias | look at en.wikipedia.org/wiki/Delimited_continuation for continuations which only save part of the stack | ||
re layering the object system it's very important to avoid adding an extra layer over object system if we want decent performance | 21:50 | ||
diakopter | that's absolutely not possible | ||
pmurias | what are the problems? | 21:51 | |
diakopter | it's possible for an optimizing compiler, yes | ||
pmurias | that's what i'm interested in | ||
diakopter | well then of course it's possible. I'm not writing an optimizing compiler anytime soon. | 21:52 | |
but for Perl 6 code as input, the only way I see any kind of success path for the foreseeable few years is to follow the similar path of Rakudo | |||
pmurias | the path being? | 21:53 | |
diakopter | afaict, lots of dispatches, lots of overload resolutions | ||
for every operation | |||
pmurias | writing an optimizing compiler is more fun | 21:54 | |
diakopter | I still foresee very large performance advantages over parrot, simply because the primitives in those resolution/dispatch methods can be much lower-level | ||
21:55
Targhan joined
|
|||
pmurias | than emitting naive code and jumping through hops to make it run acceptably | 21:55 | |
diakopter | I'm sure it will be, several years down the road... | 21:56 | |
:P | |||
(for me) | |||
quietfanatic | jnthn: I made the changes you mentioned but it doesn't seem to act any different. | 21:57 | |
jnthn | Hmm. :-/ | 21:58 | |
22:00
cdarroch left
22:04
iblechbot left
|
|||
pmurias | diakopter: re the question i asked you about methods with unknown name is there a fast way to do it if i know the method signature in advance? | 22:06 | |
quietfanatic | Is there a way to insert a debugging message into Actions.pm? | ||
diakopter | pmurias: when is "in advance"? | 22:07 | |
pmichaud | quietfanatic: { pir::say('debug'); } | ||
jnthn | quietfanatic: pir::say("# some message ") | ||
pmichaud | oh, curlies aren't needed in Actions.pm | ||
I was thinking in Grammar.pm :-) | 22:08 | ||
one can also do: pir::printerr("# some message \n"); | |||
quietfanatic | ah I see. It didn't like plain say() | ||
pmichaud | right, because then it tries to use the say() in your runtime | ||
and your runtime might not be fully available yet | |||
diakopter | pmurias: I've gtg | 22:09 | |
pmurias | all methods will be P6object method_name(P6object capture) {...} | ||
diakopter: ok, see you tommorow | |||
diakopter | pmurias: in that case, it's simpler, yes, because no casting is needed | 22:10 | |
but string comparisons still need done | |||
pmichaud | anyway, pir::printerr("message\n"); is nice because if you're doing --target=pir or later the debug messages aren't in the midst of the thing trying to be compiled :) | ||
diakopter | if you can convert the method stringnames at compiletime to an array, those indexes can be emitted as a jumptable, and the switch/case will be much more efficient | ||
pmurias: afk& | 22:11 | ||
quietfanatic | Does NQP support return? | 22:12 | |
pmichaud | of a single value, yes | 22:13 | |
quietfanatic | how about of no values? | ||
pmichaud | no | ||
quietfanatic | jus tto exit the sub? | ||
pmichaud | need to do at least return 0 or something like that | ||
quietfanatic | Ah huh. That may explain it. | ||
pmichaud | return is implemented as a prefix listop | ||
(because nqp doesn't have listops) | |||
quietfanatic | I seems to ignore a bare return; | ||
pmichaud | hmmmm, should at least get some sort of error | 22:14 | |
sjohnson | diakopter: make you can help me with this question. does p6 have any javascript-like syntax for doing simple sed/perl5 stuff? ie, if ($string.match(/something/)) { do something } ? | ||
bkeeler | Good afternoon, folks! | ||
pmichaud | oh, it might be treating bare return as a name lookup | ||
quietfanatic | so after getting make $final_result it continues and gets make $past anyway. | ||
pmichaud | I wonder if it would be hard to create term:sym<return> in NQP, and if that would even work. | 22:15 | |
ash_ | sjohnson: you mean ~~ ? | ||
rakudo: if 'abc' ~~ /a.c/ { say $_ } | |||
p6eval | rakudo 6a7ded: OUTPUT«Any()» | ||
pmichaud | sjohnson: if $string ~~ /something/ { do something } | ||
22:16
Chillance joined
|
|||
ash_ | rakudo: if 'abc' ~~ /(a.c)/ { say $_ } | 22:16 | |
p6eval | rakudo 6a7ded: OUTPUT«Any()» | ||
ash_ | i guess i should of used $/ | ||
pmichaud | rakudo: if 'abc' ~~ /a(.)c/ { say $0 } | ||
p6eval | rakudo 6a7ded: OUTPUT«b» | ||
ash_ | rakudo: given 'abc' ~~ /a.c/ { say $_ } | ||
p6eval | rakudo 6a7ded: OUTPUT«abc» | ||
ash_ | i rather like given | 22:17 | |
pmichaud | rakudo: given 'abc' { when /a.c/ { say $_; } } | ||
p6eval | rakudo 6a7ded: OUTPUT«abc» | ||
22:17
pmurias left
|
|||
sjohnson | pmichaud / ash_ : i realize the ~~ or given/when structure is there... but i was wondering if there was a javascript like way to do it... ie, a String method. | 22:17 | |
pmichaud | sjohnson: oh. .match | ||
sjohnson | not saying that i would prefer this... just very curious about it | ||
ahh, cool | 22:18 | ||
pmichaud | rakudo: say 'abc'.match(/a.c/); | ||
p6eval | rakudo 6a7ded: OUTPUT«abc» | ||
pmichaud | rakudo: if 'abc'.match(/a.c/) { say 'yes'; } | ||
p6eval | rakudo 6a7ded: OUTPUT«yes» | ||
sjohnson | pmichaud: indeed, this is what i was curious about. im kinda cool it is in there, as another timtowtdi way to do it | ||
quietfanatic | Aha! It works! jnthn++ | ||
sort of. May have caused a different error. | 22:19 | ||
22:21
masak joined
|
|||
masak | ahoy, #perl6! | 22:21 | |
bkeeler | o/ masak! | ||
masak | say, has anyone else noticed that a lot of people report that they've been stumbling on the fact that nowadays you need to scope-declare free regexes with 'my'? | 22:22 | |
is it possible that that indicates a design smell? | |||
bkeeler | Could default them to 'my' if they're not in a class/grammar perhaps | 22:23 | |
masak | perhaps. | ||
PerlJam | masak: where do they "need" to be scoped? | ||
masak | PerlJam: outside of a grammar. | 22:24 | |
at least if they're named. | |||
PerlJam: because they're basically methods, and methods need a metaclass to has-scope themselves to. | |||
or sump'n. | |||
PerlJam | oh, I see what you're saying | ||
masak | it wasn't always like that. | 22:25 | |
bkeeler | Of course you can't really do much with them outside a grammar for now | ||
masak | in alpha, where we cheated more, it worked fine without 'my' :) | ||
bkeeler | / <foo> / won't find a lexical 'foo' | 22:26 | |
Perhaps I should work on that next | |||
masak | ++bkeeler | 22:27 | |
bkeeler | pmichaud: had a chance to inspect my 'regex-interpolation' branch? | ||
22:29
wknight8111 joined
22:31
kel__ joined,
lest_away is now known as lestrrat
|
|||
patrickas | rakudo: use Test; sub p() {my (@a ,%h);@a = [];%h = {}; return @a, %h; }; plan *; is_deeply( p() , ( [] , {} ) ); done_testing; | 22:34 | |
p6eval | rakudo 6a7ded: OUTPUT«not ok 1 - # got: ([[]], {})# expected: ([], {})1..1# Looks like you failed 1 tests of 1» | ||
22:34
kel_ left
22:36
kel__ left
|
|||
lue | ohai! | 22:45 | |
(I'd like to see the removal of the src/cheats folder. It just seems out of place) | |||
masak | lue: \o | 22:48 | |
lue: I'm afraid that folder is very much in use. | 22:49 | ||
see the Makefile for just how much. | |||
lue | Not that I don't want it there, it just looks odd in a language interpreter. (It wouldn't be odd in a game :) ) | ||
masak | your complaint seems to be purely on the level of naming. | 22:50 | |
what if the contents of that folder actually are a lot of cheats? | |||
jnthn | They *are* cheats. :-) | ||
masak | see? :) | ||
jnthn | It's a quite apt name. | ||
masak | and 'apt' is the opposite of 'out of place'. | 22:51 | |
quietfanatic | Indeed, changing what routine_def makes breaks something else. | 22:53 | |
jnthn | They're things that get us to a workingish Perl 6 without having to beat all the hard guys. | ||
lue | I know. You just wouldn't expect to find it in a language interpreter! :) | ||
[then again, it is Perl 6...] | |||
arnsholt | Compiler writing is, to a certain extent, cheating I think =) | ||
masak | lue: Perl 6 is my MMORPG. | 22:54 | |
lue | :) | 22:55 | |
lue finds +5 Beard of Unix | |||
bkeeler | If only we could charge millions of people $15 a month to hack on rakudo | 22:56 | |
masak | lue: want to help me track down a GGE bug? | ||
lue | Ooh! Deep Magic™! What is it? | 22:57 | |
masak | lue: I'm trying to port GGE from alpha to master, and I find one regex that simply hangs on parsing, and some others that parse wrong. | ||
lue: I just pushed to the ng-compat branch at github.com/masak/gge, so if you want to play, please pull a copy and I'll guide you through it. | 22:58 | ||
lue realizes how long it's been since he last logged into the RT | |||
masak | I cannot guarantee that this will result in an RT submit. | ||
might be something wrong with GGE rather than Rakudo. | 22:59 | ||
22:59
Psyche^ joined
23:00
Patterner left,
Psyche^ is now known as Patterner
|
|||
quietfanatic | It makes Test.pm not work. "Ambiguous dispatch to multi 'plan'" | 23:00 | |
lue | I know. You said bug I and thought .oO(Oh! RT! How long has _that_ been?) | ||
quietfanatic | where multi plan is only defined once | ||
lue | I didn't get any source code. Is that right? (no src/ folder) | 23:01 | |
masak | lue: there's a lib/ folder. | ||
lue: you'll need to switch branches. 'git pull; git co -b ng-compat origin/ng-compat' | 23:02 | ||
lue | ah. (dur) | 23:03 | |
I actually cloned it as a new repository *.* | |||
masak | that's good, if you didn't have it before. | 23:04 | |
lue | git co doesn't work :) | 23:05 | |
masak | hm. | ||
any informative error message? | |||
lue | git: 'co' is not a git-command. See 'git --help'. | 23:06 | |
masak | oh, sorry :) | ||
it's 'git checkout' | |||
masak falls victim to his convenient aliases :P | 23:07 | ||
they're excellent until you try to tutor others... | |||
lue | > git checkout -b ng-compat origin/ng-compat | ||
masak | aye | ||
should work. | |||
lue | fatal: git checkout: updating paths is incompatible with switching branches/forcing | ||
Did you intend to checkout 'origin/ng-compat' which can not be resolved as commit? | |||
[trying again] | |||
PerlJam | masak: git should come with those aliases by default. Everyone uses them. | ||
masak | lue: did you do a 'git pull' before? | ||
quietfanatic | I have rak aliased to rakudo perl 6 on my system, so I often find myself typing "rak: ..." into IRC | 23:08 | |
lue | does git pull always have to come first | ||
ash_ | lue: git checkout -t origin/ng-compat | ||
masak | lue: or what ash_ said. | ||
ash_ | not only does it make a local branch, it makes it a tracking branch too, and checks it out | ||
so that kills 3 birds with 1 stone | 23:09 | ||
masak | lue: well, the 'git pull' was so that it should pull the origin/ng-compat thing, so that it would know what it was. :) | ||
ash_++ | |||
lue | running what ash_ gave: fatal: git checkout: --track and --no-track require -b | 23:10 | |
What has happened to my copy of rakudo/git ? :) | |||
then putting in -b causes the same fatal err as before! | |||
masak | :/ | 23:11 | |
ash_ | git branch -l ? | ||
lue | still on master | ||
lue will attempt to reclone rakudo to try and resolve this issue; please wait | |||
masak | er. | 23:12 | |
ash_ | oh | ||
lue | I just went to the github page for GGE and realized. | ||
ash_ | there is no origin/ng-compat | ||
masak | GGE != Rakudo. | ||
lue | I am !SMART /o | 23:13 | |
\ | |||
masak | so. if you try it with GGE, you're likely to have a higher success rate. | ||
lue | Unless I *need* rakudo to start, I'm ready. [probably do need it] | 23:15 | |
23:16
hatseflats left
|
|||
masak | you need it. | 23:16 | |
as freshly a build as possible. | |||
s/ly// | 23:17 | ||
lue | I acciendatly rm -rf 'd it [see above for attempt at resolution]. It's going to be fresher than 5 seconds ago. | ||
masak | actually, all you need is a 'perl6' executable in your path. | 23:18 | |
mathw | hey | ||
23:18
quietfanatic left
|
|||
masak | mathw! | 23:19 | |
mathw: congrats on the successful performance! | |||
mathw | Thanks | ||
I can get to work on Form.pm after I've slept :) | |||
masak | YaY | ||
masak ushers mathw towards the sleeping pod | 23:20 | ||
lue forgot what floor those are on | |||
mathw | No I need to wind down first | ||
I'm watching a bit of TV | |||
masak | they're on Nivelo 38. :) | ||
mathw | bit of chatting | ||
masak .oO( src/chats ) | 23:21 | ||
jnthn | o/ mathw | 23:22 | |
mathw | o/ jnthn | ||
jnthn | Form.pm! \o/ | ||
lue | .oO(src/chats/cheats/[OFF].pm) |
||
mathw | heh | ||
tomorrow, jnthn | |||
lue | More of my !SMART coming, but what is Form.pm | ||
mathw | I should have time for that, maybe an aikido class (if I wake up soon enough), and some music to transcribe | 23:23 | |
masak | lue: it's the R in Perl. | ||
Reporting. | |||
mathw | lue: Data formatting, the Perl 6 approach to Perl 5's 'format' function | ||
jnthn | .oO( look at that n00b, insinuating it's called PERL ;-) ;-) ) |
||
masak | O.O | ||
everybody knows it's really P.E.R.L. | 23:24 | ||
lue | PE L (<-- Wheel of Fortune) | ||
masak recalls some Perl person naming a tool 'pler', and subsequently being nibbled to death by the Japanese | 23:25 | ||
lue | I thought were the Extraction of Practial Reports Language(EPRL)! | ||
mathw | Peppered Egg & Radish Langoustines | ||
lue | Or maybe the Reports of Practical Extraction Language (RPEL)! | ||
mathw | well it does have a REPL | ||
lue | .oO(src/eastereggs/LifeOfBrian.pm) |
23:26 | |
masak | lue: how's that Rakudo build coming? | ||
lue | core.pm > core.pir . Almost.... | ||
masak | I've isolated the bug a bit more. | 23:27 | |
mathw | oh yes | 23:28 | |
I could set a build going | |||
I've not updated Rakudo for ages | |||
lue | I have set my rakudo folder to part of my $PATH [lazy], but that stupid "parrot must be with you!" err :( | 23:29 | |
EGETOFFMYSHOULDER | |||
masak has updated Rakudo for ages :) | 23:30 | ||
lue | How do I fix that? | 23:31 | |
(stupid segmentation fault) | |||
masak | lue: 'make install' | ||
lue | That would never occur to me (considering I _never_ install it) dankon. | 23:32 | |
masak | you should. that way, you can type 'perl6' from anywhere. | 23:33 | |
lue | I would on my own computer, but never on a server I can't install to /usr/* . I don't know why, I just like having all my programs in /usr | 23:36 | |
masak | all set? | ||
ready to proceed to the next level? | 23:37 | ||
23:37
ruoso joined
|
|||
lue | I found the exit! World 6-0, here I come! | 23:38 | |
mathw has a rakudo | |||
masak | lue: ok, Mario. do you have GGE, and is it set to the ng-compat branch? | ||
mathw | hah | ||
compilation error :) | 23:39 | ||
lue | yes i do. Haven't done anything else with GGE though. | ||
masak | right. so let's do something with it. :) | ||
hm, let's make a Makefile. | |||
saaki | rakudo: $str = 'a' _ 'b' | ||
p6eval | rakudo 6a7ded: OUTPUT«Confused at line 11, near "$str = 'a'"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
saaki | ? | ||
lue | just run Configure, right? | ||
masak | lue: 'perl6 Configure' doesn't work too well. so maybe 'cp Makefile.in Makefile' instead. | 23:40 | |
saaki: the '_' is spelled '~' nowadays. | |||
saaki | thx | ||
masak | rakudo: my $str = 'a' ~ 'b'; say $str | ||
p6eval | rakudo 6a7ded: OUTPUT«ab» | ||
masak | lue: and then change the first three lines to say meaningful things rather than <PERL6> etc. | 23:41 | |
(in Makefile) | |||
I have 'PERL6=perl6' | |||
and RAKUDO_DIR pointing to my Rakudo dir. | |||
and PERL6LIB pointing to the directory with GGE in it, colon, $(RAKUDO_DIR) | 23:42 | ||
lue: after you've done something similar. try running 'make'. | |||
23:42
patrickas left
|
|||
lue | Unable to find module 'GGE::Match' in the @*INC directories. | 23:43 | |
PERL6LIB='~/gge:$(RAKUDO_DIR)', RAKUDO_DIR=~/rakudo | 23:44 | ||
masak | try expanding the ~ into what it really means. | ||
not sure the 'make' tool respects ~ | |||
lue | Still no. That's weird. | 23:45 | |
masak | oh, wait. | ||
should be ~/gge/lib | |||
or equiv. | |||
lue | Just realized that :) | 23:46 | |
masak | because that's where the modules are. | ||
sorry :) | |||
lue | winning...winning... (*cough* s/winning/compiling/) | ||
masak | I think you're home free now. | 23:47 | |
lue++ | |||
23:48
justatheory left
|
|||
mathw | hmm | 23:48 | |
some interesting problems with Form.pm in new rakudo | |||
but much more of it works than it used to | |||
lue | aaand... done! | ||
mathw | I shall examine them properly tomorrow | ||
but now... bed | 23:49 | ||
masak | lue: 'export PERL6LIB=`pwd`/lib; perl6 t/perl6regex/01-regex.t' | ||
lue: over here, that runs the first 414 tests fine, and then hangs. see if it does the same for you. | 23:50 | ||
mathw: \o | |||
lue | Why is the goal of GGE to be slow? (Besides heritage & name) | 23:51 | |
masak | lue: being slow is just a side effect of the rest of the things it is: a grammar engine implemented on too high a level. | 23:52 | |
actually, it isn't as slow as I envisioned. :) | 23:53 | ||
lue | Ah. So hardware is your excuse :P | ||
masak | compilation is a bit of a drag, but it runs pretty OK. | ||
rule compilation, that is. that's basically Rakudo being slow, though. | |||
lue is looking for CAD tools to design the RD* while waiting, IIUC (or has a suggestion :) ) | 23:54 | ||
masak | well, if you're impatient to see the regex expression which hangs, you can do `./test-regex 'a**bc' ''` :) | 23:55 | |
23:55
justatheory joined
|
|||
masak | that's the golfed version of test 415. | 23:55 | |
lue | I can wait. There's a sleepover tonight and I'm confined to this computer :/ | 23:56 | |
cxreg | i'm guessing "1..Inf" isn't meant to be lazy just yet in rakudo | 23:59 | |
masak | I'm currently using that regex to try to figure out what's going on inside the optable parser that makes it hang. | ||
lue takes the way of impatience | |||
23:59
clintongormley left
|