»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:01 lichtkind left 00:18 llfourn joined 00:23 llfourn left 00:27 raiph left, cognominal joined 00:28 laouji joined 00:29 aborazmeh joined, aborazmeh left, aborazmeh joined 00:39 laouji left 00:40 laouji joined 00:44 laouji left 00:45 laouji joined 00:54 yqt left 01:19 AlexDaniel left 01:22 vendethiel joined 01:51 kaare_ joined 02:20 llfourn joined 02:22 noganex joined 02:24 llfourn left, noganex_ left 02:32 llfourn joined
skids m: my @a = 1,2; my \b = [3,4].flat; $b.WHAT.say; @a.push(b); my $c = [5,6].flat; @a.push($c); @a».say 02:34
GLRelia rakudo-moar ef6669: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RlI9M7VrGM␤Variable '$b' is not declared␤at /tmp/RlI9M7VrGM:1␤------> 3my @a = 1,2; my \b = [3,4].flat; 7⏏5$b.WHAT.say; @a.push(b); my $c = [5,6].f␤»
camelia rakudo-moar d6bf55: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_UTFYAxDwj␤Variable '$b' is not declared␤at /tmp/_UTFYAxDwj:1␤------> 3my @a = 1,2; my \b = [3,4].flat; 7⏏5$b.WHAT.say; @a.push(b); my $c = [5,6].f␤»
skids m: my @a = 1,2; my \b = [3,4].flat; b.WHAT.say; @a.push(b); my $c = [5,6].flat; @a.push($c); @a».say 02:35
GLRelia rakudo-moar ef6669: OUTPUT«(Seq)␤1␤2␤3␤4␤5 6␤»
camelia rakudo-moar d6bf55: OUTPUT«(Array)␤6␤5␤3␤1␤4␤2␤»
skids I guess if we are OK with having to use binding to pass Seqs around we can have $ protect against the single-arg-rule. 02:38
02:39 vendethiel left
skids And that seems to be how some of the first things that were implemented got done. 02:39
But the implementation doesn't cleanly map to MMD without a way to distinguish between Scalar containers and values. 02:56
03:04 Timbus left 03:18 lizmat joined
lizmat waves from HND 03:18
03:20 gagalicious left 03:26 cognominal left 03:39 aborazmeh left 03:44 BenGoldberg left 03:50 jack_rabbit joined 03:51 prevost joined
dalek kudo/glr: 25a9f87 | lizmat++ | src/core/Supply.pm:
Get rid of one .infinite

Doesn't fix Supply.rotor just yet, because xx * still seems broke
03:55
04:00 ChoHag joined, Timbus joined
ChoHag Why can I say my $foo = (Bar but Baz).new, but can't say my (Bar but Baz) $foo .= new? 04:01
04:05 mdinger joined, cognominal joined
lizmat because the latter is a constraint 04:06
and we don't do constraints like that (yet) ?
04:06 Timbus left
lizmat m: sub a($a) { .say for $a }; a( Range.new(1,4) ) # the reason Supply.minmax doesn't work 04:06
GLRelia rakudo-moar 25a9f8: OUTPUT«1␤2␤3␤4␤»
camelia rakudo-moar d6bf55: OUTPUT«1..4␤»
lizmat m: sub a($a) { .say for $a }; a( $(Range.new(1,4)) ) 04:07
GLRelia rakudo-moar 25a9f8: OUTPUT«1␤2␤3␤4␤»
camelia rakudo-moar d6bf55: OUTPUT«1..4␤»
lizmat m: sub a($a) { .say for $a }; a( (Range.new(1,4), )
GLRelia rakudo-moar 25a9f8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CW7bohr0ZT␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/CW7bohr0ZT:1␤------> 3) { .say for $a }; a( (Range.new(1,4), )7⏏5<EOL>␤»
camelia rakudo-moar d6bf55: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7NgOvuMLMm␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/7NgOvuMLMm:1␤------> 3) { .say for $a }; a( (Range.new(1,4), )7⏏5<EOL>␤»
lizmat m: sub a($a) { .say for $a }; a( (Range.new(1,4),().slip )
GLRelia rakudo-moar 25a9f8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tI5tCIOlXl␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/tI5tCIOlXl:1␤------> 3y for $a }; a( (Range.new(1,4),().slip )7⏏5<EOL>␤»
camelia rakudo-moar d6bf55: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4V2hcxPTht␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/4V2hcxPTht:1␤------> 3y for $a }; a( (Range.new(1,4),().slip )7⏏5<EOL>␤»
lizmat m: sub a($a) { .say for $a }; a( (Range.new(1,4),().Slip )
GLRelia rakudo-moar 25a9f8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WIxc25lr2M␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/WIxc25lr2M:1␤------> 3y for $a }; a( (Range.new(1,4),().Slip )7⏏5<EOL>␤»
camelia rakudo-moar d6bf55: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KmkxM78aWK␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/KmkxM78aWK:1␤------> 3y for $a }; a( (Range.new(1,4),().Slip )7⏏5<EOL>␤»
04:07 Timbus joined
ChoHag I see. 04:07
lizmat m: sub a($a) { .say for $a }; a( Range.new(1,4),().Slip ) 04:08
GLRelia rakudo-moar 25a9f8: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in sub a at /tmp/ZSE_o2Nt3R:1␤ in block <unit> at /tmp/ZSE_o2Nt3R:1␤␤»
camelia rakudo-moar d6bf55: OUTPUT«Method 'Slip' not found for invocant of class 'Parcel'␤ in block <unit> at /tmp/4TCfr7jop8:1␤␤»
lizmat m: sub a($a) { .say for $a }; a( [Range.new(1,4)] )
GLRelia rakudo-moar 25a9f8: OUTPUT«1␤2␤3␤4␤»
camelia rakudo-moar d6bf55: OUTPUT«1 2 3 4␤»
lizmat I'm not sure the problem is with Supply.emit (having a \msg sig) or with minmax specifically 04:10
.tell jnthn would be interested to know how you see Supply.emit being fixed so that it can take a single Range.new and *not* iterate over it 04:24
yoleaux lizmat: I'll pass your message to jnthn.
lizmat .tell jnthn *and* keep the \msg signature for so that we emit to the supply whatever is passed to the method verbatim 04:25
yoleaux lizmat: I'll pass your message to jnthn.
04:28 laouji left 04:29 prevost left
ShimmerFairy ChoHag: my first guess is that since (Bar but Baz) is a run-time mixin, having a type constraint of a run-time nature probably isn't a good idea :) 04:30
ChoHag Other than prefixing the Signature with ::?CLASS:D:, how can you specify that a method is only to be called on an instance, not a type (and vice versa)? 04:31
ShimmerFairy The :D smiley only allows instances, and the :U smiley only allows type objects (:_ allows either, and in most places is the default smiley) 04:33
I don't think there's another way beyond :D/:U , as far as I know. 04:34
ChoHag Yeah but emacs thinks ::? opens a quote so my syntax highlighting and autoindentation gets screwy. 04:35
04:35 khw left
ShimmerFairy ChoHag: oh, you can use the class name in place of ::?CLASS 04:36
ChoHag Also it seemed like the kind of thing there'd be a syntax for.
ShimmerFairy m: class Foo { method bar(Foo:D: $a) { say $a } }; Foo.new.bar(42)
GLRelia rakudo-moar 25a9f8: OUTPUT«42␤»
camelia rakudo-moar d6bf55: OUTPUT«42␤»
ShimmerFairy m: class Foo { method bar(Foo:D: $a) { say $a } }; Foo.bar(42)
camelia rakudo-moar d6bf55: OUTPUT«Invocant requires an instance of type Foo, but a type object was passed. Did you forget a .new?␤ in method bar at /tmp/lY6ujXIhT0:1␤ in block <unit> at /tmp/lY6ujXIhT0:1␤␤»
GLRelia rakudo-moar 25a9f8: OUTPUT«Invocant requires an instance of type Foo, but a type object was passed. Did you forget a .new?␤ in method bar at /tmp/aosug2ixyb:1␤ in block <unit> at /tmp/aosug2ixyb:1␤␤»
ChoHag Oh I know, but then there'd be repetition of information, and that's much worse than funny colours. 04:37
04:38 gagalicious joined
zacts so I've heard rumors that a first actual stable release of perl6 may happen this year? 04:39
and would that be the specification, or would it be the rakudo implementation of it, or both?
lizmat both 04:40
ChoHag Yeah but then they decided to reimplement some core features, as developers are wont to do.
lizmat ETA Christmas 2015
zacts nice nice
so perhaps I could contribute by learning perl6, and porting and writing modules
lizmat zacts: that would be an excellent plan!
ChoHag Christmas here happens in January, so you missed that boat. 04:41
Or looking at it the other way, you get an extra 2 weeks (Jan 7th).
lizmat zacts: doc.perl6.org # documentation, a work in progress
boarding& 04:42
04:42 lizmat left
ChoHag zacts: TBD it does look from the sidelines that this year is possible. 04:42
TBH
But on the other hand, I've worked on a lot of projects of various types and I don't think one has ever met any date it scheduled. 04:43
On the gripping hand, porting wouldn't hurt. 04:44
04:45 aborazmeh joined, aborazmeh left, aborazmeh joined
ShimmerFairy Honestly, it surprised me when Larry announced specific dates for a rakudo release candidate in Sept., and the first stable release of Perl 6 + rakudo on Christmas. In some ways it's still surreal for me that there will be a point where 6.0.0 is declared "complete", and soon-ish :) 04:46
04:57 [Sno] left 05:03 laouji joined 05:26 ggoebel left 05:27 ggoebel joined, ggoebel left
moritz good morning 05:48
m: my $x = [1, 2, 3]; .say for $x 05:49
GLRelia rakudo-moar 25a9f8: OUTPUT«1␤2␤3␤»
camelia rakudo-moar d6bf55: OUTPUT«1 2 3␤»
moritz m: my $x = [1, 2, 3]; .say for $x,
GLRelia rakudo-moar 25a9f8: OUTPUT«1 2 3␤»
camelia rakudo-moar d6bf55: OUTPUT«1 2 3␤»
05:55 skids left 06:05 darutoko joined
dalek kudo/glr: 133b570 | (Stefan Seifert)++ | src/core/Range.pm:
Fix generic Range iterator assuming numeric semantics

Thanks to b2gills++ for spotting this!
06:08
06:22 plicease joined 06:23 telex left 06:24 telex joined 06:34 xfix joined, Woodi left 06:35 Woodi joined 06:43 aborazmeh left, rurban joined 06:46 RabidGravy joined, [Sno] joined 06:48 cognominal left, zakharyas joined 06:54 rurban left
moritz m: my @a = do for ^4 { 5 }; say @a[0]; say @a[1] 06:55
GLRelia rakudo-moar 133b57: OUTPUT«5␤5␤»
camelia rakudo-moar d6bf55: OUTPUT«5␤5␤»
moritz m: my @a = do for ^4 { start { 5 } }; await @a; say @a[0].result; say @a[1].result 06:56
GLRelia rakudo-moar 133b57: OUTPUT«5␤5␤»
camelia rakudo-moar d6bf55: OUTPUT«5␤5␤»
07:00 cognominal joined
masak morning, #perl6 07:01
moritz m: for lines() { say $*IN.ins }
camelia rakudo-moar d6bf55: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤»
GLRelia rakudo-moar 133b57: OUTPUT«(timeout)»
07:02 Ven joined
masak by the way, now that we have labels, should there be a `LINE:` label on the -n and -p loops? 07:07
07:08 domidumont joined 07:12 domidumont left
masak (in analogy with Perl 5, see `perldoc perlrun`) 07:12
07:13 domidumont joined, salv0 joined
FROGGS masak: seems easily doable 07:14
morning #perl6
07:21 mdinger left 07:22 abraxxa joined
nine Ven: regarding $i++ for (1, 2, 3).item; the expected answer for say $i is indeed 3. 07:25
07:25 jack_rabbit left
Ven nine: okay. I'll fix the test in that file then 07:27
07:30 laben joined
nine Ven: the rules are actually quite simple now: we iterate over the thingy we got passed. for $whatever { ... } will iterate over $whatever, regardless of how that thing looks, i.e. $whatever.elems iterations. for $foo, $bar { ... } will iterate over the list ($foo, $bar), i.e. two iterations. 07:30
laben hello p6'ers
Ven nine: seems I was getting it with irclog.perlgeek.de/perl6/2015-08-23#i_11103320 then. thanks 07:31
nine If you really mean it, you can use for (@whatever,) { ... } to have only one iteration. Whyever you would want to do that... 07:32
Ven: yes, indeed! And it doesn't only litterally mean .map. It _is_ map. It gets compiled to a .map call. 07:34
laben nine: i think i got a working binary hyper impl that doesnt consume twice, need to test it, got some test files other than s03-metaops/hypers ?
ShimmerFairy nine: I think it would also be helpful to spread the idea that for (@whatever,) { ... } is best spelled given @whatever { ... } :)
nine laben: not that I'm aware of. I would love to have a look at your implementation, since I already started working on one myself. 07:35
07:36 amurf left
laben nine: i think i got an off by one error in here, wont be easy to spot. it's only missing the Whatever lengthening and a good round of debugging 07:37
nine Can you push it somewhere?
ShimmerFairy (what I mean by that is: if you insist on 'for' treating the item as one item, then you should either use 'given' to assign it to $_ like you were hoping, or assign the item to a variable yourself) 07:38
laben m: dd (1,) <<~<< <A B C D>
GLRelia rakudo-moar 133b57: OUTPUT«("1A", "1B", "1C", "1D")␤»
camelia rakudo-moar d6bf55: OUTPUT«("1A", "1B", "1C", "1D")␤»
laben dd (1,)
m: dd (1,)
GLRelia rakudo-moar 133b57: OUTPUT«(1)␤»
camelia rakudo-moar d6bf55: OUTPUT«(1,)␤»
nine ShimmerFairy: absolutely! That's why I can really live well with forcing the user to write (@a,). Because for is probably just the wrong tool.
laben nine: should i publish a branch on github? 07:39
nine laben: please
JimmyZ m: for [1,2], {} 07:40
GLRelia rakudo-moar 133b57: OUTPUT«5===SORRY!5===␤Expression needs parens to avoid gobbling block␤at /tmp/oNUtWgt9WV:1␤------> 3for [1,2], {}7⏏5<EOL>␤Missing block (apparently taken by expression)␤at /tmp/oNUtWgt9WV:1␤------> 3for [1,2], {}7⏏5<EOL>␤␤»
camelia rakudo-moar d6bf55: OUTPUT«5===SORRY!5===␤Expression needs parens to avoid gobbling block␤at /tmp/G01wItrncD:1␤------> 3for [1,2], {}7⏏5<EOL>␤Missing block (apparently taken by expression)␤at /tmp/G01wItrncD:1␤------> 3for [1,2], {}7⏏5<EOL>␤␤»
ShimmerFairy nine: does P5 tend to leave people with the idea that C<for> can automagically assign to $_ for single items? If so, the "use given instead" suggestion might be especially helpful in a 5-to-6 context. :)
laben nine: need some time as i unwittingly did a git pull meanwhile
nine ShimmerFairy: yes, it is sometimes indeed used for that purpose. 07:41
laben: or just gist the code
07:41 brrt joined
laben nine: gist.github.com/laben/fdfe48a4c14ddb26e060 07:44
nine: i think my bug is that i incremented $dwim-count with ++ instead of the safe way "$dwim-count = ($dwim-count + 1) % $elems;" written later there 07:45
07:47 salv0 left, salv0 joined 07:49 rurban joined
nine laben: I think the whole implementation could be simplified a lot by writing a special anonymous iterator class that knows how to generate more values if needed after exhaustion 07:49
so you only need one loop in the function and it's just an until $left-ended and $right-ended {...} 07:51
laben nine: well, i dunno how to do that XP, you can do the honors unless you want to concentrate on reducing test files failures
nine would also get rid of a lot of the duplication
07:52 salv0 is now known as salva00
laben also btw i dont think there's a single test for the Whatever-lengthening stuff 07:52
07:53 salva00 is now known as salva0
laben i dont think you can do without the =:= IterationEnd check, else how do you know a side has ended? 07:54
07:54 salv0 joined 07:55 salva0 left
laben maybe you can use the special iterator for the second loop 07:55
07:57 salv0 left 07:58 salva joined 08:01 rurban left 08:04 brrt left 08:07 dakkar joined
nine laben: incomplete and not even compile-tested, but it should illustrate what I'm imagining: gist.github.com/niner/b8d88fca93b77ead569f 08:15
08:17 brrt joined, cognominal left
laben nine: i dont see any checking of correct dwimmyness combined with side lengths. where will you put it, inside the class? 08:18
08:21 virtualsue joined 08:22 diana_olhovik_ joined 08:26 espadrine joined 08:29 KCL_ joined 08:32 KCL left 08:33 dwarring left
masak enjoyed varlogrant.blogspot.se/2015/08/i-am...perl6.html 08:37
I think realistically, that's an attitude that Perl 6 will meet a lot in the next few years. 08:38
nine laben: most probably. Those checks are what I haven't figured out yet. But I only thought about this code structure while on my bicycle, so I didn't have the current implementation at hand ;)
08:38 yeahnoob joined, froot joined
froot Hello 08:38
08:39 froot is now known as Guest46196
JimmyZ hi 08:39
Guest46196 I am new with perl on debian
Perl 6
Ven masak: yes, but the "good" part is that it isn't related to perl6 itself. just loving your current platform and wanting to stick with it
Guest46196 I wont to install perl 6 but have a question? 08:40
i install the build-essentials and git but after that must i be root user to install perl6 "rakudo.org/how-to-get-rakudo/" ? 08:42
laben masak: after all this time, that's the major argument i hear for C->C++, C++->D, Python2->Python3 etc. i dont think there was an explicit need to reiterate it 08:43
JimmyZ Guest46196: you don't need, Did you try rakudobrew? 08:44
Guest46196: or the Manual installation step
Guest46196 ok that mean that i can install rakudobrew without root. "rakudo.org/how-to-get-rakudo/" ...........To install rakudobrew on Linux: 08:45
08:46 diana_olhovik__ joined
Guest46196 I will try manual. 08:47
08:47 diana_olhovik_ left
Guest46196 I am trying the rakudobrew more flexible. 08:51
masak Guest46196: don't have to be root. if you don't specify anything else, rakudo will be installed into an install/ subdirectory in your rakudo directory. 08:53
08:54 araujo joined 08:55 Ven left
Guest46196 Ad the moment i see a lot off compilling flying arrounf my screen. 08:55
dalek kudo/nom: 0523c85 | labster++ | src/core/Temporal.pm:
fix RT#125682 and RT#125686 Date and DateTime overflows

