»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
00:01 BenGoldberg joined 00:02 skids joined 00:06 ggoebel111111118 joined, ggoebel111111117 left 00:07 virtualsue left 00:20 Vlavv left 00:25 gentoo joined, BenGoldberg left
japhb _sri: Re: irclog.perlgeek.de/perl6/2015-01-06#i_9895878 , what is responsible for the 30% speed increase? (I've been away from Perl 5 blead for a few releases; I was unaware such large improvements were still coming down the pipe.) 00:27
00:30 araujo left 00:31 araujo joined 00:33 Vlavv joined, tinyblak_ joined
_sri japhb: cheaper method calls and multi level dereferencing (mostly through new special ops) 00:35
japhb _sri: Meaning, they made '$foo->bar(1,2,3)' and '$foo{bar}{baz}[1][2][3]' faster? 00:36
_sri ye
japhb Interesting.
_sri (there's more to it, but that's the tldr) 00:37
japhb Very nice indeed. 00:39
00:40 vendethiel- joined, vendethiel left 00:43 raiph left 00:51 raiph joined 01:05 andreoss joined
andreoss m: sub foo(int \x) {x}; my int $x = 1; say foo $x; 01:07
camelia rakudo-moar 80b912: OUTPUT«1␤»
andreoss m: sub foo(int \x) is cached {x}; my int $x = 1; say foo $x;
camelia rakudo-moar 80b912: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method␤ in method gist at src/gen/m-CORE.setting:7738␤ in block at src/gen/m-CORE.setting:3694␤ in any enter at src/gen/m-Metamodel.nqp:3185␤ in method invoke at src/gen/m-CORE.setting:3…»
andreoss native ints conflict with memoization 01:08
01:15 tinyblak_ left 01:18 tinyblak joined
andreoss m: my int \x = 1; say x; 01:26
camelia rakudo-moar 80b912: OUTPUT«Type check failed in binding; expected 'int' but got 'Int'␤ in any bind_error at src/vm/moar/Perl6/Ops.nqp:224␤ in block <unit> at /tmp/FmDtOoccID:1␤␤»
andreoss m: my int \x = (my int $x = 1); say $x;
camelia rakudo-moar 80b912: OUTPUT«Type check failed in binding; expected 'int' but got 'Int'␤ in any bind_error at src/vm/moar/Perl6/Ops.nqp:224␤ in block <unit> at /tmp/yNR4H5UDBt:1␤␤»
TimToady we don't have native pointers, at least, not yet 01:28
skids m: my int $r = 1; "OHAI".say; my int \x = $r;
TimToady and that's a binding, really, not an assignment
camelia rakudo-moar 80b912: OUTPUT«OHAI␤Type check failed in binding; expected 'int' but got 'Int'␤ in any bind_error at src/vm/moar/Perl6/Ops.nqp:224␤ in block <unit> at /tmp/Ok9YqIcRBg:1␤␤»
01:28 jack_rabbit left
TimToady the \x notation is really aliasing 01:29
and we can't do native aliases yet 01:31
it might be possible after jnthn's pe work
01:32 raiph left
andreoss memoization for natives doesn't work for the same reason? 01:33
due to lack of pointer arithmetic for natives 01:34
01:34 vendethiel- left 01:35 vendethiel joined
TimToady the current caching probably depends on object introspection, and with natives you have to introspect the descriptors of the location, not the object itself 01:38
since a set of 64 bits can't really tell you anything about itself if it happens to be all dedicated to holding an int 01:39
01:40 dayangkun joined 01:42 sirdancealot joined 01:43 yeahnoob joined 01:50 kaare__ left, anaeem1 left 01:51 kaare__ joined 01:53 dayangkun left 01:56 anaeem1_ joined 02:00 raiph joined, anaeem1_ left 02:05 chenryn joined 02:07 Akagi201 joined 02:19 yeahnoob left 02:21 yeahnoob joined, orafu joined
skids Hrm. Some PASS results on cpandatesters are actually FAIL if you open them up. testers.perl6.org/report/dist/Sum/8688 02:21
02:23 rmgk_ joined, rmgk is now known as Guest17192, Guest17192 left, rmgk_ is now known as rmgk 02:28 tinyblak left, tinyblak joined 02:37 raiph left 02:38 cognominal left 02:51 andreoss left, BenGoldberg joined 03:03 raiph joined 03:04 orafu left 03:08 cognominal joined 03:12 tinyblak_ joined 03:14 tinyblak left 03:18 Akagi201 left 03:19 Akagi201 joined 03:20 xinming_ joined 03:23 xinming left
ugexe skids: its also saying all those tests are on the same line 03:25
s/all/many/
skids Yeah that's more Test::'s problem I think. 03:28
ugexe did you have this problem more than a week ago? 03:34
03:34 vendethiel left 03:35 noganex joined 03:38 noganex_ left
ugexe looks like no 03:38
cognominal @_ericelloit is setting a gist gist.github.com/ericelliott/d576f7...fc1b27dace about js resources. This is one of them that I find of general interest because defining a lot of programming vocabulary ; github.com/kriskowal/gtor 03:41
ugexe yea i think its when Panda switched to the pipe command recently 03:49
skids ugexe: I just today even discovered cpandatesters. 03:50
(nonsequiter) gist.github.com/skids/47f2ed6b2f64630fc571 03:51
time to upgrade 1000 wifi aps. wish me luck. 03:54
03:56 yeahnoob left 04:04 Mouq left, KCL_ joined
ugexe looks like it may be fixed now 04:04
04:05 tinyblak_ left 04:06 tinyblak joined
ugexe i saw this because here Slang::SQL also clearly fails it Test stage but is marked as passed: testers.perl6.org/report/dist/Slang::SQL/8215 04:07
1 day later it was tested again with the same output but is marked as fail: testers.perl6.org/report/dist/Slang::SQL/8814 04:08
skids OK, so it was previously fixed, just Sum had no tests run since the fix, you mean? 04:09
ugexe well i dont know if it was actually fixed, it just seems like it may be 04:10
04:10 tinyblak left
skids Ah. 04:11
ugexe my $x = pipe("prove -e 'perl6 -Ilib' t/ 2>&1"); say $x.handle.close == 0;
can you run that on your bsd machine?
i think that will give you the exit code
skids I don't have one, that's someone else's test. 04:12
04:12 rurban left
ugexe ah 04:12
nope, you have a failure on the same day using the same compiler and backend 04:13
a failure that says pass^
skids busy hunting for 6 AWOL wifi APs. 04:16
ugexe i submitted a issue to panda's repo (even though it could be a rakudo or nqp pipe bug) github.com/tadzik/panda/issues/130 04:19
skids ugexe++
04:20 sirdancealot left 04:28 Mouq joined
ugexe i just fired off a legit passing test for Sum (on debian) fwiw testers.perl6.org/report/dist/Sum/8978 04:32
04:38 mr-foobar left
skids Thanks. 04:38
04:41 adu joined
skids Architecture "64" hmm. 04:42
adu skids: what are you talking about? 04:43
skids On your test the "Architecture" column just says "64". Probably can't parse the OS string or something. 04:46
04:47 chenryn left 04:49 Akagi201 left
skids Yep same with my debian test. 04:52
04:54 Rounin left 04:57 Mouq left
adu my test? 04:58
your test? 04:59
ugexe skids: its under the debian column
05:01 anaeem1 joined
ugexe or you mean parse the arch out of os string 05:02
s/or/oh/
odd, for hardware it has x86_64 05:03
05:05 anaeem1 left 05:10 adu left 05:11 Sqirrel left 05:13 Sqirrel joined 05:17 chenryn joined 05:19 Sqirrel left 05:25 tinyblak joined 05:28 Sqirrel joined
TimToady m: say << a b c 'x' >>[0] 05:33
camelia rakudo-moar 80b912: OUTPUT«a b c␤»
TimToady is testing a fix for this...
05:38 chenryn left 05:40 yeahnoob joined, yeahnoob left 05:41 yeahnoob joined 05:55 BenGoldberg left 05:57 raiph left 06:00 chenryn joined
TimToady unfortunately, it appears that there's a different part of the parser that depends on the bug, but it's minor, so I'm gonna check it in anyway, I think 06:01
dalek ast: d8d3a15 | TimToady++ | S02-literals/quoting.t:
ensure << a b c 'x' >> doesn't parcelize <a b c>
06:02
kudo/nom: 4c6cfab | TimToady++ | src/Perl6/Actions.nqp:
make << a b c 'x' >>[0] return 'a' not 'a b c'
06:04 chenryn left, chenryn joined 06:06 cognominal left
dalek ast: 2edaa16 | TimToady++ | S06-operator-overloading/sub.t:
fudge circumfix:<<` `>> misparse for now
06:10
06:11 sqirrel_ joined
TimToady jnthn: ^^ I don't understand how the old code produced "` `" for that, which is apparently simple enough to pass the 'too complex to use in name' check 06:16
fixing the bug I just fixed, the <<` `>> construct now properly returns ("`", "`"), but this gives the circumfix parser heartburn, so I've fudged the test for the moment 06:17
I also don't understand why ("`","`") isn't considered to have a compile-time value... 06:18
the test in question seems to be examining the parts of the infix:<,>, but failing anyway 06:19
06:24 xinming_ left 06:31 chenryn left 06:48 chenryn joined 06:51 araujo left 06:52 araujo joined 06:54 kaleem joined 06:55 [Sno] left 06:58 xinming joined 06:59 dayangkun joined, dayangkun left 07:04 Mso150 joined 07:13 gentoo left, yeahnoob left
sergot_ hi o/ 07:22
raydiak \o sergot
07:23 darutoko joined
sergot_ tony-o: it should handle server connections 07:24
07:24 IllvilJa left, Exodist joined
sergot_ tony-o: and yeah, it has poor tests :( 07:24
hi raydiak ! :)
07:25 IllvilJa joined
Woodi hallo #perl6 :) 07:26
07:26 yeahnoob joined
sergot_ hi Woodi :) 07:27
07:27 yeahnoob left, sergot_ is now known as sergot, yeahnoob joined, yeahnoob left, yeahnoob joined 07:28 yeahnoob left, yeahnoob joined, yeahnoob left 07:29 yeahnoob joined, yeahnoob left 07:30 sqirrel_ left
Woodi it is a bit strange question: which one to learn v5 or v6 ? and even more uncomfortable to answer it. but I wonder if good answer thes days is: learn both and you will use one which match your use case (app for sale/learning to program/hobby scripting) 07:31
I think in last years multi-languagines is common in IT. even in Java/MS shops :) 07:32
and all the Hello Worlds looks nearly identical in all languages :) 07:33
perfect lesson for newbie programmer 07:34
there is no moarvm in Debian repos, which is good news. we can make one so we can keep it up to date. Debian have Rakudo from 2014.07 (what is not so bad) but it is 2 R* behind current 07:39
07:39 Ugator joined
El_Che Hi Woodi: I think perl5 would be easier to learn because there are great books out there. v6 will get there soon, I hope 07:46
Woodi El_Che: the problem is that "learn" depends on student case... learn can be "just make a script I need" or "complete knowledge to put into CV"... 07:48
07:51 lumimies joined
El_Che Woodi: true. But often those 2 scenarios are related 07:52
07:54 pecastro left 07:58 fhelmberger joined
raydiak yes p5 would likely be easier to get started with. but it doesn't really answer the question of "which to learn"...that choice can only sensibly be made in the context of your goals and motivations, like any choice 07:58
iow my answer is it's impossible to give a good answer without more information specific to each individual...even learning both would often be the least sensible thing to do, depending on what your gaol is 07:59
*goal
heck sometimes the most sensible thing to do is pull out a notebook and pencil :) 08:01
moritz \o
raydiak o/ 08:02
08:03 eternaleye left
Woodi but is using many languages more common now ? this is my impresion in last years... 08:05
08:06 [Sno] joined
JimmyZ learn both, and then choose which you want to learn more 08:07
raydiak JimmyZ++, well put...if you have to seriously ask yourself this, you'd be well-served to at least spend a few hours or days with each before deciding 08:09
08:10 eternaleye joined, eternaleye is now known as eternaley
Woodi btw. not so long ago I hear my uncle (who is building and fixing thing real things) stated thet he probably will be learning to his death : 08:14
becouse water and masonery and other "technologies" is evolving :)
*are 08:15
08:23 zakharyas joined
Woodi hmm, found MoarVM on the list of not ready packages... www.debian.org/devel/wnpp/being_packaged 08:31
08:31 sirdancealot joined 08:34 pdcawley joined, rindolf joined 08:41 tinyblak left, krunen joined 08:42 tinyblak joined 08:44 Ugator left 08:48 virtualsue joined 08:56 tinyblak left 08:57 tinyblak joined
masak good morning, #perl6 08:58
moritz good masak, morning
08:58 lizmat joined
masak ice-breaker of the day: the README.md of github.com/masak/007 is clearly inadequate as it stands. what should a decent project have in its README.md, and in what order? 08:58
08:59 FROGGS left
masak wishes he could remember where he read about the need for a section "## But is it awesome?nYes." in all project READMEs 08:59
09:01 anaeem1 joined, tinyblak left 09:02 cognominal joined 09:03 rurban joined
moritz masak: it needs a story, like ufo's README :-) 09:06
09:06 anaeem1 left 09:08 abraxxa joined 09:09 FROGGS joined 09:10 anaeem1_ joined 09:11 anaeem1_ left, telex left, abraxxa left 09:12 jluis joined, abraxxa joined, telex joined 09:16 Mso150 left 09:17 baest joined 09:20 vendethiel joined, molaf__ joined
masak moritz: hokay. remember, you asked for it. :P 09:21
09:23 molaf_ left
dalek ecs/newio: f2ed255 | (Stéphane Payrard)++ | S99-glossary.pod:
gorilla/banana problem
09:24
ecs/newio: 210cb23 | (Stéphane Payrard)++ | S99-glossary.pod:
fixing outward links in gorilla/banana
ecs/newio: 197d679 | (Stéphane Payrard)++ | S99-glossary.pod:
FP
ecs/newio: 17976d9 | lizmat++ | S99-glossary.pod:
Merge branch 'master' into newio
09:26 yeahnoob joined, yeahnoob left, yeahnoob joined, yeahnoob left 09:27 yeahnoob joined, yeahnoob left 09:28 yeahnoob joined, yeahnoob left 09:29 yeahnoob joined, yeahnoob left, yeahnoob joined, yeahnoob left 09:30 yeahnoob joined, yeahnoob left 09:31 yeahnoob joined 09:34 cognominal left 09:35 Ovid joined, Ovid is now known as CurtisOvidPoe
CurtisOvidPoe Morning all. Can anyone tell me why this doesn’t print the k/v pairs I’m expecting? gist.github.com/Ovid/fc552949223750349a8b 09:36
09:37 dakkar joined
moritz CurtisOvidPoe: because the match object isn't global 09:38
CurtisOvidPoe I don’t know what that means.
09:38 anaeem1 joined
moritz ok, the grep gets a block, { / $<key>=\w+ ',' $<value>=\w+ / } 09:39
arnsholt It means that $fh.lines.grep({ / $<key>=\w+ ',' $<value>=\w+ / }) is basically $fh.lines.grep({ my $/; / $<key>=\w+ ',' $<value>=\w+ / })
moritz and inside that grep, there's a $/, which is the match object
arnsholt So the $/ you're accessing in the loop isn't the one you're accessing in the grep closure
moritz but there's no mechanism to get one match per list item into the for-block
CurtisOvidPoe So I *can’t* use the $fh.lines.grep idiom and capture the data after? (Since {} forces a closure, that belatedly makes sense) 09:40
moritz no
there are two idiomatic ways to do it (IMHO) 09:41
one is to say $fh.lines.map(/ $<key>=\w+ ',' $<value>=\w+ /).grep(*.so).map( -> $/ { say $<key>, $<value> })
that is, first transform into match objects
and the other is a bit more procedural: 09:42
09:42 dayangkun joined
moritz my @result = gather for $fh.lines { if /regex here/ { take $<key> => $<value> } } 09:42
dalek kudo/nom: fd77386 | lizmat++ | src/core/Inc.pm:
Apparently, *all* backends need a populated $*VM

