»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
lue I can't say I understand that "useless use" warning :) 00:00
00:04 kurahaupo left
Mouq TimToady: Very ooc, how would you feel about method lol taking an argument that specifies the size of the lists it is the list of 00:05
?
TimToady that sounds like a different thing to me 00:06
Mouq e.g. (^10).lol(2) eqv lol($(0,1),$(2,3),$(4,5),$(6,7),$(8,9))
lue Mouq: sounds like a case for .map , or maybe even .tree? 00:07
TimToady 'druther name it something else
lue r: say (^10).map({($^a, $^b)}).perl
camelia rakudo-{parrot,jvm,moar} 22ca11: OUTPUT«((0, 1), (2, 3), (4, 5), (6, 7), (8, 9)).list␤»
Mouq lue: But that map example isn't really extensible
TimToady well, a more interesting case is overlapping
(1,2),(2,3),(3,4)... 00:08
lue .partition($size, $stride) ?
Mouq TimToady: (^10 »xx» 2)[1.*-1]
lue (^10).partition(2, 1) -> ((0,1),(1,2),(2,3),...) 00:09
Mouq doesn't see an easy way to grab by X out of a list
partition would be nice
I'd be so Cool with that
lue I wonder what would happen when $stride > $size (probably just skip the values, so you could get every other elem with @list.partition(1,2)) 00:10
TimToady keeps wanting a way to say "bind the rest of this signature but don't eat args permanently", kinda like )>
the name "partition" doesn't do it for me 00:14
lue TimToady: yeah, me neither. It was merely the first thing that came to mind for "separate this list into a bunch of lists... like HDD partitions... partition!" 00:16
TimToady except those are all exclusive
lue (that's the condensed version of the logic, anyway)
TimToady the whole idea of a partition is you put things on one side or the other, not both
it's more like .rotor 00:17
lue true. (Note that I came up with the name before you mentioned the overlapping case :P)
TimToady or the underapping case you came up with :P
*underlapping
lue Another possibility for the args is .rotor($stride, *@sizes), (for varied (cycling) sizes), .rotor($size, *@strides), or... maybe that **@arg thing would come in handy here, or perhaps I'm overthinking the function's utility :) 00:21
TimToady not general enough 00:22
.rotor( $take1, $skip1, $take2, $skip2, $take3, $skip3... )
where skip can be negative
so overlap is .rotor(2,-1)
or maybe interleave relative strides 00:24
that would work better for taking a fibonacci slice, for instance
lue I'm almost tempted to say a Hash[Int,Int] to enforce evenness in the arg count :)
(except that wouldn't work at all; Array[Pair[Int,Int]] then) 00:25
TimToady another common pattern would be triangular arrays
lue actually, I should think .rotor(2) would be equal to .rotor(2,0) in your give/take case of args 00:27
Mouq TimToady: Mayhaps $take and $skip could be optional Callables? Esp. WhateverCodes
Where the argument(s) to the Callable, if it requires any, are either the index or the last X sizes 00:29
TimToady about to reinvent the sequence operator here, I suppose
Mouq TimToady: YEah
*Yeah 00:30
But it's still cleaner-looking to me than:
m: my @a = ^10; .say for {$(@a.shift xx ++state$)}...{@a} 00:31
camelia rakudo-moar 22ca11: OUTPUT«===SORRY!=== Error while compiling /tmp/ky4ojTqGh_␤Unsupported use of $) variable; in Perl 6 please use $*EGID␤at /tmp/ky4ojTqGh_:1␤------> = ^10; .say for {$(@a.shift xx ++state$)⏏}...{@a}␤»
Mouq m: my @a = ^10; .say for {$(@a.shift xx ++state$ )}...{@a}
camelia rakudo-moar 22ca11: OUTPUT«0␤»
Mouq Hm..
m: my @a = ^10; .say for {$(@a.shift xx ++state$ )}...{!@a}
camelia rakudo-moar 22ca11: OUTPUT«0␤1 2␤3 4 5␤6 7 8 9␤===SORRY!===␤Element shifted from empty list␤»
Mouq m: my @a = ^10; .say for {$(@a.shift xx ++state$ )}...{not @a-1}
camelia rakudo-moar 22ca11: OUTPUT«0␤1 2␤3 4 5␤6 7 8 9␤===SORRY!===␤Element shifted from empty list␤»
Mouq m: my @a = ^10; .say for {$(@a.shift xx ++state$ )}...^{not @a-1}
camelia rakudo-moar 22ca11: OUTPUT«0␤1 2␤3 4 5␤6 7 8 9␤===SORRY!===␤Element shifted from empty list␤»
lue I think .rotor($take, $skip, $take, $skip) is good enough for .rotor 00:32
Mouq Oh, my list is too small :P
m: my @a = ^10; .say for {$(@a[^4 »+» 4*++state$] )}...{@a} 00:33
camelia rakudo-moar 22ca11: OUTPUT«===SORRY!=== Error while compiling /tmp/8WFriRN_X2␤Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION␤at /tmp/8WFriRN_X2:1␤------> = ^10; .say for {$(@a[^4 »+» 4*++state$]⏏ )}...{@a}␤»
Mouq m: my @a = ^10; .say for {$(@a[^4 »+» 4*++state$ ] )}...{@a}
camelia rakudo-moar 22ca11: OUTPUT«4 5 6 7␤»
Mouq Anyway... 00:34
It's harder than it should be is my point
m: my @a = ^10; .say for $(@a[^4 »+» 4*(state$)++ ]) xx @a/4
camelia rakudo-moar 22ca11: OUTPUT«0 1 2 3␤4 5 6 7␤»
Mouq m: my @a = ^100; .say for $(@a[^4 »+» 4*(state$)++ ]) xx @a/4 00:35
camelia rakudo-moar 22ca11: OUTPUT«0 1 2 3␤4 5 6 7␤8 9 10 11␤12 13 14 15␤16 17 18 19␤20 21 22 23␤24 25 26 27␤28 29 30 31␤32 33 34 35␤36 37 38 39␤40 41 42 43␤44 45 46 47␤48 49 50 51␤52 53 54 55␤56 57 58 59␤60 61 62 63␤64 65 66 67␤68 69 70 71␤72 73 74 75␤…»
Mouq m: my @a = ^100; .say for $(@a[^4 »+» 4*(state$)++ ]) xx @a/4+4
camelia rakudo-moar 22ca11: OUTPUT«0 1 2 3␤4 5 6 7␤8 9 10 11␤12 13 14 15␤16 17 18 19␤20 21 22 23␤24 25 26 27␤28 29 30 31␤32 33 34 35␤36 37 38 39␤40 41 42 43␤44 45 46 47␤48 49 50 51␤52 53 54 55␤56 57 58 59␤60 61 62 63␤64 65 66 67␤68 69 70 71␤72 73 74 75␤…»
TimToady std: sub foo(@a[4]) { [@a] }; .say for map &foo, ^8 00:37
camelia std e347792: OUTPUT«ok 00:01 139m␤»
Mouq may have fixed the heredoc issue, btw ^_^
TimToady: :L 00:38
TimToady smoking isn't good for you 00:39
Mouq p6: sub foo(@a[4]) { [@a] }; .say for map &foo, ^8
camelia rakudo-jvm 22ca11: OUTPUT«Nominal type check failed for parameter '@a'␤ in sub foo at /tmp/tmpfile:1␤ in method reify at gen/jvm/CORE.setting:7627␤ in method reify at gen/jvm/CORE.setting:7490␤ in method reify at gen/jvm/CORE.setting:7490␤ in method reify at gen/jvm/C…»
..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Nominal type check failed in binding '@a' in 'foo'; got Int, needed Positional␤ at /tmp/tmpfile line 0 (foo @ 1) ␤ at <unknown> line 0 (KERNEL map @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2634 (GatherIterator.r…»
..rakudo-moar 22ca11: OUTPUT«cannot stringify this␤ in sub foo at /tmp/tmpfile:1␤ in method reify at src/gen/m-CORE.setting:7686␤ in method reify at src/gen/m-CORE.setting:7549␤ in method reify at src/gen/m-CORE.setting:7549␤ in method reify at src/gen/m-CORE.setting:76…»
TimToady or is that a toothpick?
camelia ..rakudo-parrot 22ca11: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead␤ in sub foo at /tmp/tmpfile:1␤ in method reify at gen/parrot/CORE.setting:7607␤ in method reify at gen/parrot/CORE.setting:7498␤ in method reify at gen/parr…»
TimToady yes, well, you'd probably want better syntax for binding N args, since this is really gonna want to bind a single array with 4 elems 00:40
and I'm guess .rotor or some such will end up a lot cleaner looking than trying to shoehorn extra semantics into binding 00:41
not to mention being more parameterizable 00:42
.oO(more argumentative?)
lue Wouldn't that be arguable? 00:43
(or alternatively parameterized) 00:44
dalek kudo/nom: e210385 | Mouq++ | src/Perl6/Grammar.nqp:
Adding `token starter` to q and qq messed up heredoc parsing

So we basically just delete them when it's actually a heredoc. integration/advent2012-day10.t no longer hangs, and passes with flying
  colors
kudo/nom: b55db03 | Mouq++ | / (3 files):
Merge branch 'nom' of github.com/rakudo/rakudo into nom
kudo/nom: ae2bc53 | Mouq++ | t/spectest.data:
Revert "Skip integration/advent2012-day(6|10).t for now"

This reverts commit 4a1e6a78adb179a33616601f415734dcf45c3a88.
00:45
Mouq lizmat++ 00:46
dwarring++ again for great tests :) 00:47
std: q:to/END/␤I'm not broken, am I?␤END 00:48
camelia std e347792: OUTPUT«===SORRY!===␤(Possible runaway string from line 2)␤Couldn't find delimiter for heredoc␤ at /tmp/me9BV5lgu7 line 3 (EOF):␤------> END⏏<EOL>␤Parse failed␤FAILED 00:01 121m␤»
Mouq std: q:to/END/␤I am broken, am I?␤END
camelia std e347792: OUTPUT«ok 00:01 121m␤»
Mouq :|
dalek d: ec3d853 | Mouq++ | STD.pm6:
Fix heredocs that contain a quote's standard starter
00:50
00:53 hoverboard joined
Mouq m: say "🚬".ord.succ.chr # Not smoking is clearly superiour to smoking, btw 00:58
camelia rakudo-moar 22ca11: OUTPUT«🚭␤»
Mouq m: say qq["\\c[NO SMOKING $_]" cmp "\\c[SMOKING $_]"].EVAL for Buf.new(+«comb /../,838977667976).decode 01:03
camelia rakudo-moar 22ca11: OUTPUT«More␤»
01:06 klapperl_ joined
TimToady I think I'd like to see macros at a higher level than AST, more like at the CST level 01:16
that is, at a more "documentary" level
with delayed evaluation of action routines 01:17
01:17 dmol joined
TimToady with control of exactly when the action routines are called on bits of the syntax tree 01:18
at the moment we tightly couple the syntax tree with the action routines, and that seems like a bit of a mistake sometimes 01:19
maybe we could have a mode where we annotate the concrete syntax tree with the action routines we *think* we would call, but they're overrideable/wrappable 01:20
01:22 dmol left
TimToady we also might be able to start sneaking in a fully bootstrapped Perl 6 parser at this point too 01:22
Mouq (lue++'s blog post brought up standardization of parts of the grammar; my two cents are that some parts of it should be standardized where people are going to be interfacing with the grammar, but as little as possible) 01:24
o/ #perl6
01:24 Mouq left
TimToady I think the categories are pretty standardized by now, so recognizing that something is "infix" or "term" is gonna be a non-problem from the standpoint of language change 01:27
01:28 FROGGS_ joined
lue Yeah, the tricky thing is the part after the colon :) 01:29
TimToady :sym< MyOp > is pretty straightforward
lue I suppose the problem of "niecza's name for the rule is different from rakudo's!" seems larger than it is. 01:31
TimToady well, there are various reasons we've been trying to converge on STD :)
lue :)
TimToady not that STD is really the end goal anymore, but it stands in for a "perfect" Perl 6 parser that, say, has a lot of the hash entries turned into object attributes of some sort, assuming we can sort out the classes/roles for that 01:33
01:34 sftp joined
TimToady maybe it's about time to write that new STD 01:34
lue The part about not having the AST and action methods so coupled is I think an important thing to keep in mind.
TimToady the CST you mean :)
we use "AST" in way too overloaded a fashion 01:35
I cringed at masak++'s 2nd step of AST -> AST
to me those should be considered two different types :)
lue Ah, so it should be ① Text -> CST, ② CST -> AST, ③ AST -> BC then?
TimToady and if we made as many passes on it as C# does, we'd run out of letters for the xASTs 01:36
lue Could $/ be considered a CST? 01:37
TimToady that's the general idea, yes 01:38
that doesn't mean we have to separate the parse pass from the CST -> AST pass all the time, only that it be possible to detangle them at need 01:39
so the immediate calling of the Action routine corresponding to a Match is just a degenerate case of something that walks any Match tree and makes sure all the Action routines are called 01:41
lue It does feel like we could accomplish a higher-level AST traversal if it were rather a CST traversal... 01:42
TimToady well, being called to dinner, so I'd better stop ignoring it... :) 01:43
lue later TimToady o/
01:45 kurahaupo joined
colomon darn, missed TimToady++ 01:48
colomon didn't have anything to say to him, mind you.
01:59 kurahaupo left
lue afk 02:00
02:02 hoverboard left 02:03 Sqirrel joined
TimToady colomon: that doesn't stop most of us from saying things :) 02:03
colomon :) 02:04
Though now that I think on it, Happy Easter!
TimToady likewise
since you'll get there first, tell me how it was :) 02:05
well, likely I won't be paying much attention tomorrow morning though...
02:31 xragnar_ joined, xragnar_ is now known as xragnar
colomon TimToady: I'll probably be too busy playing in the church orchestra to report before it reaches you. ;) 02:36
02:55 cognominal left, cognominal joined
TimToady a violin solo for me :) 02:58
not to mention the drums
03:13 sftp left 03:14 sftp joined 03:17 adu joined
lue TimToady: thinking about how macros and slangs and such could function, what do you think of this? gist.github.com/lue/95084d5800a6d5328115 03:19
(treating macros as a way to walk a CST in that case) 03:22
... now I know what the slang keyword should do.
TimToady naming a parameter $/ is insufficient to indicate its type, in my estimation 03:23
lue Updated the gist to show my crazy idea for the slang keyword 03:24
TimToady is a bit distracted at the moment, sorry... 03:25
lue that's fine
adu what does this mean "use of uninitialized value of type Any in string context"?
lue You used an uninitialized object of type Any in a stringy fashion :) 03:26
adu lol
lue If you're using moar, you're not getting as much info as you could (can't recall if JVM gives you a backtrace, but I know for sure Parrot does) 03:27
geekosaur it's an untyped undefined value, and you're trying to use it as a string. perl 5 lets that kind of thing go (with a warning if you've got that turned on as you always should); perl 6 is more pedantic about it
adu lue: I don't know what the output is on JVM and Parrot 03:29
lue adu: I was just suggesting that if you don't know where the problem lies already, then Parrot (and perhaps JVM) would give you a backtrace. 03:30
(r-m needs some help in the Telling You Where The Problem Is department) 03:31
adu I ran my test on MoarVM and it only took 45s, but I ran it on Parrot and JVM, and I stopped it after 2 minutes
maybe I should just start it now, then check when I wake up 03:32
03:32 raiph joined
lue If you're about to go to bed, it shouldn't hurt to do that :) 03:32
adu the test is throwing my C11 parser at parsing "int main() {return 0;}" 03:33
03:36 adu left
lue
.oO(maybe instead of "slang rule", it would be "srule", and then "slang" would be kept around as the way to specify things for $~ vars... 'my sregex' à la 'my regex' ?)
03:38
04:12 BenGoldberg left
lue .tell masak this might interest you: gist.github.com/lue/95084d5800a6d5328115 04:29
yoleaux lue: I'll pass your message to masak.
04:36 Psyche^ joined 05:03 raiph left 05:21 xenoterracide joined 05:43 xenoterracide left 05:49 logie_ left 05:50 avuserow joined 05:51 grep0r joined, zby_home joined 05:52 zby_home left
FROGGS_ TimToady: about `"bind the rest of this signature but don't eat args permanently", kinda like )>` 05:57
TimToady: would a combination with Whatever work? like a <* and *> in a signature? 05:58
06:02 gaussblurinc_ joined
moritz \o 06:06
FROGGS_ morning
06:17 rindolf joined 06:25 SamuraiJack_ joined 06:30 bjz joined 06:40 darutoko joined 06:57 raiph joined 07:09 raiph left 07:15 raiph joined
lizmat good *, #perl6! 07:30
07:40 vendethiel left
moritz \o FROGGS_, lizmat 07:46
the R* DBIish/t/05-mock.t failure is a precompilation bug
deleting the .jar files makes it pass
FROGGS_ moritz: were you able to golf it down to something? 07:52
moritz FROGGS_: I haven't tried yet 07:53
FROGGS_: are there known precompilation bugs on the JVM? 07:54
FROGGS_ moritz: no, the ones I know about were fixed 07:55
but we could query RT for these bugs and look for similarities
moritz RT #121319 is the only known precomp issue that a naive search found 07:59
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121319
07:59 pippo_ joined
moritz which looks like it doesn't fit the problem at all 08:00
08:13 gaussblurinc_ left 08:19 pippo_ left 08:20 molaf joined
FROGGS_ moritz: I bet it is the gather/take 08:23
moritz tries to get rid of the gather/take 08:34
masak good antenoon, #Perl6 08:36
yoleaux 04:29Z <lue> masak: this might interest you: gist.github.com/lue/95084d5800a6d5328115
moritz perlpunks.de/paste/show/535386f0.739.216 # does this look reasonable?
masak today's autopun spotting: twitter.com/mikeisbrill/status/457...9778451458 08:37
moritz: looks reasonable, but there is lots of repetition between those two methods. 08:38
did you consider a helper sub to lift out the control flow?
08:44 denis_boyun_ joined
FROGGS_ moritz: at least it solves the precomp bug 08:45
m: my $i = 0; say do while $i++ < 10 { $i }
camelia rakudo-moar ae2bc5: OUTPUT«False␤»
FROGGS_ m: my $i = 0; say do while $i++ < 10 { say $i; $i } # I thought while can produce values like that? 08:47
camelia rakudo-moar ae2bc5: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤False␤»
FROGGS_ m: say do for ^10 -> $x { $x } # works for for but not for while :/ 08:49
camelia rakudo-moar ae2bc5: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
FROGGS_ if it would work for while it would happily replace the gather/take
masak if you ask me, it's a singularly bad idea to have loops collect/evaluate to lists of values. 08:50
it's a Nice Thing for a small number of use cases, but it slurps memory and perf for everyone. 08:51
FROGGS_ hmmm, I was thinking that at least in the current implementation gather/take is way more heavy than a nice while loop 08:52
and I can't imagine that a while loop is very expensive
08:52 Rotwang joined
FROGGS_ masak: especially when one wraps the while in gather/take like in the previous code of perlpunks.de/paste/show/535386f0.739.216 08:52
masak: and a for loop is just a map, and you would not argue that LIST.map --> LIST is a bad idea I guess? 08:54
I'd like to here something jnthn about the performance of the current implementation though 08:55
lizmat is there a reason we don't have a Benchmark module / sub yet ? 08:56
*why
FROGGS_ there is p6bench what timotimo uses... do you mean that or a built-in? 08:57
lizmat builtin, really 08:58
FROGGS_ how would you imagine this would be used?
masak FROGGS_: I've never fully subscribed to the notion of "a for loop is just a map". because to me, it isn't.
FROGGS_ masak: then we are back to QAST :o) 08:59
masak FROGGS_: in fact, if you try to be consistent in that way, then you have to make up a story for while loops too, or they would be awfully special.
lizmat FROGGS_: metacpan.org/pod/Benchmark 09:00
FROGGS_ for LIST { ... } is identical to LIST.map({...}) and in fact both produce identical QAST
dalek kudo/nom: b1ace93 | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Fix Supply::on for @supply case
09:01
09:02 pippo_ joined
FROGGS_ masak: well, we do not have the "map method form" of while, because for loops of a range/list of a certain size, which can happily be a thing (a range or array or list) 09:02
09:02 SamuraiJack_ left
FROGGS_ masak: a while/until loops as long as a condition holds... how do you make a thing out of that soyou can call methods on it? 09:02
s^/a\s// 09:03
damn, "loops" -> "loops loop"
masak m: my $i1 = 0; while $i1++ < 5 { say $i1 }; my $i2 = 0; (0..*).map({ last if $i2++ < 5; say $i2 }) 09:04
camelia rakudo-moar ae2bc5: OUTPUT«1␤2␤3␤4␤5␤»
masak er.
m: my $i1 = 0; while $i1++ < 5 { say $i1 }; my $i2 = 0; (0..*).map({ last unless $i2++ < 5; say $i2 })
camelia rakudo-moar ae2bc5: OUTPUT«1␤2␤3␤4␤5␤1␤2␤3␤4␤5␤»
avuserow github.com/avuserow/perl6-audio-taglib-simple # I wrote some bindings for taglib to read ID3v2 tags and stuff
masak seems to me all while loops are maps on 0..* in a sense. optionally with a 'last' thrown in for the condition. 09:05
FROGGS_ masak: I don't think that while loops have anything to do with 0..* 09:10
it is just about exception handlers that trigger to run the block if the condition is still true 09:11
so it is just check/run/check/run/...
avuserow++ # very niec! 09:12
nice* 09:13
masak: btw, what I really like about loops generating value: you have the thing you assign to and the list/condition you looping over near to each other 09:16
masak: and the perhaps bigger codeblocks follows
map in perl 5 gets ugly when the code block is big 09:17
because like in p5 regexes you have to look at the end to see what it is doing
masak FROGGS_: I don't think that for loops have much to do with maps.
FROGGS_: they may be as alike on the QAST level as they like; I use them for mostly different things. 09:18
largely, I use for loops for mutation and side effects, and maps to transform lists to lists.
if I need to do both at the same time, I consider that a code smell.
FROGGS_ ahh, now I see your point 09:19
09:20 Rotwang left
FROGGS_ hmmm, but we hand over callable code turn run something later/elsewhere and call that higher order programming and we tend to like that 09:21
I want to see control structures that produce values in the same way
masak during Rakudo's lifetime, for loops producing values has produced about 10x more grief than happiness, in my estimation. 09:22
FROGGS_ I just know a fraction of that lifetime :o) 09:23
raiph Is there a bot that says when new versions of Rakudo etc. are scheduled? 09:27
(I recall moritz creating one)
FROGGS_ raiph: have a look at the release guide
but there is no bot AFAIK
09:29 dmol joined 09:32 Alina-malina joined
masak interestingly, 'println!' is a macro in Rust. this allows the compiler to check the format string against the number and types of arguments at compile time. that feels oddly right somehow. 09:34
(and it's a good example of a useful use of macros) 09:35
let's try on a new slogan: "if you're not generating, analyzing or typechecking code, then macros are not what you want". 09:36
dalek kudo/nom: 33ea6e5 | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Implement index feature for @supply

This allows the more/done/quit to determine which supply they were called for.
09:41 hummeleB1 joined 10:07 rindolf left 10:13 raiph left 10:21 kurahaupo joined 10:26 kaare_ joined
jnthn masak: Note that loops of any kind at statementlist level these days never produce values, even if as last statemnet of the block. Keep up! 10:28
lizmat given a block, how can I find out the number of parameters it takes ? 10:29
$b.signature.foo I guess, but what foo?
moritz .arity/.count
masak jnthn: :) 10:30
moritz m: say -> $a, $b? { }.arity
camelia rakudo-moar b1ace9: OUTPUT«1␤»
masak jnthn: I know that.
moritz m: say -> $a, $b? { }.count
camelia rakudo-moar b1ace9: OUTPUT«2␤»
jnthn masak: Ah, ok :)
moritz lizmat: ^^
masak jnthn: was just arguing against having more of the madness, again.
colomon masak on for vs map, +1. if that's now official p6, \o/
FROGGS_ jnthn: and while loops are intended to produce values but are NYI that way, right?
lizmat moritz++
jnthn FROGGS_: Right, they never produce them at present. 10:31
FROGGS_: But by spec they should if not in statement list context, yes.
FROGGS_ jnthn: and more importantly for me: are for loop/while loops that produce values cheaper than gaver/take?
gather*
jnthn FROGGS_: Depends how we implement them, which depends on batching semantics, but working those out could make gather/take cheaper too. 10:32
gather/take's efficiency also varies widely by backend.
FROGGS_ I mean, I do like gather/take, but it feels kinda obscure to use it if I only have a single branch in my block that will produce values
ahh, k
moritz I like it too, unless it breaks in precomp :-) 10:33
FROGGS_ hehe, yeah :o)
jnthn moritz: I haven't seen a case where gather/take broke in precomp ever.
FROGGS_ jnthn: that is/was the DBIish r-j* bug
moritz FROGGS_: did you verify that assumption?
jnthn The only loop-related fail I saw in pre-comp of late was the while loop with pointy block issue I fixed in Moar's code-gen.
Which was why 05-mock.t failed in DBIish on Moar.
FROGGS_ moritz: yes, your patch makes the tests pass
moritz FROGGS_: \o/ 10:34
FROGGS_ jnthn: ohh, then this is the same issue on jvm
jnthn uh, did the moritz patch eliminate the while loop too?
FROGGS_ yes
it is a (0..*).map... now
moritz - gather while self.fetchrow-hash -> %h {
- take %h.item;
- }
jnthn Then it'll be same issue, I imagine, given that I think JVM has similar approach to Moar on compiling those.
Yeah, it's that -> %h
Well, we should fix the code-gen bug 10:35
But maybe leave the patch in for this release as it's one more working module on r-j
moritz but will we, in time for R*?
jnthn This star release, I mean.
FROGGS_ jnthn: is it doable to port the fix for somebody who dislikes Java?
jnthn FROGGS_: Given the fix is entirely in NQP code, yes. :)
FROGGS_ k :o)
jnthn moritz: Well, that'd need a point release of NQP with the patch... 10:36
moritz ok, I'll patch DBIish :-)
jnthn moritz: May be easier to ship a patched DBI *and* fix it and unpatch DBI later.
dalek Iish: 1ef4584 | moritz++ | lib/DBDish.pm6:
Work around precompilation issue on rakudo-j
FROGGS_ cool!
dalek ar: 9fb3187 | moritz++ | modules/DBIish:
Bump DBIish revision to work around precomp bug
10:37
10:38 dmol left 10:44 bjz left
dalek kudo/nom: 6e04fb6 | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Make sending $index depend on arity of block
10:50
10:50 SamuraiJack_ joined
jnthn lizmat: All of this is the cost of supporting @foo => ... 10:56
lizmat well, yes
but it makes it *so* much easier to use "on" :-)
jnthn lizmat: It may be worth it in so far as we need to take less closures
lizmat yup, that was the idea
jnthn I'm...not convinced it's easier than a map over the input supplies that produces a list of pairs, to be honest.
lizmat ?? 10:57
jnthn Well, what I was originally thinking was
on -> $res { @mergeees.map(-> $m { $m => { more => -> $val { ... }, done => { ... } } }) }; 10:58
Then you can get at the right one just out of normal lexical scoping
Rather than needing the whole $index mechanism.
FROGGS_ jnthn: that was the patch that wants porting, right? github.com/perl6/nqp/commit/c12a9a...c4061d30cf
jnthn FROGGS_: Yeah. You understand what it's doing? 10:59
FROGGS_ (as a side note: I am currently drinking a Cherry Porter)
jnthn ooh :)
jnthn is currently drinking coffee.
lizmat but the $index is needed for simplifying things like zip and merge
jnthn You win :P
lizmat: How does it simplify them? 11:00
lizmat if you have the supply in question, that doesn't help you in grouping information
FROGGS_ jnthn: it keeps the blocktype in case the thing was replaced
jnthn FROGGS_: Right.
lizmat because when you're zipping, you're not interested in which supply did what, just the ordinal of the supply, so you can then zip up when you need to
zip becomes: 11:01
my $on = on -> $res {
my @values = ([],[]);
($a,$b) => sub ($val,$index) {
@values[$index].push($val);
if all(@values) {
$res.more( (@values>>.shift) );
}
}
}
well, essentially (this from changes in S17
I'm writing right now)
11:02 kurahaupo left
jnthn lizmat: That's cute, though note that @mergees.kv.map(-> $index, $m { ... }) woulda givne the indexes quite neatly too :) 11:06
lizmat let me first finish the spec changes, and I'll go back to implementation 11:07
are are you saying that you're talking about the "on" syntax? 11:08
jnthn Yes
lizmat hmmmm.... 11:09
jnthn lizmat: Here is how I'd have written it: 11:11
dalek ecs: 0d7e427 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Spec 'on' more elaborately

Add "index" feature, let implementation of "zip" and "merge" follow from the examples.
jnthn on -> $res { my @values = [] xx @mergees; my $ready = all(@values); @mergees.kv.map(-> $index, $m {
$m => sub ($val) {
@values[$index].push($val);
if $ready {
$res.more( (@values>>.shift) );
}
}
}
ugh, it butchered the first lines, but think it's still understandable.
}
lizmat yes, but that seems like boilerplate to me... 11:12
11:12 dmol joined
lizmat that's why I wanted to transparently support this 11:12
by just sending the index extra when needed
it makes the "on" code a bit more elaborate, but it makes coding "on" a lot understandable, I think 11:13
jnthn I can see it's easier for those of a more imperative persuasion, yes. :) 11:16
Anyway, I punt to TimToady on if the sugar is worth it.
lizmat well, "on" being a sub, makes it more imperative to me :-)
jnthn Just wanted to point out the original design was simpler and capable of supporting these things.
lizmat perhaps, but that wasn't clear to me from the spec :-( 11:17
also: I eliminated the need for a "combine", I think
so it's also a syntax simplification
jnthn Yeah, I guess it relied on being able to generalize from "I return a list of Pairs in setup" to "I can programatically produce those pairs" 11:18
Which was obvious to me when I wrote it, but probably wanted calling out.
Of course, you've not made it so we can't write things that way :)
lizmat indeed :-)
I added semantics, no real syntax changes 11:19
(apart from the index value)
11:22 anaeem1_ joined
lizmat fg 11:27
r: my &op = &[~]; say [&op] <a b c d e> # what am I missing here? 11:33
camelia rakudo-jvm 33ea6e: OUTPUT«(timeout)»
..rakudo-{parrot,moar} 33ea6e: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> ] <a b c d e> # what am I missing here?⏏<EOL>␤ expecting any of:␤ postfix␤ infix stop…» 11:34
lizmat r: my &op = &[~]; say [~] <a b c d e> # what am I missing here?
camelia rakudo-{parrot,jvm,moar} 33ea6e: OUTPUT«abcde␤»
lizmat that works....
Am I missing something about [&op] list ? 11:35
FROGGS_ std: my &op = &[~]; say [&op] <a b c d e> # what am I missing here?
camelia std ec3d853: OUTPUT«===SORRY!===␤Bogus term at /tmp/1mn28Xk8Ew line 1 (EOF):␤------> ] <a b c d e> # what am I missing here?⏏<EOL>␤Parse failed␤FAILED 00:01 131m␤»
FROGGS_ something upsets the parser 11:36
std: my &op = &[~]; say( [&op] <a b c d e> ) # what am I missing here?
camelia std ec3d853: OUTPUT«===SORRY!===␤Bogus term at /tmp/4UsC_Yxod_ line 1:␤------> my &op = &[~]; say( [&op] <a b c d e> ⏏) # what am I missing here?␤Parse failed␤FAILED 00:01 133m␤»
lizmat how am I supposed to meta-op any given operator then?
FROGGS_ std: my &op = &[~]; # what am I missing here?
camelia std ec3d853: OUTPUT«ok 00:01 128m␤»
FROGGS_ I'd guess what you are doing is not wrong, there is just a parsing bug 11:37
jnthn I think that we never implemented the [&foo] case of reduction meta-op is all 11:38
lizmat ok, so there is currently no way to do that?
FROGGS_ you miss that std is unable to parse it 11:39
lizmat I was always under the impression you could write your own ops, and have them metaopped automagically
11:40 sftp left
jnthn FROGGS_: oh...hmm 11:40
Well, here you are not defining your own op though. 11:41
my @op is not enough
needs to be a categorical I guess
An infix:<op>
lizmat my &op = [~]
is not an op?
FROGGS_ it is not an infix
jnthn No, it's a variable.
FROGGS_ [ something ] resolves to &infix:<something>
so that you cannot reduce prefix/postfixes 11:42
lizmat m: my &op = [~]; say &op.signature.arity
camelia rakudo-moar 6e04fb: OUTPUT«Type check failed in assignment to '&op'; expected 'Callable' but got 'Str'␤ in block at /tmp/jW6fxre3ex:1␤␤»
lizmat m: my &op = &[~]; say &op.signature.arity
camelia rakudo-moar 6e04fb: OUTPUT«0␤»
lizmat m: my &op = &[~]; say &op.signature.count
camelia rakudo-moar 6e04fb: OUTPUT«2␤»
lizmat m: my &op = &[~]; say &op.perl 11:43
camelia rakudo-moar 6e04fb: OUTPUT«sub infix:<~>(Any $?, Any $?) { #`(Sub+{<anon>}+{Precedence}|139819708037728) ... }␤»
lizmat feels like an infix to me
FROGGS_ r: my &infix:<%%%> = &[~]; say [%%%] <a b c d e>
camelia rakudo-jvm 6e04fb: OUTPUT«(timeout)» 11:44
..rakudo-{parrot,moar} 6e04fb: OUTPUT«abcde␤»
FROGGS_ m: my &infix:<op> = &[~]; say [op] <a b c d e>
camelia rakudo-moar 6e04fb: OUTPUT«abcde␤»
lizmat ah, ok
11:44 sftp joined
lizmat FROGGS_++ 11:45
FROGGS_ :o)
though, that error msg from the parser is more than crap
lizmat yeah... that reeaaally confused me 11:46
jnthn I can guess why, mind.
[&op] is a perfectly nice array.
lizmat yeah
masak I see nothing to rakudobug, unfortunately. 11:54
lizmat indeed, just a lizmatbug 11:55
FROGGS_ hmmm, I would at least hope to see the TTIAR between two terms, and not at EOF 11:56
s/hope/something else/
dalek ar: 0e87ffe | moritz++ | / (3 files):
Add "verbose-modules-test" target
11:57
lizmat *sigh* code that runs perfectly in test, breaks when in settings :-( 11:58
dalek kudo/nom: c3de83b | (Elizabeth Mattijsen)++ | src/core/SupplyOperations.pm:
Re-implement Supply.(zip|merge) with new "on" features

Alas, they break with cryptic "cannot stringify this" message
12:00
ast: bcbeccc | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
Many more "on" tests and fudge Supply.(zip|merge)

Oddly enough, identical implementations of .zip and .merge work in the test, but not when they're pre-compiled in the settings. Go figure :-(
12:01
kudo/nom: 15b0352 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
Update ChangeLog
12:03
lizmat jnthn: could it be that during settings compilation, in the -> $res { ... }, the {} is seen as a hash and it tries to stringify @s and can't ? 12:04
12:05 rindolf joined
jnthn lizmat: Did you try --ll-exception? 12:05
lizmat: Could be an error erporting fail
lizmat gist.github.com/lizmat/11112591 12:06
I'm not seeing it :-( 12:10
guess I need some fresh air :-)
12:12 kurahaupo joined
jnthn Well, it's exploding during signautre binding for some reason or other. 12:12
lizmat but the same code does not explode during testing
FROGGS_ for some reason or other?
jnthn Worse, on the slow path binder
That either means that some signature you've got hits the slow path 12:13
Or it failed over to it in order to generate an error message.
12:13 bjz joined
lizmat could it be that "on" is not really known at setting compile time? 12:17
SupplyOperations *are* after Supply, but still
dalek p/asyncops: a66079d | jnthn++ | docs/ops.markdown:
Tweak signal definition.
12:18
p/asyncops: feefbf2 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Signal constants.
jnthn lizmat: on is just a normal sub call really
lizmat but if somehow in the settings it doesn't know the sig yet 12:19
jnthn lizmat: So should be no problem.
Why would it need to?
lizmat would that not explain the slow binding path ?
jnthn No.
That's all callee side, not caller.
FROGGS_ jnthn: it looks like I successfully ported the pointy fix 12:21
jnthn FROGGS_: yay
lizmat: oh... 12:23
method zip(Supply @s is copy, :&with is copy) {
lizmat ?
jnthn I'm surprised that ever works, with the typed array. 12:24
Unless it's declared typed elsewhere?
lizmat you mean, is copy ?
or Supply @s
jnthn The type
Supply @s
Though the "is copy" is what forces it onto the slow path. 12:25
lizmat ah, ok
checking 12:26
jnthn ooh, I can now tap sig_int 12:29
or SIGINT or call it what you will :)
lizmat cool!
jnthn >perl6-m -e "signal(Signal::SIGINT).tap({ say 'omg sigint!'; exit; }); sleep 10;" 12:30
<hit ctrl+c>
omg sigint!
:)
API up for discussion.
But gets something working. 12:31
masak jnthn++
lizmat for clarity, maybe make it a class method on Supply?
so Supply.signal(....) ?
jnthn That feels...an odd place to put it.
lizmat would make it consistent with other methods such as .for :-)
masak jnthn: how do you un-register the signal handler?
jnthn masak: Once I get around to it, by closing the tab
masak: Doesn't do the right thing there yet
lizmat jnthn: why? it generates a Supply, not? 12:32
jnthn masak: But I didn't get nqp::cancel and so forth in place
masak jnthn: oki, good to know there's a plan for it.
jnthn lizmat: Yeah, but...so will async socket stuff in places, but that doesn't mean they all want to have stuff in Supply.
masak jnthn: would also be interesting to have a story, perhaps, about having (Perl 5) `local` semantics for handlers.
jnthn masak: What are those?
masak jnthn: could probably be arranged with `will leave` in Perl 6 or something.
jnthn: they are handlers that stay alive during the *dynamic* scope of a routine. 12:33
jnthn ugh
masak oh, ok, forget it, then ;)
jnthn Well, given our signal handlers are delivered asynchronously...
You don't actually know which thread is gonna get 'em.
dalek kudo/nom: c0b27ba | (Elizabeth Mattijsen)++ | src/core/Supply (2 files):
Fix signature issues with Supply.(zip|merge)
12:34
jnthn lizmat: Does that make the tests happy?
lizmat the .zip test yes
the .merge test breaks again now of "Cannot call method on a null object" 12:35
dalek ast: 1684177 | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
Unfudge Supply.zip, change fudge on Supply.merge
12:36
Heuristic branch merge: pushed 16 commits to rakudo/async by jnthn 12:37
12:38 haroldwu joined 12:39 spider-mario joined
dalek kudo/async: 327e9dc | jnthn++ | src/core/ThreadPoolScheduler.pm:
Expose underlying scheduler queue.