reverts a portion of 5dbca1f5, adding what is now 15% time to the aforementioned masak example (but a full revert would be 30% longer) Preserved int math where I could.
08:58
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125682
kudo/nom: b56d593 | labster++ | src/core/Temporal.pm:
fix RT#125872 date formatting bugs

RFC 3339: Lowercase t and z now allowed on input to DateTime, ISO 8601: Output now prints 4 digit date with year outside 0..9999
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125872
ShimmerFairy masak: I've admittedly only skimmed that article (since I don't have the mental resources to give a putdown of P6 a deep read :P), but my takeaway of that article's opinion is "Perl 5 made me money, Perl 6 made people laugh at me(?), and I like typing a bunch of use statements for stuff that comes with the distro. Thus, I haven't even touched P6" 08:59
|Tux| test 50000 42.131 42.041 09:01
test-t 50000 41.038 40.948
09:02 laouji left, rindolf joined 09:03 laouji joined
ShimmerFairy labster: is there a reason you undid the native types in Temporal? Unless $daycount is an epoch and there's a likely chance of int being 32-bit, I can't imagine why bigints would be necessary there. 09:03
s/an epoch/the UNIX epoch/
labster ShimmerFairy: I did it to close a couple of bugs. We can either declare "hey, we don't want to deal with any dates above size x", or we can use the Int type. 09:04
jdv79 .tell FROGGS irclog.perlgeek.de/perl6/2015-08-23#i_11103936 ? 09:05
yoleaux jdv79: I'll pass your message to FROGGS.
ShimmerFairy labster: ok, fair enough :) I will say though, that #125682 seems to be a case of GIGO, as it's presented; a more realistic example than adding an absurd number of seconds would be more convincing 09:06
labster those are days, not seconds, but yeah, I hear you. 09:07
ShimmerFairy oh right, they are Date objects, dur :P
Guest46196 Thank you Jimmyz and the community for your service and kind advice in install perl6. 09:08
09:09 arnsholt joined, rindolf left
jdv79 at least that article wasn't overtly negative or aggressive iirc - i read it a while ago 09:10
ShimmerFairy jdv79: I don't think so either, it's just that an article all about why someone won't even give Perl 6 a chance isn't very useful to me, or many others here :) 09:12
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125682
jdv79 sure. but its nice that's its largely benign.
ShimmerFairy Of course. I'm glad that it's a reasonable explanation of why this one guy isn't particularly interested :) 09:13
09:13 simcop2387 left
labster ShimmerFairy: I tested a case where we'd use all native ints on the reasonable-sized cases, and Int outside it, but that seemed to be even slower. If you have a better suggestion -- maybe limits to year size, I wouldn't mind hearing them. 09:13
ShimmerFairy labster: I can take a look at it later, I just didn't see why the native ints were replaced at first :) 09:14
labster What I got from the article was "I fell in love with Perl 5, and Perl 6 doesn't touch my feels in teh same way".
jdv79 i kinda saw it as: www.quickmeme.com/img/dc/dc2fd6da2c...fb25c6.jpg
laben nine: i fixed my impl, the problem was exactly what i thought. now it passes the same tests as the existing impl. there's only one other problem: when returning, it attempts to recreate the type it originally got. In case of Seq, what do we return? 09:15
09:17 simcop2387 joined
nine laben: in deepmap I resorted to List for that reason 09:22
laben: would you say it makes sense to pursue my implementation further? Since your's passes all tests and fixes things, I'd say we merge your's now in any case. 09:24
09:25 amurf joined 09:26 rindolf joined
laben nine: there's no hurry as it does not passes more tests than the existing one and i like your idea more, but i think it would be easier for you if you use the DwimIterator only for the second part, so that you can do the checks as in my impl 09:27
nine Getting rid of separate parts is most of the charm of my idea :) 09:28
laben nine: ofc if you prefer to progress on other glr matters, i'll continue to work on this and try to fix bugs and implement the Whatever stuff
jnthn wonders what on earth DwimIterator is :)
yoleaux 04:24Z <lizmat> jnthn: would be interested to know how you see Supply.emit being fixed so that it can take a single Range.new and *not* iterate over it
04:25Z <lizmat> jnthn: *and* keep the \msg signature for so that we emit to the supply whatever is passed to the method verbatim
nine jnthn: it's about: 10:15 < nine> laben: incomplete and not even compile-tested, but it should illustrate what I'm imagining: gist.github.com/niner/b8d88fca93b77ead569f 09:29
09:30 amurf left
timotimo oh hey jnthn :) 09:30
jnthn .tell lizmat I'd be tempted ot say that emit NEVER tries to iterate anything and just emits what it's given verbatim :)
yoleaux jnthn: I'll pass your message to lizmat.
nine Right now it makes Stage optimize gobble up all my RAM however :)
timotimo did your flight go well?
jnthn timotimo: Well, in so far as "all on time", yes, but I was heavily sleep deprived before it all so felt awful the whole way :(
timotimo :(
jnthn just slept 11 hours and still feels tired and has black marks under his eyes :S 09:31
laben m: my \a = (1..3).map(*.succ).WHAT; dd a;
GLRelia rakudo-moar 133b57: OUTPUT«Seq␤»
camelia rakudo-moar b56d59: OUTPUT«List␤»
timotimo it's shitty that even when lseep deprived like that your body still refuses to sleep on an airplane :(
laben m: my \a = (1..3).map(*.succ).WHAT; say a.name;
GLRelia rakudo-moar 133b57: OUTPUT«Method 'name' not found for invocant of class 'Seq'␤ in block <unit> at /tmp/txoUkUxVYo:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«Method 'name' not found for invocant of class 'List'␤ in block <unit> at /tmp/qptnhedNAm:1␤␤»
laben m: my \a = (1..3).map(*.succ).WHAT; say a.^name;
GLRelia rakudo-moar 133b57: OUTPUT«Seq␤»
camelia rakudo-moar b56d59: OUTPUT«List␤»
09:31 yeahnoob left
jnthn On those who are trying to figure out the single arg rule, I think you can understand it entirely in terms of "for" 09:32
for X { Y } ==> X.map(Y)
uh, well, with the block of course :)
But the X is the single argument. How will .map interpret it? That's the answer.
09:36 xinming_ joined, Guest46196 left
timotimo ITYM "understand it entirely in terms of “map”" 09:37
do we want to finally throw out perlfoundation.org/perl6 ?
09:39 xinming left
ShimmerFairy timotimo: IIRC that's pretty much dead already, no? 09:41
timotimo yes 09:42
people can and possibly will stumble upon it still 09:43
_itz_ A ex co-worker liked the content at www.perlfoundation.org/perl6/index....ve_summary
masak _itz_: maybe put it on perl6.org, then? 09:44
_itz_ yes I think that would be a good idea 09:45
09:51 cognominal joined
laben if you put those pages on perl6.org, it would be good to make that URL a redirect to perl6.org or at least a simple page that links there 09:52
09:57 Begi joined 09:59 laouji left
Begi Is there a way to host a Perl6 code for free ? 10:00
10:01 laouji joined
laben m: -«([1, 2], [3, [4, 5]]) 10:01
GLRelia ( no output )
camelia ( no output )
laben m: dd -«([1, 2], [3, [4, 5]])
GLRelia rakudo-moar 133b57: OUTPUT«(-2, -2).iterator␤»
camelia rakudo-moar b56d59: OUTPUT«([-1, -2], [-3, [-4, -5]])␤»
laben Begi: github?
jnthn That .iterator really should be .Seq
laben m: (-«([1, 2], [3, [4, 5]])).WHAT.say 10:02
GLRelia rakudo-moar 133b57: OUTPUT«(Seq)␤»
camelia rakudo-moar b56d59: OUTPUT«(Parcel)␤»
laben jnthn: .perl of Seq has been trouble the last few days. should it consume the Seq? 10:03
oh and i guess nom is correct here design-wise, right? 10:04
10:04 pmurias joined
laben m: dd ([1, 2], [3, [4, 5]]).map(-*) 10:05
GLRelia rakudo-moar 133b57: OUTPUT«(-2, -2).iterator␤»
camelia rakudo-moar b56d59: OUTPUT«(-2, -2)␤»
nine laben: how else could .perl produce usefull output but by consuming?
Begi laben: I would like to launch a small Bailador application
ShimmerFairy nine: by cloning the Seq and iterating that. It's been discussed before. 10:06
jnthn I don't think cloning will be enough 'cus you've got a whole evaluation chain...
nine jnthn: [1, 2, 3].Seq gives "Method 'Seq' not found for invocant of class 'Array'" while .iterator gives the nearest thing to the Seq 10:07
ShimmerFairy: how do you clone .lines?
jnthn nine: That also :)
laben Begi: is localhost not enough? else you need to find a host, but i doubt you could find one with perl6 installed 10:08
jnthn So cloning is a non-solution.
JimmyZ hmm, why (-?([1, 2], [3, [4, 5]])).WHAT.say gives me (Int) locally
jnthn nine: List.Seq is an easy thing to implement though. method Seq() { Seq.new(self.iterator) } :)
laben m: (-?([1, 2], [3, [4, 5]])).WHAT.say
camelia rakudo-moar b56d59: OUTPUT«(Int)␤»
GLRelia rakudo-moar 133b57: OUTPUT«(Int)␤»
TimToady did you mean -« instead?
Begi laben: yes, that's the problem 10:09
JimmyZ m: (-?([1, 2], [3, [4, 5]])).WHAT.say
GLRelia rakudo-moar 133b57: OUTPUT«(Int)␤»
camelia rakudo-moar b56d59: OUTPUT«(Int)␤»
10:09 Ven joined
jnthn I think that >> and friends have to force eager evaluation even if they do returns a Seq, but a Seq is a curious choice of return type in that case... :) 10:10
laben Begi: unless you find one which will make you upload a compile binary or compile it themselves, i dont think you'll have much luck. perl6 is quite unknown for now
pmurias masak: it's likely better that Perl 5 people who are not enthusiastic about Perl 6 wait before trying out so they don't get burned by something that's not ready for them
JimmyZ oh, I got ? without unicode 10:11
masak pmurias: agree.
pmurias: I'm also perfectly fine with some people looking at the two and deciding to go all-out with Perl 5. I have no problem with that.
people have different needs.
nine jnthn: >> returns a List now already
jnthn OK, good :)
TimToady well, you do the final reordering a bit lazily 10:12
nine I feel like I really start to understand these things now :)
laben is it ok for >> to always return a List? i mean, what if one implements the Iterable in a custom class? should you really get LIst if you pass CClass to >>?
jnthn TimToady: True, and something like for @foo.hyper.map(...).grep(...) { } will already start to iterate as soon as the first batch is available 10:13
nine laben: it's specced to return a Parcel for which is the closest equivalent.
jnthn Yeah, Parcel is le gone :)
laben so now it would be specced to return List or should it be Seq? 10:14
jnthn I think List is more sensible for >>.foo 10:15
laben m: dd ([1, 2], [3, [4, 5]])>>++ 10:16
camelia rakudo-moar b56d59: OUTPUT«([1, 2], [3, [4, 5]])␤»
GLRelia rakudo-moar 133b57: OUTPUT«Method 'succ' not found for invocant of class 'Array'␤ in block <unit> at /tmp/j2yxtluiVd:1␤␤»
TimToady well, it's really supposed to dup the input types
10:16 Begi left, dayangkun left
laben m: dd ([1, 2], [3, [4, 5]])>>.++ 10:16
camelia rakudo-moar b56d59: OUTPUT«([1, 2], [3, [4, 5]])␤»
GLRelia rakudo-moar 133b57: OUTPUT«Method 'succ' not found for invocant of class 'Array'␤ in block <unit> at /tmp/LPj9k210So:1␤␤»
jnthn @a>>.foo is really then doing something like @a.hyper.map(*.foo).eager.list
laben m: dd (([1, 2], [3, [4, 5]])>>.++)
GLRelia rakudo-moar 133b57: OUTPUT«Method 'succ' not found for invocant of class 'Array'␤ in block <unit> at /tmp/HoVbq63yWJ:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«([1, 2], [3, [4, 5]])␤»
jnthn But it's more like deepmap I guess
laben m: my @a = [1, 2], [3, [4, 5]]; dd @a; @a>>.++; dd @a 10:18
GLRelia rakudo-moar 133b57: OUTPUT«@a = [$[1, 2], $[3, $[4, 5]]]␤Method 'succ' not found for invocant of class 'Array'␤ in block <unit> at /tmp/dW1tVqiyG5:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«@a = [[1, 2], [3, [4, 5]]]<>␤@a = [[2, 3], [4, [5, 6]]]<>␤»
nine TimToady: So many methods return seq now. If we have >> return a Seq, too, >>++ and other ops with side effects will not get a chance to run.
TimToady hypers are not really intended primarily for lazy things anyway 10:19
that's what X and Z are for
laben m: ([1, 2], [3, [4, 5]]).WHAT.say
GLRelia rakudo-moar 133b57: OUTPUT«(List)␤»
camelia rakudo-moar b56d59: OUTPUT«(Parcel)␤»
dalek kudo/glr: 3c83dbc | (Stefan Seifert)++ | src/core/ (2 files):
Have [1, 2, 3].Seq.perl return [1, 2, 3].Seq instead of .iterator

Thanks to jnthn++ for noticing
10:20
masak .oO( Thanks to jnthn++ for nothing! ) :P 10:23
jnthn :P 10:25
nine Well constant Empty _was_ implemented by jnthn, so indeed, thanks for nothing ;)
jnthn All these Empty compliments... :P 10:26
TimToady in retrospect it's rather slipshod 10:27
nine That is "All these Slip() compliments..." which is "All these compliments..."
10:27 TEttinger left
timotimo would have to be {Slip}, no? 10:30
nine I parse English sentences as a List of words with auto quoting ;) 10:31
timotimo fair enough :) 10:33
laben nine: i fixed it up a bit like i said, still Whatever stuff is todo github.com/laben/rakudo/commit/d5a...e3d2fce42c
timotimo such big code :|
nine laben: if $type.^name ne "Seq"; better: if nqp::istype($type, Seq); 10:34
laben nine: i knew it there was a better way :/ 10:35
jdv79 ooc, why is panda so slow to get moving? 10:36
timotimo also, don't ever .isa("Typename"), that's ridiculously slow
jdv79 profiling is hard cause it hangs a browser
timotimo yes, if your thing is big ... :( 10:38
however
you can give an output filename and end it in .json
then you can use tadzik's viewer that's written in C++
jdv79 interestingly "panda install JSON::Tiny" seems to install panda. wut.
in adddition to JSON::Tiny
nine laben: we learn as we go :)
jdv79 oh
timotimo haha, what? 10:39
nine jdv79: because most modules actually depend on panda for their Build.pm6
jdv79 oh, rev dep rebuild 10:40
meh
timotimo github.com/tadzik/p6profiler-qtjdv79
jdv79 so, let's say i upgrade a module that's deep in a deps hier. will it have to rebuild all the way to the top? seems intense. 10:41
jnthn jdv79: Well, you certainly have to redo the precomps all the way to the top 10:42
laben jdv79: yeah and dont forget to rebuild everything everytime you rebuild rakudo :/
ShimmerFairy revdep-rebuild (at least in gentoo) is more about rebuilding things that use updated things
timotimo yeah, our pre-compilations have hard dependencies on exact compilation output
jnthn jdv79: The actual module fetch/test/install doesn't have to be done
We'll need to de-tangle module management and pre-comp management at some point.
jdv79 ah. good to know. 10:43
makes sense
10:43 rmgk left 10:46 rmgk joined
nine laben: I think my new implementation passes the same tests as the old. Updated the gist: gist.github.com/niner/b8d88fca93b77ead569f 10:49
10:49 zakharyas left, virtualsue_ joined 10:50 virtualsue left, virtualsue_ is now known as virtualsue 10:51 integral left, flussence joined
laben nine: rebuilding now, will try asap 10:51
10:53 garu joined 10:55 zakharyas joined
laben nine: did you try "say (1..3).map(*.succ) <<~>> ('B'..'H').map(*.pred)"? your impl doesnt say anything on my machine 10:55
10:57 sjn joined, rvchangue joined
nine Ah, that's both ends are dwim. An unhandled case indeed 10:57
11:00 integral joined, integral left, integral joined 11:05 preyalone joined, CQ2 joined 11:06 skarn joined
nine laben: HYPER really is a rat's nest of possible cases 11:07
timotimo it'd be great if hyper didn't have to check which ends are DWIM every time a single value is pulled
but still, you're doing good work, laben! 11:08
moritz m: try { eager map { die } }; say "alive" 11:10
GLRelia rakudo-moar 3c83db: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bHe1pLFcsy␤Missing comma after block argument to map␤at /tmp/bHe1pLFcsy:1␤------> 3try { eager map { die } 7⏏5}; say "alive"␤»
camelia rakudo-moar b56d59: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Wj1UgX5F8p␤Missing comma after block argument to map␤at /tmp/Wj1UgX5F8p:1␤------> 3try { eager map { die } 7⏏5}; say "alive"␤»
moritz m: try { eager map { die }, 1 }; say "alive"
GLRelia rakudo-moar 3c83db: OUTPUT«Died␤ in block <unit> at /tmp/DW4VqiHMht:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«alive␤»
moritz seems eager isn't eager enough 11:11
m: say map({1}, 1).eager.^name 11:12
GLRelia rakudo-moar 3c83db: OUTPUT«Seq␤»
camelia rakudo-moar b56d59: OUTPUT«List␤»
moritz uhm, does an eager Seq make sense?
I'd expect it to return a list
moritz tries it 11:14
nine laben: Updated to also pass your use-case: gist.github.com/niner/b8d88fca93b77ead569f Now passing 283 tests of hyper.t 11:18
laben: I also added your special casing of Seq as results
moritz ok, I have a local fix that makes try { eager map { die }, 1 }; live 11:19
turns out eager wasn't implemented at all (?)
11:20 Ven left
nine moritz: I'm not surprised :) 11:21
moritz huh 11:24
laben nine: rebuilding right now
moritz there's a method eager() in Iterable
_itz_ 3/j perl6-site
:)
moritz m: try { (map { die }, 1).eager }; say 'alive' 11:26
GLRelia rakudo-moar 3c83db: OUTPUT«Died␤ in block <unit> at /tmp/SlY0peJ0_A:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«alive␤»
nine moritz: but Iterable.eager() only starts working once you pull at least one value
moritz nine: then either the implementor misunderstood eager, or I do 11:27
jnthn Well, it's intentional at least
my @a = eager ...; # we don't want to immediately produce all values only to go on and copy them to @a, we'd rather produce them all direclty into @a
moritz with that, the "try" in try { eager map { die }, 1 } won't catch the exception
nine Would be nice if we could detect sink context here... 11:28
jnthn That should work 'cus try should force evaluation.
Well, trouble is that isn't actually a sink context
Because we have to return the result from try
laben nine: now it's another, "say (1..3).map(*.succ) >>~<< ('B'..'H').map(*.pred)" would throw (as specced) on existing impl, yours silently does >>op>> (or equivalently <<op>>) 11:29
moritz jnthn: but what forces evaluation (except for sink), if not eager?
maybe we should start to teach folks to write eager my @a = ... # instead 11:30
and make eager actually, well, eager
laben nine: btw how did you run more than 74 tests in hyper.t? 11:32
nine laben: I commented out the dieing unary hyper tests 11:33
11:34 CQ2 left 11:35 yqt joined, CQ2 joined 11:36 yqt left, cantaberry left, yqt joined 11:38 FROGGS_ joined
jnthn moritz: Maybe so, yes 11:39
In that case maybe eager promises a List if you do it to a Seq 11:40
timotimo Die Hyper, starring Bruce Willis 11:41
jnthn We'll lose the cute "lazy eager ..." trick that way though
(Lazily evaluate the whole thing in one go if we ever ask for any of it)
11:42 FROGGS left
jnthn But maybe that is rarely wanted, and we could easily introduce it under a new name. 11:42
Or even push it out to module space.
jnthn needs to rest a bit more
timotimo good rest, jnthn!
TimToady also notes that 'my @a = is already eager
jnthn TimToady: No, it's "mostly eager" 11:43
TimToady: That is, evaluates up to the first thing that says "I'm lazy"
TimToady okay, well, it's still something we can recognize at compile time
jnthn my @a = 1..Inf; # OK
eager my @a = 1..Inf; # hang
TimToady and we should optimize away array assignment copy most of the time anyway 11:44
(as P5 does already)
jnthn TimToady: What do you mean by "copy"? 11:45
TimToady well, the extra copy to prevent self-ref from busting, but this could do something similar
jnthn Oh, I already avoid that. 11:46
@a = 1, |@a; # works fine
@a = 1, @a; # works fine except you just creating an infinite data strucutre :)
TimToady okay, well, dinner here &
jnthn o/
masak .oO( this could be us but you just creating an infinite data structure ) 11:47
jnthn also bbl
timotimo huh? 11:50
masak: i don't get that :|
sjn s/infinite/circular/ # ? 11:51
arnsholt Well, circular structures are just a special case of infinite ones 11:52
masak they're a very space-efficient case. 11:53
timotimo: I was just riffing off of "this could be us but you playin", which, by the way, don't search for on Twitter :/
timotimo i have never heard that phrase ... how am i supposed to understand what it is if i'm not allowed to search for it? :) 11:59
_itz_ is there a more perl6ish way of timing out a section of code (using a promise or whatever) than the old alarm signal (probably not win32ish)@
12:00 laben left
timotimo we don't give you a way to stop a running piece of code dead in its tracks; you'll still have to have some sort of stop switch that you can flip 12:00
but yeah, a promise will help you there
one made from Promise.in(...) and another to signify the successful execution of the task 12:01
12:01 laben joined
timotimo then you await for Promise.any($timeout, $completed) and if after that the state of $completed isn't Kept, you flip the "abort" switch 12:01
_itz_ ok thanks
timotimo good luck :) 12:02
if you have something that gives you a Supply, you can usually close your tap on it and that may cause a proper abort. for things like async I/O. not sure about that, though 12:03
12:03 laouji left
masak there are some arguments that in an async setting, the observer *shouldn't* have the privs to cancel the observable. 12:05
though I confess to not understanding the arguments all too well yet. 12:06
it might be they apply only to individual promises.
timotimo i'd argue it's not really that
if you're an async line reader for a file and your only subscriber tells you "i'm not interested any more", then it's your choice if you cancel or keep going 12:07
12:07 laben left
timotimo if you have multiple subscribers, they don't individually have the power to stop you in your tracks 12:07
12:10 _itz joined 12:12 yqt left, newbie1 joined 12:13 colomon joined 12:18 diana_olhovik__ left, colomon left, colomon joined 12:20 colomon left 12:25 zakharyas left 12:26 FROGGS_ is now known as FROGGS
FROGGS jdv79: it is about the target directory for p6 dists 12:26
yoleaux 09:05Z <jdv79> FROGGS: irclog.perlgeek.de/perl6/2015-08-23#i_11103936 ?
12:27 zakharyas joined 12:29 brrt left, colomon joined
nine It's somewhat ridiculous how hard it is to get a List with the fully reified results from an iterator. 12:30
masak nine: isn't that what an eager evaluation would do?
12:31 colomon left
nine masak: but eager returns a Seq :) 12:31
12:31 colomon joined
masak oh, shucks! 12:32
jdv79 FROGGS: that much is clear.
masak ok, so then: why do you want a List, and not a Seq?
jdv79 but what of the extra mucking about?
in other words - why would we end up with Perl6/[pP]erl6 and, more importantly, why is that to be avoided? 12:34
nine masak: because hypers are supposed to be eager
jdv79 i tend to get a little over eager when i'm hyper; usually too much caffeine is the cause 12:35
12:35 colomon left
masak nine: I think the reason that answer confuses me is that it contains none of the words of my question. 12:35
I know hypers are eager.
what's the connection with List and Seq? 12:36
moritz nine: IMHO eager should return a List, not a Seq
nine masak: deepmap is implemented using an iterator and supposed to return the same type of object that it is iterating over (mostly List or Array). So I create a List or Array for the results using .from-iterator. But it has to eagerly process, so I .eager the List and suddenly return a Seq. 12:38
jdv79 doesn't .list on a Seq get you an eagerly produced List (and memoized)? 12:39
nine jdv79: no, just a list but not reified 12:40
dalek pan style="color: #395be5">perl6-examples: 573df66 | (Steve Mynott)++ | categories/cookbook/16processes/16-01-operation-timeout.pl:
import operation timeout example
masak nine: so the problem is that .eager returns a Seq, always? not a List?
jdv79 yeah , that didn't feel right after i typed it.
12:40 colomon joined
nine masak: yes 12:42
12:42 colomon left
masak nine: can you make .eager return a List? 12:43
nine masak: I can, but we'd still need a solution for irclog.perlgeek.de/perl6/2015-08-24#i_11105711 12:47
m: deepmap(&[-], [1, [2, 3]]) 12:51
GLRelia ( no output )
camelia ( no output )
nine m: say deepmap(&[--], [1, [2, 3]])
camelia rakudo-moar b56d59: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jWAaWaRYvm␤Unable to parse expression in infix noun; couldn't find final ']' ␤at /tmp/jWAaWaRYvm:1␤------> 3say deepmap(&[-7⏏5-], [1, [2, 3]])␤»
GLRelia rakudo-moar 3c83db: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CZDmDZpsLV␤Unable to parse expression in infix noun; couldn't find final ']' ␤at /tmp/CZDmDZpsLV:1␤------> 3say deepmap(&[-7⏏5-], [1, [2, 3]])␤»
nine m: say (-<<[1, [2, 3]]).perl 12:53
GLRelia rakudo-moar 3c83db: OUTPUT«(-1, -2).Seq␤»
camelia rakudo-moar b56d59: OUTPUT«(-1, [-2, -3])␤»
dalek kudo/glr: f8692f1 | (Stefan Seifert)++ | src/core/metaops.pm:
Fix deepmap applying the op to iterables instead of their contents

Fixes: -<<[1, [2, 3]]
[Coke] joins #perl, briefly - now 667 nicks in the channel. :P 12:54
masak neighbor of the beast 12:55
dalek kudo/glr: 65a02f4 | (Stefan Seifert)++ | src/core/metaops.pm:
Fix deepmap returning a Seq instead of the desired Listy type

If the object's type is List or a subclass of List, use the object's type for the result, so deepmap(op, (1, 2, [3, 4])) will return (op(1), op(2), [op(3), op(4)]). In other cases (like Seq or Range) use List.
masak nine++ # glr 12:56
nine .tell laben I fixed unary hypers so the tests don't die anymore. Now we can play around with HYPER more easily :)
yoleaux nine: I'll pass your message to laben.
nine Those hypers are surprisingly difficult to get right. 12:57
12:57 pmurias left
dalek ast/glr: fea1d1d | (Stefan Seifert)++ | S03-metaops/hyper.t:
GLRify a hyper test

Need a trailing comma now to create a one-element list
12:59
12:59 leedo joined
timotimo hypers are super useful, though 12:59
[Coke] wonders if b56d5938f7ee3271b59e1ebd91529024339c63c1 is going to print negative years incorrectly. 13:01
[Coke] realizes that it's probably fine, whoops.
13:01 brrt joined
jdv79 [Coke]: got your list of questions set? 13:02
jnthn nine: What's tricky about it, ooc? It should just be creating a fresh IterationBuffer, passing it to .push-all of the Iterator, then binding it to $!reified of a new List. 13:10
13:13 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
nine jnthn: it's tricky if you try it with high level constructs. 13:14
jnthn nine: Maybe List.from-iterator(the-iter).eager should do it 13:15
nine: That is, we make .eager on List and its subclasses mean "eagerify *yourself*"
nine jnthn: that's what I had there originally until I discovered that the eager returns a Seq 13:17
jnthn nine: Yeah, I'm thinking of chaning that
*changing
.sink returns Nil 13:18
.hyper/.race return HyperSeq
.lazy returns Seq
So it's not like there ain't precedent for .eager not returning something other than Seq ;)
nine That was just 4 negations in a somewhat short sentence... 13:19
jnthn Sorry, still a bit tired :)
[Coke] jdv79: I've had like 3 questions submitted. No, I'm not set at all. 13:20
pink_mist trying to parse that: there is precedent for .eager returning Seq? :P
dalek kudo/glr: ce93835 | (Stefan Seifert)++ | src/core/metaops.pm:
Better way to create the Listy return value of deepmap

Thanks to jnthn++ for pointing this out.
[Coke] thankfully, that's not until Friday.
jnthn pink_mist: Yes :) 13:21
pink_mist: no wait, there's precedent for .eager *not* returning Seq :)
pink_mist I assumed that's what you meant yes, but it could be parsed the other way :P 13:22
jnthn By this point I'd have been better just pushing the darn code :P
dalek pan style="color: #395be5">perl6-examples: 61df0a1 | (Steve Mynott)++ | categories/cookbook/19cgi-programming/19-01cgi-script.pl:
import a simple CGI (PSGI) example
13:23 zakharyas left, brrt left
dalek pan style="color: #395be5">perl6-examples: 45e72e9 | (Steve Mynott)++ | htmlify.pl:
categories added
13:28
13:30 Peter_R joined
ChoHag How long does the internet need to exist for before people stop taking *literally everything* it contains so seriously? 13:31
masak how dare you!! 13:32
:P
jnthn I literally hate how people misuse literally... :P 13:33
masak yeah, it's not very literary...
jdv79 never
jnthn
.oO( Literal programming: programming without the use of any variables, just literal data )
13:34
masak that's literally what it means 13:35
TimToady Hyper Text Markup Literals
masak it's better than lithographic programming where, once you write a line of code, it's set in stone. 13:36
TimToady in bronze age programming they invented casts 13:37
jnthn And of course we got dynamic compilation in...the medieval period 13:38
TimToady restricted to the scriptorium, alas
[Coke] jnthn: so you get to be home for about 2 days before heading back out? 13:39
13:39 zakharyas joined
jnthn [Coke]: I go to Stockholm *tomorrow* to collect wife, then we come to Olten on Wed. 13:40
So like 1 day 13:41
The washing machine is keeping busy :)
13:42 skids joined
moritz tomorrow's trend: lycantrophic progamming, where every method might turn into a were on full moon 13:45
arnsholt Heh. I just had to execute "grep -- --" 13:51
skids So I have one remaining single-item-rule question, which is, "is $[thing] supposed to shield [thing] from first-item semantics or not?" e.g. should we be doing an nqp::iscont test before looking whether it is an Iterable? 13:56
jnthn skids: Doesn't shield it 13:57
skids OK, so unshift/push will have to be fixed.
jnthn skids: Not unless you think $thing.map(...) also should
skids No not for methods surely.
13:57 khw joined
skids For sub forms. 13:57
m: my @a = 1,2; push @a, $[3,4]; # currently 13:58
GLRelia ( no output )
camelia ( no output )
skids m: my @a = 1,2; push @a, $[3,4]; @a.say; # currently
GLRelia rakudo-moar ce9383: OUTPUT«1 2 3 4␤»
camelia rakudo-moar b56d59: OUTPUT«1 2 (Any) (Any)␤»
skids m: my @a = 1,2; push @a, $[3,4]; @a.perl.say; # currently, sorry morning. 13:59
GLRelia rakudo-moar ce9383: OUTPUT«[1, 2, $[3, 4]]␤»
camelia rakudo-moar b56d59: OUTPUT«[1, 2, Any, Any]<>␤»
14:00 brrt joined 14:07 KotH_ joined 14:11 timotimo joined
skids The other thing I was noticing is that if we do have a situation where we want to pass "whether it was containerized" information on, and List immutability gets in the way of the use case, the only option is working with allcaps methods to abuse Array, since the normal methods itemize. 14:12
14:15 telex left
skids (For the record I do thing having $[] protect against first-element would be tenable, you'd just have to deal with explaining the difference beween $a = iterable and $a := iterable when passed to a sub and idiomize using sigilless for the latter.) 14:16
14:16 telex joined 14:17 colomon joined
skids Oh, also, is the join sub form going to keep flattening? It seems obvious the grep/first/index family need to lose it. 14:17
14:18 Ven joined 14:23 mjgardner joined, Ven left
skids m: my @a = "[1,2]", "3"; @a.pop; @a .= map: { "\$($_)" }; $parms = @a.join(","); EVAL "for $parms \{ .perl.say };"; # Answer to "why would you ever 'for $ {}'?" 14:30
camelia rakudo-moar b56d59: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ftalu4tSbj␤Variable '$parms' is not declared␤at /tmp/Ftalu4tSbj:1␤------> 3, "3"; @a.pop; @a .= map: { "\$($_)" }; 7⏏5$parms = @a.join(","); EVAL "for $parms ␤»
GLRelia rakudo-moar ce9383: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Lx6wrrtQw6␤Variable '$parms' is not declared␤at /tmp/Lx6wrrtQw6:1␤------> 3, "3"; @a.pop; @a .= map: { "\$($_)" }; 7⏏5$parms = @a.join(","); EVAL "for $parms ␤»
14:30 colomon left, colomon joined
dalek kudo/glr: 322e708 | (Stefan Seifert)++ | src/core/metaops.pm:
Fix "Seq already iterated" errors in HYPER(op, left, right)

Replaced the implementation by one that does not try to count the elements first and now is guaranteed to iterate only once over the input lists.
14:30
14:31 brrt left
nine With this we're down to 125/1047 spec test files failing :) And hopefully, hyper ops shouldn't be an issue anymore. 14:31
colomon \o/ 14:32
14:32 Ven joined
jdv79 woohoo 14:32
moritz nine++ 14:33
jnthn nine++
skids It'll go up again when we start correcting *@ in signatures, FWIW. Not to be a wet blanket.
nine++
moritz skids: maybe **@ helps? 14:34
m: sub f(**@x) { say @x.perl }; f 1, (2, 3), [4, 5]
GLRelia rakudo-moar ce9383: OUTPUT«[1, $(2, 3), $[4, 5]]␤»
camelia rakudo-moar b56d59: OUTPUT«(1; 2, 3; 4, 5)␤»
skids No, **@ creates more failures overall (I've been playing with it this weekend.)
Got a few fixes queued up and hopefully the whole thing doesn't mushroom before I can make a workable PR out of it. 14:37
14:38 newbie1 left
nine .tell laben I went ahead and pushed my new HYPER implemenation. hyper.t passes now completely. Your implementation was very useful for figuring out the required semantics, so thank you very much for that! 14:38
yoleaux nine: I'll pass your message to laben.
14:40 pyrimidine_ left 14:46 pyrimidine joined 14:47 pyrimidine left, pyrimidine joined, pyrimidine left 14:48 pyrimidine joined, rurban_ joined 14:50 colomon left 14:54 rurban joined 15:00 mjgardner left, KotH_ is now known as KotH
moritz m: my ($type, $motivation); :(:$type, :$motivation) := (type => 'geek', motivation => '-Ofun'); 15:04
GLRelia rakudo-moar 322e70: OUTPUT«Too many positionals passed; expected 0 arguments but got 2␤ in block <unit> at /tmp/u0sbQfOYIr:1␤␤»
camelia ( no output )
moritz presumably that's because the RHS used to be a Capture, and isn't anymore 15:07
but beyond that, I'm at a loss
masak something passes 2 (positional) arguments to something...? 15:09
moritz seems it mis-classifies the arguments as positional
m: my ($a, $b); :($a, $b) := (1, 2); say $b 15:10
GLRelia rakudo-moar 322e70: OUTPUT«2␤»
camelia rakudo-moar b56d59: OUTPUT«2␤»
moritz m: my ($a, $b); :($a, $b) := (1, x => 2); say $b 15:11
GLRelia rakudo-moar 322e70: OUTPUT«x => 2␤»
camelia rakudo-moar b56d59: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/ZFnaTMVXMh:1␤␤»
moritz yes, definitely mis-classified
15:11 mjgardner joined
ShimmerFairy m: say \(1, x => 2).WHAT 15:12
GLRelia rakudo-moar 322e70: OUTPUT«(Capture)␤»
camelia rakudo-moar b56d59: OUTPUT«(Capture)␤»
ShimmerFairy not sure why you should expect a Capture where you didn't specify one :)
jnthn m: (1, x => 2).Capture.perl.say 15:19
GLRelia rakudo-moar 322e70: OUTPUT«\(1, :x(2))␤»
camelia rakudo-moar b56d59: OUTPUT«\(1, :x(2))␤»
jnthn Hm, was thinking that may show the issue, but no...
m: (1, x => 2).Capture.hash.perl.say
GLRelia rakudo-moar 322e70: OUTPUT«EnumMap.new()␤»
camelia rakudo-moar b56d59: OUTPUT«EnumMap.new(:x(2))␤»
jnthn Oh...
OK, that one does :)
15:26 mjgardner left 15:30 laben joined
laben i'm back, #perl6 15:33
yoleaux 12:56Z <nine> laben: I fixed unary hypers so the tests don't die anymore. Now we can play around with HYPER more easily :)
14:38Z <nine> laben: I went ahead and pushed my new HYPER implemenation. hyper.t passes now completely. Your implementation was very useful for figuring out the required semantics, so thank you very much for that!
laben nine: very good work, nine++. i'm gonna fix up my repo and rebuild asap 15:34
nine The Capture thing is one of the issues in panda 15:36
skids jnthn: I have a fix for that I think as part of my flattening hunting. 15:37
skids extracts it from his git diff.
15:38 zakharyas left
skids gist.github.com/skids/4f6ff2e1c1e3b6855773 15:38
15:38 Ven left
skids Oh but, join is still flattening in mainline glr, that should only be needed in my tree. 15:39
Weird.
Oh, nm that was just for the gistperl. 15:40
15:41 rurban left, yqt joined, araujo left 15:43 pnu left, pnu joined, pnu left, pnu joined 15:44 araujo joined
laben m: say (1..3).map(*.succ) >>~<< ('B'..'H').map(*.pred) 15:47
GLRelia rakudo-moar 322e70: OUTPUT«2A 3B 4C 2D 3E 4F 2G␤»
camelia rakudo-moar b56d59: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<~> are not of the same length␤left: 3 elements, right: 7 elements␤ in block <unit> at /tmp/FD1wy5YNzN:1␤␤»
laben nine: ^^^ 15:48
skids Anyway, I updated that gist to just have the things I have patched in my tree where I found core code expecting flattening where it may go away.
In case anyone starts playing with that.
15:51 araujo_ joined
nine laben: darn...there doesn't seem to be a spec test for that 15:52
15:53 MilkmanDan left
dalek rl6-roast-data: a558084 | coke++ | / (10 files):
today (automated commit)
15:53
15:53 araujo_ left
nine Though there are spec tests for non-dwimmy hyper ops with unequal list size. They even test the elems in the exception message. 15:53
[Coke] glr actually passing 5 less tests today.
15:54 araujo_ joined
nine [Coke]: sounds like we should start today's work for real 15:54
15:54 araujo left
laben nine: dont worry, i'll work on it myself, you can work on others more pressing issues 15:54
nine laben: ok :)
laben: have fun!
15:55 abraxxa left 15:56 araujo_ left 15:57 araujo_ joined, MilkmanDan joined 15:58 araujo_ left 15:59 araujo_ joined, pnu left, pnu joined, pnu left, pnu joined
b2gills Originally I thought something like 「A >>OP<< B」 just stopped when the shortest of the two lists ran out of elements. 15:59
16:01 araujo_ left
laben b2gills: it's specced to throw if they arent of the same length. if you point the hyper to the shortest one, it will instead work until the shortest end. viceversa, you point it to the longest and it works until the longest runs out 16:01
b2gills It will extend it out, which may not be what you want, and yes I know that now 16:02
laben if you point to both, it will automatically do up to the longest
b2gills What if you want it to not extend
laben point the hyper to the shortest 16:03
sorry i got it backwards
16:03 Ven joined
laben if B is shorter, A >>op>> B will lengthen B while A <<op<< B will shorten A 16:04
b2gills The way it works now 「<<OP<<」 「<<OP>>」 「>>OP>>」 are quite a bit different than 「>>OP<<」 16:05
laben >>op<< is just stricter, works only if both sides have the same length
b2gills I know that, and it isn't very useful
If you think of >>OP>> as *stop* when the left is out of elements and <<OP<< as stop when the right is out of elements then >>OP<< would be stop when either is out of elements ( and would be more tenable in a lazy list world ) 16:07
laben m: say (1..3).map(*.succ) Z~ ('A'..'S').map(*.succ) 16:09
GLRelia rakudo-moar 322e70: OUTPUT«2B 3C 4D␤»
camelia rakudo-moar b56d59: OUTPUT«2B 3C 4D␤»
laben b2gills: maybe, you will need to speak to jnthn or to TimToady, as we would need to change the spec 16:10
16:12 AlexDaniel joined
moritz m: say 1 <<+<< 4, 5, 6 16:15
GLRelia rakudo-moar 322e70: OUTPUT«556␤»
camelia rakudo-moar b56d59: OUTPUT«556␤»
moritz m: say 1 >>+<< 4, 5, 6
camelia rakudo-moar b56d59: OUTPUT«556␤»
GLRelia rakudo-moar 322e70: OUTPUT«556␤»
moritz m: say 1 >>+>> 4, 5, 6
camelia rakudo-moar b56d59: OUTPUT«556␤»
GLRelia rakudo-moar 322e70: OUTPUT«556␤»
moritz m: say 1 <<+>> 4, 5, 6
GLRelia rakudo-moar 322e70: OUTPUT«556␤»
camelia rakudo-moar b56d59: OUTPUT«556␤»
moritz oh
I guess I should take care of precedence :/ 16:16
m: say 1 <<+<< (4, 5, 6)
GLRelia rakudo-moar 322e70: OUTPUT«5 6 7␤»
camelia rakudo-moar b56d59: OUTPUT«5 6 7␤»
moritz m: say 1 <<+>> (4, 5, 6)
camelia rakudo-moar b56d59: OUTPUT«5 6 7␤»
GLRelia rakudo-moar 322e70: OUTPUT«5 6 7␤»
moritz m: say 1 >>+>> (4, 5, 6)
GLRelia rakudo-moar 322e70: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 1 elements, right: 3 elements␤ in block <unit> at /tmp/ffZGE3c52g:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 1 elements, right: 3 elements␤ in block <unit> at /tmp/qexUnTzTu4:1␤␤»
moritz m: say 1 >>+<< (4, 5, 6)
GLRelia rakudo-moar 322e70: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 1 elements, right: 3 elements␤ in block <unit> at /tmp/s0sLEeuXSF:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 1 elements, right: 3 elements␤ in block <unit> at /tmp/qO7cdPK5uv:1␤␤»
nine m: my Int @a; @a[0] := "a"; 16:18
GLRelia ( no output )
camelia ( no output )
16:19 salva left 16:20 hoelzro joined
tony-o gist.github.com/tony-o/b033edd8151b92863a99 16:22
oops
16:29 dakkar left 16:38 colomon joined 16:39 yqt left 16:40 salva joined, araujo joined, araujo left, araujo joined, araujo left, yqt joined 16:41 salva left, salva joined 16:42 mjgardner joined 16:43 gagalicious left
dalek pan style="color: #395be5">perl6-examples: 873efab | (Steve Mynott)++ | / (3 files):
two pattern matching examples
16:46
kudo/glr: 9e28e48 | (Stefan Seifert)++ | src/core/Array.pm:
Restore type checks in Array.push

  @a.push: 1, 2, [3] now correctly throws a type checking exception
