Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-08-02

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:24 benabik joined #perl6
00:25 fgomez joined #perl6
00:27 jeffreykegler joined #perl6
00:28 fgomez joined #perl6
00:35 fridim_ joined #perl6
00:35 diakopter .tell Mouq ah, okay. good to know. thanks for doing that! :)
00:35 yoleaux diakopter: I'll pass your message to Mouq.
00:35 preflex yoleaux: you have 1 new message. '/msg preflex messages' to read it.
00:35 diakopter heh.
00:38 btyler joined #perl6
00:41 hypolin joined #perl6
00:41 ggoebel2 joined #perl6
00:43 ggoebel joined #perl6
00:44 ggoebel3 joined #perl6
00:45 japhb diakopter, What's the current state on Rakudo portability?  Is it up at all on MoarVM yet, or is work still continuing on the NQP port?
01:15 ggoebel joined #perl6
01:20 lue joined #perl6
01:38 [Coke] I wish to nuke preflex from orbit.
01:38 JimmyZ joined #perl6
01:44 ggoebel2 joined #perl6
01:45 ggoebel3 joined #perl6
01:47 ggoebel4 joined #perl6
01:49 ggoebel5 joined #perl6
01:51 JimmyZ joined #perl6
02:18 cognominal joined #perl6
02:27 epli joined #perl6
02:33 JimmyZ_ joined #perl6
02:34 JimmyZ_ joined #perl6
03:17 jaldhar joined #perl6
03:28 japhb joined #perl6
03:29 jaldhar joined #perl6
03:32 odoacre joined #perl6
03:47 preflex_ joined #perl6
04:09 lizmat good *, #perl6!
04:10 lizmat r: { my $a will post { say "done" } }  # alas, will post {…} doesn't work either yet
04:10 camelia rakudo bb86d1: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in block  at /tmp/LMHE9eUruD:1␤␤»
04:11 dalek rakudo/nom: 54840de | (Elizabeth Mattijsen)++ | src/core/Variable.pm:
04:11 dalek rakudo/nom: Alas, will post {...} doesn't work yet
04:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/54840de217
04:24 japhb o/ lizmat
04:24 lizmat japhb /o
04:25 japhb How goes it?
04:26 dayangkun joined #perl6
04:27 lizmat apart from the heat (35 degrees expected today) and the fact that I'm banging my head against rakudo internals
04:27 lizmat I'm doing fine  :-)
04:27 lizmat up since 5am here, to get some coolness
04:28 japhb Yeah, that's decently hot ... especially if it's humid too.
04:28 japhb No A/C?
04:28 lizmat nope.  we're cooling the house now with air from outside, which is getting close to 22 already
04:29 lizmat then probably around 7:30 we close down everything because then outside is warmer than inside
04:29 lizmat we've been able to keep inside below 23
04:29 lizmat that way
04:29 japhb Not too bad ...
04:30 lizmat indeed, but it takes vigilance and a constant monitoring of outside temperature
04:30 lizmat I'll probably be going to bed again later
04:31 japhb That's probably wise as well.  Beware of getting yourself into a split sleep schedule though ....
04:31 japhb What are you fighting with in the Rakudo internals?
04:32 btyler joined #perl6
04:36 lizmat several phasers not working from my $a will foo {…}, namely, <init end post compose>
04:36 lizmat once block not returning its return value
04:37 lizmat my $a is default not working for arrays and hashes
04:37 lizmat my $a of TypeObject not working for arrays and hashes
04:37 lizmat that kind of stuff
04:37 lizmat not being able to throw an exception out of a will foo {…} trait mod
04:39 lizmat will foo {..} phasers not seeing the variable on which they are declared
04:39 lizmat will foo {..} phasers not setting $_ to the variable being declared
04:40 lizmat I guess that about sums things up for blockers for me
04:40 lizmat :-)
04:40 diakopter *boggles*
04:41 lizmat seems I will have to really get into NQP internals to be able to fix these   :-(
04:41 diakopter Rakudo Actions, at least
04:42 lizmat yes, trying to make sense of that and how to build optrees
04:43 lizmat I sort of roundrobin between these problems, hoping for a breakthrough
04:43 lizmat they are all sort of prerequisites for getting "is default" working for Any typed variables
04:43 lizmat which in turn is needed to get Nil the specced functionality
04:44 lizmat r: my Int $a is default(42); say $a; $a=65; say $a; $a=Nil; say $a  # works
04:44 camelia rakudo bb86d1: OUTPUT«42␤65␤42␤»
04:44 lizmat r: my $a is default(42); say $a; $a=65; say $a; $a=Nil; say $a  # doesn't work
04:44 camelia rakudo bb86d1: OUTPUT«42␤65␤Nil␤»
05:00 diakopter r: my $a is default(42) but Int;
05:00 camelia rakudo bb86d1: OUTPUT«Cannot mix in non-composable type Int into object of type Int␤  in sub infix:<but> at src/gen/CORE.setting:14755␤  in sub infix:<but> at src/gen/CORE.setting:14751␤  in block  at /tmp/g4VJGRz2OT:1␤␤»
05:00 diakopter r: my $a is default(42) but 42;
05:00 camelia rakudo bb86d1:  ( no output )
05:01 lizmat I haven't looked at "but" yet
05:11 lizmat somehow I'm confusing the fudging logic in tests:
05:11 birdwindupbird joined #perl6
05:11 lizmat ok 3 - # SKIP declared variable not visible in block yet# TODO will init NYI
05:12 lizmat how can a test be marked "SKIP" *and* "TODO"
05:12 lizmat and two tests down, a todo test not getting its TODO?
05:12 lizmat head hits keyboard and creates a new language
05:13 jaldhar joined #perl6
05:16 lizmat finds one shouldn't put a semi-colon after a "#?rakudo todo "will post NYI""
05:16 timotimo °\
05:18 dalek roast: acd0c40 | (Elizabeth Mattijsen)++ | S04-declarations/will.t:
05:18 dalek roast: Reorganised "will foo {...}" tests, added tests for will (pre|post)
05:18 dalek roast: review: https://github.com/perl6/roast/commit/acd0c40d46
05:20 odoacre_ joined #perl6
05:21 lizmat r: { KEEP say "keep"; UNDO say "undo" } # not entirely what I expected
05:21 camelia rakudo 54840d: OUTPUT«undo␤»
05:21 lizmat r: { KEEP say "keep"; UNDO say "undo"; 1 } # not entirely what I expected
05:21 camelia rakudo 54840d: OUTPUT«keep␤»
05:21 lizmat r: { 1; KEEP say "keep"; UNDO say "undo" } # not entirely what I expected
05:21 camelia rakudo 54840d: OUTPUT«undo␤»
05:23 lizmat feels like a rakudobug to me
05:50 lizmat back to sleep&
05:57 [Coke] sleep! I knew I was forgetting something.
06:06 dmol joined #perl6
06:17 timotimo i figured out how to uppercase cokes nakme :)
06:18 timotimo ┌    ┐
06:18 timotimo │COKE│
06:18 timotimo └    ┘
06:18 timotimo that's how
06:21 SamuraiJack_ joined #perl6
06:37 moritz o/
06:46 mj41 joined #perl6
06:54 kaleem joined #perl6
07:04 sidus joined #perl6
07:14 sqirrel joined #perl6
07:22 leont joined #perl6
07:45 FROGGS joined #perl6
07:47 FROGGS o/
08:25 pupoque_ joined #perl6
08:26 masak mornin', #perl6
08:30 ssutch joined #perl6
08:30 FROGGS hi masak
08:31 FROGGS masak: are you versed in the pir representation of the nqp/rakudo code?
08:31 sqirrel joined #perl6
08:33 masak lizmat: I don't see S04 spec'ing the relative order of NEXT phasers in the same loop block. it's an interesting question, and I don't have any intuition in the matter.
08:33 masak FROGGS: I can read PIR most of the time, but I'm no expert.
08:34 FROGGS k
08:34 dmol joined #perl6
08:34 FROGGS I want to include a sub directly in pir, so I can call it from rakudo's Q::PIR blocks
08:35 FROGGS but if I include a pir script that just declares a sub, this break weirdly
08:35 masak sounds like a practice we've moved away from in the past few years.
08:36 FROGGS here I had included my test script: https://github.com/perl6/nqp/blob/master/src/vm/parrot/HLL/Backend.nqp#L97
08:36 FROGGS yeah, it should be just a test
08:37 FROGGS I tried to have a lexical sub, that emits pir code, and I can even invoke that sub from a Q::PIR block, but I cant use this lexical sub as a Task of a thread
08:37 FROGGS and I can do that using a pir .sub in a pir-only test script
08:49 pupoque_ joined #perl6
08:53 markov joined #perl6
08:55 dmol joined #perl6
09:07 autumn joined #perl6
09:08 obra joined #perl6
09:22 effbiai joined #perl6
09:37 pupoque_ joined #perl6
09:52 dmol joined #perl6
09:52 pupoque_ joined #perl6
10:09 berekuk joined #perl6
10:11 daxim joined #perl6
10:19 labster joined #perl6
10:26 sidus joined #perl6
10:48 benabik_ joined #perl6
10:57 daniel-s joined #perl6
11:05 kaleem joined #perl6
11:10 masak interesting on naming in software: http://thinkrelevance.com/blog/2013/07/31/on-naming
11:11 masak the two names that I'm most proud of having contributed to Perl 6, by the way: "ecosystem" and "World"
11:12 daxim metaphors, eh
11:13 daxim masak and daxim at tanagra
11:13 tadzik :D
11:14 Mouq joined #perl6
11:16 diakopter Mouq: hi. I left you a message
11:16 diakopter (type something to see it)
11:17 Mouq Hey, I saw it
11:17 yoleaux 00:35Z <diakopter> Mouq: ah, okay. good to know. thanks for doing that! :)
11:21 masak daxim: that sounds deep, but I don't get it.
11:21 lizmat r: { UNDO say "undo" } # I don't see the block fail, so why would it UNDO?
11:21 camelia rakudo 54840d: OUTPUT«undo␤»
11:21 daxim hand in your geek card
11:21 daxim tadzik got it immediately
11:21 * diakopter 2
11:22 diakopter masak: I thought we have the tanagra conversation before (you and I)
11:22 masak maybe. don't remember any such conversation.
11:22 tadzik finally, my years of watching tng paid off
11:23 diakopter haha; before you were born!
11:23 * diakopter <- age-ist, apparently
11:23 FROGGS masak: http://en.memory-alpha.org/wiki/Darmok_%28episode%29
11:23 diakopter his arms spread wide.
11:23 tadzik ha, I was born back then :)
11:24 FROGGS tembo, his eyes closed
11:24 tadzik I many, I have been born already
11:24 coax75ohm joined #perl6
11:24 diakopter *giggle*
11:24 masak I see.
11:24 tadzik also, I enjoyed "things that never happened in Star Trek"
11:24 FROGGS tadzik: hmm?
11:24 tadzik like "the enterprise encounters a new life form, which is neither humanoid nor made of pure energy"
11:25 tadzik http://www.st-minutiae.com/humor/neverhappen.html
11:25 daxim there are a lot of pages like that
11:25 rindolf joined #perl6
11:25 tadzik which is actually false, there was such creature in TOS
11:25 FROGGS and the one new crewman (that is a friend of the commander or so), that won't die after they beam down to a planet
11:25 tadzik if a new guy beams down...
11:26 FROGGS "He is dead Jim"
11:26 lizmat r: { UNDO say "undo" } # rakudobug?
11:26 camelia rakudo 54840d: OUTPUT«undo␤»
11:27 masak r: say { ; }
11:27 camelia rakudo 54840d: OUTPUT«Block.new()␤»
11:27 masak r: say { ; }()
11:27 camelia rakudo 54840d: OUTPUT«Nil␤»
11:27 pmurias joined #perl6
11:27 masak doesn't returning Nil mean that the UNDO phaser is triggered?
11:27 masak r: say { UNDO say "undo" }()
11:27 camelia rakudo 54840d: OUTPUT«undo␤Nil␤»
11:28 fhelmberger joined #perl6
11:28 masak I think so. non-bug, I think.
11:28 fhelmberger joined #perl6
11:28 FROGGS Counsellor Troi states something other than the blindingly obvious. # lol
11:29 tadzik "he seems angry" :D
11:29 lizmat S04:952: "Since leaving a block is considered a successful return, breaking out of one with C<succeed> is also considered a successful return for the purposes of C<KEEP> and C<UNDO>."
11:29 synopsebot Link: http://perlcabal.org/syn/S04.html#line_952
11:30 lizmat masak: I don't think it is about the return value of the block
11:32 lizmat at least, that's not how I read the spec
11:32 masak how do you read the spec? :)
11:32 lizmat that may be how it is currently implemented
11:33 lizmat S04:1559: exiting a block successfully or insuccesfully
11:33 synopsebot Link: http://perlcabal.org/syn/S04.html#line_1559
11:34 lizmat I would think exiting with a fail or uncaught exception, would indicate an unsuccessful exit only
11:34 lizmat you're saying a simple Nil return of a block, constitutes an unsuccessful exit ?
11:35 masak "In the absence of error exception propagation, a successful exit is one that returns a defined value or parcel." -- S04:1759
11:35 synopsebot Link: http://perlcabal.org/syn/S04.html#line_1759
11:36 colomon joined #perl6
11:36 masak hugme: hug synopsebot
11:36 * hugme hugs synopsebot
11:39 * colomon is going to repeat his lines that don't appear to have made it to #perl6 -- or at least the chatbot.
11:39 * colomon is piping niecza's output to rakudo to get something practical done
11:39 colomon \o/
11:39 * colomon should probably get around to implementing rename in Niecza and TagTools support in jakudo, so he doesn't have to do that again
11:40 lizmat masak++
11:41 lizmat S04:1770: should probably read "return Nil" nowadays, no?
11:41 synopsebot Link: http://perlcabal.org/syn/S04.html#line_1770
11:43 sqirrel joined #perl6
11:44 lizmat hmmm..  I guess not: explicit scalar undef
11:44 Mouq joined #perl6
11:44 lizmat scratch that
11:47 dalek specs: c7a5da2 | (Elizabeth Mattijsen)++ | S04-control.pod:
11:47 dalek specs: Refer to Definition of Success near KEEP and UNDO
11:47 dalek specs: review: https://github.com/perl6/specs/commit/c7a5da296c
11:48 PacoLinux joined #perl6
11:48 masak lizmat: S04 definitely isn't very "coherent" in what it considers to be a successful block exit. as evidenced by us reaching diametrically opposite conclusions from the same synopsis.
11:50 lizmat well, I hope the link I added will make it easier for people to grok
11:51 masak ah, yes.
11:51 masak lizmat++
11:57 masak tadzik: I'm not at all sure this merits a change, but my first surprise with File::Find was that I'm suppsed to do 'find' rather than 'File::Find::find' (or import into my namespace).
11:57 tadzik masak: hm. Does File::Find::find not work? :)
11:57 masak nope.
11:57 tadzik uh, curious
11:57 tadzik oh, because it's not our
11:57 masak right.
11:58 masak also, a simple find(:dir<.>, :name<foo>) seems to hang.
11:58 masak though it's possible I was too impatient. this is a rather big directory structure.
11:58 * masak runs it on something smaller
11:59 tadzik it should be lazy
12:00 masak sure, I see that from source.
12:00 masak which is fine.
12:00 tadzik but not from practice? :P
12:00 masak in practice, it hangs.
12:00 masak I tried it on a smaller directory. still hangs.
12:00 pupoque_ joined #perl6
12:00 tadzik oddness
12:01 masak are you sure it's not suckered by the '.' and '..' things that ufo was?
12:01 masak oh wait!
12:01 tadzik there's more!
12:01 masak this one actually died instead.
12:01 tadzik :|
12:01 masak is File::Find modeled on FIND(1) of Unix?
12:01 tadzik sort of
12:02 masak then I think it should just skip over unreadable directories rather than dying.
12:02 tadzik that's what keep-going is for
12:02 masak I tried it on my /tmp directory, which had something non-readable in it.
12:02 masak oh, it's there but not the default? :/
12:02 tadzik yeah. Should it be?
12:02 masak if it's modeling FIND(1), yes, I think so.
12:03 masak I see no other reason it shouldn't be.
12:03 tadzik well, find() will have a way to signal a user
12:03 tadzik consider the following
12:03 tadzik find(:dir</root>), returns empty list
12:03 tadzik that's a bit WAT
12:03 masak ok, with :keep-going it finished.
12:03 masak agreed.
12:04 masak so I assume the first find() I have going is just sllllllooooooouuuuuw.
12:04 tadzik are you eagerifying it?
12:07 masak I'm looping on its return value.
12:09 masak ok, adding debug output to File/Find.pm to see if it's progressing at all.
12:09 masak oh, seems it is.
12:09 masak man, that's slow.
12:11 masak this is through no fault of yours, tadzik.
12:11 masak the File::Find module looks fine.
12:12 masak I'm going to... not use it, though. a `shell 'find ...'` should serve me better in this case.
12:13 konundra joined #perl6
12:13 Ulti joined #perl6
12:14 FROGGS masak: btw, I know now why I cant create a task out of a .sub, the option that get passed to a .sub decl are ":lex :outer(...)", and these are messing it up
12:14 masak for the record, the directory structure I was trawling contains 33884 entries, 6460 of which are directories.
12:15 masak I aborted the File::Find search after 9m10s.
12:15 FROGGS masak: so, I'd need to mark that sub declaration somehow, and skip these particular options
12:15 masak a corresponding (Rakudo) program running qx[find -name foo] took 8s, most of which were spent in the Rakudo compiling stage. the `find` was more or less instantaneous.
12:16 masak FROGGS: that all sounds wrong somehow.
12:16 FROGGS :o)
12:16 FROGGS no doubt
12:16 masak FROGGS: those options are what give the sub its place in the whole hierarchy of nested scopes.
12:16 masak FROGGS: I don't think you're meant to skip them.
12:17 lizmat r: { LEAVE say "leave"; KEEP say "keep"; 1}  # KEEP runs before LEAVE ?
12:17 camelia rakudo 54840d: OUTPUT«keep␤leave␤»
12:18 FROGGS masak: then maybe parrots tasks are unable to handle them right... as I said earlier, this is only a test that will end up in a branch/fork eventually, just to show what it does
12:18 lizmat r: { KEEP say "keep"; LEAVE say "leave"; 1} # nope, just the reverse order in which the are specified
12:18 camelia rakudo 54840d: OUTPUT«leave␤keep␤»
12:18 lizmat *they
12:20 FROGGS lizmat: see rakudo/src/core/Block.pm
12:20 tadzik masak: thats still very weird
12:20 FROGGS for some phasers it pushes, for some it unshifts
12:21 lizmat yup, and according to spec, KEEP and UNDO are part of the LEAVE queue
12:21 lizmat and LEAVE executes in reverse order of specification
12:22 Ulti joined #perl6
12:24 pmurias joined #perl6
12:30 rindolf joined #perl6
12:39 moritz http://tour.golang.org/?ModPagespeed=noscript#3 why does that random number generator remind me of XKCD?
12:40 pmurias joined #perl6
12:41 sidus joined #perl6
12:41 JimmyZ My favorite number is always 1
12:44 dalek roast: 5eab087 | (Elizabeth Mattijsen)++ | S04-declarations/will.t:
12:44 dalek roast: Added tests for will (keep|undo|compose)
12:44 dalek roast: review: https://github.com/perl6/roast/commit/5eab087e0f
12:51 masak JimmyZ: so is mine. though as favorite numbers go, 1 is not so bad.
12:52 masak :)
12:53 [Coke] timotimo++
12:55 JimmyZ :)
13:31 berekuk joined #perl6
13:33 skids joined #perl6
13:43 jeff_s1 joined #perl6
13:45 xilo joined #perl6
13:50 moritz #go on freenode is about the game, #golang is invite-only
13:50 moritz so, where do golang-people go?
13:51 yves joined #perl6
13:51 masak #gonuts
13:51 masak I have no idea how I know this.
13:52 moritz that has just one other inhabitant
13:52 masak :/
13:52 moritz #go-nuts
13:52 masak oh, #go-nuts
13:52 flussence maybe they all go directly to #jail
13:53 masak at work, we have 8 versions of the same file, spread over 4 repositories. I decided to make a little phylogenetic analysis to see what can be said about the evolution of the script. :)
13:54 masak turns out once you have all the information, this is really easy to do with Perl 6 and Git.
13:54 masak even across repositories.
13:54 moritz flussence: go directly, do not collect $200 :-)
13:54 [Coke] oh, go is where I'd go to get my modula-3 fix these days. huh.
13:55 masak [Coke]: Python doesn't do it for you? :)
13:55 masak now what I want to do is for the script to learn to distinguish "commits that were only for this copy" and "commits that should be patched across all copies".
13:56 btyler joined #perl6
13:58 [Coke] ahahahah!: https://plus.google.com/u/0/105487854388646525021/posts/bjWQXbWAXxL
13:58 [Coke] (from merlyn)
14:00 FROGGS joined #perl6
14:04 GlitchMr nrs: my $a = 42; $a =+ 2
14:04 GlitchMr nr: my $a = 42; $a =+ 2
14:04 GlitchMr std: my $a = 42; $a =+ 2
14:05 camelia rakudo 54840d, niecza v24-88-g1f87209:  ( no output )
14:05 camelia std c2215f0: OUTPUT«Potential difficulties:â�¤  =+ is not an infix operator (to suppress warning put space between infix = and prefix +) at /tmp/dWDAzgUP77 line 1:â�¤------> [32mmy $a = 42; $a =[33mâ��[31m+ 2[0mâ�¤ok 00:00 43mâ�¤Â»
14:05 lizmat nr: my $a = 42; $a =+ 2; say $a
14:05 GlitchMr Could this specific case report specific error, like 'Reversed += operator' Perl 5 makes?
14:05 camelia rakudo 54840d, niecza v24-88-g1f87209: OUTPUT«2␤»
14:06 lizmat seems it parses it as though there was a space between = and +
14:06 GlitchMr Because this is the only way it could be really parsed
14:07 lizmat feels to me std is right, and rakudo and niecza are wrong
14:07 GlitchMr STD only makes a warning.
14:07 GlitchMr It still parses it as $a = +2
14:07 lizmat ah, ok
14:07 GlitchMr std: my $a = 42; $a =. 2
14:07 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus term at /tmp/6elwqFPpWS line 1:�------> [32mmy $a = 42; $a =[33m�[31m. 2[0m�Parse failed�FAILED 00:00 43m�»
14:08 GlitchMr rn:: my $a = 42; $a =. 2
14:08 GlitchMr rn: my $a = 42; $a =. 2
14:08 camelia rakudo 54840d: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/gk2Bn4WhSq:1�------> [32mmy $a = 42; $a =. [33m�[31m2[0m�»
14:08 camelia ..niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0m��Bogus term at /tmp/3SEelWJZsA line 1:�------> [32mmy $a = 42; $a =[33m�[31m. 2[0m��Parse failed��»
14:08 lizmat hmm…  doesn't feel right to me then in all cases  :-)  with whitespace sensitivity in Perl6
14:08 GlitchMr Perl 6 still tries to avoid whitespace sensitivity
14:09 lizmat well, it feels to me that "=+' is in the same ballpark as "=."
14:10 masak I think the '=+' should only merit a warning. (and so STD has it right already.)
14:10 GlitchMr I think compiler should try finding beginner errors.
14:10 masak STD does.
14:11 GlitchMr I think that =+ should propose +=.
14:11 masak ok.
14:11 GlitchMr I think it's more likely than = +.
14:11 masak me too.
14:12 rindolf joined #perl6
14:15 GlitchMr I wanted to find some programming mistakes, but most of these don't apply to Perl 6.
14:15 GlitchMr For example, stuff like if (something); { }
14:16 GlitchMr (or simply cannot be easily found by compiler, like no indendation)
14:17 GlitchMr You cannot have statement after if, so it's simply impossible to put semicolon here.
14:17 GlitchMr Actually, I wonder what error message it gets
14:17 GlitchMr std: sub something {}; if (something); { }
14:17 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Missing block at /tmp/BH3eF2rd5_ line 1:â�¤------> [32msub something {}; if (something)[33mâ��[31m; { }[0mâ�¤    expecting any of:â�¤    argument listâ�¤  statement modifier loopâ�¤Parse failedâ�¤FAILED 00:00 44mâ�¤Â»
14:17 GlitchMr Good
14:18 [Coke] perlcritsix.
14:18 [Coke] perltidy?
14:19 [Coke] I wanted to write a coldfusion grammar in perl6 just so I could pretty print.
14:19 PacoAir joined #perl6
14:19 [Coke] which reminds me, I could probably do that and bundle it up for cfeclipse soon.
14:21 PacoAir joined #perl6
14:23 Mouq joined #perl6
14:25 corecatcher is there a perl6 grammer debugger? :)
14:26 moritz yes!
14:26 corecatcher any hint?
14:26 lizmat Grammar::Debugger ?
14:26 moritz https://github.com/jnthn/grammar-debugger
14:26 moritz corecatcher: in general, modules.perl6.org is a good starting point for such questions
14:27 corecatcher hmkay, trying next time, thanks for the hint
14:28 moritz you're welcome, and no problem
14:36 masak it's so nice to be able to answer "yes!" to "is there an X?" questions ;)
14:36 corecatcher its even neater to get that yes on the other side
14:37 corecatcher that Tracer is nice! :)
14:40 moritz indeed
14:41 masak jnthn++
14:42 Psyche^ joined #perl6
14:46 GlitchMr rn: say [+] grep { $_ %% 3 || $_ %% 5 }, ^1000
14:46 camelia rakudo 54840d, niecza v24-88-g1f87209: OUTPUT«233168␤»
14:48 GlitchMr rn: say [+] grep * %% 3|5, ^1000
14:48 camelia rakudo 54840d: OUTPUT«166838␤»
14:48 camelia ..niecza v24-88-g1f87209: OUTPUT«499500␤»
14:48 GlitchMr What am I doing wrong?
14:48 Ulti joined #perl6
14:48 GlitchMr p: [+] grep * %% 3|5, ^1000
14:48 camelia pugs: OUTPUT«*** ␤    Unexpected "% 3"␤    expecting operator␤    at /tmp/ddphpARP4Y line 1, column 13␤»
14:49 GlitchMr yeah
14:49 GlitchMr p: [+] grep {$_ %% (3|5)}, ^1000
14:49 camelia pugs: OUTPUT«*** ␤    Unexpected "% ("␤    expecting operator␤    at /tmp/H7bRypu98j line 1, column 15␤»
14:49 GlitchMr rn: [+] grep {$_ %% (3|5)}, ^1000
14:49 camelia rakudo 54840d, niecza v24-88-g1f87209:  ( no output )
14:49 GlitchMr rn: say [+] grep {$_ %% (3|5)}, ^1000
14:49 camelia rakudo 54840d, niecza v24-88-g1f87209: OUTPUT«233168␤»
14:50 GlitchMr rn: say [+] grep {$_ %% 3|5}, ^1000
14:50 camelia rakudo 54840d, niecza v24-88-g1f87209: OUTPUT«499500␤»
14:50 GlitchMr What is precedence of %% compared |?
14:50 JimmyZ rn: say [+] grep * %% (3|5), ^1000
14:50 GlitchMr Because this really confused me
14:50 camelia rakudo 54840d, niecza v24-88-g1f87209: OUTPUT«233168␤»
14:51 GlitchMr %% has multiplicative precedence... I see...
14:51 GlitchMr Seriously?
14:51 moritz why not?
14:51 moritz % has the same
14:51 GlitchMr This is confusing for an operator that returns a boolean.
14:51 GlitchMr But I assume it makes sense, considering it's modulo.
14:52 moritz just because it bit you this time doesn't mean it's generally wrong
14:52 GlitchMr I would expect it to have chaining infix precedence.
14:56 GlitchMr rn: say [+] grep * %% 2, (1, 1, * + * ...^ * > 4e6)
14:56 camelia rakudo 54840d, niecza v24-88-g1f87209: OUTPUT«4613732␤»
15:00 masak GlitchMr: chaining infix precedence only really makes sense if you have at least one use case where you'd want to chain %%
15:00 masak GlitchMr: like $low < $x < $high
15:00 GlitchMr Ok, structural infix
15:00 GlitchMr My mistakes
15:01 GlitchMr My mistake*
15:01 jaldhar joined #perl6
15:01 GlitchMr Except structural infix doesn't contain boolean operators...
15:02 GlitchMr Or perhaps ff precendece?
15:02 GlitchMr It would make more sense if it would work like equality operator, because... it's equality operator (sort of)
15:04 moritz $x %% $y %% $z
15:04 lizmat nwc10++  # for comment on diakopter++ grant proposal
15:06 colomon diakopter grant proposal?  url?
15:06 GlitchMr rn: say 1 %% 0
15:06 camelia niecza v24-88-g1f87209: OUTPUT«Unhandled exception: System.DivideByZeroException: Division by zero␤  at (wrapper managed-to-native) object:__icall_wrapper___emul_lrem (long,long)␤  at Builtins.mod (Niecza.Constants c, Niecza.Variable a1, Niecza.Variable a2) [0x00000] in <filename unknow…
15:06 camelia ..rakudo 54840d: OUTPUT«True␤»
15:06 GlitchMr Rakudo says that 0 can be divided by 0?
15:06 GlitchMr I mean, 1 can be divided by 0.
15:06 [Coke] colomon: http://news.perlfoundation.org/2013/07/hague-grant-application.html
15:06 GlitchMr Is definition of % 0 broken in Rakudo, or something?
15:07 GlitchMr r: say 0.5 % 0; say 1 % 0
15:07 camelia rakudo 54840d: OUTPUT«0.5␤0␤»
15:07 GlitchMr Hmmm... I'm doing % 1 for some reason.
15:07 GlitchMr r: say 1.5 % 0
15:07 camelia rakudo 54840d: OUTPUT«1.5␤»
15:07 GlitchMr Actually... I'm doing... huh?
15:07 masak it's a no-op.
15:08 masak which makes a weird kind of sense, I guess.
15:08 masak but could equally well be flagged as a division by 0.
15:08 masak r: say 1.5 / 0
15:08 camelia rakudo 54840d: OUTPUT«Divide by zero␤  in method sink at src/gen/CORE.setting:11237␤  in method BUILDALL at src/gen/CORE.setting:887␤  in method bless at src/gen/CORE.setting:828␤  in method new at src/gen/CORE.setting:813␤  in method new at src/gen/CORE.setting:811␤  in method floor at…
15:08 masak arguably, 1.5 % 0 should do the same.
15:08 GlitchMr % 0 is just broken.
15:08 GlitchMr If it checks number type.
15:08 lizmat looking
15:09 GlitchMr I mean 1.0 % 0 should be equal to 1 % 0
15:09 GlitchMr Well, with exception for return type and stuff like that.
15:14 moritz IMHO % 0 should complain about division/modulo by zero
15:16 [Coke] masak reported this bug in 2010.
15:16 [Coke] https://rt.perl.org/rt3/Ticket/Display.html?id=77592
15:17 * lizmat is testing a fix
15:17 lizmat should I create a seperate exception "modulo by zero" for this ?
15:17 masak hah -- a rakudobug snatched out of my grip by... myself, three years ago.
15:18 masak lizmat: nah.
15:18 [Coke] I think it would be acceptable to reuse an existing divide by zero type.
15:18 masak lizmat: it's a division by 0, pure and simple.
15:18 jaldhar joined #perl6
15:18 masak lizmat: that's how I see most systems flag it.
15:19 [Coke] masak: tcl agrees. ship it.
15:19 moritz though it wouldn't hurt to know whether it came from a /, div, % or %%
15:19 masak troo
15:19 masak the expression might have many of them.
15:21 lizmat adding that to the exception
15:23 arnsholt Adding it to the error message is probably a good idea, but I suppose the stack trace will include the operator as well
15:24 masak arnsholt++
15:24 masak if it does, then it feels kinda superfluos that the exception carries that information, too.
15:25 arnsholt I dunno, it doesn't really cost anything to have it in there, and it might save you from inspecting the stack trace =)
15:27 lizmat seems it doesn't like my changes
15:28 lizmat … making
15:29 benabik joined #perl6
15:33 [Coke] we need to "groom our backlog"
15:34 [Coke] I HATE RT SO MUCH.
15:34 [Coke] <ahem>
15:34 [Coke] today's rant: word wrapping of code.
15:36 lizmat FWIW: I don't do RT, it's just too much of a hassle
15:38 [Coke] ok. if you fix a bug, let someone know so we can close it or mark it appropriately.
15:39 [Coke] I think we should consider rejecting #69432.
15:40 [Coke] nwc10: any suggestions on how to fix bugs on opensolaris if we don't have metal running opensolaris?
15:41 moritz [Coke]: ok, I'll reject it. After having worked on it for a while, I consider it unworkable
15:41 lizmat [Coke]: running spectest now
15:41 moritz [Coke]: oh, you're the ticket owner. Do you want to do it?
15:42 [Coke] moritz: nope, feel free to steal it and deal with it.
15:42 [Coke] rakudo: say «a\ b».perl
15:42 camelia rakudo 54840d: OUTPUT«("a", "b")␤»
15:42 [Coke] (#76120)
15:43 [Coke] r: say ord.Cool #114014
15:43 camelia rakudo 54840d: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'ord' will never work with no arguments (lines 1, 1)␤    Expected: :(Cool $s)␤»
15:43 [Coke] that smells like a :D is missing.
15:44 [Coke] https://rt.perl.org/rt3/Ticket/Display.html?id=114402 - that should be moved the the Grammar::Debugger queue, no?
15:45 fridim_ joined #perl6
15:45 ssutch joined #perl6
15:47 moritz what's wrong with ord.Cool?
15:47 moritz I mean with the error message
15:47 stevan_ joined #perl6
15:49 [Coke] moritz: ticket says "LTA".
15:49 lizmat wow, three TODO"s pass :-)
15:50 moritz I find it quite awesome
15:51 moritz if you have confused Cool.ord with ord.Cool, that error message reminds you that you have really written ord().Cool
15:51 * moritz replies on the ticket
15:51 [Coke] moritz: go ahead and close it out, too.
15:51 [Coke] lizmat++
15:52 dalek rakudo/nom: 9d537cc | (Elizabeth Mattijsen)++ | src/core/Exception.pm:
15:52 dalek rakudo/nom: Added :using parameter to DivideByZero exception
15:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9d537ccefa
15:52 dalek rakudo/nom: 4bfd796 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
15:52 dalek rakudo/nom: Add divide by zero check for %, add :using info to existing ones
15:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4bfd796b40
15:54 masak [Coke]: re #114402: arguably, yes.
15:55 dalek roast: 0ad06fa | (Elizabeth Mattijsen)++ | S03-operators/arith.t:
15:55 dalek roast: Unfudge passing tests and some spello's
15:55 dalek roast: review: https://github.com/perl6/roast/commit/0ad06fa84e
15:55 masak moritz: what error message would I have expected? the one STD gave at the end of the original message.
15:56 masak "Unsupported use of bare 'ord'; in Perl 6 please use .ord if you meant $_, or use an explicit invocant or argument"
15:56 * masak adds that to the ticket
16:00 [Coke] aw, lizmat just removed one of rakudo.jvm's advantages.
16:01 [Coke] removed? countered? caught up with?
16:01 lizmat hehe
16:01 lizmat it feels wrong though, doing the check inside the infix
16:02 lizmat seems to me MMD should do this, but I'm not sure what to use as a signature
16:02 lizmat multi infix:<div>(Int:D \a, 0 ) {  # does not work
16:03 lizmat $ perl6 -e 'say 15 / 0'
16:03 lizmat Divide by zero using div
16:03 lizmat maybe showing the operator is not such a good idea after all  :-(
16:06 lizmat dinner&
16:06 * [Coke] ponders the recursiveness of adding "I'll add that to the ticket" to the ticket.
16:07 [Coke] wonder if that check could have been in a #?if parrot block.
16:08 [Coke] eh. not if we want consistant error types.
16:10 JimmyZ_ joined #perl6
16:10 benabik joined #perl6
16:10 [Coke] moritz: if 114966 is concisely expressed as the last comment from you, what is the desired output?
16:11 [Coke] (and is the original problem just "use the unambiguous way to specify a hash or block")
16:11 masak lizmat: why 'div' rather than 'infix:</>'?
16:13 moritz [Coke]: both should produces Hash() (or nowdays "(Hash)") as output
16:21 [Coke] r: my %a; say {%a}.WHAT; my %*b; say {%*b}.WHAT
16:21 camelia rakudo 4bfd79: OUTPUT«(Hash)␤(Block)␤»
16:21 [Coke] n: my %a; say {%a}.WHAT; my %*b; say {%*b}.WHAT
16:21 camelia niecza v24-88-g1f87209: OUTPUT«(Hash)␤(Block)␤»
16:21 [Coke] p: my %a; say {%a}.WHAT; my %*b; say {%*b}.WHAT
16:21 camelia pugs: OUTPUT«␤␤»
16:22 [Coke] ok. can you add your comment to the ticket to help whoever tackles it?
16:25 moritz [Coke]: done.
16:25 [Coke] moritz++
16:26 gtodd been 2 months .... but perl6 rox even more  :-)
16:26 gtodd ++ everyone
16:27 gtodd what happened to rakudo ? it seems waay faster    still haven't tried the java vm part
16:28 gtodd doh I'm on a different machine :-\  s/seems waay/hope it got/     :-)
16:28 gtodd cheerrs
16:28 gtodd left #perl6
16:33 daniel-s__ joined #perl6
16:46 kaare_ joined #perl6
16:53 lizmat masak: do you want the error message to say "using infix:</>"?  or are you surprised about it saying "div" rather than "/"?
16:53 lizmat the latter surprises me as well  :-)
16:56 masak the former.
16:56 masak but I would be fine about it not saying which operator, too.
16:57 masak s/about/with/
16:58 lizmat how about create a separate candidate?
16:58 lizmat what would be its signature?
16:58 lizmat where not b?
16:59 spider-mario joined #perl6
16:59 Mouq As an aside, this might be of interest: https://gist.github.com/Mouq/6141500 Still running it, but it seems to be working
16:59 spider-mario joined #perl6
17:05 Mouq Ah, slight bug
17:08 Mouq I think it's fixed
17:12 zwut00 joined #perl6
17:13 vk_ joined #perl6
17:16 Mouq Yeah, okay; there are these little inconsitencies that keep biting me. I'll be a little less over-zealous and announce when I actually get it provably working :p
17:17 timotimo Mouq: you are aware there's already a smoker?
17:18 Mouq I couldn't find it :p and someone said it was broken
17:18 timotimo oh?
17:18 masak Mouq++ # experimenting
17:18 timotimo i recently ran it, but i forgot where i got it from ;)
17:19 timotimo ah, it's called 'emmentaler'
17:19 timotimo https://github.com/tadzik/emmentaler - this one
17:20 Mouq Cool! Now the question is, why do have badges for passing tests on modules.perl6.org, and don't use them?
17:20 tadzik they're not for passing tests
17:20 tadzik they're for existing tests :P
17:20 tadzik http://feather.perl6.nl/~sergot/modules/ used to have lights (like street lights) for passing modules
17:21 tadzik now colomon++ runs a smoker with web ui
17:21 tadzik but I never remember the url
17:21 Mouq http://modules.perl6.org/fame-and-profit last item
17:21 colomon that's because it's just a bunch of numbers, and it's not even available to the outside world at the moment.
17:21 colomon let me see if I can find my wife's MBP...
17:22 tadzik ah, this one
17:22 tadzik it was never used :P
17:24 timotimo no module is super awesom? :(
17:25 Mouq lol; 'k. I'm not really worried about it. Some just mentioned their doubt of most of the modules still working yesterday
17:25 Mouq *Someone
17:25 tadzik mayhaps we should have "module of the month"
17:26 colomon I've just gotten myself into update hell on my wife's MBP.  but I can answer questions about modules directly in the meantime...
17:28 raiph joined #perl6
17:29 PerlJam tadzik: +1 if you can find some way to keep it updated.
17:29 tadzik it's been a while since I blug
17:30 * colomon is blugging at the moment.  trying to find a good conclusion.
17:30 PerlJam tadzik: maybe that's a good idea for advent this year.  A module a day.
17:34 FROGGS PerlJam: that would be awesome for contest too... we choose a month, and the one who makes the most (and most useful) modules within that month wins...
17:35 timotimo ooooh crap
17:35 timotimo who's going to maintain the fallout of that? ;)
17:35 FROGGS we had such a contest in the #sdl channel, one game per week in march 2012, it was awesome :o)
17:35 FROGGS timotimo: somebody else :P
17:37 pmurias joined #perl6
17:38 PerlJam FROGGS: have you ever seen the Google AI challenge?  If we could run something like that, that would be neat.
17:39 PerlJam We'd have to pick a problem that wasn't based on speedy answers, but more on strategy.
17:39 konundra joined #perl6
17:39 FROGGS hmm, no, never heard of that
17:40 FROGGS masak: that is it currently: https://gist.github.com/FROGGS/6141772
17:41 FROGGS masak: I wanna put something in the variable which got written to, to be able to wait for the thread to finish when accessing it
17:41 colomon joined #perl6
17:41 PerlJam FROGGS: see http://planetwars.aichallenge.org/ and http://aichallenge.org/
17:42 PerlJam aww, the ants visualizer is broken.
17:42 PerlJam I liked that one.
17:42 FROGGS wow, 4600 submissions
17:43 pmurias PerlJam: aren't a lot of such ai challenges based of maximising the amount of computation in the time given?
17:43 pmurias s/of/on
17:44 PerlJam pmurias: right, that's why I said we'd need to be judicious in picking a problem.
17:46 FROGGS damn it, accidentally hitting enter on `make clean` when you want to execute something else sucks
17:47 colomon joined #perl6
17:48 colomon tadzik: http://97.95.33.142:3001/report
17:49 pmurias PerlJam: bwapi bindings for writing starcraft bots would be awesome
17:54 benabik joined #perl6
17:57 lizmat colomon++
17:57 lizmat masak: I'm removing the operator from the DivideByZero exception
17:58 lizmat because it will most likely show the wrong operator
17:58 lizmat this is because Real / Real somewhere in its bowels uses div, and that then fails
17:58 lizmat the alternative would be to put in a check in *every* candidate at the highest level
17:59 lizmat but that would mean that legit values are being checked for 0-ness multiple times, which would slow down calculations even more, I would think
18:01 rindolf joined #perl6
18:04 masak FROGGS: 'fraid I can't help. :/
18:05 masak lizmat: removing it is, then.
18:09 FROGGS masak: you dont have to :o)
18:10 lizmat masak: trying best of both worlds: using parameter is now optional, only % and %% use it, as they only fall back on themselves as it were
18:17 masak lizmat: \o/
18:18 rindolf joined #perl6
18:19 dalek perl6-roast-data: 1022501 | coke++ | / (5 files):
18:19 dalek perl6-roast-data: today (automated commit)
18:19 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/1022501f48
18:20 lizmat -0.01%
18:22 [Coke] lizmat: probably the rakudo.parrot todos you were able to remove.
18:23 masak Python allows trailing commas! \o/
18:23 spider-mario trailing commas are nice
18:23 PerlJam masak: now if only javascript didn't have a problem with them.
18:24 lizmat oddly enough, only 1 todo less then yesterday for parrot: maybe I added a few more elsewhere
18:24 [Coke] PerlJam: only some variants of JS have problems with them. :P
18:26 masak moritz: have you thought about supporting JavaScript comments in JSON::Tiny?
18:26 masak PerlJam: yeah, 's strange. even C gets that one right.
18:27 Tene Speaking of javascript, I chuckled at this: http://sealedabstract.com/wp-content/uploads/2013/05/JavaScript-the-good-parts.jpg
18:28 lizmat r: say 15.1 !%% 0  # masak: negating ops is handled somewhere, any ideas ?
18:28 camelia rakudo 4bfd79: OUTPUT«Divide by zero using %␤  in method Numeric at src/gen/CORE.setting:11232␤  in sub infix:<==> at src/gen/CORE.setting:3550␤  in sub infix:<==> at src/gen/CORE.setting:3548␤  in sub infix:<%%> at src/gen/CORE.setting:3528␤  in sub infix:<%%> at src/gen/CORE.setting:3…
18:29 FROGGS lizmat: this maybe? rakudo/src/core/metaops.pm:10:sub METAOP_NEGATE(\op) {
18:29 lizmat FROGGS++
18:29 FROGGS :o)
18:31 masak what FROGGS++ said :)
18:31 dalek rakudo/nom: 42fcd56 | (Elizabeth Mattijsen)++ | src/core/Exception.pm:
18:31 dalek rakudo/nom: Made "using" parameter optional in DivideByZero exception
18:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/42fcd56da1
18:31 dalek rakudo/nom: 4fd0490 | (Elizabeth Mattijsen)++ | src/core/ (3 files):
18:31 dalek rakudo/nom: Only % and %% use the new "using" parameter for the DivideByZero exception
18:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fd0490e84
18:31 masak the core/metaops.pm is a "usual suspect" for such questions.
18:31 * lizmat makes mental noet
18:31 lizmat *note, lalalalala
18:32 FROGGS hehe
18:33 masak grrrrr, @array.elems is spelled len(array) in Python >:-(
18:34 masak (╯°□°)╯︵ ┻━┻
18:35 tadzik ┬──┬ ノ( ゜-゜ノ) the table stays :)
18:35 masak :P
18:36 masak srsly, though, what was the sequence of events?
18:36 masak (1) "surely the length is queried by a function"
18:36 masak ...years pass...
18:36 masak (2) "ooh! object orientation! that makes sense!"
18:37 masak "but should the len() function actually be a meth..." -- "SILENCE"
18:37 PerlJam Not everything in Python is an object.
18:38 masak I guess that's the actual answer, yes.
18:38 masak (though under the hood, it seems that len() calls .__len__() on the array/list)
18:38 masak gee, Python sure likes double underscores.
18:39 PerlJam those are *really* private thingies
18:39 PerlJam :)
18:39 masak ah. http://effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm
18:41 GlitchMr joined #perl6
18:41 [Coke] r: say "three".elems
18:41 camelia rakudo 4bfd79: OUTPUT«1␤»
18:42 [Coke] r: say "three".len
18:42 camelia rakudo 4bfd79: OUTPUT«No such method 'len' for invocant of type 'Str'␤  in block  at /tmp/9bzVGZOont:1␤␤»
18:42 [Coke] r: say "three".chars
18:42 camelia rakudo 4bfd79: OUTPUT«5␤»
18:42 [Coke] eh, seems fine here. :P
18:45 masak his point still stands, though.
18:46 masak (that something other than a container type could have an .elems method)
18:47 [Coke] yes, but in our world, we'd want to call that particular and possibly strange method. no?
18:47 arnsholt masak: I think keeping len() a function is an attempt at backwards compatibility
18:47 arnsholt Of course, that shouldn't preclude adding a method variant as well
18:47 masak arnsholt: no, it's deliberate, see URL above.
18:47 masak arnsholt: and there is a method, it's called .__len__
18:49 arnsholt I guess
18:49 arnsholt But I have to say I'm not entirely convinced by GvR's arguments
18:49 arnsholt Of course, having both len() and .len() would mean that there are two ways to do it, which I guess might have something to do with it as well =)
18:51 dalek roast: a87e7a7 | (Elizabeth Mattijsen)++ | S03-operators/is-divisible-by.t:
18:51 dalek roast: Added tests for %% 0 and !%% 0
18:51 dalek roast: review: https://github.com/perl6/roast/commit/a87e7a7060
18:53 lizmat masak: I have no idea why !%% 0 does not fail, whereas %% 0 does
18:53 lizmat the former should just go through METAOP_NEGATE, and then fail in there surely ?
18:53 ggoebel5 joined #perl6
18:54 bbkr joined #perl6
18:57 masak lizmat: surely,.
18:57 colomon loliblug: http://justrakudoit.wordpress.com/2013/08/02/rakudo-performance/
18:57 masak colomon++
18:58 masak colomon: problem. I couldn't finish the first paragraph without feeling I'm missing some context.
18:58 masak colomon: specifically, what's a STEP model, and what does it mean to tesselate it?
19:00 ggoebel joined #perl6
19:00 masak colomon: the links in subsequent paragraphs help a bit, but not 100%.
19:00 lizmat colomon: still wondering how it would fare with my .categorize reimplementation  :-)
19:01 colomon lizmat: didn't make any difference
19:01 colomon masak: link added to first paragraph
19:24 _ilbot joined #perl6
19:24 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
19:24 Mouq pmurias: There is http://fadefade.com/json-comments.html
19:25 Mouq pmurias: Though, that isn't really recommended and there's no guarantee that it'll work in all parsers
19:28 ggoebel2 joined #perl6
19:28 masak the results are in: on a 5595-item directory structure -- with gather: 308.535s -- with an array and push: 295.721s
19:28 masak :/
19:29 lizmat disappointing
19:29 masak there's a speedup, but it's only about 4%.
19:30 lizmat strange idea: could you use unshift rarher than push ?
19:30 lizmat *rather
19:31 colomon masak: can you try not saving them at all?
19:31 xinming joined #perl6
19:31 colomon ie figure out how much time is scanning for the files, how much is recording when they are found.
19:31 masak sure.
19:31 masak though I deliberately set it up so that it would only find one file.
19:31 masak so it shouldn't be much at all.
19:32 dalek rakudo/nom: 52ecebc | (Elizabeth Mattijsen)++ | / (4 files):
19:32 dalek rakudo/nom: Give KeyBag its own file
19:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/52ecebc493
19:32 masak still; trying that.
19:33 colomon oh!
19:33 colomon gather / take is only slow when the count is in the thousands....
19:33 xenoterracide joined #perl6
19:34 PerlJam 5595 is in the thousands
19:34 diakopter colomon: try makign it pre-allocate teh destination array to some big size?
19:35 PerlJam oh, /me missed the "only find one file" bit
19:36 pmurias Mouq: masak pointed me to that blog post, but according to the blog post they seem to have ben deliberately removed from the spec
19:38 charsbar_______2 joined #perl6
19:38 tadzik lizmat: no particular reason
19:39 lizmat ok, then there is no problem splitting them :-)  which I just did  :-)
19:40 hoelzro joined #perl6
19:40 rafl joined #perl6
19:40 tadzik good :)
19:41 masak pmurias: still, the main argument of that post is that JSON parsers should recognize (and ignore) comments.
19:42 Mouq pmurias: Oh, blah.
19:44 raiph joined #perl6
19:46 ssutch joined #perl6
19:47 aindilis joined #perl6
19:48 * masak reviews t3 solutions
19:49 slava joined #perl6
19:50 slava I compiled a C shared library (a very simple one) and generated a pir file for it using ncidef2pir.pl
19:50 slava I am lost at trying to load it in rakudo to be used by my code
19:50 slava the error I get is: get_attr_str() not implemented in class 'NQPMu'
19:50 slava the pir file is in one of the @*INC directories
19:51 slava I also tried searching google and couldn't find anything that outlines the process, and none of the existing libraries make any sense to me
19:54 masak slava: interesting problem.
19:54 PerlJam slava: I got lost at "C shared lib -> PIR".   Is there some reason you can't use zavolaj?
19:54 masak slava: Rakudo (and nqp) has been moving away from PIR in the past few years.
19:57 ggoebel joined #perl6
19:58 slava ahh
19:58 slava PerlJam: C -> so -> nci -> pir
19:58 slava masak: is there some reading I can do if I want to make a binding to a C library to be avaialble from rakudo?
19:58 PerlJam slava: yeah, but if you're trying to use a C lib with rakudo, the "best" answer is https://github.com/jnthn/zavolaj/
19:59 slava I see, looking at it now
20:00 dmol joined #perl6
20:00 masak aiiie, this submission doesn't do `$a >= $b`, it does `$a cmp $b ne 'Decrease'` o.O
20:00 masak that's the least idiomatic numeric comparison I've ever seen.
20:01 PerlJam Is there a prize for obfuscation? :)
20:01 colomon masak: you really shouldn't tempt #perl6 like that!
20:01 masak PerlJam: not from me!
20:01 slava I like that, much nicer than the pir nonesense :D
20:01 slava and easier, too
20:01 PerlJam slava: yep  :)
20:01 masak (pir nonsense)--
20:01 slava I was thinking of making a class to bind to libgit2 :)
20:01 masak zabolaj++
20:02 masak slava: ooh
20:02 masak slava: if you do, please publish on modules.perl6.org!
20:02 masak we'll all have fun with libgit2!
20:04 lizmat hmmm…. github down?
20:05 lizmat seems to be just a hickup
20:07 slava jnthn: saw your lightning talk, it is awesome! :)
20:07 masak lizmat: it hiccuped earlier today -- well, gist.github.com did.
20:07 slava jnthn++ also for the better regex engine
20:07 masak well, pmichaud did most of the better regex engine, I think.
20:07 masak unless you mean Grammar::Debugger and Grammar::Tracer.
20:07 slava wait, right
20:07 slava wait no
20:07 slava damn it
20:07 slava pmichaud++, his talk
20:07 slava I got confused :(
20:08 masak they're both awesome ;)
20:08 slava ok, got it
20:08 slava jnthn did the whole moarvm and jvm stuff
20:08 slava I get confused who did what cool thing
20:08 dalek roast: b1bdf8e | (Elizabeth Mattijsen)++ | S02-types/keybag.t:
20:08 dalek roast: Added todo test for my %h of KeyBag case
20:08 dalek roast: review: https://github.com/perl6/roast/commit/b1bdf8e6f3
20:14 ecocode joined #perl6
20:15 slava woo, got it to work, thanks jnthn :D
20:16 colomon slava++
20:16 slava for those that might care http://pastebin.com/MTi9ruYR
20:16 arnsholt slava: If you run into troubles with Zavolaj/NativeCall, feel free to give me a poke. I'm the current caretaker
20:16 slava what's the diff between { * } and { ... } ?
20:17 slava btw, my perl6 syntax knowledge is outdated and not complete at all
20:17 arnsholt Not much
20:17 slava haven't done anything in a while
20:17 ecocode left #perl6
20:17 PerlJam slava:  I think you want the first one for NativeCall stuff
20:18 arnsholt They'll give different error messages if your code accidentally calls the Perl 6 sub installed, rather than the C code
20:19 arnsholt I think jnthn decided that { * } gave the better error. But in theory you could put whatever you want inside the braces, I think =)
20:20 crab2313 joined #perl6
20:21 slava arnsholt: reading about structs, so if I was to make a binding to a library, I first need to set up all the structs and basically copy them over?
20:21 arnsholt Yeah
20:21 slava arnsholt: in that case, my mind begs a question, what do those braces mean there?
20:21 slava cool
20:22 slava arnsholt: I assume, this should work for any library, even those written in haskell? :P
20:22 arnsholt Not really
20:22 slava not even those that compile to .so ?
20:22 arnsholt Or, it'll only work for those libraries that are straightforwardly callable from C
20:23 arnsholt For example a C++ library isn't really possible, since the compiler will mangle the C++ names before putting them in the .so
20:23 arnsholt IIRC Haskell has to mangle as well
20:24 benabik Well, it would work for a C++ library to connect to extern "C" functions.
20:24 arnsholt And I think GHC at least uses non-standard calling convention
20:24 arnsholt Yeah, an extern "C" block would work
20:25 slava basically, if it can be called from C, it can be pulled in via NativeCall?
20:25 arnsholt Pretty much
20:26 slava that works
20:26 arnsholt That's essentially what I meant with "straightforwardly callable from C"
20:26 slava sorry for not reading that properly :(
20:26 slava thank you :D
20:26 arnsholt 'sok. It wasn't terribly clear in the first place =)
20:26 colomon you can certainly wrap a C++ library in C calls and then call them with Zavolaj.
20:26 ggoebel joined #perl6
20:29 masak huh -- Perl doesn't show up under "Language bindings", but Parrot does. http://libgit2.github.com/
20:30 PerlJam Aye.I believe that a GSoC student is/was working on libgit2 bindings for parrot
20:33 PerlJam And maybe no one told the libgit2 people that there's a Perl lib?
20:33 PerlJam or ... Perl is dead; haven't you heard?  ;>
20:36 Araq joined #perl6
20:39 masak Perl is dead, but Parrot is alive and well?
20:40 lizmat hmmm was the sketch wrong then?
20:41 tadzik ciekawe
20:41 tadzik ww :)
20:41 PerlJam masak: I dunno, but I can imagine that the reason that parrot shows up is that dukeleto is mentoring a student for GSoC to make libgit2 bindings and he conveyed this to the libgit2 people (or he's one of these people) and suggested that libgit2.github.com be updated to include parrot.
20:42 masak *nod*
20:42 ggoebel joined #perl6
20:43 * masak learned "ciekawe" :)
20:43 masak now that's an interesting word :P
20:43 tadzik :D
20:43 slava arnsholt: I also assume method food() is native will work in a class?
20:45 arnsholt No
20:45 arnsholt I haven't actually tried it, but you'll run into trouble with the invocant parameter, I think
20:46 PerlJam slava: a pattern I've used and seen others use is to have a "raw" module binding to subs and have a class wrapper than calls these subs.
20:46 slava arnsholt: what would be the proper way to build a Perl6 class (or should it be a module?) to abstract a library in it?
20:46 arnsholt The usual way to do it is to have my sub foo ... in the class and then wrap that in a Perl 6 method to interact with the Perl 6 world
20:47 slava that won't make the subs global?
20:47 slava I am concerned about polluting the global namespace
20:47 arnsholt Well, it'll only be in your class's namespace
20:47 benabik Isn't `my sub` scoped lexically?
20:47 arnsholt But subs are lexically scoped anyways, so they're only reachable if you export them
20:48 slava ahh, I see
20:48 slava reading S06 :)
20:50 arnsholt I have a semi-functional binding to ZMQ at https://github.com/arnsholt/Net-ZMQ
20:50 arnsholt That might serve as an example for some of this
20:51 * PerlJam looks to see how arnsholt dealt with zmq messages
20:52 arnsholt Not terribly well =)
20:52 PerlJam heh.  # XXX: Hack, hack, hack!
20:52 PerlJam :-)
20:52 arnsholt Yeah, that inlined array is ridiculously annoying
20:53 PerlJam I had looked at making a zmq binding too, but never got something that worked to my satisfaction
20:53 arnsholt If you want to improve Net-ZMQ you're more than welcome to a commit bit =)
20:54 arnsholt I think that would be useful now that we're on JVM and get some useful threading
20:54 arnsholt Part of the reason I started on that was that timotimo wanted to do ipython bindings, but he blocked on needing >1 thread IIRC
20:58 slava arnsholt: I also presume that NativeCall won't work on the jvm
21:01 jercos joined #perl6
21:04 dmol joined #perl6
21:07 Araq left #perl6
21:08 arnsholt slava: Not yet. I'm working on it =)
21:20 __rnddim__ joined #perl6
21:24 lizmat Q: is there a way to combine a slurpy with a named parameter in a signature?
21:24 cognominal joined #perl6
21:25 lizmat ( $test, *@items, :$into! ) does not cut it
21:25 lizmat I guess the slurpy eats the named parameter then
21:29 timotimo don't you just want to *%something?
21:29 denisboyun joined #perl6
21:31 lizmat hmmmm….  ok, something I can try  :-)
21:31 arnsholt lizmat: That's supposed to work, I think...
21:32 lizmat isn't it a bug that a single named parameter doesn't work then ?
21:32 lizmat I think I know why
21:32 lizmat jnthn's cheating in MMD  :-)
21:33 arnsholt r: sub foo(*@stuff, :$named) { say +@stuff; say $named; }; foo(1, 2, 3, :named<foo>);
21:33 camelia rakudo 52eceb: OUTPUT«3␤foo␤»
21:33 arnsholt r: sub foo(*@stuff, :$named!) { say +@stuff; say $named; }; foo(1, 2, 3, :named<foo>);
21:33 camelia rakudo 52eceb: OUTPUT«3␤foo␤»
21:33 arnsholt r: sub foo($one, *@stuff, :$named!) { say +@stuff; say $named; }; foo(1, 2, 3, :named<foo>);
21:33 camelia rakudo 52eceb: OUTPUT«2␤foo␤»
21:34 lizmat r: sub foo($test, *@stuff, :$named) { say $test; say +@stuff; say $named; }; foo({$_},1, 2, 3, :named<foo>);
21:34 camelia rakudo 52eceb: OUTPUT«Block.new()␤3␤foo␤»
21:34 lizmat hmmm… weird
21:35 dalek rakudo/nom: 1b5924c | (Elizabeth Mattijsen)++ | src/core/List.pm:
21:35 dalek rakudo/nom: Remove List.(classify|categorize), they're handled by Any
21:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b5924cb5e
21:40 __rnddim__ joined #perl6
21:44 lizmat r: sub foo($test, *@stuff, :$named!) { say $test; say +@stuff; say $named; }; foo({$_},1, 2, 3, :named<foo>);
21:44 camelia rakudo 52eceb: OUTPUT«Block.new()␤3␤foo␤»
21:45 lizmat r: multi foo($test, *@stuff, :$named!) { say $test; say +@stuff; say $named; }; foo({$_},1, 2, 3, :named<foo>);
21:45 camelia rakudo 52eceb: OUTPUT«Block.new()␤3␤foo␤»
21:46 arnsholt lizmat: What part of the code are you hacking on? Maybe it's secretly NQP code, rather than Perl 6?
21:47 lizmat Any.classify, hardly secret  :-)
21:47 arnsholt Probably not, then. Weird
21:49 lizmat maybe MMD is not working correctly yet that early in the setting
21:55 arnsholt Could be, I guess, but that sounds weird
21:56 masak 'night, #perl6
21:58 lizmat night masak!
22:00 zwut00 left #perl6
22:06 lizmat r: multi foo ($t, *@s, :$n) { say $n}; multi foo ($t, *@s) { say "no" }; foo({$_},1, 2, 3, :n<foo>);  # basically the problem golfed down
22:06 camelia rakudo 52eceb: OUTPUT«Ambiguous call to 'foo'; these signatures all match:␤:($t, *@s, :n(:$n))␤:($t, *@s)␤  in sub foo at /tmp/CSyE9rfkfU:1␤  in block  at /tmp/CSyE9rfkfU:1␤␤»
22:06 arcterus joined #perl6
22:07 lizmat and I think the problem here is that jnthn cheated on the MMD, only checking for the first 2 parameters
22:12 FROGGS joined #perl6
22:13 ssutch joined #perl6
22:20 dalek rakudo/nom: 656c8cb | (Elizabeth Mattijsen)++ | src/core/Any.pm:
22:20 dalek rakudo/nom: Added "into" named parameter to Any.(classify|categorize)
22:20 dalek rakudo/nom:
22:20 dalek rakudo/nom: Allows you to classify into an existing hash (into => %h), or have a type of
22:20 dalek rakudo/nom: hash created (into => Hash[Array,Int])
22:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/656c8cb8b9
22:28 zacts joined #perl6
22:35 skids joined #perl6
22:47 lizmat r: multi method a( %t, *@l ) { foo( -> $v { %t{$v} }, *@list ) }  # WAT? am I doing wrong here ?
22:47 camelia rakudo 1b5924: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in argument list; couldn't find final ')'â�¤at /tmp/DvvXvVvS7i:1â�¤------> [32m a( %t, *@l ) { foo( -> $v { %t{$v} }, *[33mâ��[31m@list ) }  # WAT? am I doing wrong here [0mâ�¤    expecting any of:â�¤        postf…
22:50 lizmat r: multi method a( %t, *@l ) { foo( -> $v { %t{$v} }, *@l ) }  # WAT? am I doing wrong here ?
22:50 camelia rakudo 1b5924: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in argument list; couldn't find final ')'â�¤at /tmp/EslBeuK3ls:1â�¤------> [32m a( %t, *@l ) { foo( -> $v { %t{$v} }, *[33mâ��[31m@l ) }  # WAT? am I doing wrong here ?[0mâ�¤    expecting any of:â�¤        postfix…
22:52 dalek rakudo/nom: bc379f6 | (Elizabeth Mattijsen)++ | src/core/KeyBag.pm:
22:52 dalek rakudo/nom: Added KeyBag.(classify|categorize)_list
22:52 dalek rakudo/nom:
22:52 dalek rakudo/nom: So that you can say @list.classify( &test, into => KeyBag )
22:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc379f6e91
22:53 arcterus lizmat: are you trying to do this?
22:54 arcterus multi method a(%t, *@l) { foo( -> $v, *@l { %t{$v} } ) }
22:56 lizmat no, the sub should only be called with the one parameter
22:56 lizmat by the subroutine
22:56 lizmat the rest of the parameters are the values on which the sub should work
22:58 arcterus what about this
22:59 arcterus multi method a(%t, *@l) { foo( -> $v { %t{$v} }, |@l) }
23:00 lizmat r: multi method a(%t, *@l) { foo( -> $v { %t{$v} }, |@l) }
23:00 camelia rakudo 1b5924: OUTPUT«Useless declaration of a has-scoped multi-method in mainlineâ�¤[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    foo used at line 1â�¤â�¤Â»
23:01 lizmat I'll try it nonetheless in the actual situation after the running spectest is done
23:01 arcterus k
23:09 lizmat arcterus: that compiles
23:10 lizmat testing...
23:10 arcterus cool.
23:11 lizmat but tests fail
23:11 lizmat :-(
23:13 lizmat giving up for today: it was just a code optimization anyway...
23:13 * lizmat submits rakudobug
23:14 mtk joined #perl6
23:15 lizmat gnight #perl6!
23:15 colomon \o
23:17 BenGoldberg joined #perl6
23:20 BenGoldberg rn: gather { take 1..Inf; 'reached'.say }[0].say
23:20 camelia rakudo bc379f: OUTPUT«1␤»
23:20 camelia ..niecza v24-88-g1f87209: OUTPUT«1..Inf␤»
23:20 BenGoldberg rn: gather { take 1..Inf; 'reached'.say }[1].say
23:20 camelia rakudo bc379f: OUTPUT«reached␤2␤»
23:20 camelia ..niecza v24-88-g1f87209: OUTPUT«reached␤(Any)␤»
23:20 BenGoldberg p: gather { take 1..Inf; 'reached'.say }[0].say
23:20 camelia pugs: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize -RTS' to increase it.␤»
23:33 benabik joined #perl6
23:38 zacts will parrot eventually also run perl5?
23:39 timotimo the future of parrot isn't very clear at the moment; in theory you could use the rakudo-v5 module on rakudo-parrot, but it's far from complete and will never support XS
23:41 zacts timotimo: are there any practical alternatives to parrot in the brew for perl6?
23:44 timotimo yes, rakudo already runs rather well on the JVM (and that is with important optimization bits still missing) and MoarVM is coming up with a much better perl5 integration scheme than parrot had so far
23:44 timotimo there is also blizkost, which i haven't tried yet, which is some kind of perl5-interop on top of rakudo-parrot
23:47 zacts I read this: http://anonymoushash.vmbrasseur.com/2013/07/22/the-rising-costs-of-aging-perlers-part-1-the-data/
23:47 zacts and it got me thinking about how perl6 and its implementation can be an important thing for the future of perl, even for perl5
23:48 zacts I've heard that perl5 interpreter source code is nutty.
23:50 * timotimo is new to perl in general and went straight to perl6
23:51 benabik joined #perl6
23:51 timotimo and now i'm going straight to bed :) good night
23:52 zacts gn
23:54 crab2313 joined #perl6
23:58 BenGoldberg zacts: Do you have perl6 installed?

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

Perl 6 | Reference Documentation | Rakudo