Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-10-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:06 btyler joined #perl6
00:09 TeaserASA joined #perl6
00:13 raiph joined #perl6
00:13 lue grondilu: that won't work for S26.
00:14 sftp joined #perl6
00:15 grondilu Indeed.  I don't read it often anyway.  When I do I just read it in Vim.
00:18 Psyche^ joined #perl6
00:18 lue .oO(That's surprising. I was just reading about conspiracy theories, and clicked on a link to a high-res picture of the face on Mars. I got redirected to notice.usa.gov)
00:20 grondilu my 02:15 comment sounds so much like a meme, I can't resist:  http://memecrunch.com/meme/SKM2/p​od2man-can-t-parse-s26/image.png
00:21 rjbs- grondilu: dork :)
00:25 lue Vim is good. If you're stranded on a deserted island without a GUI or gnu in sight. Then it's passable :) .
00:27 diakopter bwahaha.
00:27 grondilu lue: what editor do you use?
00:28 * grondilu installed padre but couldn't get used to it.
00:28 diakopter Notepad++, thanks for asking :)
00:29 grondilu that windows stuff :/
00:29 lue Editor MACroS
00:29 grondilu emacs is too heavy, imho.  And the name is longer.
00:31 lue I personally could never get into vim (although it is the best editor I have for quick in-terminal file edits). If this IRC client were Vim, I'd have to remember to press 'r' for RESPOND MODE, for instance :)
00:32 Oflameo left #perl6
00:32 grondilu Well, Vi is a text editor.  It has no ambition to be used as a IRC client.
00:32 lue Also what may help you understand my viewpoint is that I think the Space Cadet keyboard looks Unbelievably Awesome™ :)
00:33 lue grondilu: I know. I was making a joke about how I have to explicitly enter a mode before doing what the program's designed to do (in Vi's case, INSERT MODE)
00:34 lue [ and I've been sure to have judicious use of smileys to keep my words from sparking a Holy War :) ]
00:35 ivanshmakov joined #perl6
00:35 grondilu I think at some point we get so used to using our prefered editor, that the idea of using any other one seems absurd.  To me for instance pressing 'i' or 'o' to enter insert mode is completely natural.
00:37 lue Yeah. Like I said, I do use vim for quick in-terminal edits [ principally when the edit isn't worth the small effort to switch to my emacs window :) ], but I suppose I like emacs enough now that I feel no need to learn vim much.
00:37 lue I will say though: vim has far better Perl 6 support at the moment. /me should get back to his perl6-mode for emacs sometime.
00:38 grondilu what kind of support, apart from syntax hilighting?
00:38 grondilu (which doesn't even work so well, at least for long files)
00:40 lue The syntax hilighting :) . cperl-mode, the only mode aside from mine offering any kind of support for Perl 6, is utter crap. (I've somehow broken it to the point where typing an OPENING BRACE causes a lisp error :| . Perhaps it was always broken, but I didn't notice before making ELisp errors fatal)
00:40 lue Also: typing \s+ in your regex code somehow is interpreted as starting a subst pattern, and breaks highlighting there.
00:41 grondilu can't emacs read a vim syntax file?
00:41 lue (I could go on, but it's been a while since I've willingly subjected myself to CPerl.) My point is, the vi hilighter isn't perfect (far from), but at least from my POV it's better.
00:42 geekosaur cperl-mode has always been narsty
00:42 geekosaur handy when it works, but narsty
00:42 lue grondilu: I'd be surprised if no-one's coded a vi-hilighter for emacs yet. I haven't really looked though.
00:42 lue Again, I should pick up my perl6-mode again, and get it doing more.
00:43 c1sung joined #perl6
00:43 grondilu what would be nice would be a perl6-capable ctags.
00:43 grondilu Though I understand that would be tough.
00:43 sftp joined #perl6
00:43 lue geekosaur: I believe once, while going through the shipped elisp, I found what I think was a "convert code to webpage with hilighting" file. There was a specific piece of code in there to work around CPerl because it apparently gets stubborn about its custom colors.
00:44 geekosaur it kinda has to
00:44 lue (also: use of non-standard colors to highlight non-essential distinctions. IMO there's no need to highlight an @array different from a %hash or $scalar.)
00:45 lue If you can't tell, I'm kinda done with CPerl as something that's "good". :)
00:46 geekosaur (what is actually happening is that emacs' font lock support is ridiculously inadequate for Perl, so it does it all itself. which means that other stuff that expects to be able to hook emacs' font lock mechanisms generally fails with it, because it doesn't bother with the hooks.)
00:46 lue .oO(Sure, I could let Lisp errors be non-fatal like before, and then have CPerl not die when invoking -electric- functions, but I shouldn't have to.)
00:47 lue I've yet to get to the part coding my p6-mode where I've run into problems with font-lock (except embedded comments. Those definitely have to be outside the realm of provided font-lock stuff).
00:48 lue Sometimes when I think about my mode again, I realize that it'd be easier if I could just parse the source file with Perl 6 :)
00:48 colomon ;)
00:48 lue (esp. with how Perl 6 has a few "sub"-languages: pod, Regex, Q, etc.)
00:52 lue Any situation involving the entire selection of Unicode brackets will be Pure Fun® when I eventually get to it. (My first naïve attempt at a p6-mode focused on correctly parsing and highlighting embedded comments, by way of keeping a hard-coded list of all open/close pairs possible. It should surprise no-one that this initial attempt caused emacs to lag :P)
00:54 * lue &
01:24 benabik joined #perl6
01:26 stephenwan joined #perl6
01:45 Mouq r: say [1,2,3].combinations
01:45 camelia rakudo a10341: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method combinations at src/gen/CORE.setting:7869␤  in block  at /tmp/46tStGAs5U:1␤␤»
01:45 Mouq Shouldn't combinations and permutations default to *-1?
01:45 Mouq Well, *ought't?
01:45 FROGGS_ joined #perl6
01:49 dalek perl6-roast-data: 0019802 | coke++ | / (5 files):
01:49 dalek perl6-roast-data: today (automated commit)
01:49 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/0019802055
01:54 Vlavv` joined #perl6
01:55 dalek nqp: c0c8267 | coke++ | t/docs/opcodes.t:
01:55 dalek nqp: test for parrot opcodes
01:55 dalek nqp:
01:55 dalek nqp: Improve test for finding documented opcodes
01:55 dalek nqp: review: https://github.com/perl6/nqp/commit/c0c8267571
01:55 dalek nqp: 2b99f92 | coke++ | docs/ops.markdown:
01:55 dalek nqp: fix formatting. Mark async opcode as experimental
01:55 dalek nqp: review: https://github.com/perl6/nqp/commit/2b99f92b87
01:59 Mouq [Coke]++ # moar documentation
01:59 Vlavv` joined #perl6
02:24 lue Mouq: I'd say that's a reasonable default.
02:26 Mouq r: say <4 5 6>[]
02:26 camelia rakudo a10341: OUTPUT«4 5 6␤»
02:27 prevost joined #perl6
02:33 dalek nqp: 65cb592 | coke++ | docs/ops.markdown:
02:33 dalek nqp: doc some file opcodes
02:33 dalek nqp: review: https://github.com/perl6/nqp/commit/65cb592685
03:05 preflex joined #perl6
03:06 BenGoldberg All this opcode documentation... how much of it could be autogenerated?
03:07 BenGoldberg Obviously not the text, but all of the argument variations which have the same base name...
03:17 Mouq BenGoldberg: see t/docs/opcodes.t : I'm guessing the argument variations wouldn't be too much of a stretch…
03:21 BenGoldberg :)  Right... so why not write a program which looks at the docs, finds where in them there's a list of argument variations, looks at the code, makes a list of actual implemented argument variations, and supplements the list in the docs with any that are in the code but unmentioned in the docs.
03:22 Mouq BenGoldberg: Well volunteered! :)
03:23 BenGoldberg erm...
03:25 Mouq Heh ;)
03:28 BenGoldberg I don't understand perl6 (or nqp) well enough to do it.
03:33 BenGoldberg I'm happy enough to try to find bugs...
03:33 BenGoldberg rn: my @foo := gather {}[0]; say @foo;
03:33 camelia niecza v24-95-ga6d4c5f: OUTPUT«(Any)␤»
03:33 camelia ..rakudo a10341: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Any'␤  in block  at /tmp/ydICRHOCKb:1␤␤»
03:34 berekuk joined #perl6
03:38 raiph joined #perl6
03:55 gattschardo joined #perl6
04:01 preflex joined #perl6
04:03 Mouq "Could not find sub cuid_325_1380772919.56994" -- my favorite kind of error message
04:09 TimToady the default for combinations is 0..* (autostopping on the size of the list)
04:10 TimToady so <a b c>.combinations starts with () and ends with ('a','b','c')
04:16 Mouq r: <a b c>.list.combinations.say # ...
04:16 camelia rakudo a10341: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method combinations at src/gen/CORE.setting:7869␤  in block  at /tmp/_NVB1FZPKL:1␤␤»
04:16 Mouq (checking)
04:17 Mouq *was checking. Currently trying to bend NQP to my will
04:23 TimToady anyway, default is documented at S32/Containers:616
04:26 * lue wonders if synopsebot will respond to S32::Containers:616
04:26 Mouq S32:616(Containers)
04:26 synopsebot Link: http://perlcabal.org/syn/S32.html#line_616
04:27 Mouq idk
04:27 diakopter Mouq++
04:27 diakopter wb Syno Psebot
04:28 lue diakopter: nope, almost though
04:28 TimToady that seems wrongish though
04:28 lue (S32.html !~~ defined)
04:28 diakopter S99999999999999:9999999999999
04:28 synopsebot Link: http://perlcabal.org/syn/S999999​99999999.html#line_9999999999999
04:29 diakopter .oO( that's quite a few synopse's
04:29 diakopter )
04:29 xinming joined #perl6
04:30 lue wait, why does permutations not accept any arguments? I could swear nPr was an infix operator...
04:34 lue (not that nPr is what .permutations does, but still. What if I just want all possible 3-element lists of 0..9, respecting order?)
04:35 rindolf joined #perl6
04:37 eiro joined #perl6
04:40 dalek nqp/proto-inner: 33fe530 | Mouq++ | src/QRegex/P6Regex/Grammar.nqp:
04:40 dalek nqp/proto-inner: Update obsolete proto-regex syntax in P6Regex
04:40 dalek nqp/proto-inner:
04:40 dalek nqp/proto-inner: ( If anything should be up-to-date on S05… )
04:40 dalek nqp/proto-inner: review: https://github.com/perl6/nqp/commit/33fe530382
04:40 dalek nqp/proto-inner: 26c85b4 | Mouq++ | src/ (3 files):
04:40 dalek nqp/proto-inner: Non-functional sketch of proto regex with pre- and post- matches
04:40 dalek nqp/proto-inner:
04:40 dalek nqp/proto-inner: I.e., proto rule foo { 'bar' {*} 'baz' }
04:40 dalek nqp/proto-inner: as per S05:1330
04:40 dalek nqp/proto-inner: Builds and doesn't break anything
04:40 synopsebot Link: http://perlcabal.org/syn/S05.html#line_1330
04:40 dalek nqp/proto-inner: review: https://github.com/perl6/nqp/commit/26c85b4bef
04:41 Mouq Someone can definitely take that and work on it.
04:41 Mouq I need to go to bed
04:41 Mouq 'night #perl6++
04:41 lue good ♞ then Mouq o/
05:04 berekuk joined #perl6
05:18 rindolf joined #perl6
05:31 rindolf joined #perl6
06:09 aindilis joined #perl6
06:11 SamuraiJack_ joined #perl6
06:17 clkao joined #perl6
06:21 iSlug joined #perl6
06:27 [Sno] joined #perl6
06:32 kaleem joined #perl6
06:37 [Sno] joined #perl6
06:41 dmol joined #perl6
06:48 ssutch joined #perl6
07:04 zakharyas joined #perl6
07:10 FROGGS joined #perl6
07:12 sjn arnsholt: hey, I hoped to see you at Oslo.pm yesterday; talk about Perl6 @ uio
07:14 darutoko joined #perl6
07:18 arnsholt Yeah, had to do other stuff, unfortunately
07:34 sjn arnsholt: let's continue in #oslo.pm; I have some news
07:35 fhelmberger joined #perl6
07:41 jnthn morning o/
07:41 yoleaux 04:31Z <diakopter> jnthn: interestingly, after optimization, only 0.04% of time is spent in the compunit loading... o_O
07:41 FROGGS morning
07:42 jnthn Well, that's not much :)
07:42 jnthn ...depending on the context :)
07:42 lizmat good *, #perl6!
07:43 iSlug joined #perl6
07:48 jnthn FROGGS: Seems the remaining cursless failures are thanks to <?before ...> switches...afaict, anyway
07:48 FROGGS yeah, I was fearing that...
07:48 FROGGS jnthn: mast/nom was merged in?
07:48 FROGGS master*
07:48 jnthn yeah
07:48 jnthn Well, I've got merges locally of this stuff
07:49 FROGGS k, so I'll fix it so we get a clean spectest run
07:49 jnthn Well
07:49 FROGGS ahh, okay
07:49 jnthn I can maybe do it here also
07:49 jnthn I'll push the NQP merge
07:49 jnthn Then triage the Rakudo and bump it
07:49 FROGGS this must be applied again: https://github.com/rakudo/rakudo/commit/b9bebcca25
07:50 FROGGS and there are two other <?[...]> which contain a hash-sign which must be tweaked I think
07:51 FROGGS it is a public holiday here today so I have enough time now to fix that
07:52 lizmat ah, Reunification Day ?
07:52 jnthn ok, got for that
07:52 dalek Heuristic branch merge: pushed 16 commits to nqp by jnthn
07:53 FROGGS lizmat: and my grandmom's birthday :o)
07:54 lizmat cool!  must have been a great birthday gift for your grandmom 24 years ago!
07:58 FROGGS well, she had seen much much worse times, so I'm not sure it was soo bad fer her in the GDR
07:59 FROGGS she had a house and a garden so it was basically all what she needed
08:00 FROGGS jnthn: you are merging it to master?
08:00 jnthn FROGGS: I merged cursless in NQP into nqp/master
08:00 FROGGS k
08:00 jnthn FROGGS: So now it's just Rakudo to triage
08:03 dalek Perlito: b9edaad | (Flavio S. Glock)++ | / (6 files):
08:03 dalek Perlito: Perlito5 - perl6 - create html/perlito5to6.html and "make build-5to6browser"
08:03 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/b9edaadbb2
08:07 fglock joined #perl6
08:08 fglock I created a web page for the perl5-to-perl6 translator
08:08 fglock this is very early code, it doesn't clean up extra parenthesis and there are bugs everywhere
08:08 fglock http://perlcabal.org/~fglock/perlito5to6.html
08:09 ssutch joined #perl6
08:10 FROGGS fglock: how does that work? you are compiling to an ast and then generate perl6 code?
08:11 FROGGS I can't imagine that this would work with QAST
08:11 FROGGS maybe you would take the match objects...
08:11 fglock yes, it is a normal compiler
08:11 FROGGS fglock: this is pretty awesome!
08:12 fglock the perl5 to perl6 compiler, compiled to javascript
08:14 fglock hmm - $^O didn't interpolate correctly
08:14 fglock ah, no - it did
08:15 fglock it's a mix up of perl5 and perl6 - need more work :P
08:16 FROGGS r: say chr(15)
08:16 camelia rakudo a10341: OUTPUT«␤»
08:18 fglock it is $^O = ${ chr(15) } = in perl6 $( chr(15) ) which doesn't make sense
08:21 Woodi joined #perl6
08:27 FROGGS p5eval: ${ chr(15) }
08:27 p5eval FROGGS: linux
08:27 FROGGS interesting
08:27 jnthn wtf :)
08:28 FROGGS jnthn: we totally need that in perl 6  :P
08:28 jnthn :P
08:29 jnthn r: multi chr(15) { 'linux' }; say $(chr(15))
08:29 camelia rakudo a10341: OUTPUT«linux␤»
08:29 jnthn Done. :P
08:30 jnthn OK, so that unspace fix helped. Reduction meta-ops are busted now, though...
08:31 FROGGS /home/froggs/dev/rakudo/src/Perl6/Grammar.nqp:418:    token spacey { <?[\s\#]> }
08:31 FROGGS /home/froggs/dev/rakudo/src/Perl6/Grammar.nqp:451:        \\ <?before <[\s\#]> >
08:31 FROGGS /home/froggs/dev/rakudo/sr​c/Perl6/Grammar.nqp:4039:        token escape:ws { \s+ [ <?[\#]> <.ws> ]? }
08:31 FROGGS not more than these should be wrong...
08:32 FROGGS I'd fix it too if you pushed to nom
08:32 jnthn hmm
08:32 FROGGS or to another branch
08:32 jnthn think I'll just merge nom into cursless and we can work on it there
08:33 FROGGS yeah, so I can do something :o)
08:33 jnthn Wasn't expecting this much to fix...
08:33 FROGGS how many fails?
08:33 FROGGS or do you mean the merge?
08:34 dalek Heuristic branch merge: pushed 21 commits to rakudo/cursless by jnthn
08:34 jnthn no, spectest
08:35 FROGGS k
08:35 dalek rakudo/cursless: 0029ea5 | jnthn++ | src/Perl6/Grammar.nqp:
08:35 dalek rakudo/cursless: Undo before removal in unsp.
08:35 dalek rakudo/cursless: review: https://github.com/rakudo/rakudo/commit/0029ea5276
08:35 jnthn reduce is the bothersome one
08:36 dalek Perlito: eae6843 | (Flavio Glock)++ | / (2 files):
08:36 dalek Perlito: Perlito5 - perl6 - fix $^O variable
08:36 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/eae6843a1d
08:36 fglock ... ' running in ' ~ ($?VM)
08:37 FROGGS r: say $*OS # larry will kill me :P
08:37 camelia rakudo a10341: OUTPUT«linux␤»
08:38 fglock should it use $*OS ? I've got the $?VM from here - http://doc.perl6.org/language​/variables#Special+Variables
08:38 REPLeffect joined #perl6
08:39 fglock I'll change
08:40 fglock jnthn: multi chr(15) ... that could be used to build a compatibility layer :)
08:43 dalek Perlito: 0d6f509 | (Flavio Glock)++ | / (2 files):
08:43 dalek Perlito: Perlito5 - perl6 - fix $^O variable more
08:43 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/0d6f509d9f
08:48 jnthn FROGGS: Found the pattern in what's up, I think
08:49 jnthn FROGGS: <?[...]> with both a cclass thing and a enumcharlist thing get made into an altseq, which LTM ignores.
08:50 FROGGS yes, I think I had an issue with <?[\s\#]>
08:50 FROGGS but I thought this was fixed...
08:51 dalek rakudo/cursless: ecc836b | jnthn++ | src/Perl6/Grammar.nqp:
08:51 dalek rakudo/cursless: Undo a before to cclass that busts LTM.
08:51 dalek rakudo/cursless: review: https://github.com/rakudo/rakudo/commit/ecc836bf7d
08:51 FROGGS still need to wait for the spectest run...
08:51 jnthn FROGGS: It works
08:51 jnthn But doesn't LTM properly
08:51 jnthn FROGGS: Above fixes the reduce issue
08:52 FROGGS jnthn: awesome!
08:52 FROGGS I would like to fix that in nqp then though... how can I check that something does LTM properly?
08:52 jnthn std: my @array; @array.min:{ $^a <=> $^b }
08:52 camelia std 4cde04e: OUTPUT«ok 00:00 44m␤»
08:53 FROGGS just an alternation with <?[...]> inside?
08:53 jnthn rn: my @array = 5,-3,7,0,1,-9; say @array.min:{ $^a <=> $^b }
08:53 camelia rakudo a10341, niecza v24-95-ga6d4c5f: OUTPUT«-9␤»
08:54 jnthn That parses wrong now without a space after the : ...
08:55 yogan joined #perl6
08:57 jnthn ah, found it
08:58 FROGGS token spacey { <?[\s#]> } ?
08:58 jnthn no, the one in methodop
08:59 FROGGS <?[\s{]>
08:59 FROGGS yeah
08:59 FROGGS I need a faster computer :o(
08:59 FROGGS there are a few other candidates... token infix:sym«!=»   { <sym> <?[\s\]]> <O('%chaining')> }
09:00 jnthn I fixed taht one in the last commit
09:00 FROGGS you pushed?
09:00 FROGGS ... t/spec/S12... *sigh*
09:02 jnthn That one was in ecc836b yeah
09:03 FROGGS ahh, I was thinking you are talking about the "candidate"
09:03 FROGGS wait
09:03 FROGGS nvm
09:03 jnthn r: m-b-
09:03 camelia rakudo a10341: OUTPUT«Cannot call 'match'; none of these signatures match:␤:(Cool:D : $target, *%adverbs)␤  in method match at src/gen/CORE.setting:3370␤  in block  at /tmp/Su_qsHJgPp:1␤␤»
09:05 FROGGS these might all be problematic: https://gist.github.com/FR​OGGS/80bc4940327cb6d395e7
09:06 jnthn no, there has to be a \s -like thing that compiles to cclass *AND* and enumcharlist thing in the same <?[...]> for it to be a problem
09:06 jnthn That's only true of spacey in that list
09:07 jnthn ah, and the methodop one which I already caught here
09:07 jnthn eeks
09:07 jnthn std: m-b-
09:07 camelia std 4cde04e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Bogus term at /tmp/FNZczCymJb line 1 (EOF):â�¤------> [32mm-b-[33mâ��[31m<EOL>[0mâ�¤Undeclared routine:â�¤       'm-b' used at line 1â�¤Parse failedâ�¤FAILED 00:00 42mâ�¤Â»
09:08 jnthn std: m'b'
09:08 camelia std 4cde04e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/SoZG4HlTuC line 1:â�¤------> [32mm'b[33mâ��[31m'[0mâ�¤    expecting any of:â�¤  POSTâ�¤   argument listâ�¤  feed_separatorâ�¤ infix or meta-infixâ�¤    infixed functionâ�¤       postcircumfixâ�¤  postfixâ�¤        postfix_prefix_meta_operatorâ�¤
09:08 camelia ..postop␤ st…»
09:08 jnthn n: m'b'
09:08 camelia niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Confused at /tmp/DnYjxFFeyS line 1:â�¤------> [32mm'b[33mâ��[31m'[0mâ�¤â�¤Undeclared routine:â�¤       'm'b' used at line 1â�¤â�¤Parse failedâ�¤â�¤Â»
09:08 jnthn n: m-b-
09:08 camelia niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Bogus term at /tmp/W7iIKGyiI7 line 1 (EOF):â�¤------> [32mm-b-[33mâ��[31m<EOL>[0mâ�¤â�¤Undeclared routine:â�¤  'm-b' used at line 1â�¤â�¤Parse failedâ�¤â�¤Â»
09:08 FROGGS std: m-b-c
09:08 camelia std 4cde04e: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'm-b-c' used at line 1�Check failed�FAILED 00:00 41m�»
09:08 jnthn OK, so *that* spectest failure is simply t/spec being wrong.
09:08 FROGGS std: m'b'c
09:08 camelia std 4cde04e: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'm'b'c' used at line 1�Check failed�FAILED 00:00 41m�»
09:08 jnthn There are tests that expect you can use ' and - as regex delimeters
09:09 FROGGS ' and - is not allowed to be at the dn/beginning
09:09 FROGGS ahh
09:09 jnthn Before the <apostrophe> LTM fix you could (wrongly, it appears) do so in Rakudo
09:09 FROGGS I think I made that working
09:09 FROGGS at least the usage of \W as delim
09:09 jnthn Yes, it's fine in general, but not wiht those two. :)
09:09 FROGGS but yes, ' and - as delim should not work
09:10 FROGGS that is a problem in perl5, you can't call a sub named m
09:10 tadzik sub bus
09:11 jnthn convergence++
09:11 jnthn sub way
09:11 dalek roast: 7c5ddf1 | jnthn++ | S05-metasyntax/delimiters.t:
09:11 dalek roast: Remove tests that STD/Niecza disagree with.
09:11 dalek roast:
09:11 dalek roast: Rakudo will also, after cursless branch merges.
09:11 dalek roast: review: https://github.com/perl6/roast/commit/7c5ddf15b1
09:12 jnthn So, now down to S05-mass/named-chars.t I think.
09:12 iSlug joined #perl6
09:13 jnthn not ok 374 - Negative charclass hex \X[2724] match
09:13 jnthn The fails all look like that
09:13 FROGGS yeah, I see it too
09:16 jnthn think I see it
09:16 jnthn jnthn--
09:16 FROGGS O.o
09:19 timotimo o_O
09:20 FROGGS I believe stage parse dropped from about 160s to 145s
09:20 FROGGS I should really benchmark that
09:21 timotimo good idea. so sad it will take about 3 minutes each time, though :(
09:22 arnsholt jnthn: OOC, what's the cursless refactor refactoring? Something will stop using cursors or summat?
09:23 FROGGS arnsholt: yes, you have to pull out your mouse to not have a cursor :P
09:23 FROGGS I've taped my touchpad fwiw
09:23 jnthn arnsholt: Yes, it greatly reduces the number of Cursor allocations
09:23 timotimo my mouse has a on/off switch at the bottom
09:23 timotimo and the cable is removable, too
09:23 arnsholt Ah, right. So not cursor-less, but less cursors
09:23 jnthn arnsholt: Right
09:24 jnthn About 50%-60% or so of what we had before for CORE.setting parse, for example
09:24 FROGGS 50-60% less?
09:24 jnthn FROGGS: No
09:24 FROGGS k
09:24 timotimo no, 40-50% less
09:24 jnthn Right :)
09:25 arnsholt Oh, nice! I assume that gives at non-zero speed increase in setting compilation?
09:25 timotimo yes, but also not nearly close to 50%
09:25 jnthn Yeah, though it's not a huge increase
09:26 jnthn Which tells us a few things.
09:26 jnthn oh noes, github fail
09:26 arnsholt Yeah, that's interesting
09:26 timotimo another piece of the puzzle was that the line pos cache was rebuilt each time a compile_in_context was used (which was 137 times in the core setting)
09:26 timotimo but i'm not sure if the fix for that is in any branch right now
09:27 FROGGS I have seen the commit
09:27 jnthn timotimo: You got the patch handy
09:27 jnthn ?
09:27 * jnthn hasn't...
09:27 timotimo github is down, yes?
09:27 jnthn Something's wrong, but I just managed to push at least
09:27 timotimo ah, it still exists
09:28 jnthn Though, dalek didn't report it so something is up
09:28 nwc10 its website was slow to load for me
09:28 timotimo http://pastebin.com/ZvzwmPhe
09:28 FROGGS maybe this one, but I can't fetch the site: https://github.com/perl6/nqp/commit/5f7801861b
09:28 jnthn status.github.com says the exception rate just skyrocketed...
09:29 timotimo that happens when you deploy 50-odd times a day :P
09:31 jnthn timotimo: Thanks, will work on getting that patch in.
09:36 jnthn arnsholt: What's the status of NativeCall stuff on JVM, ooc?
09:40 diakopter FROGGS: that github link worked for me
09:41 * jnthn still can't push
09:42 diakopter push harder?
09:42 jnthn error: unknown option `harder'
09:45 SamuraiJack__ joined #perl6
09:46 arnsholt jnthn: Stalled, trying to figure out the get_boxed_ref stuff
09:46 jnthn arnsholt: ah, hm
09:46 cognominal joined #perl6
09:46 jnthn arnsholt: I suspect NativeCall is the major thing for a JVM Star now...
09:47 arnsholt Basically, they way it's implemented/works on Parrot is at odds with how box targets work on JVM
09:47 jnthn Flattening multi-field things into P6opaques probably ain't gonna work too well on JVM...
09:47 fglock joined #perl6
09:47 crazedpsyc joined #perl6
09:48 jnthn So yeah, we'll have to do it a bit different.
09:48 arnsholt Yeah
09:48 arnsholt Problem is that the way it works on Parrot means we really want something like a Map<REPR, SixModelObject>
09:48 Timbus joined #perl6
09:49 jnthn arnsholt: Yeah.
09:49 jnthn arnsholt: Something along those lines would do it.
09:49 arnsholt But that doesn't play along too nice with the JVM inverted approach where each flattened REPR injects fields and methods
09:50 jnthn Well, it's more like we want a Map<REPR, Integer> or so which specifies the slot to getattr
09:50 arnsholt Yeah
09:50 hugme joined #perl6
09:50 jnthn FROGGS: OK, I'm happy enough cursless can merge, I think...
09:51 jnthn Just pusehd the final fix there but dalek seems unreporting...
09:52 timotimo cool. so what else can we just allocate less of?
09:53 arnsholt I guess P6OpaqueBaseInstance could have a Map<REPR, Something> we could use to dig out what we want, but that'll add an awful lot of Maps
09:53 * JimmyZ wonders the ?% time of compiling core.setting
09:56 timotimo oh that sounds nice, we could just allocate less time for parsing and such!
09:57 jnthn arnsholt: no, not per instance...it'd go in REPR data
09:57 jnthn arnsholt: If it's the slot index it's the same for everything
09:57 lizmat_ joined #perl6
09:58 jnthn timotimo: Currently building with the linepos patches
09:58 jnthn arnsholt: Is the current progress pushed somewhere?
09:58 arnsholt jnthn: Oh, that's a good point. Not quite as terribly expensive
09:59 arnsholt nqp/nativecall-jvm is in sync with my local changes I think
09:59 arnsholt Nothing there about this though, since I've been stuck on the design part of it
10:00 jnthn ok
10:00 jnthn timotimo: With that I have lowest CORE.setting time I've seen in a good while on JVM
10:00 jnthn timotimo: for parse phase
10:01 jnthn FROGGS, timotimo: cursless is merged to nom and pushed
10:02 timotimo \o/
10:03 moritz \o
10:03 jnthn .oO( /nick dalek )
10:05 daxim joined #perl6
10:05 jnthn timotimo: your linepos patch is in NQP (+ using it in NQP::World) and Rakudo
10:08 jnthn nwc10: CORE.setting build should have a bit less GC churn now; may help on smaller systems
10:08 timotimo ah, NQP::World? i didn't find any usage of compile_in_context there, and i didn't have the presence of mind to search for .compile
10:09 jnthn ;)
10:09 * jnthn did
10:10 * jnthn does a little Rakudo debugger work, to see if he can make any progress towards having it on JVM also
10:11 jnthn warnings because we deprecated .exists :(
10:14 diakopter you folks seen this? hotness. http://runnable.com/
10:16 jnthn tadzik: Please can .exists usage in Term::ANSIColor be fixed (or I'll accept a commit bit to do it :))
10:16 jnthn s/fixed/updated/
10:16 tadzik jnthn: sure
10:19 tadzik jnthn: you are now a Collaborator
10:19 jnthn tadzik: Thanks!
10:19 tadzik Thank you :)
10:19 moritz .oO( your now Conspirator )
10:20 jnthn now if only I could get at github...
10:25 gfldex joined #perl6
10:25 FROGGS still benchmarking.... I'll compare the almost up-to-date version to 2013-09
10:27 moritz https://status.github.com/ "
10:27 moritz 10:20 UTC The site is unavailable as we continue mitigating a large DDoS attack.
10:27 moritz "
10:29 FROGGS jnthn: see? they think you're attacking them
10:29 * FROGGS .oO( "That can't be something human-ish!" )
10:29 jnthn I don't commit *that* fat :P
10:29 * moritz was just able to git pull a rakudo
10:29 jnthn *fast
10:29 jnthn yeah, it sometimes works...
10:30 FROGGS 7/10 rakudo recompile completed
10:31 moritz wow, new error message while pulling from github: "No route to host"
10:32 Woodi joined #perl6
10:35 lizmat_ p5eval: sub m { "hello" }; &m
10:35 p5eval lizmat_: hello
10:36 jnthn hello, lizmat :)
10:36 lizmat .oO( you *can* call a sub called "m" in perl 5 )
10:39 lizmat p5eval: sub m { "hello" }; m()  # just not this way
10:39 p5eval lizmat: 1
10:48 FROGGS r: say ([+] 140.925, 138.979, 138.785, 138.639, 138.615, 139.286, 140.331, 139.872, 140.185) / 10
10:48 camelia rakudo a10341: OUTPUT«125.5617␤»
10:48 FROGGS r: say ([+] 140.925, 138.979, 138.785, 138.639, 138.615, 139.286, 140.331, 139.872, 140.185) / 9
10:48 camelia rakudo a10341: OUTPUT«139.513␤»
10:48 FROGGS today's rakudo's stage parse
10:49 FROGGS 2013.09 comes in a few hours :o)
10:50 lizmat .oO( odd that we don't have a method .avg ?)
10:50 FROGGS I guess it will be specced within hours too :P
10:52 lizmat 10:48 UTCWe're working to re-establish connectivity after the attack disrupted our primary internet transit links.
10:53 FROGGS 2013.09's first stage parse completed in 156.949
10:53 FROGGS that is 15%-something
10:54 lizmat r: say 100 - 14000/157
10:54 camelia rakudo a10341: OUTPUT«10.828025␤»
10:54 lizmat more like 11  :-(
10:54 lizmat but I'l take it!
10:55 lizmat that's at least 15 minutes saved / day for me
10:56 colomon lizmat: surely it should be mean instead of avg?  not that we have mean....
10:56 lizmat .oO( and so the bikeshedding starts  :-)
10:56 lizmat I guess that's the reason it's not in there  :-)
10:57 colomon that and it's a one-liner
10:57 lizmat still, it would have been nice to be able to say:
10:57 lizmat r. (1,2,3,4,5).avg.say
10:57 lizmat r: (1,2,3,4,5).avg.say
10:57 camelia rakudo a10341: OUTPUT«No such method 'avg' for invocant of type 'Parcel'␤  in block  at /tmp/lU7J50O51E:1␤␤»
10:58 colomon rn: sub mean(@*a) { @a R/ [+} @a; }; say mean(4, 6, 7)
10:58 camelia rakudo a10341: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/oc7vcy2lCDâ�¤Variable '@a' is not declaredâ�¤at /tmp/oc7vcy2lCD:1â�¤------> [32msub mean(@*a) { @a[33mâ��[31m R/ [+} @a; }; say mean(4, 6, 7)[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
10:58 camelia ..niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable @a is not predeclared at /tmp/OruBcCVvK6 line 1:�------> [32msub mean(@*a) { [33m�[31m@a R/ [+} @a; }; say mean(4, 6, 7)[0m��Prefix requires an argument at /tmp/OruBcCVvK6 line 1:�------> [32msub mean(@*a) …»
10:58 colomon rn: sub mean(*@a) { @a R/ [+} @a; }; say mean(4, 6, 7)
10:58 camelia niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0m��Prefix requires an argument at /tmp/AULlvW9nEY line 1:�------> [32msub mean(*@a) { @a R/ [+[33m�[31m} @a; }; say mean(4, 6, 7)[0m��Parse failed��»
10:58 camelia ..rakudo a10341: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/EYSZnuqBeJ�Preceding context expects a term, but found infix + instead�at /tmp/EYSZnuqBeJ:1�------> [32msub mean(*@a) { @a R/ [+[33m�[31m} @a; }; say mean(4, 6, 7)[0m�»
10:58 * colomon needs to wake up
11:00 colomon rn: sub mean(*@a) { @a R/ [+] @a; }; say mean(4, 6, 7)
11:00 camelia rakudo a10341, niecza v24-95-ga6d4c5f: OUTPUT«5.666667␤»
11:01 FROGGS[mobile] joined #perl6
11:04 colomon rn: sub median(*@a) { @a %% 2 ?? (@a[*/2-1] + @a[*/2]) / 2 !! @a[*/2-1]; }; say median(1,3,4,7); say median(1,3,9)
11:04 camelia rakudo a10341, niecza v24-95-ga6d4c5f: OUTPUT«3.5␤1␤»
11:04 * colomon has left an important step out!
11:04 colomon rn: sub median(*@r) { my @a = @r.sort(+*); @a %% 2 ?? (@a[*/2-1] + @a[*/2]) / 2 !! @a[*/2-1]; }; say median(1,3,4,7); say median(1,3,9)
11:05 camelia rakudo a10341, niecza v24-95-ga6d4c5f: OUTPUT«3.5␤1␤»
11:05 colomon rn: sub median(*@r) { my @a = @r.sort(+*); @a %% 2 ?? (@a[*/2-1] + @a[*/2]) / 2 !! @a[*/2-1]; }; say median(3,1,4,7); say median(1,9,3)
11:05 camelia rakudo a10341, niecza v24-95-ga6d4c5f: OUTPUT«3.5␤1␤»
11:10 pmurias joined #perl6
11:13 jnthn whee
11:13 fhelmberger joined #perl6
11:14 iSlug joined #perl6
11:15 jnthn OK, it needs some minor hacks that I'm gonna have to redo properly, and I've built it by hand, but I've just been single-stepping code with Rakudo::Debugger on JVM. :)
11:17 * lizmat just pushed some roast changes to github
11:17 jnthn Turns out prompt doesn't work on Rakudo JVM yet due to .flush also not working.
11:18 jnthn That's an easy fix. There's also an exception handler related thing that needs some VM abstraction. Those aside, it'll just be a case of sorting out build stuff.
11:19 * lizmat just push some nom changes to github
11:19 lizmat *pushed
11:20 lizmat basically KeySet -> SetHash and KeyBag -> BagHash changes
11:20 jnthn lizmat++
11:26 jnthn tadzik: Pushed exists updates
11:26 dalek rakudo-debugger: c901e44 | jnthn++ | bin/perl6-debug.nqp:
11:26 dalek rakudo-debugger: Some pir:: -> nqp:: in prep for JVM support.
11:26 dalek rakudo-debugger: review: https://github.com/jnthn/raku​do-debugger/commit/c901e44c03
11:27 tadzik \o/
11:27 dalek rakudo/nom: bd0f19c | jnthn++ | / (2 files):
11:27 dalek rakudo/nom: Use recursion_limit method from HLL:Compiler.
11:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd0f19ca25
11:27 jnthn heh, that commit was a while ago :)
11:28 jnthn Guess github is gonna be playing catch up :)
11:28 lizmat parse time for me went from 140 -> 123
11:29 lizmat so, 17 seconds gained for each build  :-)
11:29 dalek roast: 3ca73a7 | (Elizabeth Mattijsen)++ | S02-types/ (4 files):
11:29 dalek roast: Part 1 of bringing Set/Bag tests up to spec
11:29 dalek roast: review: https://github.com/perl6/roast/commit/3ca73a7ac3
11:29 dalek roast: 109ff98 | (Elizabeth Mattijsen)++ | S (9 files):
11:29 dalek roast: Part 2 of bringing Bag/Set tests up to spec again
11:29 dalek roast: review: https://github.com/perl6/roast/commit/109ff98e2b
11:29 dalek rakudo/nom: bc39750 | (Elizabeth Mattijsen)++ | src/core/ (4 files):
11:29 dalek rakudo/nom: Part 1 of bringing Set/Bag up to spec again
11:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc397506b1
11:29 dalek rakudo/nom: 7eacce5 | (Elizabeth Mattijsen)++ | / (10 files):
11:29 dalek rakudo/nom: Part 2 of bringing Set/Bag up to spec again
11:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7eacce52e0
11:29 dalek rakudo/nom: 71b47aa | (Elizabeth Mattijsen)++ | t/spectest.data:
11:29 dalek rakudo/nom: Part 3 of getting the Set/Bag tests up to spec again
11:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/71b47aa211
11:29 tadzik \o/
11:30 dalek rakudo-debugger: 6b8fc4f | jnthn++ | lib/Debugger/UI/CommandLine.pm:
11:30 dalek rakudo-debugger: Stop using deprecated .exists method.
11:30 dalek rakudo-debugger: review: https://github.com/jnthn/raku​do-debugger/commit/6b8fc4f77f
11:30 dalek rakudo-debugger: e014aaf | jnthn++ | bin/perl6-debug.nqp:
11:30 dalek rakudo-debugger: Some JVM compatibility fixes.
11:30 dalek rakudo-debugger: review: https://github.com/jnthn/raku​do-debugger/commit/e014aafd5b
11:30 jnthn lizmat: Great!
11:31 lizmat spectest before took 504 wallclock / 3700 CPU
11:32 lizmat running post cursless merge spectest now
11:32 lizmat 11:31 UTCWe've restored access to code downloads and queued service hooks are being delivered. The attack continues, but our mitigation is holding firm.
11:35 diakopter o_O
11:37 jnthn The fact perl6-debug hasn't been a nightmare to make work on JVM bodes well for getting it on Moar too, once we have Rakudo over there..
11:37 diakopter :)
11:40 lizmat spectest down to 492 wallclock / 3600 CPU
11:40 lizmat cool!
11:42 jnthn \o/
11:48 raiph joined #perl6
11:50 l30n1du5 joined #perl6
11:56 dalek Perlito: bb6da3c | (Flavio S. Glock)++ | / (3 files):
11:56 dalek Perlito: Perlito5 - perl6 - make build-5to6browser by default; cleanup
11:56 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/bb6da3c884
11:59 fglock joined #perl6
11:59 btyler joined #perl6
12:02 mtk joined #perl6
12:07 denis_boyun joined #perl6
12:20 lizmat .oO( wish we had a make target that would only run the files in t/spec that are listed in git status )
12:21 dalek roast: 9d973ed | (Elizabeth Mattijsen)++ | S02-types/ (5 files):
12:21 dalek roast: KeyHash is now called QuantHash
12:21 dalek roast: review: https://github.com/perl6/roast/commit/9d973ed4af
12:28 dalek rakudo/nom: 93064b1 | (Elizabeth Mattijsen)++ | / (5 files):
12:28 dalek rakudo/nom: Introduce QuantHash
12:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/93064b16f6
12:30 lizmat TimToady: .elems on a Baggy, is the sum of all weights,  this becomes weird with MixHash, or not ?
12:33 arnsholt lizmat: How about: make $(git s --porcelain | perl -nE 'chomp; next if substr($_, 0, 2) ne " M"; say substr($_, 3); ')
12:33 arnsholt Where git s is my alias for git status, obv.
12:37 lizmat arnsholt++  will try the next time I have t/spec changes
12:39 arnsholt jnthn: What's the correct way to call a method in a superclass in NQP?
12:40 jnthn nqp::findmethod(SuperClassName, 'method')(self, ...args...)
12:40 arnsholt Right. Cheers
12:41 arnsholt I think it looks like I'll have to override an action method not defined in NQP::RegexActions to set up $/ on subrule calls
12:44 moritz eeks, rakudo segfaulted during setting parsing
12:45 masak good afternoon, #perl6
12:45 moritz \o masak
12:52 moritz make: *** No rule to make target `src/core/QuantHash.pm', needed by `CORE.setting.pbc'.  Stop.
12:52 moritz lizmat: did you forget to git add QuantHash.pm?
12:54 dalek nqp: 755bd8b | jnthn++ | src/vm/parrot/QAST/Operations.nqp:
12:54 dalek nqp: Fix copy-pasto.
12:54 dalek nqp: review: https://github.com/perl6/nqp/commit/755bd8b09e
12:54 dalek nqp: 1eb7d09 | jnthn++ | src/vm/parrot/QAST/Operations.nqp:
12:54 dalek nqp: Add an nqp::flushfh op on Parrot.
12:54 dalek nqp: review: https://github.com/perl6/nqp/commit/1eb7d09897
12:54 dalek nqp: a4e9ac9 | jnthn++ | src/vm/jvm/ (7 files):
12:54 dalek nqp: Implement nqp::flushfh on JVM.
12:54 dalek nqp: review: https://github.com/perl6/nqp/commit/a4e9ac9969
12:55 [Coke] my 9th grader is taking Mandarin this year. at the school's open house, I asked the teacher if *i* could peek at the course materials... she gave me a copy of the textbooks to borrow indefinitely. Whee!
12:55 masak [Coke]: nice!
12:56 [Coke] jnthn: "hey, no adding opcodes without documentation!
12:56 [Coke] I'll grab that one, though.
12:57 iSlug joined #perl6
12:57 ajr joined #perl6
12:57 dalek nqp: ff08120 | jnthn++ | docs/ops.markdown:
12:57 dalek nqp: Document flushfh; [Coke]++ for reminder.
12:57 dalek nqp: review: https://github.com/perl6/nqp/commit/ff08120ffd
12:58 dalek nqp: b71e06e | coke++ | docs/ops.markdown:
12:58 dalek nqp: doc new opcode.
12:58 dalek nqp:
12:58 dalek nqp: (fix nearby op name)
12:58 dalek nqp: review: https://github.com/perl6/nqp/commit/b71e06ec2a
12:58 [Coke] D'oh.
12:59 jnthn oops
12:59 jnthn :)
12:59 [Coke] fixing.
12:59 jnthn Well, we're flush with docs for that op now...
13:00 dalek nqp: 57ede8d | coke++ | docs/ops.markdown:
13:00 dalek nqp: what? too much docs?
13:00 dalek nqp:
13:00 dalek nqp: use jnthn++'s explanation in alphabetical slot.
13:00 dalek nqp: review: https://github.com/perl6/nqp/commit/57ede8db11
13:00 dalek rakudo/nom: a8d9dc8 | jnthn++ | / (2 files):
13:00 dalek rakudo/nom: Start using nqp::flushfh.
13:00 dalek rakudo/nom:
13:00 dalek rakudo/nom: Fixes .flush, and also prompt(), on JVM.
13:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a8d9dc8e4d
13:00 [Coke] jnthn++ \o/
13:01 [Coke] only 505 failing tests in t/docs (most of them are duplicates because something is documented but exists in parrot -and- java)
13:02 [Coke] (autogenerating signatures) - the problem with that is the signatures often take a perl 6 object, but immediately die if given something not, e.g., a bigint.
13:02 [Coke] so it's not as straightforward as you might think.
13:03 [Coke] also, the point is to get the -descriptions- autogenerating potentially incorrect signatures would then make it slightly harder to figure out where we were missing docs. (or leave a lot of XXX boilerplate)
13:03 [Coke] if you want to help, find an opcode that isn't documented (run the test) and give me a snippet of text to use for the description.
13:03 [Coke] (another issue: we are categorizing the opcodes - can't get that from the code)
13:06 jnthn Down to one hack in the debugger code now.
13:07 * jnthn will fix this, and then leave the build stuff for another time.
13:16 lowpro30 joined #perl6
13:17 lowpro30_ joined #perl6
13:18 FROGGS r: say ([+] 157.831, 154.795, 155.103, 154.866, 155.325, 154.584, 154.834, 155.286, 155.128) / 9
13:18 camelia rakudo 71b47a: OUTPUT«Missing or wrong version of dependency 'src/stage2/QRegex.nqp'␤current instr.: '' pc 16569 (src/gen/perl6-pod.pir:6540) (src/Perl6/Pod.nqp:464)␤called from Sub '' pc 1902 (src/stage2/gen/module_loader.pir:880) (src/vm/parrot/ModuleLoader.nqp:47)␤called from Sub…»
13:18 FROGGS what?
13:18 daxim joined #perl6
13:19 [Coke] r: say.what.say
13:19 camelia rakudo 71b47a: OUTPUT«Missing or wrong version of dependency 'src/stage2/QRegex.nqp'␤current instr.: '' pc 16569 (src/gen/perl6-pod.pir:6540) (src/Perl6/Pod.nqp:464)␤called from Sub '' pc 1902 (src/stage2/gen/module_loader.pir:880) (src/vm/parrot/ModuleLoader.nqp:47)␤called from Sub…»
13:19 FROGGS :o(
13:19 lowpro30__ joined #perl6
13:19 tadzik nooo
13:19 * [Coke] tries to remember what the command is to force a rebuild...
13:20 rindolf joined #perl6
13:20 tadzik evalbot control rebuild
13:20 tadzik nope
13:21 FROGGS k, 10.168828361% faster
13:21 FROGGS nqp: say(1)
13:21 camelia nqp: OUTPUT«1␤»
13:23 * jnthn gets "don't know how to build QuantHash"... :(
13:23 jnthn lizmat: ping?
13:26 JimmyZ git reset HEAD^ --hard
13:31 Lorn joined #perl6
13:34 jnthn Well, will do some $dayjob stuff for a bit...only got one more patch to try out anyway... :)
13:34 raiph joined #perl6
13:38 nwc10 jnthn: trying it. I think that I got a kernel panic. Whoops
13:38 nwc10 but unfortunately the screen saver had cut in, so when it hung, it hung with all black output on the "console" (the TV)
13:39 nwc10 so I didn't get to see whether it had (like before) dropped me into the kernel debugger
13:39 nwc10 (before locking up. Oops)
13:39 nwc10 trying again
13:39 nwc10 Kernel panic makes a change from a JVM bug.
13:40 moritz [Coke]: evalbot rebuilds don't work atm
13:41 lowpro30 joined #perl6
13:41 iSlug joined #perl6
13:45 arnsholt Heh. That's a fun failure mode. Even funner then segfaults, even =D
13:46 nwc10 I think it's because the USB drivers are pants
13:48 jnthn .oO( Wearable tech considered overrated... )
13:49 stevan_ joined #perl6
14:05 dalek rakudo/nom: 454984b | (Elizabeth Mattijsen)++ | src/core/QuantHash.pm:
14:05 dalek rakudo/nom: Oops, forgot to add QuantHash, moritz++
14:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/454984b7f8
14:05 lowpro30 joined #perl6
14:05 lizmat sorry about that, guys
14:06 lizmat it spectested ok here  :-)
14:07 jnthn :P
14:08 lizmat r: say 1
14:08 camelia rakudo 71b47a: OUTPUT«Missing or wrong version of dependency 'src/stage2/QRegex.nqp'␤current instr.: '' pc 16569 (src/gen/perl6-pod.pir:6540) (src/Perl6/Pod.nqp:464)␤called from Sub '' pc 1902 (src/stage2/gen/module_loader.pir:880) (src/vm/parrot/ModuleLoader.nqp:47)␤called from Sub…»
14:08 lizmat hope that gets fixed soon
14:08 lizmat again, sorry about that…  had a little nap in the sun
14:09 jnthn Nice timing...I did my $dayjob errands and was about to do some real work, but now I can distract myself testing my Rakudo patch :P
14:09 lizmat yw, running errands myself now &
14:15 jnap joined #perl6
14:18 dalek rakudo-debugger: 33b17a7 | jnthn++ | / (2 files):
14:18 dalek rakudo-debugger: Final code tweaks to support Parrot and JVM.
14:18 dalek rakudo-debugger:
14:18 dalek rakudo-debugger: Still need to get proper build/runner stuff in place for JVM, but that
14:18 dalek rakudo-debugger: should be all that's needed now.
14:18 dalek rakudo-debugger: review: https://github.com/jnthn/raku​do-debugger/commit/33b17a7e0a
14:20 jnthn My word to multiple threads confuse the poor debugger.
14:20 jnthn *do
14:27 dalek rakudo/nom: eb07bd1 | jnthn++ | src/ (3 files):
14:27 dalek rakudo/nom: Add nqp::p6invokehandler.
14:27 dalek rakudo/nom:
14:27 dalek rakudo/nom: Hides away a Parrot specific detail. Cleans up one place in Actions,
14:27 dalek rakudo/nom: but the debugger is the main beneficiary.
14:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eb07bd1356
14:41 larks joined #perl6
14:43 bluescreen10 joined #perl6
14:43 skids joined #perl6
14:44 denisboyun joined #perl6
14:47 FROGGS perl6 t/spec/S02-types/declare.rakudo.parrot
14:47 FROGGS not ok 40 - The object is-a 'QuantHash'
14:47 FROGGS # Actual type: QuantHash
14:48 jnthn Is QuantHash a role or a class?
14:49 FROGGS a role
14:49 FROGGS that explains it
14:51 jnthn da
14:51 jnthn ok ... ~~ QuantHash is probably the easy fix
14:53 dalek roast: c7c53a7 | (Tobias Leich)++ | S02-types/declare.t:
14:53 dalek roast: fix QuantHash test
14:53 dalek roast: review: https://github.com/perl6/roast/commit/c7c53a7a25
14:56 guru joined #perl6
14:57 sftp joined #perl6
14:58 benabik joined #perl6
15:00 iSlug joined #perl6
15:10 TimToady nr: m 'this is fine'
15:10 camelia niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Unable to resolve method match in type Any␤  at /tmp/7KPgmywCmx line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) ␤  at /h…»
15:10 camelia ..rakudo 454984: OUTPUT«Cannot call 'match'; none of these signatures match:␤:(Cool:D : $target, *%adverbs)␤  in method match at src/gen/CORE.setting:3372␤  in block  at /tmp/Qvspk9sH2f:1␤␤»
15:11 TimToady (syntactically, anyway)
15:12 TimToady nr: $_ = 'thisisfine'; say m 'this is fine'
15:12 camelia rakudo 454984, niecza v24-95-ga6d4c5f: OUTPUT«「thisisfine」␤␤»
15:13 TimToady nr: $_ = 'soisthis'; say m -so is this-
15:13 camelia rakudo 454984, niecza v24-95-ga6d4c5f: OUTPUT«「soisthis」␤␤»
15:16 TimToady so there should probably be tests for delims that work as long as there's whitespace between
15:17 jnthn ah, yes
15:25 yogan joined #perl6
15:29 sftp joined #perl6
15:33 kaare_ joined #perl6
15:35 FROGGS m -so is this- <-- that is not a programming style I will adopt soon
15:37 sftp joined #perl6
15:38 jnthn FROGGS: s ' only ' a little odd '
15:38 FROGGS yeah
15:38 jnthn std: s ' only ' a little odd '
15:38 camelia std 4cde04e: OUTPUT«ok 00:00 42m␤»
15:38 jnthn r: s ' only ' a little odd '
15:38 camelia rakudo eb07bd: ( no output )
15:39 FROGGS s "nice" :o)                                                                                    "
15:39 PerlJam What is this?  Perl 5?  ;>
15:39 FROGGS std: s "a"b"
15:39 camelia std 4cde04e: OUTPUT«ok 00:00 42m␤»
15:39 TimToady std: s"a"b"
15:40 camelia std 4cde04e: OUTPUT«ok 00:00 42m␤»
15:40 FROGGS of course, only the single quotes belong to ident
15:40 jnthn identifier, but yes
15:40 jnthn Good we got STDier amongst the cursor killing, anyway... :)
15:41 TimToady that STDlier to you :P
15:41 TimToady *that's
15:41 TimToady now my 's key is getting gimpy...
15:42 TimToady it it's it's it it it it's  <-- intermittent
15:44 TimToady yay, my Stage parse dropped from 96.5 to 85.5
15:44 jnthn TimToady: Which backend?
15:44 FROGGS aww, I wanna have an i7 too
15:44 TimToady JVM
15:44 FROGGS ahh, that is JVM
15:44 FROGGS then mine is already faster?
15:45 * TimToady just has an ancient T61
15:45 TimToady (2 core)
15:45 jnthn TimToady: I only gained a couple of seconds on JVM, but am down to around 44s/45s now.
15:46 FROGGS I had a Lenovo Thinkpad before my DELL, and I don't miss it at all
15:46 TimToady well, GC might be more efficient with more cores
15:46 jnthn True
15:46 * TimToady likes the T61, for all its faults
15:46 * jnthn picks up a new laptop tomorrow :)
15:47 jnthn Hopefully it'll be around as fast as my current desktop
15:47 * jnthn only uses the laptop when traveling, not at home...
15:47 FROGGS I use my laptop like 16/7
15:48 jnthn :)
15:48 jnthn I suspect if laptop use was physically comfortable for me, I might use one most of the time too
15:48 jnthn I'd probably be more nomadic also... :)
15:49 FROGGS well, my neck hurts a lot and so does my back and my legs... dunno if laptops are preferable :o)
15:50 FROGGS but my flat is too small for a desktop-pc+table of mine
15:50 * TimToady tries a differential compile on his supercomputer
15:55 FROGGS 65.3s stage parse here
15:57 jnthn FROGGS: on JVM?
15:57 FROGGS yes
15:57 jnthn Figured so :)
15:57 FROGGS hehe
15:57 FROGGS I never had such a nice number on @parrot
15:57 FROGGS it was once around 80s though, must be a year ago now
15:58 jnthn Yeah. The setting grew... :)
15:59 FROGGS true, happened much since then
15:59 TimToady 59.4 -> 55.0 on six cores
16:00 FROGGS sad that we don't have a number for moarvm yet :o)
16:01 FROGGS and then we really need buildbots
16:01 FROGGS parrot, jvm, moarvm Rxx linux, windows, mac
16:02 jnthn I'll try and do a bit moar hacking this evening to get closer to being able to dig into bootstrap
16:02 FROGGS ohh awesome!
16:03 jnthn I've got quite a lot of travel coming up in the next 3 weeks, but I'm hopeful the tuit supply won't be hit too hard.
16:03 FROGGS I like to help too, but well, I dunno how and I think I'm not capable of fixing things in the current state
16:03 jnthn Well, current task is getting --target=mbc to work out right
16:03 jnthn But that shouldn't be much more than debugging.
16:04 FROGGS k, so I will try it tonight
16:04 jnthn me too ;)
16:04 jnthn Actually fixing the Pod regression would be helpful, as I guess I can't build nqp-cc until that one is fixed...
16:14 ssutch joined #perl6
16:15 Rotwang joined #perl6
16:35 TimToady lizmat: it'll probably be a .total method instead of .elems, and we'll probably add an immutable QuantMap to go with QuantHash
16:35 TimToady errands &
16:42 iSlug joined #perl6
16:44 sftp joined #perl6
16:44 jnthn https://gist.github.com/jnthn/6812967 # action method count/time stats, if anybody is curious
16:45 timotimo is the time number time-per-call or sum-of-all-times?
16:46 timotimo oh, must be time-total, otherwise the parsing would take like an hour :)
16:46 jnthn total :)
16:46 jnthn So we can understand what is in it for us if we optimize
16:46 timotimo seems like the actions don't take much time, that is very nice indeed.
16:48 timotimo comparing what package_def and dec_number have to do, it seems like dec_number is unjustly slow
16:48 timotimo but it's only worth about 1 second all in all, so not sure if we'd want to do anything there
16:49 timotimo well, all action methods in all are very roughly 30 seconds; how much time does stage parse cost on your computer in total?
16:49 jnthn yes, dec_number stands out
16:49 jnthn TimToady: Yes but on my machine the whole parse stage is 45s.
16:50 jnthn um, timotimo ^
16:50 jnthn r: say 1.8 / 45
16:50 camelia rakudo eb07bd: OUTPUT«0.04␤»
16:50 jnthn So it's 4% of CORE.setting compilation time
16:50 timotimo oh, this is on jvm?
16:51 jnthn yes
16:51 timotimo that makes a difference of about 3x to me :)
16:51 jnthn Thing is, we have an nqp::radix op
16:51 jnthn Which I *think* may be capable of doing a lot of what that action method is doing
16:51 timotimo nqp: say(nqp::radix("1023", 10))
16:51 camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::radix(\"1023\", 10)"): Error while compiling op radix (source text: "nqp::radix(\"1023\", 10)"): Operation 'radix' requires 4 operands, but got 2␤current instr.: '' pc 55082 (src/stage2/QAST.…»
16:52 timotimo ah, that way
16:52 timotimo nqp: say(nqp::radix_I(10, "1032", 0, 0, Int))
16:52 camelia nqp: OUTPUT«get_boxed_ref could not unbox for the given representation␤current instr.: '' pc 93 ((file unknown):61) (/tmp/qPqWpVX92J:1)␤»
16:53 timotimo string_to_bigint already uses nqp::radix in the actions
16:53 jnthn Well, we're producing a num here I guess...
16:53 timotimo the question is probably if it allows underscores; this filter_number thing is probably very costy if 99.99% of our numbers don't have any underscores
16:54 jnthn Well, I think radcalc may be mroe so
16:54 jnthn I believe nqp::radix can do underscores
16:54 FROGGS is =cut valid for perl6's pod
16:54 FROGGS ?
16:55 jnthn I...don't think so?
16:55 jnthn r: =cut
16:55 camelia rakudo eb07bd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ELygstVbDS�Preceding context expects a term, but found infix = instead�at /tmp/ELygstVbDS:1�------> [32m=cut[33m�[31m<EOL>[0m�»
16:55 jnthn um :)
16:55 timotimo hehe.
16:55 jnthn I think there's an error saying "no, =cut is Perl 5" or soin Perl 6's grammar, though
16:55 arnsholt jnthn: Giving this $/ in subrule arguments thing a whack, I'm urnning into some trouble. Could it be that the subrule's (pristine) $/ gets set up before the arguments are evaluated?
16:55 FROGGS jnthn: why do we have =cut in nqp code then?
16:55 jnthn Anyway, I throw out the dec_number thing for anybody who fancies trying their hand, and suggest nqp::radix may be the way to go there :)
16:56 FROGGS like, NQPHLL.nqp
16:56 jnthn FROGGS: I...have no idea ;)
16:56 FROGGS nqp/src/HLL/CommandLine.nqp:89:=cut
16:56 FROGGS and right before it there is an =end
16:56 FROGGS :o)
16:56 jnthn Thinko maybe :)
16:57 jnthn And our Pod parsing was, like, liberal man.
16:58 raiph joined #perl6
16:59 timotimo yeah, tadzik transformed all of his chill into the pod parser
16:59 timotimo also, the filter_number thing does all the string copies
17:00 timotimo the really un-nice quadratic kind
17:00 xenoterracide joined #perl6
17:00 timotimo even if there is nothing for it to do
17:00 timotimo oh well. i'll investigate nqp::radix
17:02 timotimo nqp::index to see if a character is 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9 is also ...
17:02 timotimo (and another for 0-9A-Z)
17:02 timotimo those could much more easily be chr and integer compares, no?
17:04 timotimo well, it would be nice to figure out if it's actually that that causes slowness
17:12 kaleem joined #perl6
17:13 timotimo i wonder if we can make a big difference by keeping around a hash of string-of-number to number?
17:13 timotimo i bet we see a hundred 1 and 0, some 10s
17:15 denisboyun joined #perl6
17:15 arnsholt timotimo: Maybe a kind of cache structure?
17:15 timotimo also, does add_numeric_constant do any caching?
17:28 * timotimo is very distracted
17:40 zwut00 joined #perl6
17:52 timotimo r: say nqp::radix_I(10, "1024", 0, 0, Int)
17:52 camelia rakudo eb07bd: OUTPUT«No such method 'gist' for invocant of type 'FixedPMCArray'␤  in sub say at src/gen/CORE.setting:12751␤  in block  at /tmp/3bBM2Gb7Ze:1␤␤»
17:52 timotimo ah, it returns an array of parts
17:53 timotimo r: my Mu $res := nqp::radix_I(10, "1024", 0, 0, Int); say nqp::atpos($res, 0); say nqp::atpos($res, 1);
17:53 camelia rakudo eb07bd: OUTPUT«1024␤10000␤»
17:54 timotimo r: my Mu $res := nqp::radix_I(10, "1024", 0, 4, Int); say nqp::atpos($res, 0); say nqp::atpos($res, 1);
17:54 camelia rakudo eb07bd: OUTPUT«1024␤10000␤»
17:54 timotimo r: my Mu $res := nqp::radix_I(10, "1024", 0, 1, Int); say nqp::atpos($res, 0); say nqp::atpos($res, 1);
17:54 camelia rakudo eb07bd: OUTPUT«-1024␤10000␤»
17:54 timotimo r: my Mu $res := nqp::radix_I(10, "1024", 0, 3, Int); say nqp::atpos($res, 0); say nqp::atpos($res, 1);
17:54 camelia rakudo eb07bd: OUTPUT«-1024␤10000␤»
17:54 timotimo not quite sure why there's a +4 for the $neg parameter in the Str part of core...
17:55 timotimo r: my Mu $res := nqp::radix_I(10, "1024", 0, 0, Int); say nqp::atpos($res, 0); say nqp::atpos($res, 1); say nqp::atpos($res, 2);
17:55 camelia rakudo eb07bd: OUTPUT«1024␤10000␤4␤»
17:55 timotimo and the last thing seems to be the position of the dot in the number
17:57 jnthn timotimo: https://github.com/perl6/nqp/blob/ma​ster/src/vm/parrot/ops/nqp.ops#L2891 has some doc on it
17:58 jnthn And yes, there already is caching of constants, odne in H::World
17:58 jnthn *done in Perl6::World
17:58 dalek nqp: d756b3f | (Tobias Leich)++ | src/ (2 files):
17:58 dalek nqp: fix pod-parsing, jnthn++
17:58 dalek nqp: review: https://github.com/perl6/nqp/commit/d756b3f709
17:59 FROGGS jnthn: running a spectest too, to be sure
17:59 timotimo now the question becomes: is a string-indexed hash for parsing numbers sensible?
17:59 FROGGS but nqp-cc builds, nqp's tests are ok, and rakudo builds
18:00 jnthn timotimo: I still think the whole lot may be replaceable with an nqp::radix call
18:00 timotimo all of it?
18:00 jnthn Well, we need to convert the b/x/whatevers into a base
18:00 jnthn And do some work on the array that comes out
18:01 jnthn I guess divide the first by the second, for example
18:01 jnthn er, or something like that
18:01 timotimo not quite
18:01 jnthn bbiab
18:01 timotimo otherwise it would give you 0.1024 for 1024 :)
18:02 timotimo probably multiply it with the third to the power of the radix or something?
18:13 FROGGS jnthn: spectest passes
18:18 guru joined #perl6
18:19 ssutch joined #perl6
18:19 japhb__ timotimo: Have you looked through the Str.Numeric implementation?  It's crazy general, but you might be able to browse through it to find just the bit you need.
18:19 timotimo no, i'm afraid of failure and so i'm distracting myself :)
18:20 japhb__ Ah.
18:24 japhb__ timotimo: Also, there's some documentation of the op in nqp ... src/vm/parrot/ops/nqp_bigint.ops line 436 and following.  Line 444 looks typoed; it should be "The contents of $1 ..."
18:24 lue hello world o/
18:25 japhb__ o/ lue
18:26 lue o/ japhb__
18:46 sqirrel joined #perl6
18:59 * lizmat is back from errands
19:00 lizmat .oO( and backlogging )
19:03 slava joined #perl6
19:03 xinming joined #perl6
19:08 dalek specs: 29e1f75 | (Elizabeth Mattijsen)++ | S32-setting-library/Containers.pod:
19:08 dalek specs: Change use of .elems on Set/Bag/Mix to new method .total
19:08 dalek specs: review: https://github.com/perl6/specs/commit/29e1f75793
19:08 iSlug joined #perl6
19:13 xorp joined #perl6
19:20 riceandbeans joined #perl6
19:20 riceandbeans how can I make a multidimensional array in perl?
19:20 jnap joined #perl6
19:22 lizmat hello riceandbeans, you mean Perl 5 or Perl 6 ?
19:23 lue r: my @a = [1,2],[3,4
19:23 camelia rakudo eb07bd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Q1i_8hPq8Iâ�¤Unable to parse expression in array composer; couldn't find final ']'â�¤at /tmp/Q1i_8hPq8I:1â�¤------> [32mmy @a = [1,2],[3,4[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        sta…»
19:23 lue r: my @a = [1,2],[3,4]; say @a.perl
19:23 camelia rakudo eb07bd: OUTPUT«Array.new([1, 2], [3, 4])␤»
19:23 lue (if you're using P6 that is)
19:24 arnsholt Does anyone else get test failures on NQP/Parrot at HEAD?
19:24 arnsholt (t/nqp/05-comments.t)
19:24 diakopter jnap: did you find the --crash flag?
19:25 slava left #perl6
19:25 slava joined #perl6
19:25 jnap diakopter:  probably not, but to be honest I've been so busy lately I can't even recall looking for it :(
19:25 iSlug joined #perl6
19:27 diakopter jnap: sorry, I meant to type jnthn, and also in the other channel
19:28 jnap diakopter:  np :)  glad my memory is failing less than I thought
19:29 dalek rakudo/nom: 0dbbbfe | (Elizabeth Mattijsen)++ | src/core/ (2 files):
19:29 dalek rakudo/nom: Change .elems to .total for Sets/Bags, .elems is now what you expect for a hash
19:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0dbbbfec14
19:30 dalek roast: 3ee1ee0 | (Elizabeth Mattijsen)++ | S02-types/bag (2 files):
19:30 dalek roast: Adapt applicable tests to use .total rather than .elems
19:30 dalek roast: review: https://github.com/perl6/roast/commit/3ee1ee0e34
19:31 riceandbeans perl5, sorry
19:32 iSlug joined #perl6
19:32 riceandbeans just in general, defining a multidimensional array
19:32 riceandbeans @array = [][]; doesn't work
19:32 geekosaur no, it won't. it's also off topic here; try #perl
19:32 geekosaur perl6 solutions won't help you much in perl5
19:33 FROGGS @array = [], [] # is perl6, and almost perl 5 :o)
19:33 TimToady @array = ([],[]); will work in either
19:33 riceandbeans is perl6 really that vastly different?
19:33 geekosaur (mainly because this is one of the areas where perl5 is most ... unusual... and perl6 is correcting that
19:33 geekosaur )
19:33 TimToady you'll note p6 actually makes things easier by not requiring the parens
19:33 geekosaur perl5 needs to play ugly games with references to get multidimensional stuff
19:33 FROGGS riceandbeans: yes and no, it has huge differences in some areas, but in others you an nearly write identical code
19:34 geekosaur in many ways it feels like trying to do real structures in something like C which doesn't do real structures
19:34 riceandbeans ok, let me explain briefly what I want to do and maybe you could give me a little advice
19:34 lizmat r: role A { has %!a }; role B does A {}; class Foo does B { method BUILD (:%!a) {} }   # is this a bug, or is this intended to work this way ?
19:34 camelia rakudo eb07bd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Cl4EuJc9DAâ�¤Attribute %!a not declared in class Fooâ�¤at /tmp/Cl4EuJc9DA:1â�¤------> [32mass Foo does B { method BUILD (:%!a) {} [33mâ��[31m}   # is this a bug, or is this intended[0mâ�¤    expecting any of:â�¤â€¦Â»
19:35 riceandbeans I want to scan a file for criteria, upon finding it, I want relative data from each line to be part of its own separate reference and able to be sorted by a certain value with it
19:35 riceandbeans say I'm scanning a maillog, with one line, storing from, to, msg size, attachment
19:36 riceandbeans in ruby I'd make a class and invoke it as a new instance
19:36 FROGGS riceandbeans: if you need detailed perl 5 specific help then a perl 5 channel might be better
19:36 lizmat r: role A { has %.a }; role B does A {}; class Foo does B { method BUILD (:%.a) {} }   # is this a bug, or is this intended to work this way ?
19:36 riceandbeans FROGGS: I'm banned there from a disagreement with popl
19:36 camelia rakudo eb07bd: ( no output )
19:36 PerlJam riceandbeans: are you sure it wasn't a temp ban?
19:36 riceandbeans yeah
19:36 diakopter riceandbeans: just use a different nick if you burned that one :)
19:36 FROGGS riceandbeans: banned in #perl-help or in #perl ?
19:37 riceandbeans #perl
19:37 FROGGS #perl-help might be your friend :o)
19:37 riceandbeans FROGGS: I'm not sure what approach I should best go with this, and how much of a pain it would be to get perl6 on CentOS6 box
19:37 lue lizmat: I want to say it's a bug, but don't trust me when it comes to private attributes :)
19:37 FROGGS riceandbeans: see, #perl's topic is:  Welcome to the perl hackers' chat channel - For help, #perl-help or freenode #perl | Interesting questions may still be answered ... or not
19:37 diakopter riceandbeans: how big are your input files
19:37 * geekosaur points out that, having been banned in one channel, asking off topic questions in another channel is not the best way to go about getting that ban lifted
19:38 diakopter geekosaur: he was asking if he can use p6 instead
19:39 FROGGS riceandbeans: not much pain if you an handle git, or tar and make
19:39 FROGGS can*
19:39 lizmat r: role A { trusts B }; role B {}
19:39 camelia rakudo eb07bd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/WafTtSz_Qeâ�¤Illegally post-declared type:â�¤    B used at line 1â�¤Undeclared routine:â�¤    trusts used at line 1â�¤â�¤Â»
19:39 diakopter geekosaur: sounds you want grep with captures put into an array of hashes or arrays
19:40 diakopter erm.
19:40 diakopter riceandbeans: I mean
19:40 diakopter geekosaur: sry
19:40 TimToady r: role A { has %.a }; role B does A {}; class Foo does B { method BUILD (:%.a) {} }; B.new(:a(:lue(42))).perl.say
19:40 lizmat r: role B {} role A { trusts B }
19:40 camelia rakudo eb07bd: OUTPUT«B.new(a => ("lue" => 42).hash)␤»
19:40 camelia rakudo eb07bd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Wm1n7_HOWlâ�¤Two terms in a rowâ�¤at /tmp/Wm1n7_HOWl:1â�¤------> [32mrole B {} [33mâ��[31mrole A { trusts B }[0mâ�¤    expecting any of:â�¤        statement listâ�¤        horizontal whitespaceâ�¤        postfixâ�¤   …»
19:40 lizmat r: role B {}; role A { trusts B }
19:40 camelia rakudo eb07bd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/rXGp6qq6Xd�Method 'add_trustee' not found for invocant of class 'Perl6::Metamodel::ParametricRoleHOW'�at /tmp/rXGp6qq6Xd:1�------> �»
19:41 lizmat I guess this is a rakudobug, or at least an LTA error
19:42 TimToady not sure it makes sense to trust a role
19:42 TimToady (rather than a class)
19:42 diakopter r: (role { }).new
19:42 camelia rakudo eb07bd: ( no output )
19:42 diakopter r: (role { }).new.WHAT.say
19:42 camelia rakudo eb07bd: OUTPUT«(<anon>)␤»
19:43 riceandbeans diakopter: my input files are ~70MB text files
19:43 diakopter perl6 isn't quite ready for that
19:43 TimToady depends on how patient you are
19:44 slava isn't java-rakudo pretty good with large files?
19:44 lizmat but should a class that does a role, which does another role, which has a private attribute, be able to see that attribute ?
19:44 FROGGS slava: yes
19:44 riceandbeans a class would make this easier, which is why i WANT to use ruby
19:44 riceandbeans but out of the box, everything pretty much supports perl, whereas ruby is the weirdo in the corner no one wants to talk to
19:45 riceandbeans but sometimes he knows how to do some cool magic tricks
19:45 TimToady well, we're even weirder than ruby :)
19:46 * lue thinks you should be able to see the private attributes of roles from classes that C<does> those roles.
19:47 Tene joined #perl6
19:47 diakopter p5 is to p6 as Burt Wonderstone is to Jim Carrey's character
19:47 PerlJam lizmat: but is it the role that has the private attr or does the role merely convey the role to a class and the class is what really has the private attr?
19:47 lizmat I want to make QuantHash the basic role for Set/Bag/Mix as per spec
19:48 lizmat which means I have to specify the %!elems in there
19:48 djanatyn joined #perl6
19:48 lizmat but then Bag, which does Baggy, which does QuantHash, don't see the attribute anymore  :-(
19:49 lizmat *doesn't
19:51 lue I see roles as a collection of things that classes can take and use for themselves (think starter kits for various kinds of projects). I think private attributes from roles should be visible to the class.
19:51 diakopter lizmat: can you create accessors in Baggy for it?
19:51 lizmat and throw performance even more out of the window ?
19:51 diakopter [half-rhetorical question directed at TimToady also] :)
19:52 PerlJam lizmat: get it working first, then working fast   :-)
19:52 lue .oO(Alternate solutions: a private !setElems() method, or invent protected attributes. One of these alternates is a joke.)
19:52 diakopter PerlJam: trite
19:52 * lizmat instead keeps QuantHash as a shell role, until the situation improves
19:53 diakopter PerlJam: often, performance is part of "working"
19:54 PerlJam lue: you and I apparently have similar views on roles.  I wonder if the spec backs that up?   I don't see anything in particular that makes me think one way or the other.
19:55 TimToady I thought we've have QuantHash for the mutable *Hash types, and QuantMap for the Setty,Baggy,Mixy types
19:55 TimToady if we need that many roles, which I don't know we do
19:56 lue PerlJam: The intro to http://perlcabal.org/syn/S14.html#Roles might be informative.
19:56 TimToady but I figured the immutable/mutable distinction was probably important for how/when .totals is calculated
19:56 TimToady *.total rather
19:56 lue "or a set of generic methods and their associated data" specifically
19:56 japhb_ joined #perl6
19:58 PerlJam oh, duh.  I just needed to read farther along
19:58 PerlJam S14:100 even
19:58 synopsebot Link: http://perlcabal.org/syn/S14.html#line_100
20:00 lizmat TimToady: the distinction between mutable / immutable is made at the lowest level, in the class
20:00 lizmat basically, overrides on at_key, delete_key and .WHICH
20:01 lizmat that's all
20:01 denis_boyun joined #perl6
20:01 lizmat so I don't think we need a QuantMap
20:02 lizmat Setty/Baggy/Mixy serve both the immutable as the mutable versions of Set/Bag/Mux
20:02 lizmat Mix
20:03 riceandbeans left #perl6
20:04 jnthn lizmat: The role attributes should be visibl ein the class, I think the ruling was. Just didn't get around to implementing it yet.
20:05 lizmat maybe all I need is some pointers to fix this ?
20:05 jnthn void *over_there;
20:05 jnthn I can describe the change... :)
20:05 TimToady that's only one pointer :)
20:06 jnthn Smart *ass; # :P
20:06 diakopter it could point to more than one pointer..
20:06 * lue suddenly has an urge to search for the hidden wonders of abusing void pointers...
20:06 jnthn lue: See the MoarVM GC
20:06 lue :)
20:06 diakopter lue: see every GC
20:06 jnthn lizmat: At the moment, when we see a $!foo, we immediately ask the class, "do you know of a $!foo"?
20:07 TimToady technically speaking, a void pointer doesn't point to anything; it's a big enough chunk of memory to hold a pointer :)
20:07 FROGGS and it should ask up the long ladder(tm)?
20:07 jnthn lizmat: The fix is (perhaps only when the answer is "no", or perhaps always) to store these up until after class composition time (triggered int he package_def action method)
20:07 jnthn lizmat: And then do the checks then
20:08 jnthn lizmat: Probably keeping the $/ around of the variables we need to check so we can get the location reporting right also.
20:08 lizmat ah, ok, I think that rings a bell
20:08 jnthn lizmat: Better still data structure wise is a hash of array
20:08 lizmat ok, will have a go at that
20:08 jnthn lizmat: Keys are the attribute names to check
20:08 jnthn lizmat: Value is array of the $/s of the places we saw it
20:08 jnthn lizmat: There is one nasty subtlety
20:09 jnthn lizmat: Which is the following csae:
20:09 jnthn role R { has int $!x }; class C does R { method m() { say $!x } } # we need to also go back and fix the AST to know that it should be looking up an int attribute
20:10 lizmat ok, that's a bit yikes
20:10 jnthn Well, I can tell you something wrose... :P
20:10 lizmat but this doesn't work now anyway, so could wait for future refinement, no?
20:10 lizmat worse ?
20:11 lizmat .oO( what have I gotten myself into ;-)
20:11 FROGGS *g*
20:11 jnthn Worse is if somebody is silly enough to write BEGIN C.new.m; inside the class body :P
20:11 diakopter You find yourself mired in a morass of tarpits and boondoggles.
20:11 jnthn We'll call that "erroneous" or "you asked for it, you got it" :P
20:12 jnthn lizmat: Well, actually if you just keep the AST nodes around, all you need do is set .returns(...) on it
20:12 lizmat ah, yes, you *can* do that, but not with inherited attributes  :-)
20:12 jnthn lizmat: There's already code there that does it today
20:12 jnthn lizmat: It's just a matter of setting it later
20:12 lizmat yup, got ya (I think)
20:13 jnthn lizmat: I can't think of any further gotchas.
20:13 jnthn Oh, that BEGIN case already fails *in general*.
20:13 jnthn r: class Foo { BEGIN Foo.new }
20:13 grondilu joined #perl6
20:13 camelia rakudo eb07bd: OUTPUT«===SORRY!===␤No such method 'new' for invocant of type 'Foo'␤»
20:13 jnthn We didn't actually add the default parent yet
20:13 lizmat *phew*
20:14 jnthn Even if we had
20:14 jnthn r: class Foo is Any { BEGIN Foo.new }
20:14 camelia rakudo eb07bd: OUTPUT«===SORRY!===␤No such method 'new' for invocant of type 'Foo'␤»
20:14 jnthn hah
20:14 jnthn :)
20:14 jnthn Fine :)
20:14 jnthn So yeah, we can not worry
20:14 lizmat I'll give it a stab tomorrow
20:14 jnthn OK :)
20:15 * jnthn will be about for some of tomorrow if there's questions :)
20:15 lizmat cool!  I most certainly will have questions
20:15 lizmat :-)
20:15 diakopter r: class NeverTruer is unknown { }
20:15 camelia rakudo 0dbbbf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7SErsmJZpK�'NeverTruer' cannot inherit from 'unknown' because it is unknown.�at /tmp/7SErsmJZpK:1�------> �»
20:15 * diakopter cracks meself up
20:16 lizmat r: class NeverTruer is Mu {}   # huh, even more unknown ?
20:16 camelia rakudo 0dbbbf: ( no output )
20:18 lue r: class Foo is known { }
20:18 camelia rakudo 0dbbbf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ZhPba7M_Ky�'Foo' cannot inherit from 'known' because it is unknown.�at /tmp/ZhPba7M_Ky:1�------> �»
20:20 japhb__ .oO( "But I just *said* it was known.  Why don't you believe me?" )
20:21 dalek rakudo/nom: a2bf0a4 | (Elizabeth Mattijsen)++ | / (6 files):
20:21 dalek rakudo/nom: Move set operators to their own file, for clarity and ease of maintenance
20:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a2bf0a4432
20:22 jnthn btw, if you add up all the action method times in that thing I produced earlier, you get to 24s, and on my machine that's almost exactly half of stage parse.
20:22 jnthn um, wait, I can't math, it's a bit over half.
20:25 japhb__ Half the time after the cursless merge, or after?
20:25 japhb__ s:1st/after/before
20:25 jnthn after
20:26 japhb__ Nice.
20:26 jnthn So yeah, we spend more time asting than parsing
20:28 FROGGS jnthn: do you think that changing [...]**0..1 to [...]? might help?
20:28 japhb__ Over 7s in just the top two; I can see why timotimo was asking about dec_number earlier.
20:29 jnthn FROGGS: Yeah, but it needs care (needs changes to action methods too)
20:29 jnthn FROGGS: But it wants doing.
20:29 FROGGS k, that was my expectation
20:29 jnthn FROGGS: It'll save an array allocation each time so it's very worth it
20:29 dalek joined #perl6
20:40 FROGGS why are we doing this at all?? https://github.com/rakudo/rakudo/blob/​nom/src/Perl6/Actions.nqp#L5210-L5211
20:42 jnthn FROGGS: I'm not sure. I mentioned to timotimo that nqp::radix may be able to replace those and some of what radcalc is doing
20:42 FROGGS I mean, $int and $frac is unused
20:42 colomon dohQ
20:42 colomon doh!
20:43 colomon FROGGS++
20:43 jnthn oh wtf
20:43 jnthn FROGGS++
20:43 FROGGS we are doing text-filtering stuff on numbers just for fun *g*
20:43 colomon but I *like* text-filtering numbers!
20:43 japhb__ Wow, nice catch.
20:43 jnthn Does that mean filter_number becomes unused? :)
20:43 dalek rakudo/nom: d30b53e | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
20:43 dalek rakudo/nom: Slight optimization in Str / pick / roll
20:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d30b53e4b9
20:43 FROGGS colomon: go write a module! :P
20:44 diakopter just don't git blame that...
20:44 FROGGS jnthn: yes
20:44 FROGGS hehe
20:45 dalek evalbot/host07: dd10ea1 | moritz++ | evalbot.pl:
20:45 dalek evalbot/host07: prepare some paths for hosting camelia on host07.perl6.com
20:45 dalek evalbot/host07: review: https://github.com/perl6/evalbot/commit/dd10ea1b7f
20:45 jnthn does host07.perl6.com have a JDK 7? :D
20:47 colomon diakopter: moritz added those lines, but they actually did something when he added them.
20:47 colomon moritz++
20:47 diakopter jnthn: yah
20:47 jnthn diakopter: yayz
20:47 diakopter jnthn: there's a nice ubuntu package
20:48 diakopter http://www.webupd8.org/2012/01/install​-oracle-java-jdk-7-in-ubuntu-via.html
20:48 diakopter updates same-day as new downloads from Oracle
20:48 japhb__ Who owns that box?
20:48 diakopter moi
20:49 japhb__ Thank you, diakopter++!
20:49 japhb__ What kind of machine is it?
20:49 diakopter medium-class virtual
20:49 japhb__ Which hosting service?
20:50 * diakopter tries to remember
20:50 japhb__ *chuckle*
20:50 diakopter digitalocean.com
20:50 diakopter mwilson@host07:~$ uptime 20:50:33 up 103 days
20:51 japhb__ 2 GB RAM or 4 GB?
20:51 * japhb__ is looking at https://www.digitalocean.com/pricing ...
20:51 diakopter 3.9GB
20:51 moritz 4GB, modulo rounding errors :-)
20:52 * lue just had a violent mental reaction to src/core/set_operators.pm
20:53 lizmat lue: why ?
20:53 japhb__ Good.  That should be able to build one thing while running a couple queries at the same time
20:53 lue something about <<"\x220B">> just threw me for a loop.
20:53 diakopter japhb__: the two cores aren't super-fast
20:53 lizmat ah, yes
20:54 diakopter but they're okay
20:54 japhb__ diakopter: I'd rather slow cores than running out of RAM ....
20:54 lizmat lue: I *could* put in the actual unicode characters, but then parse time would be x15 or so
20:54 diakopter *whimper*
20:54 japhb__ lizmat: That bad?  I thought it was only 2-4x worse for parse with Unicode ...
20:54 lue Oh, OK. I was about to say if someone could explain that to me, I'd be fine. That's a perfectly acceptable reason.
20:55 japhb__ Has the delta gotten way worse in the last 6 months?
20:55 lizmat let me put it this way: normally parse time is around 2 minues
20:55 lizmat the last time I tried it, I stopped it after it had been busy for 50+ minutes
20:55 japhb__ Holy crap.
20:55 lue O.o
20:55 japhb__ That's insane.
20:55 lizmat I welcome you to prove me wrong :-)
20:55 lue methinks that's a serious bug.
20:56 japhb__ That feels like a big bug
20:56 lizmat it's a known issue
20:56 FROGGS an Unibug!
20:56 diakopter deficiency, not bug
20:56 FROGGS diakopter: would moarvm have the same problem?
20:56 diakopter unclear.
20:56 japhb__ Is Unicode parsing O(n**2) or something?
20:57 lue r: my infix:<<"\x2603">>($a, $b) {say $a, "☄", $b}; say now - BEGIN now;
20:57 camelia rakudo 0dbbbf: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 'infix:<☃>' is not declared�at /tmp/pXM71Bdn7N:1�------> [32mmy infix:<<"\x2603">>[33m�[31m($a, $b) {say $a, "☄", $b}; say now - BE[0m�Malformed my�at /tmp/pXM71Bdn7N:1�------> [32mmy infix:<<"\x[33m�[31m2603">>($a, $b…»
20:57 jnthn diakopter: Won't because the problem is utf-8 being used as an internal representation
20:57 lue r: sub infix:<<"\x2603">>($a, $b) {say $a, "☄", $b}; say now - BEGIN now;
20:57 camelia rakudo 0dbbbf: OUTPUT«0.05488848␤»
20:57 jnthn diakopter: Which Moar doesn't do
20:57 lue r: sub infix:<☃>($a, $b) {say $a, "☄", $b}; say now - BEGIN now;
20:57 camelia rakudo 0dbbbf: OUTPUT«0.0537766␤»
20:57 jnthn Nor does JVM, so I imagine the setting bug doesn't exist there either
20:58 jnthn s/setting/unicode/
20:58 diakopter I find it funny that atoi is faster than utf8 indexing
20:59 lizmat lue: just insert "#∅" anywhere in the setting, and try to build  :-)
20:59 lue I could pull out my old laptop with an old old copy of rakudo on it, and see which setting compiles sooner :P
21:06 dalek nqp: 7d0611b | (Tobias Leich)++ | src/HLL/Grammar.nqp:
21:06 dalek nqp: [...]**0..1 to [...]? for dec_number
21:06 dalek nqp: review: https://github.com/perl6/nqp/commit/7d0611ba94
21:07 dmol joined #perl6
21:09 dalek rakudo/nom: 6f84eb5 | (Tobias Leich)++ | / (3 files):
21:09 dalek rakudo/nom: [...]**0..1 to [...]? for dec_number
21:09 dalek rakudo/nom:
21:09 dalek rakudo/nom: Also strip call to filter_number().
21:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f84eb5f43
21:13 zwut00 left #perl6
21:14 donaldh joined #perl6
21:14 dalek rakudo/nom: 147c1e0 | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
21:14 dalek rakudo/nom: Normalize Baggy.gist to make consistent with future Mixy.gist
21:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/147c1e01b9
21:15 dalek roast: cf33793 | (Elizabeth Mattijsen)++ | S02-types/bag (2 files):
21:15 dalek roast: Fix tests for new Baggy.gist format
21:15 dalek roast: review: https://github.com/perl6/roast/commit/cf33793a4e
21:23 raiph joined #perl6
21:26 raiph .tell fglock TimToady doesn't like $*OS: http://irclog.perlgeek.de/​perl6/2013-09-07#i_7555053
21:26 yoleaux raiph: I'll pass your message to fglock.
21:35 diakopter moritz: .cabal is in /root not ~p6eval
21:45 lizmat TimToady: .pick($n > 1) on a MixHash, how would that work?  I assume it won't work?  What to deduct for a chosen key?
21:46 lizmat (or on a Mix, for that matter)
21:47 TimToady I don't we need to support .pick on a Mix until someone comes up with a real use case
21:47 lizmat okidoki
21:49 * diakopter wonders what a Mix is
21:49 diakopter is that like a compilation of your fav songs on a tape?
21:50 TimToady kinda
21:50 diakopter or a saved setting of audio output levels?
21:50 TimToady with a marking that says how much you like each one
21:50 diakopter is it ordered?
21:50 TimToady no
21:51 TimToady it's a Bag with fractional balls
21:51 lizmat :-)
21:51 lizmat possibly negative even
21:51 TimToady or dice that are loaded
21:52 diakopter what is it keyed on
21:52 lizmat anything you want
21:52 TimToady anything that can be in a set or bag
21:53 aindilis joined #perl6
21:53 diakopter but its .Str ?
21:53 TimToady what about its .Str?
21:53 diakopter is that what it's keyed on?
21:53 TimToady no
21:53 japhb__ .WHICH?
21:54 TimToady 3rd base
21:54 diakopter .WHICH.Str ?
21:54 diakopter .WHO???
21:54 TimToady today, tomorrow...
21:54 lizmat $ perl6 -e 'Mix.new-fp((a=>1.5, b=>2.5)).Str.say'
21:54 lizmat a(1.5) b(2.5)
21:54 TimToady it's just an object hash
21:54 perigrin .o($doctor.WHO)
21:55 diakopter .oO( but who's on second )
21:56 TimToady beats me, I'm just the warmup band
21:56 perigrin .WHO is :on_first
21:56 japhb__ Speaking of which.  I've been taking a tuit here and there to try to unbitrot p6-pb (samuraisam/ssutch's Perl 6 Proto Buffers project).  It compares different nodes of its model using overloaded infix:<eq>.  Am I correct in thinking that it should overload infix:<eqv> instead?
21:56 BenGoldberg joined #perl6
21:56 diakopter http://www.archive.org/download/otr_abbo​ttandcostello/Abbott_and_Costello_-_Whos​_On_First_Original_30_Min_Live_Rad.mp3
21:57 lizmat diakopter: the current rakudo implementation uses the .WHICH of the object to key on, but keeps a copy of the object as well
21:57 diakopter why not the original?
21:57 diakopter (why a copy)
21:57 lizmat why not the original what ?
21:57 TimToady abbot and costello
21:57 lizmat ah, sorry, yes, the original
21:57 TimToady *tt
21:58 BenGoldberg The original Abbot and Costello?
21:58 PerlJam .oO( costtello? )
21:58 diakopter .oO( originttal? )
21:58 lizmat %h{object.WHICH} = ( object,value ) basically
21:59 lizmat $ perl6 -e '(a=>1.5, b=>2.5).Mix.Str.say'
21:59 lizmat a(1.5) b(2.5)
21:59 BenGoldberg What position is WHICH playing?
21:59 diakopter is there like a farce of the absurd where the level of absurdity becomes absurd?
21:59 TimToady if it were kept as object => value it'd be very easy to return .pairs
21:59 lizmat TimToady: it is
22:00 lizmat %h{object.WHICH} = ( object => value ) basically
22:00 lizmat :-)
22:01 PerlJam diakopter: If there is, #perl hasn't reached it yet (not for lack of trying though)
22:01 dalek rakudo/nom: 61580f2 | (Elizabeth Mattijsen)++ | / (8 files):
22:01 dalek rakudo/nom: Initial implementation of Mixy / Mix / MixHash, as per spec (almost)
22:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/61580f2465
22:01 FROGGS or we are beyond measurement
22:02 PerlJam oh, perhaps we've already "wrapped around" absurdity
22:02 lizmat and that's enough for today, absurdly enough
22:03 FROGGS /o\ we are trapped in an absurdity-loop! /o\
22:03 lizmat tomorrow I'll have a stab at fixing the private attribute visibility problem with roles
22:03 lizmat good night, #perl6!
22:04 lizmat the absurdity of my attempts will become clear tomorrow  :-)
22:04 FROGGS gnight!
22:04 FROGGS *g*
22:04 jnthn 'night, lizmat
22:04 PerlJam good night lizmat!  pleasant dreams!
22:04 TimToady oo/
22:05 japhb__ So *anyway* ... am I correct that the correct equivalence test for a tree node structure should be infix:<eqv>?
22:05 PerlJam japhb__: sounded right to me. but I'm no expert
22:05 TimToady well, === would only check that the two parent objects were the same object
22:06 TimToady (unless they happened to be immutable value trees)
22:06 bbkr joined #perl6
22:07 diakopter lizmat: nite
22:07 japhb__ OK, I'll patch that too.
22:09 perigrin ($witch.WHICH is which?)
22:11 BenGoldberg The absurdity of #perl6 is greater than א₀ but less than א₁
22:11 TimToady otoh, if you have two tree that you're just comparing fringes of, and don't care whether the nodes are the same, then eq is likelier to work, assuming .Str only emits the leaves
22:12 TimToady *treeses
22:13 japhb__ TimToady: "
22:13 japhb__ er
22:13 * TimToady ponders the relurdity of it all
22:13 REPLeffect joined #perl6
22:13 japhb__ TimToady: But wouldn't the infix:<eqv> multis be expected to know that's what makes sense for that tree?
22:14 TimToady japhb__: you'd think
22:14 japhb__ True, I would.  :-)
22:14 TimToady and, in fact, our string types might end up looking like that underneath
22:15 TimToady but the nodes would be an implementation detail
22:15 japhb__ Sure.
22:23 japhb__ What's the current idiom for marking that an attribute's value must be specified during object construction?  Is it still 'has $.foo = die "Must specify a value for the foo attribute when constructing $?CLASS"' ?
22:23 japhb__ Because ... eww/
22:23 TimToady nothing better yet
22:24 TimToady course, one could define something that was shorter
22:24 japhb__ I can see why samuraisam just specified a new() to allow required params ...
22:25 japhb__ At one point I thought we discussed 'has $.foo is required' or somesuch, but ISTR there was some reason it wouldn't work at the time.  Can we resurrect that now?
22:27 bluescreen10 joined #perl6
22:28 TimToady r: class Foo { has $.foo = !!! }; Foo.new
22:28 camelia rakudo 61580f: OUTPUT«Stub code executed␤  in method  at /tmp/pt7C4gVK33:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤  in method new at src/gen/CO…»
22:28 TimToady that's pretty short :)
22:28 japhb__ Heh
22:29 japhb__ Too bad that for this use the error ends up being LTA ...
22:29 TimToady r: class Foo { has $.foo = !!! 'foo' }; Foo.new
22:29 camelia rakudo 61580f: OUTPUT«foo␤  in method  at /tmp/eDuIMWOTlG:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤  in method new at src/gen/CORE.setting:798␤…»
22:30 japhb__ r: class Foo { has $.foo = !!! 'foo value required' }; Foo.new
22:30 camelia rakudo 61580f: OUTPUT«foo value required␤  in method  at /tmp/1dTnTyRS6h:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤  in method new at src/gen/CO…»
22:30 japhb__ Hmmmm.
22:31 TimToady r: class Foo { has $.foo is default(42) }; Foo.new
22:31 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/wdXQzQzjRMâ�¤Can't use unknown trait 'is default' in an attribute declaration.â�¤at /tmp/wdXQzQzjRM:1â�¤------> â�¤    expecting any of:â�¤        rwâ�¤        readonlyâ�¤        box_targetâ�¤Â»
22:32 TimToady looks like we have traits on attrs now though, at least syntactically
22:32 TimToady well, we always had rw
22:32 jnthn multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method () { die "$a.name is required" } }; class Foo { has $.foo is required; }; Foo.new
22:32 jnthn r: multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method () { die "$a.name is required" } }; class Foo { has $.foo is required; }; Foo.new
22:32 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/AEA5wD1dsZ�Unable to parse expression in argument list; couldn't find final ')'�at /tmp/AEA5wD1dsZ:1�------> [32mmethod () { die "$a.name is required" } [33m�[31m}; class Foo { has $.foo is required; …»
22:33 dalek nqp: e0585e5 | (Tobias Leich)++ | src/NQP/ (2 files):
22:33 dalek nqp: [...]**0..1 to [...]? in deflongname
22:33 dalek nqp: review: https://github.com/perl6/nqp/commit/e0585e55db
22:33 dalek nqp: ab37e54 | (Tobias Leich)++ | src/NQP/ (2 files):
22:33 dalek nqp: [...]**0..1 to [...]? in statement
22:33 jnthn r: multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method () { die "$a.name is required" }) }; class Foo { has $.foo is required; }; Foo.new
22:33 camelia rakudo 61580f: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method <anon> at /tmp/mCzly_jDrt:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen…»
22:33 jnthn r: multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method (Z) { die "$a.name is required" }) }; class Foo { has $.foo is required; }; Foo.new
22:33 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/fqg_X28Qey�Invalid typename 'Z' in parameter declaration.�at /tmp/fqg_X28Qey:1�------> [32ma, :$required!) { $a.set_build(method (Z[33m�[31m) { die "$a.name is required" }) }; clas[0m�»
22:33 jnthn argh
22:33 dalek joined #perl6
22:33 jnthn r: multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method (|) { die "$a.name is required" }) }; class Foo { has $.foo is required; }; Foo.new
22:33 camelia rakudo 61580f: OUTPUT«$!foo.name is required␤  in method <anon> at /tmp/qh6KpO8Ymi:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤  in method new at …»
22:33 jnthn r: multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method (|) { die "$a.name() is required" }) }; class Foo { has $.foo is required; }; Foo.new
22:33 camelia rakudo 61580f: OUTPUT«$!foo is required␤  in method <anon> at /tmp/GBIcDY7c76:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤  in method new at src/g…»
22:34 jnthn Or something like that :)
22:34 TimToady obviously completely impossible yet :)
22:34 jnthn Yeah. Can't be done. :)
22:34 jnthn r: multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method (|) { die "$a.name().substr(2) is required" }) }; class Foo { has $.foo is required; }; Foo.new # neater, I guess
22:34 camelia rakudo 61580f: OUTPUT«foo is required␤  in method <anon> at /tmp/0xG2PeY5Hw:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤  in method new at src/gen…»
22:35 jnthn r: multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method (|) { die "$a.name().substr(2) is required to construct a {self.^name}" }) }; class Foo { has $.foo is required; }; Foo.new # informativer
22:35 camelia rakudo 61580f: OUTPUT«foo is required to construct a Foo␤  in method <anon> at /tmp/NAZsRkFb7z:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤  in me…»
22:35 TimToady couldn't we find a longer name than "required"?  required-to-be-initialized-or-else
22:35 FROGGS is needed
22:35 jnthn is obligatory
22:36 diakopter is mandatory?
22:36 japhb__ is needy  # ;-)
22:36 diakopter is necessary
22:36 diakopter is crucial
22:36 TimToady is critical
22:36 TimToady is a must
22:36 diakopter is indispensable
22:36 FROGGS has $.mass is critical
22:37 japhb__ *BOOM*
22:38 BenGoldberg indispecriticucianecesseedatory
22:38 diakopter perfect
22:38 TimToady r: class Foo { has Int:D $.foo }; Foo.new
22:38 camelia rakudo 61580f: ( no output )
22:38 TimToady seems like that should blow up
22:38 jnthn No idea how or where. :)
22:38 diakopter n: class Foo { has Int:D $.foo }; Foo.new
22:38 camelia niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Only simple types may be attached to variables at /tmp/Y3qXTs_T0b line 1:â�¤------> [32mclass Foo { has Int:D[33mâ��[31m $.foo }; Foo.new[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.sett…»
22:39 FROGGS ohh, it blows
22:39 diakopter up.
22:39 TimToady niecza++ for knowing when it doesn't know :)
22:39 FROGGS r: my Int:D $x
22:39 camelia rakudo 61580f: ( no output )
22:40 BenGoldberg rn: class Foo { has int:D $foo }; Foo.new.say
22:40 FROGGS :D
22:40 camelia rakudo 61580f: OUTPUT«Foo.new()␤»
22:40 camelia ..niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed has at /tmp/Mb0HsJlL6h line 1:�------> [32mclass Foo { has[33m�[31m int:D $foo }; Foo.new.say[0m��Parse failed��»
22:41 TimToady if Int:D is an invariant, we seem to be varying rather early
22:41 japhb__ "invariants aren't"?
22:42 kay joined #perl6
22:42 BenGoldberg And here I thought :D was a smiley face.
22:44 TimToady the Int:D approach would also prevent people from setting it to an undefined value later
22:44 TimToady would be nice if it could be used to check initialization too
22:45 jnthn Might be able to fudge a way :)
22:45 TimToady I suppose we could check for it particularly and install an = die "Must be initialized to an defined value"
22:45 TimToady or some such
22:46 TimToady but only if there isn't an = pseudoassignment already
22:46 jnthn I was pondering sticking it into the buildplan somehow...
22:46 TimToady that'd work for my as well as has, seems
22:46 jnthn Hm
22:46 jnthn Isn't
22:46 jnthn my Int:D $x;
22:46 jnthn Just statically an error?
22:47 TimToady yes, could be
22:48 * TimToady ponders the Int():D type...
22:48 BenGoldberg Here's another "wouldn't it be nice" ... if there were a way to tell perl that certain of a class's member values should be initialized *positionally* from the constructor's argument list.
22:49 * lue thinks at some point you should stop relying on the default constructor
22:49 TimToady there is, it's called writing your own constructor
22:49 BenGoldberg So I could say: class Foo { has $bar <something something>; }; my $baz = new Foo(4); # $baz.bar is now 4
22:49 jnthn TimToady: Yes, the combinatorics there are one thing that's made me not be too hasty to work on these ;-)
22:49 TimToady note, however, that it doesn't support derived classes very well to use positionals
22:49 lue BenGoldberg: method new($attr1) { ... } :)
22:51 TimToady it's almost easy, if you name the positionals right, and you can bless 'em as :$myattr
22:51 ajr_ should perl6 -e "for 1..3 {say $_}" not give the same output as  perl6 -e "for 1..3 {.say }" ?
22:51 ajr_
22:51 lue I can't help but wonder if "this attribute is required" is common enough to save people from writing :$attr! filled constructors themselves. I'm middle-of-the-road on the issue.
22:51 BenGoldberg r: for 1..3 { say $_ }; for 1..3 { .say }
22:51 camelia rakudo 61580f: OUTPUT«1␤2␤3␤1␤2␤3␤»
22:52 lue ajr_: .say is equal to $_.say
22:52 donaldh Hmmm, eager ListIters allocate a 100_000 element SixModelObject[] right off the bat.
22:52 lue (which is equal to say $_)
22:52 ajr_ The first produces 1..3
22:52 ajr_ True
22:52 ajr_ 3 times
22:52 ajr_ The second:
22:52 ajr_ 1
22:52 ajr_ 2
22:52 ajr_ 3
22:52 lue r: for 1..3 {.say };
22:52 camelia rakudo 61580f: OUTPUT«1␤2␤3␤»
22:53 BenGoldberg What do you mean, 1..3 three times?
22:53 TimToady how old is your rakudo?
22:53 ajr_ 1..3
22:53 ajr_ True
22:53 ajr_ 1..3
22:53 ajr_ 2013.09
22:53 lue r: for 1...3 {say $_}
22:53 camelia rakudo 61580f: OUTPUT«1␤2␤3␤»
22:53 TimToady 1..3 and 1...3 should be equivalent in list context
22:53 jnthn ajr_: On Parrot or JVM, and where are you running it?
22:54 ajr_ parrot
22:54 TimToady isn't camelia using parrot?
22:54 diakopter not for long
22:54 BenGoldberg ajr: When you type "perl6 -e ...", what shell are you using?
22:55 ajr_ bash
22:55 TimToady so $_ is getting interplated by the shell?
22:55 BenGoldberg If the shell's environment variable _ contains "1..3", and if your shell is interpolating $_, you could be getting unexpected results
22:55 lue try perl6 -e ' ... ' instead of perl6 -e " ... "
22:55 TimToady since it's in double quotes
22:55 ajr_ doh!
22:55 BenGoldberg :)
22:56 TimToady ajr_: don't feel special, we all do this one from time to time
22:56 ajr_ That was it. Sorry.
22:57 donaldh rakudo allocates 15 of these 100_000 element SixModelObject[]s before it can 'say 1'.
22:57 japhb__ Shell quoting: it's why Perl has arbitrary quote constructs.
22:57 japhb__ donaldh: Why 100_000?
22:58 jnthn donaldh: Hm. That's a little over-keen...
22:58 donaldh japhb__: a page up
22:59 japhb__ donaldh: I meant, where did that magic number come from?
23:00 donaldh japhb__: in ListIter.pm   my int $max = 100_000;
23:00 * japhb__ has been iterating on the error message from an 'is required' sort of construct.  How does "Foo::Bar requires a value for attribute foo" sound?
23:00 donaldh an eager ListIter allocates an array this size.
23:00 japhb__ Ah.
23:00 jnthn Well, it wants to avoid having to resize...
23:01 jnthn But yeah, that's a big chunk size.
23:01 japhb__ s/00_//
23:01 donaldh The weird thing is these seem to get allocated just to load the CORE.setting.
23:01 diakopter jnthn: I think it should x8 in size until 100k or so, then just double like usual
23:02 japhb__ Is power-of-two an advantage?  Would a chunk size of 2 ** N be better than 10 ** M ?
23:02 kivutar joined #perl6
23:03 jnthn diakopter: The resizing is *exactly* what we're trying to avoid.
23:03 jnthn japhb__: yes, most likely
23:03 BenGoldberg Why not profile it somehow?
23:03 diakopter jnthn: I'm saying that would reduce it a lot
23:03 japhb__ jnthn: Sure, but log base 8 (N / 1024) is going to be pretty small.
23:04 BenGoldberg See what happens if your set $max to ... 10 or so, and keep track of how many times it gets resized... then change $max so it's just big enough to not resized while loading CORE.setting.
23:04 donaldh As an aside, a min size of 8 for VMArrayInstance is quite wasteful when parsing CORE.setting. Very many < 4 element arrays.
23:04 donaldh Very many single element arrays.
23:05 japhb__ Didn't niecza have an optimization for that at one point?
23:05 TimToady perl 5 always starts with 4, iirc
23:05 TimToady or did, last I looked
23:05 donaldh BTW these 15 arrays are full of nulls
23:07 jnthn donaldh: Do they live?
23:07 BenGoldberg japhb__: What happens if Foo::Bar requires a value for $.foo, and also for @.foo?  Does it print the same error message twice?
23:07 donaldh let me check again.
23:08 jnthn BenGoldberg: You won't make it past compile time, iirc...
23:08 japhb__ BenGoldberg: How would you even do that?  Constructors expect to refer to attributes using the un-sigiled name ....
23:08 jnthn r: class A { has $.foo; has @.foo; }
23:08 camelia rakudo 61580f: OUTPUT«===SORRY!===␤Two or more attributes declared that both want an accessor method 'foo'␤»
23:08 TimToady ah, yes, note that perl 5 only extends by 20% !!!
23:08 TimToady newmax = key + AvMAX(av) / 5;
23:08 BenGoldberg Ahh, ok, nevermind
23:09 TimToady and gets by fine with that
23:09 TimToady the overhead of copying pointers gets swamped by the overhead of actually putting more stuff into the array
23:09 TimToady so it's better to guess small
23:09 diakopter fsdo of "gets" "by" and "fine"
23:09 donaldh jnthn: yes, they are still referenced, while at the REPL prompt
23:09 jnthn donaldh: eek, ok
23:10 jnthn r: 15 * 100_000 * 8
23:10 camelia rakudo 61580f: ( no output )
23:10 jnthn r: say 15 * 100_000 * 8
23:10 camelia rakudo 61580f: OUTPUT«12000000␤»
23:10 japhb__ jnthn: That error reminds me ... what's the BCP for error messages with regards to quoting interpolants?  Meaning, should we be saying "method foo" or "method 'foo'"?
23:10 jnthn japhb__: Typically quote method names, but not type names (as the uppercase starting letter is clue enough)
23:11 TimToady diakopter: p5 relies on the programmer to pre-extend the array if they have better knowledge
23:11 japhb__ OK, and I assume quote attribute names as well, since they lack the uppercase.
23:11 jnthn makes sense
23:11 TimToady but 100_000 is just stupid
23:12 diakopter well, lazy anyway
23:12 japhb__ And how big is an array slot?  One pointer?  Or a full object inlined?
23:12 donaldh jnthn: they are referenced by oLex and oRet of various CallFrames.
23:12 japhb__ Oh, I see you used * 8, so I'm assuming one pointer
23:13 donaldh jnthn: the graph of CallFrames seems to go on for evah
23:14 TimToady diakopter: this seems like a better time to be impatient than to be lazy :)
23:15 jnthn That may be due to the prior_invocation thing that I managed to kill off over in MoarVM and now need to do for the JVM.
23:15 jnthn TimToady: Well, it's *meant* to do this when it knows there's a huge number of things coming. Apparently it's doing it when it doesn't know.
23:15 donaldh well, caller [ <- caller ]+ <- priorInvocation
23:15 donaldh yeah
23:16 TimToady maybe we should remember how many things we got last time we did this :)
23:16 diakopter sshhh don't give away all the secrets
23:17 donaldh Yeah, eagerness is triggered by: my $eager = nqp::p6bool(nqp::istype($n, Whatever) || $n == $Inf);
23:17 TimToady seems like that should trigger laziness, not eagerness
23:17 donaldh oops, wrong paste. my $eager = nqp::p6bool(nqp::istype($n, Whatever));
23:18 TimToady still
23:18 TimToady this couldn't be the for eagerness bug, could it?
23:19 TimToady hmm, doesn't seem like it could
23:19 jnthn I *think* that's something else, but I've known since Austin Pm wants to re-do various things in lists, including to support the hyper/race things
23:20 donaldh oh, look at the hour.
23:20 donaldh goodnight o/
23:20 jnthn 'night, donaldh++
23:20 TimToady yes, we talked about that; we don't really need to pass all those contexts down the stack, but we do need to at least know when there's going to be a list-context handshake of some sort
23:20 TimToady o/
23:21 jnthn *nod*
23:21 jnthn Anyway, I'm inclined to wait for that to happen rather than try to patch it here and there...
23:21 TimToady since you have to generate one on the caller end as well as the callee
23:21 TimToady a simple dynvar ain't gonna cut it
23:22 jnthn *nod*
23:23 jnthn The one list-y thing I do plan to refactor in the next weeks is feeds, but that'll be after the monthly release...
23:23 jnthn Want to try and get them to the point where I can do the producer/consumer stuff on JVM.
23:24 jnthn For now though, I want to sleep :)
23:24 jnthn 'night o/
23:24 TimToady \o
23:36 TimToady nr: constant @fact = 1, * * ++(my $) ... *; say @fact[5]
23:36 camelia niecza v24-95-ga6d4c5f: OUTPUT«120␤»
23:36 camelia ..rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XM9g02xuRa�Unsupported use of $) variable; in Perl 6 please use $*EGID�at /tmp/XM9g02xuRa:1�------> [32mconstant @fact = 1, * * ++(my $)[33m�[31m ... *; say @fact[5][0m�»
23:36 TimToady nr: constant @fact = 1, * * ++(my $ ) ... *; say @fact[5]
23:36 camelia rakudo 61580f, niecza v24-95-ga6d4c5f: OUTPUT«120␤»
23:37 TimToady std: constant @fact = 1, * * ++(my $) ... *; say @fact[5]
23:37 camelia std 4cde04e: OUTPUT«ok 00:00 46m␤»
23:37 TimToady I guess the fix for that hasn't got into rakudo yet
23:44 lue TimToady: what's the purpose of (my $) anyway? Not upset about it, but just curious :) .
23:47 geekosaur evil way to make a closure with a "static" local variable (WhateverCode)
23:47 TimToady it's just an anonymous variable
23:48 TimToady nr: constant fact = 1, * * ++my $ ... *; say fact[5]
23:48 camelia rakudo 61580f: OUTPUT«120␤»
23:48 camelia ..niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤  at Builtins.InvokeSub (Niecza.P6any obj, Niecza.Variable[] pos) [0x00000] in <filename unknown>:0 ␤  at Niecza.Kernel.ToComposable (Niecza.STable…»
23:48 TimToady I guess we really don't need the parens there
23:48 TimToady lovely nieczabug, btw
23:50 TimToady r: constant fact = 1, * * ++my$ ... *; say fact[5]
23:50 camelia rakudo 61580f: OUTPUT«120␤»
23:50 TimToady I guess my doesn't require ws
23:54 * TimToady wonders if my$ will catch on as an idiom
23:55 BenGoldberg r: constant fact = 1, * * ++my$ ... *; say fact[^5]
23:55 camelia rakudo 61580f: OUTPUT«1 1 2 6 24␤»
23:55 TimToady nr: say my$++ for 1..5
23:55 camelia niecza v24-95-ga6d4c5f: OUTPUT«0␤1␤2␤3␤4␤»
23:55 camelia ..rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BAxHQZsC_tâ�¤Undeclared routine:â�¤    for used at line 1â�¤â�¤Â»
23:56 BenGoldberg Undeclared routine:[empty name]? :)
23:56 TimToady say what?
23:57 TimToady guess it's parsing as ( my $ ) + + for
23:59 TimToady nr: say my$++
23:59 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/p_iFSPZcxpâ�¤Two terms in a rowâ�¤at /tmp/p_iFSPZcxp:1â�¤------> [32msay my$++[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤        constraintâ�¤        postfixâ�¤        infix stopperâ�¤    â€¦Â»
23:59 camelia ..niecza v24-95-ga6d4c5f: OUTPUT«0␤»
23:59 TimToady um...

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

Perl 6 | Reference Documentation | Rakudo