Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-03

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:00 laouji joined #perl6
00:02 tinyblak joined #perl6
00:16 japhb .botsnack
00:16 yoleaux :D
00:16 yoleaux 2 Mar 2015 21:08Z <lizmat> japhb: did you know I implemented nqp::readlink recently ?
00:16 japhb .ask lizmat I think I was vaguely aware that you had implemented nqp::readlink, yes.  Why do you ask?
00:16 yoleaux japhb: I'll pass your message to lizmat.
00:17 skids joined #perl6
00:21 laouji joined #perl6
00:40 japhb .ask agentzh https://gist.github.com/ag​entzh/c5108a959309f015c4f6 looks like a very nice benchmark; can you create a PR for https://github.com/japhb/perl6-bench adding this as one of the minibenchmarks?
00:40 yoleaux japhb: I'll pass your message to agentzh.
00:45 tinyblak joined #perl6
00:45 laouji joined #perl6
00:55 avuserow I think I have a memory leak in my grammar. Are there known issues (or known tricks to avoid this), or should I try to golf my grammar down?
00:56 agentzh joined #perl6
00:56 dayangkun joined #perl6
00:56 avuserow I just loop over a bunch of lines in a file, run the grammar on each one, and check if it's true. Otherwise I don't do anything with it.
00:59 avuserow I've verified that it doesn't happen if I don't run the grammar but otherwise loop over the data. (I'm using while $fh.eof and $fh.get to accomplish this)
01:00 timotimo maybe --profile can shed a tiny bit of light? in the allocations tab maybe?
01:02 avuserow I'll look at that once I golf down the data to something I can complete processing of (but still have a very noticable leak)
01:02 PerlJam avuserow: what makes you think you have a memory leak?
01:12 avuserow well, I don't see anywhere that I should be holding onto information, and with the grammar parse I use >7GB of memory and get 5% done parsing. Without the grammar parse, I use ~330MB of memory at completion
01:13 avuserow so it's possible that I have one in my P6 code, but I don't have any intentional accumulation of data
01:16 avuserow well, I have 15199467 BOOTCode allocations, mostly from various <anon>s in core.setting (and one large chunk from MATCH)
01:18 avuserow I'll investigate and golf later, decommute&
01:19 laouji_ joined #perl6
01:31 laouji joined #perl6
01:32 Hor|zon joined #perl6
01:36 robinsmidsrod joined #perl6
01:43 TimToady .tell mohij .made is only for passing values up the parse tree, so a subrule does not inherit its parents .made; you can only read the .made of a subrule after you've parsed the subrule.  To pass info downward, you can parameterize subrules like ordinary methods.
01:43 yoleaux TimToady: I'll pass your message to mohij.
02:04 yeahnoob joined #perl6
02:08 BenGoldberg joined #perl6
02:14 cognominal joined #perl6
02:15 cognominal joined #perl6
02:15 cognominal_ joined #perl6
02:16 cognominal_ joined #perl6
02:16 timotimo SVG can't do varying stroke widths along a regular path, right? one would have to build the stroked "path" as a filled region instead, right?
02:17 cognominal_ joined #perl6
02:33 integral joined #perl6
02:34 Peter_R joined #perl6
02:46 chenryn joined #perl6
02:48 [Coke] warning building rakudo-moar: https://gist.github.com/ano​nymous/23859bb546985b555082
02:49 [Coke] tons of failures on nativecall on os x in make test. known?
02:51 colomon :\
02:51 [Coke] oh, wait, I'm on hack.
02:51 [Coke] s/os x/whatever hack.p6c.org is/
02:51 colomon Linux, isn’t it?
02:52 skids The warning has been showing up during build for a while now, even on ia64.
02:52 colomon Debian
02:52 colomon hack is Debian
02:53 skids my ia64 is as well.
03:02 colomon [Coke]: I get tons of failures in 04-nativecall on os x as well, for what that’s worth.
03:06 ash_gti joined #perl6
03:07 japhb skids: You have an IA64 box?  That's a bit surprising, not many people still have an Itanium around in active use -- or did you mean x64?
03:18 Patterner joined #perl6
03:20 laouji joined #perl6
03:20 Hor|zon joined #perl6
03:20 dalek roast: 09528be | coke++ | / (5 files):
03:20 dalek roast: some rakudo fudging
03:20 dalek roast: review: https://github.com/perl6/roast/commit/09528be9e0
03:21 dalek rakudo/nom: 01c3faf | coke++ | t/spectest.data:
03:21 dalek rakudo/nom: Run some passing/fudged tests
03:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/01c3faf9c5
03:22 skids japhb: yeah sorry, x86_64 too late for numbers.
03:33 noganex_ joined #perl6
03:41 yves joined #perl6
03:44 telex joined #perl6
03:50 raiph joined #perl6
03:57 japhb skids: No worries.  If you had one, I was going to pepper you with questions about how r-m ran on it.  :-)
03:59 skids I have a couple unusual systems but I'd need a lot of canned air and luck to get them up again.
04:00 skids And they probably do not have the RAM to do r-m these days.
04:01 skids (An old DECstation and an hp-parisc)
04:02 japhb Yeah, I think the only unusual systems I might still have around would be way too low-RAM.
04:03 * skids wonders if one of the mips sbs might have enough horsepower these days.
04:04 skids Many of those can be run bigendian
04:04 skids *stbs
04:05 japhb Do we have anyone running r-m on a bigendian box already?  If not, you could be the first.  :-)
04:06 skids I do have a friend with all sorts of junk, I could ask him what his beefiest be box is.  He's big into Gentoo IIRC.
04:07 skids (I turned off the parisc box several years ago when I realized it was drawing something like 450W of power idle.)
04:16 fhelmberger joined #perl6
04:17 ash_gti joined #perl6
04:23 avuserow prof-m: for 1 .. 1000 {my $a = "a" x 1_000_000; $a ~~ /./;} # uses gobs of memory
04:24 camelia prof-m 01c3fa: OUTPUT«Memory allocation failed; could not allocate 4000000 bytes␤»
04:24 camelia .. Prof: http://p.p6c.org/50b772
04:24 avuserow that uses >4GB of memory on my machine
04:24 avuserow prof-m: for 1 .. 100 {my $a = "a" x 1_000_000; $a ~~ /./;} # uses gobs of memory
04:24 camelia prof-m 01c3fa: ( no output )
04:24 camelia .. Prof: http://p.p6c.org/50b78b
04:24 avuserow that uses ~500MB
04:25 avuserow prof-m: my $a = "a" x 1_000_000; for 1 .. 1000 {$a ~~ /./;} # this is fine
04:25 camelia prof-m 01c3fa: ( no output )
04:25 camelia .. Prof: http://p.p6c.org/50b7ba
04:26 avuserow prof-m: for 1 .. 1000 {my $a = "a" x 1_000_000; $a.chars} # ALSO fine somehow!
04:26 camelia prof-m 01c3fa: ( no output )
04:26 camelia .. Prof: http://p.p6c.org/50b80a
04:26 raiph joined #perl6
04:27 avuserow so it seems allocating a bunch of 1MB strings WITHIN a loop and then running a regex on it makes it use up tons of memory
04:28 laouji joined #perl6
04:28 agentzh joined #perl6
04:30 avuserow (the ones that are fine use between 90MB and 110MB, and don't vary much based on iteration count)
04:34 skids maybe the for isn't being sunk, and the Match.orig's are taking space?
04:34 laouji joined #perl6
04:37 avuserow m: my $i = 0; while $i < 1000 {my $a = "a" x 1_000_000; $a ~~ /./; $i++}
04:37 camelia rakudo-moar 01c3fa: OUTPUT«Memory allocation failed; could not allocate 4000000 bytes␤»
04:37 avuserow a while loop with the match as the non-final statement also explodes
04:37 avuserow j: my $i = 0; while $i < 1000 {my $a = "a" x 1_000_000; $a ~~ /./; $i++}
04:37 camelia rakudo-jvm 01c3fa: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
04:38 avuserow p: my $i = 0; while $i < 1000 {my $a = "a" x 1_000_000; $a ~~ /./; $i++}
04:39 avuserow I guess that's not a target any longer? it would've timed out by now.
04:40 avuserow JVM locally doesn't do as badly. 681620maxresident for 1000 iterations
04:42 avuserow 774728maxresident for 10_000 (!)
04:44 avuserow disabling spesh on MoarVM makes a minor difference only
05:07 adu joined #perl6
05:08 avuserow it doesn't seem to matter if the match succeeds or not, either.
05:09 TimToady it would appear from the profiling that agentzh++'s program spends about 1/6 of its time in the MATCH routine looking for numbered captures, when there's not a single numbered capture in the whole program
05:09 TimToady only about a third of the programs time is actually spent match; most of the time seems to go toward turning cursors into match objects
05:10 Hor|zon joined #perl6
05:10 TimToady doubtless our parser has similar issues
05:12 [Coke] using tools/autounfudge with --jobs 4 and it's only chewing one cpu.
05:13 * TimToady suspects an approach more like STD's might be faster, where we fake match object semantics from the cursor object as much as possible and only create a real match object under severe provocation
05:16 TimToady that would take off a lot of GC pressure too
05:27 mtj_ joined #perl6
05:29 aborazmeh joined #perl6
05:29 aborazmeh joined #perl6
05:40 agentzh joined #perl6
05:52 diana_olhovik_ joined #perl6
06:07 dalek roast: 663b535 | coke++ | S (14 files):
06:07 dalek roast: unfudge some items
06:07 dalek roast: with the help of autounfudge
06:07 dalek roast: review: https://github.com/perl6/roast/commit/663b535652
06:09 laouji joined #perl6
06:23 rindolf joined #perl6
06:30 anaeem1 joined #perl6
06:41 Tux__ joined #perl6
06:45 |Tux| joined #perl6
06:46 [Sno] joined #perl6
06:49 gfldex joined #perl6
06:53 wicope joined #perl6
06:54 laouji_ joined #perl6
06:58 Hor|zon joined #perl6
07:16 diana_olhovik joined #perl6
07:24 bjz joined #perl6
07:27 [Tux] current maor fails to install Inline::Perl5
07:31 bjz joined #perl6
07:38 kaare__ joined #perl6
07:42 fhelmberger joined #perl6
07:43 sergot morning
07:43 sergot :)
07:43 Rounin joined #perl6
07:51 masak morning, #perl6!
07:51 rindolf joined #perl6
07:53 FROGGS joined #perl6
07:54 FROGGS pmichaud / jnthn: now I know why there is no dupprefix('!!')...
07:54 zakharyas joined #perl6
07:55 TimToady I only put it in for the ones that Make No Sense doubled
07:55 FROGGS pmichaud / jnthn: ~~ is a noop (like .Str.Str), ?? is a noop (.Bool.Bool), but !! isnt... prefix:!! is identical to prefix:?
07:55 FROGGS *nod*
07:55 virtualsue joined #perl6
07:56 TimToady but arguably since we have ? the !! isn't really necessary
07:56 TimToady but since it makes a difference for LTM, we do distinguish <?foo> from <!!foo>
07:56 TimToady so we could do it for !! in normal expressions I suppose
08:00 bjz joined #perl6
08:00 FROGGS the problem we tried to solve was just about getting a nicer error message for:
08:00 FROGGS m: class A { method a { 42 ?? nextsame !! die } }
08:00 camelia rakudo-moar 01c3fa: OUTPUT«5===SORRY!5===␤Found ?? but no !!␤at /tmp/kdxrtm2waz:1␤------> 3ss A { method a { 42 ?? nextsame !! die 7⏏5} }␤Confused␤at /tmp/kdxrtm2waz:1␤------> 3ss A { method a { 42 ?? nextsame !! die 7⏏5} }␤    expecting any of:␤     …»
08:00 TimToady yes, I saw the backlog
08:01 FROGGS but I guess we just need to append a text to the existing message that a listop probably gobbled the !!...
08:01 FROGGS and then we are fine
08:01 FROGGS because a novice might think WAT and pointing with his/her finger on the !! right there
08:03 prime- joined #perl6
08:06 espadrine joined #perl6
08:06 Ven joined #perl6
08:08 rurban joined #perl6
08:17 Ven joined #perl6
08:20 agentzh joined #perl6
08:21 adu joined #perl6
08:29 Hor|zon joined #perl6
08:34 tinyblak joined #perl6
08:43 laouji_ joined #perl6
08:54 kaare__ joined #perl6
08:55 coffee` joined #perl6
08:57 nwc10 http://blog.pyston.org/2015/02/24/p​yston-0-3-self-hosting-sufficiency/ -- The biggest features of this release are that we can now run all of our internal scripts on Pyston -- Dogfood!
08:58 nwc10 (and yes, I'm slow. They're not on planet python, and I forgot to check)
08:58 DrForr_ Oh, please, planet X is *so* last century :)
09:04 laouji joined #perl6
09:04 Hor|zon joined #perl6
09:05 laouji joined #perl6
09:10 nwc10 DrForr_: I was meaning http://planetpython.org/
09:11 lizmat .botsnack
09:11 yoleaux :D
09:11 yoleaux 00:16Z <japhb> lizmat: I think I was vaguely aware that you had implemented nqp::readlink, yes.  Why do you ask?
09:11 lizmat .tell japhb isn't that what you need to implement IO::Path.resolve ?
09:11 yoleaux lizmat: I'll pass your message to japhb.
09:12 jack_rabbit joined #perl6
09:12 FROGGS "On the project management side, we now have multiple people working full time on the project,..." :/
09:13 larion joined #perl6
09:13 nwc10 why that smiley?
09:14 nwc10 (yes, I'd read that sentance and pasted it privately to someone not on this channel, whom I chat about these things with)
09:15 nwc10 it wasn't obvious to me how to work out from https://github.com/dropbox/pyston who the full timers are, and who is paying for them.
09:15 FROGGS nwc10: well, I am slightly jealous :o)
09:18 cschwenz joined #perl6
09:20 nwc10 FROGGS: they have the advantage of being a re-implementation of an existing language, with a proven money making codebase.
09:20 nwc10 (to be clear, I did not say "profitable")
09:20 nwc10 (I have no idea if it makes enough money)
09:20 nwc10 so it's more applied research than blue-sky
09:20 moritz good morning
09:21 moritz I have some docs for IO::Socket::Async locally, but I'm hesistant to push them
09:21 FROGGS morning
09:21 FROGGS why?
09:21 moritz ... because the simplest server example I could come up with segfaults
09:21 moritz RT #123968
09:21 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123968
09:21 FROGGS eww
09:22 FROGGS Invalid read of size 4 [...] Address 0xb8 is not stack'd, malloc'd or (recently) free'd
09:23 moritz looks like a NULL pointer + a bit
09:24 nwc10 valgrind!
09:24 moritz is totally awesome
09:25 FROGGS I will try to reproduce later with my debug build...
09:25 jnthn o/
09:25 FROGGS hi jnthn
09:26 FROGGS jnthn: can you explain that thing about 'http://example.com' being valid C99/C++ code?
09:26 jnthn http: is a label
09:27 jnthn //example.com is a comment
09:27 FROGGS ahh -.-
09:27 FROGGS that's lame :P
09:28 jnthn Hey, I din't come up with it :P
09:29 jnthn Though it took me a moment to spot what was going on :P
09:30 robinsmidsrod joined #perl6
09:30 nine_ [Tux]: do you have any Inline::Perl5 installation error message for me?
09:30 kjs_ joined #perl6
09:31 * [Tux] tries, one sec ...
09:32 [Tux] https://gist.github.com/Tux/63bb829994cac5a1f1fd
09:32 Ulti http://pastebin.com/q5dguhqK <--- what I got
09:32 nine_ Ulti: /usr/bin/ld: cannot find -lperl
09:33 nine_ Ulti: you need to install some perl-devel perl-dev or libperl-dev or whatever it's called on your distro package
09:33 Ulti okedoke
09:34 darutoko joined #perl6
09:35 Ulti yeah now get the same as [Tux]
09:36 nine_ With yesterday's rakudo I can install it using panda. make test in my git checkout however yields a 'Could not find method "" of "Foo" object' in t/inherit.t that does not appear when calling prove or perl6 manually (despite make test doing exactly the same). So I do not dare to upgrade my rakudo right now. This could be a valuable hint for my heisenbug.
09:38 nine_ [Tux], Ulti: does the same happen with a make test in a local checkout of the repo?
09:38 Ulti I'll try now
09:41 Ulti hmm werid it compiles fine
09:41 silug joined #perl6
09:42 Ulti make test doesn't find the .so though
09:44 Ulti the message is coming from the native sub in Perl5Interpreter
09:48 Kristien joined #perl6
09:48 Kristien hola
09:49 Ven hi
09:49 nine_ Trying to compile current rakudo, I get a Useless declaration of a has-scoped method in multi (did you mean 'my method name'?) at lib/NativeCall.pm:114
09:50 nwc10 I've seen that.
09:50 * jnthn too
09:50 nwc10 IIRC
09:50 nwc10 summon more minions to fix these low hanging fruit
09:50 jnthn I may have some time to hunt for it this evening
09:50 jnthn (Got a busy day here)
09:50 Ulti nine_ not sure why but trying to print @*INC crashes out
09:51 Ulti from within the sub that inspects the path and adds it to the native subs/methods
09:51 nine_ Ulti: this gets more and more strange :/
09:51 Ulti 'write string requires an object with REPR MVMOSHandle'
09:51 Ulti super odd
09:52 Ulti but thats where the problem appears to start @*INC is something weird when it should just be a list of strings :S
09:52 moritz Ulti: I don't think it should be anymore
09:52 moritz Ulti: lizmat++ should know
09:52 Ulti well if I do .perl on it should be
09:52 Ulti maybe its just say is doing something weird at that point?
09:53 Ulti like not trying to print to stdout
09:53 * Ulti wanders back to dayjob :'(
09:53 moritz m: class A { method ^name { 'flurb' }}; say A.^name
09:53 camelia rakudo-moar 01c3fa: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in method name at /tmp/u4lvhnyIU_:1␤  in block <unit> at /tmp/u4lvhnyIU_:1␤␤»
09:53 moritz m: class A { method ^name($obj) { 'flurb' }}; say A.^name
09:53 camelia rakudo-moar 01c3fa: OUTPUT«flurb␤»
09:55 moritz m: my role TypedPointer[::TValue = Nil] { method ^name($obj) { 'Pointer[' ~ ::TValue.^name ~ ']' }
09:55 camelia rakudo-moar 01c3fa: OUTPUT«5===SORRY!5===␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/4nYwdeBTqY:1␤------> 3j) { 'Pointer[' ~ ::TValue.^name ~ ']' }7⏏5<EOL>␤    expecting any of:␤        postfix␤        statement end␤Other potential …»
09:55 moritz m: my role TypedPointer[::TValue = Nil] { method ^name($obj) { 'Pointer[' ~ ::TValue.^name ~ ']' }}
09:55 camelia rakudo-moar 01c3fa: OUTPUT«Potential difficulties:␤    Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤    at /tmp/5xSdngNkeO:1␤    ------> 3le TypedPointer[::TValue = Nil] { method7⏏5 ^name($obj) { 'Pointer[' ~ ::TValue.^na␤»
09:55 moritz m: my role TypedPointer { method ^name($obj) { 'thing' }}
09:55 camelia rakudo-moar 01c3fa: OUTPUT«Potential difficulties:␤    Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤    at /tmp/U2WPGeP3pD:1␤    ------> 3my role TypedPointer { method7⏏5 ^name($obj) { 'thing' }}␤»
09:55 moritz m: my class TypedPointer { method ^name($obj) { 'thing' }}
09:55 camelia rakudo-moar 01c3fa: ( no output )
09:56 jnthn Oh, it's a ^foo method in a role?!
09:56 moritz yes
09:56 jnthn Yowser. wtf.
09:56 jnthn OK, guess that one is certainly on my plate. :)
09:57 jnthn m: my role TypedPointer { method ^name($obj) { 'thing' }}; class C does TypedPointer { }; say C.^name
09:57 camelia rakudo-moar 01c3fa: OUTPUT«Potential difficulties:␤    Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤    at /tmp/XPENLD0mDq:1␤    ------> 3my role TypedPointer { method7⏏5 ^name($obj) { 'thing' }}; class C does ␤C␤»
09:57 dalek rakudo/nom: 69b2a20 | moritz++ | lib/NativeCall.pm:
09:57 dalek rakudo/nom: Fix the build
09:57 dalek rakudo/nom:
09:57 dalek rakudo/nom: by commenting out the offending line from NativeCall.pm
09:57 dalek rakudo/nom:
09:57 dalek rakudo/nom: It probably should work, but does not in role
09:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/69b2a20e6b
09:57 moritz eeks
09:57 moritz I actually did not comment it out :(
09:57 espadrine joined #perl6
09:58 moritz I just fixed some other stuff
09:58 jnthn I don't think I got so far as implementing passing them on from roles, but it's still a bizzare error...
09:58 nwc10 git neuralize?
09:58 dalek rakudo/nom: 5d9d060 | moritz++ | lib/NativeCall.pm:
09:58 dalek rakudo/nom: Actually comment out failing line in NativeCall.pm
09:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d9d0609d4
10:07 * [Tux] rebuild moar (in rakudobrew) and Inline::Perl5 installs fine again
10:13 Kristien joined #perl6
10:13 Ulti ^ me too
10:16 virtualsue joined #perl6
10:16 Kristien woo
10:21 rindolf joined #perl6
10:23 pecastro joined #perl6
10:26 larion joined #perl6
10:29 tmch joined #perl6
10:30 alini joined #perl6
10:32 laouji_ joined #perl6
10:37 tinyblak joined #perl6
10:38 Kristien joined #perl6
10:58 FROGGS moritz++
10:58 FROGGS moritz: do I understand right that the warning that appeared some days ago turned into an error?
11:01 Ulti also nine_++ the use Blah:from<Perl5>; is so slick its amazing
11:09 ar joined #perl6
11:10 Kristien joined #perl6
11:14 sjn Perl 6 evennt with Damian Conway in Oslo TODAY: http://meetu.ps/2GKPZx
11:15 * sjn hopes to see people from here :)
11:15 sjn (and their colleagues and their friends and their families, and their pets and their...)
11:19 raydiak good Inline::Lua progress today...and enough for tonight... o/ #perl6
11:19 sjn \o
11:20 agentzh joined #perl6
11:24 Ven joined #perl6
11:31 moritz FROGGS: dunno
11:32 ugexe joined #perl6
11:34 cognominal joined #perl6
11:43 ffuu joined #perl6
11:46 rurban joined #perl6
11:52 wicope joined #perl6
11:55 Kristien joined #perl6
11:59 nine_ sjn: Oslo is just too far for my travel budget right now. Could you please move Oslo closer to Linz?
12:00 sjn nine_: I'll ask the next time I talk with the mayor :)
12:00 nine_ sjn: probably too late for today's event, though I guess
12:01 cognominal joined #perl6
12:04 Kristien hi
12:06 muraiki joined #perl6
12:11 kst``` joined #perl6
12:11 Ven o/
12:11 alini joined #perl6
12:16 lizmat .tell Ulti re http://irclog.perlgeek.de/p​erl6/2015-03-03#i_10212738 , this is exactly the error why I can't make @*INC lazy yet
12:16 Kristien let's give Rust a try
12:16 yoleaux lizmat: I'll pass your message to Ulti.
12:17 lizmat .tell Ulti @*INC should contain CompUnitRepo objects, strings are allowed atm, but will be phased out
12:17 yoleaux lizmat: I'll pass your message to Ulti.
12:17 |Tux| jnthn, my script still causes the profiler to exit with «Don't know how to dump a Str»
12:17 lizmat .tell Ulti also, still not sure whether @*INC continues to be exposed, or would only be changeable with "use lib"
12:17 yoleaux lizmat: I'll pass your message to Ulti.
12:21 jnthn |Tux|: Didn't get chance to look at that one yet, I'm afraid.
12:27 nine_ lizmat: if @*INC goes away, how would we be able to find .so files that come with modules?
12:28 lizmat perhaps via the %?RESOURCE hash ?
12:28 lizmat S22:362
12:28 synopsebot Link: http://design.perl6.org/S22.html#line_362
12:30 nine_ lizmat: oh, that looks lovely! Is it already implemented in rakudo?
12:33 lizmat NYI I'm afraid
12:35 Kristien joined #perl6
12:41 Ulti lizmat so if you had "use lib" without specifying a path it just gives you access to @*INC with the current paths as CompUnitRepo objects?
12:41 yoleaux 12:16Z <lizmat> Ulti: re http://irclog.perlgeek.de/p​erl6/2015-03-03#i_10212738 , this is exactly the error why I can't make @*INC lazy yet
12:41 yoleaux 12:17Z <lizmat> Ulti: @*INC should contain CompUnitRepo objects, strings are allowed atm, but will be phased out
12:41 yoleaux 12:17Z <lizmat> Ulti: also, still not sure whether @*INC continues to be exposed, or would only be changeable with "use lib"
12:42 lizmat good question, the ideas about that area are still slushy, but will need to be finalized before 6.0
12:44 Ulti I guess it's quite nice to know explicitly that some code is doing something funky with include and is uncommon enough that most people wouldn't lament the slightly harder path to getting access
12:45 lizmat yeah, accessing / adapting @*INC is not something you will see in every module / code  :-)
12:45 lizmat quite the contrary, actually, I would hope
12:47 dalek rakudo/nom: dcbd1af | lizmat++ | / (4 files):
12:47 dalek rakudo/nom: Initial implementation of PairMap
12:47 dalek rakudo/nom:
12:47 dalek rakudo/nom: Basically a Hash of which the keys are fixed at creation time, and the values
12:47 dalek rakudo/nom: *can* be altered.
12:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dcbd1af38a
12:51 dalek roast: 42586b7 | lizmat++ | S02-types/WHICH.t:
12:51 dalek roast: Check for the 3 new PairMap related classes
12:51 dalek roast: review: https://github.com/perl6/roast/commit/42586b786a
12:52 ugexe joined #perl6
12:56 chenryn joined #perl6
13:03 lizmat m: my %h = a => 42; (b=>65,%h).pairup.perl.say  # TimToady: is the interpolation of %h in pairup allowable behaviour ?
13:03 camelia rakudo-moar 5d9d06: OUTPUT«("b" => 65, "a" => 42).list␤»
13:06 dalek rakudo/nom: 43e77a1 | jnthn++ | src/Perl6/Grammar.nqp:
13:06 dalek rakudo/nom: Implement dupprefix bits from STD.
13:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/43e77a17dd
13:06 jnthn Gotta go to meeting; spectests for ^ welcome :)
13:06 jnthn &
13:06 lizmat jnthn++
13:10 dalek rakudo/nom: 46ac25f | lizmat++ | src/core/PairMap.pm:
13:10 dalek rakudo/nom: Make sure PairMaps roundtrip
13:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46ac25fa93
13:10 Kristien joined #perl6
13:12 lizmat seems TPF not the only one not in GSOC 2015: http://blog.queze.net/post/2015/03/03/Mozilla​-not-accepted-for-Google-Summer-of-Code-2015
13:12 Ven yes :s
13:12 tadzik I wonder if Parrot made it
13:13 nwc10 gosh, we're in good company.
13:13 nwc10 Other organizations that have participated successfully several times are also not in the 2015 list (eg. Linux Foundation, Tor, ...).
13:13 nine_ It's almost a badge of honor to not be accepted :)
13:15 dalek doc: fcea589 | paultcochrane++ | lib/Language/regexes.pod:
13:15 dalek doc: Correct plural
13:15 dalek doc: review: https://github.com/perl6/doc/commit/fcea5894c6
13:15 dalek doc: bd936ef | paultcochrane++ | / (5 files):
13:15 dalek doc: Merge branch 'master' of github.com:perl6/doc
13:15 dalek doc: review: https://github.com/perl6/doc/commit/bd936ef54b
13:15 dalek doc: 9a9effb | paultcochrane++ | lib/Language/regexes.pod:
13:15 dalek doc: Add rough note about lookbehind assertions
13:15 dalek doc:
13:15 dalek doc: I'm sure this example can be improved upon.  This is a start nevertheless...
13:15 dalek doc: review: https://github.com/perl6/doc/commit/9a9effb90c
13:18 |Tux| m: sub gl(IO $io){$io.perl.say;$io.nl="\n";};gl($*ARGFILES);
13:18 camelia rakudo-moar 43e77a: OUTPUT«IO::Handle.new(path => Any, ins => 0, chomp => Bool::True)␤set separator requires an object with REPR MVMOSHandle␤  in block  at src/gen/m-CORE.setting:16911␤  in sub gl at /tmp/gHBUKfq6hQ:1␤  in block <unit> at /tmp/gHBUKfq6hQ:1␤␤»
13:19 |Tux| is that related to RT#123888 ?
13:19 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123888
13:19 skids Maybe they were just tweaked that there was no "Inline::Go" yet :-)
13:22 timotimo oh, ARGFILES doesn't support that, interesting
13:22 timotimo it should probably just "redistribute" that on assignment
13:22 * timotimo looks at the code
13:23 timotimo [Tux]: i don't think it's related; $*IN is an actual file object, whereas $*ARGFILES is a fake one
13:23 |Tux| I was about to post: "With $*IN, all works file"
13:24 |Tux| but $*ARGFILES is the default for lines(), and $*IN is not
13:27 timotimo i've got an implementation
13:28 lizmat fwiw, I think $*ARGFILES should be a instance of a class that can handle multiple file-handles
13:28 dalek rakudo/nom: 2247eae | timotimo++ | src/core/IO/ArgFiles.pm:
13:28 dalek rakudo/nom: teach IO::ArgFiles about method nl
13:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2247eae736
13:29 timotimo [Tux]: i hope you'll find this implementation satisfactory
13:29 timotimo oh
13:29 lizmat and possibly anything that has a PIO objects, so sockets also
13:30 timotimo [Tux]: now i understand the RT you posted
13:30 lizmat getting ready to commute to Amsterdam.pm meeting
13:30 |Tux| I think that I find it acceptable: I just hit it and wondered if that was intended behavior
13:30 timotimo you're setting $*IN's line separator and used lines()
13:30 timotimo yeah, now i get it
13:31 timotimo but do realize that if you don't put your data in via stdin but via a commandline argument, setting the ILS on $*IN isn't exactly right
13:31 |Tux| timotimo, in order to let perl6 do the hard work, I *temporary* set .nl on $io and restore the original .nl when I am done
13:33 |Tux| https://github.com/Tux/CSV/​blob/master/test-t.pl#L866
13:35 timotimo mhm
13:36 * |Tux| wonders what kind of mhm that is :)
13:36 * timotimo too
13:36 |Tux| :)
13:37 timotimo i wanted to suggest creating your own IO object or requiring the user to configure it properly for use with Text::CSV
13:37 timotimo but that's not sensible
13:38 timotimo but regarding #123888 i'm willing to say the exact code you posted is WONTFIX; however, advocating $*IN.nl as a perl6 version for $/ is not the right way to go, as it has different semantics, especially if lines() is the perl6 version of <>
13:38 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123888
13:40 telex joined #perl6
13:40 Kristien what's a synopse? a special kind of synapse?
13:42 lizmat commute&
13:44 prevost joined #perl6
13:47 |Tux| timotime, many of the "solutions" I currently use are by means of digging. The docs are currently not usefull enough to answer my needs and questions
13:48 |Tux| maybe that is why I sometimes end up using suboptimal code or even unsupported "features"
13:49 |Tux| I am absolutely sure that some parts will have to be rewritten or use different approaches to be more efficient
13:49 timotimo m: $/ = "+"
13:49 camelia rakudo-moar 2247ea: ( no output )
13:49 |Tux| but that is part of my learning process
13:49 timotimo hm, didn't we emit a helpful warning for this at some point?
13:50 timotimo OK, that's fair
13:50 timotimo i do think, however, that $*IN.input-line-separator or .nl or whatever is recommended as a replacement for $/ at some point
13:50 |Tux| only for $\
13:50 |Tux| m: $\ = "+"
13:50 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QehO49Qmnm␤Unsupported use of $\ variable; in Perl 6 please use the filehandle's .nl attribute␤at /tmp/QehO49Qmnm:1␤------> 3$\7⏏5 = "+"␤»
13:51 |Tux| which is how discovered that, as that message was wrong a while back :)
13:53 anaeem1_ joined #perl6
13:55 |Tux| https://rt.perl.org/Ticket/Display.html?id=123884
13:57 timotimo oh, it has a backslash
13:58 raiph joined #perl6
13:58 timotimo what's the difference between $/ and $\ in p5?
14:02 kjs_ joined #perl6
14:03 sjn timotimo: output and input record separators, respectively
14:03 sjn grep for them in perlvar
14:03 aborazmeh joined #perl6
14:03 aborazmeh joined #perl6
14:05 |Tux| does perl6 have native time::hires?
14:06 nine_ m: say now;
14:06 camelia rakudo-moar 2247ea: OUTPUT«Instant:1425391613.352988␤»
14:06 |Tux| takk
14:06 nwc10 r: raw now
14:06 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤    raw used at line 1␤␤»
14:06 timotimo OK
14:06 nwc10 fingers/brain/er
14:06 nwc10 r: say now;
14:06 camelia rakudo-moar 2247ea: OUTPUT«Instant:1425391640.060958␤»
14:06 timotimo does that actually count as "hires"?
14:06 nwc10 j: say now;
14:06 camelia rakudo-jvm 2247ea: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
14:07 nwc10 aha
14:07 timotimo camelia: help
14:07 camelia timotimo: Usage: <(nqp-js|star-m|p5-to-p6|rakudo-moar|rakudo-​jvm|nqp-moarvm|nqp-jvm|star-p|debug-cat|pugs​|star-j|prof-m|std|niecza|nqp-parrot|nqp-m|m​|rn|n|rPn|p56|sp|rakudo|rnP|p6|nom|rm|sm|nqp​-q|Prn|r|Pnr|nrP|nqp|nPr|star|P|r-m|r-jvm|nq​p-mvm|nqp-j|j|nqp-p|perl6|rj|nr|r-j)(?^::\s) $perl6_program>
14:07 timotimo p5-to-p6: print "hello";
14:07 camelia p5-to-p6 : OUTPUT«print('hello')␤»
14:07 timotimo cute
14:08 timotimo debug-cat: say "what"
14:08 camelia debug-cat: OUTPUT«say "what"»
14:08 timotimo ah, ok
14:10 Ulti p5-to-p6: say for (<>)
14:10 camelia p5-to-p6 : OUTPUT«.say␤    for (lines)␤»
14:11 Ven :o
14:12 Ulti I think that is a \n different between the two
14:12 Ulti still cool though
14:12 literal |Tux|: I'm curious about your choice of word there
14:12 |Tux| p5-to-p6: $/ = $\ = "+"; print "foo";
14:12 camelia p5-to-p6 : OUTPUT«"\n" = ${'\\'} = '+';␤print('foo')␤»
14:13 |Tux| literal, what word?
14:13 literal takk
14:13 |Tux| norwegian
14:13 literal ah
14:13 anaeem1_ joined #perl6
14:13 kst```` joined #perl6
14:13 timotimo i believe "tak" or "takk" is also in swedish
14:14 |Tux| no idea how that has grown. I quite often say you're welcome and thank you in Norwegian.
14:14 |Tux| timotimo, yes
14:14 literal takk is also used in Icelandic
14:16 Kristien eyjafjallajökull
14:16 |Tux| ð is only Icelandic (in names) iirc
14:16 * Ven google...
14:16 Ven googles*. duh
14:16 literal þ too
14:17 literal Faroese actually uses ð too though
14:17 * |Tux| wonders is ᚧ is also only Icelandic
14:17 |Tux| .u ᚧ
14:17 yoleaux U+16A7 RUNIC LETTER ETH [Lo] (ᚧ)
14:17 literal looks like a runic version og Þ / þ
14:18 literal oh, actually, the name (eth) suggests it's Ð / ð
14:18 |Tux| 𐑃
14:18 literal Þ / þ is "thorn"
14:18 |Tux| I know
14:18 |Tux| part of my job is dealing with diacriticals in european names
14:19 laouji joined #perl6
14:19 * |Tux| still needs to check if iso-6937-2 can be ported to Encode
14:20 anaeem1 joined #perl6
14:21 anaeem___ joined #perl6
14:25 [Sno] joined #perl6
14:31 anaeem1 joined #perl6
14:36 salv0 joined #perl6
14:38 spider-mario joined #perl6
14:48 anaeem1_ joined #perl6
14:51 adu joined #perl6
14:53 rmgk_ joined #perl6
14:57 anaeem1_ joined #perl6
14:58 arnsholt literal/|Tux|: If you look at http://www.fileformat.info/inf​o/unicode/block/runic/list.htm you see that it's clearly not a thorn, but of course derived from it
14:58 arnsholt Which makes sense, since the distinction between voiced and unvoiced th has never been phonemic in Scandinavian (nor was it in proto-Germanic, IIRC)
14:58 |Tux| I see it in hexchat already :)
14:59 arnsholt It wasn't quite clear in my font =)
15:03 cognominal joined #perl6
15:04 ararara joined #perl6
15:05 dalek perl6-examples: 1022c2d | paultcochrane++ | htmlify.pl:
15:05 dalek perl6-examples: Extract category perl file name determination into its own routine
15:05 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/1022c2de14
15:05 dalek perl6-examples: 6c2560f | paultcochrane++ | htmlify.pl:
15:05 dalek perl6-examples: Use correct 'or' operator and non-capturing grouping
15:05 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/6c2560f0b0
15:05 dalek perl6-examples: d06e416 | paultcochrane++ | htmlify.pl:
15:05 dalek perl6-examples: Ignore perl5 files in processing
15:05 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/d06e416f1e
15:05 dalek perl6-examples: 979f902 | paultcochrane++ | htmlify.pl:
15:05 dalek perl6-examples: Add progress output
15:05 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/979f90220e
15:07 pmichaud 07:55 <FROGGS> pmichaud / jnthn: ~~ is a noop (like .Str.Str), ?? is a noop (.Bool.Bool), but !! isnt... prefix:!! is identical to prefix:?
15:07 pmichaud (already answered by TimToady++, but to add my comment):    And keeping with the idea of "encourage the better usage", we should encourage people to use prefix:<?> over anything like prefix:<!!>.
15:08 pmichaud If a programmer *really* intends to call prefix:<!> twice, it can be written with spaces as    ! ! (expr)    which makes the intent very clear and avoids the potential ambiguity with !!
15:10 pmichaud to me, that somewhat puts it into the same category as    "++" versus "+ +"  and "--" versus "- -"
15:10 pmichaud m:  my $a = 5;  say --$a;
15:10 camelia rakudo-moar 2247ea: OUTPUT«4␤»
15:10 pmichaud m:  my $a = 5;  say - -$a;
15:10 camelia rakudo-moar 2247ea: OUTPUT«5␤»
15:10 pmichaud afk, meeting
15:10 timotimo m: say !!"hi"
15:10 camelia rakudo-moar 2247ea: OUTPUT«True␤»
15:11 pmichaud timotimo: yes, I'm saying we should discourage that sort of programming, and make prefix:<!!> give a warning similar to prefix:<??>
15:12 pmichaud really afk
15:12 nine_ m: say ??"hi"
15:12 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IBGKSsbIyY␤Expecting a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use space between ? ?)␤at /tmp/IBGKSsbIyY:1␤------> 3say ??7⏏5"hi"␤»
15:17 timotimo aye
15:24 ararara why ./perl6 -n -e "print $_;" appends me some TrueTrue ... ?
15:24 raiph joined #perl6
15:25 timotimo maybe $_ is being interpolated by your shell?
15:25 ararara right, replacing " with " solves the problem
15:25 ararara '
15:25 timotimo :)
15:25 timotimo shells are hard :(
15:26 timotimo and when they break they often leave razor-sharp edges you can cut yourself with
15:26 masak ararara: welcome!
15:26 ararara :)
15:26 timotimo but i hear beaches made up of shells that have been ground to a fine powder are very comfortable and don't get terribly hot from the sunlight
15:27 timotimo masak: https://rt.perl.org/Ticket/Display.html?id=123888 - do you agree i should WONTFIX this?
15:28 [Coke] why should we not allow changing the input record separator?
15:29 timotimo $*IN.nl shouldn't necessarily change what $*ARGFILES does, right?
15:32 masak timotimo: important question, I think, is "how *would* you do that?"
15:32 masak also, what made |Tux|++ reach for that solution? was it something that S28 suggested?
15:33 masak I think it's an excellent bug report, requiring something more than just WONTFIX
15:34 |Tux| thanks, I guess
15:35 * |Tux| realizes how effective the few talks in Brussel have been
15:35 Ven joined #perl6
15:35 nine_ conferences++
15:35 |Tux| in CSV I have to be able to overrule the EOL sequence (with whatever the user wants)
15:36 |Tux| so chomp is out of the question
15:37 |Tux| If the modules wants to do the least possible work, it is better to have perl6 itself know of the required EOL on bot input (parsing) and output (generation)
15:37 PerlJam does that matter so much with lazy reads and lazy lists and such?
15:37 |Tux| PerlJam, you ask me?
15:37 PerlJam I ask in general.
15:37 |Tux| in which case the answer is yes
15:37 timotimo masak: right, i'll give you a link to irclog in a sec
15:38 |Tux| I still need a speed improvement of a factor 1000 to get near the speed of Text::CSV_XS
15:38 timotimo masak: http://irclog.perlgeek.de/p​erl6/2015-03-03#i_10213736 and following
15:38 timotimo actually, not really "and following"
15:38 PerlJam Tux: so, this is about optimization?
15:38 timotimo just know this:
15:38 timotimo m: say $\ = "+"
15:39 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jQ9bZRgdVJ␤Unsupported use of $\ variable; in Perl 6 please use the filehandle's .nl attribute␤at /tmp/jQ9bZRgdVJ:1␤------> 3say $\7⏏5 = "+"␤»
15:39 timotimo we're not suggesting to set $*IN.nl, we're asking the user to change "the filehandle's" .nl attribute
15:39 timotimo we may want to make $*ARGFILES easier to discover from this, however
15:39 timotimo AFK for a bit
15:40 * |Tux| prefers .nl over .input-line-separator
15:41 ararara How do I do IPC in perl6 (example: ./perl6 -e '$a = open "ls |"; print $a.lines();')
15:41 ararara ?
15:42 masak timotimo: "tack" in Swedish.
15:43 masak &
15:43 PerlJam ararara: $a = open "ls", :p; print $a.lines();
15:44 Kristien joined #perl6
15:44 ararara PerlJam interesting; but what is :p a smile?
15:44 PerlJam :p == pipe
15:45 Kristien Foo walks into a bar, shouts "hello, world" and meets up with his friend Baz.
15:45 ararara the colon is smile context?
15:46 FROGGS it is an adverb, a pair
15:46 Kristien it's a Ruby symbol!
15:46 anaeem1_ joined #perl6
15:46 FROGGS m: say (:P).perl
15:46 camelia rakudo-moar 2247ea: OUTPUT«"P" => Bool::True␤»
15:46 rjbs What are NYIs ?
15:46 PerlJam rjbs: Not Yet Implemented?
15:46 |Tux| NotYetImplemented
15:46 rjbs Thanks!
15:46 rjbs (It came up in p6weekly.)
15:47 FROGGS rjbs: that's funny (in both ways)... every P6er knows NYI I guess but not every P5er :o)
15:47 anaeem1 joined #perl6
15:48 rjbs We have AIB instead.
15:48 rjbs AlreadyImplementedBadly
15:48 PerlJam heh
15:48 FROGGS hehe
15:48 Kristien heheh
15:48 * |Tux| does not yet consider himself a P^er
15:48 * |Tux| does not yet consider himself a P6er
15:49 ararara :p in that specific case is a pair of what ?
15:50 FROGGS ararara: of the letter 'p' as the key and 'True' as the value
15:50 FROGGS m: say (:p).perl; say (:!p).perl
15:50 camelia rakudo-moar 2247ea: OUTPUT«"p" => Bool::True␤"p" => Bool::False␤»
15:50 ararara ah ok; understood
15:50 FROGGS m: say (p => True).perl
15:50 camelia rakudo-moar 2247ea: OUTPUT«"p" => Bool::True␤»
15:51 FROGGS m: say (:p(True)).perl
15:51 camelia rakudo-moar 2247ea: OUTPUT«"p" => Bool::True␤»
15:51 FROGGS there is more than one way to pair...
15:51 FROGGS m: my $p = True; say (:$p).perl
15:51 camelia rakudo-moar 2247ea: OUTPUT«"p" => Bool::True␤»
15:51 |Tux| STOP RIGHT THERE!
15:52 FROGGS that one is especially handy to pass of variables as named arguments to routines
15:52 anaeem1 joined #perl6
15:52 FROGGS because it "forces" you to give your variable the name of the param the routine expects
15:52 FROGGS which gives consistency
15:53 * PerlJam wonders if FROGGS overloaded |Tux|'s brain
15:53 |Tux| nah
15:54 FROGGS ararara: btw, the colon is a pair of dots... which is an easy way to remember the pair constructor syntax
15:54 FROGGS hehe
15:54 FROGGS probably not :o)
15:54 anaeem1__ joined #perl6
15:54 ararara FROGGS I think is an ok constructor syntax
15:54 ararara do you use pairs a lot in perl 6?
15:54 FROGGS yes
15:55 FROGGS though mostly in signatures I think
15:55 |Tux| next two challenges for me: allow *real* binary data in CSV (like JPEG images) and port the csv *function* including callbacks and filters
15:55 ararara if I open a pipe with :p how I define the direction?
15:55 PerlJam ararara: also, it might help to know that to open a file for reading, it's  open $filename, :r; and to open a file for writing, open $filename, :w;
15:56 FROGGS PerlJam++
15:56 PerlJam ararara: I'm not sure if you can combine :p and :r though (I haven't looked or tried it myself)
15:56 FROGGS for mind reading :o)
15:56 |Tux| https://github.com/Tux/Text-CSV_XS/commit​/61e922c7c2ef69bac5f93e6dcbf75a31d2dfcc26 <= challenging
15:56 FROGGS PerlJam: that should work
15:56 PerlJam ararara: er, :p, :w in your case
15:56 FROGGS (I implemented it, or at least made it work)
15:56 PerlJam FROGGS: aye, I think it should, but I don't *know* that it will :)
15:58 ararara but shouddn't
15:58 ararara this /perl6 -e '$a = open "ls", :p, :w; print $a.lines;'
15:58 ararara works but should it work?
15:59 PerlJam ararara: eh?
15:59 colomon joined #perl6
16:00 PerlJam ararara: It should work, but I wouldn't expect it to be too useful :)
16:01 FROGGS ararara: the :r and :w are ignored atm :o(
16:01 anaeem1_ joined #perl6
16:01 ararara its weird because in perl 5: perl -e 'open $a, "| ls"; print <$a>;' don't work
16:01 FROGGS ararara: so, you always get a pipe your process can read from
16:02 ararara FROGGS ok I understand
16:02 ararara it's to be fixed
16:02 FROGGS aye
16:02 |Tux| :w opens for writing, lines(0 is reading => conflict
16:02 * |Tux| heads for Amsterdam.PM
16:03 Patterner joined #perl6
16:03 Kristien joined #perl6
16:03 Kristien I found this gem (pun intended): http://i.imgur.com/SkIpdv9.png
16:03 kshannon joined #perl6
16:04 larion joined #perl6
16:04 PerlJam Kristien: sorry, that's just unfair.
16:04 Kristien :[
16:04 PerlJam Know, if PHP were at the intersection, that would be another matter  ;)
16:05 PerlJam s/Know/Now/
16:05 sqirrel joined #perl6
16:05 djanatyn joined #perl6
16:06 ararara Who is called Ruby ?
16:06 ararara ;)
16:10 Kristien I heard Berlusconi uses Ruby, so it must be very good!
16:10 moritz this bashing of other languages is just boring and tired, IMHO
16:11 flussence let's not bring bash into this...
16:11 rurban joined #perl6
16:13 Ven joined #perl6
16:16 dakkar joined #perl6
16:17 timotimo when i open "wc -l", :w, :r, :p; the program seems to start eating random keypresses from my repl
16:19 PerlJam timotimo: did you expect it to do something different?  ;)
16:19 timotimo if i open pipe a process with :w i expect to be able to write to its stdin with .say and stuff
16:19 skids joined #perl6
16:20 FROGGS timotimo: :w is ignored
16:20 FROGGS (as of now)
16:20 timotimo 'k
16:20 timotimo i just read that
16:20 FROGGS and it is not a LHF to fix that IMO
16:21 FROGGS well, perhaps it is... I already had a working implementation of all that stuff in my head :o)
16:21 geekosaur hm, I see :r :w :rw in there, not how they interact --- I'd suspect that with :w, :r only one of them wins
16:21 timotimo i wouldn't think so
16:21 timotimo let me look at the code and document it
16:23 timotimo there's a line $r = $w = True if $rw
16:24 timotimo so if you want rw, you can :r :w
16:24 geekosaur this should probably be documented, then
16:24 timotimo roger
16:24 timotimo FROGGS: i +1 your usage of the "json" type for the "raw" column in the reports table
16:24 geekosaur (I have the spec open and nothing is said about it. if I were to assume Unix then r, w, rw are different bit combinations in the same bitfield
16:25 FROGGS timotimo: it seems to be common format for things like that... that Pg supports that is a bonus I did not know in beforehand
16:25 geekosaur (although if you view it as individual bits you can get away with treating them as independent --- but other Unixy APIs treat them as incompatible)
16:25 timotimo we should be able to index (and report) by a raw's json field
16:25 FROGGS gtg, $wife needs $food
16:26 PerlJam timotimo: perhaps documenting what *doesn't* work may be important too.  :r :w and :rw may cause people to think :ra and  :rp and :wp and other combinations also work.
16:26 timotimo oh, perhaps we should put an explicit *%args in there and warn?
16:27 PerlJam maybe
16:29 dakkar is there any case in which a %-sigiled variable gets assigned a Hash (or similar) type object? or can I assume %x will always be defined?
16:31 PerlJam dakkar: yes and no if I understand you correctly.
16:31 dakkar that may be the least helpful answer ever :))))
16:31 dakkar ok, let me ask about my actual issue, instead of going around it:
16:31 PerlJam you asked two questions, you got two answers
16:31 geekosaur ...also occurs to me that rw open of a pipe without putting each end in a separate thread is a deadlock condition waiting to happen, perhaps this should be warned about
16:31 PerlJam dakkar: yes, asking your *actual* question is always good ;)
16:32 dakkar sub foo(Hash:D $x); # $x will not be Hash
16:32 timotimo m: my %foo; say %foo.perl
16:32 camelia rakudo-moar 2247ea: OUTPUT«().hash␤»
16:32 dakkar sub foo(%x); # oops, %x can be Hash
16:32 timotimo you mean "can be (Hash)"?
16:32 timotimo which is how we spell type objects when it's not 100% clear from context
16:32 dakkar and I don't think there's any way of requiring an actual value
16:32 dakkar timotimo:  ah, sorry, yes, thank you for that
16:33 dakkar simpler: foo(Hash:D $x) { $x.defined } # always true
16:33 dakkar foo(%x) { %x.defined } # can be false
16:33 dakkar is there any way I can use %x *and* require it to be defined?
16:33 osfameron huh... why would it ever be false?
16:34 dakkar p6: sub foo(%x){%x.defined};foo(Hash)
16:34 camelia rakudo-moar 2247ea: ( no output )
16:34 dakkar p6: sub foo(%x){%x.defined};foo(Hash).say
16:34 camelia rakudo-moar 2247ea: OUTPUT«False␤»
16:34 dakkar p6: sub foo(Hash:D $x){$x.defined};foo(Hash).say
16:34 camelia rakudo-moar 2247ea: OUTPUT«Parameter '$x' requires an instance, but a type object was passed␤  in sub foo at /tmp/tmpfile:1␤  in block <unit> at /tmp/tmpfile:1␤␤»
16:34 osfameron to the casual observer (well, me) that looks like a bug?
16:34 dakkar to me too
16:34 PerlJam dakkar: so ...  sub foo(Hash:D %x)
16:35 dakkar PerlJam: isn't that a Hash of Hash:D ?
16:35 PerlJam oh.  I see the problem.
16:35 timotimo that's right
16:35 mephinet joined #perl6
16:36 dakkar to the best of my (very limited) knowledge, there's no way for «my %a» to be undefined
16:36 timotimo you can of course sub foo(%argh where *.defined) { ... }
16:36 timotimo there is
16:36 dakkar timotimo:  but that kills the optimised
16:36 dakkar s/d$/r/
16:36 timotimo correct
16:36 timotimo m: my %foo := Hash; say %foo.perl;
16:36 camelia rakudo-moar 2247ea: OUTPUT«Hash␤»
16:36 dakkar ah, binding! of course
16:36 osfameron but why would you want to be able to pass in a type object there?
16:36 timotimo we do "signature binding"
16:36 dakkar of course signatures are implemented via binding, I should have realised
16:37 timotimo osfameron: i think what dakkar is looking for is preventing anybody from passing a type object in there
16:37 dakkar exactly
16:37 dakkar and what I see is that a non-$ sigil is less useful than a $
16:37 dakkar which feels very much not-perl :/
16:37 PerlJam it's too bad something like   sub foo(%x:D)  doesn't work.
16:37 timotimo yeah, because :D is supposed to go on the type
16:37 timotimo i think we discussed this in the last few days
16:38 timotimo being able to specify definedness constraints without giving the actual type
16:38 timotimo m: sub foobar(%argh is Hash:D) { say %argh.defined }; foobar(Hash);
16:38 camelia rakudo-moar 2247ea: OUTPUT«use of uninitialized value of type Any in string context  in any  at src/Perl6/World.nqp:2038␤␤Unhandled exception: No exception handler located for warn␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/languages/p​erl6/runtime/CORE.setting.moarvm:prin…»
16:38 timotimo what the hell did i do? >_<
16:38 PerlJam you found a bug IMHO
16:39 dakkar at the very least, you found a LTA error message :/
16:39 timotimo ah
16:39 timotimo it's trying to tell me the trait "Hash:D" doesn't exist
16:40 geekosaur mm, did that go in?
16:41 geekosaur m: sub foo (:D %h) { say %h.defined } foo(Hash);
16:41 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Y3mtjGDGpl␤Malformed parameter␤at /tmp/Y3mtjGDGpl:1␤------> 3sub foo (:7⏏5D %h) { say %h.defined } foo(Hash);␤    expecting any of:␤        named parameter␤        formal parameter␤»
16:41 geekosaur guess not yet, or at least not in camelia
16:41 PerlJam geekosaur: is there a ticket for that in RT?
16:42 PerlJam (is it specced?)
16:42 geekosaur I don't recall, just recall discussion that :D and :U ought to work that way
16:42 dakkar uh… would that be a defined value, or a hash of defined values?
16:42 dakkar (I'm reading it as the latter, same as Int:D %x)
16:42 timotimo a hash defined to carry defined values
16:42 PerlJam ah, it is specced:  S06:945
16:42 synopsebot Link: http://design.perl6.org/S06.html#line_945
16:43 dakkar that looks like it would still accept Hash, but not {a=>Nil}
16:44 timotimo nope
16:44 timotimo it will not accept Hash
16:44 timotimo it will only accept Hash[:D]
16:44 timotimo (well ... would, if :D were implemented)
16:44 timotimo perhaps Hash[Any:D]
16:45 dakkar ok fine, but it still does not make % as useful as $
16:45 timotimo m: sub foobar(%test!) { say %test.defined }; foobar(Hash)
16:45 camelia rakudo-moar 2247ea: OUTPUT«False␤»
16:45 timotimo sounds like we'll have to begin waiting for GodoToady
16:46 japhb .botsnack
16:46 yoleaux :D
16:46 yoleaux 09:11Z <lizmat> japhb: isn't that what you need to implement IO::Path.resolve ?
16:46 dakkar essentially, as things stand, I can't see any reason to use any sigil but $ for containers…
16:47 japhb lizmat: Yes, I needed that (thank you, that's indeed what I used on Moar).  It's the JVM version that is missing (or did you fix that one recently and I missed it?)
16:47 timotimo m: sub foobar(Hash:D $foo => %bar) { say %bar.perl }; foobar(Hash)
16:47 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wVARNdKekz␤Preceding context expects a term, but found infix > instead␤at /tmp/wVARNdKekz:1␤------> 3sub foobar(Hash:D $foo =>7⏏5 %bar) { say %bar.perl }; foobar(Hash)␤»
16:47 timotimo m: sub foobar(Hash:D :$foo(%bar)) { say %bar.perl }; foobar(Hash)
16:47 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NB3F_Unhsn␤Shape declaration with () is reserved;␤  please use whitespace if you meant a subsignature for unpacking,␤  or use the :() form if you meant to add signature info to the function's type␤at /t…»
16:47 timotimo m: sub foobar(Hash:D :foo(%bar)) { say %bar.perl }; foobar(Hash)
16:47 camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding %bar; expected 'Associative[Hash]' but got 'Hash'␤  in sub foobar at /tmp/z_aOExvP4K:1␤  in block <unit> at /tmp/z_aOExvP4K:1␤␤»
16:48 timotimo m: sub foobar(Hash:D :foo(%bar)) { say %bar.perl }; foobar({a => 1})
16:48 camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding %bar; expected 'Associative[Hash]' but got 'Hash'␤  in sub foobar at /tmp/Gu9ZAf4QwP:1␤  in block <unit> at /tmp/Gu9ZAf4QwP:1␤␤»
16:48 timotimo :\
16:48 timotimo not correct
16:48 timotimo m: sub foobar(Any:D :foo(%bar)) { say %bar.perl }; foobar({a => 1})
16:48 camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding %bar; expected 'Associative[Any]' but got 'Hash'␤  in sub foobar at /tmp/WBRv8VBxnA:1␤  in block <unit> at /tmp/WBRv8VBxnA:1␤␤»
16:48 timotimo m: sub foobar(Any:D :$foo(%bar)) { say %bar.perl }; foobar({a => 1})
16:48 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/15DiWGUDzr␤Shape declaration with () is reserved;␤  please use whitespace if you meant a subsignature for unpacking,␤  or use the :() form if you meant to add signature info to the function's type␤at /t…»
16:53 dakkar I'm now quite confused…
16:54 timotimo just ignore my evaluations
16:54 timotimo they were misguided
16:54 timotimo since $foo in a signature is already "really" :foo($foo) in reality
16:55 dakkar what confuses me is that Hash does not bind to Associative[Any]
16:55 dakkar why not? it was explained to me why [1] does not bind to Array[Int] (mutability, concurrency)
16:56 dakkar is there anything that is not a Any?
16:56 PerlJam Mu
16:57 timotimo it's required that the [Any] is actually specified
16:57 timotimo m: say (my %foo).of.perl
16:57 camelia rakudo-moar 2247ea: OUTPUT«Mu␤»
16:57 dakkar ah
16:58 dakkar m: sub foo(Mu %x) {};foo({a=>1})
16:58 camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding %x; expected 'Associative[Mu]' but got 'Hash'␤  in sub foo at /tmp/XVK4CehS5Q:1␤  in block <unit> at /tmp/XVK4CehS5Q:1␤␤»
16:58 dakkar 1) ???
16:58 dakkar 2) why are literals typed with such lax types, instead of the narrowest possible one?
16:59 dakkar I mean, «1» is Int, not Mu, so why is «[1]» Array, instead of Array[Int]?
17:00 * dakkar suspect he's missing the point of these type things…
17:01 timotimo because:
17:01 geekosaur perl 6 is more about gradual typing than about strict typing
17:01 timotimo you wouldn't be able to push a string into a hash that's been created with just an int in it
17:01 timotimo m: my %foo = { a => 1 }; %foo<b> = "hi"; # this would fail otherwise, no?
17:01 camelia rakudo-moar 2247ea: OUTPUT«Saw 1 call to deprecated code during execution.␤=====================================​===========================================␤%foo = itemized hash called at:␤  /tmp/xV3iVn5i_h, line 1␤Deprecated since v2014.7, will be removed with release v2015.…»
17:01 timotimo er, yeah
17:01 timotimo m: my %foo := { a => 1 }; %foo<b> = "hi"; # this would fail otherwise, no?
17:01 camelia rakudo-moar 2247ea: ( no output )
17:02 dakkar timotimo: I'm talking about literals, not variables
17:02 dakkar %foo would still be a Hash
17:02 perl6_newbee joined #perl6
17:02 dakkar thing is, I can't declare a sub taking a «Int @a» and pass it a literal
17:02 dakkar it will never bind
17:03 timotimo OK, but then you'll get confusing behavior when you go from passing a literal to passing a variable, don't you?
17:03 timotimo and with methods we wouldn't be able to figure this out at compile time, either
17:03 PerlJam dakkar: If [1] would be Array[Int], what would  [ 1, "foo" ]  be and how would Perl know?
17:04 dakkar PerlJam:  [1,"foo"] would be Array[whatever is the least common supertype of Int and Str]
17:04 timotimo it would be Cool, just use the tightest class that fits everything
17:04 dakkar exactly
17:04 dakkar it's a type lattice
17:05 PerlJam dakkar: It's much less work for both Perl and the humans to be least constrained there though.
17:05 dakkar I know it's less work
17:05 Kristien joined #perl6
17:05 mr-foobar joined #perl6
17:05 timotimo well, you can already override how literals are created
17:05 dakkar but most of these type annotations seem to get in the way of actually getting things worknig
17:06 timotimo https://github.com/FROGGS/p6-overload-constant
17:06 dakkar and I was under the impression that type annotations help the compiler and optimiser, and so should be liberally used
17:06 timotimo could perhaps be expanded to allow overriding of hash and array literals
17:06 andreoss joined #perl6
17:07 alpha- joined #perl6
17:07 timotimo actually ...
17:07 rurban joined #perl6
17:07 andreoss m:  my $x := { 1 }; say $x.WHAT; say $x();
17:07 camelia rakudo-moar 2247ea: OUTPUT«(Block)␤1␤»
17:07 andreoss why in repl this does fail?
17:08 timotimo right
17:08 [Coke] ... why would have an array of random shit that is all of a different type and then want to treat it as a strongly typed array?
17:08 [Coke] that doesn't seem like a real use case.
17:08 timotimo you can just override circumfix:<{ }> locally
17:08 [Coke] just don't use types there, and you'll be fine.
17:08 dakkar [Coke]: uh?
17:09 dakkar I'd like to ensure, as early as possible, that a sub gets what it can handle
17:09 laouji joined #perl6
17:09 dakkar so I *want* to use types
17:09 dakkar and I want the call to fail if I pass something different that what is declared
17:09 [Coke] ok, so you're looking for Array[Int], not Array[Cool] ?
17:09 timotimo wouldn't even need a slang to override { } and [ ]
17:09 dakkar [Coke]: sure, but look:
17:10 dakkar m: sub foo(Array[Int] $x) {};foo([1])
17:10 camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding $x; expected 'Array[Int]' but got 'Array'␤  in sub foo at /tmp/Kmdvqr4CxD:1␤  in block <unit> at /tmp/Kmdvqr4CxD:1␤␤»
17:10 andreoss echo "my \$x := { 1 }; \n say \$x.WHAT; say $x()" | perl6 # fails
17:10 dakkar [Coke]: so I can't, in practice, use Array[Int]
17:10 andreoss echo "my \$x := { 1 }; say \$x.WHAT; say $x()" | perl6 # works
17:11 [Coke] Yes, I agree that should work. the Array[Cool] thread there raised flags for me.
17:11 andreoss s,$x(),\$x(),
17:11 [Coke] m: my Array[Int] @a = [1]; sub foo(Array[Int] $x) {};foo(@a); # does this work?
17:11 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ckgFQ3ppQa␤Calling 'foo' will never work with argument types (Positional[Array[Int]])␤    Expected: :(Array[Int] $x)␤at /tmp/ckgFQ3ppQa:1␤------> 3nt] @a = [1]; sub foo(Array[Int] $x) {};7⏏5foo(@a)…»
17:11 timotimo andreoss: what does your shell do with that?
17:11 timotimo andreoss: REPL being VERY WEIRD when using := is known ;(
17:12 dakkar [Coke]: when I asked weeks ago, I was told that the signature has to match the actual type of the container being passed, because containers are mutable, plus concorrency
17:12 raydiak m: sub foo(Array[Int] $x) {}; foo Array[Int].new: 1; # this is now static type-checking works
17:12 camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding $x; expected 'Array[Int]' but got 'Array[Int]'␤  in sub foo at /tmp/lUo7y9dpla:1␤  in block <unit> at /tmp/lUo7y9dpla:1␤␤»
17:12 dakkar raydiak:  I know that *that* works
17:12 [Coke] m: my Array[Int] $a = [1]; sub foo(Array[Int] $x) {};foo($a); # does this work?
17:12 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vIr9e9fQUH␤Calling 'foo' will never work with argument types (Array[Int])␤    Expected: :(Array[Int] $x)␤at /tmp/vIr9e9fQUH:1␤------> 3nt] $a = [1]; sub foo(Array[Int] $x) {};7⏏5foo($a); # does thi…»
17:12 raydiak or...doesn't work?
17:12 andreoss timotimo: ok. sorry for bothering
17:12 dakkar raydiak: oops! bug?
17:13 timotimo andreoss: i wish we could just fix it ;(
17:13 PerlJam Anything that says "expected 'Array[Int]' but got 'Array[Int]'" is clearly broken  ;)
17:13 raydiak dakkar: problem is you're saying you want static type checking, but then you expect it to work dynamically
17:13 dakkar not quite. the literal «[1]» has a very static type
17:13 [Coke] there are several of those bugreported, I think "expected foo but got foo"
17:13 raydiak dakkar: yes, and it is Array[Any]
17:13 [Coke] yes, it's Array[Rat]. ;)
17:13 PerlJam heh!
17:13 perturbation joined #perl6
17:14 TimToady [1] is not a literal
17:14 timotimo ohai TimToady :)
17:14 [Coke] I think if we can get raydiak's example working, that's at least making it possible, even if the syntax is verbose.
17:15 raydiak "expected 'Array[Int]' but got 'Array[Int]'" looks suspect :)
17:15 dakkar TimToady: is there any way to write a literal equivalent to Array[Int].new(1) ?
17:16 [Coke] I'm not sure a literal equivalent is going to compile down better than Array[Int].new(1).
17:16 PerlJam dakkar: BEGIN Array[Int].new(1)   #  ;)
17:16 dakkar ah ah ah :)
17:16 TimToady m: constant myliteral = Array[Int].new(1)
17:16 camelia rakudo-moar 2247ea: ( no output )
17:16 TimToady m: constant myliteral = Array[Int].new(1); say myliteral.WHAT
17:16 camelia rakudo-moar 2247ea: OUTPUT«(Array[Int])␤»
17:16 TimToady m: constant myliteral = Array[Int].new(1); say myliteral[0]
17:16 camelia rakudo-moar 2247ea: OUTPUT«1␤»
17:16 dakkar not useful…
17:17 TimToady then don't use it ;)
17:18 dakkar what's the incentive to declaring sub foo(Int @a), if calling it is so cumbersome?
17:18 timotimo dakkar: did you see my suggestion that you can lexically override circumfix:<[ ]> and circumfix:<{ }> to create maximally-tightly-typed list and hash literals?
17:18 dakkar timotimo: yes, and that can definitely help
17:18 moritz m: sub typify(::T, Array[T](Positional) \c) { c }; say typify(Int, [1, 2]).perl
17:18 camelia rakudo-moar 2247ea: OUTPUT«Unable to coerce value for 'c' from Array to Array[T]; no coercion method defined␤  in sub typify at /tmp/348zMrNLgN:1␤  in block <unit> at /tmp/348zMrNLgN:1␤␤»
17:18 PerlJam dakkar: you're making a giant leap from "it's hard to write literals of a specific type"  to "it's cumbersome to call typed subs"
17:19 moritz m: sub typify(::T, *@args) \c) { Array[T].new(c) }; say typify(Int, 1, 2).perl
17:19 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MBXoIly7sk␤Missing block␤at /tmp/MBXoIly7sk:1␤------> 3sub typify(::T, *@args) 7⏏5\c) { Array[T].new(c) }; say typify(Int,␤    expecting any of:␤        new name to be defined␤»
17:19 moritz m: sub typify(::T, *@args) { Array[T].new(c) }; say typify(Int, 1, 2).perl
17:19 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QK5afbayqd␤Undeclared routine:␤    c used at line 1␤␤»
17:19 dakkar PerlJam: I probably am. how would you call a sub foo(Int @a) ?
17:19 moritz m: sub typify(::T, *@args) { Array[T].new(@args) }; say typify(Int, 1, 2).perl
17:19 camelia rakudo-moar 2247ea: OUTPUT«No such method 'ACCEPTS' for invocant of type 'T'␤  in block  at src/gen/m-CORE.setting:10795␤  in method new at src/gen/m-CORE.setting:10793␤  in sub typify at /tmp/ie376Tz3Bi:1␤  in block <unit> at /tmp/ie376Tz3Bi:1␤␤»
17:19 moritz :(
17:20 timotimo o/ moritz
17:20 dakkar PerlJam: (you can call it "a bad example" :) )
17:20 * moritz has long told everybody in here not to use typed arrays (except for NativeCall stuff)
17:20 timotimo yeah :(
17:20 Kristien Morning.
17:20 b2gills jnthn: I think you broke ` ??? ` with https://github.com/rakudo/rakudo/commit/43e77a17dd
17:21 dakkar moritz: I'm coming to the same conclusion, but I like helping the compiler and the optimiser, and also having the language take care of validating my inputs
17:21 timotimo moritz: do you know when debian plans to upgrade to the next postgresql minor?
17:21 b2gills m: ???
17:21 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fZLPCCpzz1␤Expecting a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use space between ? ?)␤at /tmp/fZLPCCpzz1:1␤------> 3??7⏏5?␤»
17:21 PerlJam dakkar: my Int @blah;  ... do stuff to populate @blah ...  foo(@blah);
17:21 PerlJam dakkar: possibly
17:22 TimToady there are several things that a type system wants to do here, not all of which we want to inflict on mere mortals
17:22 TimToady we could, of course, turn P6 into Haskell
17:22 moritz timotimo: no idea about debian, but apt.postgresql.org is usually pretty up-to-date
17:22 TimToady then we could have lazy types that know what they'll produce
17:23 timotimo moritz: just asking because of hack
17:23 TimToady at the expense of driving mere mortals mad
17:23 PerlJam TimToady: save that for a module :)
17:23 timotimo we have a column typed "json" and in 9.4 we could have indexed and compressed json cells :)
17:23 dakkar how ugly is this?
17:23 TimToady but in a mixed language like Perl, we would need the type system to tell us *when* to do the check
17:23 dakkar m: sub foo(Int @a) {[+] @a}; foo(my Int @=(1,2,3)).say
17:23 camelia rakudo-moar 2247ea: OUTPUT«6␤»
17:24 moritz timotimo: you're welcome to install postgresql-9.4. Just be warned that the storage format changes in incompatible ways between major pg versions, so you might need some migration
17:24 dakkar (also, why can I declare a lexical variable without a name?)
17:24 TimToady because it also has a value
17:25 TimToady which you're using
17:25 moritz because it's useful in some situation
17:25 moritz s
17:25 dakkar "because it's useful" is a good enough reason for me :)
17:25 PerlJam dakkar: That's the answer for everything P6 does on purpose ... "because it's useful"  :)
17:26 TimToady but there are always tradeoffs
17:26 TimToady and we're still feeling our way toward a useful type system for arrays and hashes
17:27 raydiak m: sub foo (@a is Array) {}; foo [1]
17:27 camelia rakudo-moar 2247ea: OUTPUT«use of uninitialized value of type Any in string context  in any  at src/Perl6/World.nqp:2038␤␤Unhandled exception: No exception handler located for warn␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/languages/p​erl6/runtime/CORE.setting.moarvm:prin…»
17:27 * raydiak thought that used to work
17:28 moritz we could make types lists coercive, and for lazy ones die as soon as a non-coercible value becomes available
17:28 diana_olhovik joined #perl6
17:28 moritz *typed lists
17:28 dakkar I think I've found an idiom I can live with:
17:28 dakkar m: multi foo(@a) { foo(my Int @=@a) };multi foo(Int @a) {[+] @a};say foo(1,2,3)
17:28 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_uNwWdVYYF␤Calling 'foo' will never work with argument types (Int, Int, Int)␤    Expected any of: ␤    :(@a) ␤    :(Int @a)␤at /tmp/_uNwWdVYYF:1␤------> 3 @=@a) };multi foo(Int @a) {[+] @a};say 7…»
17:29 dakkar m: multi foo(@a) { foo(my Int @=@a) };multi foo(Int @a) {[+] @a};say foo([1,2,3])
17:29 camelia rakudo-moar 2247ea: OUTPUT«6␤»
17:29 dakkar m: multi foo(@a) { foo(my Int @=@a) };multi foo(Int @a) {[+] @a};say foo([1,2,3,"b"])
17:29 camelia rakudo-moar 2247ea: OUTPUT«Type check failed in assignment to '@'; expected 'Int' but got 'Str'␤  in method REIFY at src/gen/m-CORE.setting:10763␤  in method reify at src/gen/m-CORE.setting:9333␤  in block  at src/gen/m-CORE.setting:9358␤  in method reify at src/gen/m-CORE.s…»
17:30 dakkar that gives me a type check at call-time, I can call it easily, and the optimiser might even eventually be able to throw away the extra call frame
17:30 molaf joined #perl6
17:30 timotimo moritz: do you know the haskell problem where lazyness can cause an exception to be thrown in an unexpected location?
17:30 timotimo that's kinda like what i expect typed lazy lists to feel like
17:31 moritz timotimo: we already have that in Perl 6 :-)
17:31 thilp rakudobrew+panda is broken because of the "???" problem mentioned by b2gills
17:32 thilp because Shell::Command is using it
17:32 TimToady a Hindley-Milner type system can throw the error at compile time, but the user will probably not understand the error message
17:34 * timotimo is looking forward to TimToady responding to the undefined %-sigiled thing in signature problem
17:35 dakkar ah yes
17:35 dakkar TimToady: I can say «sub foo(Hash:D $a)»; how can I say the same but with %-sigil name?
17:35 donaldh joined #perl6
17:36 TimToady perhaps :D is simply implied on @ and %
17:36 * TimToady almost said implicitly implied...
17:36 timotimo it is not yet in rakudo
17:36 dakkar TimToady: that would be my preference, yes
17:37 dakkar otherwise I can't see any reason to use % or @ in a signature
17:37 TimToady "I can't see" is not a straight line that you should hand to me :P
17:38 TimToady the point of sigils is mostly not to be in signatures...
17:38 timotimo oh?
17:38 TimToady most of your code is not signatures
17:39 * timotimo waits for someone to prove TimToady wrong
17:39 * timotimo imagines code that's mostly signatures
17:40 [Coke] m: sub a($except?, $in?, $some?, @degerate?, %cases?);a();
17:40 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dQ956YFi8A␤Semicolon form of sub definitions not allowed except on MAIN subs;␤Please use the block form.␤at /tmp/dQ956YFi8A:1␤------> 3pt?, $in?, $some?, @degerate?, %cases?);7⏏5a();␤»
17:40 [Coke] m: sub a($except?, $in?, $some?, @degerate?, %cases?){};a();
17:40 camelia rakudo-moar 2247ea: ( no output )
17:40 donaldh joined #perl6
17:40 TimToady even http://rosettacode.org/wik​i/Pattern_matching#Perl_6 is less than 50% signatures
17:40 PerlJam yeah, but useful code needs to *do* something.  Signatures aren't much about the doing.
17:40 dakkar most of my code is sub bodies
17:41 dakkar in which I'd like to use something more expressive that $
17:41 dakkar s/that/than/
17:41 dakkar even for parameters
17:41 PerlJam dakkar: then do so?
17:41 dakkar so that I can see if it's a Associative or a Positional or something else, without having to look at the signature
17:42 dakkar but if I do, I lose the ability to tell the compiler to reject calls with undefined values
17:42 PerlJam dakkar: See what TimToady wrote earlier about trade offs.
17:42 TimToady not if :D is implied, then you get it for free
17:42 dakkar TimToady: yep, that would make me happy :)
17:44 TimToady are you sure you wouldn't find something else to be unhappy about?  :P
17:45 * TimToady should not taunt people... :)
17:45 TimToady some of them might be happy fun balls...
17:45 timotimo well, should i implement % and @ sigiled parameters to imply :D on them?
17:46 PerlJam timotimo: forgiveness >> permission  :)
17:46 TimToady and see what breaks
17:47 gfldex joined #perl6
17:47 pecastro joined #perl6
17:48 japhb Earlier someone mentioned that binding a % var to a Hash type object and then calling the routine that expects a defined hash would break that implication.
17:48 aborazmeh joined #perl6
17:48 aborazmeh joined #perl6
17:48 japhb m: sub (%a) { say %a.defined }; a(my %b := Hash);
17:48 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GsCESOJSX4␤Undeclared routine:␤    a used at line 1␤␤»
17:48 japhb m: sub a(%a) { say %a.defined }; a(my %b := Hash);
17:48 camelia rakudo-moar 2247ea: OUTPUT«False␤»
17:49 TimToady either we enforce :D on the :=, or it's a DIHWIDT
17:50 tgt joined #perl6
17:50 TimToady or it enforces itself when you bind to the siggie
17:50 PerlJam How often is someone going to do that?
17:51 sirdancealot joined #perl6
17:51 tgt Hi. rakudobrew build-panda is failing for me because "Expecting a term, but found either infix ?? or redundant prefix ?" on line 16 of ~/.rakudobrew/moar-HEAD/panda/ext/S​hell__Command/lib/Shell/Command.pm
17:52 timotimo yup, TimToady is going to fix that, tgt :)
17:52 tgt Ah, great, thanks :)
17:52 nine_ If I inline the subsets into the signatures I might break the 50 % barrier here: https://github.com/niner/Apache-To-Nginx/blob​/master/lib/Apache/Config/Converter/Nginx.pm
17:53 TimToady what am I fixing?
17:53 timotimo m: sub test { ??? }
17:53 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/B4BKZxFA28␤Expecting a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use space between ? ?)␤at /tmp/B4BKZxFA28:1␤------> 3sub test { ??7⏏5? }␤»
17:53 TimToady looks like LTM is busted then
17:54 thilp http://irclog.perlgeek.de/p​erl6/2015-03-03#i_10215395
17:54 TimToady m: sub test { ???() }
17:54 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pJGTKzXzPy␤Expecting a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use space between ? ?)␤at /tmp/pJGTKzXzPy:1␤------> 3sub test { ??7⏏5?() }␤»
17:56 timotimo oh, jnthn implemented that
17:56 timotimo i thought TimToady did that!
17:56 TimToady m: sub test { ??? "foo" }
17:56 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/r2QZa4wdhJ␤Expecting a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use space between ? ?)␤at /tmp/r2QZa4wdhJ:1␤------> 3sub test { ??7⏏5? "foo" }␤»
17:58 timotimo got a whole bunch of spec tests from the async camp crash
17:58 timotimo but that's probably due to my moarvm changes
17:59 * timotimo re-runs with clean moarvm
18:00 anaeem1_ joined #perl6
18:03 nine_ Has anyone of you ever seen such a strange bug? One of Inline::Perl5's tests failes with 'Could not find method "" of "Foo" object' but only when run from make test and only when that is run locally, not via ssh. Running the exact same command as make will execute gives an All tests successful.
18:04 dakkar nine_:  random thought: locales?
18:04 dakkar or ttys
18:04 nine_ dakkar: exact same locales in both cases
18:05 dakkar those are the first things that come to my mind that would change between the cases you've said
18:05 flussence .bashrc/local::lib/perlbrew?
18:05 nine_ dakkar: they could not explain why prove -e 'perl6 -Ilib' t succeeds when called manually, but fails when called by make
18:05 PerlJam nine_: is it really method "" or is there some invisible character in there?
18:05 dakkar if you pipe the output through hexdump or similar, can you see if that is really an empty string?
18:06 dakkar (this is all blind debugging, right?)
18:08 nine_ PerlJam: seems to be method "". hexdump -C shows it as 20 22 22 20
18:08 flussence (having perlbrew in my ~/.bashrc has the interesting side effect of making my distro's package manager malfunction if I `su` without `-i`...)
18:09 dakkar flussence:  gentoo?
18:09 nine_ It's the exact same error message I see with Inline::Python in a different test on a different machine. The only commonality is that both errors involve NativeCall callbacks back into Perl 6
18:09 flussence yep
18:09 timotimo damn, i think i did something bad
18:09 alini joined #perl6
18:09 timotimo Cannot call 'tap_ok'; none of these signatures match:
18:09 timotimo :(Any $s, Any $expected, Any $desc, Any :live($live) = { ... }, :D :emit(&emit), :D :done(&done), :D :after-tap(&after-tap), Any :timeout($timeout) is copy = { ... }, Any :sort($sort))
18:11 nine_ This bug being so fleeting, I'm quite sure it very much depends on the memory layout. And I guess the extra fork() when started from make is the difference.
18:12 Kristien joined #perl6
18:13 * raydiak contemplates Array[Int](Positional) coercion
18:13 kjs_ joined #perl6
18:14 dakkar flussence:  "sude emerge" DTRT, since sudo kills most env variables
18:15 dakkar nine_: ouch. that's going to be painful to hunt down
18:15 timotimo .o( not requiring definedness for & vars makes things work a bit better )
18:16 * dakkar eats
18:18 dalek perl6-examples: da5d586 | paultcochrane++ | categories/euler/prob003-lanny.p6:
18:18 dalek perl6-examples: [euler] reference attributes with exclamation mark
18:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/da5d586783
18:18 dalek perl6-examples: bece85b | paultcochrane++ | categories/euler/prob003-lanny.p6:
18:18 dalek perl6-examples: [euler] loop requires space before parenthesis
18:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/bece85ba8f
18:18 dalek perl6-examples: edb2023 | paultcochrane++ | categories/rosalind/tran-grondilu.pl:
18:18 dalek perl6-examples: [rosalind] add parens to slurp to avoid gobbling block
18:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/edb2023939
18:18 dalek perl6-examples: 3b0a512 | paultcochrane++ | categories/rosalind/trie-grondilu.pl:
18:18 dalek perl6-examples: [rosalind] wrap with MAIN and add default input
18:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/3b0a512936
18:18 dalek perl6-examples: 79046c2 | paultcochrane++ | categories/rosalind/trie-grondilu.pl:
18:18 dalek perl6-examples: [rosalind] remove original perl 5 code
18:18 dalek perl6-examples:
18:18 dalek perl6-examples: It was "commented out" with a (non-functional) =END statement anyway...
18:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/79046c2c34
18:18 dalek perl6-examples: d0a303e | paultcochrane++ | categories/rosalind/trie-grondilu.pl:
18:18 dalek perl6-examples: [rosalind] Add short docs about TRIE problem
18:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/d0a303edfb
18:18 dalek perl6-examples: ac591b9 | paultcochrane++ | categories/shootout/regex-dna.p6.pl:
18:18 dalek perl6-examples: Replace bare say with .say
18:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/ac591b977a
18:20 flussence dakkar: yep, I figured out how to do it after some painful trial and error a while back... though I wish gentoo didn't use env vars as a global state dumping ground so much in the first place.
18:24 flussence (just to emphasize: `find /var/db/pkg/ -name 'environment.bz2' | xargs du -hc` here is 31*MB*!)
18:27 raiph joined #perl6
18:27 timotimo https://gist.github.com/timo/8117a2702483aad36616 - this is what my changes to % and @ sigiled vars causes in the spec test suite
18:27 nine_ dakkar: even running make test from vim makes all tests pass again...
18:29 FROGGS joined #perl6
18:31 TimToady # Error: Cannot find method 'PRECURSOR' means you need to reconfig
18:31 TimToady (nqp change)
18:34 TimToady got: ':(Int $i, :D @stuff, Any $blah = { ... })' probably should not display the :D if it's implicit with @
18:39 bayprogrammer joined #perl6
18:42 TimToady .tell lizmat yes, .pairup should interpolate hashes too, basically emulating list context, which means if we see an array at a key location, we should probably interpolate that too
18:42 yoleaux TimToady: I'll pass your message to lizmat.
18:43 TimToady s/list/flat/
18:43 timotimo yes the display wants adjusted
18:45 avuserow .botsnack
18:45 yoleaux :D
18:47 avuserow I'm backlogging, but I just filed RT123974 about memory usage issues with regexes. Hopefully the report helps. I appear to be able to make progress parsing using the JVM for the time being.
18:54 timotimo will have new spectest results with re-built nqp (and also fixed signature .perl code)
18:54 timotimo but first: groceries
18:55 TimToady std: $/ = '+'
18:55 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/T07D43Q15w line 1:␤------> 3$/7⏏5 = '+'␤Parse failed␤FAILED 00:00 134m␤»
18:55 TimToady STD catches that one
18:57 anaeem1_ joined #perl6
18:57 laouji joined #perl6
19:00 dalek perl6-examples: 532afb7 | paultcochrane++ | htmlify.pl:
19:00 dalek perl6-examples: Reformat categories hash
19:00 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/532afb7cb8
19:00 dalek perl6-examples: 611ba26 | paultcochrane++ | README (2 files):
19:00 dalek perl6-examples: Rename README -> README.md
19:00 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/611ba26475
19:00 dalek perl6-examples: 8d2f751 | paultcochrane++ | README.md:
19:00 dalek perl6-examples: Reformat text in main README
19:00 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/8d2f7510fb
19:00 dalek perl6-examples: 3cedd7f | paultcochrane++ | README.md:
19:00 dalek perl6-examples: Use leading-hash style markdown headings
19:00 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/3cedd7f2a2
19:00 dalek perl6-examples: a4478cc | paultcochrane++ | README.md:
19:01 dalek perl6-examples: Add rosalind to list of project categories
19:01 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/a4478cca2d
19:02 raydiak m: say 'alive' if(1)
19:02 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/N3lbbFavIV␤Two terms in a row␤at /tmp/N3lbbFavIV:1␤------> 3say 'alive' 7⏏5if(1)␤    expecting any of:␤        infix stopper␤        infix or meta-infix␤        postfix␤        statement e…»
19:03 raydiak ^ LTA error, had to look at yesterday's rakudo commit log to figure out what the TTIAR ecosystem fallout was about
19:04 nine_ I recompiled rakudo and the error went away :/
19:05 raydiak something else which broke (at the same time, assumedly) but probably shouldn't have: https://github.com/tadzik/Template-Moj​o/blob/master/lib/Template/Mojo.pm#L30
19:05 raydiak also TTIAR
19:05 raydiak heh n/m I see the problem on that line :)
19:08 tadzik hah, see timotimo? I should've ran that before merging :P
19:08 dalek perl6-roast-data: 43955b8 | coke++ | / (9 files):
19:08 dalek perl6-roast-data: today (automated commit)
19:08 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/43955b8f28
19:08 timotimo ?
19:09 raydiak tadzik: since you're here I'll assume you don't need a PR for the simple fix on that line :)
19:09 tadzik https://github.com/tadzik/Template-Moj​o/blob/master/lib/Template/Mojo.pm#L30 has a TTIAR
19:09 dj_goku joined #perl6
19:09 dj_goku joined #perl6
19:09 timotimo told you
19:10 FROGGS good evening dear ladies and gentlemen
19:10 tadzik hah, so that's what you meant :P
19:10 moritz \o
19:10 raydiak hi FROGGS
19:10 timotimo haha
19:11 grettir joined #perl6
19:11 dalek perl6-examples: e44b1b9 | paultcochrane++ | README.md:
19:11 dalek perl6-examples: Remove angle-brackets around urls
19:11 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/e44b1b9d7d
19:11 dalek perl6-examples: cf0861a | paultcochrane++ | README.md:
19:11 dalek perl6-examples: Convert "what you can find here" list into a table
19:11 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/cf0861a8e9
19:12 FROGGS let's get back to jvm suffering /o/
19:15 lizmat joined #perl6
19:16 lizmat .botsnack
19:16 yoleaux 18:42Z <TimToady> lizmat: yes, .pairup should interpolate hashes too, basically emulating list context, which means if we see an array at a key location, we should probably interpolate that too
19:16 yoleaux :D
19:17 Sqirrel joined #perl6
19:17 diakopter .botmunch
19:17 TimToady m: my @foo = <a b>; my %foo = @foo; say %foo
19:17 camelia rakudo-moar 2247ea: OUTPUT«a => b␤»
19:17 TimToady m: my @foo = <a b c>; my %foo = @foo, 'd'; say %foo
19:17 camelia rakudo-moar 2247ea: OUTPUT«a => b, c => d␤»
19:18 TimToady not sure .pairup needs to handle that one though
19:18 TimToady actually calling .flat would probably be slow
19:18 mohij joined #perl6
19:21 lizmat m: my @a = <a b c d>; @a.pairup.say   # so this behaviour is wrong ?
19:21 camelia rakudo-moar 2247ea: OUTPUT«a => b c => d␤»
19:22 TimToady no
19:22 TimToady m: my @a = <a b c d>; (@a,'e','f').pairup.say
19:22 camelia rakudo-moar 2247ea: OUTPUT«a => b c => d e => f␤»
19:23 mtj joined #perl6
19:23 TimToady m: my @a = <a b c d>; ('e',@a,'f').pairup.say
19:23 camelia rakudo-moar 2247ea: OUTPUT«e => a b => c d => f␤»
19:23 dalek perl6-examples: 8c84d8d | paultcochrane++ | README.md:
19:23 dalek perl6-examples: Add headings to the table
19:23 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/8c84d8d538
19:23 dalek perl6-examples: becfbc8 | paultcochrane++ | README.md:
19:23 dalek perl6-examples: Document how to build the examples web pages
19:23 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/becfbc8b8c
19:23 TimToady lizmat: seems fine to me
19:24 TimToady m: my @a = <a b c d>; ($@a,'e','f').pairup.say
19:24 camelia rakudo-moar 2247ea: OUTPUT«===SORRY!===␤Odd number of elements found for .pairup()␤»
19:24 TimToady m: my @a = <a b c d>; ($@a,'e').pairup.say
19:24 camelia rakudo-moar 2247ea: OUTPUT«a b c d => e␤»
19:24 TimToady m: my @a = <a b c d>; ('e',$@a).pairup.say
19:24 camelia rakudo-moar 2247ea: OUTPUT«e => a b c d␤»
19:25 lizmat m: my @a = <a b c d>; @a.pairup.say; say @a  # *sigh* ?
19:25 camelia rakudo-moar 2247ea: OUTPUT«a => b c => d␤␤»
19:26 FROGGS hehe
19:26 alini joined #perl6
19:27 TimToady er, upes
19:29 FROGGS m: say ...
19:29 camelia rakudo-moar 2247ea: OUTPUT«Unhandled exception: Stub code executed␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15147  (/home/camelia/rakudo-inst-2/langu​ages/perl6/runtime/CORE.setting.…»
19:29 FROGGS m: say !!!
19:29 camelia rakudo-moar 2247ea: OUTPUT«Stub code executed␤  in block <unit> at /tmp/ATfbQdAYO4:1␤␤»
19:29 FROGGS m: say ???
19:29 camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WdfqPff3Wt␤Expecting a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use space between ? ?)␤at /tmp/WdfqPff3Wt:1␤------> 3say ??7⏏5?␤»
19:29 FROGGS std: say ???
19:29 camelia std 28329a7: OUTPUT«ok 00:00 135m␤»
19:29 FROGGS hups
19:30 FROGGS is that known?
19:31 isBEKaml joined #perl6
19:31 timotimo tadzik: did you fix things or need me to fix my errors?
19:31 lizmat TimToady FROGGS: fixing
19:32 FROGGS lizmat++
19:32 FROGGS ahh, already was discovered erlier
19:32 colomon joined #perl6
19:32 FROGGS earlier*
19:36 dalek rakudo/nom: 0acd74a | lizmat++ | src/core/Any.pm:
19:36 dalek rakudo/nom: Make .pairup non-destructive
19:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0acd74ac08
19:36 agentzh joined #perl6
19:39 lizmat FROGGS: my fixing applied to .pairup, not to say ...  :-(
19:39 raydiak .tell ugexe https://github.com/ugexe/Perl6-T​ext--Levenshtein--Damerau/pull/9
19:39 yoleaux raydiak: I'll pass your message to ugexe.
19:39 raydiak .tell retupmoca https://github.com/retupmo​ca/P6-XML-Canonical/pull/1
19:39 yoleaux raydiak: I'll pass your message to retupmoca.
19:39 FROGGS lizmat: you mean '???' ?
19:40 lizmat yeah
19:40 timotimo haven't we always wanted spaces after keywords to be required?
19:40 lizmat std: say ...
19:40 camelia std 28329a7: OUTPUT«ok 00:00 135m␤»
19:40 lizmat std: say ???
19:40 camelia std 28329a7: OUTPUT«ok 00:00 135m␤»
19:40 FROGGS I wonder if somebody is working on a fix for ???
19:40 * timotimo aint
19:41 * raydiak neither
19:41 * TimToady is working on ???
19:42 TimToady LTM is picking prefix: instead of term: for some reason
19:42 FROGGS I guess is not the best way to fix it:
19:42 FROGGS -    token prefix:sym<??>  { <sym> <.dupprefix('??')> <O('%symbolic_unary')> }
19:42 FROGGS +    token prefix:sym<??>  { <sym> <!before '???'> <.dupprefix('??')> <O('%symbolic_unary')> }
19:42 FROGGS err, and even wrong...
19:43 tgt joined #perl6
19:43 TimToady no, LTM should do it right
19:44 TimToady looks like the problem is in termish, where we have <prefixish>* <term>
19:44 TimToady it's not allowing that there could be 0 prefixishes
19:44 FROGGS prefixishes *g*
19:45 timotimo https://gist.github.com/timo/8117a2702483aad36616
19:45 timotimo looking into the signature error tests now
19:45 b2gills m: say [[&({($^a,$^b).pairup})]] 'a'..'z'
19:45 camelia rakudo-moar 0acd74: OUTPUT«a => b => c => d => e => f => g => h => i => j => k => l => m => n => o => p => q => r => s => t => u => v => w => x => y => z␤»
19:45 FROGGS SCHMETTERLING!!!
19:46 timotimo perl6 -e 'sub foo(%h) { %h }; foo(1, 2);'
19:46 telex joined #perl6
19:46 brrt joined #perl6
19:46 timotimo Too many positionals passed; expected 1 argument but got 2
19:46 timotimo it seems like we expected something very different?
19:46 lizmat timotimo: a single hash ?
19:47 FROGGS well, you passed two positionals...
19:47 FROGGS m: sub foo(%h) { %h }; foo(1, 2)
19:47 camelia rakudo-moar 0acd74: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RtXd_O5neG␤Calling 'foo' will never work with argument types (Int, Int)␤    Expected: :(%h)␤at /tmp/RtXd_O5neG:1␤------> 3sub foo(%h) { %h }; 7⏏5foo(1, 2)␤»
19:47 FROGGS m: sub foo(%h) { %h }; foo(1 => 2)
19:47 camelia rakudo-moar 0acd74: ( no output )
19:47 timotimo oh
19:47 FROGGS m: sub foo(%h) { %h }; foo({ 1 => 2 })
19:47 camelia rakudo-moar 0acd74: ( no output )
19:47 TimToady m: say ([[&({($^a,$^b).pairup})]] 'a'..'z').perl
19:47 camelia rakudo-moar 0acd74: OUTPUT«((((((((((((((((((((((((("a" => "b",).list.item => "c",).list.item => "d",).list.item => "e",).list.item => "f",).list.item => "g",).list.item => "h",).list.item => "i",).list.item => "j",).list.item => "k",).list.item => "l",).list.item => "m",).list.item…»
19:47 timotimo with my change we lost the compile-time analysis thingie
19:47 TimToady m: say ([=>] 'a'..'z').perl
19:47 camelia rakudo-moar 0acd74: OUTPUT«"a" => "b" => "c" => "d" => "e" => "f" => "g" => "h" => "i" => "j" => "k" => "l" => "m" => "n" => "o" => "p" => "q" => "r" => "s" => "t" => "u" => "v" => "w" => "x" => "y" => "z"␤»
19:48 TimToady Pair.gist should probably be smart enough to parenthesize a complicated key
19:50 timotimo i don't feel like chasing an issue in the optimizer's compile-time-dispatch-analysis :(
19:52 dalek rakudo/definedness_for_hash_and_arr_sigil: b8a140d | timotimo++ | src/ (2 files):
19:52 dalek rakudo/definedness_for_hash_and_arr_sigil: make @ and % sigiled vars have :D by default
19:52 dalek rakudo/definedness_for_hash_and_arr_sigil:
19:52 dalek rakudo/definedness_for_hash_and_arr_sigil: sadly messes up one test where the optimizer should have
19:52 dalek rakudo/definedness_for_hash_and_arr_sigil: complained about an impossible call (S06-signature/errors.t)
19:52 dalek rakudo/definedness_for_hash_and_arr_sigil: review: https://github.com/rakudo/rakudo/commit/b8a140d54c
19:52 tadzik timotimo: I fixed things :)
19:53 b2gills m: say ([[&({($^b,$^a).pairup})]] reverse 'a'..'z')
19:53 camelia rakudo-moar 0acd74: OUTPUT«a => b => c => d => e => f => g => h => i => j => k => l => m => n => o => p => q => r => s => t => u => v => w => x => y => z␤»
19:53 b2gills m: say ([[&({($^b,$^a).pairup})]] reverse 'a'..'z').perl
19:53 camelia rakudo-moar 0acd74: OUTPUT«("a" => ("b" => ("c" => ("d" => ("e" => ("f" => ("g" => ("h" => ("i" => ("j" => ("k" => ("l" => ("m" => ("n" => ("o" => ("p" => ("q" => ("r" => ("s" => ("t" => ("u" => ("v" => ("w" => ("x" => ("y" => "z",).list.item,).list.item,)​.list.item,).list.item,).li…»
19:55 skids 11.5.1.66.0
19:55 skids ww
19:56 skids wkb in fact
19:58 nine_ .seen jnthn
19:58 yoleaux I saw jnthn 13:06Z in #perl6: <jnthn> &
20:00 nine_ I think my heisenbug is a GC issue
20:00 timotimo doesn't seem very implausible
20:01 nine_ I managed to attach gdb before the error happens and can watch the method name being passed to MoarVM which creates an MVMString out of it and can catch it when it frees it again during garbage collection.
20:02 timotimo ouch
20:02 timotimo so it doesn't reference that original string or something?
20:02 nine_ No, the original string is just fine even after the error occurs.
20:04 nine_ The string is freed by MVM_gc_collect_free_nursery_uncopied so it seems just to be a case of MoarVM missing the reference to this string during GC
20:07 TimToady testing a fix for prefix vs term LTM
20:08 larion joined #perl6
20:10 PerlJam I notice that Grammar.nqp still has pir::op and pir::const terms ...  Should they be removed?
20:10 TimToady which apparently breaks so and not, hmm
20:10 PerlJam oh, and Q:PIR too
20:11 lizmat PerlJam: NQP is not supposed to be birdless just yet
20:11 lizmat ah, but Grammar.nqp in rakudo
20:11 lizmat hmmmm....
20:11 FROGGS yeah, rakudo should be birdless
20:12 PerlJam Was the birdless branch merged?
20:12 FROGGS we will not have pir ops in rakudo in future
20:12 FROGGS PerlJam: was
20:12 lizmat +1 for birdless, I would say  :-)
20:12 TimToady I'm guessing making prefixes and terms compete like they're supposed to is pitting "so" against "so " or "so(" somewhere
20:13 raiph joined #perl6
20:13 TimToady but I thought our approach to not() was probably wrong anyway
20:13 TimToady so prolly an excuse to fix that two
20:14 nine_ This is it happening: https://gist.github.com/niner/da27e8b68152c04b7936
20:20 aborazmeh joined #perl6
20:20 aborazmeh joined #perl6
20:20 timotimo nine_: so we're missing a temporary root push or so?
20:20 virtualsue joined #perl6
20:21 Kristien joined #perl6
20:21 rmgk joined #perl6
20:21 nine_ timotimo: your words would make sense but I'm just starting to read MoarVM's GC code
20:21 mohij TimToady: Bugging again. /o\ https://gist.github.com/pa​tzim/361b80a01e3217ad9073 <- I tried to pass state through my grammar using the Cursor. It's a miserable failure. I'd be grateful for a hint whether something like this is possible in Perl 6 (Did I just really ask that?). If yes, how I would go about finding out how? I prefer learning the good ways to learn instead of making others solve my problems...
20:21 yoleaux 01:43Z <TimToady> mohij: .made is only for passing values up the parse tree, so a subrule does not inherit its parents .made; you can only read the .made of a subrule after you've parsed the subrule.  To pass info downward, you can parameterize subrules like ordinary methods.
20:22 timotimo it looks like after line 440 the address likely belongs to a different version of the nursery
20:22 * mohij reads and processes...
20:24 mohij TimToady: Ok I think I understood that. So am I right, that it's impossible to pass information "sidewards" (i.e. so later non subrules)?
20:24 mohij s/so/to/
20:31 PerlJam mohij: if nothing else, you can make an appropriately scoped variable to pass info "sideways"
20:32 mohij Such a variable goes wrong if backtracking comes into play.
20:32 * mohij feels like noone has ever tried such a thing.
20:33 mohij Can I hook into the backtracker (just a random idea...)?
20:38 dalek rakudo/nom: c9380e7 | PerlJam++ | src/Perl6/ (2 files):
20:38 dalek rakudo/nom: remove Q:PIR, pir::op, and pir::const
20:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c9380e71d8
20:43 oofer joined #perl6
20:46 donaldh joined #perl6
20:47 dalek mu: 5e2b2f6 | usev6++ | misc/rt.perl.org/tickets_closed_parrot_only.txt:
20:47 dalek mu: Another four closed 'parrot only' tickets
20:47 dalek mu: review: https://github.com/perl6/mu/commit/5e2b2f6e30
20:47 * [Coke] sees a lot of questions on #perl6 lately as new people come in, or lurkers speak up, and wonders "what are you people trying to do?" :)
20:48 mohij [Coke] is that @me? I do have a practical use case but didn't bother to explain yet.. It's kind of long...
20:50 arnsholt mohij: So basically, you want to check a condition in a subrule?
20:50 arnsholt That's pretty easy with a contextual
20:51 dalek rakudo/nom: aa62fde | TimToady++ | src/ (2 files):
20:51 dalek rakudo/nom: make prefix properly compete with term in LTM
20:51 dalek rakudo/nom:
20:51 dalek rakudo/nom: fixes ?? vs ???
20:51 dalek rakudo/nom: also fixes prefix:<not> vs &not
20:51 dalek rakudo/nom: fixes #114210
20:51 dalek rakudo/nom: fixes #65556
20:51 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=114210
20:51 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=65556
20:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa62fdecb9
20:52 mohij arnsholt: Not only subrule. Also a later rules not being subrules.
20:53 mohij What's a contextual?
20:57 dalek roast: 0f47ac7 | TimToady++ | S03- (4 files):
20:57 dalek roast: so() and not() are now well-behaved functions
20:57 dalek roast: review: https://github.com/perl6/roast/commit/0f47ac7711
20:57 alini joined #perl6
20:58 PerlJam TimToady: In your commit that fixes ???, what's the special case for QSIGIL eq '$' for exactly?
20:58 TimToady postfixes work differently inside interpolatoin
20:58 TimToady *ion
20:59 TimToady and the $ check is for $foo vs @foo[]
21:00 PerlJam oh, I understand ... $ doesn't *need* postfix brackets but the others do.
21:00 TimToady hence the 0..1 quantifier on the postfix parse
21:01 PerlJam right.  I wasn't quite putting it together until just now
21:01 TimToady didn't change that code, just moved it
21:02 jnthn Eek, sorry about the ??? bustage...
21:03 PerlJam anyway, TimToady++   That ??? thing was preventing a panda build for me :)
21:03 TimToady jnthn: it's okay, it pointed out more fundamental difficiulties
21:03 muraiki joined #perl6
21:03 TimToady *cult
21:03 FROGGS TimToady+++ # even :o)
21:04 TimToady there are probably some assertions we can remove from the grammar now that were artificially making up for lack of proper term vs prefix LTM
21:06 jnthn TimToady: Yeah, just seeing it led to a deeper fix. Nice. :)
21:09 avuserow [Coke]: dunno if your comment applied to me, but I'm trying to parse large old SQL data dumps from an old project and process it in various ways, primarily so I can store it in a more compact format
21:09 tony-o how do i stop the slang from parsing the file beyond the end of a line?  using $$ seems to work on the Grammar.parse but not when i slang
21:12 avuserow [Coke]: if you're interested, I'm using Perl 6 (over my default of Perl 5) for this for a few reasons: fun, better type safety, grammars, and to get a feel for how rakudo is doing in these areas
21:12 donaldh_ joined #perl6
21:13 TimToady jnthn: dunno if you saw my remarks at http://irclog.perlgeek.de/p​erl6/2015-03-03#i_10211957
21:13 PerlJam avuserow++ you should blog about that :)
21:13 jnthn TimToady: Yeah, I've pondered such things a little before too
21:13 jnthn TimToady: Thing is that we often *do* want the things we capture...
21:14 [Coke] avuserow: nifty
21:14 jnthn TimToady: So taking the current factoring and adding laziness is not likely, on its own, to be a win.
21:14 avuserow PerlJam: I want to, just trying to see what's feasible at this point
21:14 TimToady yes, but if the capture list is short, building a hash (and maybe a list) is wasted energy, since mostly each value is only used once
21:15 jnthn Yes, agree on the hash
21:15 [Coke] this channel knows CSy things. I have a system that can only process so much work at a time. I have a queue, but it are dumb. Any pointers for CS phrases to google that can give me some ideas?
21:15 jnthn Part of the problem there is that NQP doesn't have a particularly versatile way of defining list/hash access at the moment.
21:15 * [Coke] is currently slogging through "queueing strategies."
21:15 TimToady and even trying to build the list is silly when we can know statically that there are not $0
21:16 jnthn TimToady: if we know that we just bind a singleton array anyway rather than allocating a fresh one.
21:16 jnthn [Coke]: Maybe you need some kind of backpressure?
21:16 muraiki joined #perl6
21:16 TimToady then why did that block take so much profiling time?
21:17 jnthn TimToady: Hard to say without digging into it more deeply.
21:18 [Coke] jnthn: aaaaand now I'm stuck in wikipedia. Will wave when I surface. :)
21:18 jnthn TimToady: But the work we do is proportional to the number of captures we might have + the ones we actually have
21:18 jnthn TimToady: Getting rid of the first cost might help.
21:20 timotimo "might have" as in "don't know if we will have or won't"?
21:23 timotimo "version" : "69.Ubuntu.SMP.Thu.Nov.13.17.53.56.UTC.2014",
21:23 timotimo i wonder where that 69 part comes from ... misparse of the uname?
21:25 timotimo ooooh
21:25 timotimo did you know less has built-in support for "follow"ing new additions to a file you're looking at?
21:26 timotimo also, it can alert you with a bell and stop scrolling when the search matches for the next time
21:26 PerlJam jnthn: Is that "captures we might have" because of all the times people use <ws> (for instance) but never actually look at the whitespace they've captured?
21:27 jnthn PerlJam: We usually call <.ws> but don't capture
21:27 jnthn PerlJam: But no, the thing I'm referring to is static vs dynamic
21:27 PerlJam oh, I see.
21:27 * PerlJam is slow today
21:28 jnthn PerlJam: <foo>* is 1 static capture, but 0..* dynamic captures.
21:28 TimToady it also looks like .ws retests rather than remembering that we already did ws
21:28 jnthn Well, I'm tired and not explaining very well today :)
21:28 jnthn TimToady: Nope.
21:28 jnthn TimToady: Read method ws in Grammar.nqp
21:29 TimToady I did, but coulda missed something
21:29 timotimo ohmygosh
21:29 timotimo from within a running less, you can -S to chop long lines
21:29 TimToady oh, other method ws :)
21:29 grondilu joined #perl6
21:29 grondilu Hello
21:30 jnthn TimToady: iirc, spesh often ends up inlining quite nicely there too
21:30 TimToady k, I was probably remembering the one from QRegex
21:30 * grondilu just noticed TimToady's tweak about prefix vs terms
21:30 jnthn *nod*
21:30 jnthn Yeah, we override that :)
21:30 * grondilu notices that now:
21:30 grondilu m: sub prefix:<*>($) { "ok" }; say *pi, *;
21:30 camelia rakudo-moar aa62fd: OUTPUT«ok*␤»
21:31 TimToady is there any reason to keep a separate _ws rule?
21:31 TimToady other than one is a method and the other a token?
21:32 jnthn TimToady: Well, the original reason is that it's much cheaper for a method to do the fast check and quickly exit without creating a Cursor at all
21:32 jnthn TimToady: The "now I see what the optimizer does with it" answer is that the method that does the check is small enough to inline, whereas a full ws token with the check at the start would not be
21:32 timotimo i have a soft kitteh to scratch <3
21:33 FROGGS :D
21:33 grondilu (well you guys are obviously busy, but I just wanted to point out that now a possible 'my int *$p;' notation may not need a special character anymore.)
21:34 timotimo you can't put a sub or operator there anyway, can you?
21:34 jnthn timotimo: Envious. But hopefully I'll be able to have one in the not too distant future too :)
21:34 timotimo yay!
21:34 FROGGS grondilu: ahh, nice!
21:34 TimToady grondilu: what I did makes no change to that
21:34 timotimo i'm visiting friends quite often and they have two cats
21:34 timotimo these cats have adopted me :)
21:34 jnthn Ah, not yours :)
21:34 timotimo well, a cat is never "yours"
21:34 timotimo it's always the other way around
21:34 jnthn True ;)
21:34 FROGGS hehe
21:34 grondilu TimToady: I really thought the above say *pi, * used to fail, though.
21:35 FROGGS I am allowed to give the food
21:35 TimToady std: my int *$p;
21:35 timotimo you are expected to give the food, as well as attention
21:35 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Multiple prefix constraints not yet supported at /tmp/2uabRablD1 line 1:␤------> 3my int 7⏏5*$p;␤Malformed my at /tmp/2uabRablD1 line 1:␤------> 3my int 7⏏5*$p;␤    expecting any of:␤  multi_declarator␤       typename␤Parse…»
21:35 FROGGS star-m: sub prefix:<*>($) { "ok" }; say *pi, *;
21:35 camelia star-m 2015.02: OUTPUT«5===SORRY!5=== Error while compiling /tmp/a074L52jd3␤Preceding context expects a term, but found infix * instead␤at /tmp/a074L52jd3:1␤------> 3sub prefix:<*>($) { "ok" }; say *pi, *7⏏5;␤»
21:35 TimToady std: my (int *$p);
21:35 camelia std 28329a7: OUTPUT«ok 00:00 137m␤»
21:35 nine_ jnthn: it seems like my heisenbug is caused by the GC collecting MVMStrings created for strings passed to NativeCall callbacks. Managed to catch it happening: https://gist.github.com/niner/da27e8b68152c04b7936
21:35 TimToady it's already legal syntax in a signature, but means something else
21:35 timotimo slurpy sigils? %)
21:35 timotimo er
21:35 timotimo slurpy scalars
21:36 jnthn nine_: Oh, interesting.
21:36 jnthn nine_: That gives me something concrete I can look into.
21:37 donaldh NativeCall on ARM (raspberry pi) corrupts the parameters for calls with 5+ params
21:37 FROGGS eww
21:38 donaldh I'm guessing this will be a bug in dyncall
21:38 jnthn nine_: Hm, think I mebbe see it
21:39 FROGGS donaldh: hmmm, nativecall defines DC_CALL_C_ARM_* calling conventions...
21:40 donaldh meth(1, 2, 3, 4, 5) receives 5, 2, 3, 4, 51051312
21:40 donaldh and other such nonsense for longer arg lists :-)
21:40 lizmat decommute&
21:40 jnthn nine_: Please could you test if a moar with https://gist.github.com/jnthn/4799e0f52e7359680f6a workaround applied helps matters?
21:41 FROGGS donaldh: you could patch MoarVM to use another calling convention...
21:41 jnthn (It's not a good fix, but it lets me test a hypothesis)
21:42 * grondilu is also confused about what happened to the "no time-travel rule" or something...
21:43 * grondilu is confused but not alarmed, though.
21:44 donaldh FROGGS: not sure how to do that...
21:45 donaldh The raspberry pi 2 uses ARM hard float conventions, so maybe DC_CALL_C_ARM_ARMHF
21:46 FROGGS donaldh: adjust that line: MoarVM/src/core/nativecall.c:77:            result = DC_CALL_C_X86_CDECL;
21:46 kaare__ joined #perl6
21:46 FROGGS donaldh: then make install on moar only and retest
21:48 nine_ jnthn: it may have helped. With the bug being so fleeting, I don't dare give a more definitive answer :(
21:48 timotimo nine_: yeah :(
21:51 jnthn nine_: Ah, I thought you'd maybe got it reproducable-ish with a small nursery size set
21:51 isBEKaml joined #perl6
21:52 nine_ jnthn: quite contrary. Lowering the nursery size made it go away. Like so many other changes.
21:52 nine_ jnthn: I now reverted the patch and am seeing the bug again. As I could change quite much of the C code without affecting the bug, this gives me hope that you really are onto something.
21:52 timotimo you can change the nursery size in 64 byte steps or something
21:57 timotimo https://github.com/rakudo/rakudo/graphs/traffic ← cute
21:57 jnthn nine_: OK, cool...I'll work on a real fix in that direction.
21:58 fhelmberger joined #perl6
21:59 dolmen joined #perl6
22:02 avuserow timotimo: I think that page might be limited to contributors, I just get redirected to github.com if I visit that one
22:03 timotimo oh
22:03 timotimo perhaps
22:06 ugexe should ARM processors show their bitwidth as the architecture? i.e. ARMv7 architecture is shown as '32', the bitwidth
22:06 yoleaux 19:39Z <raydiak> ugexe: https://github.com/ugexe/Perl6-T​ext--Levenshtein--Damerau/pull/9
22:07 MadcapJake joined #perl6
22:07 FROGGS ugexe: testers.perl6.org shows $*KERNEL.arch // $*KERNEL.bits IIRC
22:07 FROGGS ugexe: so .arch is probably not known by rakudo yet
22:08 colomon joined #perl6
22:08 * raydiak has noticed much wrongishness in more than one of those fields
22:09 FROGGS raydiak: and the reason for that is that is was not used by anybody
22:10 ugexe FROGGS: ah ok. i didnt think it would be fair to 32bit x86 to flood testers with ARMv7 failures :)
22:10 dalek rakudo/nom: abdd5cc | TimToady++ | src/Perl6/Grammar.nqp:
22:10 dalek rakudo/nom: prefix always requires term, give better message
22:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/abdd5cc52d
22:10 ugexe raydiak++: thanks for the pr. i had no idea
22:11 raydiak ugexe: you're welcome :)
22:11 FROGGS m: say $*KERNEL.arch # ugexe: does that report anything useful on your arm box?
22:11 camelia rakudo-moar aa62fd: OUTPUT«x86_64␤»
22:12 ugexe 'unknown'
22:14 FROGGS ugexe: and I guess `uname -p` is invalid?
22:17 laouji joined #perl6
22:17 ugexe_ joined #perl6
22:17 * timotimo found a super serious memory leak!!!!!
22:18 ugexe_ uname -a's 2nd to last item (from uname -m) shows armv71
22:18 espadrine joined #perl6
22:18 timotimo when failing to resolve hostnames, we leak a single addrinfo struct
22:18 ugexe_ on a xeon machine it shows x86_64
22:19 ugexe_ m: say $*KERNEL.hardware
22:19 camelia rakudo-moar aa62fd: OUTPUT«x86_64␤»
22:19 ugexe_ maybe that should be the arch column value?
22:21 jnthn timotimo: OH NOES. Please fix if you have time, or report it if not ;)
22:23 timotimo i've fixed it in my branch
22:24 jnthn \o/
22:24 timotimo jnthn: what tc->instance->* should i use for the bufs like the address buffer?
22:24 timotimo VMArray?
22:25 timotimo er, BOOTArray
22:25 timotimo 710:                MVMArray  *res_buf     = (MVMArray *)MVM_repr_alloc_init(tc, buf_type);
22:25 timotimo this seems the way to go, have the buffer type object passed in
22:26 jnthn timotimo: Normal convention there is to have the op give the caller a chance to decide on the result type.
22:26 dalek rakudo/nom: 61f3f01 | FROGGS++ | src/core/Kernel.pm:
22:26 dalek rakudo/nom: fix $*KERNEL.arch for raspbian, ugexe++
22:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/61f3f01132
22:26 jnthn timotimo: That way there can be a Perl 6 type Address or whatever with VMArray REPR
22:26 timotimo fair enough, yeah
22:27 pyrimidine have to say, the amount of work I've seen on rakudo over just the last month is amazing.  everyone++
22:28 timotimo thanks :3
22:28 jnthn :)
22:29 FROGGS :o)
22:29 FROGGS well, we have a goal to reach
22:29 dalek rakudo/nom: 0f61164 | TimToady++ | src/Perl6/Grammar.nqp:
22:29 dalek rakudo/nom: slightly more informative message
22:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0f61164142
22:29 aborazmeh joined #perl6
22:29 aborazmeh joined #perl6
22:29 pyrimidine yeah, deadlines tend to do that :)
22:30 FROGGS TimToady: more informative than the commit message? :P
22:30 donaldh joined #perl6
22:30 FROGGS but... I dont wanna have an argument *g*
22:30 * FROGGS gets silly when he is tired
22:31 * TimToady is always silly, except when he's not
22:31 FROGGS *g*
22:31 raydiak FROGGS: btw istr you having a desire to use nativecall in more dynamic ways wrt loading...Inline::Lua is now a working example of applying nativecall entirely at runtime, complete with fallback (from LuaJIT to Lua 5.1 in this case), per-instance version switching, and is precomp-safe unlike my previous attempts (albeit with about a half-second startup penalty from my informal observations)
22:33 FROGGS raydiak: that sounds very nice!
22:34 FROGGS raydiak: what I'd like to see is an easy way to fall back to another perhaps pure perl implementation of something when a lib is not installed
22:34 ugexe FROGGS: i think method arch should actually be called method processor (its name in uname). -m looks like it will show the architecture (the same values used in debian bug reports and cpan testers)
22:35 ugexe https://en.wikipedia.org/wiki/Uname#Examples
22:35 raydiak FROGGS: the dirty trick is it clones all the relevant subs and does run-time trait_mod:<is> on them for each Lua::Raw.new, which returns an instance you pass around and use for actual calls...so I just try to use it in a try {} at early runtime and fall back if it fails
22:35 ugexe notice uname -p can return stuff like 'Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz'
22:36 FROGGS ugexe: looking at that table makes me sad :o(
22:36 FROGGS raydiak: I see
22:36 FROGGS raydiak: I did know about the &trait_mod:<is>() trick though
22:37 ugexe FROGGS: the values under the Machine -m column all look correct though
22:37 FROGGS ugexe: except for some powerpcs
22:38 ugexe hmm wonder why they report those values
22:39 kjs_ joined #perl6
22:39 FROGGS probably just because
22:39 raydiak FROGGS: yeah that's one of the techniques I picked up reading over nine_++'s Inline::P work...getting it all together in the right shape for version switching and fallback and different concurrent versions was the part I had to play around with for a while
22:41 agentzh joined #perl6
22:41 TimToady m: sub prefix:<*>($) { "ok" }; say *pi, *;
22:41 camelia rakudo-moar 0f6116: OUTPUT«5===SORRY!5=== Error while compiling /tmp/P0uOrqBoqU␤Prefix * requires an argument, but no valid term found␤at /tmp/P0uOrqBoqU:1␤------> 3sub prefix:<*>($) { "ok" }; say *pi, *7⏏5;␤    expecting any of:␤        prefix or meta-prefix␤»
22:41 TimToady there we go
22:41 grondilu :/
22:42 grondilu well, I'm sure you have your reasons for this, but I don't get it.
22:43 TimToady m: sub prefix:<*>($) { "ok" }; say *[42];  # what's this mean?
22:43 camelia rakudo-moar 0f6116: OUTPUT«ok␤»
22:43 nine_ Closing all those windows and tabs I realize: this has been a real hardcore debugging evening ;)
22:43 ugexe FROGGS: i think those OSX values are correct. seems like it starts up in 32bit kernel but can run 64bit code
22:43 nine_ jnthn: thanks for looking into this!
22:43 TimToady m: sub prefix:<*>($) { "ok" }; say * * *;  # what's this mean?
22:44 camelia rakudo-moar 0f6116: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3Soqzj2NpD␤Prefix * requires an argument, but no valid term found␤at /tmp/3Soqzj2NpD:1␤------> 3sub prefix:<*>($) { "ok" }; say * * *7⏏5;  # what's this mean?␤    expecting any of:␤        prefi…»
22:44 * nine_ is calling it a. Good * #perl6!
22:44 TimToady we really cannot allow that kind of ambiguity
22:44 grondilu why can't it take the longest token matching, that is Whatever * Whatever  ?
22:44 TimToady it did
22:44 raydiak \o nine_
22:44 FROGGS nine_: gnight!
22:44 ugexe so just the <arch> would be a odd value (i386), but the actual arch supported is in <hardware> anyway
22:45 TimToady that is not a token
22:45 grondilu oh maybe not indeed.
22:45 TimToady how far are you going to look ahead to resolve the ambiguity?
22:46 grondilu why not as fr as it takes?
22:46 grondilu *far
22:47 TimToady because that's too much dwimmery, the sort that forces people to play guessing games that they will lose far too often
22:47 japhb My thought would be "Because the reader needs to look that far ahead to figure out what they're currently looking at *also*, and that's reader-hostile."
22:47 TimToady the sort that will cause incorrect results without complaint
22:47 raydiak FROGGS: I was thinking about abstracting that work into another module, but...do you think nativecall will provide its own way to accomplish such a thing in the foreseeable future?  if there are any plans you know of, I shouldn't bother with another module atm
22:48 TimToady japhb: that too
22:48 grondilu ok
22:48 FROGGS raydiak: I doubt that this will land in nativecall anytime soon
22:48 TimToady the smarter your compiler, the smarter you force the programmer to be
22:48 TimToady and we are not trying to just make it easy for geniuses to program
22:49 TimToady there are other languages for them
22:49 * TimToady feels similarly about type inference, when taken too far
22:50 raydiak FROGGS++: thanks, I will think about the most useful way to expose it as a module for other modules, then :)
22:51 jnthn nine_: https://github.com/MoarVM/MoarVM/commit/47871fabbd is, hopefully, a real fix.
22:52 grondilu not completely sure it's related, but when looking at terms, the parser can keep in mind what he's parsing quite far though.
22:53 grondilu m: sub term:<die now and shut up about it> { die }; die now and shut up about it'
22:53 camelia rakudo-moar 0f6116: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hJQ7Pjx7Vl␤Two terms in a row␤at /tmp/hJQ7Pjx7Vl:1␤------> 3t> { die }; die now and shut up about it7⏏5'␤    expecting any of:␤        infix stopper␤        infix or meta-infix␤        state…»
22:53 grondilu m: sub term:<die now and shut up about it> { die }; die now and shut up about it
22:53 camelia rakudo-moar 0f6116: OUTPUT«Died␤  in sub term:<die now and shut up about it> at /tmp/QZf8XIJjBB:1␤  in block <unit> at /tmp/QZf8XIJjBB:1␤␤»
22:53 TimToady std: sub term:<die now and shut up about it> { die }; die now and shut up about it
22:53 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Unable to parse term expression at /tmp/sTkGJu5n_a line 1:␤------> 3erm:<die now and shut up about it> { die7⏏5 }; die now and shut up about it␤Couldn't find final 'now'; gave up at /tmp/sTkGJu5n_a line 1:␤------> 3rm:<die now an…»
22:54 grondilu weird
22:54 raydiak m: sub term:<die now and shut up about it> () { die }; die now and shut up about it
22:54 camelia rakudo-moar 0f6116: OUTPUT«Died␤  in sub term:<die now and shut up about it> at /tmp/9HV000_Hco:1␤  in block <unit> at /tmp/9HV000_Hco:1␤␤»
22:54 grondilu unless that's an other bug you're about to fix
22:55 FROGGS raydiak++
22:56 jnthn Oh, also, nine++ for doing the hard work in hunting that bug
22:56 jnthn (the one I just hopefully patched)
22:56 TimToady std: sub infix:<add now>($a,$b) { say $a + $b }; say 21 add now 21
22:56 camelia std 28329a7: OUTPUT«ok 00:01 145m␤»
22:57 TimToady coulda sworn it disallowed whitespace in operators
22:57 colomon that’s mildly disturbing.
22:57 jnthn haha
22:57 grondilu it surely is not the spirit of what you explained above.
22:58 jnthn Probably not hard to forbid it if we'd rather prevent such creativity :)
23:00 TimToady m: sub infix:<add now>($a,$b) { say $a + $b }; say 21 add now 21
23:00 camelia rakudo-moar 0f6116: OUTPUT«42␤True␤»
23:01 grondilu m: sub infix:<+ now>($a,$b) { $a + $b }; say 21 + now 21
23:01 camelia rakudo-moar 0f6116: OUTPUT«42␤»
23:01 grondilu ^I bet this is even more embarassing :)
23:02 grondilu m: sub infix:<+ ->($a,$b) { $a + $b }; say 21 + - 21
23:02 camelia rakudo-moar 0f6116: OUTPUT«42␤»
23:02 grondilu ^or this?
23:03 TimToady thing is, that's only kinda working by accident
23:03 TimToady m: sub infix:<+     ->($a,$b) { $a + $b }; say 21 + - 21
23:03 camelia rakudo-moar 0f6116: OUTPUT«42␤»
23:03 TimToady m: sub infix:<+     ->($a,$b) { $a + $b }; say 21 +    - 21
23:03 camelia rakudo-moar 0f6116: OUTPUT«0␤»
23:04 TimToady it only works because a list stringifies to containing a space
23:04 dalek nqp: d1b36db | timotimo++ | src/NQP/Optimizer.nqp:
23:04 dalek nqp: turn an elsif into an if
23:04 dalek nqp: review: https://github.com/perl6/nqp/commit/d1b36db079
23:04 dalek nqp: 667a364 | timotimo++ | src/QRegex/P6Regex/Actions.nqp:
23:04 dalek nqp: native type arg, because why not?
23:04 dalek nqp: review: https://github.com/perl6/nqp/commit/667a3649a8
23:04 FROGGS m: sub infix:<http://example.com>($a,$b) { $a + $b }; say 21 http://example.com 21 # -.-
23:04 camelia rakudo-moar 0f6116: OUTPUT«42␤»
23:04 TimToady m: sub infix:<+  ->($a,$b) { $a + $b }; say 21 +  - 21
23:04 camelia rakudo-moar 0f6116: OUTPUT«0␤»
23:05 TimToady m: sub infix:['+  -']($a,$b) { $a + $b }; say 21 +  - 21
23:05 camelia rakudo-moar 0f6116: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
23:05 TimToady m: sub infix:('+  -')($a,$b) { $a + $b }; say 21 +  - 21
23:05 camelia rakudo-moar 0f6116: OUTPUT«0␤»
23:05 TimToady m: sub infix:«'+  -'»($a,$b) { $a + $b }; say 21 +  - 21
23:06 camelia rakudo-moar 0f6116: OUTPUT«42␤»
23:15 jnthn *phew*, I thought we hard a horrible regression on CORE.setting parsing speed
23:15 jnthn But no, one of my chrome tabs had gone wild
23:16 TimToady m: sub circumfix:< A B C >($x) { say $x }
23:16 camelia rakudo-moar 0f6116: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yDYKGCvLWv␤Unable to identify both starter and stopper from A B C␤Perhaps you forgot to separate them with whitespace?␤at /tmp/yDYKGCvLWv:1␤------> 3sub circumfix:< A B C >7⏏5($x) { say $x }␤»
23:17 jnthn Or perhaps not! :P
23:18 TimToady m: sub circumfix:< A  C >($x) { say $x }
23:18 camelia rakudo-moar 0f6116: ( no output )
23:19 kaare__ joined #perl6
23:20 BenGoldberg joined #perl6
23:26 colomon joined #perl6
23:29 dalek nqp: 2e5e413 | jnthn++ | tools/build/MOAR_REVISION:
23:29 dalek nqp: Bump MOAR_REVISION for nativecall and BE fixes.
23:29 dalek nqp: review: https://github.com/perl6/nqp/commit/2e5e413e3c
23:29 Ulti .tell dakkar re: http://irclog.perlgeek.de/p​erl6/2015-03-03#i_10215189 is this the sort of thing you wanted? sub foo(@list where Int ~~ all(@list.map({.WHAT}))) { say "YAY" }
23:29 yoleaux Ulti: I'll pass your message to dakkar.
23:36 dalek rakudo/nom: 0701960 | jnthn++ | tools/build/NQP_REVISION:
23:36 dalek rakudo/nom: Get latest NQP, for Moar with nativecall/BE fixes.
23:36 dalek rakudo/nom:
23:36 dalek rakudo/nom: This hopefully resolves the Inline::Perl5/Inline::Python heisenbug.
23:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/07019600f4
23:37 Ulti .tell dakkar or maybe a bit simpler and efficient sub foo(@list where @list.grep({.WHAT !~~ Int}).elems == 0) { say "YAY"}
23:37 yoleaux Ulti: I'll pass your message to dakkar.
23:45 yullha joined #perl6
23:45 yullha I have the impression that perl 6 doesn't support the unix phylosophy
23:45 timotimo "everything is a file"?
23:45 cognominal joined #perl6
23:46 yullha no, i mean that it doesn't respect other tools
23:46 timotimo it disrespects tools?
23:46 yullha yes
23:46 yullha want to do all on his own
23:46 yullha reinvent 1000 wheels
23:46 timotimo perl has always been a glue language; have you seen how Inline::Perl5, Inline::C, Inline::Python and Inline::Lua work? :)
23:46 yullha was something that perl 5 didn't
23:46 yullha exactly
23:47 yullha but perl 6 feels different in regards
23:47 timotimo can you give a few examples?
23:48 yullha how do you create a zip file in perl 5? I would do with a pipe.
23:48 yullha s/zip/gz
23:48 timotimo what if you're on windows, though?
23:49 yullha been long time I'm not there and there is a reason
23:49 timotimo that's actually a problem we have and one we had to fix
23:49 timotimo because we want to be able to take distributions off of cpan
23:49 yullha I understand it may be a problem for you
23:49 timotimo those are gzipped, IIUC, and tarred
23:49 jnthn yullha: Uh, Perl has, in general, always been a big tool trying to do it all.
23:51 yullha it has always been unix centered
23:52 aborazmeh joined #perl6
23:52 aborazmeh joined #perl6
23:52 timotimo i don't think you'll get very far denying the existence of windows ;)
23:53 raydiak was gonna say..."don't care cuz I'm not on Windows" is hardly an approach that designers and implementors can afford to take for anything meant to be widely adoptable
23:53 yullha making program portable is useless for most perl uses
23:53 timotimo then you're not thinking big enough :)
23:54 yullha perl excels on server and on data parsing for me and it wouldn't work in any case
23:54 raydiak your uses and your platform are not the only ones...
23:54 raydiak afk &
23:54 timotimo you don't have to port a program to windows to have a use for perl on windows
23:54 timotimo you can also be on windows, need something that perl is good at, and just write a perl script or program on windows
23:55 timotimo in any case, we're not looking to limit ourselves and our users to any singular niche
23:58 alpha- at which version does perl evolve into lisp
23:58 fhelmberger joined #perl6
23:59 jercos when we get rid of all the "th"s presumably.

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

Perl 6 | Reference Documentation | Rakudo