16:49
16:49 araujo joined 16:50 araujo left
dalek kudo/glr: 5fd43b9 | moritz++ | src/core/List.pm:
GLRify permutations
16:51
ast/glr: bfea81d | (Stefan Seifert)++ | S12-attributes/instance.t:
GLRify typed array push test

The array did get flattened thwarting the type checking test.
16:52
masak m: .say for "GLR".comb.permutations.map(*.join) # GLR permutations 16:54
GLRelia ( no output )
camelia rakudo-moar b56d59: OUTPUT«GLR␤GRL␤LGR␤LRG␤RGL␤RLG␤»
moritz likes RGL, "Really Great List" :-) 16:55
16:56 araujo joined, araujo left, araujo joined 16:57 araujo left
masak or "Retired, Gleefully Lecherous" 16:58
16:59 domidumont left, Ven left
ChoHag How often does GLRelia rebuild itself? 17:00
moritz _itz should know 17:02
ChoHag GLRelia: How often do you rebuild yourself? 17:03
_itz it checks to see if the branch has commits every 5
mins 17:04
17:05 araujo joined, araujo left, araujo joined 17:07 virtualsue left 17:09 domidumont joined
nine m: .say for "GLR".comb.permutations.map(*.join) # GLR permutations 17:10
GLRelia rakudo-moar 5fd43b: OUTPUT«GLR␤GRL␤LGR␤LRG␤RGL␤RLG␤»
camelia rakudo-moar b56d59: OUTPUT«GLR␤GRL␤LGR␤LRG␤RGL␤RLG␤»
moritz m: .say for "GLR".comb.permutations>>.join 17:11
GLRelia rakudo-moar 5fd43b: OUTPUT«GLR␤GRL␤LGR␤LRG␤RGL␤RLG␤»
camelia rakudo-moar b56d59: OUTPUT«G␤L␤R␤G␤R␤L␤L␤G␤R␤L␤R␤G␤R␤G␤L␤R␤L␤G␤»
moritz GLR++
dalek kudo/glr: 592e048 | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
Fix perl6 -n -e

FOR is gone. It's just map now!
moritz nodal >> actually works
17:11 Ven joined 17:13 diana_olhovik_ joined, MilkmanDan left
nine Funny coincidence. I knew how to fix that FOR because just this morning I looked up what for compiles to when answering Ven 17:14
Ven nine: I've been told my rubber ducking skills are good several times already. ;-)
nine (rubber ducks)++ :) 17:15
Ven (fwiw, I got that insight from ShimmerFairy++)
moritz nine: fwiw the optimizer also has an occurence of the word FOR
might be able to change that to 'for' too, maybe
nine moritz: to 'map', there is no for anymore :) It _is_ map now
moritz erm, yes
I'll try it, but do a before/after spectest, jsut to be sure 17:16
nine moritz: thanks!
17:17 yqt left
Ven I'm not sure how to fix the test file I had picked. I can just fix $i to be 3, but then I probably have to remove the references to the tickets? that's lost history, but since glr changes everything, does it matter? 17:18
moritz Ven: what does the test do?
Ven (I was about to ask "and are these tests still relevant?", but I guess the answer is always "yes" ...)
moritz: $i++ for $(1, 2, 3); and expect 1
moritz m: my $i = 0; $i++ for $(1, 2, 3), ; say $i 17:19
GLRelia rakudo-moar 592e04: OUTPUT«1␤»
camelia rakudo-moar b56d59: OUTPUT«1␤»
moritz Ven: ^^ that might be a way to keep the spirit of the test
even though the exact details are changes
Ven moritz: no, because the test makes an explicit test of that .item
I wouldn't be testing the same thing - that's a totally different test. I mean, I can surely remove the old one and add this one 17:20
moritz m: my $i = 0; $i++ for flat $(1, 2, 3), ; say $i
GLRelia rakudo-moar 592e04: OUTPUT«1␤»
camelia rakudo-moar b56d59: OUTPUT«1␤»
moritz that's the closest you can get to observing itemization in list iteration today 17:21
m: my $i = 0; $i++ for flat (1, 2, 3), ; say $i
GLRelia rakudo-moar 592e04: OUTPUT«3␤»
camelia rakudo-moar b56d59: OUTPUT«3␤»
Ven moritz: again – that's not actually what the test was meant to, imho
moritz Ven: well, you can do that, or set the expectation to 3, or remove it 17:23
Ven: at your discretion; there's no one-size-fits-all recipe 17:24
Ven moritz: I'd love your opinion... the test is t/spec/S02-types/array.rakudo.moar, 3rd test
17:24 [Sno] left
moritz Ven: that's already adapted.... are you in branch glr, and on the latest commit? 17:25
Ven moritz: ah, I think I might've cloned a bit before your fix :-) 17:26
17:28 spider-mario joined
moritz Ven: git pull! 17:28
Ven moritz: right :-)
[Coke] I hear TimToady is going to PPW2015 - any other sixers going? 17:33
That's actually drivable for me. 17:34
Ven doesn't know what PPW2015 is
Polish Perl Workshop?
ugexe pittsburgh 17:35
[Coke] pghpw.org/ppw2015/ 17:36
17:38 espadrine left 17:40 Ven left
dalek rl6-roast-data: a1315c2 | coke++ | / (2 files):
another glr run today
17:40
17:41 Ven joined
[Coke] m: say 117267 - 117049; # since this morning. 17:41
GLRelia rakudo-moar 592e04: OUTPUT«218␤»
camelia rakudo-moar b56d59: OUTPUT«218␤»
17:41 iGrrr joined
dalek kudo/glr: 82830e3 | moritz++ | src/Perl6/Optimizer.nqp:
"FOR" is gone, long live map
17:41
17:41 MilkmanDan joined
moritz [Coke]: increase in passing tests, I hope 17:41
17:41 mohij joined, iGrrr left
dalek ast/glr: b1b1ef2 | moritz++ | integration/99problems-21-to-30.t:
Relax a type check
17:43
[Coke] moritz: yes. 17:45
dalek kudo/glr: a695a58 | (Stefan Seifert)++ | src/core/Array.pm:
Implement type checks in Array[Type].new(...)