to be able to create valid precomped modules. Please note that this does
  *not* fix #123276 on the JVM, but at least it now generates an error that
actually indicates the problem.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123276
CurtisOvidPoe The first won’t fly. I’m trying to cherry pick the “Perl 6 for Mere Mortals” idioms. 09:43
09:43 vendethiel left
CurtisOvidPoe For the second, that “take” returns pairs with the key being a string and the value being a match object. That 09:45
That seems counterintuitive.
To make it work, I need take $<key> => ~$<value> 09:46
Or is that a bug?
moritz no, not a bug
btyler_ lizmat: to follow up on Inline::P5 and threading stuff -- after a bit of consideration, it seems obvious that having multiple threads access p5 guts in parallel is going to be a Bad Time. firing up a new I::P5 object per thread works great as long as perl is compiled with -Dusemultiplicity
masak no, you have to stringify explicitly.
moritz CurtisOvidPoe: elements of match objects are match objects again (it's a tree), it's just that pair keys stringify by default (I think) 09:47
masak that gather/take example feels funny to me. I knew you were trying to fix the grep example, but if I saw such a gather/take with an if in it, I'd go "that one is better written as a grep"...
moritz the => stringifies the key
masak: except it's not a pure grep, because it also transforms the data 09:48
one could also write .map({ /regex/; $<key> => ~$<value> if $/ })
masak I think I'm not seeing the part where it transforms the data.
CurtisOvidPoe I’ve found plenty of examples for my “mere mortals” talk which are clean and easy, but if I add that lines.map.grep.map example, I’ll get laughed out of the room.
masak I just see a pair.
moritz masak: it turns a string (the line) into a pair 09:50
CurtisOvidPoe: then go with the gather/take, that's fairly intuitive, IMHO 09:51
masak "it turns an X into a Y" is what grep *does*.
moritz no
grep is "select only the Y"
masak oh wait. yes.
CurtisOvidPoe grep is likely better written as “filter” and map as “transform"
(No, I’m not suggesting we change those names :)
moritz masak++ usually knows that :-)
masak yeah, momentary lapse. 09:52
now would be a good time to claim that I need to learn more FP, though :P
CurtisOvidPoe: "map" and "transform" are synonyms in English, no? given how useful "map" is, I think three letters is much better Huffman than nine. 09:53
09:53 yeahnoob left
masak the etymology of "grep" is exceesdingly silly, but it's also nice and short. and it kinda "rhymes" with "map". 09:53
CurtisOvidPoe “map” is ambiguous in the English language, but “transform” is not.
masak "map" as a verb is not that ambiguous, IMO. 09:54
"map these things to those things"
btyler_ let's map out the project
CurtisOvidPoe To “map something out” is to plan it.
Heh :)
lizmat also likes the audio proximity of grep and grok
CurtisOvidPoe I know people love Huffman encoding (I usually do), but I’ll cheerfully go with a longer keyword if it’s more clear. 09:55
moritz must agree with python that "filter" is a very good name for "grep"
masak it is.
CurtisOvidPoe grok I could live with due to the silliness :)
btyler_ also, CurtisOvidPoe, -great- idea for a talk -- looking forward to it :) 09:56
moritz and grog you could dring :-)
erm, drink :-)
CurtisOvidPoe btyler_: Thanks, but I have to admit that I’m finding it harder and harder to find examples “for mere mortals”. It’s making me feel uncomfortable with the premise. 09:57
btyler_ one of the things I struggled with when I started getting into p6 was that a lot of the examples floating around were written by core p6 hackers showing off some amazingly powerful feature in a handful of lines, which was often hard to digest as someone who only knew a bit
CurtisOvidPoe Agreed.
That’s been scaring people off for a long time. In Perl 5, I wouldn’t show symbol table hackery to a newbie to get around a renamed method.
btyler_ pssh, 'no strict "refs"' is a great first step :D 09:58
but yeah, absolutely agreed 09:59
CurtisOvidPoe Heh.
09:59 dayangkun left
CurtisOvidPoe The .perl method has no formatting options, right? 10:00
moritz correct
10:01 sven_123 joined
CurtisOvidPoe Is it planned in the future, or is it staying the way it is? 10:02
JimmyZ stay, I would say 10:03
moritz I'm not sure
we need some work for making .perl work on cyclic object graphs
JimmyZ .perl return codes that can be evaled? 10:04
moritz maybe in that course it would make sense to add some formatting too
JimmyZ: yes
JimmyZ: but in practice, it's mostly used for debugging
not for serialization
JimmyZ and gist too?
CurtisOvidPoe Thanks. 10:05
10:05 pdcawley left, bjz joined 10:06 bjz left, virtualsue left, bjz joined
lizmat moritz: disagree, .perl *should* be for serialization of data structure, in my opinion 10:12
we cannot use precomp for that, as we cannot carry that between Perl 6 versions
moritz lizmat: in principle, I agree. In practice, that's not how it tends to be used.
I mean yes, it should still support that use case 10:13
but we should be aware that it's not the only use case
10:17 chenryn left 10:18 fwilson left
lizmat moritz: fair 10:18
lumimies I'm wondering if it might return an AST at some point 10:19
jnthn CurtisOvidPoe: If you don't .lines first, and just .slurp the file and .match with the regex, you're looping over a bunch of matches. 10:25
m: my $a = "x=1\ny=2\n"; for $a.match(/$<key>=\w+ '=' $<value>=\w+/, :g) { say .<key> }
camelia rakudo-moar 80b912: OUTPUT«「x」␤␤「y」␤␤»
jnthn m: my $a = "x=1\ny=2\n"; for $a.match(/$<key>=\w+ '=' $<value>=\w+/, :g) { say .<key> ~ ' is ' ~ .<value> }
camelia rakudo-moar 80b912: OUTPUT«x is 1␤y is 2␤»
CurtisOvidPoe jnthan: I didn’t slurp because I was showing the common newbie mistake of confusing for/while on filehandles, but since they’re lazy in Perl 6, it’s not a disaster. 10:26
jnthn Ah
10:26 brrt joined
jnthn m: my $a = "x=1\ny=2\n"; for $a.lines>>.match(/$<key>=\w+ '=' $<value>=\w+/, :g) { say .<key> ~ ' is ' ~ .<value> } # works, though is back in the category of "more than I want to have to explain" 10:27
camelia rakudo-moar 80b912: OUTPUT«x is 1␤y is 2␤»
brrt \o
CurtisOvidPoe You mean “back in the category of “more than Ovid could explain” 10:28
Wait, no, that’s actually not too bad.
10:28 Patterner joined
jnthn To be honest, though, I'd probably have just written the imperative solution here 10:29
m: my $a = "x=1\ny=2\n"; for $a.lines { next unless /$<key>=\w+ '=' $<value>=\w+/; say "$<key> is $<value>" } 10:30
camelia rakudo-moar 80b912: OUTPUT«x is 1␤y is 2␤»
btyler_ well, there's also something akin to what moritz said: for $fh.lines.map({ /$<key>=\w+ ',' $<value>=\w+ /; $/}) { say ~$<key>, ~$<value>; }
CurtisOvidPoe That’s what I want to convey to the audience: don’t worry about the tricks people show in *any* language: it’s still easy to get your job done.
jnthn 'cus most mre mortals I know find loops easier than greps :)
CurtisOvidPoe And quite often, the for loop is better if I’ve too much logic. 10:31
btyler_ seeing the match object referenced is probably not very newbie friendly though
jnthn Maybe also nice 10:32
10:32 Psyche^ left
jnthn m: my $a = "x=1\ny=2\n"; for $a.lines { when /$<key>=\w+ '=' $<value>=\w+/ { say "$<key> is $<value>" } } 10:32
camelia rakudo-moar 80b912: OUTPUT«x is 1␤y is 2␤»
jnthn Extra block, but reads clearly.
Heck, so does if :)
CurtisOvidPoe btyler_: Agreed. I suspect that always having to remember to force string context is going to irritate people. 10:33
jnthn Depends what else is going on.
10:33 pecastro joined
lizmat CurtisOvidPoe: fwiw, that is something that [Tux] also ran into when working on Text::CSV for perl 6 10:34
CurtisOvidPoe lizmat: Didn’t know that. Thanks. Having the common cases accomodated is a good thing. Not seeing that here. 10:35
(though I hate saying it that way because it sounds harsh. My apologies) 10:36
dalek line-Perl5: 0df0f3d | ab5tract++ | README.md:
Clarify that you might need -Dusemultiplicity