For the sake of things that want to use it as a target for any asynchronous operations.
12:40
kudo/async: 0b1f8aa | jnthn++ | / (2 files):
Very first pass at signal handlers.

Probably some we could support are missing (though it's an LHF for somebody to add those), and the API is certainly up for discussion. But now there is, at least, a way. Closing the tap doesn't in any way remove the handler yet; that'll come later once the more general cancellation mechanism arrives.
lizmat Files=808, Tests=31332, 195 wallclock secs ( 8.03 usr 3.87 sys + 1286.83 cusr 131.16 csys = 1429.89 CPU) 12:55
Somewhere along the past few days, the spectest has gotten significantly longer and more CPU
running again without S17 tests 12:56
Files=801, Tests=30998, 185 wallclock secs ( 7.92 usr 3.76 sys + 1243.98 cusr 102.33 csys = 1357.99 CPU) 13:04
so it's not the S17 tests, but something underneath that we lost :-(
jnthn Feel free to triage. 13:06
lizmat I probably will, after some cycling& 13:10
jnthn have a nice cycle o/ 13:11
13:14 darutoko left 13:18 xenoterracide joined 13:22 rindolf left 13:26 gaussblurinc_ joined 13:36 gaussblurinc_ left
FROGGS_ k, now I spectest the nqp-j patch and then I am going to commit... 13:43
more than two hours for 10 changes lines :/
changed* 13:44
13:44 xenoterracide left
jnthn I've had 10 hours for 2 changed lines in the past... 13:45
But yeah, such things are annoying. 13:46
13:48 LLamaRider joined 13:51 rindolf joined 13:59 gaussblurinc_ joined 14:04 gaussblurinc_ left
FROGGS_ 10 hours?? 14:06
what took so long? 14:07
14:12 darutoko joined
jnthn FROGGS_: Debugging. Threads. GC. :P 14:15
dalek p: 2a31697 | (Tobias Leich)++ | src/vm/jvm/QAST/Compiler.nqp:
port "Don't ruin input QAST in pointy if/while." to jvm backend

That is, we set blocktype to 'declaration' while compiling it to jast, and now set it to its original value afterwards.
14:17
jnthn Wish there was a neater fix than that... 14:18
dalek kudo/nom: 87a6833 | (Tobias Leich)++ | tools/build/NQP_REVISION:
bump nqp rev that fixes pointy messup for jvm
jnthn (Of course, you just ported by one, I mean I wish I coulda thought of one.)
s/by/my/
walk; bbiab, then will continue on async sockety bits 14:19
14:19 guru joined, guru is now known as ajr_
FROGGS_ yes, that fix feels more like these two properties (declarative and the other one) does not belong to the same attribute 14:21
but maybe it is evan cheaper that way, dunno
walk also &
moritz: that makes the previous code of DBDish.pm6 work 14:23
current state of star: gist.github.com/FROGGS/0ea5537eb675588baaa2 14:24
14:36 anaeem1_ left 14:39 anaeem1 joined, anaeem1 left, anaeem1 joined 14:40 xenoterracide joined 14:53 Mouq joined
Mouq Happy Easter #perl6! 14:53
pippo_ Mouq: Heppy Easter! 15:05
jnthn Happy Easter, Mouq! 15:10
pippo_ exit 15:12
15:12 pippo_ left
moritz FROGGS_: seems that most remaining test failures have a common source 15:13
15:16 SamuraiJack_ left 15:22 pippo_ joined 15:23 kurahaupo left
FROGGS[mobile] moritz: yes, and also these are too heavy for me 15:23
I already tried to fix the URI bug 15:24
moritz FROGGS[mobile]: is the URI bug also precomp? 15:28
FROGGS[mobile] yes
about accessing lexicals from an our sub or so 15:29
nwc10 t/spec/S04-phasers/first.t keeps failing for me, with a parallel test 15:35
(fewer than 4 of the planned tests run)
but it never fails when being run alone
even if I do things like pipe it to cat
jnthn nwc10: Does it trip ASAN or valgrind?
nwc10 or pipe it to (sleep 3; cat) 15:36
IIRC no
moritz nwc10: I get those failures too
and last time I checked, they went away with that env var that disables spesh 15:37
15:37 dmol left, xinming_ joined 15:39 dmol joined
moritz www.biostat.jhsph.edu/courses/bio62...EJM%29.pdf # eat more chocolate! 15:48
jnthn What an opportune thing to be told at easter :) 15:49
15:49 BenGoldberg joined
jnthn (Especially when $dayjob++ gave me a huge egg thingy full of it...) 15:50
15:50 anaeem1 left
nwc10 jnthn: actually, no it *can't* be failing under ASAN, as the build is with ASAN 15:51
and I get technicolor stack traces if anything fails
jnthn nwc10: Ah...too bad.
timotimo germany seems oddly unaffected by chocolate consumption 15:52
jnthn
.oO( And that's why Germany has so few nobel laureates...oh, wait... )
15:54
tadzik you still on beer and sausage? :P
not sure if I'll pick chocolate over that...
moritz likes susage *and* chocolate (just not in the same meal) 15:59
pippo_ m: say "Hello, world".words.perl 16:00
camelia rakudo-moar 87a683: OUTPUT«("Hello,", "world").list␤»
pippo_ m: say "Hello, world" ~~ m/<<Hello>>/;
camelia rakudo-moar 87a683: OUTPUT«「Hello」␤␤»
pippo_ .words includes puntuation? 16:02
16:02 anaeem1 joined
pippo_ .words includes puntuation but ">>" which is word bondaries does not? 16:02
*boundaries 16:03
16:04 ssutch left
pippo_ *punctuation 16:04
16:05 anaeem___ joined 16:06 anaeem1 left 16:20 xenoterracide left 16:25 anaeem___ left 16:27 gaussblurinc_ joined 16:31 xenoterracide joined 16:35 telex left, LLamaRider left 16:36 telex joined 16:54 rindolf left 16:58 raiph joined 17:03 Rotwang joined
FROGGS_ retupmoca: this seems fixed: gist.github.com/retupmoca/9953591 17:07
17:18 SamuraiJack_ joined 17:21 denis_boyun___ joined 17:22 denis_boyun_ left 17:24 rindolf joined 17:40 adu joined
raiph #6now #mop en.wikipedia.org/wiki/Metaobject 17:45
#6now #fish techniques for exploring P6 (eg metaprogramming) 17:47
m: say Block.^methods #6now #fish see irclog.perlgeek.de/perl6/2014-04-20#i_8613889 17:48
camelia rakudo-moar 87a683: OUTPUT«<anon> add_phaser fire_phasers phasers perl <anon> <anon> <anon> <anon> <anon> <anon> arity count signature outer static_id of returns ACCEPTS Str␤»
17:48 adu left
timotimo what is "fish" for? 17:51
17:52 ajr_ left
pippo_ m: my @a = 1..10; say @a[0..^*-1]; say @a[0.. ^*-2]; say @a[0..^*-2]; 17:55
camelia rakudo-moar 87a683: OUTPUT«1 2 3 4 5 6 7 8 9␤1 2 3 4 5 6 7 8 9␤1 2 3 4 5 6 7 8␤»
pippo_ Why a space before the "^" makes a difference? 17:56
Mouq pippo_: because "..^" is an infix 17:58
17:58 denis_boyun_ joined 17:59 denis_boyun___ left
pippo_ Mouq: Ha. OK. ty. I was thinking "^"is a prefix and ".." and infix. 18:02
raiph timotimo: irclog.perlgeek.de/perl6/2014-04-20#i_8614688 18:04
18:04 LLamaRider joined 18:05 Rotwang left
raiph timotimo: "teach a person to fish..." 18:05
jnthn "...and they'll probably poke themself in the eye with the fishing rod" 18:07
raiph jnthn: :) Presumably you just mean that for amusement, not as guidance away from teaching folk to fish (eg call ^methods, read p6doc, use #perl6 evalbots etc.) right? 18:10
FROGGS_ learnings is never bad
jnthn raiph: Yes, was just amusing myself. :) 18:11
FROGGS_ learning*
jnthn raiph: Using .^methods to discover is a good thing. Also .WHY when it's defined.
(sadly, not yet on the built-ins) 18:12
raiph yeah, I'm already intending to do a .WHY example and point that to lots of little #LHFs for adding #='s to builtins and another larger #LHF to suck those in to p6doc 18:13
and more generally to turn #perl6 itself into a fishable network of #6now lines 18:14
which could plausibly be circular: could use hashtags in .WHYs that link to the #perl6 IRC log and back again 18:16
18:19 zakharyas joined
raiph s/turn #perl6 itself into/try have #perl6 work as/ 18:20
lizmat jnthn: are you serious about the need of adding pod to the settings ? 18:23
I seem to recall the last time I suggested / thought about that, it was a no because of increase parsing times while building the settings
jnthn lizmat: I'm serious about making .WHY work. I don't think it needs to be done by adding it into the setting. 18:25
lizmat: It can be done as a fallback.
"ooh, no docs. Well, lemme look over there...OOH docs!"
lizmat so you mean we implement a WHY that looks up the pod elsewhere ? 18:26
(for the settings?)
jnthn lizmat: That's what I'm thinking, yes. 18:27
lizmat: I didn't think much about the details, and not saying it needs to happen Right Now.
lizmat: But it'd enhance language explorability.
lizmat indeed 18:28
m: say 42.WHY
camelia rakudo-moar 87a683: OUTPUT«(Any)␤»
FROGGS_ .WHY could happily fall back and cite from Pod files
if there would be a nice mechanism it could even be nice for modules 18:29
so you dont have to write pod twice
jnthn lizmat: "Because the life, universe and everything" :P
18:30 SamuraiJack_ left
raiph can we please one day have 42.WHY respond with that? :) 18:31
cognominal that's the time for easter eggs :) 18:34
dalek kudo/nom: 36d2580 | (Elizabeth Mattijsen)++ | src/core/Int.pm:
Implement 42.WHY
18:35
cognominal lizmat++ 18:36
lizmat raiph: is today early enough? 18:39
raiph timotimo: although I've no doubt folk will generally see this as proof that P6 isn 18:43
grr
18:45 darutoko left
raiph isn't serious, I think there's scope for a nice little video on code annotations, use thereof, and doc LHF, P6 style 18:46
gotta run
18:47 a3gis joined
lizmat r: my $x = -> $a { { a => sub () { $a } } }; my $foo = $x(42); say $foo<a>.(); 18:48
camelia rakudo-jvm 87a683: OUTPUT«(timeout)» 18:49
..rakudo-{parrot,moar} 87a683: OUTPUT«42␤»
lizmat hmmm...
18:52 LLamaRider left
moritz is there some kind of a "stealth mode" feature on github that might prevent me to add somebody to a team? 18:59
I'm trying to add softmoth++ to the perl6 team, but the UI won't allow it :(
jnthn not as far as I know. 19:00
moritz maybe I should open a bug report with the github folks 19:02
dalek ecs: f143d1a | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Supply.(zip|merge) can be called as class method
19:04
jnthn hehe...I thought my signals patch which depended on that might lead to it coming to work ;)
lizmat it worked already, it just wasn't specced :-) 19:11
dalek ast: 77fbcff | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
Tests calling Supply.(zip|merge) as class methods

Sadly, the .merge tests still need to be fudged because of
  "Cannot call method 'more' on a null object"
19:15
19:17 raiph left
Mouq pippo_: Understandable :) 19:19
19:29 molaf_ joined 19:32 molaf left
lizmat m: say 42.WHY # :-) 19:33
camelia rakudo-moar 36d258: OUTPUT«Life, the Universe and Everything␤»
masak ...because we didn't have enough bugs caused by serious commits? :P 19:39
lizmat well, it seemed the right time of the year :-) 19:41
moritz lizmat++
masak lizmat++ # for all the rest of the great stuff I see flying by almost daily 19:43
nwc10 This is a very interesting thread. It starts out about how to make Python 2 to Python 3 migration easier (by removing 80% of the flag day) but migrations to a more meta-discussion about how python-dev is working, and how it's overloaded/at risk of burning out: mail.python.org/pipermail/python-d...33986.html
er, but migrates
naughty fingers 19:44
lizmat *blush* 19:45
masak nwc10: looking 19:46
nwc10 it's quite long, but I think that all of the messages are worth reading
(2 or 3 have mostly quoting and little content, but it's faster to read them and skip them than for me to go back and try to give you a list of them) 19:47
19:48 kurahaupo joined
masak nwc10: I'm mostly through the OP, and thinking that it sounds like a very sane strategy, and possibly relevant for Perl 5/6. (even though the jump is bigger in Perl's case.) 19:50
19:50 rindolf left
lizmat FWIW, I think perl 5 is already moving in that direction, with sub signatures and what not 19:51
masak actually, forget that. I entertained the idea of hybrid Perl 5/6 code some years back, and concluded that it's basically too wide a gap.
would love to be proven wrong, though.
so far what I like best is the idea of a "Perl 5 and a half", a kind of stylized Perl 5 that is small and predictable enough to act as a bridge from 5 to 6. 19:58
i.e. it should be strightforward to convert most Perl 5 to 5 1/2, and it should do a good-enough job rendering 5 1/2 code as Perl 6 code. 19:59
nwc10: I'm halfway through the thread. frankly, I don't see why they don't just target pythonhosted.org/six/ 20:00
nwc10 not sure, but I think the intent was that you could use the hypothetical thing to migrate your codebase file by file from 2.7-ish to 3.x-ish 20:04
whereas I don't know with six whether you whole codebase has to agree that it's using six 20:05
ie - I don't know anywhere near enough Python to know whether you have to do a flag day migation to six, or whether you can do it bit by bit
masak me neither, though I don't see offhand why parts of the code base couldn't use six. 20:08
20:08 hoverboard joined
masak finished reading the thread. it was interesting. 20:08
Mouq finishes codegolf.stackexchange.com/a/26060/15012 and is done coding for today 20:10
o/
20:11 Mouq left 20:12 raiph joined
lizmat Mouq++ 20:12
20:16 zakharyas left
lue I'm with lizmat, my very limited knowledge of Perl 5 suggests that they keep taking things from P6, and thus are already helping the migration process :) . 20:21
FROGGS_ well, you kinda have a migration process for the mind of the dev, but not for the codebase this way 20:23
lizmat If *we* would make v5 better (note emphasis on "we", not just you, FROGGS_) 20:27
and we would have an effort for creating Pure Perl (5) versions of CPAN modules with XS
we would be attacking the migration issue from both ends
masak 'night, #perl6 20:28
FROGGS_ that is why I still work on v5
lizmat gnight masak
FROGGS_++ 20:29
FROGGS_ :o)
gnight masak
20:30 a3gis left 20:37 hoverboard left 20:40 molaf_ left
dalek ecs: d6cdde4 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Spec Supply.(buffering|delayed) and up Version
20:46
kudo/nom: 36750ae | (Elizabeth Mattijsen)++ | src/core/Supply (2 files):
Implement Supply.buffering
jnthn lizmat: I'd *love* an overlap thing for buffering 20:48
lizmat overlap?
jnthn .buffer(elems => 2, overlap => 1)
I think .buffer is better than .buffering too
Yeah
lizmat well, I wanted to prevent confusion with buffers
jnthn Imagine that you're getting a sequence of mouse co-ordinates in, while the mouse is being moved around. 20:49
And you want to draw lines between them
lizmat yes
jnthn Then you'd want to get coordinates in pairs
But you'd one them like
c1,c2
c2,c3
c3,c4
tec.
*etc.
lizmat ah, I see
ok
that should be doable :-)
jnthn This is really useful :)
lizmat still, I think "buffering" is a better word 20:50
jnthn I'm fine with it
lue Yesterday we ran into that desired feature for simple lists, and called it .rotor while talking about it.
lizmat especially if it has an overlap function
jnthn Very happy to see the functionality. Was gonna implement it before my talk. Now I don't have to ;) 20:51
lizmat hehe, great minds think alike :)
colomon github.com/colomon/List-Utils/blob...t/Utils.pm (sliding-window, etc)
FROGGS_ hmmm, I always that that methods should be verbs, not nouns 20:52
thought*
lue only .rotor was designed to be rotor($take, $skip, $take, $skip...) so (^10).rotor(2,-1) would give you (0,1),(1,2),(2,3),... 20:53
raiph Mouq++ # epic golf
lizmat hmmmm....
lue (and something like rotor(2,0,1,0) would result in (0,1),(2),(3,4),(5),... and I *think* we also decided a missing skip value would be eqv. to 0, so .rotor(2) == .rotor(2,0)) 20:55
lizmat and that would make it the same as .buffering( :elems(2) ) 20:56
right ?
lue probably, let me check S17 to make sure :)
lizmat lue: github.com/perl6/specs/commit/d6cdde481f
lue maybe, the point of .rotor as we discussed was to turn a flat list (like ^10) into one with more structure, not sure that's exactly what buffering does. 20:57
raiph m: say Block.^method # I'm getting spoiled by awesome error messages; I was surprised this didn't say "did you mean 'methods'?" :) 20:58
camelia rakudo-moar 36d258: OUTPUT«No such method 'method' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block at /tmp/FfaLpF8l3q:1␤␤»
raiph m: say Block.^methods # Presumably it wouldn't be difficult to eliminate <anon>s? 20:59
camelia rakudo-moar 36d258: OUTPUT«<anon> add_phaser fire_phasers phasers perl <anon> <anon> <anon> <anon> <anon> <anon> arity count signature outer static_id of returns ACCEPTS Str␤»
jnthn I suspect those are the methods on Block written in NQP, as part of the circularity sawing. 21:02
Doens't make any sense to eliminate them.
21:02 kaare_ left
jnthn Might make sense to figure out how to make their names show up 21:02
raiph gotchya
FROGGS_ ~/dev/v5$ ./p5 '$::{bar}' 21:08
Perl5:
v5: ===SORRY!=== MVMArray: Index out of bounds
-.-
gnight
lizmat gnight FROGGS_! 21:09
jnthn 'night FROGGS_
21:13 vendethiel joined
vendethiel m: my %h; %h{1, 2, 3} = 5; say %h.perl; 21:15
camelia rakudo-moar 36d258: OUTPUT«("1" => 5, "3" => Any, "2" => Any).hash␤»
vendethiel m: my %h; %h{1, 2, 3} = 5 X=> 1..*; say %h.perl;
camelia rakudo-moar 36d258: OUTPUT«("3" => 5 => 3, "2" => 5 => 2, "1" => 5 => 1).hash␤»
lizmat m: my %h; %h{1, 2, 3} = (5 X=> 1..*); say %h.perl; 21:16
camelia rakudo-moar 36d258: OUTPUT«("1" => 5 => 1, "2" => 5 => 2, "3" => 5 => 3).hash␤»
dalek kudo/nom: 3492812 | (Elizabeth Mattijsen)++ | src/core/Supply (2 files):
Implement :overlap in Supply.buffering
21:19
lizmat jnthn: ^^^ :-)
vendethiel m: constant A = 50; my %powers; for 2..Int(sqrt A) -> \a { next if a ~~ %powers; %powers{a, a**2, a**3 ...^ * > A} = a X=> 1..*; }; say %powers;
camelia rakudo-moar 36d258: OUTPUT«("16" => 2 => 4, "2" => 2 => 1, "25" => 5 => 2, "27" => 3 => 3, "3" => 3 => 1, "32" => 2 => 5, "36" => 6 => 2, "4" => 2 => 2, "49" => 7 => 2, "5" => 5 => 1, "6" => 6 => 1, "7" => 7 => 1, "8" => 2 => 3, "9" => 3 => 2).hash␤»
dalek ast: 162bbf4 | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
Add :elems/:overlap tests for Supply.buffering