Need to create $!descriptor manually in that case as the compiler doesn't seem to do it for us.
nine powered by a really decent matcha latte 17:46
[Coke] ... looks like I'll have to do another run soon. :)
Ven nine++ :)
[Coke] note that due to unicode shenanigans, glr is already doing better than nom-jvm. :)
nine The only GLR comment in Array.pm is about method plan, and I have no idea what its purpose is.
17:47 rurban joined
jnthn nine: .plan should push to the end of $!future in $!todo (and if there's no todo, or no future, create it as needed) 17:47
.oO( "this array has no future!" )
nine I cannot find any place where this would be called? 17:48
laben jnthn: what do you think about this? [18:08] <b2gills> If you think of >>OP>> as *stop* when the left is out of elements and <<OP<< as stop when the right is out of elements then >>OP<< would be stop when either is out of elements ( and would be more tenable in a lazy list world )
jnthn nine: It's a public API method 17:49
laben: I think that's what Z is for :) 17:50
(And Z is also lazy)
laben jnthn: but Z is lazy, while >>op<< is eager
jnthn Note that >>+<< on a native array will end up with a fairly different implementation eventually also, to provide access to CPU SIMD stuff 17:51
And so we want semantics that'll work out well there too
nine: I...hope we have tests for it ;) 17:52
nine jnthn: nope, not a single one it seems
jnthn eek
Guess we should write some :)
nine lots of hits for "plan" in t/spec, but all about test plans (or interplanetary matters)
17:53 Ven left
nine Folks we're down to 120 failing files 17:53
17:53 TEttinger joined
laben jnthn: which means? >>op<< doing the current thing (throwing if sides have different length) or the other thing (stopping at the shortest one, independent of side)? 17:53
17:54 andreoss joined
laben stopping at the shortest one ==> stopping when the shortest ends 17:54
it would indeed be symmetric with <<op>> stopping when the longest one ends 17:55
17:55 llfourn left 17:56 andreoss left
jnthn laben: I think throwing when they're not equal is the right thing here 17:57
It makes you think whether the auto-exend semantics is actually the right thing 17:58
*extend
I guess TimToady++ will backlog this at some point and give the idea another look over though :)
dinner &
laben mh, but there wouldn't be an eager way to stop when the shortest one ends unless you know the side 17:59
masak nine: er, can you do `next LABEL` if -n is just .map ? 18:08
er, I mean `next LINE` 18:09
moritz jnthn: the 'for range' optimization probably needs a second look; I've done s/FOR/map/, but it still looks at infix:<,> which I think we don't use anymore 18:17
hoelzro o/ #perl6
18:18 araujo_ joined 18:20 araujo__ joined 18:21 CQ2 left, araujo left
jnthn masak: Should work; no objections from me if you commit a patch dong that 18:22
lol
doing
moritz: Yeah, it should be simpler :) 18:23
18:23 araujo_ left
jnthn I'll get to it if nobody else does :) 18:23
nine masak: since for supports labels, -n should do so, too. Both are just map 18:25
jnthn That said, I don't think I put labels support back into the map iterator stuff...maybe somebody else already did :) 18:27
It should be an easy patch
nine I think FROGGS++ did 18:28
github.com/rakudo/rakudo/blob/glr/...ds.pm#L150 18:29
Here: github.com/rakudo/rakudo/commit/08...22d7463067 18:30
jnthn yowser, so code duplication
FROGGS nine: aye 18:31
jnthn FROGGS: Is there a way we can just create a unique label that will never match and use it as the default if no label is supplied?
FROGGS jnthn: do you have a better idea?
hmmm
jnthn FROGGS: Or since it just compares objects, just Mu will do, no?
FROGGS aye
jnthn oh, and you've a nasty bug 18:32
FROGGS O.o
jnthn $label is a lexical
And classes are not closures
FROGGS ups
jnthn $label needs to be given to the constructor and addressed as $!label
No worries. But glad I spotted it, that woulda been a very annoying one to debug later :) 18:33
FROGGS hehe, yeah :o)
dalek ast/glr: 9bc2a34 | (Stefan Seifert)++ | S32-hash/perl.t:
No more <> in Hash.perl output with GLR :)
kudo/glr: e567788 | (Stefan Seifert)++ | src/core/EnumMap.pm:
Make .kv and .values on Hashes rw
nine m: say (1, 2, 3) === (1, 2, 3) 18:34
camelia rakudo-moar b56d59: OUTPUT«True␤»
GLRelia rakudo-moar a695a5: OUTPUT«False␤»
nine jnthn: is there a way to fix this? ^^^ 18:35
jnthn Implement WHICH in List
Trouble is, it'll be inherut by Array :/
Which'll then need it overriding to go on identity again 18:36
nine But that would be just a couple of lines copied from Mu, wouldn't it?
jnthn aye 18:37
And nom branch's src/core/Parcel.pm probably has a WHICH you can draw inspiration from 18:38
nine I just copied that to start :)
18:39 yqt joined
nine 118 btw. 18:39
timotimo so ...
turns out i'm not insane
18:39 araujo__ left
timotimo compiling the core setting with --optimize=off gives you a core setting that explodes when loaded 18:40
18:40 araujo joined
nine Well, I've always heard that Perl 6 needs an optimizing compiler to really work... 18:40
timotimo at least this tells me my patch towards the optimizer to get lexicalref to localref lowering back in isn't breaking that particular thing 18:41
nine Wow, Parcel's implementation works unchanged! Of course, it can be optimized quite a bit. 18:44
18:44 rangerprice joined
rangerprice Hi 18:44
masak hi, rangerprice 18:48
FROGGS has somebody fixed t/spec/S16-filehandles/io.rakudo.moar? 18:50
dalek kudo/glr: acea21c | (Stefan Seifert)++ | src/ (3 files):
Fix (1, 2, 3) === (1, 2, 3)

Fixed by implementing List.WHICH. Have to override again in Array with the implementation from Mu, since Array is mutable.
18:51
nine This fixes another 4 spec test files! Down to 114/1047 failing.
jnthn: thanks for the hint!
FROGGS \o/
nine++
nine jnthn++ 18:52
18:52 Nlhj joined, Nlhj left 18:59 rangerprice left
nine m: $o = 1; $o.map({ $_ = 2; }); say $o.perl; 18:59
GLRelia rakudo-moar acea21: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QY5zI8_ljz␤Variable '$o' is not declared␤at /tmp/QY5zI8_ljz:1␤------> 3<BOL>7⏏5$o = 1; $o.map({ $_ = 2; }); say $o.perl␤»
camelia rakudo-moar b56d59: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3bS1Bj_X0C␤Variable '$o' is not declared␤at /tmp/3bS1Bj_X0C:1␤------> 3<BOL>7⏏5$o = 1; $o.map({ $_ = 2; }); say $o.perl␤»
nine m: my $o = 1; $o.map({ $_ = 2; }); say $o.perl;
GLRelia rakudo-moar acea21: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/6G6Cj04E5u:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/oZC3tuyipq:1␤␤»
nine m: my $o = 1; $o.map(-> $i is rw { $i = 2; }); say $o.perl;
camelia rakudo-moar b56d59: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/TtvMv6Z9O_:1␤␤»
GLRelia rakudo-moar acea21: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/3oFcsYzjTG:1␤␤»
nine m: my $pair = (a => 1); for $pair.value { $_ = 2; }; say $pair.perl; 19:00
camelia rakudo-moar b56d59: OUTPUT«:a(2)␤»
GLRelia rakudo-moar acea21: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/trL1nqbOOM:1␤␤»
moritz my $v = 1; my $pair = (a => $v); for $pair.value { $_ = 2; }; say $pair.perl;
m: my $v = 1; my $pair = (a => $v); for $pair.value { $_ = 2; }; say $pair.perl;
GLRelia rakudo-moar acea21: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/4sNfR3Ppeg:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«:a(2)␤»
19:01 ChoHag left
nine I'd say that's because for $pair.value is $pair.value.map which invokes Any's .list on the value which creates a List which is immutable 19:04
FROGGS nine: 138 tests fail in my last spectest run
nine FROGGS: that's 24 more fails than here?!
moritz FROGGS: is your t/spec on the 'glr' branch? 19:05
FROGGS moritz: aye
moritz spectests 19:06
FROGGS moritz: all is on HEAD and moarvm=master,nqp=master,rakudo=glr,roast=glr
moritz FROGGS: my spectest will finish soon
(I hope :-)
FROGGS summary: gist.github.com/FROGGS/fe6aeb2a9cc9cd367ec6
moritz yes, I also get 138 failures 19:07
(with recommended NQP and MoarVM versions) 19:08
FROGGS t/spec/S02-literals/adverbs.rakudo.moar reveals:
nine :(
FROGGS Invocant requires an instance of type List, but a type object was passed. Did you forget a .new?
in sub is-deeply at lib/Test.pm:454
in block <unit> at t/spec/S02-literals/adverbs.rakudo.moar:13
nine: might just be something silly
nine I'm re-running now. May have missed some when counting 19:09
FROGGS Invocant requires an instance of type List, but a type object was passed. Did you forget a .new?
at src/gen/m-BOOTSTRAP.nqp:2961 (blib/Perl6/BOOTSTRAP.moarvm::144)
from src/gen/m-CORE.setting:11862 (/home/froggs/dev/nqp/install/share/perl6/runtime/./CORE.setting.moarvm:WHICH:18)
from src/gen/m-CORE.setting:2113 (/home/froggs/dev/nqp/install/share/perl6/runtime/./CORE.setting.moarvm:infix:<===>:37)
nine: ^^
laben i'm getting something new from sanity tests: "t/01-sanity/99-test-basic.t" says "Parse errors: No plan found in TAP output"
FROGGS seems to be List.WHICH 19:10
masak a .WHICH! 19:11
19:12 domidumont left
moritz nine: ah, should be multi method, probably 19:12
nine I get the 99-test-basic.t fail, too. Investigating...
moritz m: List.WHICH 19:13
GLRelia rakudo-moar acea21: OUTPUT«Invocant requires an instance of type List, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/3nGARmios7:1␤␤»
camelia ( no output )
nine moritz: ah, of course it should be
FROGGS testing...
dalek kudo/glr: 0659059 | moritz++ | src/core/List.pm:
make WHICH a multi method
19:14
19:14 rangerprice joined
moritz it compiles 19:15
FROGGS aye, looks good
rangerprice Hi
moritz which means it's likely an improvement
the "make test" failure is now gone 19:16
only t/04-nativecall/16-rt125408.t remaining
laben sanity fixed, confirmed
m: List.WHICH 19:17
GLRelia ( no output )
camelia ( no output )
nine Soo...how many spec test file failures do you get with this fix? 19:19
It's 115 here
moritz still running
114 here 19:20
probably the lock.t flapper, or something
nine Yep. I've seen 114 here before 19:21
moritz FROGGS++ # noticing the regression
nine FROGGS++ indeed! That timely report made it quite easy to pinpoint 19:22
dalek rl6-roast-data: 4e98745 | coke++ | / (2 files):
another glr run for today
FROGGS nine / moritz: down to 115 here
19:23 vendethiel joined
laben testing ecosystem... File::Find and Shell::Command work fine without patches for glr (i closed my PRs), panda works with patches, XML and others seem fine 19:24
[Coke] github.com/coke/perl6-roast-data/b...ummary.out has a bunch of TODO PASSED that might be unfudgeable.
masak .oO( [unfudge]-able ) 19:25
[Coke] 1668 individual test failures (not file) on the last run i did. 19:26
19:26 mr-foobar joined
[Coke] set, mixhash, and baghash have a large number of aborted tests. 19:27
19:27 agaurav77 joined
[Coke] S32-array/splice.rakudo.moar aborted 301 test(s) 19:28
agaurav77 Hi everyone, I'd like to contribute to Perl6, what should I do to get started?
moritz agaurav77: what would you like to do? write mdoules? write docs? enhance the compiler? organize a conference?
[Coke] agaurav77: do you know Perl5? C? Java? 19:29
masak agaurav77: cool! my tip is to start small. do something you like. experiment. ask questions.
dalek ast/glr: f2d05fa | moritz++ | S03-operators/value_equivalence.t:
unTODO a now passing test
masak agaurav77: believe it or not, that will help a lot.
agaurav77 uhm, I'm a bit familiar with Perl5
masak agaurav77: if you highlight pain points, things that are tricky to understand right now, we'd be grateful.
agaurav77 sure
19:30 MilkmanDan left
agaurav77 first off, what kind of VCS do you use? git or hg? 19:30
laben unfugde ==> defudge?
[Coke] mostly git.
moritz laben: yes
agaurav77 cool :)
[Coke] laben: yes.
19:30 MilkmanDan joined
agaurav77 I'd like to enhance the compiler and (maybe) write modules, though I'm unsure of the latter 19:31
FROGGS moritz: is there a reason why glr-test-failures-annotated is only 107 lines long?
agaurav77 I had a project with NaCl about porting Perl5 to Chrome
19:31 rurban_ left
masak agaurav77: if you'd like to contribute to the compiler, then there's a rich ticket queue at RT to look at. 19:31
agaurav77 so I guess I can help wit that
oh okay
where's RT btw? 19:32
masak rt.perl.org
there's a perl6 queue on there. with ~1k new/open tickets. 19:33
agaurav77 okay, cool
thanks for the help :)
masak anytime. 19:34
agaurav77 do you guys have an IRC channel at irc.perl.org as well?
laben i would say starting with the compiler while not knowing perl6 to be a bit too hard, maybe?
FROGGS agaurav77: no, only here 19:35
masak agaurav77: no, it's here on freenode for historical reasons.
agaurav77 ah, np
19:36 [Sno] joined
rangerprice i.imgur.com/Gu6bBV1.png 19:37
19:37 Ven joined
moritz my @a = 1, 2, 3; say array[int].new(@a) 19:38
m: my @a = 1, 2, 3; say array[int].new(@a)
GLRelia rakudo-moar 065905: OUTPUT«1 2 3␤»
camelia rakudo-moar b56d59: OUTPUT«1 2 3␤»
19:38 muraiki joined
dalek kudo/glr: 9288825 | (Stefan Seifert)++ | src/core/native_array.pm:
Fix endless loop trying to assign an infinite list to a native array

method infinite is all but gone. Check for is-lazy instead to throw an appropriate exception.
19:39
ast/glr: 572075c | (Stefan Seifert)++ | S32-array/splice.t:
Unlock a whole lot of S32-array/splice.t tests

