Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-11

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 ugexe maybe method native-descriptor needs to be added to IO::Pipe itself
00:01 skids .native-descriptor is a recent add, and may only have been done for sockets.
00:01 skids commit a819231
00:01 BenGoldberg joined #perl6
00:02 ugexe you could try passing in your own IO::Handle to :in
00:02 rudi_s ugexe: ?
00:03 ugexe my $handle = IO::Handle.new(whatever); run @cmd, :in($handle);
00:03 ugexe as in, maybe if you create the handle yourself instead of letting Proc do it in .new that the native-descriptor might end up working
00:04 ugexe just a wild guess though
00:05 autarch joined #perl6
00:07 awwaiid What is a control exception?
00:09 skids Things like the "next" in loop { next } use the exeception mechanism to do their work.  At least, virtually... the optimizer could remove that.
00:09 skids Basically anything that does not fall off the bottom of a brace.
00:10 skids Hrmph.  nqp::filenofh(nqp::getattr(nqp::decont($p.in), IO::Handle, "\$!PIO")) is also -1.
00:11 rudi_s skids: Hm. Is this a bug in moar/jvm?
00:12 skids I dunno.  The nqp::getattr does return an MVMOSHandle.  But actually seeing what's in it is difficult.
00:15 johndau joined #perl6
00:16 skids Note that "pipes" on windows are strange ISTR.
00:16 zpmorgan joined #perl6
00:18 rudi_s Hm. The moarvm implements it for syncfile and syncstream. Not sure if this includes pipes.
00:19 rudi_s (On the other hand IO::Pipe is a IO::Handle with no special cases.)
00:21 rudi_s Ah, the pipe-fh comes from syncpipe.c.
00:23 rudi_s jnthn: ^ - would it be possible to implement the MVMIOIntrospection also for syncpipe.c and if yes would it be much work or can one just add the &introspection to the op_table and it just works?
00:23 skids Likely he
00:24 skids s alseep you may want to .tell
00:24 rudi_s .tell jnthn Would it be possible to implement the MVMIOIntrospection also for syncpipe.c and if yes would it be much work or can one just add the &introspection to the op_table and it just works? - The idea is to support .native-descriptor also for pipes, e.g. when using run().
00:24 yoleaux rudi_s: I'll pass your message to jnthn.
00:24 rudi_s skids: Thanks.
00:27 BenGoldberg If, on windows, you want something *like* a pipe, but which select() will work on, use socketpair, then use shutdown to make one end read-only and the other write-only.  If you don't need select() for readability, then please ignore me ;)
00:29 tmch joined #perl6
00:30 rudi_s (I don't care about windows, but thanks.)
00:54 yeahnoob joined #perl6
01:02 acrussell joined #perl6
01:06 dalek rakudo-star-daily: 38f4aae | coke++ | log/ (9 files):
01:06 dalek rakudo-star-daily: today (automated commit)
01:06 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/38f4aae0fe
01:24 perlawhirl joined #perl6
01:34 grondilu joined #perl6
01:34 nadim what's a cleanway to flip flop between two string,preferably held within the same variable/oject
01:36 skids you mean on each read a different string is returned?
01:36 nadim yes
01:37 nadim or a circular buffer
01:37 * skids remembers an IRC conversation about a true/false flipflop.
01:38 nadim I've seen something too but can't remember what
01:38 ugexe ff ?
01:39 skids Well, not a "flip flop" exactly
01:39 skids There was a golfing contest for a variable that returned 0 and 1 on alternate reads.
01:40 grondilu m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" }; my $text is flicking; say $text; say $text;
01:40 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wcjJmjqEHO␤is trait on $-sigil variable not yet implemented. Sorry. ␤at /tmp/wcjJmjqEHO:1␤------> 3"flip" !! "flop" }; my $text is flicking7⏏5; say $text; say $text;␤    expecting any of:␤      …»
01:40 grondilu m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" }; my $text; $text does flicking; say $text; say $text;
01:40 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/00ub7NNIgr␤Missing block␤at /tmp/00ub7NNIgr:1␤------> 3ext does flicking; say $text; say $text;7⏏5<EOL>␤»
01:41 skids Heheh.  Checting though with an implicit .Str
01:41 grondilu m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" }; my $text = Str but flicking; say $text; say $text;
01:41 skids *Cheating
01:41 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3IEgslkBSg␤Missing block␤at /tmp/3IEgslkBSg:1␤------> 3 Str but flicking; say $text; say $text;7⏏5<EOL>␤»
01:41 grondilu m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" } }; my $text = Str but flicking; say $text; say $text;
01:41 camelia rakudo-moar 69426b: OUTPUT«(Str+{flicking})␤(Str+{flicking})␤»
01:42 grondilu m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" } }; my $text = "" but flicking; say $text; say $text;
01:42 camelia rakudo-moar 69426b: OUTPUT«␤␤»
01:42 grondilu m: role flicking { method Str { state $++ %% 2 ?? "flip" !! "flop" } }; my $text = "" but flicking; say ~$text; say ~$text;
01:42 camelia rakudo-moar 69426b: OUTPUT«␤␤»
01:42 * grondilu gives up
01:42 nadim hehe!
01:43 grondilu m: print role { method Str { "duh" } }.new
01:43 camelia rakudo-moar 69426b: OUTPUT«duh»
01:43 grondilu m: print role { method Str { state "duh" } }.new
01:43 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mu0H6NzrDA␤Malformed state␤at /tmp/mu0H6NzrDA:1␤------> 3print role { method Str { state7⏏5 "duh" } }.new␤»
01:44 grondilu m: my $str = role { method Str { state $++ %% 2 ?? "one" !! "two" } }.new; print $str for ^5;
01:44 camelia rakudo-moar 69426b: OUTPUT«onetwoonetwoone»
01:47 skids I would suggest a Proxy, but unfortunately, FETCH gets called extra times in the current implementation.
01:53 labster joined #perl6
02:12 kalkin-_ joined #perl6
02:26 johndau` joined #perl6
02:29 johndau joined #perl6
02:29 vendethiel joined #perl6
02:44 Actualeyes joined #perl6
03:16 Sqirrel joined #perl6
03:23 Upasaka_ joined #perl6
03:23 Timbus_ joined #perl6
03:24 peter joined #perl6
03:27 Upasaka joined #perl6
03:39 Actualeyes joined #perl6
03:42 noganex joined #perl6
03:50 molaf joined #perl6
04:25 wamba joined #perl6
04:47 rickbike joined #perl6
04:47 cpage_ joined #perl6
04:47 davido joined #perl6
05:09 jdliver joined #perl6
05:46 johndau` joined #perl6
05:50 |Sno| joined #perl6
05:50 johndau joined #perl6
05:53 Timbus joined #perl6
05:54 Cabanossi joined #perl6
05:59 labster joined #perl6
06:02 zpmorgan joined #perl6
06:02 Spot__ joined #perl6
06:02 pnu joined #perl6
06:02 dalek joined #perl6
06:02 solarbunny joined #perl6
06:02 baest joined #perl6
06:02 21WAAEBUL joined #perl6
06:18 sortiz m: use NativeCall; sub free(Pointer) is native() { * }; free(Pointer);
06:18 camelia rakudo-moar 69426b: ( no output )
06:29 [ptc] timotimo: wrt: the Num/Rat question.  I know that 1234/56 is a Rat, however both 1234.56 and 1234/56 are numbers of some sort.  Maybe I meant really Numeric...
06:29 [ptc] timotimo: which then brings me to the real question: is it possible to say in a regex "match a Numeric-looking thing"?
06:30 cdg joined #perl6
06:39 musiKk_ joined #perl6
06:50 [ptc] timotimo: oops, it seems you answered the question earlier this morning.  Sorry!
07:04 domidumont joined #perl6
07:09 pdcawley joined #perl6
07:09 domidumont joined #perl6
07:09 nine .tell mst The 13 seconds for loading Inline::Perl6 are mostly spent on compiling Inline::Perl5 which cannot be precompiled currently. So actually my work in that area will directly benefit Inline::Perl5 and ::Perl6 :)
07:09 yoleaux nine: I'll pass your message to mst.
07:18 nine .tell ilmari the REPL locking bug is already fixed on the relocatable-precomp branch
07:18 yoleaux nine: I'll pass your message to ilmari.
07:18 CIAvash joined #perl6
07:18 darutoko joined #perl6
07:19 pdcawley joined #perl6
07:21 zpmorgan joined #perl6
07:21 Spot__ joined #perl6
07:21 pnu joined #perl6
07:21 dalek joined #perl6
07:21 solarbunny joined #perl6
07:21 baest joined #perl6
07:21 21WAAEBUL joined #perl6
07:23 a3r0 ~.
07:29 nakiro joined #perl6
07:49 buharin joined #perl6
07:54 zpmorgan joined #perl6
07:54 Spot__ joined #perl6
07:54 pnu joined #perl6
07:54 dalek joined #perl6
07:54 solarbunny joined #perl6
07:54 baest joined #perl6
07:54 21WAAEBUL joined #perl6
08:05 sortiz .tell lizmat Something is broken in commit 69426bd, with *some* calls, somehow $lib2mangler remains undefined, that results in "This type does not support associative operations … in method setup at … line 276 … in method CALL-ME … line 294""
08:05 yoleaux sortiz: I'll pass your message to lizmat.
08:25 jsimonet joined #perl6
08:26 dalek perl6-examples/fix-dbi-sql-test: 2f07ded | paultcochrane++ | .travis.yml:
08:26 dalek perl6-examples/fix-dbi-sql-test: Try installing sqlite
08:26 dalek perl6-examples/fix-dbi-sql-test:
08:26 dalek perl6-examples/fix-dbi-sql-test: It could be that the dbi-sql script needs sqlite to be installed before it
08:26 dalek perl6-examples/fix-dbi-sql-test: can run correctly.
08:26 dalek perl6-examples/fix-dbi-sql-test: review: https://github.com/perl6/perl6-examples/commit/2f07ded40a
08:28 sortiz .tell lizmat Trying the binding of nqp::hash at the $lib2mangler declaration, the *same* error is generated early, at rakudo's 'make test', I don't understand why :-(
08:28 yoleaux sortiz: I'll pass your message to lizmat.
08:30 kjs_ joined #perl6
08:31 geekosaur joined #perl6
08:31 [Tux] test            22.132
08:31 [Tux] test-t          12.746
08:31 [Tux] csv-parser      52.734
08:32 gfldex joined #perl6
08:33 nadim Morning all
08:34 nadim my (@sub_elements, %glyphs) =  some_sub(...) how do I get @sub_elements to not grab everything?
08:34 fireartist joined #perl6
08:35 nadim := hmmm
08:35 nadim It's going to take 100 years to learn
08:36 cpage joined #perl6
08:37 dakkar joined #perl6
08:39 wamba joined #perl6
08:41 zakharyas joined #perl6
08:51 araujo joined #perl6
08:52 cpage joined #perl6
08:52 araujo joined #perl6
08:52 dalek perl6-examples/fix-dbi-sql-test: f56a7ae | paultcochrane++ | .travis.yml:
08:52 dalek perl6-examples/fix-dbi-sql-test: Back out the sqlite installation
08:52 dalek perl6-examples/fix-dbi-sql-test:
08:52 dalek perl6-examples/fix-dbi-sql-test: ... it didn't get travis to run the dbi-sql script, so the change can go.
08:52 dalek perl6-examples/fix-dbi-sql-test: review: https://github.com/perl6/perl6-examples/commit/f56a7aeb09
08:52 dalek perl6-examples/fix-dbi-sql-test: d919e8f | paultcochrane++ | categories/cookbook/14database-access/14-09-dbi-sql.pl:
08:52 dalek perl6-examples/fix-dbi-sql-test: Use the connect calling style from DBIish docs
08:52 dalek perl6-examples/fix-dbi-sql-test: review: https://github.com/perl6/perl6-examples/commit/d919e8f7f9
08:55 Azry left #perl6
08:58 Azry_ joined #perl6
09:06 RabidGravy joined #perl6
09:09 tadzik itz_stmuk++ # nice talk, running the examples now :)
09:09 tmch joined #perl6
09:10 masak yes, itz++
09:10 moritz stmuk++
09:10 masak _++
09:11 buharin joined #perl6
09:13 brrt joined #perl6
09:14 [ptc] stmuk++
09:16 Woodi so, any place to gat that (and other) slides ? # nine++ :)
09:16 moritz Woodi: http://act.yapc.eu/gpw2016/schedule has links to talks (and other days), and some of the talks have links to slides
09:17 moritz I've asked the speakers to upload their slides, though stmuk might not have gotten around to it yet
09:19 dalek perl6-examples/fix-dbi-sql-test: 3450c31 | paultcochrane++ | .travis.yml:
09:19 dalek perl6-examples/fix-dbi-sql-test: Try installing sqlite3
09:19 dalek perl6-examples/fix-dbi-sql-test:
09:19 dalek perl6-examples/fix-dbi-sql-test: ... instead of just sqlite
09:19 dalek perl6-examples/fix-dbi-sql-test: review: https://github.com/perl6/perl6-examples/commit/3450c314d3
09:21 integral joined #perl6
09:21 * tadzik 's lightnink talk slides' interesting part was the one that said "(Live demo here)" :P
09:26 masak tadzik: guess those of us who missed it'll have to wait for the video ;)
09:26 * masak 's talks are now online as slide PDFs at http://act.yapc.eu/gpw2016/talk/6517 and http://act.yapc.eu/gpw2016/talk/6496
09:27 tadzik masak: I can show you on the coffee break :)
09:27 tadzik but I'm also planning to write a blog toast on it
09:27 moritz masak++
09:28 masak tadzik: yes, please! private demo
09:28 masak I've heard excited whispers about "sixify", so my expectations are high :P
09:29 tadzik :D
09:29 tadzik so it's settled, there'll be a lightning talk showing
09:41 zhmylove joined #perl6
09:44 matt_ joined #perl6
09:49 rindolf joined #perl6
09:50 lizmat .
09:50 yoleaux 08:05Z <sortiz> lizmat: Something is broken in commit 69426bd, with *some* calls, somehow $lib2mangler remains undefined, that results in "This type does not support associative operations … in method setup at … line 276 … in method CALL-ME … line 294""
09:50 yoleaux 08:28Z <sortiz> lizmat: Trying the binding of nqp::hash at the $lib2mangler declaration, the *same* error is generated early, at rakudo's 'make test', I don't understand why :-(
09:51 lizmat .tell sortiz make test has always been clean for me: do you have an example that consistently fails?
09:51 yoleaux lizmat: I'll pass your message to sortiz.
09:54 Sqirrel joined #perl6
10:02 nakiro joined #perl6
10:06 pdcawley joined #perl6
10:07 FROGGS joined #perl6
10:08 pmurias joined #perl6
10:08 pmurias masak: what's sixify?
10:10 tadzik a lie :)
10:11 tadzik I used it on my lightning talk, "I'm now going to port this thing to perl 6: 'sixify'"
10:11 tadzik but it was just an alias to 'git stash pop &> /dev/null' :P
10:12 arnsholt =D =D =D
10:12 jnthn masak: I'd love to know the story between the Brazil/Argentina correction slide :D
10:12 yoleaux 00:24Z <rudi_s> jnthn: Would it be possible to implement the MVMIOIntrospection also for syncpipe.c and if yes would it be much work or can one just add the &introspection to the op_table and it just works? - The idea is to support .native-descriptor also for pipes, e.g. when using run().
10:19 [ptc] joined #perl6
10:20 jnthn .tell rudi_s It shouldn't be much harder than just filling in that entry in the op_table
10:20 yoleaux jnthn: I'll pass your message to rudi_s.
10:32 brrt yeah, i was curious about that too
10:33 lizmat m: use nqp; my @s = "a".comb(1); nqp::join("::",nqp::getattr(@s,List,q/$!reified/))  # what am I missing??
10:33 camelia rakudo-moar 69426b: OUTPUT«This type cannot unbox to a native string␤  in block <unit> at /tmp/wg0OltfJmO line 1␤␤»
10:34 RabidGravy it turns out that it helps to have the microphone volume turned up when testing recording
10:34 jnthn lizmat: Scalars
10:34 lizmat so I need to decont ?
10:35 jnthn Yeah...see the code in (or just use? :)) the Perl 6 join
10:35 jnthn Better just use Perl 6's join and we can put our efforts into optimizing that...
10:36 lizmat okidoki  :-)
10:37 masak jnthn: guess you had to be there :)
10:38 jnthn heh, then I'll go with assuming you said Argentina and put up a map of Brazil :D
10:40 lizmat m: v*   # DIHWIDT ??
10:40 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vWBhqZVKCW␤Missing required term after infix␤at /tmp/vWBhqZVKCW:1␤------> 3v*   # DIHWIDT ??7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
10:41 lizmat m: v+   # DIHWIDT ??
10:41 camelia rakudo-moar 69426b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DOIboYhDvs␤Missing required term after infix␤at /tmp/DOIboYhDvs:1␤------> 3v+   # DIHWIDT ??7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
10:41 lizmat m: dd Version.new(*)
10:41 camelia rakudo-moar 69426b: OUTPUT«Version.new('*')␤»
10:41 lizmat I guess that's why .perl of Version is not outputting v strings
10:41 jnthn lizmat: I'm not sure those are common enough to deserve the sugar...
10:42 jnthn lizmat: It could be smart enough to do v-strings when it can
10:42 lizmat well, the only reason I can think of, is that it would make .perl better readable ?
10:42 lizmat yeah, will look at that
10:43 jnthn And can we not call them v-strings? :P
10:43 lizmat sorry, P5 leftover  :-)
10:43 Woodi moritz: thanx
10:43 jnthn Yeah, just unfortunate if people google :P
10:46 RabidGravy but "special Version constructor syntax" is a bit of a mouthful ;-)
10:46 Woodi .oO( hmm, no one thinked about slides for coffe break so far... )
10:58 ilmari "version literal"?
10:58 yoleaux 07:18Z <nine> ilmari: the REPL locking bug is already fixed on the relocatable-precomp branch
11:00 RabidGravy when did the  CArray.new(@a) constructor come in? That has totally revolutionised my life
11:04 lizmat RabidGravy: I think that was sortiz
11:04 dalek perl6-examples/fix-dbi-sql-test: 5825851 | paultcochrane++ | .travis.yml:
11:04 dalek perl6-examples/fix-dbi-sql-test: Try specifying a stable perl6 version
11:04 dalek perl6-examples/fix-dbi-sql-test: review: https://github.com/perl6/perl6-examples/commit/582585174d
11:04 lizmat m: use lib  # DIHWIDT  :-)
11:04 camelia rakudo-moar 69426b: OUTPUT«===SORRY!===␤Cannot iterate object with P6opaque representation␤»
11:05 jnthn We could do with a better error for that :)
11:05 lizmat yeah, will look at that
11:05 lizmat jnthn: feels like it should actually be silent ?
11:05 jnthn "What lib, duh!"
11:06 jnthn lizmat: It's probably a mistake not to specify a lib?
11:06 Upasaka joined #perl6
11:06 lizmat did you mean "use lib 'lib'"
11:06 jnthn Something like that
11:06 * masak .oO( use lib 'lib "lib"' )
11:07 RabidGravy sortiz++ # totally revolutionised the thing
11:07 lizmat .oO( enters doowop choir)
11:08 RabidGravy next up let's see if we can record from jack
11:11 RabidGravy (recording the sound of the computers fan isn't too interesting)
11:14 pdcawley joined #perl6
11:22 dalek perl6-examples/fix-dbi-sql-test: 1e343a4 | paultcochrane++ | .travis.yml:
11:22 dalek perl6-examples/fix-dbi-sql-test: Use stack version 2016.01
11:22 dalek perl6-examples/fix-dbi-sql-test: review: https://github.com/perl6/perl6-examples/commit/1e343a4387
11:27 masak I have a case where I want to turn a `token statement:if` into a `rule statement:if` in my grammar
11:27 masak it works great, and I can remove all those pesky <.ws> calls when I do
11:27 masak ...but...
11:27 masak suddenly this kind of input fails: "if 0 {\n}\nmy x"
11:28 masak I've tracked that down to the fact that my `statement:if` rule gobbles too much whitespace after the "}", and then <.eat_terminator> doesn't work properly
11:28 masak and I can "fix" the problem by removing absolutely all whitespace at the end of the rule, but that means I cannot indent the closing brace of the *rule* properly
11:28 masak which seems like a high price to pay
11:29 masak when I look at Rakudo's Grammar.npq, it does not seem to have this problem at all
11:29 masak what am I missing? :)
11:30 masak I tried using unspace, but that only crashed Rakudo with the internal error "Cannot find method 'rxtype'"
11:32 moritz masak: I'd think that <ws> shouldn't eat up a whitespace if it's significant for statement end detection
11:32 moritz <.ws> is explicitly for *in*significant whitespace
11:33 masak hm, I *am* overriding the ws rule...
11:33 jnthn masak: blockoid is a token
11:34 jnthn masak: And it calls <?ENDSTMT> after parsing the }
11:34 jnthn So we've already marked statement end
11:34 moritz masak: you could also use :!r within the rule to be able to indent the closing curly brace
11:34 masak jnthn: I see. 007 doesn't have the <?ENDSTMT> mechanism, though.
11:34 masak jnthn: in fact, this is the first I hear/learn about it :)
11:35 masak moritz: ooh, I'll try that
11:35 jnthn masak: It's the mechanism that makes } always be a statement end
11:35 jnthn Well, } \n I guess
11:35 masak aye
11:35 masak something to look into in the long run
11:36 espadrine_ joined #perl6
11:36 masak moritz: doesn't :r have to do with ratcheting semantics, though?
11:36 masak not sigspace?
11:37 jnthn Yeah
11:37 jnthn :!s
11:37 moritz erm, yes
11:37 moritz sorry
11:37 masak I already tried :!s, and it had no effect
11:38 moritz we use :!s in Perl6::Grammar, so it shouldn't be totally broken
11:38 jnthn Where did you try it?
11:38 moritz masak: did you put a whitespace before it? :-)
11:38 jnthn Yeah, that's what I was wondering ;-)
11:38 moritz I hope not
11:38 masak :)
11:38 masak I didn't, I put it right where I had to put the "}" of the rule
11:39 masak it *does* work if I put it before the whole optional `else` group
11:39 sammers joined #perl6
11:39 masak but I fear that eliminates an implicit <.ws> inside it that I actually wanted
11:41 masak bah
11:41 masak I'll just keep it as `token` for now
11:42 masak I suspect moritz is right, and I brought this on myself by having a too-simple `ws` rule
11:42 masak but that also means that that's where I ought to fix it... some other time
11:51 Azry_ joined #perl6
11:51 dalek perl6-examples: 8c950e5 | paultcochrane++ | .travis.yml:
11:51 dalek perl6-examples: Use perl6 stack version 2016.01
11:51 dalek perl6-examples:
11:51 dalek perl6-examples: This gives a stable moar/nqp/rakudo version upon which to test the examples,
11:51 dalek perl6-examples: based upon the 6.c perl6 version.
11:51 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/8c950e57cf
11:54 [ptc] masak: thanks for the tip about the perl6 version.  It turned out that by using a bleading edge version showed up the same error on my machine and not only on travis.
11:54 masak [ptc]: \o/
11:54 masak "environment -- the silent killer" :D
11:56 nine tadzik: your segfault is due to "Can't undef active subroutine" which kind of makes sense. We're still inside a Perl 5 subroutine while trying to tear down the interpreter.
11:57 tadzik right
12:01 awwaiid nine: what is the use-case for the control { ... } catches in Inline::Perl5 (such as https://github.com/niner/Inline-Perl5/blob/master/lib/Inline/Perl5.pm6#L528)?
12:02 nine awwaiid: they're for Inline::Perl6 actually.
12:04 awwaiid nine: see... I expected you to say something like "well if you call 'next' in a p6 block that p5 is running, this will catch it for ... something"
12:09 kid51 joined #perl6
12:12 ridthyself joined #perl6
12:19 pmurias joined #perl6
12:21 ridthyself Good morning! I'm having trouble loading a module into the REPL. I run: perl6 -I test.pm6, but when i try to call the sub from the REPL, i get the error: Undeclared routine.
12:21 ridthyself I run the REPL from the directory where the module is located.
12:21 llfourn ridthyself: -I is to load a lib path not a module
12:22 llfourn there is -M but I don't *think* that works with just any file
12:22 llfourn ridthyself: you can do require "test.pm6"; as the first line which should work.
12:23 ridthyself failed: not a directory?
12:24 kjs_ joined #perl6
12:24 llfourn ridthyself: where do you get that error? I think require is the only way to do it.
12:25 llfourn perl6 -e 'require "Foo.pm6"' # should work
12:26 ridthyself it appears to work, but doesn't run the REPL, just compiles runs and closes
12:26 llfourn ridthyself: right. So for the REPL you will simply need to type that as the first line.
12:27 pdcawley joined #perl6
12:27 llfourn ridthyself: alternitvely you can put it into a directory called "lib" and do perl6 -Ilib -MFoo # and then you will have your module already loaded
12:28 llfourn of course it doesn't have to be called "lib" it's just convention :)
12:28 jnthn If it's in the current directory then -I. -MFoo would work too
12:29 llfourn ^ that's probably easiest then
12:30 ridthyself THAT WORKS!
12:31 llfourn \o/
12:31 ridthyself the file in the current directory is test.pm6. I ran perl6 -I. -Mtest and it worked. Thank you, ever so much
12:33 ridthyself so perl is an anagram for REPL... coincidence?
12:33 llfourn I'd say so :P
12:34 DrForr_ Yep.
12:35 ridthyself thanks again,
12:42 Azry_ Hi! I have this code : class IO::Pty is IO::Handle { submethod BUILD() { say self.perl; } } why is the result of this a "IO::Handle" and not a "IO::Pty" ?
12:43 Azry_ also self.WHAT gives me (Pty)
12:47 llfourn m: class IO::Pty is IO::Handle { submethod BUILD() { say self.perl; } }
12:47 camelia rakudo-moar 69426b: ( no output )
12:47 llfourn m: class IO::Pty is IO::Handle { submethod BUILD() { say self.perl; } }; IO::Pty.new
12:47 camelia rakudo-moar 69426b: OUTPUT«IO::Pty is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/gfgsn7Kt7j line 1␤␤»
12:47 llfourn m: class IO::Foo is IO::Handle { submethod BUILD() { say self.perl; } }; IO::Foo.new
12:47 camelia rakudo-moar 69426b: OUTPUT«IO::Foo is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/rCP0S9GCZK line 1␤␤»
12:47 Azry_ i use it like that IO::Pty.new(path => "/dev/null");
12:48 llfourn m: class IO::Foo is Str { submethod BUILD() { say self.perl; } }; IO::Foo.new
12:48 camelia rakudo-moar 69426b: OUTPUT«""␤»
12:48 tadzik http://download.java.net/jdk9/docs/api/java/util/Map.html#of-K-V-K-V-K-V-K-V-K-V-K-V-K-V-K-V-K-V-K-V- I found this moderately amusing
12:48 llfourn m: class IO::Foo is Perl { submethod BUILD() { say self.perl; } }; IO::Foo.new
12:48 camelia rakudo-moar 69426b: OUTPUT«IO::Foo.new(compiler => Compiler.new(id => "D1585FFC2043CFF5D06D7C99A4A788099F9BB225.1457646626.73081", release => "", codename => "", name => "rakudo", auth => "The Perl Foundation", version => Version.new('2016.2.122.g.69426.bd'), signature => Blob, desc…»
12:48 llfourn m: class IO::Foo is Perl { submethod BUILD() { say self.^name; } }; IO::Foo.new
12:48 camelia rakudo-moar 69426b: OUTPUT«IO::Foo␤»
12:48 mr-foobar joined #perl6
12:50 lizmat llfourn  Azry_ : seems IO::Handle is hard-coded in IO::Handle.perl
12:50 llfourn ah
12:50 lizmat PR's welcome
12:50 lizmat otherwise I'll fix that in the next half hour or so
12:50 llfourn Azry_: so it's just cosemetic :)
12:51 llfourn cosmetic*
12:51 Azry_ uh i don't understand =) PR ?
12:51 llfourn Azry_: Pull request on github if you want to help fix it :)
12:52 Azry_ ah uh i've never done that, any pointer where to look for it ? otherwise i'd like to see that commit =)
12:52 dalek rakudo/nom: 02122e5 | lizmat++ | src/core/Version.pm:
12:52 dalek rakudo/nom: Streamline Version creation / handling and fixes
12:52 dalek rakudo/nom:
12:52 dalek rakudo/nom: Makes it 10% (for v1.foo) to 36x faster (for v6)
12:52 dalek rakudo/nom:
12:52 dalek rakudo/nom: - use custom SET-SELF method for faster initialization
12:52 dalek rakudo/nom: - save parts as native list with deconted values (makes it truly immutable)
12:52 dalek rakudo/nom: - creates stringification at creation time (faster .perl/.gist/.Str)
12:52 dalek rakudo/nom: - shares instances for v6, v6.c, v, v*, v+
12:52 dalek rakudo/nom: - outputs .perl as version string whenever possible
12:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/02122e5e67
12:52 lizmat I'll do it now
12:52 llfourn lizmat++
12:53 llfourn Azry_: it's here: https://github.com/rakudo/rakudo/blob/nom/src/core/IO/Handle.pm#L782 # as you can see it's hardcoded
12:53 DrForr_ tadzik: Closed the issue, I was probably out-of-date.
12:54 tadzik DrForr_: sounded like that; thanks :)
12:54 Skarsnik joined #perl6
12:57 dalek rakudo/nom: a2774a7 | lizmat++ | src/core/IO/Handle.pm:
12:57 dalek rakudo/nom: IO::Handle.perl|gist now a bit more subclass aware
12:57 dalek rakudo/nom:
12:57 dalek rakudo/nom: Spotted by Azry_++ and llfourn++
12:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a2774a75b5
12:59 Azry_ llfourn: thank you very much =) i'll look into rakudo code a bit more now
12:59 Azry_ *from now on
13:00 llfourn Azry_: ^ lizmat++ fixed it so if you rebuild you will get a sane .perl :)
13:00 geekosaur joined #perl6
13:01 Azry_ yes i saw that, thanks lizmat
13:03 [ptc] m: use DBIish;
13:03 camelia rakudo-moar 69426b: OUTPUT«===SORRY!===␤Could not find DBIish in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Repository::Abso…»
13:03 perlawhirl joined #perl6
13:04 nine Is there a way to overwrite &exit in the dynamic scope?
13:04 Skarsnik star-m: use DBIish;
13:04 camelia star-m 2015.09: ( no output )
13:04 Skarsnik wow old star x)
13:04 llfourn nine: you can't overwrite anything in dynamic scope apart from $* variables?
13:05 nine I need to anyway
13:05 llfourn hmmm
13:05 llfourn well I actually do do this in a project I have
13:06 llfourn but I overwrite exit to do be sub exit(|args){ $*some-dynamic.exit(|args) }
13:06 llfourn (lexically)
13:07 molaf joined #perl6
13:09 lizmat perhaps we need to make sub exit look at $*EXIT for code to ectually execute ?
13:10 lizmat *actually
13:10 lizmat but I'm not sure whether that would be 6.c, 6.c.1 or 6.d land
13:10 moritz why not simply die, when you want it to be interceptible?
13:11 nine Because tadzik decided to use exit in his code and I can't influence that :)
13:11 dalek rakudo/nom: c124e57 | lizmat++ | src/core/VM.pm:
13:11 dalek rakudo/nom: Streamline VM.platform-library-name a bit
13:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c124e573ab
13:12 llfourn can we do signal trapping?
13:12 moritz yes
13:12 nine Using exit in a Perl 6 callback called from Perl 5 code causes a segfault during cleanup of the Perl 5 interpreter because that still is inside a running subroutine
13:12 lizmat llfourn: exit / die / warn are not signals in the P6 world ?
13:12 tadzik :D
13:12 moritz die and warn are control exceptions
13:13 lizmat moritz: ah, yes...
13:13 lizmat duh  -)
13:13 lizmat perhaps exit should also be ?
13:13 nine If I could, I would actually replace exit with a sub that dies while we're inside Perl 5 code
13:15 lizmat nine: if sub exit would merely execute what is in $*EXIT, you would be in business, right ?
13:16 lizmat (and having PROCESS::<$EXIT> set to what sub exit now is)
13:19 jnthn Could be &EXIT
13:19 moritz star-m: say 'version?'
13:19 camelia star-m 2016.01: OUTPUT«version?␤»
13:19 nine lizmat: yes
13:19 lizmat jnthn: &*EXIT you mean?
13:19 moritz Skarsnik: we now have a contemporary star
13:19 Skarsnik nice
13:20 tadzik star: use lib: confused;
13:20 camelia star-m 2016.01: OUTPUT«===SORRY!===␤Cannot iterate object with P6opaque representation␤»
13:20 tadzik this is even better!
13:20 tadzik but this is what I meant;
13:21 tadzik star: use Panda: confuse-me;
13:21 camelia star-m 2016.01: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4K1lGm6Eox␤Confused␤at /tmp/4K1lGm6Eox:1␤------> 3use Panda7⏏5: confuse-me;␤»
13:21 jnthn lizmat: I meant in PROCESS
13:21 tadzik "Confused" :)
13:21 lizmat jnthn nine ok, patch almost ready
13:21 tadzik I encountered it mistyping "use HTTP::UserAgent: simple" instead of "use HTTP::UserAgent :simple"
13:23 nine I think I found a fix on the Perl 5 side :)
13:24 nine I copied this code from perl's S_my_exit_jump into p5_destruct_perl: if (PL_e_script) { SvREFCNT_dec(PL_e_script); PL_e_script = NULL; } POPSTACK_TO(PL_mainstack); dounwind(-1); LEAVE_SCOPE(0);
13:24 nine Seems to clean up perl's callstack enough so the teardown would go through
13:25 lizmat nine: nonetheless, being able to capture exit() may be useful for embedding applications
13:25 nine absolutely
13:26 nine mod_perl does it for example
13:26 lizmat hmmmm... problem with creatin restricted setting
13:29 lizmat chicken/egg problem
13:30 masak hehe -- implementing fizzbuzz in 007 revealed all kinds of parsing and scoping issues!
13:31 masak and here I thought it would be straightforward
13:31 sufrostico joined #perl6
13:31 masak currently, 007 has a fizzbuzz score of 5, because it gets to 5 ("buzz") before it croaks :P
13:31 kaare_ joined #perl6
13:31 tadzik hahahh
13:32 dalek Inline-Perl5: 5160dd1 | (Stefan Seifert)++ | p5helper.c:
13:32 dalek Inline-Perl5: Fix segfault on using exit() in a Dancer2 action
13:32 dalek Inline-Perl5:
13:32 dalek Inline-Perl5: exiting Perl 6 while in a callback from Perl 5 leaves the Perl 5
13:32 dalek Inline-Perl5: callstack still in place and may confuse Perl 5's cleanup on interpreter
13:32 dalek Inline-Perl5: shut down. So we try to tear down the Perl 5 callstack first.
13:32 dalek Inline-Perl5:
13:32 dalek Inline-Perl5: tadzik++ for reporting this issue!
13:32 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/5160dd18fe
13:32 rudi_s jnthn: Awesome. - Seems to work fine. Proposed path here (works fine for me): https://pbot.rmdir.de/YNtqa61WMPIphTA-w5IA5Q - do you want to apply the patch or should I create a pull request on github?
13:32 yoleaux 10:20Z <jnthn> rudi_s: It shouldn't be much harder than just filling in that entry in the op_table
13:32 rudi_s *patch
13:32 moritz masak: regarding your naming of Q trees: you should make a connection to the Q character in the James Bond movies :-)
13:32 moritz ("awesome tech from the future")
13:33 tadzik masak: "is it a man-compiler, or a boy-compiler?" -- "It's a man. A 5 year old man"
13:33 moritz lol
13:33 masak moritz: somewhat embarrassingly, I forgot completely about the 007<->Q connection (and it being funny). I'm just so used to it!
13:33 jnthn rudi_s: Well, PR is lazy way for me ;)
13:34 masak moritz: the causal order is I came up with Q, and shortly after that, 007 was born. so 007 is actually named after Q.
13:34 rudi_s jnthn: As in easier for you? Then I'll create a pull request.
13:34 masak heh, turns out it was only a parsing problem. 007 really didn't like that I named my recursive sub `subtract`... :P
13:34 moritz masak: that makes sense. Kinda.
13:34 masak so now 007 has a fizzbuzz score of 100 \o/
13:34 jnthn rudi_s: Yes, easier for me :)
13:34 rudi_s jnthn: Ok. Will do.
13:35 jnthn Thanks!
13:35 lizmat $ 6 'my &*EXIT = -> $s = 0 { say $s; die }; exit'
13:35 lizmat 0
13:35 lizmat Died
13:35 lizmat nine jnthn : something like that?  ^^^
13:35 nine Looks cool :)
13:35 jnthn lizmat: think that's OK
13:36 lizmat ok, spectesting now
13:37 rudi_s jnthn: [x] - any idea if this also needs to be implemented for the jvm backend (sadly I can't test that)?
13:37 llfourn will signals call &*EXIT?
13:38 jnthn rudi_s: Probably, I don't think .native-descriptor is implemented at on JVM
13:38 jnthn llfourn: Not unless you wire up a signal handler
13:38 jnthn And have that call exit
13:39 llfourn jnthn: cool. But would a custom &*EXIT ever be in the signal handler anyway?
13:39 llfourn I would guess not...
13:39 jnthn Probably not, though you could also set GLOBAL::<&EXIT> instead and that'd work out
13:40 llfourn oh GLOBAL::&EXIT is already a thing?
13:40 llfourn do you mean GLOBAL::&exit?
13:41 jnthn No, I didn't :P
13:41 jnthn That compiles into GLOBAL:: & exit, no? :)
13:42 llfourn right you need < >
13:50 musiKk_ joined #perl6
13:52 buharin joined #perl6
13:55 lizmat hmmm.... somehow the &*EXIT is not being registered...
13:55 pmurias joined #perl6
13:56 lizmat will look at it when I'm back&
13:57 lizmat current state: https://gist.github.com/lizmat/ad713ff87e8c4c307a81   # for the tinkerers
13:57 lizmat afk&
14:03 rudi_s jnthn: tests for the pull request complete - btw. I noticed a few other pull requests which look fine, any reason they weren't merged yet?
14:05 jnthn rudi_s: Not reviewed, mostly
14:05 rudi_s Ok.
14:06 rudi_s The VS2013 looks correct (have no windows to test though).
14:06 jnthn I think the lint ones I maybe didn't like
14:06 rudi_s The lint ones too (if they compile). - Why didn't you like them?
14:07 jnthn Will have to look at them more closely
14:07 rudi_s More const sounds always like a good thing, and correct format string specifier too.
14:07 jnthn More const is *not* always a good thing, if it leads to new warnings and clutter.
14:08 rudi_s Well, assuming they don't introduce more warnings of course.
14:08 rudi_s Haven't checked the build.
14:08 jnthn Yeah, I think some patches that've gone consting in the past did
14:08 jnthn Also I'm just generally not fond of linting and changing stuff to please some tool.
14:09 virtualsue joined #perl6
14:10 perlawhirl hi perlers
14:10 perlawhirl if i already have a token, can i "append/concat" to it like i would a string, eg: my token foo { <$bar> }; token foo { <foo> <$baz> };
14:10 perlawhirl i can do it with EVAL *spit* but just wondering if there's another way
14:11 perlawhirl or alternatvely, can i generate a new token from an array of tokens, eg: my token foo { <{ @list-of-tokens }>;
14:12 masak that latter sounds much better
14:12 perlawhirl yeah it does
14:12 perlawhirl can i do it ? :D
14:13 Mouq joined #perl6
14:13 perlawhirl i am currently doing it that way with EVAL
14:13 perlawhirl ie. my $rx = EVAL '/' ~ @tokens.join('\s') ~ '/'; $sting ~~ $rx
14:14 perlpilot Doesn't <@foo> do that?
14:14 Skarsnik m: sub foo($c) { return if $c == 0; { say "B $c"; repeat { say "A $c"; foo($c -1) } while 0 } }; foo(3)
14:14 camelia rakudo-moar c124e5: OUTPUT«B 3␤A 3␤B 2␤»
14:14 perlawhirl i think i tried, let me check again
14:14 skids joined #perl6
14:15 [Tux] joined #perl6
14:15 perlawhirl doesn't seem to be, no. matches the first token in the array only
14:16 jnthn <@foo> means an alternation of the things in @foo
14:16 llfourn perlawhirl: <{ @list-of-token.join('||') }> # maybe I'm not that good with grammar
14:17 masak but <{ }> is basically an EVAL
14:17 jnthn token foo(*@tokens) { [<?{@tokens}> $(@tokens.shift)]* } or soemthing
14:17 perlawhirl jnthn: i'll try it out
14:18 jnthn I didn't :)
14:18 perlpilot It's funny that @arrays are an order sequence, but in regex we get an alternation which can match in any order.
14:19 llfourn grammar Foo { proto token foo {*} }; for @tokens -> $toke { Foo.^add_multi_method('foo',my token { $toke } } # maybe?
14:19 perlawhirl jnthn: it worked! thanks
14:20 perlawhirl masak: i know it basically an EVAL, just didn't want no MONKEYS in my code :)
14:21 llfourn jnthn++ solution is fascinating
14:21 perlawhirl it is indeed... but makes perfect sense!
14:21 dalek nqp: cd2c69d | FROGGS++ | tools/build/MOAR_REVISION:
14:21 dalek nqp: bump moar revision for nativecall feature
14:21 dalek nqp: review: https://github.com/perl6/nqp/commit/cd2c69daa5
14:22 llfourn perlawhirl: if you can explain it to me it would be cool :D
14:22 llfourn why does it iterate over each token?
14:22 perlpilot llfourn: because of the *
14:22 perlawhirl because * is 0 or more, so it keeps shifting as it matches
14:22 perlpilot though, I would expect that it could also stop early (not sure if that's desirable or not)
14:23 perlawhirl maybe *? will stop early... though i am dubious
14:23 llfourn but * checks for 0 or more, once it fails to match the first thing shouldn't it stop rather than try them all?
14:23 llfourn or is that what you want?
14:24 dalek rakudo/nom: a8f407c | FROGGS++ | / (4 files):
14:24 dalek rakudo/nom: allow to cast Pointer to "is native" subroutine
14:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a8f407cccd
14:24 perlawhirl yes, that's exactly what i wanted, to fail unless all tokens match
14:24 llfourn ahh ok I thought you wanted a disjunction
14:24 perlawhirl but i wanted to dynamically generate the list of tokens based on some input
14:25 llfourn still interesting :)
14:27 perlawhirl actually, it does stop early, but which i mean the $/ has up to the tokens that matched, which is normal behavour of a match object
14:27 perlawhirl but it's probably easy enough to check if all of them matched
14:27 perlawhirl a basic way would just be check if there's anything left in @tokens
14:27 perlawhirl if there is, we didn't shift all of them, so they didn't all match
14:28 Upasaka joined #perl6
14:28 perlpilot yep
14:30 perlpilot And if you wanted to do this in a context where there's backtracking, you may have to worry about the destructive nature of .shift  :)
14:35 FROGGS[mobile] joined #perl6
14:36 virtualsue joined #perl6
14:43 * [Coke] could use some coffee
14:49 perlawhirl for those still playing at home... this also works a treat: token foo { <{@tokens[$++]}>+ };
14:49 dalek rakudo/nom: 2a87489 | hoelzro++ | lib/NativeCall.pm6:
14:49 dalek rakudo/nom: Fix NativeCall
14:49 dalek rakudo/nom:
14:49 dalek rakudo/nom: For some reason (role bodies are tricky), we got an error along
14:49 dalek rakudo/nom: the lines of "this type does not support associative operations"
14:49 dalek rakudo/nom: regarding $lib2mangler.  Initializing $lib2mangler at the unit level
14:49 dalek rakudo/nom: fixes the issue
14:49 cdg joined #perl6
14:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2a8748979b
14:49 llfourn perlawhirl: nice
14:50 perlpilot perlawhirl: how about <{@tokens[$++]}> ** {+@tokens}  (to make sure they all match)
14:50 perlpilot ?
14:50 perlawhirl my mind was already walking down that path :) let me test
14:51 perlawhirl yes =)
14:51 perlpilot cool
14:51 perlawhirl fails nicely
14:51 llfourn perlpilot++ perlawhirl++
14:51 perlawhirl with a big fat Nil
14:51 perlpilot perl6++
14:58 perlpilot It's still weird that to get the most salient feature of arrays in a regex, you have to be so verbose.  It would be nice if there were some built-in way to say "match these things in order" and "match *all* of these things in order"
14:59 jnthn Yeah... We're at least consistent though :)
14:59 jnthn < foo bar baz > in a regex is also an alternation
15:00 brrt joined #perl6
15:10 perlpilot It's too bad  @array doesn't match all of the items in sequence and you must say |@array or ||@array to get the alternation.  (you'd probably need some modifier to make @array stop early though)
15:10 perlpilot though that this is the first time since the regex reformation that this has come up says something about the demand for such a feature too  :)
15:11 perlpilot anyway ...
15:11 * perlpilot stops thinking about it
15:11 geekosaur you know, I don;t think I've ever needed that
15:11 geekosaur since, uh, a week after the release of perl 3
15:24 sufrostico joined #perl6
15:39 dalek doc: 1dd6bbf | FROGGS++ | doc/Language/nativecall.pod:
15:39 dalek doc: describe how to invoke function pointers
15:39 dalek doc: review: https://github.com/perl6/doc/commit/1dd6bbf419
15:42 Skarsnik duh that really work?
15:52 andreoss joined #perl6
15:54 andreoss is there way to pass by name in Perl 6?
15:55 travis-ci joined #perl6
15:55 travis-ci Doc build failed. Tobias Leich 'describe how to invoke function pointers'
15:55 travis-ci https://travis-ci.org/perl6/doc/builds/115346161 https://github.com/perl6/doc/compare/f608482aa453...1dd6bbf419bb
15:55 travis-ci left #perl6
15:56 andreoss or rather call by name
15:57 skids m: 42."say"
15:57 camelia rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NckFTcfdd_␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/NckFTcfdd_:1␤------> 42."say"7⏏5<EOL>␤»
15:57 skids m: 42."say"()
15:57 camelia rakudo-moar 2a8748: OUTPUT«42␤»
15:59 andreoss something like this http://docs.scala-lang.org/sips/pending/repeated-byname.html#translation-rules
16:01 eiro joined #perl6
16:05 andreoss m: sub loop-while(&cond, &body) { &body() if &cond(); &?ROUTINE(&cond, &body) }; my $i = 0; loop-while({ $i < 5 }, { $i++; say $i });
16:05 camelia rakudo-moar 2a8748: OUTPUT«1␤2␤3␤4␤5␤Memory allocation failed; could not allocate 127424 bytes␤»
16:06 jnthn No, you have to explicitly closure them on the callee side
16:06 jnthn It's the kind of thing macros might enable
16:06 cognominal joined #perl6
16:06 jnthn But we don't have those yet.
16:06 andreoss m: sub loop-while(&cond, &body) { &body() and &?ROUTINE(&cond, &body) if &cond() }; my $i = 0; loop-while({ $i < 5 }, { $i++; say $i });
16:06 camelia rakudo-moar 2a8748: OUTPUT«1␤2␤3␤4␤5␤»
16:07 jnthn fwiw, you can just say body() and cond() for calling them if you bound them with the & sigil
16:09 dalek perl6-examples: c7cef31 | raiph++ | categories/tutorial/01-word-wrap.pl:
16:09 dalek perl6-examples: Rewrite for reasonable naming and bug fix(es)
16:09 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/c7cef31dda
16:13 andreoss so closures don't count as `by name`
16:14 llfourn I did some googling on "pass-by-name" ... Don't really get it
16:14 andreoss llfourn: look for scala examples
16:15 llfourn andreoss: yeah I have -- they just say it's a syntax trick where instead of doing somefunc(() => math.random) you can just pass somefunc(math.random) # is this right?
16:16 llfourn ie it's just shorthand
16:16 llfourn but in other places it seems to be some more high level compsci abstraction
16:17 andreoss I guess it doesn't use closures at all, but rather operates on AST level somehow
16:17 llfourn so it's just a macro?
16:20 llfourn oh you mean it like compiles a new func each time it sees a call to it and s/arg/math.random/. Kinda interesting.
16:20 llfourn but how did this ever get called "call-by-name"
16:25 Azry_ is it good practices to use cmake or autoconf to build a module ? I need to check for some libraries/vars/functions. works with cmake but i wonder if it's the way to go
16:25 ygbn joined #perl6
16:26 Azry_ Or can Nativecall check for functions/structs/var itself ?
16:27 Skarsnik Nc only use the library file
16:28 Skarsnik source/header are irrelevant, only the symbols in the library files, and proper size for signature of stuff
16:32 Azry_ so i need to check for functions like i would though CHECK_FUNCTION_EXISTS with cmake, is there a perlish way to do that ?
16:34 Skarsnik I am not sure to get what you want to do. NC work with compiled library, it depend on how the library you want to use had been compiled
16:34 khw joined #perl6
16:36 FROGGS joined #perl6
16:37 Azry_ i want my code to be portable, and differents OS have differents functions to do the same thing (Pty allocation). I want to know which function to use. I'm currently doing it by initialising variables like "HAVE_PTSNAME" with cmake
16:38 Azry_ but that implies that the user needs cmake, so i'm not completely satisfied
16:38 rhmekjfn joined #perl6
16:39 Skarsnik you can test the os in perl6 and change what you bind if you already know the symbol
16:39 geekosaur might be better to just declare a dependency on one of the C libraries that abstract pty creation
16:39 rhmekjfn m: sub loop-while(&cond, &body) { if (&cond()) {&body()} else {return}; &?ROUTINE(&cond, &body) }; my $i = 0; loop-while({ $i < 5 }, { say $i; $i++; }); # andreoss
16:39 camelia rakudo-moar 2a8748: OUTPUT«0␤1␤2␤3␤4␤»
16:39 geekosaur and bind to that, for a fixed perl6-facing abi
16:41 geekosaur this also protects you from having to deal with e.g. some of the security gotchas around pt_chown
16:42 andreoss m: proto role YYY {*};
16:42 camelia rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lNjGdeFuWk␤Missing block␤at /tmp/lNjGdeFuWk:1␤------> 3proto role7⏏5 YYY {*};␤    expecting any of:␤        new name to be defined␤»
16:42 pmurias what is nqp::closefh_i on a syncpipe supposed to return?
16:42 andreoss is there proto roles?
16:42 rhmekjfn m: sub loop-while(&cond, &body) { &body() and &?ROUTINE(&cond, &body) if &cond() }; my $i = 0; loop-while({ $i < 5 }, { say $i; $i++; });
16:42 camelia rakudo-moar 2a8748: OUTPUT«0␤»
16:44 FROGGS_ joined #perl6
16:44 FROGGS_ m: use NativeCall; say cglobal Str, 'malloc', Pointer # Azry_
16:44 camelia rakudo-moar 2a8748: OUTPUT«NativeCall::Types::Pointer<0x7fb9c563ef60>␤»
16:44 FROGGS_ m: use NativeCall; say cglobal Str, 'flubber', Pointer # Azry_
16:44 camelia rakudo-moar 2a8748: OUTPUT«Cannot locate symbol 'flubber' in native library ''␤  in block  at /home/camelia/rakudo-m-inst-2/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 line 406␤  in block <unit> at /tmp/lzg2iW_fpm line 1␤␤»
16:44 FROGGS_ Azry_: Str is the arg where you'd put the library name
16:45 FROGGS_ and malloc and flubber are just examples of functions you want to check
16:45 Azry_ FROGGS: wow, so there is a way =) great i'll test this, thanks
16:45 Skarsnik is that a typed execption that could be catch?
16:45 FROGGS_ if the lib exposes that symbol, you get a valid pointer back, otherwise an exception
16:46 pmurias jnthn: is there a reason for nqp::closefh_i to return the exit value shifted by 8 bits?
16:49 FROGGS__ joined #perl6
16:49 FROGGS__ Skarsnik: dont think so
16:50 andreoss p: use MONKEY-TYPING; use class :open<Foo>; class Foo is open {...};
16:50 andreoss m: use MONKEY-TYPING; use class :open<Foo>; class Foo is open {...};
16:50 camelia rakudo-moar 2a8748: OUTPUT«===SORRY!===␤Could not find class in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Repository::Absol…»
16:51 FROGGS what's that?
16:51 andreoss S12
16:52 FROGGS NYI
16:52 FROGGS dunno if we ever get that
16:54 pmurias jnthn: it seems we are unpacking it into signal and exit code in the Perl 6 layer so it seems ok
16:55 FROGGS has somebody ever spotted that? https://travis-ci.org/perl6/doc/builds/115346161#L1674
16:56 llfourn FROGGS: same thing happened to me
16:56 FROGGS ahh
16:56 llfourn it's non-deterministic
16:56 FROGGS so I am not to blame?
16:56 llfourn no your pod is probably not bad enough to cause a segfault
16:56 FROGGS I'll let it rebuild
16:56 FROGGS *g*
16:56 FROGGS thanks
17:02 nine Is there some way to only enable a pragma if the compiler supports it?
17:03 FROGGS maybe use this? https://github.com/FROGGS/p6-if
17:04 nine To be precise: to only pass an argument to a pragma if the compiler support it
17:04 llfourn FROGGS++ a World mixin nice idea
17:05 llfourn in a scary sort of way
17:05 nine I don't even want to think about how that interacts with precompilation :)
17:05 skids m: my $c = Channel.new; $c.send($(1,2)); $c.send((1,2)); $c.receive.perl.say; $c.receive.perl.say; # any particular reason why Channel stripping itemization is beneficial behavior?
17:05 camelia rakudo-moar 2a8748: OUTPUT«(1, 2)␤(1, 2)␤»
17:06 nine my role BetterWorld
17:06 llfourn XD
17:07 FROGGS well, can you check the signature of the thing the pragma calls or so?
17:07 FROGGS then you'd have a somewhat robust test to use with pragma if
17:08 nine The pragma is 'precompilation' which is implemented directly in do_pragma
17:11 dalek nqp: 6d38769 | (Pawel Murias)++ | src/NQP/Compiler.nqp:
17:11 dalek nqp: [js] Add our custom command line flags to the nqp-js-on-js.
17:11 dalek nqp: review: https://github.com/perl6/nqp/commit/6d38769eba
17:11 dalek nqp: 3242d3e | (Pawel Murias)++ | src/vm/js/ (3 files):
17:11 dalek nqp: [js] Implement nqp::closefh_i and nqp::syncpipe.
17:11 dalek nqp:
17:11 dalek nqp: This allows us to pass test 86.
17:11 dalek nqp: This also makes --beautify on nqp-js-on-js work.
17:11 dalek nqp: review: https://github.com/perl6/nqp/commit/3242d3ee0d
17:13 travis-ci joined #perl6
17:13 travis-ci NQP build failed. Pawel Murias '[js] Implement nqp::closefh_i and nqp::syncpipe.
17:13 travis-ci https://travis-ci.org/perl6/nqp/builds/115369672 https://github.com/perl6/nqp/compare/cd2c69daa545...3242d3ee0d18
17:13 travis-ci left #perl6
17:14 gtodd1 joined #perl6
17:15 * pmurias checks why it fails
17:16 pmurias weird this seems to be an js only commit that fails
17:19 dalek nqp: 8b11181 | coke++ | README.pod:
17:19 dalek nqp: Make MoarVM more prominent than the Parrot VM
17:19 dalek nqp: review: https://github.com/perl6/nqp/commit/8b1118196e
17:20 * [Coke] restarts the failed job.
17:20 FROGGS I can reproduce here
17:21 travis-ci joined #perl6
17:21 travis-ci NQP build failed. Will "Coke" Coleda 'Make MoarVM more prominent than the Parrot VM'
17:21 travis-ci https://travis-ci.org/perl6/nqp/builds/115371602 https://github.com/perl6/nqp/compare/3242d3ee0d18...8b1118196e03
17:21 travis-ci left #perl6
17:21 FROGGS pmurias: why does my moar only nqp fail to build with your patch? that does not make any sense
17:22 [Coke] that's the failure in the travis, also: Unhandled exception: While looking for 'nqp.moarvm': no such file or directory
17:22 travis-ci joined #perl6
17:22 travis-ci NQP build failed. Pawel Murias '[js] Implement nqp::closefh_i and nqp::syncpipe.
17:22 travis-ci https://travis-ci.org/perl6/nqp/builds/115369672 https://github.com/perl6/nqp/compare/cd2c69daa545...3242d3ee0d18
17:22 travis-ci left #perl6
17:23 FROGGS maybe it does not understand #?if js in NQP::Compiler?
17:25 sufrostico joined #perl6
17:26 FROGGS pmurias: found it!
17:27 dalek nqp: 9b10c93 | FROGGS++ | src/NQP/Compiler.nqp:
17:27 dalek nqp: fix typo in fudge line
17:27 dalek nqp: review: https://github.com/perl6/nqp/commit/9b10c93530
17:27 andreoss left #perl6
17:29 dalek doc: 3b5bd22 | paultcochrane++ | doc/Language/testing.pod:
17:29 dalek doc: Document the can-ok() test function
17:29 dalek doc: review: https://github.com/perl6/doc/commit/3b5bd22718
17:30 travis-ci joined #perl6
17:30 travis-ci NQP build passed. Tobias Leich 'fix typo in fudge line'
17:30 travis-ci https://travis-ci.org/perl6/nqp/builds/115373403 https://github.com/perl6/nqp/compare/8b1118196e03...9b10c935309f
17:30 travis-ci left #perl6
17:32 pmurias sorry for breaking master :/
17:33 dalek Inline-Perl5: 827f9bf | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
17:33 dalek Inline-Perl5: Allow for precompilation of Inline::Perl5 itself
17:33 dalek Inline-Perl5:
17:33 dalek Inline-Perl5: As we can precompile Inline::Perl5 just fine and only modules that use
17:33 dalek Inline-Perl5: :from<Perl5> cannot be precompiled, we "export" the no precompilation
17:33 dalek Inline-Perl5: pragma to them.
17:33 dalek Inline-Perl5:
17:33 dalek Inline-Perl5: This takes several seconds off the startup time of any program using
17:33 dalek Inline-Perl5: Inline::Perl5
17:33 dalek Inline-Perl5:
17:33 dalek Inline-Perl5: FROGGS++ for contributing the winning idea!
17:33 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/827f9bfc15
17:34 tadzik nice!
17:36 tadzik now even tests pass faster :)
17:37 tadzik and Perldancer.org starts in like 1 second
17:39 sufrostico joined #perl6
17:41 FROGGS[mobile] joined #perl6
17:42 FROGGS[mobile] sergot, tadzik: are you comming?
17:43 tadzik ye
17:45 ilmari nine++ # perl6 -e 'use Inline::Perl5' down from 6.9 to 0.3 seconds on my machine
17:45 FROGGS[mobile] nice!
17:45 timotimo oooh
17:47 sufrosti1o joined #perl6
17:47 Sufrostico joined #perl6
17:49 SCHAAP137 joined #perl6
17:49 hoelzro wow
17:53 Hotkeys Oh god http://xkcd.com/1654/
17:54 timotimo <3
18:00 prammer joined #perl6
18:01 * geekosaur can double that list without even trying, and add even more with some thought...
18:02 xfix joined #perl6
18:05 domidumont joined #perl6
18:08 AlexDaniel joined #perl6
18:09 AlexDaniel m: say [1, 2, 3] Z= (4, 5, 6) # heh
18:09 camelia rakudo-moar 2a8748: OUTPUT«(4 5 6)␤»
18:11 jnthn nine: Wow, that's evil! :-D
18:15 Skarsnik joined #perl6
18:18 maybekoo2 joined #perl6
18:19 Azry_ is LibraryCheck the best way to test if a library exists ?
18:20 zpmorgan joined #perl6
18:21 Azry_ (with nativecall)
18:25 RabidGravy Or do what it does
18:25 RabidGravy it's not very complicated
18:26 Azry_ well, i could parse ldconfig -r but i doesn't look clean =)
18:28 RabidGravy all LibraryCheck does is create a native sub on the library and execute it, checking the exception, if it's "library not found" then it returns false
18:30 atweiden joined #perl6
18:32 timotimo what if the library actually has the function of that name, and executing that function willy-nilly will give you big trouble?
18:33 timotimo i mean, sure, it uses a 15-letters-long random combination of lower and upper case letters
18:33 RabidGravy it tries hard to make an unlikely name ;-)
18:33 timotimo but how hard is it really to build a library that has all of these?
18:34 Azry_ my problem is : on debian i need to refer to libc.so.6 and on my freebsd i need to refer to libc.so.7
18:34 timotimo did you see the thing froggs showed off with "malloc" and "flubber" using cglobal?
18:34 Azry_ yes, but it guesses the name of the library the same way
18:35 RabidGravy you shouldn't need to worry about the library for libc, it'll be loaded already
18:35 Azry_ oh, i didn't know that, so i donc need to give an argument to "is native()" then ?
18:36 andreoss joined #perl6
18:36 RabidGravy no you shouldn''t have to
18:36 Azry_ okay thanks, i look into that =)
18:36 andreoss is there a type like Nil on which roles can be applied?
18:36 timotimo yesterday i saw a post by an "expert" who said "it's still a board-game, though. you can just calculate every possible move, then every possible counter-move, then every counter-counter move, and so on, until you win. why is everybody so excited about this?"
18:37 andreoss m: role Foo { };  my $x  = Nil.new ; $x does Foo;
18:37 camelia rakudo-moar 2a8748: OUTPUT«Cannot use 'does' operator with a type object.␤  in block <unit> at /tmp/PtveJTPJbR line 1␤␤»
18:37 timotimo er, don't you have to give an argument to "is native" still?
18:37 timotimo just an undefined one? like Str?
18:37 RabidGravy andreoss, "but"
18:37 andreoss m: role Foo { };  my $x  = Str.new ; $x does Foo;
18:37 camelia rakudo-moar 2a8748: ( no output )
18:38 andreoss m: but.WHAT.say
18:38 camelia rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zkRKjo_rl4␤Undeclared routine:␤    but used at line 1. Did you mean 'put'?␤␤»
18:38 timotimo (to be fair, that person didn't claim to be an expert)
18:38 RabidGravy m: role F {} ;   say (Nil but F}.WHAT
18:38 camelia rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/foL_YVw9pK␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/foL_YVw9pK:1␤------> 3role F {} ;   say (Nil but F7⏏5}.WHAT␤    expecting any of:␤        stat…»
18:38 RabidGravy m: role F {} ;   say (Nil but F}).WHAT
18:38 camelia rakudo-moar 2a8748: OUTPUT«5===SORRY!5=== Error while compiling /tmp/98CyzKXCdq␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/98CyzKXCdq:1␤------> 3role F {} ;   say (Nil but F7⏏5}).WHAT␤    expecting any of:␤        sta…»
18:38 RabidGravy m: role F {} ;   say (Nil but F).WHAT
18:38 camelia rakudo-moar 2a8748: OUTPUT«Nil␤»
18:39 RabidGravy m: role F {} ;   say (Str but F).WHAT
18:39 camelia rakudo-moar 2a8748: OUTPUT«(Str+{F})␤»
18:39 [Coke] m: role F {} ; my $x = F.new; say $x.WHAT
18:39 camelia rakudo-moar 2a8748: OUTPUT«(F)␤»
18:39 RabidGravy oh
18:40 andreoss RabidGravy: thanks
18:40 lizmat .tell hoelzro your fix makes all native call tests from "make test" fail for me  :-(  how is that for you ?
18:40 yoleaux lizmat: I'll pass your message to hoelzro.
18:40 andreoss but i still somehow get `slip()`
18:41 RabidGravy from a sub? that's usually when you slipped off the end without a suitable value to return
18:42 ugexe m: my $x = gather for 1..5 { take $_; say $x; }; say $x.perl # is this error message able to be improved?
18:42 camelia rakudo-moar 2a8748: OUTPUT«List_57850416␤List_57850416␤List_57850416␤List_57850416␤List_57850416␤(\List_57850416 = (1 1 2 3 4 5))␤Method 'push' not found for invocant of class 'Mu'␤  in any  at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line …»
18:44 andreoss https://paste.debian.net/414250/
18:45 andreoss anyone did monads in perl6?
18:45 jevin joined #perl6
18:47 maybekoo2 joined #perl6
18:48 xinming joined #perl6
18:49 hoelzro lizmat: oh no =(
18:49 yoleaux 18:40Z <lizmat> hoelzro: your fix makes all native call tests from "make test" fail for me  :-(  how is that for you ?
18:49 hoelzro I didn't spectest, I had to get out the door
18:49 timotimo well, those aren't spec tests though :)
18:49 timotimo those are non-spec tests!
18:49 lizmat .oO( why are people committing changes without testing ?)
18:50 lizmat there are no nativecall spectests afaik
18:50 hoelzro yeah, that was not cool on my part
18:50 Skarsnik well nc is rakudo
18:50 lizmat hoelzro: so, I would like to see a piece of code that fails for you
18:50 hoelzro my canary was just telling me tab completion was broken, so I wanted to fix it before work
18:50 Skarsnik maybe there could be test for the nqp part x)
18:50 timotimo i don't really remember what those changes were
18:50 hoelzro lizmat: install Linenoise and fire up the REPL
18:51 lizmat ok, will do
18:51 hoelzro lizmat: feel free to revert my change for now
18:51 hoelzro I'll do a proper fix after work
18:51 lizmat lemme see if I can see what's wrong in the REPL case
18:52 hoelzro my commit message describes the situation too
18:52 lizmat yeah, but not *how* you got that message
18:53 hoelzro true!
18:54 skids joined #perl6
18:58 lizmat it is somehow related to precomp
18:59 lizmat if the order is: use lib 't/04-nativecall'; use CompileTestLib; use lib 'lib'; use NativeCall
19:00 lizmat it fails, but if the order is:
19:00 lizmat if the order is: use lib 't/04-nativecall'; use lib 'lib'; use CompileTestLib; use NativeCall
19:00 lizmat it works ok
19:00 lizmat yuck
19:01 lizmat could it be that we're nuking the mainline of NativeCall somehow?
19:01 RabidGravy joined #perl6
19:02 RabidGravy kernel update
19:06 buharin joined #perl6
19:08 RabidGravy really struggling with reading from a jack source with portaudio, can't seem to find the right combination of buffer size and latency
19:09 lichtkind joined #perl6
19:16 prammer joined #perl6
19:16 dalek rakudo/nom: 3e2e7f9 | lizmat++ | t/04-nativecall/ (17 files):
19:16 dalek rakudo/nom: Remove superfluous 'use lib "lib"'
19:16 dalek rakudo/nom:
19:16 dalek rakudo/nom: This fixes the nativecall test breakage caused by 2a8748979b321635 .
19:16 dalek rakudo/nom: As an added bonus, this makes "make test" go 3x as fast.
19:16 dalek rakudo/nom:
19:16 dalek rakudo/nom: hoelzro++ for pointing the way
19:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3e2e7f9cbe
19:16 firstdayonthejob joined #perl6
19:17 dalek rakudo/nom: 5a1e681 | lizmat++ | t/04-nativecall/19-function-pointers.t:
19:17 dalek rakudo/nom: Correct test count
19:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a1e681b8d
19:20 RabidGravy is evil going to happen if I close over a channel in a sub passed as a callback that may get executed in another thread?
19:21 moritz RabidGravy: I sure hope not
19:21 moritz it's supposed to be, like, thread safe :-)
19:22 RabidGravy a callback that will get called by native code this is
19:24 dalek rakudo/nom: b703d67 | lizmat++ | t/0 (41 files):
19:24 dalek rakudo/nom: Make sure all test files start with "use v6"
19:24 dalek rakudo/nom:
19:24 dalek rakudo/nom: And some additional cosmetics
19:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b703d67277
19:26 kerframil joined #perl6
19:29 dalek rakudo/nom: 5e59d2d | lizmat++ | src/core/Version.pm:
19:29 dalek rakudo/nom: Oops, we should share v6.c, not v6c
19:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5e59d2d0c7
19:33 AlexDaniel lizmat: I love your commits :)
19:33 lichtkind_ joined #perl6
19:33 AlexDaniel it's always like “oh, things are much better now”
19:34 Sufrostico joined #perl6
19:34 ely-se joined #perl6
19:35 dalek rakudo/nom: 41d0007 | lizmat++ | src/core/Version.pm:
19:35 dalek rakudo/nom: Make sure we get stringification correct (*sigh*)
19:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/41d0007dac
19:36 lizmat AlexDaniel: well, I'm going for better generally  :-)
19:36 yqt joined #perl6
19:37 spider-mario joined #perl6
19:37 perlpilot aye, lizmat++ for always improving things
19:38 perlpilot (even with missteps, you're still headed in the right direction)
19:38 lizmat thank you both for your kind words  :-)
19:38 Skarsnik 3x faster for NC test
19:38 Skarsnik nice
19:39 lizmat Skarsnik: I think we need to thank nine++ for that essentially
19:39 lizmat with the recent precomp improvements
19:40 Skarsnik I though it was the compile time that was slowy then a lot
19:40 Skarsnik *slowing
19:41 lizmat I think it was basically precomping all of NativeCall in each test, it doesn't do that anymore
19:41 Skarsnik I mean, the c library compile time
19:41 lizmat *test file
19:41 hoelzro lizmat: thanks for fixing that!
19:41 hoelzro lizmat++
19:41 Skarsnik because 17-18 are quite fast
19:43 cdg joined #perl6
19:49 prammer joined #perl6
19:49 timotimo that's quite good
19:56 pdcawley joined #perl6
20:04 prammer joined #perl6
20:04 musiKk_ joined #perl6
20:06 Woodi I found in Moust Needed that LDIF files parsing is missing so here is pure Perl6 (grammars) version: https://github.com/slunski/perl6-text-ldif
20:08 rindolf joined #perl6
20:09 RabidGravy there may be a problem "use v6.c;" in "2016.02-128-g3e2e7f9"
20:09 jjido joined #perl6
20:10 timotimo RabidGravy: a diferent problem from what liz fixed in 5e59d2d ?
20:10 lizmat and further fixed in 41d0007 ?
20:11 RabidGravy I.e. if I load a module which is simply "use v6.c; module F {}"  it craps out in "Missing serialize REPR function for REPR NativeRef"
20:11 RabidGravy those just tests though
20:12 prammer joined #perl6
20:12 lizmat RabidGravy: can't reproduce that here  :-(
20:13 RabidGravy maybe it was the latter one that fixed t
20:13 lizmat I *did* just see that "use v6.c; use Test" runs the CORE setting mainline *twice*
20:13 RabidGravy let's see
20:13 timotimo o_O
20:14 lizmat m: A.a; class A { method a() { say "a" } }   # core setting doesn't complain about this situation
20:14 camelia rakudo-moar 41d000: OUTPUT«5===SORRY!5=== Error while compiling /tmp/B5RcqCwX4M␤Illegally post-declared type:␤    A used at line 1␤␤»
20:17 rudi_s Hi. Is there a shortcut for $_ ~~ ...?
20:18 lizmat ...ACCEPTS($_)
20:18 rudi_s I'll stick with $_ ~~, thanks ;-)
20:18 Mouq joined #perl6
20:18 timotimo given/when will use ~~ for you
20:19 timotimo actually, when will use ~~ on $_ for you
20:19 timotimo but when also has implications on program flow
20:19 rudi_s Yeah. Just an if in this case.
20:19 lizmat m: $_ = 42; when Int { .say }
20:19 camelia rakudo-moar 41d000: OUTPUT«42␤»
20:19 lizmat m: $_ = "42"; when Int { .say }
20:19 camelia rakudo-moar 41d000: ( no output )
20:20 timotimo m: $_ = 64; .say when Int
20:20 camelia rakudo-moar 41d000: OUTPUT«64␤»
20:21 RabidGravy lizmat, yes it was the latter commit that fixed it, I must have pulled immediately before you did that one
20:21 lizmat sorry 'bout that one...
20:23 RabidGravy Hmm, but I'm still getting "Missing serialize REPR function for REPR NativeRef" in the module
20:24 labster joined #perl6
20:24 lizmat RabidGravy: gist ?
20:25 RabidGravy so previously just a "use v6.c" was enough to provoke it, now I don't know what
20:26 RabidGravy the module I'm testing is fine, but a script that uses amother module too gets that
20:27 prammer joined #perl6
20:28 dalek rakudo/nom: 697fb83 | lizmat++ | src/core/ (2 files):
20:28 dalek rakudo/nom: Implement &*EXIT to catch "exit"
20:28 dalek rakudo/nom:
20:28 dalek rakudo/nom: By creating your own &*EXIT, you can catch what "exit" does, e.g.:
20:28 dalek rakudo/nom:
20:28 dalek rakudo/nom:   $ 6 'my &*EXIT = -> $a = 0 { $a.say; die }; exit'
20:28 dalek rakudo/nom:   0
20:28 dalek rakudo/nom:   Died
20:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/697fb83ed2
20:29 lizmat RabidGravy: could you test whether this diff solves it ?
20:29 lizmat https://gist.github.com/lizmat/e683c036e1e5dcc6e385
20:35 RabidGravy just rebuilding
20:41 RabidGravy and nope
20:41 lizmat :-(
20:43 lizmat brb&
20:44 RabidGravy yeaah, it's Audio::Sndfile
20:46 lichtkind i just rethought roles and i meaby dont get a thing but would it be possible to have just finer grained classes and do multiple inheritance instead of "does"
20:46 lichtkind yes hter is still ability to mix in at runtime
20:46 lichtkind but for the rest im correct?
20:48 cognominal joined #perl6
20:48 prammer joined #perl6
20:49 cognominal joined #perl6
20:49 rindolf joined #perl6
20:50 prammer joined #perl6
20:52 lizmat RabidGravy: could you try this gist ?  https://gist.github.com/lizmat/1f401586d4098569ebae
20:53 prammer joined #perl6
20:54 RabidGravy something strange happened in 2016.02-121-g84a84f2 and 2016.02-133-g697fb83
20:54 RabidGravy between that is
20:56 lizmat RabidGravy: inclusive or exclusive ?
20:56 RabidGravy well the earlier one works and the latter one doesn't
20:57 prammer joined #perl6
20:57 partly joined #perl6
20:58 lizmat RabidGravy: did you try that last gist already ?
20:58 RabidGravy just rebuilding
20:59 skids lichtkind: you can do it that way, as long as you can live with the stricture of heirarchy.  Most languages felt the need to have "traits" to escape that heirarchy.
21:00 jnthn It's also about conflict detection.
21:00 jnthn Roles flatten and methods that are identical in name or, if multis, in signature, will conflict.
21:00 jnthn Whereas with inheritance it's just that you get the first one by C3 ordering
21:01 TreyHarr1 joined #perl6
21:02 TreyHarr2 joined #perl6
21:02 lizmat jnthn: is it correct that a "use v6.c" should cause to run the CORE settings mainline twice ?
21:03 lichtkind skids, thanks for understanding the question :)
21:04 lichtkind jnthn++ too :)
21:04 jnthn lizmat: No...that should be nearly impossible...
21:04 lizmat ok, lemme see if I can double verify
21:05 jnthn Unless the setting loading got really shagged up somewhere but even then I don't think Moar would actually run load twice on the same bytecode file
21:05 jnthn Since it keeps the filenames cached
21:05 lizmat ok
21:05 jnthn So we'd more likely get a weird error than run twice
21:05 lizmat jnthn: BTW, is a REPR NativeRef ever in the works ?
21:05 jnthn But yeah, worth confirming
21:05 RabidGravy lizmat, no that didn't fix it
21:05 jnthn NativeRef?
21:06 lizmat my Version changes seems to have caused a regression related to module loading  :-(
21:06 RabidGravy I am getting "Missing serialize REPR function for REPR NativeRef" in something that worked an hour ago
21:07 lizmat I guess somehow it tries to precomp some native values from a Version object
21:07 jnthn There is a NativeRef REPR; it's the one that's used for passing around references to native attributes etc.
21:07 jnthn We can probably serialize those in *some* cases...
21:07 jnthn Maybe all if we hurt our branes enough :)
21:08 lizmat jnthn: then why is it complaining about it being missing ?
21:08 jnthn lizmat: Because we didn't implement serializing them yet :)
21:08 RabidGravy it is associated with the version thing
21:11 skids .oO(That error message might do with mentioning "constant" somehow since that's how users stub their toe on it.)
21:12 jnthn skids: Theres's plenty of ways you might
21:13 jnthn And we can't easily trace it back to the problem
21:13 lizmat RabidGravy: could you verify that b703d6727714aa24 still works ok ?
21:13 jnthn Well, he origin
21:14 timotimo i'll be bringing a few snack-ish things to the hackathon, too. among other things, a "fizzbuzz" themed one, and a bag of "crazy python"
21:14 prammer joined #perl6
21:15 * lizmat wishes she could be there
21:15 lizmat instead, I'll be sitting in a car most of the day
21:17 timotimo :<
21:18 timotimo i got sit on by a cat right now. i think that's better than sitting in a car
21:18 prammer joined #perl6
21:18 lizmat :-)
21:19 lizmat http://t.h8.lv/andshare/IMG_20160217_211308~2.jpg.jpg
21:22 timotimo yup
21:22 RabidGravy lizmat, no that doesn't work either
21:22 RabidGravy will bisect harder
21:24 * jnthn hopes to be sleeping lots tomorrow :)
21:24 jnthn Then maybe some heap profiler hackery :)
21:24 jnthn Given I lost a day's worth of working time this week to darn headaches
21:24 jnthn (They've mostly cleared up again... :))
21:25 lizmat :-)
21:25 Hotkeys I'm trying to make an equivalent to /(?<=(.))(?=\1)/ in p6 but I can't do captures in the perl 6 lookarounds
21:25 Hotkeys is this intended?
21:25 timotimo i notice a distinct lack of tadzik for the hackathon? :o
21:25 colomon joined #perl6
21:26 Hotkeys m: m/<?after (.)><?before $0>/
21:26 camelia rakudo-moar 697fb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/56pYr0WI__␤Unable to parse expression in metachar:sym<( )>; couldn't find final ')' ␤at /tmp/56pYr0WI__:1␤------> 3m/<?after (.)><?before $0>7⏏5/␤    expecting any of:␤        infix stopper␤»
21:27 lizmat RabidGravy: I would try before 02122e5e67d0c9738c and after
21:27 lizmat RabidGravy: also, could you post a --ll-exception trace ?
21:28 perlpilot m: /<?after (.) ><?before $0>/
21:28 camelia rakudo-moar 697fb8: ( no output )
21:29 Hotkeys oh
21:29 perlpilot Hotkeys: )> might be confusing the parser?
21:29 Hotkeys I just needed a space?
21:29 perlpilot I dunno, it was just a guess
21:29 Hotkeys well it didn't get angry
21:29 Hotkeys let's see
21:29 dalek roast: ebcd568 | lizmat++ | / (76 files):
21:29 dalek roast: Make sure that we only have one "use lib"
21:29 dalek roast:
21:29 dalek roast: *BEFORE* loading any modules.  Looks like this causes less precomp,
21:29 dalek roast: resulting in the spectest using ~50 CPU seconds less, and about
21:29 dalek roast: 10 seconds wallclock less (with TEST_JOBS=8)
21:29 dalek roast: review: https://github.com/perl6/roast/commit/ebcd568c65
21:30 jnthn ooh
21:30 jnthn lizmat++
21:30 jnthn lizmat: Did you spot any spectest CPU time reduction from my compiler improvements earlier in the week, btw?
21:30 lizmat no, alas, or I would have mentioned it  :-)
21:30 lichtkind lizmat++
21:31 jnthn OK. It shoulda shaved a little of startup time too, but I suspect it's more "measurable with callgrind" :)
21:31 lizmat jnthn: fwiw, the tendency has been upward for bare startup time
21:31 lizmat 115 msecs for me
21:32 DarthGandalf joined #perl6
21:32 lizmat pretty far away from <100 msecs of half a year / a year ago  :-(
21:33 lizmat but at least, loading modules Is now a *lot* faster (once they're precomped)
21:34 jnthn lizmat: Yeah well, the code size of CORE.setting is probably somewhat to thank
21:34 lizmat ah, I realize where the "running mainline twice" came from
21:34 lizmat from precomping a module (in another process)
21:34 jnthn Ah :)
21:34 prammer joined #perl6
21:35 lizmat jnthn: had a bit of a puzzle implementing &*EXIT
21:35 lizmat m: A.a; class A { method a() { say "a" } }   # jnthn: core setting doesn't complain about this situation
21:35 camelia rakudo-moar 697fb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DwSiMqFL_I␤Illegally post-declared type:␤    A used at line 1␤␤»
21:36 jnthn Curious
21:36 perlpilot Hotkeys: BTW, I think /(.) <( )> $0 /  may actually do what you want
21:36 jnthn Wonder why
21:37 prammer joined #perl6
21:37 lizmat m: class A { ... }; A.a; class A { say "running"; method a() { say "a" } }   # mainline is run *after* the method call
21:37 camelia rakudo-moar 697fb8: OUTPUT«a␤running␤»
21:38 lizmat jnthn: ^^^  that was the actual situation
21:38 jnthn If you have a class A { ... } then it's pre-declared and the method call is OK
21:38 lizmat yeah, it was just a gotcha / DIHWIDT
21:38 jnthn But yeah, code in a class block just runs as it it was in a bare block
21:38 tadzik timotimo: yeah, plane's at 12.ish
21:39 Hotkeys perlpilot: you're wonderful
21:39 SCHAAP137 joined #perl6
21:39 RabidGravy is the first one where it starts going wrong 69426bd8b3adeffd0a1a23ff240bb1018bfedca4
21:39 lizmat jnthn: not sure whether that could / should warrant a warning
21:40 lizmat and hoelzro's fix didn't fix ?
21:41 lizmat aka 2a8748979b32163563
21:41 RabidGravy every commit after that one doesn't work
21:41 hoelzro I broke everything? =(
21:41 * lizmat looks
21:41 lizmat no, *I* did
21:42 hoelzro I broke it transitively, then =P
21:42 timotimo tadzik: sad to hear i'll be missing you by a day :|
21:42 RabidGravy just rolling back to the one before that one
21:43 jnthn lizmat: No, I don't think it's anything unusual
21:43 jnthn lizmat: Anything that actually affects the class should be done at BEGIN time anyway
21:44 lizmat in the case of the settings, it's not always clear in which order the files are..  :-(
21:44 lizmat but yeah, lesson learned
21:45 jnthn We could merge it all into one file to help ;)
21:45 jnthn </trololol>
21:45 timotimo tadzik: but it's my own darn fault :(
21:45 RabidGravy yeah, rolled back to 84a84f218d1af089a311cb52cfbfa5f264a19e74 and it's all good
21:47 tadzik timotimo: schade :(
21:48 lizmat RabidGravy: could you try this gist https://gist.github.com/lizmat/9e0330b039f482c6ae6a  after undoing the revert ?
21:50 RabidGravy not quite sure how that plays in but hey
21:51 sortiz \o
21:51 yoleaux 09:51Z <lizmat> sortiz: make test has always been clean for me: do you have an example that consistently fails?
21:51 sortiz lizmat, I'll try the gist, seems related to my problems.
21:53 lizmat and another of my heroes bites the dust:  https://en.wikipedia.org/wiki/Keith_Emerson   :-(
21:55 perlawhirl joined #perl6
21:56 sortiz The gist fails the NC tests in rakudo.
21:57 lizmat huh?  it doesn't for me  :-(
21:57 lizmat sortiz: you mean the ones in t/04-nativecall right ?
21:58 RabidGravy lizmat, nope that didn't help
21:59 sortiz lizmat, wait, my tree wasn't clean...
22:00 lizmat argh, I messed up my repo
22:02 sortiz lizmat, pass all tests AND fixes my issues.
22:04 lizmat RabidGravy: ah, I misread, I thought you reverted 84a84f218d1af089a311c
22:05 lizmat RabidGravy: so 69426bd8b3adeffd0a1a23f is the first one that fails?
22:05 lizmat RabidGravy: or 02122e5e67d0c973 ?
22:05 RabidGravy no, I just rolled back to  84a84f218d1af089a311cb52cfbfa5f264a19e74
22:05 RabidGravy so the one after that
22:05 prammer joined #perl6
22:06 AlexDaniel github just added “reactions” thingy
22:06 AlexDaniel no more lame “+1” comments!
22:07 RabidGravy so 69426bd8b3adeffd0a1a23ff240bb1018bfedca4
22:07 RabidGravy and all after that
22:07 lizmat adapted gist: https://gist.github.com/lizmat/d0594826506ed6d0b1aa
22:08 lizmat it unnativies some attributes
22:08 RabidGravy so this applies to HEAD?
22:09 RabidGravy I'm beginning to get confused
22:09 lizmat to HEAD yes
22:09 Mouq joined #perl6
22:11 lizmat grrrr.... one test fails in "make", works ok with "perl6"
22:11 lizmat I hate that
22:11 timotimo so, forgot to make install?!
22:11 sortiz lizmat, With Int I'm seeing a Segfault in some of my modules, my be a missing unbox
22:14 timotimo o_O
22:15 timotimo well, with NativeCall, segfaults are provocable, but still ... :|
22:15 lizmat grrr, FROGGS++ commit is interfering with the revert  :-(
22:15 RabidGravy lizmat, nope that doesn't help
22:15 mst damn contributors, going around contributing things
22:15 yoleaux 07:09Z <nine> mst: The 13 seconds for loading Inline::Perl6 are mostly spent on compiling Inline::Perl5 which cannot be precompiled currently. So actually my work in that area will directly benefit Inline::Perl5 and ::Perl6 :)
22:16 timotimo mst: and Inline::Perl5 is now precompilable, so it's now much faster!
22:16 mst sweeeet
22:17 sortiz lizmat, In my case, the change from $lib2mangler to %lib2mangler works great.
22:17 timotimo tadzik: did you ever try the particles or white_noise examples from my SDL2::Raw repo?
22:18 kid51 joined #perl6
22:19 tadzik timotimo: nope, they don't sound familiar
22:20 timotimo well, maybe you should have a quick look? :)
22:20 tadzik prolly :)
22:22 timotimo hrm. i want a script that lets me say "gimme ./foo.txt" on an ssh server i've connected to and let me say "drophere" on my local machine and the file gets transferred immediately
22:23 timotimo bonus points if i can say "drophere" on any machine i'm connected to and it'd still work
22:31 TEttinger joined #perl6
22:34 jameslenz joined #perl6
22:38 dalek rakudo/nom: 5930d11 | lizmat++ | lib/NativeCall.pm6:
22:38 dalek rakudo/nom: Basically revert 69426bd8b3adeffd0a1a
22:38 dalek rakudo/nom:
22:38 dalek rakudo/nom: Not sure what is going on here.  Waiting for better times, I guess.
22:38 dalek rakudo/nom:
22:38 dalek rakudo/nom: Thanks to RabidGravy++ and sortiz++ for support
22:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5930d11e87
22:38 lizmat RabidGravy: ^^^
22:39 jnthn 'night, #perl6
22:39 timotimo wow, whoops, seems like i b0rked the profiler's routine tab a tiny bit
22:40 lizmat gnight jnthn
22:40 lizmat brb
22:44 dalek nqp: 4091c73 | timotimo++ | src/vm/moar/profiler/template.html:
22:44 dalek nqp: fix icicle graph in profiler
22:44 dalek nqp: review: https://github.com/perl6/nqp/commit/4091c73870
22:44 Hotkeys m: say "ha" x 10 ** 10
22:44 camelia rakudo-moar 697fb8: OUTPUT«repeat count > 1073741824 arbitrarily unsupported...␤  in block <unit> at /tmp/vXqgbNmnLk line 1␤␤»
22:44 Hotkeys arbitrary unsupported?
22:44 Hotkeys s/ry/rily/
22:45 timotimo yeah, sorry about that
22:48 timotimo does anybody fancy a bit of work in angularjs on our profiler? i've got a little task
22:56 Crw joined #perl6
22:58 timotimo we don't really divide very efficiently when we have Int and Num for example, maybe i'll add candidates for that to the core setting
22:59 |Tux| joined #perl6
23:00 timotimo i wonder if that makes any difference at all to my current use case
23:00 RabidGravy lizmat, in summary none of the above worked
23:02 RabidGravy all commits after and including 69426bd8b3adeffd0a1a23ff240bb1018bfedca4 give me the "Missing serialize REPR function for REPR NativeRef"
23:03 timotimo oh jesus, that's pretty bad performance
23:03 timotimo find_best_dispatchee is back >_>
23:05 sortiz RabidGravy, 69426bd is now reverted. Still with the problem?
23:06 RabidGravy yes
23:07 lizmat hmmm....
23:07 sortiz Oops!
23:08 lizmat RabidGravy: apart from completely nuking your install, I've run out of ideas :-(
23:09 timotimo oh come on, why would infix:<+> be calling find_best_dispatchee all the time? >_>
23:10 timotimo or is the profile just being messed up?
23:10 sortiz RabidGravy, Are you sure that the error is at the time of a native call?
23:10 dalek rakudo/nom: 845a95d | lizmat++ | lib/NativeCall.pm6:
23:10 dalek rakudo/nom: Remove a straggling str
23:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/845a95db3f
23:10 lizmat RabidGravy:  perhaps it was this
23:11 RabidGravy sortiz, it's on module load
23:12 RabidGravy right now Audio::Sndfile won't load
23:12 sortiz So can't be related to the NC setup changes, unless you are doing a call at compile time.
23:13 RabidGravy no it doesn't
23:14 lizmat ok, fwiw, I cannot install Audio::Sndfile either
23:14 lizmat Missing serialize REPR function for REPR NativeRef
23:14 sortiz Let me take a look...
23:14 lizmat so, confirmed that the last patch also doesn't fix this
23:14 timotimo i changed something in the core setting, find_best_dispatchee appeared in my profile, i changed it back, it didn't disappear
23:15 dalek Inline-Perl5: d231878 | (Stefan Seifert)++ | META.info:
23:15 dalek Inline-Perl5: Version 0.6
23:15 dalek Inline-Perl5:
23:15 dalek Inline-Perl5: Changes:
23:15 dalek Inline-Perl5: * Fix segfault on using exit() in a Dancer2 action
23:15 dalek Inline-Perl5: * Allow for precompilation of Inline::Perl5 itself
23:15 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/d2318786e9
23:18 lizmat hmmm... the problem is in JSON::Name ???
23:18 sufrostico joined #perl6
23:18 lizmat and there's no NC involved there ???
23:18 perlawhirl joined #perl6
23:19 * lizmat nukes install
23:20 RabidGravy that sounds odd
23:20 RabidGravy the module only has about ten lines, it's just to share a role and a trait used by JSON::Marshal and JSON::Unmarshal
23:22 16WAAEBGW joined #perl6
23:22 16WAAEBGW Rakudo build failed. Elizabeth Mattijsen 'Basically revert 69426bd8b3adeffd0a1a
23:22 16WAAEBGW https://travis-ci.org/rakudo/rakudo/builds/115439103 https://github.com/rakudo/rakudo/compare/697fb83ed242...5930d11e87f2
23:22 16WAAEBGW left #perl6
23:23 RabidGravy okay I've got it
23:23 lizmat RabidGravy++
23:24 RabidGravy it's a :ver<v0.0.1>
23:24 RabidGravy hahahahaa
23:26 skids joined #perl6
23:26 sortiz lizmat, so a complete revert wasn't needed, only the change in %lib2mangler.
23:27 lizmat well, I've had it with this particular line of optimization, so I'm not going to touch it
23:27 lizmat RabidGravy: so you're saying there is no issue ?
23:29 RabidGravy well, I'd actually call it an issue, inasmuch as this has been like this since November
23:32 RabidGravy so even if it was wrong in the first place it should at least make a nice error message
23:32 lizmat agree
23:33 * lizmat is tired and goes to bed
23:33 lizmat good night, #perl6!
23:33 sortiz lizmat, o/
23:34 timotimo gnite lizmat!
23:39 timotimo oh wow
23:39 timotimo what if ... but fast
23:40 * timotimo doubled the execution speed of the galton box example
23:45 kid511 joined #perl6
23:48 sufrostico joined #perl6
23:55 Vlavv_ joined #perl6
23:56 BenGoldberg joined #perl6
23:59 timotimo a bit better than double, actually

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo