»ö« 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 masak on 12 May 2015.
00:02 BenGoldberg joined 00:11 itz2 left 00:16 pdcawley left 00:17 spider-mario left, vendethiel joined 00:36 davido_ left 00:38 davido_ joined 00:39 vendethiel left 00:41 skids joined 00:43 SevenWolf joined, laouji joined 00:48 laouji left 01:01 aborazmeh joined, aborazmeh left, aborazmeh joined 01:03 tinyblak_ left 01:06 aborazmeh left 01:08 aborazmeh joined, aborazmeh left, aborazmeh joined 01:30 ssqq joined
ssqq Go languate permit multi value return from function, and declare it with define. `sub sub-name($arg-one, $arg-two) ($return-arg-one, $return-arg-two) { ... } 01:39
Then we could write: `get-more-args(output-more-args($args))`, not `get-more-args(|output-more-args($args))` 01:43
01:43 tinyblak joined
japhb ssqq: That's the way it worked in Perl 5. On balance it seems worth a single character to indicate whether you want to pass a (possibly complex) data structure from one routine to another, or to convert that data structure to multiple arguments when passing it on. 01:46
The | in a sense is indicating that you are intentionally resolving a possible impedence mismatch in favor of flattening/multi-arg-passing. 01:48
But passing a single structure is deemed the more common case (as well as the more efficient one), so it gets huffmanized to no character.
tony-o_ doesn't it still kind of work that way 01:50
m: sub r () { return 1, "2", { 3=>"4" }; }; my ($a, $b, $c) = r; "$a\t$b\t{$c.perl}".say;
camelia rakudo-moar c2a57e: OUTPUT«1 2 {"3" => "4"}␤»
01:50 Khisanth left 01:51 dayangkun joined, laouji joined, Khisanth joined
ssqq tony-o_: yes, Perl 6 have this ability. 01:54
01:56 ssqq left, laouji left
japhb tony-o_: Sure, you can unpack easily. You can do that in signatures as well (nice way to pull hashes and arrays apart). 01:56
My point was that needing | for ssqq's example is actually a conscious choice and (at least for the Perl 6 design) makes sense. 01:57
02:04 SevenWolf left
dalek kudo-star-daily: 6b74b8a | coke++ | log/ (2 files):
today (automated commit)
02:12
02:34 rmgk_ joined, rmgk is now known as Guest3444, Guest3444 left, rmgk_ is now known as rmgk 02:45 noganex_ joined 02:48 Ben_Goldberg joined, noganex left 02:49 raiph left 02:50 vendethiel joined 02:51 BenGoldberg left
timotimo [Coke]: is there something wrong with your daily rakudo star runs? MoarVM-configure.log says "I see a .git directory here -- you appear to be trying to run Configure.pl from a clone of the Rakudo Star git repository." 02:54
xiaomiao bugs.gentoo.org/show_bug.cgi?id=550208 intriguing rakudo-j build failure: Tries to create directories /usr/share/ during build 03:02
timotimo must be CompUnitRepo? 03:12
github.com/rakudo/rakudo/commit/b9...5c21e726c7 - this commit may have already fixed that problem?
so if anybody has an account on the gentoo bugtracker, maybe they can post a comment to that effect there and ask the original committer to verify if a newer version of rakudo works better? 03:13
03:32 kurahaupo1 joined 03:35 BenGoldberg joined, aborazmeh left 03:37 laouji joined 03:38 Ben_Goldberg left
TimToady r: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems 03:39
camelia rakudo-jvm c2a57e: OUTPUT«100 100 100 100 100 100 100 100 100 100␤»
..rakudo-moar c2a57e: OUTPUT«100 0 100 100 100 100 100 100 100 100␤»
TimToady r: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
camelia rakudo-{moar,jvm} c2a57e: OUTPUT«100 100 100 100 100 100 100 100 100 100␤»
TimToady r: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
camelia rakudo-jvm c2a57e: OUTPUT«Cannot do aggregate operation on a type object␤ in block <unit> at /tmp/tmpfile:1␤␤»
..rakudo-moar c2a57e: OUTPUT«100 0 100 100 100 100 100 100 100 100␤»
TimToady r: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems 03:40
camelia rakudo-{moar,jvm} c2a57e: OUTPUT«100 100 100 100 100 100 100 100 100 100␤»
TimToady we get problems on both vms, so it's not just moar's GC that is wrong on this one
03:41 laouji left
TimToady (I isolate the problem to .gimme at one point, so probably will be fixed with GLR anyway) 03:42
*ted
03:44 kurahaupo1 left
xiaomiao timotimo: 2015.05 fails, is there any newer released version? 03:46
if not I could backport that commit/patch ... let me stare at it for a minute :) 03:47
lizmat commute to IST& 03:48
03:48 lizmat left
xiaomiao hmmmm. my dislike of github is increasing nonlinearly again, how does one get a raw patch instead of htmlified fun?! :\ 03:48
03:52 vendethiel left, kurahaupo1 joined
zostay m: say ++$ 03:52
camelia rakudo-moar c2a57e: OUTPUT«1␤»
zostay what the heck is that? 03:53
BenGoldberg m: say $
camelia rakudo-moar c2a57e: OUTPUT«(Any)␤»
BenGoldberg It's an anonymous variable. 03:54
p6: my \SCALE = 3; my \FANOUT = 2; sub divide-and-conquer($n, $depth) { say "$depth: $n" if 0; $depth <= 0 ?? $n !! [+] await do for ^FANOUT { start { divide-and-conquer($n / FANOUT, $depth - 1) } } }; say divide-and-conquer(1.0, SCALE); 03:55
camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
BenGoldberg m: my \SCALE = 3; my \FANOUT = 2; sub divide-and-conquer($n, $depth) { say "$depth: $n" if 0; $depth <= 0 ?? $n !! [+] await do for ^FANOUT { start { divide-and-conquer($n / FANOUT, $depth - 1) } } }; say divide-and-conquer(1.0, SCALE); 03:56
camelia rakudo-moar c2a57e: OUTPUT«===SORRY!===␤Cannot call infix:<*>(Int, Int); none of these signatures match:␤ (Any $x = { ... })␤ (Any \a, Any \b)␤ (Real \a, Real \b)␤ (Int:D \a, Int:D \b --> Int)␤ (int $a, int $b --> int)␤ (Num:D \a, Num:D \b)␤ (num…»
BenGoldberg m: my \SCALE = 3; my \FANOUT = 2; sub divide-and-conquer($n, $depth) { say "$depth: $n" if 0; $depth <= 0 ?? $n !! [+] await do for ^FANOUT { start { divide-and-conquer($n / FANOUT, $depth - 1) } } }; say divide-and-conquer(1.0, SCALE);
camelia rakudo-moar c2a57e: OUTPUT«(signal SEGV)»
BenGoldberg r: my \SCALE = 3; my \FANOUT = 2; sub divide-and-conquer($n, $depth) { say "$depth: $n" if 0; $depth <= 0 ?? $n !! [+] await do for ^FANOUT { start { divide-and-conquer($n / FANOUT, $depth - 1) } } }; say divide-and-conquer(1.0, SCALE);
camelia rakudo-jvm c2a57e: OUTPUT«1␤»
..rakudo-moar c2a57e: OUTPUT«Memory allocation failed; could not allocate 656 bytes␤»
03:56 cognominal joined 03:57 cognominal left
skids zostay: just out of curiosity, why does HTTP::Headers have remove-header/remove-headers instead of just a multi remove? 03:58
zostay because... i wrote it late at night 03:59
no reason
patches welcome
04:00 laouji joined
skids :-) 04:00
zostay m: (^10).map({ (++$)*(++$) }).say 04:03
camelia rakudo-moar c2a57e: OUTPUT«1 4 9 16 25 36 49 64 81 100␤»
TimToady m: (^10).map({ ++$ * ++$ }).say 04:04
camelia rakudo-moar c2a57e: OUTPUT«1 4 9 16 25 36 49 64 81 100␤»
TimToady m: say ++$ * ++$ xx * 04:06
camelia rakudo-moar c2a57e: OUTPUT«1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 961 1024 1089 1156 1225 1296 1369 1444 1521 1600 1681 1764 1849 1936 2025 2116 2209 2304 2401 2500 2601 2704 2809 2916 3025 3136 3249 3364 3481 3600…»
xiaomiao timotimo: looks like that commit fixes it, thanks 04:08
skids m: (^10).map({ ++$^a * ++$a }).say # maybe is ro, but fails to warn?
camelia rakudo-moar c2a57e: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/yhCldel7GF:1␤␤»
TimToady well, "assign" is lta 04:09
skids Oh $ wasn't a parameter NM. 04:14
m: ((^10).map: { ($ += 3) * ++$ }).say # Comprehesion dawns -- each $ is its own thing. 04:19
camelia rakudo-moar c2a57e: OUTPUT«3 12 27 48 75 108 147 192 243 300␤»
04:22 aborazmeh joined, aborazmeh left, aborazmeh joined
skids m: ((^10).map: { @[++$] = 1 } ).say 04:24
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nFGi5hfAZj␤Unsupported use of $] variable; in Perl 6 please use $*PERL.version or $*PERL.compiler.version␤at /tmp/nFGi5hfAZj:1␤------> 3((^10).map: { @[++$]7⏏5 = 1 } ).say␤»
04:24 kurahaupo1 left
zostay m: ((^10).map: { @[ ++$ ] = 1 } ).say 04:26
camelia rakudo-moar c2a57e: OUTPUT«1 1 1 1 1 1 1 1 1 1␤»
04:30 laouji left
skids m: ((^10).map: { @[^++$ ] X+= 1 }).perl.say 04:32
camelia rakudo-moar c2a57e: OUTPUT«()␤»
04:39 skids left 04:41 laouji joined
zostay m: (1 .. *).map({ [*] 1 .. ++$ }) 04:42
camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
zostay m: (1 .. *).map({ [*] 1 .. ++$ }).gist.say 04:43
camelia rakudo-moar c2a57e: OUTPUT«1 2 6 24 120 720 5040 40320 362880 3628800 39916800 479001600 6227020800 87178291200 1307674368000 20922789888000 355687428096000 6402373705728000 121645100408832000 2432902008176640000 51090942171709440000 1124000727777607680000 25852016738884976640000 62…»
04:47 BenGoldberg left 04:49 yqt left
moritz \o 04:51
05:02 cognominal joined, kurahaupo1 joined 05:10 diana_olhovik_ joined
tadzik Hello hello 05:13
05:17 kaare_ joined 05:20 diana_olhovik_ left 05:21 aindilis left 05:22 aborazmeh left 05:27 mr-foobar joined 05:29 RabidGravy joined 05:32 RabidGravy left 05:42 RabidGravy joined 05:45 zhanggong joined 05:47 zhanggong left, zhanggong joined 05:48 zhanggong left, zhanggong joined 05:51 zhanggong|2 joined, zhanggong|2 left 05:58 diana_olhovik joined, rindolf joined 06:05 vendethiel joined 06:07 ab5tract_ joined 06:20 sftp left 06:21 sftp joined 06:30 vendethiel left 06:43 domidumont joined 06:47 domidumont left 06:48 domidumont joined 06:49 FROGGS joined 06:51 [Sno] left 06:55 telex left 06:56 telex joined 07:11 pat_js joined 07:31 brrt joined 07:35 zhanggong left 07:39 g4 joined, g4 left, g4 joined 07:40 amurf left 07:44 darutoko joined, zakharyas joined 07:46 kurahaupo1 left 07:52 abraxxa joined, salva left, cosimo joined 07:53 firefish5000 left 07:55 darutoko left, darutoko joined 07:57 brrt left 07:58 virtualsue joined 08:10 salva joined 08:12 pdcawley joined 08:19 fhelmberger joined 08:25 Ven joined 08:35 laouji left 08:37 [Sno] joined 08:40 virtualsue_ joined 08:41 virtualsue left, virtualsue_ is now known as virtualsue 08:44 tinyblak left, tinyblak joined 08:47 bbkr_ left, bbkr joined 08:49 tinyblak left, Ven left, tinyblak joined 08:51 cognominal left, Ven joined 08:55 espadrine joined 08:57 liztormato joined
liztormato drops a pin from IST 08:57
RabidGravy ping
DrForr *CLONK*
08:58 Akagi201 joined
Ven pong! 08:58
08:59 virtualsue left
liztormato Ah, good to hear some sentient echoes :-) 08:59
09:04 laouji joined 09:06 koo6 joined 09:07 pdcawley left, pat_js left 09:10 AlexDaniel joined 09:13 ab5tract_ left, lizmat joined 09:15 liztormato left
timotimo the international space tation? 09:17
FROGGS :P 09:18
09:18 tinyblak left 09:19 grondilu joined, tinyblak joined 09:23 rindolf left 09:24 tinyblak left
lizmat timotimo: no, that's the ISS 09:24
currently waiting for our next flight at Istanbul Itl. Airport 09:25
timotimo "das ist IST, und das ist ISS!"
timotimo gotta run for an appointment
lizmat man ist was man isst ?
09:28 amurf joined, Ven left, vendethiel joined
moritz man ist was man ISSt? :-) 09:32
09:33 amurf left
lizmat wishes she was at the ISS instead of this glorified bus station 09:34
09:37 rindolf joined 09:38 andreoss joined
moritz lizmat: at least it's glorified :-) 09:48
lizmat true :-)
BTW, masak waves from IST also
moritz waves back, to masak, lizmat and the rest
DrForr does likewise. I'll be there in a few days likely. 09:49
Or at least on the way over there.
timotimo so ... i turn the ignition key and at the same time get a call reminding me of the appointment ... that turns out to be 1 hour later than i expected 09:50
09:51 vendethiel left
lizmat :-) 09:54
DrForr Hoo, valgrind does *not* like the test suite.
09:55 zakharyas left
lizmat commute to KHE& 09:55
09:55 lizmat left
DrForr Lots of "Invalid read of size 1"... /me checks out the valgrind manual to see what he's uncovered. 09:56
09:57 zakharyas joined
timotimo i am good at time management 09:57
09:58 tinyblak joined
timotimo do you get stack traces with those messages? 10:01
DrForr Stacktrace from valgrind, but the program continues until it segfaults at the end. 10:02
10:02 tinyblak_ joined, vendethiel joined
DrForr I'll gist it, one mo. 10:02
gist.github.com/drforr/c89dde65470c61dcde1e 10:03
This is just one leak report, there are several in a row.
10:04 tinyblak left
timotimo oh 10:04
DrForr Eventually it segfaults on a separate call, and yes, NativeCall is going on. 10:05
timotimo that's not really a leak report per se; it looks like a use-after-free or re-use of a piece of memory
DrForr That's why I'm reading the manual to see where the report is.
timotimo instead of valgrind, you could also build your moarvm with --asan to the Configure.pl
asan will also make sure to pad allocated memory pieces with "poisoned bytes" so that an access into an unrelated area via an offset of some kind won't easily be mistaken for a direct access to that unrelated object 10:06
or something like that
i don't know if it perhaps actually takes the base address into account when doing relative accesses
it could very well have to do with nativecall freeing something for you because you didn't define it to be "managed from the C side of things" 10:07
DrForr Right, so if you should read outside the object boundaries you get garbage instead of zeros or whatever.
Oh, I have no doubt the issue is on my side. I've just been asked before to report these issues regardless of source, thought I'd get more eyes on it. 10:08
timotimo you actually immediately get an access violation, IIRC 10:09
if you set the right env var, you'll get an abort at a place where you can gdb 10:10
DrForr Nod.
Mainly it comes from the lack of patience for writing tests in C. 10:19
10:23 koo6 left, vendethiel left 10:25 dayangkun left 10:29 vendethiel joined 10:33 RabidGravy left 10:39 jferrero left, jferrero joined
dalek ake: b4f5664 | arnsholt++ | t/class.t:
Add vim modeline to a test file.
10:39
ake: d2e4623 | arnsholt++ | src/Snake/Grammar.nqp:
nqp::ops take zero or more args, not one or more.
ake: db199d8 | arnsholt++ | src/Snake/ (2 files):
Implement named arguments to nqp::ops.
moritz named args to nqp:: ops? 10:41
that sounds scary, slightly :-)
arnsholt moritz: Need it for nqp::callmethod =) 10:44
So not strictly the op, but at the syntax level, it's the op 10:45
10:52 vendethiel left 10:55 vendethiel joined, MENDIGO_DURO joined 10:56 MENDIGO_DURO left 11:18 vendethiel left 11:19 AlexDaniel left 11:21 vendethiel joined 11:26 brrt joined 11:27 grondilu left 11:28 grondilu joined, bjz left 11:33 yqt joined 11:35 bjz joined 11:41 Akagi201 left, larion joined 11:42 brrt left 11:44 vendethiel left 11:47 andreoss left 11:48 andreoss joined 11:50 andreoss left 11:51 andreoss joined, smls joined
smls is there an easy way to "invert" a regex-based grep without writing a custom closure? 12:10
m: say (2, 4, 8 ... 512).grep({$_ !~~ /2/})
camelia rakudo-moar c2a57e: OUTPUT«4 8 16 64␤»
smls hm, never mind, I suppose the closure form will do. 12:12
12:16 pauluu joined
Juerd m: say (1,2,3,4).grep(* !~~ /2/) 12:17
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OSNs5y_WET␤Variable '&infix:<!~~>' is not declared␤at /tmp/OSNs5y_WET:1␤------> 3say (1,2,3,4).grep(* 7⏏5!~~ /2/)␤»
Juerd Hmm...
Maybe I don't understand * yet :)
12:26 molaf joined
timotimo huh, !~~ should work, shouldn't it? and it should work with *, too 12:39
FROGGS I think so, yes
m: say &infix:<!~~>
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nX3SUZnw4c␤Undeclared routine:␤ &infix:<!~~> used at line 1. Did you mean '&infix:<~|>', '&infix:<∖>', '&infix:<lt>'?␤␤»
FROGGS m: say &infix:<~~>
camelia rakudo-moar c2a57e: OUTPUT«sub infix:<~~> (Any |) { #`(Sub+{Precedence}|39475216) ... }␤»
FROGGS m: say (1,2,3,4).grep(* != 2) 12:40
camelia rakudo-moar c2a57e: OUTPUT«1 3 4␤»
FROGGS m: say (1,2,3,4).grep(* !== 2)
camelia rakudo-moar c2a57e: OUTPUT«1 3 4␤»
timotimo well, &infix:<!~~> doesn't exist, but we should get !~~ compiled to METAOP_NEGATE(&infix:<~~>)
hoelzro o/ #perl6
FROGGS yes exactly 12:41
hi hoelzro
hoelzro morning FROGGS
12:45 molaf left
[Coke] timotimo: that usually is caused by an error erarlier in the process, and then a cd fails that I don't have a guard on. 12:48
timotimo ah 12:49
[Coke] last I checked (days ago) star was failing all the module tests because it was cheating and not using panda, which recently changed how it installs modules. 12:50
timotimo ah!
yeah, that makes sense 12:51
can i somehow help you get further with that?
[Coke] Sure. I have a meeting in 9 minutes. If you want to see where things are blowing up, you can clone that repo and run "./bin/doit" in the meantime. 12:52
timotimo i have a tiny commute to do first 12:53
dalek kudo/nom: fa19956 | hoelzro++ | src/core/Buf.pm:
Add push to Buf
ast: fefd14a | hoelzro++ | S03-operators/buf.t:
Add tests for Buf.push