Timed buffering is a bit trickier to test, more on that later
21:20
jnthn lizmat: yays! 21:21
lizmat: Will look at the code later; working on async socket reads.
lizmat sure... :-)
dalek ecs: 692aa10 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Spec the Supply.buffering( :overlap )

Or maybe we should separate this into a .rotor method, as the use is really different.
21:24
lizmat has reached her commit limit for today :-) 21:25
vendethiel lizmat++
lizmat goodnight #perl6!
vendethiel m: say 27, 28 ... *%%13 21:26
camelia rakudo-moar 36d258: OUTPUT«27 28 29 30 31 32 33 34 35 36 37 38 39␤»
jnthn 'night, lizmat++
21:26 a3gis joined
a3gis m: say 27, 28 ... *%%13 21:27
camelia rakudo-moar 36d258: OUTPUT«27 28 29 30 31 32 33 34 35 36 37 38 39␤»
a3gis m: say 27, 28 ... * %% 13
camelia rakudo-moar 36d258: OUTPUT«27 28 29 30 31 32 33 34 35 36 37 38 39␤»
vendethiel got a3gis to join randomly
21:28 gaussblurinc_ left
vendethiel r: say (*+*+3).perl 21:28
camelia rakudo-{parrot,moar} 36d258: OUTPUT«WhateverCode.new()␤»
..rakudo-jvm 36d258: OUTPUT«Unhandled exception: java.lang.RuntimeException: Missing or wrong version of dependency 'src/Perl6/Grammar.nqp'␤ in (gen/jvm/main.nqp)␤␤»
vendethiel m: say (*+*+3)(4).perl;
camelia rakudo-moar 36d258: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in block at /tmp/x5Tx7Lyhty:1␤␤»
vendethiel m: say (*+*+3)(4, 5); 21:29
camelia rakudo-moar 36d258: OUTPUT«12␤»
vendethiel m: say (3*(*+2))(5)
camelia rakudo-moar 36d258: OUTPUT«21␤»
vendethiel m: say one((1, 2, 3)) == 1 | 2 21:34
camelia rakudo-moar 36750a: OUTPUT«one(any(True, False), any(False, True), any(False, False))␤»
raiph hi a3gis: what comp langs do you know, what sort of programming do you do?
vendethiel m: say so one((1, 2, 3)) == 1 | 2
camelia rakudo-moar 36750a: OUTPUT«True␤»
vendethiel raiph: he's busy doing Agda atm :)
m: say so one((1, 2, 3)) == 1 & 2 21:35
camelia rakudo-moar 36750a: OUTPUT«True␤»
vendethiel ^ wat
a3gis raiph: hey! why?
vendethiel thought one() was xor-ish
raiph a3gis: just saying hi 21:36
a3gis raiph: haha I am not used to people being that friendly on IRC (though vendethiel warned me perl folks are pretty cool)
raiph: I've never touched perl but I intend to :p 21:37
vendethiel is pretty convinced most programmers are cool on IRC, in general :)
a3gis is too but usually they are to busy to say hello when you enter a chan 21:38
raiph a3gis: just wrapped easter dinner and was taking a mo watching audio/visualization of sort algos 21:40
www.youtube.com/watch?v=kPRA0W1kECg
a3gis vendethiel has been trying to evangelise me for the past month and it's slowly sinking in 21:41
raiph: I actually say that one a few months back; really cool
vendethiel has been "evangelising" a3gis on many stuff through these last years, eh?
raiph anyhoo, yeah, peak productivity comes from having fun, thus perl6.org/fun/ 21:42
dalek osystem: 62d661c | Adrian++ | META.list:
Add Audio::Taglib::Simple
21:43
osystem: 2d49b0e | colomon++ | META.list:
Merge pull request #28 from avuserow/patch-1