If you want to play with interpreter pools or anything like that, you need to be able to create a re-entrant-safe version of libperl. This option is leveraged by the likes of nginx/uwsgi, so it seems to be one of the "safe options" you can enable in Perl 5.
10:37
line-Perl5: 769ce38 | niner++ | README.md:
Merge pull request #9 from ab5tract/patch-1

Clarify that you might need -Dusemultiplicity
jnthn Well, in the example I showed, the interpolation puts the thing in string context, meaning it's not required to force it.
10:38 bjz left
jnthn But yes, sometimes I find myself needing to prefix ~ it also. 10:39
CurtisOvidPoe jnthn: that’s true, but for larger systems, we’re typically reading data and shoving it into variables/objects, and so on, and not printing it.
10:45 fwilson joined
jnthn CurtisOvidPoe: Yes, though even there you may be doing other things that enforce a string context. And even if match live longer than they need to by being stored, it's likely to manifest as a memory inefficiency rather than a correctness issue. 10:45
*matches 10:46
10:47 bjz joined 10:49 vendethiel joined 10:55 FROGGS left
jnthn lunch & 10:56
10:57 jluis left, [TuxCM] joined 10:58 TuxCM left 11:01 sqirrel_ joined 11:03 TuxCM joined, chenryn joined 11:04 [TuxCM] left 11:05 pdcawley joined 11:07 virtualsue joined 11:11 vendethiel left, bjz left 11:15 vendethiel joined
masak question of the day: you're the designer in a team tasked with building a language that compiles down to JavaScript. due to some weird glitch in planning, the team is supposed to build *your* ideal language that targets JS. what design do you hand them? 11:21
11:21 cognominal joined 11:24 donaldh joined 11:28 cognominal left 11:29 chenryn left, chenryn joined 11:31 Sqirrel left 11:36 vendethiel left 11:39 cognominal joined
lizmat masak: Perl 6 with a JS backend ? 11:43
11:44 denis_boyun_ joined
masak that's certainly a valid answer, and one I guess I should have expected from #perl6 ;) 11:44
11:44 brrt left 11:47 kaleem left 11:48 sqirrel_ left 11:49 bjz joined 11:57 pecastro left 11:58 FROGGS[mobile] joined 11:59 pecastro joined, vendethiel joined
nwc10 masak: if your bonus is based on how fast they complete the job - Ook! ? :-) 12:01
(was it specified as needing to be useful, rather than simply Turing complete)
12:02 bjz left
moritz nwc10: I guess javascript as input language would be even simpler :-) 12:05
"javascript to ecmascript compiler"
(usually delivered as /bin/cat)
12:05 xfix joined
lizmat masak: wouldn't that be the ultimate dogfooding for you and the team ? 12:08
12:15 denis_boyun_ left
FROGGS[mobile] will the Team get payed well? do they still search for people? 12:17
moritz FROGGS[mobile]++ # asking the right questions :-)
12:17 chenryn left
FROGGS[mobile] :o) 12:19
12:20 bjz joined
masak the team gets paid ridiculously well. the also get free food and infinite backrubs. 12:21
moritz where do I apply? :-)
12:21 vendethiel left
FROGGS[mobile] consider me signed! /o/ 12:24
masak I guess in this hypothetical scenario, the positions have already been filled.
but Iäll let you know if something opens up. 12:25
I'll*
12:26 rindolf left, donaldh left
FROGGS[mobile] Hulk is sad 12:27
moritz SMASH! 12:28
12:29 rindolf joined 12:32 bjz left 12:33 skids left 12:43 denis_boyun_ joined, sqirrel_ joined 12:44 vendethiel joined, kaare__ left 12:48 pecastro left 12:50 pecastro joined 12:53 bjz joined 12:55 denis_boyun_ left 12:58 denis_boyun_ joined 13:00 bjz left
nwc10 moritz++ 13:01
13:04 kaleem joined 13:06 vendethiel left, anaeem1 left 13:13 rindolf left 13:14 denis_boyun_ left 13:17 donaldh joined 13:19 vendethiel joined 13:28 rindolf joined 13:31 bjz joined 13:32 raiph joined
lizmat is there a reason why we can't optimize method dispatch:<!> away ? 13:38
.tell jntnn is there a reason why we can't optimize method dispatch:<!> away ?
yoleaux lizmat: I'll pass your message to jntnn.
dalek ecs: 518438a | (Stéphane Payrard)++ | S99-glossary.pod:
laziness and other entries
13:39
lizmat .tell jnthn I was under the impression that it could basically become a sub call internally ?
yoleaux lizmat: I'll pass your message to jnthn.
13:42 vendethiel left 13:43 zakharyas left 13:44 bjz left, bjz joined 13:45 zakharyas joined
moritz tadzik: could you please merge github.com/tadzik/synopsebot/pull/4 and then restart synopsebot? thanks 13:51
masak as a followup to my question about compile-to-JS before -- what's the status of pmurias++' work on the NQP/Rakudo JS backend? 13:53
I also noticed that twitter.com/rakudoperl besides not showing any R* release messages for a while, still describes itself as "The Perl 6 compiler for Parrot". 13:54
who owns that account? pmichaud?
13:54 sqirrel_ left
moritz I think so 13:54
[Coke] is there a ticket open for R* hanging on parrot?
R* build, that is.
moritz and iirc nqp-js was (mostly?) bootstrapped, and then pmurias++ decided to re-work some codegen stuff 13:55
[Coke]: no; I've wanted to track it down a bit further before ticketing it (and then my laptop's power supply broke)
[Coke] ok, but sounds like you're on it. moritz++ 13:56
13:56 vendethiel joined
moritz well, I would be :-) 13:56
14:03 synopsebot joined
tadzik moritz: should be okay, thanks 14:03
[Coke] has the compiler release this month, he thinks. 14:04
14:05 pdcawley_ joined
masak sudden thought: instead of trying to fit a square peg in a sqround hole with the <foo 5 1/2> syntax and allomporhic types, perhaps it would make more sense to have <foo 5 1/2> be completely non-magical and just give a list of three Str, but then also provide a really short primitive to do the conversion? a listop, or an adverb, or something. make it opt-in. 14:06
14:06 pdcawley left
masak this is the kind of idea that I suspect sounds good in my head but that TimToady will reject with some reason I cannot predict :) 14:06
moritz masak: the reason for IntStr and the likes is to satisfy type constraints from MAIN subs 14:07
colomon a reason, rather 14:08
masak ...and there are good reasons to unify the type conversion on cmdline args, and the type conversion of <foo 5 1/2>. got it.
14:08 spider-mario joined 14:10 chenryn joined
colomon There was also an idea that (say) RatStr would allow you to default to a reasonable numeric approximation, while not throwing away additional Str information that could be used to construct a FatRat. 14:10
dalek kudo/nom: f6efe05 | coke++ | docs/release_guide.pod:
stub in release dates for 2015
14:13
[Coke] ^^ after january, no compiler releases are claimed. 14:14
14:14 skids joined
moritz [Coke]: I hope you used tools/release-dates.pl to generate those? :-) 14:16
14:17 vendethiel left
dalek kudo/nom: 6a19d45 | lizmat++ | / (2 files):
Add some copyrights