This addresses RT #125182
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125182
timotimo hm, does CArray have all these nice functions? push, pop, shift, unshift? 12:54
hoelzro are error messages tested in roast at all? or is that just something that's up to each implementation? 12:55
hoelzro is looking at RT#125153 12:56
12:56 fhelmberger left
rjbs \o/ Buf.push 12:59
DrForr waves :) 13:00
rjbs should switch to rakudobrew.
DrForr rjbs: I do 'rakudobrew nuke moar && rakudobrew build moar' out of habit. 13:01
13:02 vendethiel joined 13:04 apejens left 13:06 amurf joined
hoelzro rjbs: the impl I provided is possibly LTA; please put it through its paces =) 13:07
abraxxa FROGGS: any news on NativeCall? 13:08
FROGGS abraxxa: give me a hint... about what exactly?
abraxxa FROGGS: is rw for Pointers for example 13:09
or return by Pointer
FROGGS well, return by pointer works since a while IIRC 13:10
13:11 amurf left
FROGGS abraxxa: see github.com/rakudo/rakudo/blob/nom/...-rw-args.t 13:11
abraxxa: seems to be working since April 5th
13:11 Ven joined, aborazmeh joined, aborazmeh left, aborazmeh joined
smls How reliable/advisable is it to search for files like this in Perl 6 on Linux: 13:11
13:11 RabidGravy joined
smls my @files = qx[find -mindepth 1 -iname "*.jpg" -print0].split("\0"); @files.pop; 13:11
abraxxa my last commit was 7 weeks ago... 13:12
rjbs hoelzro: What is wrong with github.com/rjbs/ZMachine-Whiz/comm...53e9b842c4 ?
abraxxa how about strings?
13:12 larion left
rjbs hoelzro: the old one worked 13:12
hoelzro rjbs: push doesn't work for you there? 13:13
rjbs hoelzro: This type cannot unbox to a native integer
hoelzro ahhhh 13:14
rjbs Looks like the push impl only allows one element?
hoelzro yes!
FROGGS abraxxa: 'is rw' on strings is NYI, and it is hard for me to judge about much work would be involved to implement it atm...
rjbs hoelzro: Well, that's no good. :)
hoelzro was not thinking
abraxxa NYI?
FROGGS not yet implemented
abraxxa ok
hoelzro rjbs: do you have any interest in making the change to fix it? =)
I don't mind doing it, but I was curious if you wanted to dive in 13:15
abraxxa cause OCI for example returns error messages by calling a function and passing it a pointer it fills with the error message in UTF-8
null terminated I think
FROGGS hoelzro: ask him if he has signed the CLA :P
rjbs hoelzro: I don't know how I'd do it, and while I am kinda interested, I'm not sure I can get to it today. In about 5-10m I need to get ready to leave for work :(
I had a patch in Rakudo, so presumably I did whatever CLA thing was needed. :) 13:16
FROGGS *g*
hoelzro rjbs: well, how about I send you a link to the code, and you can fix it when you have time =)
rjbs hoelzro: I'm already looking at the commit. We'll see. :)
hoelzro heh, beat me to it!
did you see the corresponding commit in roast? 13:17
rjbs nope
so is there a bindpos_i equiv for many things? 13:18
hoelzro there's bindpos_n, bindpos_s
I think plain ol' bindpos
rjbs hm, there's nqp::splice 13:19
hoelzro I forget...is there a way to make a subrule "cut" at a certain point so that if it fails, the parent would try an alternate match where the cut was made? 13:21
...now that I've written that, that sounds slightly insane. 13:22
rjbs Okay, I don't see how to do this, and learning how to muck about in nqp is not something I'm likely to do real soon. The fixing of the signature and length setting is trivial and the bindpos_i replacement looks like trivial if you know the right magic word.
Gotta go!
hoelzro rjbs: later 13:23
I'll look into fixing Buf.push, don't worry about it =)
13:24 [Sno] left 13:25 apejens joined 13:26 [Sno] joined
smls Are the :nl and :chomp options to open/pipe not supposed to DWIM together? 13:27
$ mkdir test; cd test; touch a b c; perl6 -e 'say pipe(q[find -mindepth 1 -print0], :nl("\0"), :chomp).lines.perl'
("./c\x[0]", "./b\x[0]", "./a\x[0]")
13:27 vendethiel left 13:32 _4d47 joined
smls Hm, looks like both IO::Handle.get and IO::Handle.lines ignore $!nl and simply do a plain .chomp if the $.chomp attribute is set. 13:34
Is this intended behavior? 13:35
13:37 skids joined 13:39 pauluu left 13:43 aborazmeh left 13:44 abraxxa left
_4d47 in a sub is it possible to get the order named parameters where passed ? slurpy hash loose that 13:45
smls No, named parameters are unordered by design. 13:46
_4d47 ok thanks smls 13:47
smls You'll have to use positional parameters if you need to preserve order.
_4d47 yes but cannot slurp the Pairs, get Unexpected named parameter passed 13:50
smls _4d47: Note that pairs can also be passed to positional parameters, however you need to either put them in parens or quote the key to make sure they're not parsed as names arguments:
m: sub a (*@_) { .say for @_ }; a (foo => 1), "bar" => 2
camelia rakudo-moar c2a57e: OUTPUT«foo => 1␤bar => 2␤»
13:50 larion joined, grondilu left
PerlJam Do we have a trait in the ecosystem somewhere that allows for ordered hashes? If so, _4d47 could use that on his slurpy. 13:52
If not, _4d47 could write it :)
13:53 vendethiel joined 13:57 go|dfish joined
_4d47 PerlJam there is PairMap but havent found a trait 14:00
14:03 dayangkun joined
sjn Videos from OSDC.no are being published, and here's jnthn's Objects ∩ Concurrency talk: twitter.com/osdcno/status/604285477387157504 14:03
timotimo i seem to recall someone wrote an ordered hash implementation
it was only a few lines of code
smls If if such a trait existed, I don't think it would be a good idea to use it to change modify the behavior of a subroutine signature in a way that breaks with how people have come to expect Perl 6 signatures to work. 14:04
PerlJam, _4d47 ^^
I think that consistency and predictability are more important in API design, than being able to loose some parens. 14:05
[Coke] (test error messages). In general, we want to test the exception type, not the string of the message. in some cases, we check to insure that a particular phrase is included in the message. It's not just per-impl, but also a localization issue. 14:06
14:06 Sqirrel joined
literal smls: this is Perl 6, I'm sure someone will find a way have that cake and eat it too! 14:06
timotimo literallyk
!
PerlJam smls: I don't disagree.
smls I don't think that passing Pair's to positional parameters looks that bad: 14:07
mysub (key1 => "val1"), (key2 => "val2"), (key2 => "val2")
And it doesn;t require any special hack 14:08
So that's what I would recommend.
dalek kudo/nom: 828a245 | hoelzro++ | src/core/Exception.pm:
Add instead field to BeginWithoutEnd exception