Add Audio::Taglib::Simple
avuserow thanks colomon++ :)
colomon now to check it out. ;)
colomon has been using a .NET library with Niecza for MP3 tagging 21:44
a3gis raiph: haha that sounds like good language design principles
avuserow oh yeah, taglib is fantastic. I'm planning on adding support for editing tags too. 21:45
Too bad that we need C++ support to get the advanced API which can let us see more tags, but the simplified API is still good enough for quite a bit
colomon avuserow++ # I may be your first user. ;) 21:49
21:58 kurahaupo_mobile joined 22:00 kurahaupo left
dalek kudo/async: 170241a | jnthn++ | src/core/ThreadPoolScheduler.pm:
Tweak thread starting in queue accessor.

Create up towards the limit, rather than assuming one is enough, as that may lead to deadlocks.
22:00
kudo/async: 25e2ff4 | jnthn++ | / (2 files):
Add basic async client socket support.

Only works on MoarVM so far, missing reading bytes and robustness and various other bits, but enough for writing a simple async HTTP client.
p/asyncops: c042626 | jnthn++ | docs/ops.markdown:
Sync async op docs with reality.
22:03
22:05 a3gis left
tadzik New Perl6 game is out! github.com/tadzik/RetroRacer 22:06
blog post coming soonish
22:09 kurahaupo_mobile left
jnthn ooh :) 22:10
vendethiel m: my %h; %h{1, 2, 3} = 1..*; say %h.perl; 22:13
camelia rakudo-moar 36750a: OUTPUT«("2" => 2, "1" => 1, "3" => 3).hash␤»
22:16 kurahaupo joined
pippo_ Nobody answered my question... 22:19
m: say "Hello, world".words.perl
camelia rakudo-moar 36750a: OUTPUT«("Hello,", "world").list␤»
pippo_ ^^ why the comma is captured as part of the word Hello? Is it as per spec? 22:20
vendethiel pippo_: github.com/rakudo/rakudo/blob/7111...tr.pm#L818
I really like the fact that, since rakudo is just perl6, you can check yourself so easily :D
it's just splitting "everything that isn't space", apparently.
retupmoca is there anyone working on/planning to work on SSL sockets? 22:21
istr something about a gsoc thing involving ssl
tadzik sergot may end up doing it on gso
retupmoca ok, I may wait and see if he does 22:23
because I want ssl for all the Net::* stuff I'm writing, but I don't know if I want to jump into the complication of ssl and tls :P
22:24 a3gis joined
jnthn What's so scary? It ain't gonna make your heart bleed... 22:24
tadzik blag toast: ttjjss.wordpress.com/2014/04/21/new...etroracer/
pippo_ m: say ',' ~~ /\S+/; 22:27
camelia rakudo-moar 36750a: OUTPUT«「,」␤␤»
pippo_ vendethiel: indeed. ty. So "Hello," and "Hello" are two different words... 22:29
vendethiel m: say 'Hello, world'.comb(/\w+/); 22:30
camelia rakudo-moar 36750a: OUTPUT«Hello world␤»
pippo_ I know. But .words is somewhat misleading.
tadzik hm. Are there env vars or something I can modify to help rakudo look for Perl6::BOOTSTRAP? 22:31
pippo_ I know. But .words method name is somewhat misleading.
tadzik I tried to distribute a tarball with moarvm, rakudo and the new game, but it still looks for some things in /home/tadzik :
22:31 prevost joined
jnthn tadzik: --libpath given to moar may help... 22:31
tadzik jnthn: didn't :/ 22:32
I tried --libpath=moar-bundle/nqp/lib/Perl6
jnthn hmmm
tadzik maybe it wants absolutes
jnthn maybe, yeah
tadzik nah 22:33
jnthn Oh 22:34
Try strigging the Perl6 off the end of that
Since it wil be putting that on itself I think.
tadzik oh, well
vendethiel what does "LSM" stand for ?
tadzik perl6.moarvm contains string "tadzik" in it
not a good sign :/ 22:35
jnthn: that I already had in libpath
LD_LIBRARY_PATH=moar-bundle moar-bundle/moar --libpath=moar-bundle/nqp/lib --libpath=moar-bundle/perl6/lib --libpath=moar-bundle/runtime moar-bundle/runtime/perl6.moarvm ./RetroRacer is what I tried
it worked on my machine :D
vendethiel (from Str.pm)
tadzik obviously
lue pippo_: words are things separated by whitespace, I fail to see how .words is misleading (after all, "2,600" shouldn't count as two words, should it?) 22:36
22:37 prevost left
pippo_ m: say "Hello," ~~ m/<<Hello>>/ 22:39
camelia rakudo-moar 349281: OUTPUT«「Hello」␤␤»
pippo_ lue: is '>>' word boundary symbol?
22:40 prevost joined, prevost left, spider-mario left
pippo_ m: say "Helloa" ~~ m/<<Hello>>/ 22:40
camelia rakudo-moar 349281: OUTPUT«False␤»
lue Yep, « for left boundary, » for right
pippo_ lue: seems that the ',' is not part of a word. 22:41
lue yeah, 'cos it isn't a word character 22:42
pippo_ why then for .words it is? 22:43
22:43 prevost joined
lue pippo_: .words is a shortcut for .split(/\s+/), that's why. No \w or \W involved 22:43
(like how .lines is a shortcut for .split(/\n+/)) 22:44
vendethiel m: sub MAIN(Int $n) { say $n } 22:45
camelia rakudo-moar 349281: OUTPUT«Usage:␤ /tmp/U_EfVJLTcJ <n> ␤»
vendethiel ^ does it auto-convert to Int ? 22:46
lue vendethiel: try it locally and see :) [I think the answer is yes]
vendethiel I can't, that's why I ask here :p
avuserow perl6 -e'sub MAIN(Int $n) {say $n.WHAT; say $n ~~ Int}' 123 # (Int+{orig-string[Str]}); True 22:47
pippo_ lue: in my opinion a shorcut to .split(/\s+/) should not be called .words because in contradiction with the notion of word.
lue pippo_: what else would you call a thing surrounded by space? 22:48
vendethiel "anything that's surrounded by space"?
lue pippo_: if you need a more complex definition of what a word is, you'll have to do it yourself. Perl 6 is not in the business of locale-specific things 22:49
pippo_ lue: a word. But also thing delimited puntuation are words (punctuation excluded).
lue (at least not yet)
pippo_ lue: a word. But also thing delimited by puntuation are words (punctuation excluded).
22:49 adu joined
lue r: say "Only 3.0 words".split(/\W+/).elems; 22:49
camelia rakudo-{parrot,jvm,moar} 349281: OUTPUT«4␤» 22:50
cognominal in perl6/Actions.pm, in methods statements and regex_declarator, is the $key? parameter a fossil, or does it mean something?
oops
I meant nqp/Actions.pm
here : github.com/perl6/nqp/blob/master/s...s.nqp#L148 22:51
and here : github.com/perl6/nqp/blob/master/s...s.nqp#L148
pippo_ lue: I see. Not so simple...
raiph Vendethiel: LSM = longest_substitution_matcher
vendethiel ty raiph 22:52
lue pippo_: precisely :) most scripts can agree on whitespace to separate words, but everything else depends on what your current goals are.
raiph (didn't know; just searched irclogs for lsm :) ) 22:53
pippo_ lue: OK. ty. and good night .-)
lue: OK. ty. and good night :-)
lue pippo_ o/
22:53 pippo_ left
cognominal github.com/perl6/nqp/blob/master/s....nqp#L1268 # the second one 22:57
lue cognominal: seems to be unused, but I can't say for sure if it's truly useless. (Do any calls to those methods supply a key, for instance?) 23:04
dalek kudo-star-daily: 297fef5 | coke++ | log/ (5 files):
today (automated commit)
23:07
kudo-star-daily: 5859664 | coke++ | log/ (5 files):
today (automated commit)
23:07 CJ__ joined
dalek rl6-roast-data: 0aac7a4 | coke++ | / (6 files):
today (automated commit)
23:07
rl6-roast-data: 06ffeee | coke++ | / (6 files):
today (automated commit)
kudo/async: c4efc57 | jnthn++ | src/core/IO/Socket/Async.pm:
Provide async server sockets on MoarVM.
23:09
jnthn Complete with mandatory crappy async HTTP server, of course...
gist.github.com/jnthn/11127634 23:10
23:10 CJ__ left
tadzik awesome thins \o/ 23:11
23:15 a3gis left 23:16 denis_boyun_ left 23:26 dmol left
lue jnthn: it's not much of a party without <blink>strobe effects</blink> :) 23:27
jnthn Chrome doesn't seem to support blink, sadly 23:35
marquee works, though.
geekosaur blink was removed some versions back, yes
timotimo that's cute, i like it 23:38
and now we can combine that stuff with start blocks to do actual computations in parallel :) 23:39
23:40 xenoterracide left
jnthn Aye 23:40
Well, will need some hardening, etc.
23:42 adu left
jnthn Enough code for today 23:44
'night, #perl6
timotimo gnite jnthn :) 23:46
hbmm 23:50
er. i meant to write "hmm"
i wonder ... libuv is older than node.js, isn't it?
hmm 23:52
23:52 kurahaupo left