Just need some explicit flattening when preparing the test data.
masak the splice must flow!
DrForr I take it $*WARNINGS from the old synopsis is gone? 19:40
19:40 agaurav77 left
masak DrForr: I think it's NYI, and might never be. 19:41
moritz nine: there are still several remaining .infinite calls
DrForr Good, happy to hear that it's deprecated with prejudice :)
19:41 [Sno] left
moritz I'll try to remove some 19:41
masak DrForr: to be specifics, there is currently not really a -w to turn off :) nor will there ever be, probably 19:42
specific*
19:42 Ven left
DrForr I believe +1 is my comment there :) 19:42
19:42 [Sno] joined
sjn ^H^H^H 19:44
masak sjn: 19:45
sjn ^^
masak (don't mind us, we're using black ink to communicate.)
er, transparent ink. whatever.
sjn what a coincidence! I'm too! :D
masak "black ink" is only funny if your terminal background is black, I guess.
labster black ink with opacity: 0 19:46
masak that's one of my favorite opacities
dalek kudo/glr: 1e5019c | moritz++ | src/core/ (2 files):
More s/infinite/is-lazy/
19:47
sjn Having said that,
'nuff said.
dalek ast/glr: 8cf16fd | moritz++ | S09-typed-arrays/native- (2 files):
s/infinite/is-lazy/ in native array tests
labster .u 19:48
yoleaux Search for a Unicode character by codepoint, name, or raw character
moritz uhm, Range has an attribute(!) $.infinite that's always set to False 19:49
wtf?
jnthn Kill it! 19:50
moritz willdo
19:51 llfourn joined
dalek kudo/glr: cfc79e2 | moritz++ | src/core/ (2 files):
Kill Range.infinite in favor of is-lazy
19:52
timotimo who has articles to link to for the weekly? 19:54
moritz uhm, did I just break the build?
19:55 AlexDani` joined, AlexDaniel left
dalek kudo/glr: 043ddc7 | moritz++ | src/core/ (2 files):
Revert "Kill Range.infinite in favor of is-lazy"

This reverts commit cfc79e24ac11e8d35d2e24a72eeb17e3b708242e. Because it broke the build :(
19:56
19:56 llfourn left
moritz oh, it wasn't always false 19:57
now I understand
_itz timotimo: I noticed a couple of new slide decks on www.reddit.com/r/perl6/
timotimo ah, right, YAPC::Asia was happening, right? 19:58
moritz ranges .infinite is actually about infinity, not just laziness
I'll add is-lazy as an alias for .infinite now
_itz is "Kruthik Dhillon" a pseudonym? 19:59
20:02 mjgardner left
_itz timotimo: you could also put my www.youtube.com/watch?v=BQfP5o_0YzY in the weekly 20:04
20:04 mjgardner joined
_itz twitter.com/ultimatto has a nice one liner 20:07
`gotty -w perl6 --setting=RESTRICTED` with GoTTY - Share your terminal as a web application 20:08
20:08 espadrine joined
dalek ast/glr: 32208a6 | moritz++ | integration/99problems-11-to-20.t:
Relax a type check
20:10
20:10 xfix left
timotimo _itz: the audio on that recording isn't terribly good, is it? ;_; 20:10
certainly too quiet for my weaksauce laptop speakers 20:11
dalek rl6-roast-data: 9daf684 | coke++ | / (2 files):
another glr run for today
20:12
_itz timotimo: no it was pretty awful just done on sue's mobile
timotimo damn :( 20:14
_itz we tried another version at www.youtube.com/watch?v=BQfP5o_0YzY but it probably isn't much better
dalek ast/glr: efc399f | moritz++ | integration/99problems-41-to-50.t:
Add some flattening to gray code functions

still does not pass, but gets fruther than before
[Coke] jnthn: btw, glr branch now at 98.69% of nom.
timotimo i wonder if it would have helped any if you had been recording audio from your laptop, as it's much closer to you
_itz: that's the exact same link :) 20:15
dalek kudo/glr: 7bc1a99 | moritz++ | src/core/ (4 files):
More thorougly replace .infinite with .is-lazy

only Range.infinite remains, because there it actually is about infinity rather than laziness
20:15 darutoko left, espadrine left, brrt joined
_itz sorry I meant www.youtube.com/watch?v=FEGKzaEhhZs 20:16
I did try processing the audio but you can't really make a purse from a sow's ear
20:16 diana_olhovik_ left
masak I imagine a sow's ear could store coins quite well 20:17
20:18 amurf joined
_itz actually it should have been "silk purse" :) 20:18
timotimo yeah, that's much louder at least ;)
_itz and historywired.si.edu/object.cfm?ID=535 says you can 20:19
20:20 virtualsue joined
timotimo i won't be giving a talk during SPW, but do we have some kind of recording setup ready to go? 20:21
_itz: what kind of fixture did you use for holding the phone still?
20:22 amurf left
timotimo _itz: regretfully, the slides are not easy to make out once it gets to code and the video description doesn't have a link to the slide set :( 20:22
20:23 nowan left
_itz timotimo: ~20EU amazon iphone stand 20:23
timotimo ah, hehe
20:23 zakharyas joined
_itz we figured (maybe wrongly) any sort of video was better than none 20:24
timotimo that's right
_itz and the links are in the comments
timotimo oh! but only for the non-enhanced version
(which is what i'm looking at now)
_itz FEGKzaEhhZs has same links
I think you have to click more or similar 20:25
timotimo my head's currently formulating an idea where you'd click the corners of the projection area and annotate the video with when exactly the slides get switched back/forth and then providing the slide set would give you a higher quality video with the slides projected into the scenery "in post" :P
20:25 brrt left
_itz I did think of putting the audio on video of slides but I'm not really a video editor person 20:26
timotimo oh, that's not so difficult ... except the program i'd be suggesting is kdenlive which is super crashy 20:27
20:28 virtualsue left
timotimo if you had set the license to a CC license instead of youtube standard license, i could use their online video editor to remix it and see what that thing can do :) 20:28
_itz I was pretty much swearing at iMovie and I thought the Mac was supposed to be easy with video
20:28 telex left
timotimo www.youtube.com/editor - this thing can probably help you very well 20:29
20:29 KCL joined
timotimo it has an "add photos" thing, there's probably some nice little tool to turn a pdf into "screen shots" of the individual pages 20:29
20:30 zakharyas left
nine jnthn: array.new takes *@values while Array.new takes **@values. Which one is right? 20:30
.tell jnthn array.new takes *@values while Array.new takes **@values. Which one is right?
yoleaux nine: I'll pass your message to jnthn.
20:30 telex joined
_itz asks virtualsue to set to CC 20:30
jnthn **
yoleaux 20:30Z <nine> jnthn: array.new takes *@values while Array.new takes **@values. Which one is right?
timotimo the youtube editor doesn't support pdf as "photos" for upload, sadly 20:31
moritz is array multi-dimensional?
_itz I can probably screenshot to png
timotimo awesome, imagemagick can do what we want
20:32 KCL_ left
timotimo now i've got the png files 20:32
want?
_itz timotimo: she claims its CC now .. although I can't see that anywhere obviousily 20:33
timotimo it's going to take a few minutes probably
drive.google.com/folderview?id=0B8...sp=sharing 20:34
laben nine: i think i fixed the bug with non-dwimmy hypers with this gist.github.com/7de488bc83a3eee77948 which passes spectest and my own test 20:35
nine: sorry if there are some spurious changes in between
timotimo there it is
_itz: you can see it below the description: Creative Commons Attribution licence (reuse allowed) - directly with a "remix this video" button below
you have to "show more", though
_itz ah yes 20:36
timotimo hum. i don't see a way to use the video as audio only
20:37 virtualsue joined
timotimo at least then you can zoom in on the video to the bottom right and see almost exactly when the slides move 20:38
_itz grrr I probably need to use chrome this googleware never works in other browsers 100% 20:40
timotimo ;(
pyrimidine timotimo: are you working on the IPython kernel for perl6?
just curious. It's mentioned on the Jupyter page: github.com/ipython/ipython/wiki/IP...-languages
moritz mplayer -vo null -ao pcm:file=autput.wav input.video
timotimo pyrimidine: i did a long time ago and just half an hour ago i was reminded that it'd be great to work on it again now that we have proper async i/o and threads 20:41
pyrimidine: are you interested in helping out?
pyrimidine timotimo: np. Just happened to see it when I set up IPython locally 20:42
timotimo OK
ipython is fantastic, i must say
pyrimidine timotimo: yes, may be. and agreed, it is very nice :)
timotimo _itz: sadly, the youtube editor isn't nonlinear which (as far as i understand it) is why it only allows one audio and one video track at a time 20:43
so when you pull in the images, you'll lose the easy display of when to put the slides in >:(
pyrimidine timotimo: they have noticeably split it out into it's own thing now (Jupyter), more language-agnostic (well, except the back end) 20:44
might be able to help here and there BTW
timotimo right 20:45
20:45 muraiki left
_itz yeah I was hoping to drop in images but can't see a way of doing that either 20:45
timotimo dropping in images is easy, but it has to be before or after another object
top right has a camera icon where you can upload pictures or choose from your photo albums
_itz I think I'd have to break up the one video into as many as slides 20:46
20:46 rangerprice left
_itz I could use a stop watch and ffmpeg 20:46
or give up :)
timotimo might as well, to be honest :| 20:47
timotimo resumes work on the p6weekly
there's a typo in your Purl grammar :( 20:48
an unmatched ")" in token TOP
_itz in the src or slide? or both? 20:49
20:51 llfourn joined
timotimo i'm only looking at the pdf right now 20:51
jnthn 'night, #perl6 20:52
timotimo gnite jnthn, rest well this time! :)
laben \o jnthn
_itz its the slide only .. I think I generated it from a WIP rather than the original :/ 20:53
thanks for the heads up
timotimo OK
_itz it was shown to work later in the video which you could see if the quality wasn't so poor ;) 20:54
honest
20:54 AlexDani` is now known as AlexDaniel 20:55 skids left 20:56 llfourn left 20:57 pmurias joined
_itz timotimo: its corrected now anyway 21:00
dalek p/js: ac04dbc | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Improve handling of QAST::Regex subrule nodes with the method name in a QAST::SVal.
21:01
p/js: 2607ba4 | (Pawel Murias)++ | / (2 files):
Implement and test returning from nested blocks.
p/js: a2b3be9 | (Pawel Murias)++ | / (2 files):
Implement and test last in for loops.
ast/glr: be0847f | (Stefan Seifert)++ | S32-array/splice.t:
Fix the rest of the S32-array/splice.t tests

