Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-02-15

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Kristien But that shouldn't really be a problem, since structs tend to have very low amount of fields and there are very few structs.
00:00 dalek specs: 5a4a8f7 | TimToady++ | S32-setting-library/Numeric.pod:
00:00 dalek specs: document polymod
00:00 dalek specs: review: https://github.com/perl6/specs/commit/5a4a8f7ecb
00:00 Kristien it's here: http://coliru.stacked-croo​ked.com/a/4408f5375893d6c5 I don't know how to calculate its complexity though
00:08 skids joined #perl6
00:08 kaare_ joined #perl6
00:08 vendethiel joined #perl6
00:14 kjs_ joined #perl6
00:26 zakharyas joined #perl6
00:36 ruoso is there a way to disable the jit from the command line? or maybe even from the build? I have a segfault in Moar and I'd like having to debug jit-genrated assembly if possible
00:36 ruoso s/having/to avoid having/
00:38 raydiak ruoso: moar --help mentions an env var MVM_JIT_DISABLE
00:38 timotimo indeed
00:38 Mouq It also looks like you can set --jit=0 in the MoarVM build, if you want :P
00:38 vendethiel joined #perl6
00:39 timotimo i think it'd have to be --no-jit
00:39 timotimo or maybe --disable-jit
00:39 timotimo but disabling the jit via env var should work well, too
00:40 ruoso thanks, I'll give it a try
00:40 dalek rakudo-star-daily: c25c2d2 | coke++ | log/ (14 files):
00:40 dalek rakudo-star-daily: today (automated commit)
00:40 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/c25c2d2ca2
00:40 dalek perl6-roast-data: f327f9a | coke++ | / (5 files):
00:40 dalek perl6-roast-data: today (automated commit)
00:40 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/f327f9a338
00:43 ruoso yeah, the env var does work...
00:44 ruoso it doesn't make the debugging easier, however
00:44 ruoso since I only have 6 frames... since it's a trampoline function
00:45 ninjazach joined #perl6
00:45 * ruoso will try running on valgrind instead
00:46 [Coke] moritz++: yes, http://hack.p6c.org/ looks great, thanks.
00:52 cxreg the decision to suspend parrot comes almost exactly 2 years following http://modernperlbooks.com/mt/​2013/02/goodnight-parrot.html
00:53 masak cxreg: and whiteknight wrote another postmortem recently.
00:56 dalek doc: 5d6fbec | Mouq++ | htmlify.p6:
00:56 dalek doc: Improve &find-definitions documentation a bit
00:56 dalek doc: review: https://github.com/perl6/doc/commit/5d6fbecf1f
00:56 dalek doc: d0e49b2 | Mouq++ | lib/Language/about.pod:
00:56 dalek doc: Add a basic about page (mostly about contributing)
00:56 dalek doc:
00:56 dalek doc: Currently stored in lib/Language, but perhaps should be special-cased at
00:56 dalek doc: some point.
00:56 dalek doc: review: https://github.com/perl6/doc/commit/d0e49b2ee2
01:00 Kristien time to sleep, bye!
01:06 dalek doc: 170ae16 | Mouq++ | lib/Language/unicode_entry.pod:
01:06 dalek doc: [unicode_entry] Condense title and add an elided sigil
01:06 dalek doc: review: https://github.com/perl6/doc/commit/170ae16913
01:08 dalek doc: 9e6656a | Mouq++ | lib/Language/unicode_entry.pod:
01:08 dalek doc: [unicode_entry] swap entering and inputting so it sounds better
01:08 dalek doc: review: https://github.com/perl6/doc/commit/9e6656a1fd
01:12 pippo o/ #perl6
01:12 pippo left #perl6
01:12 ninjazach joined #perl6
01:15 kaare_ joined #perl6
01:21 zmisc joined #perl6
01:22 telex joined #perl6
01:33 ninjazach joined #perl6
01:41 vendethiel joined #perl6
01:42 dayangkun joined #perl6
01:45 TimToady m: say 1000000.polymod(60,60,24)
01:45 camelia rakudo-moar 0e6127: OUTPUT«40 46 13 11␤»
01:46 TimToady m: say 1000000.polymod(3 xx *)
01:46 camelia rakudo-moar 0e6127: OUTPUT«1 0 0 2 0 2 0 1 2 2 1 2 1 0␤»
01:46 TimToady maybe shouldn't return that last 0
01:48 colomon polymod?
01:49 timotimo it's like "base", but having different bases for different digits
01:49 chenryn joined #perl6
01:49 colomon on the one hand, Nice!  on the other hand, we’ve got that in core?
01:50 colomon is there an inverse function for it?
01:51 timotimo Z*
01:51 timotimo well, more or less
01:51 timotimo with a [\*] added in there for good measure
01:52 timotimo bbl
01:52 kaare_ joined #perl6
01:52 timotimo actually, bedtime
01:54 chenryn_ joined #perl6
01:54 masak colomon: it being in core makes more sense if you have an APL background.
01:55 masak (not being funny or sarcastic; it does)
01:55 colomon masak: wouldn’t it be a Unicode operator, then?  ;)
01:55 * colomon probably shouldn’t encourage TimToady++ that way
01:55 TimToady I heard that
01:56 TimToady no, actually, it needs to be dehuffmanized
01:56 TimToady it's really just a divmod that knows how to do it more than once
01:56 TimToady in fact, divmod is just a degenerate case
01:56 colomon putting it in a module is the ultimate dehuffmanization.  ;)
01:56 * TimToady has wanted it too many time already
01:57 * colomon too, actually.  but never knew it until now.
01:57 * TimToady has talked about it on various occasions, but only named it today
01:58 TimToady probably wants a polymul to go the other way
01:59 dalek rakudo/nom: df5b31e | Mouq++ | src/Perl6/Actions.nqp:
01:59 dalek rakudo/nom: Implement #74850 "has Array $.x .= new(1, 2, 3);"
01:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/df5b31eae0
01:59 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=74850
01:59 masak in fact, APL holds some kind of prize for generalizing scalar ops to vector and N-dimensional matrix ops, and still having the reader go "huh, yeah. that makes sense."
01:59 masak 'night, #perl6
01:59 colomon o/, masak
01:59 TimToady o/
02:05 dalek roast: 3be9a84 | Mouq++ | S12-class/attributes.t:
02:05 dalek roast: Unfudge test for #74850
02:05 dalek roast: review: https://github.com/perl6/roast/commit/3be9a84a9a
02:05 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=74850
02:05 ruoso The sudoku solve I wrote a while back actually runs pretty fast now... added a few optimizations https://github.com/ruoso/perl6​-sudoku/blob/master/sudoku.pl
02:07 TimToady ruoso: how does it compare with http://rosettacode.org/wiki/Sudoku#Perl_6 ?
02:08 ruoso It is more complex, because it tries to do a smarter solution instead of brute-forcing it
02:09 TimToady feel free to add it as an additional solution to RC
02:11 vendethiel joined #perl6
02:11 ruoso I probably need to clean it up a lot
02:11 Mouq m: my @A = < 5 3 0  0 2 4  7 0 0  0 0 2  0 0 0  8 0 0 >; say @A.rotor(3,0).rotor(3,0).map(*.join("  ")).join("\n")
02:11 camelia rakudo-moar 0e6127: OUTPUT«5 3 0  0 2 4  7 0 0␤0 0 2  0 0 0  8 0 0␤»
02:14 ruoso specifically, it does three things.. 1) cleanup impossible values from the whole grid in a separate pass. 2) try solving the cells that are the easiest first. and 3) tries guessing the numbers that are the most unique in the candidates
02:15 ruoso for some medium-level sudokus, this results in incredibly efficient guessing.. if the puzzle is not too hard, this will lead to a faster search path for the solution
02:16 bjz joined #perl6
02:18 ruoso I then tried to make it parallel, but moarvm segfaults in non-consistent ways... I tried debugging, but every run breaks at a different point...
02:22 BenGoldberg joined #perl6
02:23 TimToady yeah, there's still a bit of instability to hunt down there
02:27 ninjazach Hello, I'm interested in experimenting with perl 6 and am wondering if Rakudo was the recommended implementation?
02:28 ninjazach s/was/is
02:30 Mouq ninjazach: It definitely is :)
02:31 Mouq ninjazach: Rakudo built on MoarVM, in particular
02:31 ninjazach Thank you :)
02:32 * ninjazach begins casually reading some documentation
02:37 echowuhao joined #perl6
02:46 vendethiel joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:49 aborazmeh joined #perl6
02:49 aborazmeh joined #perl6
02:49 kurahaupo1 joined #perl6
02:52 TimToady ninjazach: and feel free to ask questions here, like you already did :)
02:54 TimToady though many of the implementors are asleep at the moment 'cause they're sun runs faster than ours
02:54 TimToady *their
02:55 colomon joined #perl6
02:56 dalek rakudo/nom: 0411dd3 | TimToady++ | src/core/ (2 files):
02:56 dalek rakudo/nom: don't include final 0 in infinite polymod
02:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0411dd34d9
02:57 bcode ooh, polymod looks really nice
03:07 noganex_ joined #perl6
03:13 vendethiel joined #perl6
03:14 dalek rakudo/nom: 0b48529 | Mouq++ | src/ (2 files):
03:14 dalek rakudo/nom: Port error message from STD.pm6 for #123834
03:14 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123834
03:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0b48529b50
03:14 dalek rakudo/nom: 6245cfb | Mouq++ | src/ (2 files):
03:14 dalek rakudo/nom: Try to awesomify error for #123834
03:14 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123834
03:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6245cfb993
03:14 dalek rakudo/nom: 0759eba | Mouq++ | src/core/ (2 files):
03:14 dalek rakudo/nom: Merge branch 'nom' of http://github.com/rakudo/rakudo into nom
03:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0759eba8f1
03:20 dalek roast: afbce9b | Mouq++ | S32-exceptions/misc.t:
03:20 dalek roast: Add test for #123834
03:20 dalek roast: review: https://github.com/perl6/roast/commit/afbce9be9a
03:20 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123834
03:21 BenGoldberg joined #perl6
03:23 dalek roast: 928ad9b | Mouq++ | S32-exceptions/misc.t:
03:23 dalek roast: Typo, s/RE/RT
03:23 dalek roast: review: https://github.com/perl6/roast/commit/928ad9b595
03:25 tinyblak joined #perl6
03:37 yeahnoob joined #perl6
03:37 vendethiel joined #perl6
04:22 jdv79 since when does it need to be 18F out?
04:31 nyuszika7h joined #perl6
04:31 vendethiel joined #perl6
04:31 lsm-desktop joined #perl6
04:32 rmgk joined #perl6
04:36 xtreak joined #perl6
04:38 skids No wind chill and only 3" powder to shovel.  Gonna count my blessings.
04:40 geekosaur 18F? heat wave
04:41 chenryn_ joined #perl6
04:41 geekosaur it's 1°F and still dropping, expected low around -10°F with winds gusting to 40mph
04:42 jdv79 i think its only gotten to -7F here this year and that's abnormally low i feel.
04:42 jdv79 normally the teens is about the lowest
04:44 jdv79 a heat wave was thursday in the city when the high was 38F.  i almost felt like taking a walk at lunch.
04:46 colomon joined #perl6
04:53 flussence I've yet to see below 0°C this year :(
04:54 clkao joined #perl6
04:56 nyuszika7h joined #perl6
04:56 lsm-desktop joined #perl6
04:57 skarn joined #perl6
04:59 * TimToady wonders if anyone will ever use the ℃ and ℉ characters
05:01 jdv79 i just see 2 boxes that look identical
05:12 TimToady m: say uniprop '℉', 'age'
05:12 camelia rakudo-moar 0759eb: OUTPUT«1.1␤»
05:13 TimToady these characters have only been in Unicode for a century or two by now... :P
05:15 Aaron`J joined #perl6
05:17 TimToady well, okay, it's only been 22 years now, but that's Even Longer Than We've Been Working On Perl 6!!!
05:18 TimToady those characters were added when Perl 5 first came out
05:20 TimToady No More Excuses!!!
05:21 TimToady </soapbox>
05:22 TimToady (and by first came out, I mean 5.000alpha1, not 5.000)
05:30 pierrot_ joined #perl6
05:30 vendethiel joined #perl6
05:31 jdv79 maybe cause they probably aren't on any keyboard.  i know i never use a char that's not on my keyboard.
05:32 chenryn_ joined #perl6
05:34 TimToady there is no ctrl-C key on your keyboard
05:34 TimToady so that argument is specious
05:34 jdv79 there is a ctrl and a c
05:34 TimToady there is a compose key on many keyboards too
05:35 TimToady and the people who typed ° probably did it with compose o o
05:35 TimToady all those keys are on my keyboard :)
05:36 skids Yeah but the default mapping is pretty sparse.  Most letter combos don't do anything.
05:37 TimToady and on mine, I can type any char using ctrl-shift u plus the hex code, if I know it
05:37 TimToady so ␤ is one that I already know, 2424
05:37 jdv79 had you not pointed it out i would have never guessed there were "degrees (C|F)" glyphs in unicode
05:37 TimToady (an easy one to remember, but it'd be nice if there were a compose n l for that
05:37 skids Yeah, the letter combos are much easier to remember though.  And so many missed opportunities for obvious ones.
05:38 TimToady jdv79: you might've guessed if you had a decent font, but that's a different issue
05:39 * flussence notices ␤ is rendering from a different font today... bah, I liked the old one I had.
05:39 jdv79 i thought i had a clean utf-8 setup too...
05:39 chenryn__ joined #perl6
05:40 TimToady do you get cjk characters like 木?
05:40 jdv79 yes
05:40 TimToady if you get a single box for that, then your utf-8 is probably fine, it's just a font issue
05:40 TimToady if you get multiple boxes, you're not utf-8 clean
05:41 TimToady so just a font thing
05:41 jdv79 no, i get a cross with 2 extra diagonal legs
05:42 TimToady lol
05:42 integral joined #perl6
05:42 integral joined #perl6
05:43 TimToady m: say 123456789.polymod(10 xx *)
05:43 camelia rakudo-moar 0759eb: OUTPUT«9 8 7 6 5 4 3 2 1␤»
05:43 hobbs joined #perl6
05:46 flussence m: say ('0'..'9','A'..'Z','a'..'z','​-','_')[4294967296.polymod(64 xx *)]
05:46 camelia rakudo-moar 0759eb: OUTPUT«0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 _␤»
05:46 flussence bah, not quite what I was going for...
05:46 flussence m: say ('0'..'9','A'..'Z','a'..'z','-','_'​).flat.list.[4294967296.polymod(64 xx *)]
05:46 camelia rakudo-moar 0759eb: OUTPUT«0 0 0 0 0 4␤»
05:47 flussence m: say 4294967296.polymod(64 xx *)
05:47 camelia rakudo-moar 0759eb: OUTPUT«0 0 0 0 0 4␤»
05:50 TimToady a power of 2 is gonna come out boring there
05:51 flussence yep... probably should've picked a more interesting one :)
05:52 flussence m: say ('0'..'9','A'..'Z','a'..'z','-','_'​).flat.list.[2718281828.polymod(64 xx *)]
05:52 camelia rakudo-moar 0759eb: OUTPUT«a 1 R 1 Y 2␤»
05:52 TimToady surely .flat already returns a list?
05:53 flussence that's just me being paranoid
05:54 skids Now we just need shorter $a - $a mod $b and ($a + $b - 1) div $b
05:54 flussence m: say 14 divmod 5
05:54 camelia rakudo-moar 0759eb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/oabhKLpB1Aâ�¤Two terms in a rowâ�¤at /tmp/oabhKLpB1A:1â�¤------> [32msay 14 [33mâ��[31mdivmod 5[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix or meta-infixâ�¤        postfix…»
05:54 flussence aw
05:54 TimToady m: say 14.polymod(5)
05:54 camelia rakudo-moar 0759eb: OUTPUT«4 2␤»
05:54 TimToady works fine for that
05:55 TimToady just returns it in the reverse of the usual order
05:55 flussence (am I hallucinating divmod? could've sworn it was a thing...)
05:56 TimToady python maybe
05:56 TimToady only it's divmod(n,m) there
05:56 TimToady or you might be thinking of expmod
05:57 TimToady but that's a method
05:57 flussence I plead temporary insanity for that then
05:58 TimToady polymod could certainly be an infix, but it doesn't seem quite to rise to the level of necessity
05:59 flussence (I have to admit, polymod is one of the cleverer things I've seen in any language... :)
06:00 TimToady and there are various possible optimizations too
06:01 TimToady 10 xx * is notationally convenient, but actually doing it that way when it's a constant divisor is kinda silly
06:02 TimToady plus if the number fits into a native int, once could do all the operations at a low level
06:02 TimToady the current implementation attempts none of those
06:05 Mouq TimToady: 123456789.polymod(10, *) ?
06:11 Humbedooh joined #perl6
06:11 Humbedooh joined #perl6
06:11 dalek doc: 69b1eb8 | Mouq++ | / (3 files):
06:11 dalek doc: Let =TITLE set names of type docs; stub nativeInt.pod as example
06:11 dalek doc:
06:11 dalek doc: Although really, I'm thinking that it's more likely that the int and
06:11 dalek doc: uint classes are going to end up being defined in a Language/natives.pod
06:11 dalek doc: file or such along with str and num.
06:11 dalek doc: review: https://github.com/perl6/doc/commit/69b1eb8c32
06:12 Mouq .ask moritz What do you think of https://github.com/perl6/doc/commit/69b1eb8c32 as a direction?
06:12 yoleaux Mouq: I'll pass your message to moritz.
06:19 moritz Mouq: not bad. The idea I pondered the last two days was to have a lib/NativeType/int.pod instead
06:19 yoleaux 06:12Z <Mouq> moritz: What do you think of https://github.com/perl6/doc/commit/69b1eb8c32 as a direction?
06:20 Mouq moritz: I'm not attached to the way I put forward in the commit; htmlify should've been working that way in the first place :P
06:20 TimToady Mouq: that might be easier for the optimizer to recognize from its bits, but semantically it's more special-casey than 10 xx *
06:21 Mouq moritz: I think it would be pretty easy to add a new dir though…
06:24 Mouq moritz: Something like this: https://gist.github.com/Mouq/a61a6912a745d3f2227c
06:24 Mouq Err, oops. That link was just updated :P
06:27 vendethiel joined #perl6
06:34 moritz Mouq: I'm not attached to my way either
06:35 moritz Mouq: but now the search for int gives class: int which goes to /type/nativeint which is a 404
06:40 Mouq Curious
06:40 Mouq Is that better or worse than /type/int ?
06:42 Mouq (Obviously it's better for it to point to the right place; but is the search box wrong here or the generator that puts the file /type/int.html)
06:49 moritz that's debatable again :-)
06:49 moritz it's a more consistent URL scheme
06:49 moritz otoh people on macosx or windows won't be able to generate the HTML files correctly
06:50 moritz but for now I see htmlify specifically as a tool to create doc.perl6.org contents, so I'm fine with it not being portable
06:50 * moritz wonders if we have some kind of tool to detect case insensitive file systems
06:52 TimToady m: printf "%064b\n", -1234
06:52 camelia rakudo-moar 0759eb: OUTPUT«000000000000000000000000000000​0000000000000000000000-10011010010␤»
06:52 TimToady there's a bug
06:57 vendethiel joined #perl6
06:59 Mouq joined #perl6
07:01 echowuhao joined #perl6
07:04 Mouq moritz: I don't think we should limit perl6/doc to that. Almost everything it does is abstract manipulation of "documentables", and then it throws them all at Pod::To::HTML and tells it to make them pretty.
07:06 Mouq moritz: I'm still thinking we should generate database of some sort, and then things like p6doc can use that, with the full richness of search that'd be available to the online version. Potentially there are other applications as well. I just don't have a lot of database experience and haven't gotten around to setting it up
07:09 Mouq moritz: But then, storing these in a DB, we don't have to worry about generated filenames, or canonicalizing things
07:09 Mouq like infix:</>
07:09 * Mouq -> bed
07:13 TimToady m: multi sub infix:«+>»(Int:D $a, Int:D $b, :$rotate!) { :2[$a.polymod(2 xx 64).rotate($b)] }; say 7 +> 2 :rotate;
07:13 camelia rakudo-moar 0759eb: OUTPUT«Unexpected named parameter 'rotate' passed␤  in sub infix:<+>> at src/gen/m-CORE.setting:5227␤  in block <unit> at /tmp/8oG7QtqdEA:1␤␤»
07:14 TimToady why doesn't rakudo add my candidate to the list?
07:15 xfix joined #perl6
07:15 TimToady jnthn: ^^
07:15 tinyblak joined #perl6
07:16 TimToady m: multi sub infix:«+>»(Int:D \a, Int:D \b, :$rotate!) { :2[a.polymod(2 xx 64).rotate(b)] }; say 7 +> 2 :rotate;
07:16 camelia rakudo-moar 0759eb: OUTPUT«Unexpected named parameter 'rotate' passed␤  in sub infix:<+>> at src/gen/m-CORE.setting:5227␤  in block <unit> at /tmp/Om7eVlI9fJ:1␤␤»
07:17 moritz TimToady: probably the infix:«+>» has a proto without the named
07:17 TimToady hmm, that seems likely
07:18 TimToady but if so, maybe autogenerated
07:19 TimToady nop, in core/Numeric.pm
07:19 TimToady *nope
07:19 TimToady next question is whether it's better to add a different operator than to add flags to shifts
07:24 raydiak well, it's neither pretty nor fast, but here's one way to make * work in .assuming: https://gist.github.com/ra​ydiak/1ecf3131e1fa4157e625
07:34 tinyblak joined #perl6
07:35 raydiak I'm fading, off to bed...anyone feel free to suggest a more sensible way of accomplishing that; o/
07:38 moritz raydiak: you can simplify the first grep to curried.list.grep(Whatever)
07:43 darutoko joined #perl6
07:43 yeahnoob joined #perl6
07:47 wicope joined #perl6
07:48 mr-foobar joined #perl6
07:54 grondilu joined #perl6
07:55 grondilu say grep Whatever, 1, *, 3
07:55 grondilu m: say grep Whatever, 1, *, 3
07:55 camelia rakudo-moar 0759eb: OUTPUT«*␤»
07:55 * grondilu expected that not to work
07:55 grondilu m: say grep Int, 1, 2, pi, 4
07:55 camelia rakudo-moar 0759eb: OUTPUT«1 2 4␤»
07:56 grondilu that used not to work, I'm glad it does now though
08:03 dalek doc: 6c33473 | moritz++ | htmlify.p6:
08:03 dalek doc: htmlify.p6: un-obscure code a bit
08:03 dalek doc: review: https://github.com/perl6/doc/commit/6c3347305e
08:03 dalek doc: 8323f56 | moritz++ | lib/Type/Cool.pod:
08:03 dalek doc: Document Cool.IO
08:03 dalek doc: review: https://github.com/perl6/doc/commit/8323f56eb0
08:08 Ven joined #perl6
08:09 khisanth_ joined #perl6
08:13 prime joined #perl6
08:13 prime joined #perl6
08:22 rindolf joined #perl6
08:24 TimToady http://rosettacode.org/wiki​/Bitwise_operations#Perl_6  <- unicode has some great rotate ops :)
08:25 Mouq joined #perl6
08:25 TimToady mind you, that's a grotesque way to actually implement them...
08:27 TimToady zzz &
08:30 vendethiel joined #perl6
08:42 grondilu m: say .WHAT given (my uint $ = 1) +< 2;
08:42 camelia rakudo-moar 0759eb: OUTPUT«(Int)␤»
08:42 grondilu m: say .WHAT given (my uint $ = 1);
08:42 camelia rakudo-moar 0759eb: OUTPUT«(Int)␤»
08:44 grondilu m: say (my uint $) ~~ uint;
08:44 camelia rakudo-moar 0759eb: OUTPUT«False␤»
09:10 vendethiel joined #perl6
09:19 moritz_ joined #perl6
09:20 kaare__ joined #perl6
09:20 _sri_ joined #perl6
09:22 avuserow_ joined #perl6
09:22 dj_goku_ joined #perl6
09:26 Akagi201_ joined #perl6
09:31 Some-body_ joined #perl6
09:34 vendethiel joined #perl6
09:45 kjs_ joined #perl6
09:49 lsm-desktop joined #perl6
10:00 diana_olhovik_ joined #perl6
10:06 djanatyn joined #perl6
10:07 Sir_Ragnarok joined #perl6
10:09 gfldex joined #perl6
10:09 Kristien joined #perl6
10:27 zmisc joined #perl6
10:33 skarn joined #perl6
10:50 sqirrel__ joined #perl6
10:50 dalek rakudo/newio: 949b809 | moritz++ | src/core/Proc/Async.pm:
10:50 dalek rakudo/newio: Give all X::Proc::Async exceptions a common role
10:50 dalek rakudo/newio:
10:50 dalek rakudo/newio: and make the Proc::Async object that threw it available as an attribute in the common role
10:50 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/949b8097d6
10:50 lizmat sorry dalek
10:50 dalek joined #perl6
10:54 coffee` joined #perl6
10:56 chenryn__ joined #perl6
10:57 spider-mario joined #perl6
10:59 dalek specs/newio: 16df181 | lizmat++ | S16-io.pod:
10:59 dalek specs/newio: Clarify second positional on tmpdir/homedir
10:59 dalek specs/newio: review: https://github.com/perl6/specs/commit/16df1817cc
11:01 chenryn joined #perl6
11:02 Ven o/, #perl6
11:03 dalek rakudo/newio: 430e150 | lizmat++ | src/core/io_operators.pm:
11:03 dalek rakudo/newio: tmpdir/homedir return their setting, not  Bool
11:03 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/430e150021
11:06 pmurias joined #perl6
11:06 pmurias hi
11:07 lizmat Ven pmurias o/
11:09 Rounin joined #perl6
11:12 vendethiel joined #perl6
11:12 diana_olhovik joined #perl6
11:24 kjs_ joined #perl6
11:32 gaussblurinc_ joined #perl6
11:39 Mouq joined #perl6
11:46 mvuets joined #perl6
11:47 Ven joined #perl6
11:50 vendethiel joined #perl6
11:50 bjz joined #perl6
12:04 telex joined #perl6
12:26 dalek rakudo/longer: 874caf6 | TimToady++ | src/core/ (2 files):
12:26 dalek rakudo/longer: implementation of polymod method to play with
12:26 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/874caf6f7c
12:26 dalek rakudo/longer: 0e61279 | TimToady++ | src/core/ (2 files):
12:26 dalek rakudo/longer: polymod yields 1 more result than args unless inf
12:26 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/0e61279325
12:26 dalek rakudo/longer: df5b31e | Mouq++ | src/Perl6/Actions.nqp:
12:26 dalek rakudo/longer: Implement #74850 "has Array $.x .= new(1, 2, 3);"
12:26 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=74850
12:26 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/df5b31eae0
12:26 dalek rakudo/longer: 0b48529 | Mouq++ | src/ (2 files):
12:26 dalek rakudo/longer: Port error message from STD.pm6 for #123834
12:26 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123834
12:26 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/0b48529b50
12:26 dalek rakudo/longer: 0411dd3 | TimToady++ | src/core/ (2 files):
12:26 dalek rakudo/longer: don't include final 0 in infinite polymod
12:26 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/0411dd34d9
12:26 dalek rakudo/longer: 6245cfb | Mouq++ | src/ (2 files):
12:26 dalek rakudo/longer: Try to awesomify error for #123834
12:26 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123834
12:26 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/6245cfb993
12:26 dalek rakudo/longer: 0759eba | Mouq++ | src/core/ (2 files):
12:26 dalek rakudo/longer: Merge branch 'nom' of http://github.com/rakudo/rakudo into nom
12:26 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/0759eba8f1
12:26 dalek rakudo/longer: a25f366 | FROGGS++ | src/ (5 files):
12:26 dalek rakudo/longer: Merge branch 'nom' of github.com:rakudo/rakudo into longer
12:26 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/a25f366699
12:27 Kristien joined #perl6
12:30 Ven Haskell's new website certainly looks good :)
12:31 literal m: my token foo { \# <[A..z]>+ }
12:31 camelia rakudo-moar 0759eb: OUTPUT«[31m===[0mSORRY![31m===[0m�Regex not terminated.�at /tmp/3zVlE6sPh8:1�------> [32mmy token foo { \# <[A..z]>+ }[33m�[31m<EOL>[0m�Regex not terminated.�at /tmp/3zVlE6sPh8:1�------> [32mmy token foo { \# <[A..z]>+ }[33m�[31m<EOL>[…»
12:31 literal do I need to use <[#]> to match a '#' ?
12:32 FROGGS_ m: my token foo { '#' <[A..z]>+ }
12:32 camelia rakudo-moar 0759eb: ( no output )
12:32 literal oh
12:32 FROGGS_ literal: \# is unspace I think
12:32 literal I see
12:32 FROGGS_ m: my token foo { \#`(that's a comment) <[A..z]>+ }
12:32 camelia rakudo-moar 0759eb: ( no output )
12:32 FROGGS_ m: my token foo { \#`(that's a comment) <[A..z]>+ }; say "foobarbaz" ~~ foo
12:32 camelia rakudo-moar 0759eb: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in regex foo at /tmp/mYOKqt65FJ:1␤  in block <unit> at /tmp/mYOKqt65FJ:1␤␤»
12:33 FROGGS_ m: my token foo { \#`(that's a comment) <[A..z]>+ }; say "foobarbaz" ~~ /<foo>/
12:33 camelia rakudo-moar 0759eb: OUTPUT«「foobarbaz」␤ foo => 「foobarbaz」␤»
12:33 FROGGS_ seems so
12:33 FROGGS_ m: my token foo { #`(that's a comment) <[A..z]>+ }; say "foobarbaz" ~~ /<foo>/
12:33 camelia rakudo-moar 0759eb: OUTPUT«「foobarbaz」␤ foo => 「foobarbaz」␤»
12:33 FROGGS_ hmmmm
12:33 * FROGGS_ is not so sure anymore
12:39 [ptc] m: use Test; ok(True); skip_rest "skip"; ok(False); is(1, 1); done;
12:39 camelia rakudo-moar 0759eb: OUTPUT«ok 1 - ␤use of uninitialized value of type Any in numeric context  in sub skip_rest at lib/Test.pm:189␤␤not ok 2 - ␤␤# Failed test at /tmp/MKvHKgkNLn line 1␤ok 3 - ␤1..3␤# Looks like you failed 1 tests of 3␤»
12:40 [ptc] is that a bug??  ^^^^^
12:40 [ptc] or am I not understanding how to use skip_rest?
12:42 [ptc] no, I think I worked it out, I was using it incorrectly
12:43 FROGGS_ m: use Test; plan 42; ok(True); skip_rest "skip"; ok(False); is(1, 1); done;
12:43 camelia rakudo-moar 0759eb: OUTPUT«1..42␤ok 1 - ␤ok 2 - # SKIP skip␤ok 3 - # SKIP skip␤ok 4 - # SKIP skip␤ok 5 - # SKIP skip␤ok 6 - # SKIP skip␤ok 7 - # SKIP skip␤ok 8 - # SKIP skip␤ok 9 - # SKIP skip␤ok 10 - # SKIP skip␤ok 11 - # SKIP skip␤ok 12 - # SKIP skip␤ok 1…»
12:45 [ptc] I believe skip_rest has to be used conditionally, i.e. unless $some-condition { skip_rest; exit; }
12:45 FROGGS_ hmmm, I am unable to built perl6-j on a 32bit system...
12:49 vendethiel joined #perl6
12:49 [ptc] m: use Test; plan 2; ok(True); if True { skip_rest; exit } ok(False);
12:49 camelia rakudo-moar 0759eb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/FZFMZvV5xd�Missing semicolon.�at /tmp/FZFMZvV5xd:1�------> [32m; ok(True); if True { skip_rest; exit } [33m�[31mok(False);[0m�»
12:49 [ptc] m: use Test; plan 2; ok(True); if True { skip_rest; exit }; ok(False);
12:49 camelia rakudo-moar 0759eb: OUTPUT«1..2␤ok 1 - ␤ok 2 - # SKIP <unknown>␤»
12:49 [ptc] m: use Test; plan 2; ok(True); if True { skip_rest; exit; }; ok(False);
12:49 camelia rakudo-moar 0759eb: OUTPUT«1..2␤ok 1 - ␤ok 2 - # SKIP <unknown>␤»
12:50 [ptc] m: use Test; plan 2; ok(True); if True { skip_rest "skip rest"; exit; }; ok(False);
12:50 camelia rakudo-moar 0759eb: OUTPUT«1..2␤ok 1 - ␤ok 2 - # SKIP skip rest␤»
12:51 [ptc] m: use Test; ok(True); if True { skip_rest "skip rest"; exit; }; ok(False); done
12:51 camelia rakudo-moar 0759eb: OUTPUT«ok 1 - ␤use of uninitialized value of type Any in numeric context  in sub skip_rest at lib/Test.pm:189␤␤»
12:51 [ptc] it looks like skip_rest needs a plan...
12:51 FROGGS_ aye
12:51 FROGGS_ which might be an error
12:51 FROGGS_ but, it is good to have a plan
12:52 [ptc] true
12:53 [ptc] when developing a test suite it is common to just use C<done> and no C<plan>
12:54 [ptc] thus one can't use C<skip_rest> in this use case
12:57 FROGGS_ [ptc]: perhaps we should die here instead of assuming a plan? https://github.com/rakudo/rak​udo/blob/nom/lib/Test.pm#L189
12:59 FROGGS_ \o/
12:59 [ptc] FROGGS_: dunno.  I must admit to being confused about getting "use of uninitialized value of type Any in numeric context"
12:59 FROGGS_ -Xss1m seems to let me built perl6-j on my 32bit ubuntu!
12:59 [ptc] yay!
12:59 FROGGS_ [ptc]: the number of planned tests is not set, so it is (Any)
13:00 FROGGS_ and there you have your uninitialized value in the computation of how many tests need to be skipped
13:00 FROGGS_ psch: ping
13:01 psch FROGGS_: what's up?
13:02 FROGGS_ psch: since you are a Java professional... would it hurt somebody when we'd add -Xss1m to the nqp runner?
13:03 psch i don't think so, afaik -Xss is starting stack size.  1m might be low, if anything
13:04 FROGGS_ ohh, in our Makefile-JVM for rakudo we have:
13:04 FROGGS_ J_RUN_PERL6 = $(JAVA) -Xss1m -Xms500m -Xmx2000m -Xbootclasspath/a:.@cpsep@$(NQP_JARS)@cpsep@rakudo-runtime.jar@cpsep@perl6.jar -cp @nqp_classpath@ perl6
13:04 FROGGS_ so, I might as well use that in nqp
13:05 [ptc] FROGGS_: I know; but should the user of the test suite know the internals like that?
13:05 [ptc] *Test module internals
13:05 FROGGS_ [ptc]: that's why I propose we die there... 'calling "skip_rest" requires setting a plan first' or so
13:06 FROGGS_ that#s nothing internal then
13:06 psch fwiw, on my 32bit vm i used to have to change -Xmx in perl6-eval-server for running roast - 4gb of total ram hardly allow for 3gb of continuous memory
13:06 FROGGS_ psch: and I cannot build rakudo with 2G it seems... I'm trying 3G now
13:07 [ptc] FROGGS_: I think die-ing is a good idea.
13:07 FROGGS_ psch: and according to stackoverflow the default stack size is only 512k
13:07 FROGGS_ [ptc]: do you make a pull request?
13:07 [ptc] FROGGS_: I'm not really experienced enough to make that call
13:07 FROGGS_ :/
13:07 [ptc] FROGGS_: yeah, I can make a PR for it
13:08 FROGGS_ [ptc]++ # thank you
13:08 [ptc] FROGGS_: thought it might change some behaviour which someone would think necessary/helpful (or something)
13:11 dalek nqp/longer: 3804a84 | FROGGS++ | tools/build/install-jvm-runner.pl:
13:11 dalek nqp/longer: set initial stack size to 1M for nqp-j runner
13:11 dalek nqp/longer:
13:11 dalek nqp/longer: This let us build rakudo on a 32bit machine.
13:11 dalek nqp/longer: review: https://github.com/perl6/nqp/commit/3804a845e7
13:23 dj_goku joined #perl6
13:23 dj_goku joined #perl6
13:24 _mg_ joined #perl6
13:25 Ven joined #perl6
13:27 dalek doc: b4545ec | paultcochrane++ | lib/Pod/Convenience.pm6:
13:27 dalek doc: Add vim coda to Pod::Convenience
13:27 dalek doc: review: https://github.com/perl6/doc/commit/b4545ec6f6
13:27 dalek doc: cbc53e7 | paultcochrane++ | lib/Language/testing.pod:
13:27 dalek doc: Start documenting the Text module
13:27 dalek doc: review: https://github.com/perl6/doc/commit/cbc53e7ba4
13:32 [ptc] FROGGS_: do I need to recompile rakudo after I've changed Test.pm?
13:33 FROGGS_ [ptc]: just do: make install
13:33 [ptc] k
13:33 [ptc] FROGGS_: do I need to reboostrap panda afterwards?
13:34 FROGGS_ no
13:34 vendethiel joined #perl6
13:34 [ptc] ok, thanks :-)
13:34 FROGGS_ :o)
13:35 [ptc] btw: when is it necessary to rebootstrap panda?
13:35 [ptc] I know that sometimes caches change and stuff, but it'd be nice to note down somewhere when this is necessary
13:35 FROGGS_ when you rebuild rakudo for example
13:35 ninjazach joined #perl6
13:36 FROGGS_ recompiling rakudo invalidates all precompiled modules
13:36 Ven joined #perl6
13:37 [ptc] ok, so that's not something a user would normally have to worry about
13:37 [ptc] I'm thinking of the case where a user has done "aptitude install rakudo"...
13:38 [ptc] thus, recompiling the modules would only be necessary after a rakudo upgrade (similarly to how python recompiles its modules, for example)
13:38 virtualsue joined #perl6
13:38 FROGGS_ aye
13:38 [ptc] I'd done a fetch and merge on nom, thus 'make install' wouldn't work
13:38 [ptc] now I'm getting this: Unhandled exception: While looking for 'ModuleLoader.moarvm': no such file or directory
13:38 [ptc] any ideas?
13:39 [ptc] btw, I've done a make realclean beforehand
13:42 FROGGS_ hmmm, perhaps you have to 'make install' in nqp?
13:43 Ven joined #perl6
13:44 [ptc] FROGGS_: that gave me the same error
13:44 FROGGS_ :/
13:44 [ptc] I'd just run Configure.pl and that was the error that turned up as part of the build
13:44 FROGGS_ did you already reconfigure?
13:44 FROGGS_ ahh
13:44 [ptc] am testing now on a new clone
13:45 FROGGS_ removing the install dir should do too
13:45 FROGGS_ because that forces the build of the backends and nqp
13:45 [ptc] ok, I'll give that a try as well
13:46 dalek nqp/js: 1c09d0e | (Pawel Murias)++ | src/vm/js/bin/run_tests:
13:46 dalek nqp/js: Add passing test 94 to run tests.
13:46 dalek nqp/js: review: https://github.com/perl6/nqp/commit/1c09d0e17c
13:47 _4d47 joined #perl6
13:49 [ptc] FROGGS_: removing install dir worked, ta!  :-)
13:49 FROGGS_ pheew :o)
13:50 FROGGS_ okay, I finally got to the point where I have a perl6-j on a 32bit machine and reproduce the 32bit with NativeCall there too
13:51 dalek nqp/js: d2b4c10 | (Pawel Murias)++ | tools/missing-js-tests:
13:51 dalek nqp/js: Add a script that prints the missing js tests.
13:51 dalek nqp/js: review: https://github.com/perl6/nqp/commit/d2b4c10ed8
13:51 gaussblurinc_ joined #perl6
13:52 ninjazach joined #perl6
13:55 [Sno] joined #perl6
13:58 mike joined #perl6
13:58 rindolf joined #perl6
14:00 mike_ joined #perl6
14:08 rurban joined #perl6
14:11 vendethiel joined #perl6
14:14 chenryn joined #perl6
14:23 rurban1 joined #perl6
14:23 * gfldex tries to find the exit of masak++'s blog post
14:27 pmqs Hey folks. Is this a bug in tell or me being stupid?
14:27 pmqs $f = open("x", :w); $f.print("abc"); say $f.tell
14:27 pmqs 0
14:30 geekosaur or tell operating on the actual file vs. buffered abstraction
14:31 gfldex pmqs: that's a bug by the compare-with-perl5-rule
14:32 pmqs geekosaur: so how to do tell on buffered abstraction?
14:33 raiph joined #perl6
14:34 pmqs gfldex: that's what I assumed, but still getting my head around p6.
14:35 gfldex pmqs: https://github.com/rakudo/rakudo/b​lob/nom/src/core/IO/Handle.pm#L434
14:36 pmqs gfldex: the plot thickens. seek seems to make tell work
14:36 pmqs $f = open("x", :w); $f.print("abc"); $f.seek(2,0); say $f.tell
14:36 pmqs 2
14:38 Ven joined #perl6
14:40 Ven pmurias: I did that "missing scripts" thing in one line of Perl6. :P
14:41 masak good afternoon, #perl6
14:43 masak gfldex: ;)
14:43 Ven \o, masak
14:45 pmqs gfldex: tell in perl5 equivalent looks fine
14:45 pmqs perl -e ' open $f, ">xyz" or die; print $f "bc"; print tell($f) . "\n" '
14:45 pmqs 3
14:46 gfldex pmqs: i can tell you that i just filed a rakudobug
14:46 pmqs gfldex: you beat me to it :-)
14:46 gfldex m: my $a = 'x' x 2**32;
14:46 camelia rakudo-moar 0759eb: OUTPUT«repeat count > 1073741824 arbitrarily unsupported...␤  in sub infix:<x> at src/gen/m-CORE.setting:8020␤  in block <unit> at /tmp/hQQygjKVRk:1␤␤»
14:46 lizmat pmqs gfldex will look at it for the newio branch
14:47 gfldex lizmat++ for fixing things faster then we can report it :)
14:47 lizmat didn't say anything about fixing  :-)
14:47 carthanc joined #perl6
14:47 pmqs lizmat: newio? Is that what it sounds like?
14:47 gfldex it's a very shiny io
14:48 vendethiel joined #perl6
14:48 lizmat more like the same old wine in a new bottle, really
14:48 pmqs does it change to what's in S32?
14:49 lizmat but hopefully a shiny bottle  :-)
14:49 lizmat generally, no
14:49 lizmat with some exceptions
14:49 pmqs :-)
14:49 lizmat there's a newio branch in "specs", in case you're interested
14:50 diana_olhovik_ joined #perl6
14:50 pmqs lizmat: Aaaah, didn't know that. I didn't see any tests for tell in roast. Is that the correct place to look?
14:50 lizmat there's a newio branch in roast as well
14:50 lizmat although there's quite a lot of breakage in there atm
14:51 gfldex pmqs: [perl #123838] is the ticket
14:51 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123838
14:51 pmqs gfldex: ta
14:51 MilkmanDan joined #perl6
14:52 sunnavy joined #perl6
14:55 pmqs lizmat: thanks
14:59 zakharyas joined #perl6
15:02 geekosaur right, I wasn't saying not a bug, I was suggesting a (common) cause of it.
15:02 geekosaur and there are enough levels of IO abstraction in the stack that I'm not even going to try to guess at what level it's breaking :)
15:05 pmqs geekosaur: ok. Still feeling my way with p6, so not fully sure how things should work.
15:08 ingy joined #perl6
15:18 dalek nqp/js: 76e8376 | (Pawel Murias)++ | src/vm/js/bin/run_tests:
15:18 dalek nqp/js: Add passing test 79 to run_tests.
15:18 dalek nqp/js: review: https://github.com/perl6/nqp/commit/76e8376eb7
15:18 dalek nqp/js: 3220398 | (Pawel Murias)++ | tools/missing-js-tests:
15:18 dalek nqp/js: Remove pointless dependency from tools/missing-js-tests.
15:18 dalek nqp/js: review: https://github.com/perl6/nqp/commit/3220398700
15:22 chenryn joined #perl6
15:24 masak Haskell's new web page is gorgeous. https://www.haskell.org/?new
15:24 kjs_ joined #perl6
15:24 masak favorite bit: they make absolutely no big deal out of the fact that there's a little fully functional REPL directly under the fold.
15:25 masak we should have this.
15:27 gfldex font-size: 13px; :(
15:29 RusAlex joined #perl6
15:29 RusAlex wow very croud here
15:29 lizmat welcome RusAlex
15:39 Ven masak: you're late, I said that earlier :P
15:40 Ven masak: also, it's really bad that the REPL is as broken as ghci
15:40 Ven (people try a = x * y first, and boom!)
15:41 dolmen joined #perl6
15:41 sivoais joined #perl6
15:43 aborazmeh joined #perl6
15:43 aborazmeh joined #perl6
15:43 pmqs lizmat: hacked a very simple test harness for "tell". reading & seek seem ok. write seems to be the broken part
15:51 * Kristien is implementing a compacting GC
15:52 geekosaur well, seek should flush so I'd expect it to be correct after that
15:55 mike joined #perl6
15:57 pmqs lizmat: attached test harness to [perl #123838]
15:57 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123838
15:57 lizmat pmqs: thanks!
15:57 masak vendethiel: I'm just happy we arrived at the same conclusion, even though I was late :)
16:02 mrf joined #perl6
16:02 mrf joined #perl6
16:08 lizmat afk for the rest of the day &
16:12 Ven joined #perl6
16:15 [ptc] FROGGS_: just did a dodgy git push --force on the skip_rest PR, hope it's still mergeable
16:17 FROGGS_ [ptc]: you dont need to do that usually, pushing another commit to your branch also makes it visible to the PR
16:17 dalek rakudo/nom: db560a0 | paultcochrane++ | lib/Test.pm:
16:17 dalek rakudo/nom: Die in skip_rest if no plan is set
16:17 dalek rakudo/nom:
16:17 dalek rakudo/nom: Current behaviour dies with "use of uninitialized value of type Any in
16:17 dalek rakudo/nom: numeric context", which is confusing to the user of the Test module.  This
16:17 dalek rakudo/nom: change tells the user what is required in order to use skip_rest correctly.
16:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/db560a0d55
16:17 dalek rakudo/nom: 5ba2c86 | FROGGS++ | lib/Test.pm:
16:17 dalek rakudo/nom: Merge pull request #363 from paultcochrane/pr/skip_test_dies_without_plan
16:17 dalek rakudo/nom:
16:17 dalek rakudo/nom: Die in skip_rest if no plan is set
16:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5ba2c86239
16:17 FROGGS_ [ptc]++
16:18 ninjazach joined #perl6
16:18 Ven [ptc]++
16:18 [ptc] FROGGS_: yeah, I thought so.  Thought it might be easier to merge than having to cherry pick one commit
16:19 [ptc] Actually, I noticed that like() and unlike() etc aren't yet implemented, however turn up in the spec test, are they yet to be implemented?
16:22 [ptc] FROGGS_: btw: I'm not usually that brutal with my git branches :-)  I usually try to avoid --force at all costs
16:22 timotimo facebook is getting an "unlike" button?
16:25 liztormato joined #perl6
16:26 molaf joined #perl6
16:26 FROGGS_ [ptc]: I'm not sure about like/unlike...
16:26 pmurias why use bindpos of @foo[0] := ...?
16:26 pmurias s/of/instead of/
16:27 dalek nqp/js: f973217 | (Pawel Murias)++ | TODO:
16:27 dalek nqp/js: Update TODO.
16:27 dalek nqp/js: review: https://github.com/perl6/nqp/commit/f97321738f
16:27 liztormato FWIW: I was just about to commit a patch that would make .trans about 20x as fast
16:28 liztormato For the simplest case
16:29 liztormato Need to fix one boumdary condition but had no time
16:29 liztormato Will do so in about 8 hours
16:32 FROGGS_ ++ liztormato
16:32 FROGGS_ [ptc]: but I think like/unlike might be useful
16:33 Ven liztormato++
16:33 FROGGS_ [ptc]: will it just smartmatch against the $expected?
16:33 FROGGS_ [ptc]: or does it also take a comparator?
16:35 drzsasz joined #perl6
16:36 dalek doc: bb626e4 | paultcochrane++ | lib/Language/testing.pod:
16:36 dalek doc: Complete documentation for Test module
16:36 dalek doc: review: https://github.com/perl6/doc/commit/bb626e4ede
16:37 [ptc] FROGGS_: don't know exactly.  I saw tests within the spectest suite (which aren't being run currently) and wondered why like/unlike were missing from Test.pm
16:37 [ptc] FROGGS_: like/unlike don't turn up in the spec docs about testing though
16:37 vendethiel- joined #perl6
16:38 pmurias hoelzro: I got the random test 14 failure on my machine too
16:38 liztormato_ joined #perl6
16:38 [ptc] FROGGS_: maybe like is really something along the lines of ok($obtained ~~ $expected)
16:38 [ptc] and thus like isn't really necessary
16:39 dalek nqp/js: dc4ae0d | (Pawel Murias)++ | t/nqp/70-invokespec.t:
16:39 dalek nqp/js: Fix test plan.
16:39 dalek nqp/js: review: https://github.com/perl6/nqp/commit/dc4ae0d127
16:39 dalek nqp/js: cc16234 | (Pawel Murias)++ | / (3 files):
16:39 dalek nqp/js: Implement nqp::bindpos.
16:39 dalek nqp/js: review: https://github.com/perl6/nqp/commit/cc16234a4b
16:39 FROGGS_ well, when the testing sub gets the $expected and the $got it can print a helpful message on mismatch
16:43 pmurias nqp-p: say(nqp::istype(NQPMu, nqp::null()));
16:43 camelia nqp-parrot: OUTPUT«0␤»
16:47 vendethiel joined #perl6
16:49 moritz_ FROGGS_, [ptc]: since our regexes don't stringify so well, like() often couldn't produce good diagnostics messages
16:49 moritz_ (with regexes at least)
16:50 FROGGS_ ahh, true
16:51 [ptc] I just implemented a first-cut at like(); is it still worthwhile adding?
16:52 Kristien joined #perl6
16:52 [ptc] moritz_: so like/unlike were removed?
16:52 dalek ecosystem: e8a9be6 | (Andrew Egeler)++ | META.list:
16:52 dalek ecosystem: Add UUID
16:52 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e8a9be6fdf
16:53 moritz_ [ptc]: I don't think they were removed; but we certainly pondered them before
16:55 chenryn joined #perl6
17:06 raydiak moritz_: wrt https://gist.github.com/ra​ydiak/1ecf3131e1fa4157e625 thanks for looking!  .list would induce premature flattening; also I need the indices not the values, so it'd have to use .pairs too
17:07 raydiak if it looks like something that might not be too horrendous to include in core in some form, I'll open a PR
17:13 ruoso So, I refactored the code in my sudoku solver, it's much more legible now, I'm considering adding it to Rosetta Code... feedback is appreciated: https://github.com/ruoso/perl6​-sudoku/blob/master/sudoku.pl
17:15 ruoso the solver is surprisingly good at avoiding backtracks....
17:19 colomon http://smoke.perl6.org/report
17:22 timotimo my lord, this looks bad
17:23 timotimo i'd still like having the build output in the smoke reports
17:24 timotimo what's the domain for panda testers again?
17:24 timotimo ah, testers.
17:24 timotimo just takes a tiny while to come up
17:25 timotimo FROGGS_: we need to get some more performance out of testers :)
17:26 abraxxa joined #perl6
17:28 raydiak yeah noticed last night that Inline is failing tests...that's why zlib and png::portable are failing at least
17:29 tgt joined #perl6
17:29 moritz but shouldn't they show a "P" then?
17:30 raiph joined #perl6
17:31 raydiak yes, that would be expected behavior
17:32 nebuchadnezzar joined #perl6
17:39 Ven_ joined #perl6
17:42 Ven_ wow, realize it's now been more than a year on this channel \o
17:43 Ven_ r: for lines() -> $_ is copy { s:g/men/boys/; .say }
17:43 camelia rakudo-{parrot,moar} 5ba2c8: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin g…»
17:45 geekosaur that changed too :p
17:51 Ven_ m: sub second-to-last(@ [*@, $value, $]) { $value }; # that didn't change :P
17:51 camelia rakudo-moar 5ba2c8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5R0cTW9glf�Cannot put required parameter $value after variadic parameters�at /tmp/5R0cTW9glf:1�------> [32msub second-to-last(@ [*@, $value[33m�[31m, $]) { $value }; # that didn't change …»
17:55 ninjazach joined #perl6
18:03 masak Ven_: I can see why that's disallowed.
18:04 Ven_ masak: I can't :)
18:04 masak it kinds goes against the rule the later things shouldn't affect earlier things.
18:04 Ven_ I'm sorry?
18:04 masak at least declaration-y things.
18:04 masak also, it's consistent with how slurpies work in Perl 5.
18:04 mst Ven_: allowing a required parameter after a variadic is a TERRIBLE idea and will bring you only inconsistency and pain
18:05 flussence m: sub second-to-last(*@ [@, $value, $]) { $value }; say second-to-last(|1..10);
18:05 camelia rakudo-moar 5ba2c8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Vgp9XNQ8Pk�Variable '&prefix:<|>' is not declared�at /tmp/Vgp9XNQ8Pk:1�------> [32mlue, $]) { $value }; say second-to-last([33m�[31m|1..10);[0m�»
18:05 Ven_ mst: thanks, but that's not what I'm doing here.
18:05 flussence m: sub second-to-last(*@ [@, $value, $]) { $value }; say second-to-last(|(1..10));
18:05 camelia rakudo-moar 5ba2c8: OUTPUT«cannot stringify this␤  in sub second-to-last at /tmp/WEkVUbZVxR:1␤  in block <unit> at /tmp/WEkVUbZVxR:1␤␤»
18:05 masak Ven_: it kinds is, though.
18:05 flussence um, wat
18:05 Ven_ I really isn't...
18:05 mst Ven_: that's what the error appears to be saying
18:05 Ven_ It*
18:05 mst it might be what you *wanted* to do, but it's certainly what the compiler thinks you're doing :)
18:05 Ven_ mst: it's not a *parameter*
18:05 Ven_ It's an array deconstruction. That's not the same as an argument list, in my book
18:06 Ven_ (sorry, BooK )
18:06 mst oh, right, I see where you're going
18:07 Ven_ m: sub foo(@a){}; my @a = 1..*, <this is okay here>; foo(|(1..*)); # this isn't
18:07 camelia rakudo-moar 5ba2c8: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in sub foo at /tmp/LAyn7Zhy54:1␤  in block <unit> at /tmp/LAyn7Zhy54:1␤␤»
18:08 flussence m: sub a(*@ [$value]) { $value }; say a(1..10)
18:08 camelia rakudo-moar 5ba2c8: OUTPUT«Too many positionals passed; expected 1 argument but got 10 in sub-signature␤  in sub a at /tmp/3gzmy2m2lz:1␤  in block <unit> at /tmp/3gzmy2m2lz:1␤␤»
18:08 echowuhao joined #perl6
18:08 flussence m: sub b(*@ [$value, *@]) { $value }; say b(1..10)
18:08 camelia rakudo-moar 5ba2c8: OUTPUT«1␤»
18:09 flussence m: sub c(*@ [$value, @]) { $value }; say c(1..10)
18:09 camelia rakudo-moar 5ba2c8: OUTPUT«cannot stringify this␤  in sub c at /tmp/dVGIrrNhc3:1␤  in block <unit> at /tmp/dVGIrrNhc3:1␤␤»
18:10 Kristien joined #perl6
18:10 Kristien How does Perl 6 resolve the problem of the dreaded diamond of death?
18:10 flussence C3, same as Perl 5.
18:11 Juerd Kristien: It lets you use roles instead of classes, which can't be composed into something that it clashes with.
18:12 Juerd (Assuming that's the diamond you're referring to. If it's some other diamond, I don't know.)
18:14 Mouq joined #perl6
18:15 Kristien Well especially with data members.
18:16 Kristien E.g. class A { has $!x; }; class B is A { }; class C is A { }; class D is B is C { /* how many $!x members are there? }
18:16 masak one.
18:17 Kristien Ah, so B and C share the same base members.
18:17 masak but you shouldn't care so much, since $!x is private to A.
18:17 Kristien yeah but A may expose it in some way
18:18 masak then A is doing a bad job hiding its private stuffs.
18:18 Kristien In C++ there'd be two unless you inherit with virtual keyword.
18:19 Ven_ (oooh, virtual inheritances... well)
18:20 nine_ masak++ # just finished reading the fascinating maze blog post
18:20 masak so it was readable. nice \o/
18:21 BenGoldberg joined #perl6
18:22 raiph "PL design is like a box of tradeoffs" (https://news.ycombinator.com/item?id=9052239)
18:24 japhb And there is some kind of design that isn't?
18:25 geekosaur ^ see "pick any two"
18:26 Kristien And in the diamond case how is it prevented that the constructor of A is called twice?
18:27 Mouq m: class A { has $!x; }; class B is A { }; class C is A { }; class D is B is C { }; say D.^mro
18:27 camelia rakudo-moar 5ba2c8: OUTPUT«(D) (B) (C) (A) (Any) (Mu)␤»
18:42 Mouq Kristien: The mro works least-derived to most-derived. AFAICT, the constructor for B knows how to build B and then gets the build instructions for A; BUILDALL relies purely on the mro, so it pulls the plans from each element, rather than the instructions for parents being embedded in the instructions for the child
18:42 Mouq Or at least, I think that's how it works, based on the code I've looked at
18:42 flussence `perldoc mro` explains it properly ;)
18:42 Mouq Someone else might be able to put that better/more accurately
18:43 BenGoldberg joined #perl6
18:43 Mouq flussence++
18:44 flussence don't ++ me! I only pointed to TFM, not wrote it :)
18:45 flussence (and I was wrong about p5 using it anyway, it's not the default [unless you use Moose, or something])
18:46 ninjazach joined #perl6
18:48 tgt joined #perl6
18:51 Kristien Now I understand why it's called nextsame and not super.
19:05 Kristien Perl 6 is very nice.
19:07 BenGoldberg joined #perl6
19:09 _mg_ joined #perl6
19:11 * masak .oO( Perl 6: unifying concepts, for your pleasure )
19:14 rurban joined #perl6
19:14 FROGGS_ timotimo: aye, I'm almost done with generating static html pages that an apache can server
19:14 FROGGS_ serve*
19:15 Kristien Are INITs called in an order similar to C3, or depth-first?
19:15 moritz uhm
19:15 moritz INITs aren't called in any OO order, I suppose
19:16 moritz but rather in the order of use statements
19:16 Kristien well replacing inheritance with use
19:16 moritz depth first
19:16 Kristien OK
19:16 Kristien Makes sense.
19:17 dalek doc: fd08a18 | moritz++ | lib/Type/Metamodel/C3MRO.pod:
19:17 dalek doc: More explanations for method resolution order; add example
19:17 dalek doc: review: https://github.com/perl6/doc/commit/fd08a18cb4
19:18 vendethiel joined #perl6
19:19 moritz why does skip_rest require a plan?
19:20 FROGGS_ moritz: because it will just emit a certain number of 'XX - SKIP'
19:20 masak moritz: could be argued if there's no plan, you can just do `done` instead
19:21 moritz FROGGS_: from a user's perspective, that answer isn't satisfactory at all :-
19:21 moritz )
19:21 moritz masak++ # that I can relate to
19:22 dalek doc: b1abbbc | moritz++ | lib/Language/testing.pod:
19:22 dalek doc: testing: mention &done as an alternative to skip_rest
19:22 dalek doc:
19:22 dalek doc: ... when no plan was made. masak++
19:22 dalek doc: review: https://github.com/perl6/doc/commit/b1abbbc5a6
19:23 FROGGS_ moritz: hmmm, we eventually can emit a 'XX - SKIP' for every call to ok/nok/pass/etc in that case then
19:23 gaussblurinc_ joined #perl6
19:23 moritz FROGGS_: except that we don't have that information
19:24 timotimo FROGGS_: cool! :)
19:24 FROGGS_ moritz: what information?
19:25 FROGGS_ moritz: ahh, it does not make much sense to run the code after a skip_rest, ehh?
19:25 moritz FROGGS_: correct
19:25 moritz it's not todo_rest
19:26 FROGGS_ well, then there is no way to avoid a plan
19:26 FROGGS_ ahh, it could be a noop perhaps?
19:39 flussence I'm having trouble finding an actual description for META.info (if one even exists). Following links from modules.perl6.org gets me to S11, which only has a dead link for "META6.json" (which I haven't heard of before). Up until now I've been cargo-culting other people's stuff...
19:40 FROGGS_ flussence: yes, META.info is in theory deprecated
19:40 FROGGS_ but it is still the one that works with panda
19:43 moritz FROGGS_: what is the not-deprecated alternative?
19:43 FROGGS_ META6.json
19:43 FROGGS_ which, panda only knows about in a dev branch
19:44 _mg_ joined #perl6
19:44 beastd joined #perl6
19:46 dalek nqp/longer: 984d8c0 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6 (2 files):
19:46 dalek nqp/longer: handle C types when composing P6int and P6num on the jvm
19:46 dalek nqp/longer: review: https://github.com/perl6/nqp/commit/984d8c0418
19:47 dalek doc: df9a2f3 | moritz++ | lib/Language/testing.pod:
19:47 dalek doc: testing: be more explicit about contexts; example for is_deeply
19:47 dalek doc: review: https://github.com/perl6/doc/commit/df9a2f38ca
19:50 ninjazach joined #perl6
19:51 raydiak FROGGS_: are you aware of the Inline::C test failure?
19:52 virtualsue joined #perl6
19:54 kjs_ joined #perl6
19:56 FROGGS_ raydiak: yes, it is caused by NativeCall<->Rakudo version mismatch
19:57 FROGGS_ I am working on that indirectly
19:57 raydiak FROGGS_++
19:58 FROGGS_ I've got a tiny problem on parrot though...
19:59 * moritz has a solution for that
19:59 pippo joined #perl6
19:59 pippo o/ #perl6
20:00 raydiak \o pippo
20:00 pippo use Form; print form('{]]]}','0')
20:00 pippo m: use Form; print form('{]]]}','0')
20:00 camelia rakudo-moar 5ba2c8: OUTPUT«===SORRY!===␤Could not find Form in any of: /home/camelia/rakudo-inst-1/languages/perl6/lib, /home/camelia/rakudo-inst-1/languages/perl6␤»
20:00 timotimo aye, Form is NYI
20:00 FROGGS_ what's Form?
20:00 pippo it is in the p6 modules!
20:01 FROGGS_ pippo: camelia here does not have (all) modules installed
20:01 timotimo oh, we have a module for that?
20:01 pippo FROGGS_: thanks.
20:01 pippo timotimo: yes
20:01 FROGGS_ there is a 'star-m' command that has the modules of the star distribution, but that's all
20:01 timotimo "A Perl 6 implementation of Perl 6-style text formatting" ... um ..?!
20:01 moritz in fact, 'm:' in camelia only gives you those modules that a bare rakudo gives you
20:02 FROGGS_ ahh, Form is like P5's formats
20:02 pippo star-m: use Form; print form('{]]]}','0')
20:02 camelia star-m 2015.01: OUTPUT«===SORRY!===␤Could not find Form in any of: /home/camelia/rakudo-star-2015.​01/install/languages/perl6/lib, /home/camelia/rakudo-star-201​5.01/install/languages/perl6, /home/camelia/rakudo-star-2015.0​1/install/languages/perl6/site␤»
20:02 pippo :-(
20:02 FROGGS_ pippo: well, install it locally
20:03 pippo Anyway does anybody used that module? It hates the 0 and do not want to print it.
20:03 pippo Do not know why.
20:03 * FROGGS_ did not use it
20:05 raydiak hasn't been worked on for 3 years except for a "fix the obvious errors and warnings" commit by retupmoca++ last summer
20:06 Mouq moritz: perl6 htmlify.p6  1312.50s user 336.63s system 89% cpu 30:40.88 total GAH
20:07 Mouq moritz: We could probably trim a good bit of that by doing partial HTMLifying of Pod and saving that, since there's a lot of reuse between pages we're not taking care of. I don't think I have time to mess with that today
20:11 Mouq moritz: Also, I'm guessing we could probably have a module that has a direct interface to pygments. I'm guessing shelling out to a new process of it over and over isn't exactly ideal
20:13 Mouq Oh, okay; without hilighting it's only: perl6 htmlify.p6 --no-highlight  364.04s user 3.76s system 95% cpu 6:26.71 total
20:13 * Mouq still wants to cut that :P
20:13 * Mouq afk
20:22 pmqs joined #perl6
20:25 geekosaur joined #perl6
20:26 timotimo hm, how do we do the highlighting? something must be very bad about that part for it to be that slow
20:32 raydiak timotimo: it's a recent addition, uses Pygments
20:32 zakharyas joined #perl6
20:32 timotimo i know
20:32 timotimo but why does it add such a ridiculous amount of time to the process?
20:36 telex joined #perl6
20:37 raydiak appears to write the code block out to a temp file for passing to pygmentize.../me would guess it's that part if it's not pygmentize itself
20:40 dalek nqp/longer: f18a667 | FROGGS++ | src/vm/jvm/runtime/org/perl6/n​qp/runtime/NativeCallOps.java:
20:40 dalek nqp/longer: use NativeLong for arguments and return types instead of Long
20:40 dalek nqp/longer:
20:40 dalek nqp/longer: This fixes the last problems with NativeCall on a 32bit machine on the jvm.
20:40 dalek nqp/longer: review: https://github.com/perl6/nqp/commit/f18a667b1a
20:40 moritz pygmentize on a typical code block is about 0.1s
20:42 moritz Mouq: one problem is that processing a file doesn't just htmlify it, but also uses the data to bulid the search index and disambiguation files
20:42 FROGGS_ p: say nqp::objprimspec 42
20:42 camelia rakudo-parrot 5ba2c8: OUTPUT«0␤»
20:42 FROGGS_ p: say nqp::objprimspec(my int $a = 42)
20:42 camelia rakudo-parrot 5ba2c8: OUTPUT«0␤»
20:46 nwc10 FROGGS_: I build longer (but not that most recent NQP change for the JVM), an valgrind spots no errors with the zavolaj tests.
20:47 FROGGS_ \o/
20:47 FROGGS_ nwc10: I love to hear that :o)
20:47 nwc10 I hope you trip to the zoo was good. We got up not-particularly-early to go to http://www.bauen-energie.at/
20:48 nwc10 and donate the children to the grandparents for the morning)
20:48 nwc10 it was big (but useful for what we needed)
20:48 FROGGS_ nwc10: it was a very nice sunny day, and so we walked around with friends... (= five kids in total)
20:49 FROGGS_ though, carrying my middle child on my shoulders payed me back the afternoon and evening :/
20:50 FROGGS_ I'd enjoyed that too if I would not live in a flat :o)
20:51 * moritz wonders if there's a need for an async DB interface
20:51 moritz and who would write that :-)
20:53 FROGGS_ ain't no time for that
20:55 * FROGGS_ has a feeling that he solved his problem with parrot (in a unmoritzish way)
20:55 FROGGS_ an*
20:55 nwc10 FROGGS_: we are currently in a flat. We were going there for details needed to help craft our escape plan.
20:55 FROGGS_ ahh
21:09 dalek nqp/longer: 126fe20 | FROGGS++ | src/vm/parrot/6model/reprs/P6 (4 files):
21:09 dalek nqp/longer: port native C type handling to parrot
21:09 dalek nqp/longer: review: https://github.com/perl6/nqp/commit/126fe20179
21:11 dalek rakudo/longer: 470a5cb | FROGGS++ | src/Perl6/Metamodel/NativeHOW.nqp:
21:11 dalek rakudo/longer: check for int-ness in NativeHOW.compose
21:11 dalek rakudo/longer:
21:11 dalek rakudo/longer: We get away with that in theory on moar and jvm but not on parrot. And it is certainly
21:11 dalek rakudo/longer: more correct this way.
21:11 dalek rakudo/longer: review: https://github.com/rakudo/rakudo/commit/470a5cb5dc
21:15 echowuhao joined #perl6
21:15 moritz raydiak, Mouq: I just did some timings, and htmlify.p6 spends about 45s writing those temp files, and 677s running pygmentize
21:16 moritz is 45s too long for writing 374521 character in total in 6863 spurt() calls?
21:16 moritz I'd say so :-)
21:17 moritz but it's not the bottleneck here
21:17 jdv79 is train_mod a routine?
21:18 jdv79 dead link for that on http://doc.perl6.org/language/about
21:18 moritz oh, trait_mod
21:19 FROGGS_ 404, aye: http://doc.perl6.org/routine/trait_mod
21:19 moritz well, not quite
21:19 jdv79 link for graphviz is also dead - s/com/org/
21:19 jdv79 same page
21:19 raydiak thanks moritz, useful info...almost makes me wonder if we shouldn't cache the highlighted blocks for subsequent runs
21:19 sqirrel__ joined #perl6
21:20 moritz raydiak: we should
21:20 moritz raydiak: and I'd like to use sha1 as the cache key, but not the nqp::sha1 opcode
21:20 moritz can't we spec Str.sha1hex or so? :-)
21:20 jdv79 oh, whoa.  train.  sorry.  i should probably find some contact lenses.  i was trying to avoid them today:(
21:22 dalek doc: 74326f7 | moritz++ | lib/Language/about.pod:
21:22 dalek doc: Fix link, jdv79++
21:22 dalek doc: review: https://github.com/perl6/doc/commit/74326f71f7
21:23 raydiak moritz: there's the Digest module
21:24 raydiak well, modules
21:25 pmurias joined #perl6
21:25 moritz pure perl implementations
21:25 moritz but I wanted to speed up the thing :/
21:26 dalek nqp/js: 5272c6b | (Pawel Murias)++ | / (2 files):
21:26 dalek nqp/js: Make nqp::istype work on nqp::null().
21:26 dalek nqp/js: review: https://github.com/perl6/nqp/commit/5272c6be2e
21:26 raydiak moritz: erm, right
21:26 grondilu what's wrong with nqp::sha1?
21:27 moritz grondilu: it's rakudo specific
21:27 moritz grondilu: and not part of the public API
21:27 grondilu ok
21:29 grondilu there is always http://rosettacode.org/wiki/SHA1#Perl_6.  Maybe it could be made faster with native types or something.
21:29 moritz ok, I think we're approaching this wrong :-)
21:29 moritz what I *really* want is a cache
21:29 raydiak what if the digest module used nqp::sha1 where available, falling back to PP if some poor soul tries htmlify on niecza or whatever?
21:29 moritz the sha1 is just an implementation detail of that
21:29 moritz raydiak: +1
21:31 raydiak cuz regardless of algorithm, idk if we currently have any fast portable hashing of any sort
21:32 grondilu that'd be unfortunate imho
21:33 pmurias we will need a way to check if nqp is supported on a given implementation
21:33 moritz ok, TBH I haven't benchmarked Digest::*
21:33 moritz maybe I should before calling it slow :-)
21:33 masak today's mini-challenge: write a program that finds all the solutions to 1/p + 1/q + 1/r = 1/2, 0 < p <= q <= r being integers. (hint: there are 10 such solutions.)
21:34 dalek nqp/js: c501739 | (Pawel Murias)++ | / (4 files):
21:34 dalek nqp/js: Implement and test nqp::sha1.
21:34 dalek nqp/js: review: https://github.com/perl6/nqp/commit/c5017396b8
21:37 raydiak as far as checking for nqp, "try { require nqp }" might work
21:37 grondilu m: P: for 3 .. * -> $p { for $p .. * -> q { for q .. * -> \r { say
21:37 camelia rakudo-moar 5ba2c8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kw4CnitO2g�Couldn't find terminator }�at /tmp/kw4CnitO2g:1�------> [32mor $p .. * -> q { for q .. * -> \r { say[33m�[31m<EOL>[0m�»
21:40 * grondilu pressed enter accidentally, as you probably guessed
21:40 FROGGS_ could be a very intelligent keyboard cat also :o)
21:41 masak let me know where such cats can be found
21:41 * grondilu wonders if there is a more elegant way to enumerate increasing integers.
21:42 * masak would recommend not iterating towards a solution on #perl6 camelia ;)
21:46 grondilu .oO( 1/p + 1/q == 1/2 - 1/r <=> (p + q)/(pq) = (r - 2)/(2r)  and then using a trinome maybe ?)
21:48 Kristien Tank you for this perl of wisdom.
21:49 masak ok, I have a program that prints all the solutions. it's 16 LoC.
21:49 masak I also may have discovered a bug.
21:50 masak m: Q: for 1..3 { next Q if $_ == 2; say $_ }
21:50 camelia rakudo-moar 5ba2c8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/yril2FnfqN�Alphanumeric character is not allowed as a delimiter�at /tmp/yril2FnfqN:1�------> [32mQ: for 1..3 { next Q [33m�[31mif $_ == 2; say $_ }[0m�»
21:50 masak std: Q: for 1..3 { next Q if $_ == 2; say $_ }
21:50 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Alphanumeric character is not allowed as delimiter at /tmp/V78_cOoOhH line 1:�------> [32mQ: for 1..3 { next Q [33m�[31mif $_ == 2; say $_ }[0m�Parse failed�FAILED 00:00 138m�»
21:50 masak ah; maybe not, then.
21:50 raydiak heh /me just ran into the exact same one
21:50 masak pro tip: don't name your things Q something :P
21:51 masak m: Q: for 1..3 { next "Q" if $_ == 2; say $_ }
21:51 camelia rakudo-moar 5ba2c8: OUTPUT«1␤3␤»
21:51 masak can always do that, I guess.
21:51 raydiak yeah Qs break things...especially solar systems and space ships
21:52 spider-mario joined #perl6
21:53 * raydiak breaks down and opens vim instead of writing it as a one-liner on the command line
21:53 raydiak s/writing/debugging/
21:53 masak :)
21:54 masak and although the pursuit of knowledge is itself enough, you can also look at the pretty pictures at http://en.wikipedia.org/wiki/Tiling_by​_regular_polygons#Combinations_of_regu​lar_polygons_that_can_meet_at_a_vertex
21:55 masak (I found that one via http://math.ucr.edu/home/baez/42.html )
21:59 grondilu m: say (^2 X ^2).perl
21:59 camelia rakudo-moar 5ba2c8: OUTPUT«(0, 0, 0, 1, 1, 0, 1, 1).list␤»
22:00 masak m: say (^2 X ^2).tree
22:00 camelia rakudo-moar 5ba2c8: OUTPUT«0 0 0 1 1 0 1 1␤»
22:00 masak m: say (^2 X ^2).tree.perl
22:00 camelia rakudo-moar 5ba2c8: OUTPUT«(0; 0; 0; 1; 1; 0; 1; 1).item␤»
22:00 grondilu that's not good, is it?
22:00 masak m: say (^2 X ^2).lol.perl
22:00 camelia rakudo-moar 5ba2c8: OUTPUT«(0; 0; 0; 1; 1; 0; 1; 1)␤»
22:00 * masak shrugs
22:00 masak looks wrong to me, but...
22:01 masak ...I never had a working intuition about flattening, trees, and lols.
22:01 masak I just generally avoid contact with them, to be honest :)
22:01 grondilu I found this when trying to brute-force your problem
22:02 rurban joined #perl6
22:02 grondilu I wanted to write somthing like:  for 3..* X 3..* X 3..* { next unless [<=] @$_; ... }
22:02 grondilu but that did not work out
22:03 masak quick workaround is to add `-> $p, $q, $r`
22:03 adu joined #perl6
22:04 grondilu that does work indeed
22:04 vendethiel masak: definitely looks wrong to me...
22:04 vendethiel but again, flattening certainly isn't my favorite p6 feature
22:04 echowuhao joined #perl6
22:04 vendethiel I often find it's a think I constantly have to keep track of in my code. It's not automatic. I'm definitely missing some use of it, though...
22:04 FROGGS__ joined #perl6
22:06 grondilu this kind of behavior will have to be learnt again after the GLR, I suppose, so it does not matter much right?
22:08 virtualsue joined #perl6
22:08 * masak .oO( the bug was not submitted, because nobody was all that fond of flattening )
22:12 raydiak .oO( [BUG] implicit flattening )
22:13 vendethiel .oO( [BUG] implicit )
22:17 davido__ joined #perl6
22:18 ninjazach joined #perl6
22:21 Sqirrel joined #perl6
22:22 diana_olhovik_ joined #perl6
22:23 raydiak masak: I have a solution, but it's kinda brain-dead and utilizes not only your hint of 10 answers, but also an arbitrarily-chosen upper bound of 100 for each var
22:23 masak raydiak: ok. I'm still interested in seeing it.
22:23 masak raydiak: I'll post mine if you'll post yours.
22:23 vendethiel m: 'a'->2
22:23 camelia rakudo-moar 5ba2c8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9tOrR4EV5a�Unsupported use of -> as postfix; in Perl 6 please use either . to call a method, or whitespace to delimit a pointy block�at /tmp/9tOrR4EV5a:1�------> [32m'a'->[33m�[31m2[0m…»
22:25 raydiak masak: https://gist.github.com/ra​ydiak/a9063c068f93a162ca2e
22:26 masak raydiak: https://gist.github.com/masak/a26d1b2b7417b0db7a28
22:27 masak ok, I see.
22:27 raydiak masak: your bailout tests are what I was missing
22:27 masak I don't need the artificial upper bound because I have those tests.
22:27 raydiak yep
22:27 dwarring joined #perl6
22:27 masak think of what we're iterating through as a simplex in some 3-space. the extra tests build the necessary walls, kind of.
22:28 rurban joined #perl6
22:29 raydiak ah, I see
22:33 echowuhao joined #perl6
22:36 spider-mario joined #perl6
22:37 dolmen joined #perl6
22:37 raydiak I considered something similar to those tests, but couldn't get it into mental focus so just used the bound...after that, also considered a version which incrementally expands the bound until 10 solutions are found
22:43 dalek roast: 2e94c20 | (David Warring david.warring@gmail.com)++ | integration/weird-errors.t:
22:43 dalek roast: Revert "Unfudge passing test"
22:43 dalek roast:
22:43 dalek roast: This reverts commit 4954d43df4525130f0fb27cc3cf48f7d4e10325e.
22:43 dalek roast: RT #123686 Seems to be back.
22:43 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123686
22:43 dalek roast: review: https://github.com/perl6/roast/commit/2e94c20d44
22:44 avuserow_ moritz: re pygments being slow, have you compared shelling out versus Inline::Python?
22:44 raiph joined #perl6
22:47 pippo o/ #perl6
22:47 pippo left #perl6
22:47 Kristien hello pippo
22:48 masak bye pippo
22:49 dalek nqp: bb5a1c1 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
22:49 dalek nqp: add constants for C data types
22:49 dalek nqp: review: https://github.com/perl6/nqp/commit/bb5a1c1216
22:49 dalek nqp: f82ceb0 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
22:49 dalek nqp: add constant for C type long
22:50 dalek joined #perl6
22:50 dalek rakudo/nom: 7d49693 | FROGGS++ | src/Perl6/Metamodel/NativeHOW.nqp:
22:50 dalek rakudo/nom: handle C type names in "is nativesize" trait
22:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7d49693e3b
22:50 dalek rakudo/nom: e4811fe | FROGGS++ | / (9 files):
22:50 dalek rakudo/nom: Merge branch 'nom' of github.com:rakudo/rakudo into longer
22:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e4811fe427
22:50 dalek rakudo/nom: 12bab2b | FROGGS++ | src/ (2 files):
22:50 dalek rakudo/nom: move C type handling into traing "is ctype"
22:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/12bab2b54c
22:50 dalek rakudo/nom: a25f366 | FROGGS++ | src/ (5 files):
22:50 dalek rakudo/nom: Merge branch 'nom' of github.com:rakudo/rakudo into longer
22:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a25f366699
22:50 dalek rakudo/nom: 470a5cb | FROGGS++ | src/Perl6/Metamodel/NativeHOW.nqp:
22:50 dalek rakudo/nom: check for int-ness in NativeHOW.compose
22:50 dalek rakudo/nom:
22:50 dalek rakudo/nom: We get away with that in theory on moar and jvm but not on parrot. And it is certainly
22:50 dalek rakudo/nom: more correct this way.
22:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/470a5cb5dc
22:50 dalek rakudo/nom: 493d73e | FROGGS++ | src/ (2 files):
22:50 dalek rakudo/nom: Merge branch 'longer' of github.com:rakudo/rakudo into nom
22:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/493d73e5db
22:50 dalek rakudo/nom: 127c99e | FROGGS++ | tools/build/NQP_REVISION:
22:50 dalek rakudo/nom: get nqp with C type improvements
22:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/127c99eb1c
22:51 dalek zavolaj: b6c78ed | FROGGS++ | / (8 files):
22:51 dalek zavolaj: s/int/long/ and use long and int32 correctly
22:51 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/b6c78ed7c6
22:51 dalek zavolaj: 6dc894e | FROGGS++ | lib/NativeCall.pm6:
22:51 dalek zavolaj: use new trait "is ctype"
22:51 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/6dc894ecee
22:52 FROGGS I'll move NativeCall to the rakudo repo tomorrow if nobody beats me to it (I'm tired)
22:52 Mouq masak: Just saw the challenge, do p, q, and r have to be different numbers or are they any numbers of Z+ ?
22:52 masak Mouq: they can be equal.
22:53 masak cf. the '<=' conditions in the initial statement. :)
22:53 Mouq Oh, okay :)
22:59 Kristien reminds me of the guy who asked what kind of reverse lambda <= was in C# (lambda is (x, y) => x + y) because he didn't realise it was smaller than or equal to
23:00 masak in some BASIC variants I've used, `=>` would mean the same as `>=`.
23:00 Kristien Erlang has => and it's horrible. :(
23:00 masak it took me until C and similar languages to realize that the order between those two symbols even mattered :)
23:03 Kristien Erlang also has "and then" and "or else" to be short circuiting and "and" and "or" are strict. :P
23:10 echowuhao joined #perl6
23:10 Kristien goodbye
23:21 adu joined #perl6
23:26 grondilu stumbbled upon 1+2+3+... = -1/12 again while wandering on Wikipedia.  Felt like watch the relevant numberphile video again: https://youtube.com/watch?v=w-I6XTVZXww
23:26 grondilu maybe we should have [+] 1 .. * return -1/12 :)
23:29 masak sounds like a good job for a module :)
23:30 masak was it Ramanujan who first proposed that -1/12 be the answer?
23:32 Juerd I actually like the idea of hard coding that. A lot of people will probably try that one, and it'd be a great easter egg.
23:32 Juerd m: say [+] 1...
23:32 camelia rakudo-moar 5ba2c8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/YyqTqWHOvV�Missing semicolon.�at /tmp/YyqTqWHOvV:1�------> [32msay [+] 1...[33m�[31m<EOL>[0m�»
23:32 Juerd Semicolon? :(
23:32 Juerd m: say [+] 1..*
23:33 camelia rakudo-moar 5ba2c8: OUTPUT«(timeout)»
23:33 Juerd -1/12 is obviously better than that.
23:34 grondilu masak: not sure Ramanujan was the first but he did discover it by himself.
23:35 colomon argh, not that -1/12 nonsense again
23:38 vendethiel joined #perl6
23:43 bcode joined #perl6
23:44 masak colomon: hey, nonsense? I don't think you fully appreciate the sense -1/12 is making here.
23:44 colomon http://blogs.scientificamerican.com​/roots-of-unity/2014/01/20/is-the-s​um-of-positive-integers-negative/
23:46 masak colomon: interesting post. I skimmed it.
23:47 masak yes, of course the series doesn't converge, and it's potentially misleading to say that the sum actually is -1/12.
23:47 colomon it’s 100% misleading
23:48 masak (Evelyn Lamb)++
23:48 masak 'night, #perl6
23:51 grondilu colomon: what about 1 - 1 + 1 - 1 ... = 1/2?  What do you think about this one?
23:51 colomon grondilu: also nonsense
23:51 ninjazach joined #perl6
23:53 grondilu well, tbh I don't quite understand why it could not be zero, since I could write it:  (1 - 1) + (1 - 1) + ... = 0 + 0 + 0 + ...
23:55 colomon if you’re willing to ignore the fact it has no sum and pretend it does have one, you can do all sorts of remarkable things.  ;)
23:55 grondilu what do you mean by "it has no sum"?
23:56 raydiak doesn't that violate order of operations?
23:56 grondilu raydiak: addition is associative, I can put parenthesis whereever I want.
23:57 raydiak well then I can write 1-(1+1)-(1+1)-(1+1)... L)
23:57 raydiak *:)
23:57 grondilu you can
23:57 colomon grondilu: to be precise, the series 1 - 1 + 1 - 1 + 1 … does not converge
23:57 colomon Here’s a much more detailed explaination.
23:57 colomon http://skullsinthestars.com/2014/01/18/infinit​e-series-not-quite-as-weird-as-some-would-say/
23:58 grondilu colomon: then you're using a particular conception of what is an infinite sum.  The whole point is that there might be other conceptions.
23:58 colomon “We say a series converges only if, on adding more and more terms to the sum, we find that the total gets closer and closer to a single value.”
23:59 grondilu before mathematical definitions are written down, someone had to imagine them and they did it from an idea that they have in mind.  They can always refine this idea and write other definitions.
23:59 colomon Sure, if you define “sum” to mean “not a sum”, you can make it work

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

Perl 6 | Reference Documentation | Rakudo