»ö« 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«OHAIType 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 1y 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 1y 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 1y 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 1y 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/tmpfileMissing blockat /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. | ||