Array.new is non-flattening, so we need to interpolate the argument lists manually.
21:02 nowan joined
masak 'night, #perl6 21:02
laben \o masak
nine laben: thanks, I'll have a closer look tomorrow 21:04
dalek kudo/glr: 582c1f7 | moritz++ | src/core/List.pm:
GLRify List.combinations(Range)
21:07
21:09 kaare_ left
nine moritz: do you really need the flat? ^^^ for $range should already iterate over the range 21:11
moritz nine: probably not 21:12
nine m: my $r = 1 .. 10; for $r.min .. ($r.max min 8) -> $i { say $i; }
GLRelia rakudo-moar 582c1f: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤»
camelia rakudo-moar b56d59: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤»
nine m: my $r = 1 .. 10; for flat $r.min .. ($r.max min 8) -> $i { say $i; }
GLRelia rakudo-moar 582c1f: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤»
camelia rakudo-moar b56d59: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤»
nine So, enough for today. Good night!
laben \o nine
moritz good night nine
jdv79 nite 21:13
laben it's best if i go to bed myself, good rest|work #perl6
21:14 laben left
dalek kudo/glr: d7ab329 | moritz++ | src/core/List.pm:
Remove cargo-culted "flat", nine++
21:14
ast/glr: 6d9eef2 | moritz++ | S02-types/mixhash.t:
No need to grow a .tree here
21:16
21:20 trnh joined, pyrimidine left, pyrimidine joined 21:25 YuviPanda joined
YuviPanda hello 21:26
if I've an open socket
how do I find the port on the client side the socket is using?
hoelzro YuviPanda: hello! 21:29
YuviPanda heya!
hoelzro IIRC, $sock.local_address *should* work, but looks to be NYI
YuviPanda shared a car ride with sjn, who talked about perl6 almost the entire time. I've been a bit hooked since 21:30
ah, damn.
timotimo oh, yeah, the method "accept" of IO::Socket::INET only sets the internal PIO attribute to the received socket
but it doesn't do any introspection whatsoever to make sure attributes are set up correctly 21:31
YuviPanda oh well. I'll find other things to test the simple Identd client I'm building (just to play around the language)
also, how would I have found this out?
doc.perl6.org/type/IO::Socket::INET doesn't have any of this
hoelzro YuviPanda: I discovered it by opening the source, but that's LTA 21:32
timotimo i looked at the implementation of the socket, hold no a sec
hoelzro holds his no's
timotimo github.com/rakudo/rakudo/blob/nom/...ET.pm#L113
YuviPanda LTA?
hoelzro "Less Than Awesome"
timotimo method accept and the next two methods
YuviPanda ah, ok :)
ah, right. the empty bits
hoelzro there should probably be logic on connect() to set the local address too 21:33
YuviPanda so next time I'm curious I'll try to look at the source as well
hoelzro or rather, !initialize
src/core/* is pretty friendly
not to mention authoritative =)
YuviPanda right :)
dalek rl6-roast-data: fdb4574 | coke++ | / (2 files):
another glr run for today
timotimo "pretty friendly"? ... well, in some places 21:34
it does contain a bunch of low-level operations (the ones with nqp:: in front)
and many times choices were made for performance reasons
hoelzro timotimo: ok, fair enough; as long as you don't have too many NQP ops
timotimo hah
hoelzro it's better than Perl6::Grammar, though =)
ShimmerFairy P6 and NQP code is generally easier to read than VM-level code, I find :)
timotimo and if you're operating very close to the beginning of the resulting core setting code, you'll have to be prepared for things just missing
YuviPanda fair enough, I guess 21:35
timotimo it's a surreal experience to try to define a subroutine near the beginning, but can't let it take a native int as parameter because the "int" type hasn't been defined yet 21:47
YuviPanda heh, that sounds fun :) 21:49
so when I'm setting up Actions for a Grammar
do they need to cover all the tokens / rules?
21:49 Gardner joined
timotimo nope, only those that exist will be called 21:49
21:49 mjgardner left
YuviPanda hmm, so how is the output ast formatted? 21:49
timotimo formatted? 21:50
YuviPanda aaah
so I need to call make
constructed, even. if I don't have one for TOP 21:51
(sorry, flaky connection)
timotimo right, "make" will attach whatever you give it to the $/'s .ast attribute
(alternatively accessible as .made)
if you don't call make for TOP's $/, it won't have a .ast/.made
but nested matches can still have an ast set on them that you can go dig up after the fact
YuviPanda right, that makes sense 21:52
ShimmerFairy YuviPanda: actions tend to construct larger "make"d things from what you can get from subrules. For example, if you have token Pair { <key> " kv " <value> } , then the resulting action method might be method Pair($/) { my $pair = $<key>.ast => $<value>.ast; make $pair } 21:54
YuviPanda right 21:57
ShimmerFairy: so paste.debian.net/304642/ is a fairly decent way to write that grammar and actions?
(first perl6 program I've ever written, be gentle... :))
would be nice to simplify the 'payload' action 21:58
timotimo you could "make $<error>.ast // $<answer>.ast i believe 21:59
YuviPanda what's the // operator? 22:00
timotimo defined-or
it'll give you the first defined argument, or if no argument is defined the last argument
ShimmerFairy YuviPanda: the only change I'd really recommend is ~$/<username> in method answer, if you meant to make a string 22:01
timotimo oh, yes
YuviPanda googles
Nice 22:02
YuviPanda tests 22:03
dalek rl6-roast-data: d365ab7 | coke++ | bin/git.p5:
stable order for fetching
22:04
22:07 vendethiel left 22:08 amurf joined 22:10 khw left
YuviPanda is $<X> a shortcut for $/<X>? 22:11
ShimmerFairy yes :)
22:12 amurf left
YuviPanda sweet :) 22:12
ShimmerFairy And $0 is a shortcut for $/[0] , for () captures 22:13
YuviPanda right
is it, uh, discouraged to use the shortcut vs teh more explicit $/<> version? 22:14
ShimmerFairy YuviPanda: that's why action methods almost always have $/ as their parameter, so you can use those shortcuts. If you picked a different name, like method my-token($a) , then it'd have to be a bunch of $a<subrule>s everywhere
YuviPanda: no, in fact it's more common to see people leave out the / for $<subrule> :)
YuviPanda Ah I see. 22:15
So both of those make sense now :)
timotimo i've put a $/ name on a parameter in the past just to get the nice syntax even if i'm not passing in match objects 22:18
22:21 pmurias left 22:22 skids joined 22:27 araujo_ joined 22:28 araujo_ left 22:29 araujo_ joined 22:30 araujo left, araujo_ left 22:31 araujo_ joined 22:36 rindolf left 22:39 salva left
dalek kudo/nom: f7cfe9d | PerlJam++ | src/core/IO/Notification.pm:
Use full path in IO::Notification
22:46
22:50 virtualsue left
YuviPanda ShimmerFairy: got it to paste.debian.net/304646/ which seems good except for not splitting out the parsing into a testable separate method, I guess 22:51
22:52 llfourn joined
ShimmerFairy YuviPanda: if you mean testing separate pieces of the grammar, you can leave out the :actions adverb (which just means .ast/.made won't do anything useful), and the :rule("request") adverb (or :rule<request> for short) would let you parse the string using the "request" rule, for example. 22:53
22:57 llfourn left
ShimmerFairy I should clarify, using .ast/.made on the result of Grammar.parse() won't return anything useful if you have no :actions or anything else that can 'make' in whatever :rule you use (which is by default TOP if you have no :rule in the parse call) 22:58
YuviPanda right 23:00
what do you mean by 'parse the string using the request rule'
23:01 amurf joined
ShimmerFairy YuviPanda: MyGrammar.parse("some string", :rule<request>) would let you parse "some string" starting with the 'request' rule, instead of the 'TOP' rule by default. Useful for testing parts of your grammar, for example. 23:01
23:02 RabidGravy left
ShimmerFairy m: grammar G { token TOP { <subrule> "---" <subrule> }; token subrule { \d+ \. \d+ } }; say G.parse("1.2---2.3"); say G.parse("0.6", :rule<subrule>); 23:03
GLRelia rakudo-moar d7ab32: OUTPUT«「1.2---2.3」␤ subrule => 「1.2」␤ subrule => 「2.3」␤「0.6」␤»
camelia rakudo-moar b56d59: OUTPUT«「1.2---2.3」␤ subrule => 「1.2」␤ subrule => 「2.3」␤「0.6」␤»
YuviPanda aaaah 23:04
I see what you mean
right
so that'll let me test individual parts of the grammar
nice!
I was more mentioning that the query method does both the Socket stuff and the parsing, making it hard to test just the parsing with a unit test
ShimmerFairy Yeah, I figured after a bit. That could be remedied by having a socket-using method that returns the string, and then a method that handles the parsing of a string, though I'm not sure if you'd want the bare string to returned to the user 23:06
(but then again, there's always the possibility of a third method that neatly handles using those first two for the user ☺)
YuviPanda yup, a small internal method that just does the string, and a small internal method that just does the parsing 23:07
ShimmerFairy: so calling it 'my class ResponseParserActions' works, but not 'my class ResponseParser::Actions'
Could not find symbol '&Actions' in method query at Client.pm6:75 23:08
is what I get
which sounds fairly confusing
(perl6 hasn't been great so far in terms of error messages...)
ShimmerFairy the ::Actions version should work IIRC, that's weird
YuviPanda paste.debian.net/304656/
is the code with ::Actions
ShimmerFairy YuviPanda: the package-name error "Could not find symbol" is among one of the worse error messages, that's true :( 23:09
YuviPanda should I need to Nest the ::Actions inside the ResponseParser grammar?
ShimmerFairy let me check, I recall doing ::Actions and ::Grammar for stuff before without issue.
dalek kudo-star-daily: 406c50b | coke++ | log/ (9 files):
today (automated commit)
23:11
YuviPanda ShimmerFairy: ok!
dalek rl6-roast-data: 3bef519 | coke++ | / (2 files):
another glr run for today
23:13
YuviPanda ShimmerFairy: paste.debian.net/304657/ works 23:15
if I call the Grammar a ::Grammar
so looks like the Actions class can't just nest inside the grammar?
ShimmerFairy m: class C { class G::Actions { method TOP($/) { make "A-OK!" } }; my grammar G { token TOP { foobar } }; method doit {say G.parse("foobar", :actions(G::Actions)).ast} }; C.doit
camelia rakudo-moar b56d59: OUTPUT«Could not find symbol '&Actions'␤ in method doit at /tmp/_5RQ7dG6Sl:1␤ in block <unit> at /tmp/_5RQ7dG6Sl:1␤␤Actually thrown at:␤ in method doit at /tmp/_5RQ7dG6Sl:1␤ in block <unit> at /tmp/_5RQ7dG6Sl:1␤␤»
GLRelia rakudo-moar d7ab32: OUTPUT«Could not find symbol '&Actions'␤ in method doit at /tmp/VeG99SM_dL:1␤ in block <unit> at /tmp/VeG99SM_dL:1␤␤Actually thrown at:␤ in method doit at /tmp/VeG99SM_dL:1␤ in block <unit> at /tmp/VeG99SM_dL:1␤␤»
ShimmerFairy m: class C { class G::Actions { method TOP($/) { make "A-OK!" } }; grammar G { token TOP { foobar } }; method doit {say G.parse("foobar", :actions(G::Actions)).ast} }; C.doit
GLRelia rakudo-moar d7ab32: OUTPUT«A-OK!␤»
camelia rakudo-moar b56d59: OUTPUT«A-OK!␤»
ShimmerFairy YuviPanda: looks like the issue is having either the class or grammar declared with 'my' inside a class. Which is almost certainly a bug :) 23:16
YuviPanda wheee!
I found a perl6 bug!
ShimmerFairy: can you report it for me? :) 23:18
ShimmerFairy and yeah, it seems to have no issues with a 'my class Name' and 'my class Name::Subname' inside a class, so it's some weird package handling screw-up :)
YuviPanda has got to go to sleep soon
ShimmerFairy m: class C { my grammar G { token TOP { foobar }; my class G::Actions { method TOP($/) { make "A-OK!" } }; }; method doit {say G.parse("foobar", :actions(G::Actions)).ast} }; C.doit
GLRelia rakudo-moar d7ab32: OUTPUT«A-OK!␤»
camelia rakudo-moar b56d59: OUTPUT«A-OK!␤»
ShimmerFairy YuviPanda: sure :) And note that it's apparently also cause by having the G::Actions name come first. So you managed to find the perfect combination of ingredients to cause a bug, congratulations! \o/ 23:19
YuviPanda :D
Don't think I've found a language bug before!
ShimmerFairy m: class C { my class D::E { method foo { "foo" } }; class D { method foo { "bar" } }; method test { say D.foo, D::E.foo } }; C.test 23:20
GLRelia rakudo-moar d7ab32: OUTPUT«Could not find symbol '&E'␤ in method test at /tmp/cKgMTk4tHp:1␤ in block <unit> at /tmp/cKgMTk4tHp:1␤␤Actually thrown at:␤ in method test at /tmp/cKgMTk4tHp:1␤ in block <unit> at /tmp/cKgMTk4tHp:1␤␤»
camelia rakudo-moar b56d59: OUTPUT«Could not find symbol '&E'␤ in method test at /tmp/BYpbX8RF1j:1␤ in block <unit> at /tmp/BYpbX8RF1j:1␤␤Actually thrown at:␤ in method test at /tmp/BYpbX8RF1j:1␤ in block <unit> at /tmp/BYpbX8RF1j:1␤␤»
ShimmerFairy ^ ok, managed to find a simpler example, now that I realized/remembered the D::E comes first bit :)
YuviPanda: Well, we ain't one of those mature compilers, so it's a bit easier to run into issues :) 23:21
YuviPanda yeah, I guess that'e ok / to be expected :)
I guess this is the first time I'm actually using and am excited by a still not mature language
ShimmerFairy And on the LTA error messages: I'm working on something for rakudo on the side, and while working on it I've had to make my own new Exception types, and I've realized that our error messages could stand to be a bit more verbose. Hopefully we can do something about that :) 23:22
YuviPanda nice :) 23:23
ShimmerFairy The "Cannot find symbol &Thing" message is because AFAIK rakudo isn't so good at figuring out what went wrong when it comes to package-related errors (i.e. whenever you start needing :: in names and something in the lookup process goes awry) 23:24
My only-slightly-educated guess is that rakudo doesn't quite realize yet that lots of people define namespaced things with Foo::Bar::Baz instead of package Foo { ... } , at least for error reporting :P 23:25
m: class D::E { method foo { "foo" } }; class D { method bar { "bar" } }; say D::E.foo; # I think that's as simple as the issue gets 23:26
GLRelia rakudo-moar d7ab32: OUTPUT«foo␤»
camelia rakudo-moar f7cfe9: OUTPUT«foo␤»
ShimmerFairy m: my class D::E { method foo { "foo" } }; class D { method bar { "bar" } }; say D::E.foo; # I think that's as simple as the issue gets
GLRelia rakudo-moar d7ab32: OUTPUT«Could not find symbol '&E'␤ in block <unit> at /tmp/acnhQsbgoM:1␤␤Actually thrown at:␤ in block <unit> at /tmp/acnhQsbgoM:1␤␤»
camelia rakudo-moar f7cfe9: OUTPUT«Could not find symbol '&E'␤ in block <unit> at /tmp/KnIVgDwj9D:1␤␤Actually thrown at:␤ in block <unit> at /tmp/KnIVgDwj9D:1␤␤»
23:33 adu joined 23:34 jferrero joined 23:36 rurban left
cbk1090 What method would I use to search the contents of a text file to find multiple patterns like an URL, a regex or a grammar? 23:36
and can I use the .parse file function, to gather those matches? 23:37
23:38 ggherdov left, spider-mario left
adu cbk1090: grep? 23:40
o wait, I'm thinking bash
ShimmerFairy depends. If you have a specific pattern you want to find all the matches of, there's slurp("file.txt") ~~ m:g/pattern/ , which will put all the matches to the pattern in $/ 23:41
23:41 ggherdov joined
ShimmerFairy YuviPanda++ on your first rakudobug :) Here's the link to it rt.perl.org/Ticket/Display.html?id=125891 23:42
cbk1090 Ok I think I'll try slurp. Was really hoping to use a Grammar, for me it is easier to read and change the patter if I have to?
thanks ShimmerFairy
ShimmerFairy cbk1090: you can of course use a Grammar, but then you'd have to parse the whole file (IIRC there are methods that don't insist on parsing the whole thing, I think, but your grammar would still have to account for the uninteresting stuff) 23:44
YuviPanda ShimmerFairy: <3 thank you :)
cbk1090 ShimmerFairy, Yeah that was the problem I was having, the grammar really only works if there is a constant pattern to match. The files I'm working with are really just random text with some URLs 23:46
adu I merged some C::Parser stuff
ShimmerFairy YuviPanda: you're welcome. And I personally take it as a good sign of the compiler when the summary line for quickly describing the bug ends up being quite a bit long. Better than something like "Strings die on backslashes" :P
YuviPanda :D 23:47
is perl6 still on track for 'general release' by christmas?
ShimmerFairy cbk1090: you could always do something like token TOP { [<URL> | <!URL> .]+ } (that is, match either a URL or one character of a not-URL.) 23:48
23:48 adu left
cbk1090 But then how do I end up with a list of matching URLs? 23:49
ShimmerFairy YuviPanda: yes. For years we've always said that it gets released on "Christmas", whenever that would be, so technically the answer is always "yes" :P . But the specific date of this year's literal Christmas is still the plan, so yes on that front as well :) .
m: grammar G { token TOP { [<URL>|<!URL> .]+ }; token URL { "stuff.stuff" } }; G.parse("stuff.stuff lorem ipsum i don't stuff.stuff remember the rest of stuff.stuff the lorem stuff."); say $<URL>.elems 23:52
GLRelia rakudo-moar d7ab32: OUTPUT«3␤»
camelia rakudo-moar f7cfe9: OUTPUT«3␤»
ShimmerFairy m: grammar G { token TOP { [<URL>|<!URL> .]+ }; token URL { "stuff.stuff" } }; G.parse("stuff.stuff lorem ipsum i don't stuff.stuff remember the rest of stuff.stuff the lorem stuff."); $<URL>.map: { say ~$_ }
GLRelia rakudo-moar d7ab32: OUTPUT«stuff.stuff␤http://stuff.stuff␤http...ff.stuff␤»
camelia rakudo-moar f7cfe9: OUTPUT«stuff.stuff␤http://stuff.stuff␤http...ff.stuff␤»
ShimmerFairy cbk1090: ^ all the matched URLs will be available in $/<URL> after running the parse in this example 23:53
cbk1090 ShimmerFairy, ok I will try that method..... thanks 23:54
ugexe do actions happen *after* the grammar has been completely parsed? as in can you have actions that just emit to a supply, but also get emitted before the entire grammar is parsed? 23:55
ShimmerFairy ugexe: actions happen in a "bottom up" order, as opposed to grammars' "top down" order. So the most-nested subrule in a particular chain of calls has its action method called first. Basically, it's like putting a { } block that does the action method after all the regex stuff 23:57
ugexe would be cool if you could have a grammar emitting matches inside a react { }
ShimmerFairy ugexe: essentially, it's like regex foo { my regex stuff and then { the actions for this regex are at least somewhat equivalent to here } } 23:58
23:59 trnh left
ShimmerFairy ugexe: I'm not too clear on how the mechanism works specifically, but AFAIK you can think of actions as doing regex foo { stuff { ActionClass.foo($/) } } for you. :) 23:59
cbk1090 ShimmerFairy, ok I will try that method..... thanks
sorry bout' that
ShimmerFairy cbk1090: no worries, I accidentally up-enter'd in here the other day :P