This is so that we can provide more contextual information around mismatched =begin/=end blocks
kudo/nom: 988c359 | hoelzro++ | src/Perl6/Grammar.nqp:
Add the =end block we encountered to mismatch error message

If we encounter an =end block that doesn't match the innermost
  =begin block, we should raise an error with a message that
describes to the user what's going on
Addresses RT #125153
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125153
_4d47 smls yes not that bad 14:11
14:11 tinyblak joined
PerlJam smls: the only problem is that we don't get _4d47 to write an ordered hash implementation for us ;) 14:11
14:12 tinyblak_ left
smls ö= 14:12
;)
timotimo if you have that many positional pairs, can't you also |(foo => 1, bar => 2, baz => 3)?
_4d47 oh I do love ordered hashes and cakes :) 14:13
smls timotimo: That seems to work too, yes.
timotimo saves quite a few parens 14:14
PerlJam isn't sure you even need the prefix |
timotimo yeah you do 14:15
14:15 Possum left
timotimo otherwise you get the list of pairs as a single positional parameter 14:15
smls not if it's a slurpy parameter bthough
right?
timotimo wrong
(afaik) 14:16
smls m: sub a (*@_) { say @_.perl }; a (foo => 1, bar => 2, baz => 3)
camelia rakudo-moar c2a57e: OUTPUT«[:foo(1), :bar(2), :baz(3)]<>␤»
smls seems to work
timotimo m: sub a (*@_) { say @_.perl }; a (foo => 1, bar => 2, baz => 3), 2, 3
camelia rakudo-moar c2a57e: OUTPUT«[:foo(1), :bar(2), :baz(3), 2, 3]<>␤»
timotimo huh
that's new to me
smls well, slurpy's *are* supposed to flatten... 14:17
14:18 Possum joined
dalek kudo/nom: 382c78a | hoelzro++ | src/Perl6/Grammar.nqp:
Indicate where a quibble started on failure