Did I miss any?
14:18
[Coke] moritz: no, I did it the old fashioned way. 14:24
because I've never heard of that program.
lizmat can someone explain me why the first ACCEPTS in Regex.pm is assigning to $dollar_slash ? 14:25
feels like a copy-pasto
dalek kudo/nom: 2542c3d | moritz++ | docs/release_guide.pod:
Mention tools/release-dates.pl in the release guide
moritz lizmat: as opposed to doing what? 14:26
lizmat well, for one, I don't see why the last $dollar_slash assignment is done 14:27
moritz lizmat: inlining the nqp::getlexrelcaller() call?
so that $/ is set?
lizmat: note that the first line is a binding, not an assignment
lizmat ah, duh
14:29 prime left 14:30 bjz left, bjz joined 14:32 KCL joined, [Sno] left 14:35 KCL_ left, vendethiel joined 14:41 pmurias joined
abraxxa jnthn: I need help with NativeCall to get on with DBDish::Oracle, do you have time to help me and if yes when? 14:42
especially passing utf16 encoded strings and their length in bytes
pmurias masak: after gsoc it was at the almost bootstrapping point. It was running at sub-parrot speeds which was embarassing. The code quality was horrible. I then set on a rewrite of the code-gen and a cleanup. 14:45
masak: currently the next thing will be multis
masak: progress is currently stalled as I'm busy with other things 14:46
github.com/pmurias/nqp-js/blob/mas.../run_tests contains the current list of passing tests 14:47
...broken link.. (fixing) 14:48
14:49 KCL left
pmurias github.com/pmurias/nqp-js/blob/mast.../run_tests 14:54
masak pmurias++ # work so far 14:55
pmurias++ # status update for the curious
14:58 [particle]1 joined 14:59 [particle] left 15:00 raiph left 15:02 pdcawley_ left 15:03 cognominal left, cognominal joined 15:04 pdcawley joined 15:10 chenryn left, chenryn joined 15:12 Ugator joined 15:15 kurahaupo left 15:17 kjs_ joined, chenryn left, chenryn joined 15:22 mr-foobar joined, kaleem left, chenryn left 15:25 kjs__ joined 15:26 kjs_ left, kjs__ is now known as kjs_ 15:30 kurahaupo joined 15:31 amkrankr1leuen is now known as amkrankruleuen, amkrankruleuen left, amkrankruleuen joined, raiph joined
hoelzro morning #perl6 15:35
masak \o 15:36
15:36 tinyblak joined 15:39 bjz left 15:46 treehug88 joined
masak maybe now that it's 2015, we should start asking people what, if any, future point they're still waiting for when Perl 6 gains some capability, after which they would start adopting Perl 6, or adopt it more? 15:53
dalek rl6-roast-data: 44f39b7 | coke++ | / (5 files):
today (automated commit)
15:54
[Coke] my ideal six would be a nice DB interface and me actually doing something useful with mojo6. 15:55
masak that does sound rather wonderful. 15:56
it also aligns well with my goal of (re-)building November using a modern Rakudo stack.
hoelzro mojo6++ 15:57
[Coke]: do you have a repo started for that?
colomon masak: personally, my impression is the biggest issue is making what we have now work 15:58
[Coke] hoelzro: aye. haven't touched it in a while: github.com/coke/mojo6 stuff that is there is only the cleaned up utils.
colomon having module precomp and threading unreliable is disheartening 15:59
[Coke] well, I have a personal focus this year of trying to make $dayjob more fun, so here we go.
masak colomon: that's very true.
colomon: how can we get better at that in the short term? in the long term?
hoelzro I would also like to see a more reliable precomp 16:00
colomon masak: I don't know
if I knew, I probably would have made time in my schedule to fix it. ;)
hoelzro although I think the problem with colomon's ABC is the only outstanding issue, but the circumstances are so bizarre and convoluted, that it probably indicates a deeper problem =/
colomon hoelzro: I fear the only reason it's the "only" outstanding issue here is that it's one of the more complex p6 projects out there. 16:01
16:01 bjz joined
hoelzro oh, I completely agree 16:01
I have tried several times to find out the reason for it =/ 16:03
I think that task is for someone with far greater Moar fu than I
colomon anyway, if you'd ask me a year ago I'd have said performance, performance, performance. There's still lots of room for improvement here, but "making it work" has a higher priority IMO
skids precomp and threading stability/performance definitely at the top of the list. For me native sized int and uint support also pretty high. Remaining diamond composition problems are a pain but not a blocker. 16:05
I tried to do some work scripting in P6/Inline-P5 but the async stuff was causing segfaults and it topped out at 1KHz passing emits between asyncs, too slow. 16:06
16:07 liztormato joined
liztormato skids: afaik, diamond precomp issue only exists on jvm 16:08
skids No, with roles they are on all backends.
liztormato Are there tests for that? 16:09
skids r: role A { has $.a }; role B does A { }; role C does A { }; role D does C does B { }; D.new
camelia rakudo-parrot 80b912: OUTPUT«Attribute '$!a' conflicts in role composition␤ in any apply at gen/parrot/Metamodel.nqp:1727␤ in any compose at gen/parrot/Metamodel.nqp:1817␤ in any specialize_with at gen/parrot/Metamodel.nqp:2249␤ in any specialize at gen/parrot/Metamodel.…»
..rakudo-moar 80b912: OUTPUT«Attribute '$!a' conflicts in role composition␤ in any apply at src/gen/m-Metamodel.nqp:1662␤ in any compose at src/gen/m-Metamodel.nqp:1752␤ in any specialize_with at src/gen/m-Metamodel.nqp:2184␤ in any specialize at src/gen/m-Metamodel.nqp:22…»
skids r: role A { method foo }; role B does A { }; role C does A { }; role D does C does B { }; D.new 16:10
camelia rakudo-{parrot,moar} 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Missing block␤at /tmp/tmpfile:1␤------> role A { method foo ⏏}; role B does A { }; role C does A { };␤»
skids oops.
jnthn Roles are *flattening* composition. 16:11
yoleaux 13:39Z <lizmat> jnthn: I was under the impression that it could basically become a sub call internally ?
btyler_ skids: async + Inline::P5 stability at least partially involves the programmer not trying to access a single perl5 interpreter's guts from multiple p6 threads
jnthn And we decided that attributes declared in a role should be visible in the composing class. 16:12
skids btyler_: thanks I'll see if that helps/
btyler_ there was a PR merged into Inline::P5 today that mentions the need for a perl with -Dusemultiplicity if you want to go that direction
basically: make sure you've got a different I:P5 object for each thread
16:12 liztormato left
jnthn .tell lizmat The optimizer (Perl6::Optimizer) already has logic for optimizing away the dispatch:<!> call in most cases. 16:12
yoleaux jnthn: I'll pass your message to lizmat.
skids jnthn: so that means...? I'm no CS major. 16:13
16:14 donaldh left
sjn \o 16:14
vendethiel skids: that's not CS-related. basically, "does"-ing a role is like copy-pasting its content 16:16
so you effectively end up with `role D { has $.a; has $.a; }`
skids Right, but last time I looked, there was language explicitly permitting crony roles to do that in the spec.
vendethiel (first one from A, second one from B)
there's no shadowing possible, because it's shallowly "pasted" into the class 16:17
16:20 sqirrel_ joined
raiph I have a question about my hack.perl6.org account 16:21
When I first got it I ran `rakudobrew build moar` and it worked
I reran `rakudobrew build moar` a few days later and it worked again
Now I get `fatal: could not create work tree dir 'moar-HEAD'.: Permission denied`
My question: anyone know of some relevant system thing that changed? 16:22
skids So if the above is "functioning as intended" then the spec is out of sync. Basically the way the spec views it no matter how many paths a role gets put into another role, it just goes in once and so can never self-conflict. 16:23
16:25 kjs_ left
raiph moritz: Any ideas? ^^ 16:25
16:31 chenryn joined 16:32 bjz left, Mso150 joined
psch hi #perl6 \o 16:33
raiph: did you source ~rakudobrew/rakudobrew-bash or did you clone your own rakudobrew?
16:34 bjz joined
psch i'd think either you did have your own or permissions for ~rakudobrew used to be different 16:34
if the former than i don't have any other ideas
raiph psch: Before I ran `rakudobrew` back in Dec, I added the `source ...` line to my ~/.profile per github.com/perl6/infrastructure-do...rakudobrew 16:35
16:36 kaleem joined
skids Also IIRC a separate issue I ran into along those lines is that when you do want to resolve a real conflict between roles, there was no syntax to do so if those roles were two different parameterizations of the same role; though I guess you could do that through a couple shim roles. 16:36
psch raiph: in that case i suppose the permissions for ~rakudobrew changed. moritz will probably be able to tell you more though... 16:40
raiph psch: Coincidentally the reason I'm on hack is to install latest jvm to test your latest interop stuff before writing an SO answer about it :)
japhb masak: There are a number of things I want in Rakudo for 2015, but the only one that's really critical is stability, because crashes and/or wrong answers are absolutely killing my carefully crafted creations. Performance is a close second, because I can't scale up to decent-sized data sets without getting too slow for interactive use. 16:41
psch raiph: maybe just get a local copy of rakudobrew for now 16:42
raiph psch: I'll wait to see moritz's response but local rakudobrew will be plan B, thx 16:43
japhb masak: After that I'd say I want spec stability in the language core and setting, so I can focus on the stuff at the fringe. To whit, I'd like to see GLR done (with its related semantic changes), IO get to a sane state that really handles all the use cases well so we don't have to keep changing it, and so on. 16:44
TimToady NFG is also a semantic hit, NSA probably not so much 16:45
japhb masak: And only after all that do I really get to language and setting *features*, which I do believe need to be filled out more before 6.0.0, but actually turn out to be well down my heirarchy of needs.
16:46 MARTIMM joined
japhb TimToady: Completely granted. It happens I'm not working on problems that expose NFG right now, but I assume others are. And it's pretty darned core. 16:46
16:47 bjz left 16:52 rindolf left, rindolf joined 16:53 rindolf left, rindolf joined 16:54 rindolf left, rindolf joined
sjn wonders if perl6 has some easy-to-use method modifers (before/after/around) 16:55
16:58 rindolf left, rindolf joined, rindolf left 16:59 rindolf joined, rindolf left, bjz joined
PerlJam sjn: My brain latches onto wrap, callsame, nextsame, callwith, and nextwith when I think about "method modifiers" 16:59
17:00 rindolf joined
sjn found Method::Modifiers 17:00
17:00 rindolf left 17:01 rindolf joined, rindolf left 17:04 chenryn left, [Sno] joined
[Coke] if you're using ~rakudobrew, should you be building your own rakudobrew? 17:05
I would kind of expect that to fail unless you sudo'd. 17:06
17:08 telex left 17:10 sirdancealot left, telex joined 17:17 client_11045 joined 17:19 timotimo left
client_11045 sub aaa{} aaa(); 17:20
17:21 zakharyas left
psch m: sub aaa{}; aaa 17:22
camelia ( no output )
psch m: sub foo { say &?ROUTINE.name }; foo 17:24
camelia rakudo-moar 80b912: OUTPUT«foo␤»
tony-o sergot: i couldn't find anywhere that the socket listens 17:25
moritz raiph: the shared rakudobrew on hack is meant to provide a stable rakudo executable, not for you to build your own stuff with it
raiph: if you want that, use a local rakudobrew
psch m: class Foo { has $!bar; method setBar($b) { $!bar = $b }; method getBar() { $!bar }; method bar { Proxy.new( STORE => method ($b) { self.setBar($b) }, FETCH => method () { self.getBar } }; my Foo $f .= new; $f.bar = 5; say $f.bar # i think this is what i'd need in the JavaHOW for field accessors... 17:28
camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/pxTbnXr5PP␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/pxTbnXr5PP:1␤------> ) }, FETCH => method () { self.getBar } ⏏}; my Foo $f .= new; $f.…»
17:28 sqirrel_ left
raiph moritz: Thanks, gotchya. 17:28
psch m: class Foo { has $!bar; method setBar($b) { $!bar = $b }; method getBar() { $!bar }; method bar { Proxy.new( STORE => method ($b) { self.setBar($b) }, FETCH => method () { self.getBar } ) } }; my Foo $f .= new; $f.bar = 5; say $f.bar 17:29
mem alloc :/
camelia rakudo-moar 80b912: OUTPUT«Memory allocation failed; could not allocate 1048576 bytes␤»
psch works locally on -j
hm, probably did something wrong there
17:30 bjz left, Mouq joined
psch m: class Foo { has $!bar; method setBar($b) { $!bar = $b }; method getBar() { $!bar }; method bar(Foo:D $self:) { Proxy.new( STORE => method ($b) { $self.setBar($b) }, FETCH => method () { $self.getBar } ) } }; my Foo $f .= new; $f.bar = 5; say $f.bar # this i what work :l 17:30
camelia rakudo-moar 80b912: OUTPUT«5␤»
psch *is *works
now, if someone has an idea how i can get that into a HOW that doesn't do MethodContainer and tell it the methods from the backend, that would be great... ;) 17:31
raiph m: my $s = 'a,b'; my $*M; for $s.lines.grep({ $*M = m/ $<key>=\w+ ',' $<value>=\w+ / }) { say ~$*M<key> => ~$*M<value>; } # CurtisOvidPoe yawtdi 17:33
camelia rakudo-moar 80b912: OUTPUT«"a" => "b"␤»
moritz psch: like, delegation?
raiph: what an exceptionally bad idea :-)
psch moritz: it's about java class fields. adaptor generation currently gives me the methods "field/set_$field/$desc" and "field/get_$field/$desc", which clearly don't lvalue 17:34
moritz: wrapping them in Proxys is about the only workable idea i had up to now
17:34 client_11045 left
moritz psch: you could expose getters and setters 17:35
psch that's the point of setBar and getBar in the example above, to emulate the setters and getters i get
CurtisOvidPoe raiph: that’s somewhat less magical than some other ideas I’ve seen, but not sure that it’s better, given the use of a global variable :)
psch moritz: those exist, $javaClass."field/get_someField/I"() gets the int someField from the java side
raiph moritz: yes, I meant it as a sort of "you could use globals, here's how, but don't do that" :)
17:37 bjz joined
Mouq CurtisOvidPoe: Your original example/gist actually should work 17:38
pmurias masak: I hope to get back to $perl6-stuff in like a week but I think I'll work a bit on panda/module infrastructure a bit before getting back to nqp-js
raiph CurtisOvidPoe: yeah, though it's a P6 global, ie a dynamic, so, imo, can be much less bad than typical globals
Mouq CurtisOvidPoe: It's a Perl 6 bug
Use the regex / $<key>=\w+ \, $<value>=\w+ {}/ instead
17:38 kaleem left
CurtisOvidPoe Mouq: Why is it a bug? The block enforces lexical scope, hiding the match variable, right? 17:40
Or am I misunderstanding?
(For those missing the context: gist.github.com/Ovid/fc552949223750349a8b)
17:40 abraxxa left
moritz m: my $s = "a,b\nc,d\ne,f"; my $*M; for $s.lines.grep({ $*M = m/ $<key>=\w+ ',' $<value>=\w+ / }) { say ~$*M<key> => ~$*M<value>; } 17:41
camelia rakudo-moar 80b912: OUTPUT«"a" => "b"␤"c" => "d"␤"e" => "f"␤»
moritz Mouq: but even if it sets the outer scope'
erm 17:42
Mouq: but even if it sets the outer scope's $/, it relies on strict lazyiness of .grep and for
Mouq moritz: True
TimToady btw, just backlogging, => should not be stringifying the key by default
moritz Mouq: because as soon as there is batch processing involved, the two blocks don't always get the corresponding $/
TimToady m: say (42 => 43).key.WHAT 17:43
camelia rakudo-moar 80b912: OUTPUT«(Int)␤»
TimToady m: say (42 => 43).value.WHAT
camelia rakudo-moar 80b912: OUTPUT«(Int)␤»
Mouq CurtisOvidPoe: I don't know about that, but // regexes don't always populate $/ unless there's a {} in the regex :/
CurtisOvidPoe: I honestly haven't looked into it as much as I should have 17:44
17:44 virtualsue left
CurtisOvidPoe Not fun. Certainly not an example I’d want in a talk showing that Perl 6 doesn’t have to be scary! 17:44
jnthn Mouq: That's - as far as I know - only an issue if you're using $/ *inside* of the regex. 17:45
moritz CurtisOvidPoe: even it works, it would be a very bad example to rely on a lexical to transport the right list element 17:46
17:46 bjz left
Mouq m: for "a,b\nc,d\ne,e".lines.grep({ / $<key>=\w+ ',' $<value>=\w+ / }) { say ~$<key> => ~$<value>; } 17:46
camelia rakudo-moar 80b912: OUTPUT«"" => ""␤"" => ""␤"" => ""␤»
Mouq m: for "a,b\nc,d\ne,e".lines.grep({ / $<key>=\w+ ',' $<value>=\w+ {}/ }) { say ~$<key> => ~$<value>; }
camelia rakudo-moar 80b912: OUTPUT«"a" => "b"␤"c" => "d"␤"e" => "e"␤»
PerlJam That's an interesting example. Maybe .grep should have an option to return the result of the block (or maybe .grep-map should exist) 17:47
TimToady this seems like kind of an XY problem to me; why are you using grep instead of an if inside the loop?
moritz PerlJam: map can already do it
CurtisOvidPoe TimToady: I’m using an if now. I just thought it would be nice to have something like “for lines | filter { do … }” 17:48
But obviously that doesn’t do what I want.
(pseudo-code, obviously)
PerlJam moritz: aye, but then you get the problem of "why are you using map to do a grep?"
CurtisOvidPoe In other words, having a quick, declartive filter on the for loop rather than messing with it in the body. 17:49
That’s just me, though. Feel free to ignore :)
17:49 dakkar left 17:50 kjs_ joined
TimToady grep can't add info, and you're trying to piggyback info down through a list for free, and no scoping on earth is gonna give you that 17:51
map can add info easily
PerlJam CurtisOvidPoe: it seems to me that the filter isn't the problem, it's just that you want it to do 2 things.
TimToady map to a pair of match and original data, for instance 17:52
moritz match would be enough 17:53
(which I already suggested earlier, but was dismissed as scary :-)
b2gills moritz: well that did rely on Perl6 not doing any processing of the grep ahead of time 17:55
Mouq Could also: my @result = do for $fh.lines { if /…/ { ~$<key> => ~$<value> } }
psch m: "16" ~~ /($<num>=\d+) { say make $<num>.sqrt }/ # NYI..?
camelia rakudo-moar 80b912: OUTPUT«No such method 'sqrt' for invocant of type 'Any'␤ in block <unit> at /tmp/z7D6PJMrTf:1␤␤» 17:56
psch m: "16" ~~ /(\d+) { say make $0.sqrt }/ # positional works
camelia rakudo-moar 80b912: OUTPUT«4␤»
psch oh, the parens in the named example aren't neccessary i suppose
moritz b2gills: not the @list.map({/regex/}).grep(*.so) 17:58
b2gills: irclog.perlgeek.de/perl6/2015-01-07#i_9899052 17:59
18:00 n0den1te joined
b2gills Right the first one not the last one 18:01
18:02 bjz joined
b2gills CurtisOvidPoe: You could simplify opening the file and getting the lines to just ` 'plans.csv'.IO.lines ` 18:10
moritz that's shorter, but not simpler
18:11 Mso150 left 18:12 Mso150 joined 18:14 Sir_Ragnarok_ joined 18:15 Sir_Ragnarok left 18:17 bjz left 18:21 bjz joined 18:22 ssutch left 18:23 ssutch joined
ugexe github.com/rakudo/rakudo/blob/9e18...r.nqp#L217 <- should this be ever be reached if it would otherwise (which is is for me) say "use of uninitialized value of type Any in string context"? 18:25
thats with RAKUDO_MODULE_DEBUG=1 18:26
18:28 n0den1te left
psch ugexe: the unitialized warning is one of the values in %chosen, returning $UNIT should still happen 18:30
ugexe: at least i assume you don't get the uninit warning without RAKUDO_MODULE_DEBUG=1
ugexe correct 18:31
psch well, at least as long as the if block is entered in the first place 18:32
ugexe just couldnt figure out why the outer conditional does 'return {}' compared to 'return $UNIT' where $UNIT would be (Any)
psch m: say {} ~~ PseudoStash 18:33
camelia rakudo-moar 80b912: OUTPUT«False␤»
18:34 bjz left
masak japhb: stability, performance, features. 18:34
japhb: I agree.
japhb: I don't know if it's as clear as that, but I think for many, stability and performance has changed places to what you describe. 18:35
PerlJam we should still be prepared for the people who will say things like "They call this production?!? It's slower than <insert some other technology>!" 18:42
18:43 kjs_ left
masak how would this "being prepared" you're talking about have a measurable impact on things? :) 18:45
I mean, I'm assuming you're talking about something more than a mental state...
PerlJam mental state is quite important :) 18:46
masak ok, so just brace ourselves for people being mean. got it.
PerlJam But even still, I don't that there would be a measurable impact, but "chance favors the prepared mind"
ugexe yea speed really held php back
is what id say 18:47
18:50 bjz joined
PerlJam masak: or to frame "being prepared" slightly differently, it only helps us if we have a consistent narrative for our ideas on the growth of Perl 6. Not being prepared, we may all have slightly different stories which could foment more discontent rather than the idea that "those Perl 6 guys have got a plan" 18:53
masak that framing I can get behind. 18:58
19:00 pmurias left, spider-mario left, spider-mario_ joined 19:01 spider-mario_ is now known as spider-mario 19:02 bjz left 19:03 kaare__ joined 19:11 raiph left 19:12 bjz joined 19:13 virtualsue joined 19:14 breinbaas left 19:15 breinbaas joined 19:17 fhelmberger left, Sqirrel joined 19:20 kjs_ joined 19:27 zakharyas joined 19:30 Mso150 left, Mso150 joined 19:36 sirdancealot joined
dalek kudo/nom: c5dcdfb | Mouq++ | src/core/ (5 files):
Make sure .gist/.perl on type objects work
19:36
19:38 raiph joined 19:45 brrt joined 19:53 tgt joined 19:54 HaraldJoerg joined
colomon doesn't map already allow returning something ( () or Nil, former I think ) when effectively makes the resulting list skip the current item? 20:01
ugexe if i want to test changes to rakudo source, so i just need to rerun Configure.pl && make && make install, or do I need to rebuild the backend as well? 20:04
s/so/do/ 20:05
20:08 kjs_ left, tinyblak left 20:09 virtualsue left 20:10 Mouq left 20:12 zakharyas left 20:16 kjs_ joined 20:21 FROGGS[mobile] left
lizmat thank you, jnthn 20:21
yoleaux 16:12Z <jnthn> lizmat: The optimizer (Perl6::Optimizer) already has logic for optimizing away the dispatch:<!> call in most cases.
20:23 brrt left
TimToady colomon: you can use next in a map, supposedly 20:25
colomon TimToady: that too
m: say (1..30).map({ next if .is-prime; $_ }) 20:26
camelia rakudo-moar 80b912: OUTPUT«1 4 6 8 9 10 12 14 15 16 18 20 21 22 24 25 26 27 28 30␤»
colomon m: say (1..30).map({ next if .is-prime; $_ }).perl
camelia rakudo-moar 80b912: OUTPUT«(1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30).list␤»
TimToady for (), there'd have to be a flat somewhere for it to disappear
colomon so, not even just supposedly
lizmat m: say (1..30).map({ $_ unless .is-prime }).perl 20:27
camelia rakudo-moar 80b912: OUTPUT«(1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30).list␤»
[Coke] ugexe: if you're changing rakudo source, make and make install
TimToady note that's probably depending on the obsolescent semantics of Nil turning into ()
lizmat this was an opt I did for Text::CSV earlier today, which gave 20%
jnthn I'm not sure that last one survives the GLR...
lizmat so, next is the better way of doing that ? 20:28
[Coke] ugexe: if you're changing one of the vms, or the version of the vm you're working on, then you need to re Configure.pl
jnthn lizmat: Why not .grep(!*.is-prime) or so?
TimToady lizmat: unlikely to break
ugexe [Coke]: thanks
TimToady jnthn: we had a matcher earlier that needed map
lizmat m: say (1..30).map({ 2 * $_ unless .is-prime }).perl # better example
camelia rakudo-moar 80b912: OUTPUT«(2, 8, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60).list␤»
jnthn TimToady: Ah, I see 20:29
lizmat jnthn: doing a map and a grep at the same time
20:29 Mouq joined
TimToady jnthn: I had a note for you at irclog.perlgeek.de/perl6/2015-01-07#i_9898453 and following 20:29
jnthn I'd probably have written a loop by that point, but my first language was BASIC so I'm damaged for life. :)
lizmat m: say (1..30).map({ .is-prime ?? 2 * $_ !! () }).perl # better example
camelia rakudo-moar 80b912: OUTPUT«((), 4, 6, (), 10, (), 14, (), (), (), 22, (), 26, (), (), (), 34, (), 38, (), (), (), 46, (), (), (), (), (), 58, ()).list␤»
TimToady m: say «a b c 'x'»[0] 20:30
jnthn TimToady: Looking
camelia rakudo-moar 80b912: OUTPUT«a b c␤»
lizmat TimToady: so in that case, () should disappear after GLR ???
TimToady hmm, not recompiled since last night
jnthn TimToady: Hmm, I'm *sure* when I orginally put that in, it worked
20:30 jantore_ joined
TimToady probably parcels no longer flattening 20:30
jnthn TimToady: Ohhh...but [0] on a Parcel used to flatten.
Right.
jnthn wonders how it got fixed 20:31
20:31 jantore left
jnthn ah, it's right there where you lunk... 20:31
TimToady basically just inlined the _words code into the walk
jnthn Hmm...
TimToady to do away with the comma
jnthn Yeah, I mighta been tempted to just call .flat at the end ;) 20:32
TimToady coulda walked the _words tree, but seemed wasteful :)
jnthn yeah
TimToady this is differently wasteful :)
20:32 darutoko left
jnthn reminds himself what postprocess_words does 20:32
TimToady but also breaks sub circumfix:<<` `>> parsing
that's just <> rahter than <<>> 20:33
m: say «a b c 'x'».perl
camelia rakudo-moar 80b912: OUTPUT«(("a", "b", "c"), "x")␤»
TimToady my patch gets rid of those inner parens
jnthn Right.
TimToady but breaks circumfix, which doesn't like the list, and is getting a string with a space-separated ` ` somehow 20:34
20:34 H2O1 joined
TimToady I don't see anything in there that evals it to a string though 20:35
hence my question
jnthn m: say <<` `>>.perl
camelia rakudo-moar 80b912: OUTPUT«("`", "`")␤»
TimToady is fine there
it's just in circumfix:<<` `>>
jnthn m: say :<<` `>>.perl
camelia rakudo-moar 80b912: OUTPUT«("`", "`")␤»
20:35 virtualsue joined
TimToady haven't recompiled since Dec 29 20:37
(camelia's)
moritz: ^^ ? 20:38
lizmat jnthn: if dispatch:<!> is optimized away, should it still show in a --ll-exception stacktrace ? 20:39
H2O1 regex. I have a page with 3 columns of numbers. it's easy to figure a regex to extract columns 1, 2, 3 and print them one after the other. however I don't know how to extract an arbitrary number of columns. does that require something more powerful than a regular expression? is that context sensitive, such as a^n b^n ? 20:40
jnthn lizmat: No; maybe that's a case the optimizer doesn't get for some reason or other. 20:41
lizmat H2O1: how are the columns delimited
fg
H2O1 just with blanks
lizmat jnthn: ok, investigating :-)
colomon H2O1: if you know the columns are relatively clean (no non-numeric characters in the middle of numbers), you should be able to do it with comb, I'd think 20:42
lizmat H2O1: S05:1085
synopsebot Link: perlcabal.org/syn/S05.html#line_1085
jnthn TimToady: Recreated the issue here and am investigating. 20:43
lizmat H2O1: or what colomon said :-)
TimToady H2O1: unless, of course, you're actually asking about Perl 5; we only do Perl 6 here...
H2O1 perl6
20:44 bjz left
TimToady m: "12 34 56 78".comb(/\d+/).perl.say 20:44
camelia rakudo-moar 80b912: OUTPUT«("12", "34", "56", "78").list␤»
TimToady but technically, "extracting" is not the job of regular expressions, unless you apply one repeatedly 20:45
ugexe skids: your test reports marked PASSED that actually fail appears to be a bug with pipe() on freebsd, not panda or cpandatesters
TimToady real regexes only tell you "yes, this matched from here to there."
skids ugexe: Thanks, good to know.
TimToady Perl's regexes are far from "real" though :)
jnthn TimToady: Think I got a fix. 20:46
TimToady I thought it would be pretty easy for you :)
jnthn Seems we accidentally depended on the nested parcel structure there. 20:47
TimToady oh, those [0] things?
jnthn Yeah
Well, but we need them in some other cases
tony-o is github:mrhdias in here?
jnthn So just doing an AST unwrapping at the start now if needed, and getting rid of the [0]s.
TimToady for something like a decl, you probably just want to evaluate the list, whether or not it's officially compile-time 20:48
then you get :[@stuff] for free
assuming @stuff has a compile-time value
jnthn Yeah, it's how we give good errors when it doesn't, perhaps mixed in with a bit of circularity sawing... 20:49
tony-o or jnthn have you used NativeCall & librarymake together? i can get my C compiled and linked with NativeCall but the stub never actually executes the native code and instead tries to execute the stub..gist.github.com/tony-o/89a82e385f5c31ba1ffa
TimToady well, if circumfix doesn't get two values, it's pretty clear what the problem is
jnthn True
20:50 brrt joined, H2O1 left
TimToady interestingly, nothing in the compiler uses circumfix:<<foo bar>> notation, just test suite 20:51
lizmat jnthn: update on private methods op: looks like none of them are optimized atm
jnthn lizmat: What if you --optimize=3 ? 20:52
TimToady it uses << >> but only for ops containing < or >
lizmat checks
TimToady which are all single tokens
jnthn m: class A { method m() { self!foo() } }
camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/32Pmm9jlAt␤No such private method 'foo' for invocant of type 'A'␤at /tmp/32Pmm9jlAt:1␤------> class A { method m() { self!foo(⏏) } }␤»
jnthn I'm pretty sure it's the opt that throws that error.
lizmat jnthn: yeah, but if it exists, it internally throws an error on $*W.get_ref($meth) that is hidden by a rtry 20:54
$try
*try
*sigh*
jnthn lizmat: Ah, then it got regressed at some point 20:55
lizmat hmm... there is no method get_ref in World ??
jnthn lizmat: That...would rather explain it ;) 20:56
lizmat well, maybe in inherits from HLL::World ?
jnthn Maybe; it sounds familiar. 20:57
But also maybe old
I mean, I think it's what QAST::WVal replaced in the end.
CurtisOvidPoe Any chance we can get a version of .perl which forces string context? gist.github.com/Ovid/e0778e99f188341726df
lizmat HLL::World also doesn't have the string "get_ref"
moritz git grep get_ref # comes out empty in nqp
dalek kudo/nom: 748b2ad | jnthn++ | src/Perl6/World.nqp:
Unbust circumfix:<<` `>> declarations.
CurtisOvidPoe .perl is for serialization and sometimes that’s great, but more often than not, I’m finding it obscures debugging. 20:58
lizmat jnthn: you changed that on August 1st, 2014 :-)
TimToady CurtisOvidPoe: we call that a DIHWIDT 20:59
21:00 snoqualmie joined
PerlJam S99:DIHWIDT (in case you want to know what that means :) 21:00
synopsebot Link: perlcabal.org/syn/S99.html#DIHWIDT
lizmat CurtisOvidPoe: do you have any suggestions making it better ?
jnthn TimToady: 748b2ad doesn't seem to break anything in spectest. 21:01
TimToady: And seems to fix the issue.
CurtisOvidPoe It would be nice that anything which can be “stringified” be stringified. It would be a “smart” dumper that is used for debugging. People would understand that it’s slow, but human-readable.
TimToady well, roast has that case fudged
I can unfudge it
CurtisOvidPoe The problem is that if I have $0 => ~$1, I don’t want to *force* stringification prior to the hash, but I also don’t want to run a map over a data structure (possibly a very deep data structure) just so I can read the output of .perl. 21:02
lizmat CurtisOvidPoe: do you realize that .perl is a distributed thing? each object (potentially) has its own .perl method
CurtisOvidPoe Anyone who loves the debugger as much as I do can tell you horror stories of x $resultset :)
lizmat which makes it hard to make something that looks good :-( 21:03
21:03 rindolf joined
CurtisOvidPoe lizmat: of course, and I’m fine with that. I think that serializing the data and presenting it for debugging are subtly different use cases. 21:03
PerlJam CurtisOvidPoe: I think we've (#perl6) talked about modules for making preittier output before ... maybe you could write one? :)
TimToady for debugging we usually use .gist rather than .perl 21:04
jnthn Is there not one already?
PerlJam dunno
jnthn sees Data::Pretty
skids .gist seems to .perl Match objects....
21:04 raiph left
skids at least when they are hash values. 21:04
jnthn I'm a bit surprised .gist does .perl on Match objects... 21:05
21:05 xfix left
skids r: my %pairs = gather for "foo,bar\nfoo2,bar2\nfoo3,bar3".lines { if /^^ (\w+) ',' (\w+) $$/ { take $0 => $1; } } ; say %pairs.gist; 21:05
lizmat perhaps because there is no method gist for match objects ?
CurtisOvidPoe I expect that many Perl 5 devs moving to Perl 6 are going to want the barrier to entry lowered as much as possible. It’s like people coming to Perl 5 for the first time and not wanting to hear “install Moose” :)
camelia rakudo-{parrot,moar} 80b912: OUTPUT«"foo" => Match.new(orig => "foo,bar", from => 4, to => 7, ast => Any, list => ().list, hash => EnumMap.new()), "foo2" => Match.new(orig => "foo2,bar2", from => 5, to => 9, ast => Any, list => ().list, hash => EnumMap.new()), "foo3" => Match.new(or…»
jnthn If it didn't, then CurtisOvidPoe would probably be the output he's wanting...
21:05 xfix joined
CurtisOvidPoe jnthn++ 21:06
skids No, gist on the bare Match object works right.
jnthn m: 'abc' ~~ /(\w)/; say $0;
camelia rakudo-moar 80b912: OUTPUT«「a」␤␤»
21:06 snoqualmie left
jnthn m: 'abc' ~~ /(\w)/; my %h = a => $0; say %h 21:06
camelia rakudo-moar 80b912: OUTPUT«"a" => Match.new(orig => "abc", from => 0, to => 1, ast => Any, list => ().list, hash => EnumMap.new())␤»
dalek ast: 73acbc6 | TimToady++ | S06-operator-overloading/sub.t:
unfudge test for circumfix:<<` `>>, jnthn++
21:06 xfix left
jnthn So, what's going on in Hash.gist... :) 21:07
CurtisOvidPoe Yeah, if .gist walked the data structure, it sounds like it would be much closer to what I’m looking for.
jnthn Odd. It *looks* in the code like it should be. 21:08
oh, wait..
m: 'abc' ~~ /(\w)/; my $p = a => $0; say $p
camelia rakudo-moar 80b912: OUTPUT«"a" => Match.new(orig => "abc", from => 0, to => 1, ast => Any, list => ().list, hash => EnumMap.new())␤»
jnthn That's the guilty party.
TimToady I thing gist gives up and reverts to .perl in a few too many spots
jnthn Yeah. Well, here, Pair doesn't define .gist 21:09
TimToady not quite as earth-shaking as List not declaring cmp 21:10
m: say [1,10] cmp [1,9]
camelia rakudo-moar 80b912: OUTPUT«Less␤»
TimToady fixed after Dec 29, last compile 21:11
sez More locally 21:12
21:12 Mso150 left
lizmat jnthn: it really feels like $*W.get_ref is NYI 21:12
jnthn OK, spectesting a patch to add a .gist that makes say %hash-of-matches prettier, and an attempt to fix the regressed optimization lizmat found.
lizmat: No, it's dead and burried. :)
21:12 colomon left
lizmat that's why :-) 21:13
21:14 Mouq left, Mso150 joined
TimToady m: 'abc' ~~ /(\w)/; say $0 21:19
camelia rakudo-moar 80b912: OUTPUT«「a」␤␤»
TimToady should probably lose the ␤ on a single-liner
skids I dunno that sounds quirky. 21:22
Though I guess if I use gist and then feed it back to a program it's my own fault. 21:23
dalek kudo/nom: 5fa55f6 | lizmat++ | src/core/Match.pm:
Remove superfluous NL on Match.gist
21:25
lizmat is wondering where tests for the optimizer would live 21:28
21:28 kjs_ left
jnthn Turns out that adding a gist for Pair breaks some spectests that rely on it .perl-ing 21:31
lizmat jnthn: then we'll fix those
21:31 colomon joined
jnthn oh no, just one 21:31
bare-say.t
lizmat ok, will fix
jnthn It wants the key to be quoted, and since I .gist the key now it ain't.
Well, I don't mind fixing it, just wanted to get some consensus. :) 21:32
lizmat didn't TimToady say earlier today that a Pair should not stringify its key ? 21:33
TimToady it doesn't
jnthn I didn't stringify it, I just .gist intead of .perl
TimToady m: say (42 => 43).key.WHAT
camelia rakudo-moar c5dcdf: OUTPUT«(Int)␤»
jnthn and .gist doesn't put the "..." around like .perl does.
lizmat TimToady: I'm confused as to whether that is ok or not 21:34
jnthn Well, TimToady earlier was talking about the Pair constructor
I'm talking now about Pair.gist :)
skids
.oO(silly robot. .gist is for kids.)
dalek kudo/nom: 4e67634 | jnthn++ | src/core/Enum.pm:
Add a gist method for pairs.

Before, we fell back to .perl, which gave ugly output in some cases.
  CurtisOvidPoe++ and TimToady++ for discussion that led to this patch.
21:36
ast: 1d6ab03 | jnthn++ | S16-io/bare-say.t:
Update test now that Pair has a nicer gist method.
21:37
lizmat jnthn: looking at 2 other spectest fails 21:42
jnthn lizmat: Which, ooc?
lizmat t/spec/S02-names-vars/list_array_perl.t 21:43
t/spec/S05-metasyntax/longest-alternative.t
jnthn They were clean on my latest run, fwiw.
21:43 kjs_ joined
lizmat ah, maybe they're caused by *my* patch 21:44
yup 21:46
ok, fixing
21:48 jack_rabbit joined 21:50 denis_boyun_ joined 21:51 Mso150 left 21:52 Mso150 joined
dalek kudo/nom: 68aafcd | jnthn++ | src/core/Promise.pm:
Make Promise.[anyof|allof] reporting more robust.

Passing an extra arg is a cheap, and it gets rid of some introspection that was not so reliable.
21:56
kudo/nom: 32c774f | jnthn++ | src/Perl6/Optimizer.nqp:
Fix private method call optimization.

Regression noticed by lizmat++.
21:56 kjs_ left
jnthn Time for some sleep. 'night 21:57
masak 'night, jnthn
colomon \o 21:59
lizmat gnight, jnthn 22:01
22:03 brrt left 22:04 skids left 22:08 virtualsue left
CurtisOvidPoe Good night, jnthn! 22:10
Is there a built-in equivalent to memoize? I’ve tried to find one and failed.
masak "is cached"? 22:12
22:13 colomon left
CurtisOvidPoe sub foo(…) is cached? 22:14
masak yeah. 22:15
CurtisOvidPoe Cheers. I’ll try it.
masak src/core/Routine.pm:multi sub trait_mod:<is>(Routine $r, :$cached!) {
(if you want the implementation)
22:15 raiph joined
raydiak m: sub r () is cached { say rand }; r for ^3 22:16
camelia rakudo-moar c5dcdf: OUTPUT«0.532184563537695␤»
raydiak m: sub r () is cached { rand }; say r for ^3
camelia rakudo-moar c5dcdf: OUTPUT«0.771876052841543␤0.771876052841543␤0.771876052841543␤»
raydiak afternoon #perl6 22:17
CurtisOvidPoe Works like a charm. Thanks :)
masak \o/
dalek kudo/nom: e192c6c | lizmat++ | src/core/Match.pm:
Only remove newline on outer Match.gist
22:19
ast: c403f1d | lizmat++ | S05-metasyntax/longest-alternative.t:
Match.gist doesn't end with a newline anymore
22:20
22:20 Mouq joined
lizmat sometimes wishes q:to// would have a .chop function, so that it wouldn't need to be done at runtime 22:20
raydiak warning: 'is cached' seems to be broken for precomp
lizmat raydiak: in what way ? 22:21
is it serializing the cache?
raydiak lizmat: segfault on a precomped exported cached sub
lizmat will look at it tomorrow
pretty tired (and said) having lost one of her favourite cartoonists 22:22
*sad
raydiak aw
CurtisOvidPoe Yeah, that was a horrifying thing.
22:22 denis_boyun_ left
CurtisOvidPoe Already have a neighbor saying we need to deport “all of them.” I don’t know what “them” meant, but I knew I didn’t want to hear the answer. 22:23
lizmat yeah :-(
CurtisOvidPoe Is there an easy way to expire a cache?
lizmat: Leïla’s pretty upset. She basically grew up reading that cartoonist. 22:24
lizmat as did I :-(
good night, #perl6! 22:25
CurtisOvidPoe g’night.
raydiak idk about explicit expiring, but istr some way to tell it to key the cache in specific ways wrt the passed params, if that helps
g'night lizmat o/ 22:26
CurtisOvidPoe Having an expiry time might help. Right now, “is cached” seems only appropriate for pure function. Won’t work very well for “get_customer()”
masak sounds like the job for another more complicated trait :) 22:27
note that "is cached" is in pure Perl 6, and nothing prevents someone from writing their own, in Perl 6.
raydiak reminds me of a thought I had...not entirely sure what the difference is semantically, between "is pure" and "is cached"...naively, seems like either would imply the other should work there too 22:28
22:30 treehug88 left 22:33 cognominal left 22:35 colomon joined 22:36 virtualsue joined, Rounin joined
masak 'night, #perl6 22:37
raydiak good night, masak
colomon \o 22:39
raydiak .tell lizmat the cached precomp bug is #122896, the only difference between october and now being that it segfaults instead of giving the reported error message
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122896 22:40
yoleaux raydiak: I'll pass your message to lizmat.
22:41 telex left 22:42 telex joined 22:43 denis_boyun_ joined 22:50 ashleydev joined 22:51 Ugator left 22:52 Mso150_y joined, Mso150 left 22:55 rindolf left 22:56 timo joined
CurtisOvidPoe Would it be fair to say that floating point comparisons in Perl 6 are more likely to work because .3, internally, is represented as a Rat? 22:57
22:57 timo is now known as Guest36190, Guest36190 is now known as timotimo 22:58 denis_boyun_ left 22:59 MARTIMM left
Mouq CurtisOvidPoe: I'm not sure calling them "floating point comparisons" is really right, since Perl 6 has those too 23:04
m: say .3e0 == 1.3e0 - 1 23:05
camelia rakudo-moar c5dcdf: OUTPUT«False␤»
Mouq m: say 1.3e0 - 1 - .3e0
camelia rakudo-moar c5dcdf: OUTPUT«5.55111512312578e-17␤»
23:05 HaraldJoerg left 23:06 tgt left
raydiak from the standpoint of a heckler, Mouq's argument is the first that springs to my mind too 23:07
though imo, it's actually a totally fair statement, as the exact same example but without the explicit Nums (.3 == 1.3-1) succeeds in p6 and fails in p5 23:08
Mouq admits to being a decent heckler 23:10
23:11 Woodi left
raydiak if you can think of something less specifc to say than "floating point comparisons" so it's less tied to a specific datatype, but doesn't sound amateurish like "comparing decimals/fractions" might, then you could circumvent the mouqs of the world in this instance :) 23:17
CurtisOvidPoe Mouq: thank you. That’s a great counter-example.
raydiak "non-integer" is the furthest I got...
CurtisOvidPoe I don’t want to circumvent them. With a talk aimed at showing areas of Perl 6 which are easier than most dynamic languages, I need to know the pitfalls, too. 23:18
m: say .1 + .2 - .3
camelia rakudo-moar c5dcdf: OUTPUT«0␤»
CurtisOvidPoe That’s something that most languages get wrong.
Perl 5, for example, returns 5.55111512312578e-17 23:19
jercos I mean, the advantages of using rationals are numerous in various applications, but they're kind of mostly expressed to anyone who cares by "decimal literals in their simplest form are handled as rational literals rather than float literals"
CurtisOvidPoe Multiply that “zero” by the weight of the sun and the result is roughly the weight of Mount Everest. Mount Everest becomes an error in floating point math.
raydiak well yes, I mean a way to word it such that your meaning is made clear, without undue exposure to people who just want to word-spar in endless circles for non-technical reasons 23:20
23:21 timotimo left
CurtisOvidPoe But mostly it’s correct in Perl 6 23:21
m: say 1.3 - 1 - .3
camelia rakudo-moar c5dcdf: OUTPUT«0␤»
CurtisOvidPoe Again, Perl 5 gives 5.55111512312578e-17
jercos You can pitch rationals as a replacement for fixed-point and decimal-base-float types in other languages I guess (*cough* C#) 23:22
23:22 timotimo joined
CurtisOvidPoe Ironically, I just listened to someone demonstrating that floating point math is faster than integer math on many modern CPUs. My counter-argument is that they’ll arrive at the wrong answer faster. 23:23
jercos But it's not like rational number types are a new concept, the same advantages apply to the rational type in haskell. Perl 6 just does the more accurate thing and uses a precise type to represent decimal-printable numbers.
CurtisOvidPoe g’night all. Time for bed. Thanks for all the fish! Er, help! 23:26
raydiak I just think that if you say "floating-point", that's where the consistency crack exists...someone who wants to understand you will get what you are saying and move on in the conversation...someone who wants to argue will say "well that isn't really floating-point", which in most real-world cases is *entirely* beside the point from user-facing perl code
g'night CurtisOvidPoe o/
23:27 CurtisOvidPoe left
jercos raydiak: it's both literally and spiritually floating-point, I don't see how you could hold up an arguement that "floating-point" only ever refers to IEEE 754... 23:28
raydiak jercos: perhaps it's just subjective, I'm used to people jumping on half-baked excuses to argue a point (especially if the point regards perl 6) 23:30
jercos nods
raydiak so I tend to dance a little with my wording when I care, especialy if there's an audience of multiple people
23:31 timotimo left
jercos I can see how one of my perceived positive end-results (typing math problems naïvely into a perl 6 interpreter can give more accurate results than some other languages) could be seen as negative... "must be a language for people who can't program" 23:32
23:32 timotimo joined
raydiak well yeah there's that too, although at that point you know you've completely lost them, and probably did so before you ever spoke :) 23:36
if people apply carte blanche reasoning to that extent, you can't really do much unless you want to try to point out that they have ceased reasoning entirely and are now only applying logical-sounding words to their emotions :) 23:38
"it's better? that's terrible. all the awesome stuff is written in the terrible way, so it must be better." 23:39
timotimo wellllll 23:41
if you use rat arithmetic, you end up slower, using more memory and you're no longer compatible with floating point implementations of the same algorithm
23:41 gfldex left
jercos is it really slower to e.g., approximate 2/3 as a float and multiply another float by that than to multiply the same float by integer 2, then divide by integer 3? 23:43
I guess if you have to promote the integers to floats anyway to use the FPU for those calculations :| 23:44
23:44 sirdancealot left
timotimo FPU is ridiculously fast, i expect 23:45
jercos well, using the FPU either way. I'm assuming something needing speed is say, working on an audio sample that's already an IEEE float 23:46
timotimo raydiak, are you using rat math in your raytracer? :) 23:47
raydiak timotimo: maybe? :) I don't worry about such things when writing perl...is why I write perl instead of, say, C 23:48
is also why I keep hoping someone who enjoys that will swoop in and make it more awesome, but I'm likely to break down and optimize it this year
timotimo %) 23:49
raydiak I was actually just looking at it and working on it silghtly in the last few days...hadn't touched it for close to a year until recently, except to keep up with spec changes 23:51
timotimo i hope it got a bit faster during that time :) 23:53
raydiak suffered from me being caught in a large metacircularity loop...worked on math::threed mainly for pray, worked on math::symbolic thinking of pray as its main example of use, still haven't tied any of it together 23:54
timotimo mhm
23:54 virtualsue left
raydiak oh yes, it is certainly faster...esp since moar didn't exist (or at least wasn't stable) when I began 23:54
23:55 skids joined
raydiak moar beats the tar out of jvm for Pray these days 23:55
timotimo oh!?
raydiak yeah, even disregarding startup time
timotimo i hadn't realized you last tried pre-moar
that just means we should port more of the cool tech we have in moar onto rakudo-jvm, too 23:56
raydiak I made sure it at least ran without error on moar when everyone started using moar, but yeah that's about it until this week
it's a good 50% faster or so when I tried on hack
timotimo hmm 23:57
is there a workload of pray that doesn't create a huge code call graph? 23:58
raydiak hack is a cool resource too...I might end up doing more dev on it than my own machine, andjsut using my personal machines for the long-running renderings so I'm not a nuissance
timotimo you could --profile it
raydiak good question...tried --profile at one point, wasn't at all usable, but I could probably cut a lot of the crap out ust by commenting stuff
hadn't considered that approach before, timotimo++ making me think and try and stuff :) 23:59