To help the user determine where to start looking
Addresses RT #125247
14:19
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125247
dalek kudo/nom: d84bbbc | hoelzro++ | src/Perl6/Grammar.nqp:
Set up expectations for failed nibble

Addresses RT #125247
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125247
timotimo ah, that makes more sense to me
thanks for the hint, teach :) 14:20
smls As for ordered hashes, I do sometimes wish I had one when coding in Perl or Perl 6, but not very often.
Mostly just in situations where I end up constructing both an array and a hash from the same data, and imagine that having it all in one data structure would be more elegant.
PerlJam A list of pairs handily satisfies any desire I might have for an "ordered hash" in Perl 6 14:21
smls Not if you need fast look-up's by key though ;) 14:22
timotimo i think that implementation landed in a gist and got forgotten by time
maybe the irclog has it
timotimo cannot find it 14:27
14:29 lizmat joined
smls I can only find a precious mention of the same by you: irclog.perlgeek.de/perl6/2014-04-11#i_8571863 14:29
:)
*previous
14:30 virtualsue joined
masak afternoon, #perl6 14:30
timotimo hey masak
14:30 dayangkun left
timotimo was it you who wrote that little OrderedHash implementation? 14:30
PerlJam smls: "precious" worked too :)
timotimo: a long time ago there was an OrderedHash PMC (parrot) I dunno if it was ever exposed in perl6-land 14:32
[Coke] Easy enough to make a class that does it, no? 14:33
14:34 brrt joined
timotimo of course 14:35
btw, how do we do string keys with hashes when they're NFG?
hashing strings in NFG would require a global table of synthetics? 14:36
or do we hash the maximum decomposed form?
14:36 vendethiel left
[Coke] decomposed or composed? 14:36
timotimo doesn't really matter i suppose
just having something standardised 14:37
lizmat greets masak from the incremented room
smls lizmat: Rakudo currently doesn't have an alternative to pipe() that avoids going through the shell, does it? 14:40
14:41 vendethiel joined 14:43 _4d47 left
lizmat smls: pipe() uses nqp::openpipe underneath, I have no idea how that is implemented 14:43
smls lizmat: What about open(..., :nl($sep), :chomp) failing to chop off the line separators if $sep is something different than a newline, is that intended behavior? 14:45
14:46 g4 left
smls In Perl 5, chomp respects custom-defined line separators: 14:47
$ perl -E 'my $a = "aaa_"; $/="_"; chomp $a; say $a' 14:48
aaa
14:48 lizmat left
smls S32:134 just says "remove new line characters" and doesn't mention interaction with :nl, but maybe that's an oversight? 14:49
synbot6 Link: design.perl6.org/S32.html#line_134
masak smls: yes, I would say it is.
smls correct link: design.perl6.org/S32/IO.html#line_134 14:50
b2gills Shouldn't all Perl6::Metamodel::*HOW have a `roles` method? 14:51
m: say Real.^roles 14:52
camelia rakudo-moar c2a57e: OUTPUT«Method 'roles' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤ in block <unit> at /tmp/_Qb8ZUp85g:1␤␤»
b2gills m: say Int.^roles(:transitive) 14:53
camelia rakudo-moar c2a57e: OUTPUT«Cannot find method 'roles'␤ in any roles at src/gen/m-Metamodel.nqp:2839␤ in block <unit> at /tmp/3hMqNAj8He:1␤␤»
smls m: say Perl6::Metamodel::ClassHOW 14:55
camelia rakudo-moar c2a57e: OUTPUT«Could not find symbol '&ClassHOW'␤ in block <unit> at /tmp/bCaLaih5Gf:1␤␤»
smls huh
14:55 amurf joined
masak TimToady: would you expect `macro trait_mod:<is>` to do something sensible? 14:56
b2gills m: say ::Perl6::Metamodel::ClassHOW 14:59
camelia rakudo-moar c2a57e: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Perl6::Metamodel::ClassHOW␤»
15:00 amurf left 15:02 laouji left
ugexe are there defiend rules for what a module name can contain yet (other than the STD)? unicode is valid i think, so for the most parts its just <-space -[:]>. -[{ } ; etc] and must start with alpha? 15:03
15:04 lizmat joined 15:05 laouji joined
timotimo m: say Metamodel::ClassHOW:: 15:05
camelia rakudo-moar c2a57e: OUTPUT«␤»
timotimo m: say Metamodel::ClassHOW::.keys
camelia rakudo-moar c2a57e: OUTPUT«Cannot find method 'keys': no method cache and no .^find_method␤ in block <unit> at /tmp/XlZaiOy8VU:1␤␤»
timotimo m: say Metamodel::ClassHOW::.perl
camelia rakudo-moar c2a57e: OUTPUT«Cannot find method 'perl': no method cache and no .^find_method␤ in block <unit> at /tmp/AZlxkTLsJE:1␤␤»
lizmat smls: sorry for responding a bit late, the hotel wifi is a bit flaky 15:09
I'm not sure what the state if :nl is in either nom or newio atm 15:10
smls I'm looking at nom right now 15:11
it only uses :nl for printing, and for passing to nqp::setinputlinesep
15:12 brrt left
lizmat yeah, but that's not used by .chomp, afaik 15:13
smls also, whereas S32/IO says that "EOL" should be the magic :nl value that makes it accept all Unicode newline-characters, in Rakudo nom "\n" actually plays that role.
lizmat yep, a case of NYI / fuzzy speculation
some weeks ago I realised we actually need 2 things in that area
1. for splitting lines / chomping
2. knowing what to put at the end of a "say"
smls yeah
lizmat they could be different 15:14
timotimo well, yeah, but we also have $*IN and $*OUT
lizmat although probably rarely, but anyway
timotimo you don't really read and write the same file terribly often, do you?
lizmat yeah 15:15
smls I think its fine handling it all with a single :nl option
it's just convenience anyway - rare cases can do their own chopping and appending.
lizmat: "fuzzy speculation" -- are you saying that you don't like the specced "EOL" value? 15:16
timotimo you could also duplicate the file object, perhaps?
sjn moritz++ # for retweeting the message about jnthn's talk 15:18
perl6 marketing ftw :) 15:19
lizmat smls: no, not really, just that there's a NYI functionality that we're not sure how we really want to implement it yet 15:20
afk until later& 15:21
smls lizmat: This is how I interpret the spec on :nl, and I think it would serve just fine: 15:23
1) open($path) or open($path, :nl<EOL> ) ---> .nl reports (and .say appends) "\n"; .lines and .get split on any Unicode newline
2) open($path, :nl($sep)) ---> .nl reports (and .say appends) $sep; .lines and .get split on literal $sep
3) :chop always chops off whatever was actually used as a line separator.
Should I have a go at trying to implement that? 15:25
And if so, should I do it in nom or newio?
15:25 vendethiel left 15:29 dpk joined 15:32 brrt joined, koo6 joined 15:35 laouji left 15:36 diana_olhovik left, FROGGS left 15:43 smls left 15:45 smls joined 15:46 telex left 15:47 Ven left 15:48 telex joined, dolmen joined 15:50 vendethiel joined 15:55 domidumont left 15:56 brrt left 15:58 rindolf left 16:00 dolmen left 16:08 cognominal joined 16:11 vendethiel left 16:12 gfldex joined 16:15 Sqirrel left 16:16 grondilu joined, grondilu is now known as Guest84293 16:17 zakharyas left
zostay m: my %h = a => 1, b => 2; %h.push: c => 3, 'd', 4, e => 5; %h.perl.say; 16:19
camelia rakudo-moar c2a57e: OUTPUT«{:a(1), :b(2), :d(4)}<>␤»
zostay m: my %h = a => 1, b => 2; %h.push: (c => 3, 'd', 4, e => 5).list; %h.perl.say; 16:21
camelia rakudo-moar c2a57e: OUTPUT«{:a(1), :b(2), :c(3), :d(4), :e(5)}<>␤»
zostay i don't like that :-/
16:21 vendethiel joined, Sqirrel joined
smls zostay: What about it? 16:23
skids Shouldn't Hash.push have a *% slurpy? 16:24
Though... there are array-building semantics IIRC so I guess that would not functionally work. 16:26
zostay what skids said... it would be nice if pairs would collect in *@ if *% isn't present
skids That's an intriguing way of looking at it. 16:27
I wonder what that would break.
zostay it may also be that i need an alternate to Pair that doesn't assume key uniqueness
sjn cognominal++ # for retweeting jnthn's talk at OSDC.no twitter.com/osdcno/status/604285477387157504
zostay Pair/Enum that is
skids They'd have to pop back out to named's when calling e.g. a nextwith candidate but that might fall out naturally. 16:30
TimToady don't think that can be done; the transformation to named args is based on the syntax of the callsite, and has nothing to do with eventual binding 16:31
m: my %h = a => 1, b => 2; %h.push: (c => 3, 'd', 4, e => 5); %h.perl.say; 16:33
camelia rakudo-moar c2a57e: OUTPUT«{:a(1), :b(2), :c(3), :d(4), :e(5)}<>␤»
zostay m: my @h = a => 1, b => 2; my %h; %h.push: |@h; %h.perl.say;
camelia rakudo-moar c2a57e: OUTPUT«{:a(1), :b(2)}<>␤»
zostay i understand what is happening, but it seems a little dangerous for the caller who might have an incomplete mental map of perl6 calling conventions 16:34
maybe unavoidable
cognominal sjn++ for noting moritz++ tweeting about the jnthn++ talk in the first place. I am just a cog in the echo chamber :) 16:35
skids Maybe that should be emphasized as a gotcha in the beginners guides.
16:35 eternaleye left
zostay maybe in the perl5 to perl6 guides at least, to highlight the ramifications of => no longer being a mystical comma 16:35
cognominal akwardly composing metaphors 16:36
16:36 eternaleye joined
TimToady well, it's not like you can push to a hash in Perl 5 anyway (afaik) 16:36
zostay (maybe it already is, i don't admit to being thorough in my reading of documentation)
no, but pushing on a MultiHash (which i'm working on), is pretty handy, but i'm working against the basic assumption of key uniqueness in all things Associative at that point 16:37
16:39 molaf joined, yqt left, [Sno] left
TimToady well, if your MultiHash is anything like a relation, you still need an index with unique keys to offer any sort of efficiency 16:39
raydiak goes to rename the stray lib/MultiHash.pm in Math::Symbolic to lib/Math/Symbolic/MultiHash.pm 16:41
16:43 domidumont joined
zostay TimToady: correct, though Aritstotle's version of this in Perl 5 depends on grep rather than an index 16:44
so far i'm using his name Hash::MultiValue, but not at all porting it 16:45
TimToady tends to worry about scalability for built-in data structures...
zostay good
16:48 Sqirrel left, brrt joined 16:49 jepeway left
brrt wonders if YAPC::NA is anytime soon, perchance 16:50
16:50 jepeway joined
jdv79 isn't it next next week? 16:50
TimToady "soon" is a relative concept 16:51
jdv79 yeah, 6/8-10
16:51 Sqirrel joined, virtualsue left
flussence m: say * !~~ Int 16:52
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7rd6JDSqA9␤Variable '&infix:<!~~>' is not declared␤at /tmp/7rd6JDSqA9:1␤------> 3say * 7⏏5!~~ Int␤»
flussence m: say 2 !~~ Int
camelia rakudo-moar c2a57e: OUTPUT«False␤»
16:53 rba_ joined
TimToady m: say !(* ~~ Int) 16:53
camelia rakudo-moar c2a57e: OUTPUT«WhateverCode.new␤»
TimToady looks like a bug to me 16:54
also, calling & things variables seems a bit suboptimal
flussence Yeah, I was just about to say... that error message seems bizarre.
TimToady could at least be changed to say 'Function' if the sigil is & 16:55
and I'd tend to drop the quotes when there's a sigil anyway 16:56
16:56 maettu1 joined
TimToady if a symbol is already distinctive and a single word, there's little point in adding quotes 16:57
16:57 fhelmberger joined
timotimo "☺" 16:58
16:59 rba_ left, tinyblak left
TimToady m: say * X~~ Int 17:01
camelia rakudo-moar c2a57e: OUTPUT«False␤»
TimToady hmm
17:01 fhelmberger left
TimToady anyway, metas should probably follow the behavior of bare ~~ here 17:02
17:02 rba_ joined
TimToady worth an RT, I think 17:03
smls rename("nonexistent file", "foo") throws a rather unhepful "Cannot find method 'postcircumfix:<( )>'" locally...
17:04 rba_ left
jdv79 is that not in roast? rename i mean. 17:08
TimToady looks like not 17:09
17:09 Peter_R joined 17:16 espadrine left
TimToady hoelzro: re irclog.perlgeek.de/perl6/2015-05-29#i_10673773 the best approach I think is to test against the exception class, and then search the message for the existence of any specific information the error message ought to convey (such as variable or type names), without committing to the verbiage around the important data, which is up to the implementation 17:18
hoelzro TimToady: thanks; I'm not sure if the change in the error message for RT #125153 is something that should be enforced across implementations 17:20
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125153
17:20 brrt left
hoelzro ex. variable name suggestion for $nam if the lexical is called $name - is that roast-worthy? 17:20
TimToady suggestions, no, I wouldn't test those 17:21
17:21 brrt joined
hoelzro alright, I think my error message changes are on par with that, so I don't know if they're roast-worthy either 17:21
still. the check type + error message is a good thing to know for the future =) 17:22
17:23 yqt joined 17:25 [Sno] joined
smls can i somehow tell perl6-debug to step into built-in functions? 17:26
TimToady dunno 17:27
17:28 koo6 left
TimToady wrt error message testing, there are aspects to awesomeness that we can enforce (is the variable mentioned?), and aspects we cannot (is this the best way to communicate to the intended audience?), and we should not attempt to enforce those aspects awesomeness that should be enforced culturally instead 17:28
smls or, asked another way: what is the best way to debug a rakudo bug like the incorrect error message mentioned above?
TimToady that's usually solved via grep :)
smls hrm 17:29
TimToady or ack, or some such
I'd look for sub.rename
smls I can find the rename sub & method in the code 17:30
just don't immediately see what's wrong with it
TimToady --ll-exception?
smls It calls nqp::rename (which, when called directly, throws a useful "file not found" error)
and then it has a CATCH { default {}} block for turning that into a P6 exception 17:31
TimToady: Ah yes, that looks like it might help 17:32
17:32 FROGGS joined
smls TimToady: "sub.rename" -- nice trick with the dot to avoid having to shell-quote ;) 17:35
17:37 larion left
TimToady oh, on error message, I see I'm mostly just repeating what [Coke]++ said already :) 17:37
17:38 skids left 17:39 skids joined, skids left
timotimo smls: perl6-debug depends on compiling the code with a special compiler that puts a bunch of hooks in place so that stepping and stuff work 17:39
you'd have to have a CORE.setting.debug or something for that to work properly
but the setting is the setting
there's always a lot of trickyness involved in having code work so early
so i have no idea fi a hooked-up version of the core setting is able to function 17:40
TimToady at some point in the distant future, we'll rewrite the compiler and setting in Pure Perl 6, but not before the optimizer gets a heck of a lot better
17:41 koo6 joined
timotimo i'm still amazed you think that's possible :) 17:41
17:42 Guest84293 is now known as grondilu
TimToady I don't, but I plan to do it anyway... :) 17:42
17:42 grondilu left, grondilu joined
timotimo mhm 17:42
17:44 AlexDaniel joined 17:46 skids joined
jdv79 how does one edit and run the setting? 17:47
TimToady masak: irclog.perlgeek.de/perl6/2015-05-29#i_10674716 is several questions rolled into one. So I will give you three answers. Yes, arbitrary categories like trait_mod should be macroable. Mebbe, but sometimes we have to put restrictions on redefinition of existing symbols sometimes. No, I still plan to kill the 'macro' keyword if at all possible. :) 17:48
FROGGS jdv79: edit rakudo/src/core/*.pm, make install, and then test 17:49
jdv79: though it is often possible to augment a built in class to test a patch
TimToady
.oO(Go not to Men for advice, for they will say 'Yes' and 'No' and 'Mebbe'.)
17:50
timotimo man.
17:55 pdcawley joined 17:56 grondilu left 18:00 tinyblak joined 18:05 andreoss left, tinyblak left
dalek kudo/nom: c189a6e | smls++ | src/core/IO/Path.pm:
Fix typo in IO::Path.rename

This cause a bogus "Cannot find method 'postcircumfix:<( )>'" exception to be thrown when trying to rename a nonexistent file, instead of returning the correct Failure.
18:06
18:07 skids left
jdv79 smls: where's a test for that:( 18:08
i meant :)
smls alright, i'll add one
FROGGS smls++
jdv79 i'll do a fuller rename test file later if nobody else does 18:09
smls jdv79: Or, you could teach me how to do it 18:12
is it possible that we don't have rename() tests yet at all? 18:13
jdv79 i didn't see any. you'd think there would be a S32-io/rename.t right? 18:14
but i was gonna go out and do that later
FROGGS there is not a single test for rename() :o( 18:18
smls also not for move()
Should I replicate the existing copy.t as move.t and rename.t, or is there a better way to do it (i.e. with less duplication) 18:20
18:20 diana_olhovik joined
moritz for <move rename> -> $method { ... } 18:20
18:21 rba_ joined
smls but is it good 'roast' practice to test several things together like that? 18:22
18:23 molaf left 18:24 skids joined 18:25 molaf joined
brrt how to get the exception object thrown by die? 18:29
18:33 amurf joined
hoelzro brrt: CATCH? 18:34
brrt yes, and then?
smls inside CATCH { default {} } the exception object is available in $_
brrt ah, ok
moritz or try dangerous(); say $! 18:36
brrt outside of catch it's in $!? aha 18:37
timotimo it's in $! inside of catch, too, but it's also in $_, because that's convenient
right?
18:38 amurf left
[Coke] m: try { die 'barf' ; CATCH { default { say $_, $!} } }; say $! 18:38
camelia rakudo-moar c2a57e: OUTPUT«barf␤ in block <unit> at /tmp/FqcHWErwUF:1␤Nil␤barf␤ in block <unit> at /tmp/FqcHWErwUF:1␤␤»
timotimo oh, huh? 18:39
TimToady it is a common misconception that $! is set inside the handler, but think about if you have nested handlers, you want the inner $! to reflect the innerer handler's result 18:43
so $! is not actually set till you leave the handler 18:44
m: try { die 'barf' ; CATCH { default { try die "rolf'; say $!} } }; say $! 18:45
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KYXoAbcfAv␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/KYXoAbcfAv:1␤------> 3lt { try die "rolf'; say $!} } }; say $!7⏏5<EOL>␤ expecting any of:␤ post…»
TimToady m: try { die 'barf' ; CATCH { default { try die 'rolf'; say $!} } }; say $!
camelia rakudo-moar c2a57e: OUTPUT«rolf␤ in block at /tmp/EWqaaOKnCO:1␤ in block at /tmp/EWqaaOKnCO:1␤␤barf␤ in block <unit> at /tmp/EWqaaOKnCO:1␤␤»
timotimo thank you, TimToady 18:46
18:51 pierrot left 18:57 Ven joined 18:59 rindolf joined
rindolf Hi all. 18:59
19:01 itz2 joined
timotimo ohai 19:01
19:06 grondilu joined
grondilu I'm running 'sudo apt-get install rakudo' on my raspberry pi :) 19:06
it's with the parrot backend though. But it's a start.
[Coke] is building from source an option? 19:07
grondilu it is. But I wanted to try the binary first.
it works apparently. Quite slow, though. 19:09
$ time perl6 -e 'say "hi"'
19:09 itz2 left
rjbs Whatever you get from aptitude is going to be /waaaay/ slower than building from source on MoarVM. 19:10
grondilu: I'm dyin' to hear the output of that time, though.
grondilu real 0m13.119s
vendethiel :D
rjbs Here, I get 0.10s user 0.05s system 46% cpu 0.327 total
vendethiel real 0.503
grondilu I'm going to try compiling rakudo, MoarVM and all that stuff now. 19:11
19:11 rindolf left, itz2 joined 19:12 dwarring joined, itz2 left, spider-mario joined 19:13 pierrot joined
timotimo i'm pretty sure rakudo-p should be a bit faster than 13 seconds for startup and "say hi" 19:13
grondilu $ perl6 --version 19:14
This is perl6 version 2012.01 built on parrot 4.0.0 revision 0
so, a dinosaur 19:15
TimToady it's pining for Pangaea 19:16
19:16 diana_olhovik__ joined 19:17 diana_olhovik left
timotimo holy hell 19:17
vendethiel oh my.
timotimo that's ... amazing 19:18
19:18 brrt left
timotimo more than 3 years? 19:18
RabidGravy I've just noticed on Linux $*KERNEL.release and $*KERNEL.version are both the same
grondilu and yet I had just run 'apt-get update' just before. 19:19
rjbs I don't think anybody is worrying about keeping apt's version up to date.
it's such a very fast-moving target
grondilu now runs 'perl Configure.pl --gen-moar --gen-nqp --backends=moar --prefix /usr/local/'
RabidGravy /usr/bin/perl6 -v 19:20
This is perl6 version 2015.04 built on MoarVM version 2015.04
on fc21
19:21 mj41 joined
mj41 m: say Uni.new(0x2680+(0..5).roll).Str 19:21
camelia rakudo-moar c2a57e: OUTPUT«⚁␤»
grondilu the Pi is a cool device. I could make an install with SSH, no screen nor keyboard. 19:22
RabidGravy It does rather take a long time to compile rakudo moar on it though 19:24
19:24 skids left
grondilu even with the Pi 2? 19:29
I have the Pi 2 model B. I'm not sure but I think it's not much slower than my EeePC
19:30 Ven left
RabidGravy I have an original one 19:32
grondilu ouch
smls jdv79: Does this look OK? github.com/perl6/roast/pull/61 19:33
grondilu make: /usr/local/bin/moar: Command not found
I did put --gen-moar in the options though.
FROGGS grondilu: does it continue?
because that msg is printed when it checks if there already is a moar, to e.g. use it or pull config flags from 19:34
grondilu no, it stopped. But there was a previous error.
Cannot chmod 755 /usr/local/bin/moar:No such file or directory at /usr/share/perl/5.14/ExtUtils/Command.pm line 274.
So it did build moar but could not chmod it for some reason. 19:35
I know. I don't have writting write on this folder.
So my bad.
.-2s/write/right/ 19:36
though normally it should not try to do it unless I explicitely target 'install' 19:37
I remember now. On my PC I had to create a group for writing access on /usr/local. That's not clean. 19:38
ideally we should have a different configure and install for the backends and for rakudo. 19:39
and the standard ./configure ... ; make && make install procedure for each. 19:40
19:40 spider-mario left
RabidGravy you can 19:40
19:40 Foxcool left 19:42 skids joined, spider-mario joined 19:43 diana_olhovik__ left 19:44 rba_ left 19:46 diana_olhovik joined
moritz the --gen-moar is just a shortcut 19:46
you can cd MoarVM; perl Configure.pl --prefix=...; make; make install
cd nqp; perl Configure.pl --backends=moar --prefix=...; make; make install
cd rakudo; perl Configure.pl --prefix=...; make; make install 19:47
19:49 panchiniak joined
grondilu oh, ok 19:50
too late though. I noticed /usr/local was in the 'staff' group so I added myself to it. 19:52
19:53 itz2 joined 19:55 panchiniak left 20:06 SevenWolf joined 20:09 mj41 left 20:10 SevenWolf left 20:13 SevenWolf joined 20:16 pmurias joined
pmurias if the macro keyword is going to be killed what will replace it? 20:16
smls
.oO( sub my-macro (Perl6::Ast $foo) is macrotic { ... } )
20:18
geekosaur for some reason "macrotic" feels akin to "necrotic" 20:20
(whereas "lexotic" doesn't...) 20:21
jdv79 smls: looks better than nothing
skids
.oO(macroliscious)
20:22
smls jdv79: I'll merge, and then you can add improvements, OK? 20:23
jdv79 should probably excercise this "createonly" option but again, something
sure
i created a ticket for it so i probably won't forget
dalek ast: d188cc1 | smls++ | S32-io/rename.t:
Add rename.t
ast: fce5bf9 | (Sam S)++ | S32-io/rename.t:
Merge pull request #61 from smls/master

Add rename.t
jdv79 thanks
20:24 darutoko left
masak pmurias: the `macro` keyword is getting killed!? why? 20:25
nobody tells me these things :P
also, if it's getting killed and the first question is "what will replace it", then... again, why? :)
smls And here I thought masak was the most informed person on Perl 6 macros :P
masak until a few minutes ago, so did I! :P
20:25 diana_olhovik left
masak pmurias: more seriously though, I don't think the macro keyword is going anywhere. 20:28
I think the biggest change is to the semantics of things. I think quasis will end up being less central than they are now.
'night, #perl6 20:30
20:32 lizmat left 20:36 Foxcool joined 20:40 vendethiel left
pmurias masak: I saw TimToady mention "No, I still plan to kill the 'macro' keyword if at all possible" 20:42
masak: in todays backlog
20:43 vendethiel joined
grondilu ok, I have compiled rakudo on the Pi :) 20:46
$ time perl6 -e 'say "hi"'
real 0m1.462s
ugexe it will compile on a rpi1 as well 20:48
but takes like 23 hours to run the smoke tests
RabidGravy it took me about two hours to build it just mow 20:49
[jonathan@bananaman ~]$ time perl6 -e1 20:50
real0m2.988s
20:50 jferrero left, jferrero joined
ugexe 4xrpi2 perl6 smoke test cluster with an rpi1 master/nas >:) 20:52
i.imgur.com/fNkU7u3.jpg
20:53 jferrero left
RabidGravy nice one 20:53
20:54 jferrero joined
FROGGS ugexe++ 20:55
sweet :o)
20:55 gtodd left
jdv79 where are "post constraints" in the docs? 20:55
20:56 domidumont left
ugexe router bricked about a month back, hence no test reports in awhile from it. but it will be running again soon 20:57
jdv79 actually, "Signatures as constraints on variables" is what i'm looking for
20:58 fhelmberger joined, skids left
hoelzro jdv79: could you provide some more information? I'm not exactly sure what you're getting at =/ 20:59
jdv79 m: my $a (); 21:00
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pl1di1GCcD␤Signatures as constraints on variables not yet implemented. Sorry. ␤at /tmp/pl1di1GCcD:1␤------> 3my $a ()7⏏5;␤»
jdv79 this diff is kinda weird:
m: for my $a ();
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HHF6xS0YoT␤This appears to be Perl 5 code␤at /tmp/HHF6xS0YoT:1␤------> 3for 7⏏5my $a ();␤»
jdv79 m: for my $/ ();
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LLgHmVE2Cg␤Signatures as constraints on variables not yet implemented. Sorry. ␤at /tmp/LLgHmVE2Cg:1␤------> 3for my $/ ()7⏏5;␤»
grondilu realizes he could take a pic as well 21:01
21:03 jferrero left, jferrero joined, jferrero left, jferrero joined
jercos m: FatRat.new(229891293, 2**20).base-repeating(10) 21:04
camelia ( no output )
jercos m: FatRat.new(229891293, 2**20).base-repeating(10).say
camelia rakudo-moar c2a57e: OUTPUT«219.24142169952392578125 ␤»
dalek blets: f157964 | (Herbert Breunung)++ | docs/appendix-b-grouped.txt:
adding set ops
21:05
blets: 67d0350 | (Herbert Breunung)++ | docs/ (3 files):
Merge branch 'master' of github.com:perl6/tablets

just upppll.
hoelzro that's a new feature to my eyes! 21:08
21:11 JustThisGuy joined 21:14 JustThisGuy left 21:27 larion joined 21:31 JustThisGuy_ joined
JustThisGuy_ Hi all! I'm just starting to learn Perl 6, and I have a question about command line argument parsing. 21:31
jercos Many answers can be found here. What kind of inquiry in particular did you need answered? :) 21:32
JustThisGuy_ I'm trying to use named parameters in conjunction with a list at the end. 21:33
This is what my MAIN signature looks like: sub MAIN(Str :$author_name!, Str :$distro_name is copy, Str :$email_address!, Str :$template_path!, *@module_names)
I tried using just @module_names, but I kept getting the usage. 21:34
With the slurpy param, it works, but the usage and using it allows there to be 0 @module_names. I want to require at least one. I'm I approaching this the wrong way? 21:35
japhb JustThisGuy_: perhaps '*@module_names where +* > 0'? 21:36
JustThisGuy_ I also searched for examples, and couldn't find any.
Ah! that makes sense! Thanks japhb! I'll give that a try. 21:37
That does fix it. The usage still shows it as optional, but that's a minor nit pick I guess... 21:40
Usage: create_module --author_name=<Str> --email_address=<Str> --template_path=<Str> [--distro_name=<Str>] [<module_names> ...] 21:41
21:42 lizmat joined
japhb There's a long-standing TODO to fill in the last bits that would allow overriding the auto-generated usage (and change the parsing rules), you could always hack on that. ;-) 21:43
JustThisGuy_ Well I can take a look at it anyway. :) 21:44
japhb m: sub want-at-least-one(*@foo!) { say "Got {+@foo}" }; want-at-least-one(5, 12); want-at-least-one(42); want-at-least-one();
camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Geb4yt4QAQ␤Missing block␤at /tmp/Geb4yt4QAQ:1␤------> 3sub want-at-least-one(*@foo7⏏5!) { say "Got {+@foo}" }; want-at-least-␤»
japhb Awww, too bad
JustThisGuy_ Ha! I actually tried that before I got on here. 21:45
japhb .ask TimToady Why doesn't '*@foo!' in a signature mean "slurp one or more"? Was that a conscious decision or just not yet defined to have a meaning? 21:46
yoleaux japhb: I'll pass your message to TimToady.
japhb JustThisGuy_: A good guess. :-)
JustThisGuy_ I also learned that $?USAGE is not available at runtime.
japhb JustThisGuy_: It's supposed to be. But at the time I wrote that code, I didn't understand how to set a '$?' variable.
JustThisGuy_ That's cool. I'm just learning as I go here. 21:47
Thanks for the help!
japhb JustThisGuy_: See src/core/Main.pm in Rakudo, if you're curious. :-)
You're welcome!
JustThisGuy_ Thanks! I'll have a look... 21:48
21:50 vendethiel left 21:51 JustThisGuy_ left 21:53 rba_ joined
timotimo o/ 22:00
lizmat std: sub a(*@a!) { say @a }; a 22:03
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Unable to parse signature at /tmp/x2HJDn3wXL line 1:␤------> 3sub a7⏏5(*@a!) { say @a }; a␤Couldn't find final ')'; gave up at /tmp/x2HJDn3wXL line 1:␤------> 3sub a(*@a7⏏5!) { say @a }; a␤ expecting any of:␤ constrai…»
lizmat std: sub a(+@a) { say @a } # in a way that makes more sense to me 22:04
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Malformed parameter at /tmp/j9rM5NljYn line 1:␤------> 3sub a(7⏏5+@a) { say @a } # in a way that makes m␤ expecting any of:␤ name␤ new name to be defined␤ parameter␤ routine_def␤ signature␤Parse failed␤FAILED 00:00…»
lizmat std: sub a(?@a) { say @a } # zero or 1 parameter ? 22:05
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Malformed parameter at /tmp/tR27qjt_5G line 1:␤------> 3sub a(7⏏5?@a) { say @a } # zero or 1 parameter ?␤ expecting any of:␤ name␤ new name to be defined␤ parameter␤ routine_def␤ signature␤Parse failed␤FAILED 00:00…»
22:05 FROGGS left 22:07 FROGGS joined
AlexDaniel m: say 'ab' ~~ m/<?after 'a'>b/ # thanks god I will not have to look up the correct syntax every time I want to use lookaround... 22:07
camelia rakudo-moar c2a57e: OUTPUT«「b」␤»
AlexDaniel m: say 'ab' ~~ m/<after 'a'>b/ 22:08
camelia rakudo-moar c2a57e: OUTPUT«「b」␤ after => 「」␤»
AlexDaniel hm
after without ? does not make any sense, right? 22:09
22:09 vendethiel joined
AlexDaniel if yes, then this has to be fixed, I guess: en.wikipedia.org/wiki/Perl_6_rules...it_changes 22:09
if not, then what is going on? 22:10
22:17 kaare_ left 22:18 larion left 22:20 gfldex left
tony-o_ timotimo: you live in germany, yea? can i pm you 22:23
22:23 smls left 22:33 vendethiel left 22:36 FROGGS left
AlexDaniel How can I match stuff between rules? I want something like [ <somerule> || <anotherrule> || (.+) ]* however, that dot matches every character separately, but I want it to eat everything until some rule is encountered. 22:37
dalek kudo/nom: 5f91c78 | hoelzro++ | src/core/Buf.pm:
Simplify Buf.push code

Seriously, what was I thinking writing that?!
22:43
kudo/nom: f5a0520 | hoelzro++ | src/core/Buf.pm:
Implement Buf.push(@list-of-items)

Using code and ideas stolen from src/core/native_array.pm
kudo/nom: c269124 | hoelzro++ | src/core/Buf.pm:
Implement Buf.push for variadic arguments
ast: 59cbe8d | hoelzro++ | S03-operators/buf.t:
Add tests for pushing a list of items to a Buf
ast: 0a3a677 | hoelzro++ | S03-operators/buf.t:
Test Buf.push with variadic arguments
hoelzro AlexDaniel: I'm wondering if [ <somerule> || <anotherrule> ]* % (.+) would work 22:44
rjbs hoelzro: ooh, will have to rebuild once I'm at home and on AC power 22:48
22:49 RabidGravy left 22:52 pmurias left 23:00 spider-mario left
AlexDaniel hoelzro: hm, it does kinda work, but I get one string for every backtracking step 23:05
so it goes like: 0 => 「t」 0 => 「te」 0 => 「tes」 0 => 「test」 0 => 「test 」 23:06
if I use (.+?), of course. Otherwise it goes from the other side
23:08 skids joined
AlexDaniel actually, should it really do that? Isn't it a bug? I mean, why would I care what was inside of that capture group during the backtracking? 23:10
23:10 itz2 left
AlexDaniel m: say 'rule1 foo rule2 bar' ~~ /( 'rule1' || 'rule2' )* % (.+?)/ 23:14
camelia rakudo-moar c2a57e: OUTPUT«「rule1 foo rule2」␤ 0 => 「rule1」␤ 1 => 「 」␤ 1 => 「 f」␤ 1 => 「 fo」␤ 1 => 「 foo」␤ 1 => 「 foo 」␤ 0 => 「rule2」␤»
AlexDaniel m: say 'rule1 foo rule2 bar rule1' ~~ /( 'rule1' || 'rule2' )* % (.+?)/ 23:15
camelia rakudo-moar c2a57e: OUTPUT«「rule1 foo rule2 bar rule1」␤ 0 => 「rule1」␤ 1 => 「 」␤ 1 => 「 f」␤ 1 => 「 fo」␤ 1 => 「 foo」␤ 1 => 「 foo 」␤ 0 => 「rule2」␤ 1 => 「 」␤ 1 => 「 b」␤ 1 => 「 ba」␤ 1 => 「 bar」␤ 1 => 「 bar 」␤ 0…»
AlexDaniel does it look ok? 23:16
23:16 telex left 23:17 kurahaupo1 joined 23:18 telex joined
hoelzro hmmm 23:19
that seems reasonable, I think 23:20
AlexDaniel hoelzro: why?
hoelzro ok, scratch that
I wasn't looking closely enough, it seems =/
I'm not sure what else to try, tbh 23:21
AlexDaniel hoelzro: I'm confused, this actually looks like a bug to me. What do you think?
or maybe there is some trickery going on that I should really understand for this to make any sense to me? 23:22
hoelzro that output means sense to me
so let's talk about when the cursor has just parsed rule1
so .+? is tried 23:23
it matches ' ', great
it *could* match ' f' (and more), but it's not greedy, so it stops
then the 'rule1' || 'rule2' part is tried, and fails
AlexDaniel but if it matched 'rule1 foo rule2 bar rule1' (the whole string!), then why would it list something that is irrelevant to this match?
hoelzro so .+? tries taking another char
what part is irrelevant? 23:24
hoelzro will be going back and forth from the computer for a bit, incoming house guests
AlexDaniel anything that is not ' foo ', because you can't match that string with ' fo' 23:25
23:25 tinyblak joined
AlexDaniel especially if you add ^ $ around that regex 23:26
hoelzro I do agree that it's weird that all of the intermediate attemps are included in the resulting match
AlexDaniel all these atempts are ok, it makes sense. But I don't understand why some internal stuff is spewed into the match object 23:27
23:29 kurahaupo1 left, tinyblak_ joined 23:33 tinyblak left
hoelzro yeah, that's kinda weird. 23:36
AlexDaniel ok, gonna report that then 23:41
23:42 vendethiel joined
hoelzro :+1: 23:43
23:43 koo6 left
AlexDaniel hm, what's that? And also, what is this nick++ thing about? 23:46
hoelzro oh, that's a thumbs up 23:48
and ++ is giving people karma for doing a good job
so AlexDaniel++ for trying things out and reporting bugs =) 23:49
AlexDaniel oh well, who cares 23:50
hoelzro: does any bot log that stuff? Is there any table with top scores or something like that? 23:51
hoelzro I'm not sure 23:52
yoleaux: karma
.help
yoleaux hoelzro: I'm yoleaux. Type .commands to see what I can do, or see dpk.io/yoleaux for a quick guide.
hoelzro .commands 23:53
yoleaux Commands are divided into categories: services, general, api, demos, admin. Use .commands <category> to get a list of the commands in each.
hoelzro .commands general
yoleaux Commands in general: ask, at, botsnack, buck, bytes, choose, in, msg, on, pick, ping, seen, supercombiner, t, tell, to, tz. Use .help to get information about them.
synbot6 om nom nom
hoelzro .commands services
yoleaux Commands in services: acronym, add-command, botsmack, command-help, del-command, dety, distance, geo, insult, leo, metar, moon, ngrams, o, oed, py3, r2r, roll, rot13, suggest, swhack, thesaurus, tw, twho, ud, weather, yi. Use .help to get information about them.
AlexDaniel .help twho 23:54
yoleaux Get info on a Twitter user
23:57 Peter_R left