»ö« 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:00 Psyche^_ joined
adrusi anyone know of any good in-depth explanations of contexts and containers/references? 00:02
I'm not a perl guy, but figured now's a good time to learn a bit about perl6 and those seem to be the biggest stumbling blocks 00:03
Ven adrusi: oh, it's been a long time since I hadn't seen that name :-). I think coco?
adrusi: I know we have doc.perl6.org/language/containers
00:03 Psyche^ left 00:04 tomoko joined
tomoko m: 'say [+] ^1000001' 00:04
camelia rakudo-moar 94ad45: OUTPUT«WARNINGS:␤Useless use of constant string "say [+] ^1000001" in sink context (line 1)␤»
adrusi Ven: huh, small world, I was active in the coco issue board years ago, yeah 00:05
I'll look into that
Ven adrusi: well, I think you were also present on LiveScript's issue tracker a few times, but I think a bit less. 2011 / 2012? 00:06
tomoko m: say [+] ^1000001;
camelia rakudo-moar 94ad45: OUTPUT«500000500000␤»
TimToady tomoko: that is not very optimized yet
tomoko why? in my machine 50 s 00:07
00:07 kjs_ left
TimToady it's using arbitrary precision when it doesn't need it, plus if it recognized that you were summing a range, it wouldn't even have to create the range 00:08
grondilu m: say [+] ^10**100
00:08 espadrine left
camelia rakudo-moar 94ad45: OUTPUT«(timeout)» 00:08
grondilu (you guys are not trying hard enough)
tomoko TimToady: Thanks 00:09
grondilu making a multi candidate for [+] $range was discussed some time ago
TimToady well, but that's not as general as you'd like it to be 00:10
geraud is ^N 1 to N, or 1 to N-1?
psch geraud: it's 0 to N-1
m: say ^5
camelia rakudo-moar 94ad45: OUTPUT«^5␤»
psch m: say eager ^5
camelia rakudo-moar 94ad45: OUTPUT«(0 1 2 3 4)␤»
TimToady ^N is short for 0 ..^ N
psch TimToady++ # for "why is it that"
TimToady grondilu: you'd like it to work for .reduce(&[+]) as well, for instance 00:11
geraud TimToady, psch : thanks for the explanation. 00:12
00:13 Ven left 00:15 Ven joined, Ven left
Skarsnik Good night people x) 00:18
00:18 tomoko left 00:22 xpen left 00:23 xpen joined
grondilu if I want to do 'unit class A does B;' I need to write 'use B;' just before. That's a bit weird, isn't it? I mean, I suppose the 'unit class' line does not have to be the first line of the file. 00:36
00:42 Skarsnik left
TimToady it should work, or if it doesn't, it should anyway :) 00:43
00:44 softmoth_ joined
grondilu it works, it's just that it "looks" weird. 00:44
00:45 dD0T joined 00:46 dD0T left, hacst joined 00:48 softmoth_ left 00:52 MadcapJake left, raiph joined
TimToady one could, I suppose, say that 'unit' autoimports anything it doesn't recognize 00:53
00:58 Ben_Goldberg joined 01:01 BenGoldberg left, BenGoldberg joined 01:03 BenGoldberg left, xpen left 01:04 BenGoldberg joined 01:05 Ben_Goldberg left 01:07 zengargoyle left, khw left 01:08 rurban joined 01:13 khw joined 01:18 khw left 01:21 tokuhiro_ joined 01:23 khw joined 01:26 tokuhiro_ left 01:27 zengargoyle joined, zengargoyle left 01:28 zengargoyle joined, rurban left 01:51 skids left 01:55 geraud left, geraud joined
grondilu m: role { method f(Hash[Real,UInt]:) {...} }; 01:59
camelia ( no output )
grondilu m: role { method f(Hash[Real,UInt]:D:) {...} };
camelia rakudo-moar 94ad45: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oTkc96ozIr␤Invalid typename 'D' in parameter declaration.␤at /tmp/oTkc96ozIr:1␤------> 3role { method f(Hash[Real,UInt]:D7⏏5:) {...} };␤»
grondilu m: role { method f(Any:D:) {...} };
camelia ( no output )
grondilu m: role { method f(Array[Real]:D:) {...} };
camelia rakudo-moar 94ad45: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FM9YrkYK9y␤Invalid typename 'D' in parameter declaration.␤at /tmp/FM9YrkYK9y:1␤------> 3role { method f(Array[Real]:D7⏏5:) {...} };␤»
grondilu std: role { method f(Array[Real]:D:) {...} }; 02:00
camelia std : OUTPUT«No such file or directory»
grondilu ?
std: role { method f(Array[Real]:) {...} };
camelia std : OUTPUT«No such file or directory»
std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤#perl6 <grondilu> std: role { method f(Array[Real]:) {...} };␤»
grondilu std: 1+1
camelia std : OUTPUT«No such file or directory»
std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤» 02:01
grondilu syntax for camelia's STD changed or something?
std: role { method f(Hash:D:) {...} }; 02:02
camelia std : OUTPUT«No such file or directory»
grondilu m: role { method f(Hash:D:) {...} };
camelia ( no output )
grondilu m: role { method f(Hash[Real]:D:) {...} };
camelia rakudo-moar 94ad45: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SDQ3zazFhJ␤Invalid typename 'D' in parameter declaration.␤at /tmp/SDQ3zazFhJ:1␤------> 3role { method f(Hash[Real]:D7⏏5:) {...} };␤»
std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤»
02:09 aborazmeh joined, aborazmeh left, aborazmeh joined 02:11 skids joined 02:22 BenGoldberg left, BenGoldberg joined
TimToady grondilu: testing patch to speed up [+] 02:24
02:25 Ben_Goldberg joined
grondilu cool 02:25
TimToady as a side effect, there will be a sum method 02:26
grondilu since we're talking about [+], do you plan on parallalizing it for large amounts of operands?
TimToady it could be done pretty easily now, I suspect 02:28
grondilu nice
02:29 BenGoldberg left 02:32 softmoth_ joined
grondilu for years my pet line to see if perl6 got faster has been '[+] rand xx 100_000'. Parallelizing [+] would make it much faster I suspect. 02:33
although maybe what takes some time is the instanciation of the long array, not the additions.
m: say [+] rand xx 100_000; say now - INIT now 02:34
camelia rakudo-moar 94ad45: OUTPUT«50118.9803380321␤0.739346␤»
grondilu wow that's ridiculously faster than on my machine 02:35
dalek kudo/nom: 6d97011 | TimToady++ | src/core/ (4 files):
optimize [+]

There is now also a sum function which calls into a sum method. Any.sum is 10-20% faster than the generic reduce routine, while Range.sum is O(N) faster. :)
grondilu so it's now O(1)? :)
TimToady ayup 02:36
02:36 softmoth_ left
grondilu [+] rand xx 100_000 takes 11 seconds on my machine (raspberry pi 2). I know that's not a beast, but still. 02:37
lack of JIT?
I mean it does not have JIT and I wonder if that is the reason.
TimToady rand isn't terribly fast, but doubtless we can do better 02:38
grondilu doesn't it link to the standard C library or something? 02:39
it'd be nice if it was fast. rand is often used for monte-carlo stuff so it needs to be called many times. I once were following a very interesting course on EdX about Monte-Carlo and unfortunately Perl 6 was way too slow for the given examples. 02:40
(unless it was on coursera) 02:44
02:44 adu joined
TimToady runs in about .25 seconds here 02:44
grondilu oh yeah it was on coursera: "Statistical Mechanics: Algorithms and Computations" class.coursera.org/smac-002 02:46
psch huh
oh, boxing maybe
grondilu .25 seconds compared to 11 seconds is way too big. Something's wrong.
psch that is, the 2 orders of magnitude between 1kk rand calls between p5 and p6 02:47
'cause &rand maps nearly 1:1 to a call to whatever exactly tinymt64 does for random numbers
metasin Hey, I really like that way parametric polymorphism works in Perl6 (i.e., class myClass does someRole {} ... ) Are there some nice references on data structure and algorithm implementations in rakudo or should I just be reading through core? 02:48
psch but whatever p5 does doesn't have to deal with types and boxing and all that
metasin: rosettacode is a good thing to peruse, but CORE is also great, although sometimes less idiomatic for the sake of performance
grondilu metasin: funny you talk about that. I'm currently working on making a role out of my MultiVector class in my Clifford module. 02:49
psch metasin: gotchas in CORE mostly involve things prefixed with nqp::
grondilu so that I4ll have class Vector does MultiVector {...}
psch doesn't recall off-hand if there's something on p6advent re parametric polymorphism... 02:50
but that's a potential third thing to look through, perl6advent.wordpress.com that is
metasin Hey, it's all pretty helpful. Wasn't sure if there were any collections of notes/docs regarding these kinds of things.. :p 02:51
I should probably start a blog
(or leave comments on rosettacode) 02:52
grondilu hum, interestingly, (rand xx 100_000)[*-1] takes only 2 seconds 02:54
it the access of the last element optimized or something? 02:55
02:55 Ben_Goldberg left
TimToady eager could be more efficient, but it didn't seem to help here 02:55
02:55 Ben_Goldberg joined
grondilu (map { rand }, ^100_000)[*-1] # 10 seconds 02:56
02:56 Ben_Goldberg left
grondilu go figure 02:56
02:56 Ben_Goldberg joined
psch oh, right 02:57
grondilu++ # pointing me at the folly in my bench
the 2 orders of magnitude mentioned before were actually thunking overhead
'cause i ran < rand xx 1_000_000 > vs < rand x 1_000_000 > - the latter being p5
m: for ^1_000_000 { rand }; say now - INIT now 02:58
camelia rakudo-moar 6d9701: OUTPUT«0.35346198␤»
02:58 Ben_Goldberg left, Ben_Goldberg joined
grondilu ^ this takes 2 seconds on my machine 02:58
psch grondilu: well, camelia rebuilds at :48, among two others iirc 02:59
not sure if the commits between your build and current camelia matter, though
also, now - INIT now obviously skips at least a bit of runtime 03:00
grondilu wow:
psch like, at least as much as it takes to reach INIT time, however much that might be :)
grondilu $ $ time perl6 -e 'say [+] do for ^100_000 { rand };'
real 0m24.977s 03:01
user 0m24.720s
psch shrugs and goes back to correctness before performance 03:04
03:06 zengargoyle left 03:07 zengargoyle joined 03:12 yqt left
Ben_Goldberg m: say BEGIN { time } - INIT { time } 03:12
camelia rakudo-moar 6d9701: OUTPUT«0␤»
TimToady m: say INIT { now } - BEGIN { now } 03:14
camelia rakudo-moar 6d9701: OUTPUT«0.01202545␤»
03:14 Ben_Goldberg left
TimToady time is POSIXly only accurate to seconds 03:15
03:15 Ben_Goldberg joined 03:16 Ben_Goldberg left, Ben_Goldberg joined
grondilu m: say .elems given my @ = 1, slip 0 xx 100; 03:25
camelia rakudo-moar 6d9701: OUTPUT«101␤»
grondilu m: say .elems given my @ = slip 0 xx 100, 1;
camelia rakudo-moar 6d9701: OUTPUT«2␤»
grondilu not sure this is ok
psch m: say .elems given my @ = slip (0 xx 100, 1); 03:26
camelia rakudo-moar 6d9701: OUTPUT«2␤»
psch m: say .elems given my @ = (slip 0 xx 100), 1;
camelia rakudo-moar 6d9701: OUTPUT«101␤»
psch m: say (slip ^10, 1).elems
camelia rakudo-moar 6d9701: OUTPUT«2␤»
psch m: say (slip(^109, 1).elems
camelia rakudo-moar 6d9701: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AZhHsjpLzk␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/AZhHsjpLzk:1␤------> 3say (slip(^109, 1).elems7⏏5<EOL>␤ expecting any of:␤ statement…»
psch m: say (slip(^10), 1).elems
camelia rakudo-moar 6d9701: OUTPUT«11␤»
psch grondilu: i came across exactly that recently, when writing tests for native is rw dispatch 03:27
grondilu: < sub foo(int $x) { $x + 1 }; is foo 5, 6 >, or thereaboiut 03:28
-i
grondilu: there's no way for any given sub call to know when to stop parsing the following infix:<,> as arguments
m: sub f($) { }; say f 1, 2 # blergh
camelia rakudo-moar 6d9701: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6w3JYdGmPt␤Calling f(Int, Int) will never work with declared signature ($)␤at /tmp/6w3JYdGmPt:1␤------> 3sub f($) { }; say 7⏏5f 1, 2 # blergh␤»
psch grondilu: well, except for parens of course :)
03:30 noganex_ joined
TimToady arguably we could put slip into the same precedence level as so and not 03:31
psch ...that's the kind of thinking i don't quite have yet vOv
but yes, slip seems special enough to let it be different that general sub calls 03:32
03:33 noganex left
psch m: say my @ = so 0, not 1 03:35
camelia rakudo-moar 6d9701: OUTPUT«[False False]␤»
psch well, that's definitely waterbedding
moving slip prec, i mean
TimToady we'd see a lot more slip 1..10 03:36
grondilu m: my Real @a = 1; my Real @b = 0, 0, 1; say @a «+» @b; # quite unexpected
camelia rakudo-moar 6d9701: OUTPUT«[1 1 2]␤»
grondilu oh wait, I see
TimToady though usually those end up in a flat anyway
grondilu how can I add numeric arrays of different size, filling blanks with 0? 03:37
03:37 eliasr left
grondilu (if you see what I mean) 03:38
psch grondilu: <<+>> expands the shorter side with itself 03:41
grondilu yeah
psch grondilu: so [1] <<+>> [1,2,3] means [1], * ... * <<+>> [1,2,3]
err
grondilu: so [1] <<+>> [1,2,3] means ([1], * ... *) >>+<< [1,2,3] # a bit more precise, i think
PerlJam except that won't actually work. :) 03:43
psch PerlJam: right, "a bit"... :/
i can't think of anything worky that doesn't involve manually filling @a to +@b elems
PerlJam me either
grondilu m: sub vector-sum(@a, @b) { gather for ^max(+@a,+@b) { take (@a[$_]//0) + (@b[$_]//0) } }; say vector-sum([1], [0, 0, 1])
camelia rakudo-moar 6d9701: OUTPUT«(1 0 1)␤»
grondilu that's meeeh 03:44
so dull
psch grondilu: well, it's "make hard things possible" not "make hard things super concise and amazing". i think the latter is what APL does or something..? ;)
PerlJam Seems like a policy of filling with identity elements would be more useful than filling with another copy of the array
grondilu lol
PerlJam: agreed 03:45
though it's definitely arguable 03:46
PerlJam I'm pretty sure it has been argued before too ;) 03:48
psch m: enum Foo <a>; Foo.^add_method('bar', sub ($fles: ) { say $fles }); Foo.bar.say 03:50
camelia rakudo-moar 6d9701: OUTPUT«Cannot bind to non-existing object lexical 'self'␤ in sub at /tmp/2YlONoWBDz:1␤ in block <unit> at /tmp/2YlONoWBDz:1␤␤»
psch j: enum Foo <a>; Foo.^add_method('bar', sub ($fles: ) { say $fles }); Foo.bar.say
camelia rakudo-jvm 6d9701: OUTPUT«java.lang.NullPointerException␤ in sub at /tmp/XmevxipF1i:1␤ in block <unit> at /tmp/XmevxipF1i:1␤␤»
psch welp, they agree somethings wrong...
the interesting bit is, i'm not even actually using self... vOv 03:51
moar has a check there jvm doesn't, but clearly something else is wrong in the lookup or somesuch...
re: expanding shorter side, i think repetition is more intuitive 03:52
that's just intuition though, and i think i'm mostly confident in it because it's what seems to be established already... :S
TimToady «+» basically goes with APL semantics 03:53
what we might do is modify »+« to check to see if there's a meaningful default on the small side, and use that 03:54
03:55 TEttinger joined
grondilu that may be a bit much to ask but maybe hyperops should check whether the operator they are applied to is a group operation and thus has a neutral element. 03:55
psch wouldn't that break e.g. "foo-" <<~>> @list-of-stuff-without-foo-prefix 03:56
m: say [~]
camelia rakudo-moar 6d9701: OUTPUT«␤»
grondilu &[~] is not a group operation
psch oh. what is a group operation? 03:57
grondilu (but it has a neutral element, so nevermind)
psch: nah forget it
psch grondilu: i recognize that you realized that not only group operations have a neutral element, but what did you mean when talking about group operations? 03:58
grondilu I supposed the "repeat the shortest list" has to be useful in many cases
psch ('cause i really don't know, and would like to :P )
03:58 aborazmeh left
psch well, i do know algebraic groups, but i don't see transfering of those to all the ops we have as applicable 04:00
so that's probably the "nah forget i"
+t
PerlJam grondilu: but it's easy enough for the programmer to say "endlessly repeat this list" and harder to say "fill with some element until it matches the shape of the longer list" 04:02
04:02 kid51 left 04:03 grondilu left, Ben_Goldberg left, lizmat joined 04:04 Ben_Goldberg joined, bombless_ left, grondilu joined 04:06 bombless_ joined
grondilu m: my @a = 1; my @b = 0, 0, 1; say (@a, 0 xx *)[^@b] Z+ @b 04:07
camelia rakudo-moar 6d9701: OUTPUT«Cannot .elems a lazy list␤ in block <unit> at /tmp/Uz5XvPo5GW:1␤␤Actually thrown at:␤␤»
psch neat 04:08
lizmat .botsnack
yoleaux :D
synbot6 om nom nom
psch "Actually thrown at:\n"
grondilu m: my @a = 1; my @b = 0, 0, 1; say ((flat @a, 0 xx *) Z+ (flat @b, 0 xx *))[^max(+@a, +@b)];' 04:10
camelia rakudo-moar 6d9701: OUTPUT«5===SORRY!5=== Error while compiling /tmp/P6xUJ5Qzo_␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/P6xUJ5Qzo_:1␤------> 3 Z+ (flat @b, 0 xx *))[^max(+@a, +@b)];'7⏏5<EOL>␤ expecting any of:␤ sing…»
grondilu m: my @a = 1; my @b = 0, 0, 1; say ((flat @a, 0 xx *) Z+ (flat @b, 0 xx *))[^max(+@a, +@b)];
camelia rakudo-moar 6d9701: OUTPUT«(1 0 1)␤»
04:11 ha joined 04:12 TimToady left, ha left 04:14 TimToady joined
grondilu m: my @a = 1; my @b = 0, 0, 1; say ((flat @a, 0 xx (@b-@a)) Z+ (flat @b, 0 xx (@a-@b)) 04:16
camelia rakudo-moar 6d9701: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1kvokSFhmR␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/1kvokSFhmR:1␤------> 030 xx (@b-@a)) Z+ (flat @b, 0 xx (@a-@b))7⏏5<EOL>␤ expecting any of:␤…»
grondilu m: my @a = 1; my @b = 0, 0, 1; say ((flat @a, 0 xx (@b-@a)) Z+ (flat @b, 0 xx (@a-@b)))
camelia rakudo-moar 6d9701: OUTPUT«(1 0 1)␤»
04:16 bombless_ left
grondilu m: my @a = 1; my @b = 0, 0, 1; say (flat @a, 0 xx @b-@a) Z+ flat @b, 0 xx @a-@b 04:18
camelia rakudo-moar 6d9701: OUTPUT«(1 0 1)␤»
grondilu not too bad, but not great either
04:20 softmoth_ joined
dalek kudo/nom: 01747cb | lizmat++ | src/core/Any.pm:
Make Any.sum 2x faster still
04:23
04:24 softmoth_ left
grondilu ^it's hard to see why this makes things faster :/ 04:25
Hotkeys interesting how something so simple looking can result in a 2x speed increase
grondilu: ++
dalek ast: a1e5aff | lizmat++ | S02-types/array-shapes.t:
Unfudge now passing tests
lizmat grondilu: no scope for the until 04:26
psch i'd have said "only one decl in total instead of per iteration" on a hunc
+h
lizmat and the my for the value outside of the loop
psch lizmat++ # perf work
Hotkeys oh neat
makes sense 04:27
lizmat it's a very hot loop for long lists/arrays
Hotkeys what is hot in this context
lizmat and there's not much else
konobi [Coke]: ping
lizmat Hotkeys: hot in the sense of often executed
Hotkeys ah
is it better to use .sum over [+] 04:28
lizmat that should not matter much anymore
grondilu .sum could be useful in a pipe 04:29
lizmat maybe you can notice it for very small lists
TimToady I think moving prifix:<|> to loose unary makes a lot of sense
PerlJam Perl 6 needs something akin to the white camel award. Maybe a "swift butterfly" for all of the optimization lizmat has been doing :) 04:30
Hotkeys oh
does
op =:= &infix:<+>
+ ?? &sum
TimToady the only casualty is the usage that goes |<a b c> xx 3
Hotkeys make it just call sum
when used like [+]
TimToady yes, that's what it does 04:31
Hotkeys fancy
grondilu |@array xx $n is quite a useful expression imho
could become a major idiom
TimToady I think we have more |(1..10) right now that could be |1..10 04:32
grondilu that would be nice indeed
TimToady and there's either flat or .Slip for the other
adu lizmat: what do you mean "the my"?
lizmat my $value; 04:33
adu lizmat: so "my" = "variable declaration"
lizmat that's what you usually use to declare variables in Perl 6, yes 04:34
grondilu have you consider writing a tool that would read RC code and the core in order to find out what are the most useful idioms and stuff?
lizmat you usually want to have them lexically scoped, hence the "my"
Hotkeys you mean i shouldn't use 'our' for everything?
:p
grondilu (though that would be quite a undertaking, I guess) 04:35
adu lizmat: I'm still learning Perl6, and I didn't start with Perl5, so I'm learning a lot
lizmat Hotkeys: probably, yes
konobi it's similar to var/let in javascript
lizmat adu: good to know, so we can adapt our answers for you (and take less for granted :-) 04:36
psch .oO( but we have let too..? )
Hotkeys or Dim in VB
konobi and of course javascript's strict mode comes directly from perl5 too
Hotkeys had to take a VB course in HS
Hotkeys wanted to die
metaphorically of course
psch Hotkeys: i did pascal (and delphi) in my national HS equivalent
two different courses
while i was learning C on the side with the q3sdk... 04:37
Hotkeys actually in senior year I asked the teacher if I could use C# instead and she said yes
so that was much less painful
adu lizmat: my background is lex, yacc, ANTLR and Python, and so far I haven't found something that Perl6 doesn't do better
Hotkeys permutations
unless that was optimized recently
TimToady adu: well, except maybe run fast :) 04:38
flussence asked to use PHP in HS purely on practical grounds - the school computers would swapdeath for 15 minutes loading the java IDE we had to use...
Hotkeys lol
flussence wish I was exaggerating :( 04:39
adu TimToady: I'm not too concerned about that, actually, I'm more concerned about readability, maintainability, and working parsers
Hotkeys I enjoy writing in perl 6 and I don't need anything too performance-heavy right now
so I've been using it for things
llfourn wonders if he's the only one who didn't have programming available in HS....
konobi mmm... seems like perl6 could really do with some dtrace =0/
Hotkeys I still need to get around to trying to figure out where (specifically in which file(s)/line(s)) the windows repl is broken 04:40
but other than that it's peachy
konobi Hotkeys: termcap probably 04:41
04:58 ilogger2 joined, ChanServ sets mode: +v ilogger2 04:59 mprelude joined
dalek kudo/nom: 8ddc787 | lizmat++ | src/core/List.pm:
Another sum to beat the generic algo (30% faster)
05:00
05:00 M-Illandan joined
grondilu isBEKaml: I just run '$ time perl6 -e 'say [+] rand xx 100_000;' 05:01
but you can also use the 'now - INIT now' idiom 05:02
psch .tell nine actually, half a braino on my part. changing 'sub' in that example to 'method' works fine, for the enum itself and elements too... 05:04
yoleaux psch: I'll pass your message to nine.
05:04 silug joined
psch .tell jnthn nvm, confused myself with sub vs method 05:05
yoleaux psch: I'll pass your message to jnthn.
Hotkeys grondilu: oh that's a neat idiom
is there a list of idioms somewhere
grondilu not really. It's very subjective.
Hotkeys psch: I changed that line to nqp::setinputlinesep($stdin, "\r\n"); 05:06
it works buttery smooth now
psch Hotkeys: better just remove it complete
Hotkeys oh
psch Hotkeys: 'cause we set the line ending in Handle.pm
Hotkeys alright
psch Hotkeys: if you'd PR as you have it locally you'd break the linux repl :)
(i am assuming you want to PR this...)
Hotkeys (probably?)
I've never actually PR'd before what is the proper procedure 05:07
Hotkeys is a babby contributor
psch Hotkeys: for the project on github, push to your fork (in a branch or no), click "create a pull request" on the github website
konobi Hotkeys: have a peek at tput and the win32 cap
psch *fork
isBEKaml grondilu: Nice, 2.23s 05:09
psch gets some shuteye... o/
lizmat goes to sleep as well
grondilu m: role Foo does Numeric { method Numeric {...} }; say +$_ given [^10] but Foo; # not sure this is OK 05:10
camelia rakudo-moar 01747c: OUTPUT«Ambiguous call to 'Numeric'; these signatures all match:␤:(List:D $: *%_)␤:(Numeric:D $: *%_)␤ in block <unit> at /tmp/U9LR4cK72G:1␤␤»
grondilu I vaguely recall having stumbled upon a similar issue before, while trying to implement the Numeric role in a custom role. 05:11
Shouldn't Foo.Numeric prevail, as it is defined in the current file or something? 05:12
05:15 kanishka joined 05:18 tokuhiro_ joined
Hotkeys oh wow 05:18
permutations is a lot faster than it used to be
I rescind my earlier comment
wait
I lied 05:19
I rescind my rescinding
05:21 kanishka left 05:22 tokuhiro_ left 05:30 znpy joined
znpy p6 05:30
p6: say 3.WHAT; 05:31
camelia rakudo-moar 8ddc78: OUTPUT«(Int)␤»
M-Illandan p6: say 42 ## test 05:35
camelia rakudo-moar 8ddc78: OUTPUT«42␤»
05:47 kaare_ joined
Hotkeys pull request done 05:57
this is exciting
05:58 znpy left 06:00 bombless_ joined 06:01 znpy joined 06:02 isBEKaml_ joined 06:03 Actualeyes joined 06:05 Actualeyes left 06:06 Actualeyes joined, Actualeyes left 06:08 isBEKaml_ left
AlexDaniel h 06:18
06:20 Averna joined
znpy hey guys, do you know if there is going to be books like "Learning Perl 6" or "Programming Perl 6" ? 06:22
also, is it my impression or Perl is losing its historic camel mascotte for the new butterfly mascotte ?
grondilu talking about permutations, I know how to make it faster 06:23
Hotkeys the butterfly is just for perl 6
grondilu: please do :P 06:24
znpy: I'm sure once perl releases around christmas a book might get started
s/perl/perl 6/
znpy Hotkeys: so the Camel is still the mascotte ? 06:25
grondilu gist.github.com/grondilu/115db8332c875b440ba8
Hotkeys for perl 5
llfourn znpy: perl5 => camel/raptor, perl6 => butterfly
Hotkeys ^^
znpy oh 06:26
:(
llfourn perl7 => butterfy on a camel smoking a cigar
Hotkeys I approve 06:27
grondilu I guess I should make a pull request but my rakudo fork is not properly setup I'm afraid.
llfourn grondilu: what do you mean? 06:28
grondilu I think it's supposed to be a proper fork (under my name), but currently it's just a clone. 06:29
06:29 raiph joined
llfourn just fork it on GH and add remote 06:29
then push to your GH fork and then PR
grondilu oh crap, I think I forked it under the wrong name. 06:31
github asked under which name I'd like to fork it. It proposed "grondilu" and "perl6". I chose perl6, and now it's github.com/perl6/rakudo, which is quite unexpected. 06:32
06:33 Sgeo_ joined
llfourn grondilu: haha nice 06:33
Hotkeys grondilu: oh wow that is a lot faster
06:33 Averna left
llfourn yeah your gonna waanna delete that :P 06:33
TimToady znpy: the camel is just the larval form of the butterfly
Camelia's wingspan is really about 3 meters
znpy TimToady: even though I am not a professional perl programmer, I was/am quite attached to the camel. 06:34
JimmyZ grondilu: 'take' is slow :P
znpy i guess i'll have to accept it
Hotkeys lol TimToady 06:35
llfourn The camel will still be around for a while I'm sure ;)
06:35 raiph left
Hotkeys it just did permutations(8).reverse[0] in 6.7 seconds versus 42.5 seconds for the current version 06:38
I'm not going to try any higher because it took several minutes last time I tried permutations(9)
TimToady eager might help 06:39
grondilu jeez I still don't understnad how git works
Hotkeys relevant xkcd.com/1597/
grondilu somebody just add a my @permutations = permutations($n - 1) 06:41
llfourn grondilu: I can help you with git if you like :D
06:42 xpen joined
grondilu I did, but here it is again: gist.github.com/grondilu/115db8332c875b440ba8 06:42
Hotkeys I know enough to make changes and commit to a branch in a fork and pull request
that's all I need
JimmyZ well, you can edit it on the github web, it will fork and create pull request for you. 06:43
grondilu for various reasons IIRC it's better to keep it lazy, thus using a gather/take
JimmyZ grondilu: using Seq is lazy too.
grondilu JimmyZ: I thought I had tried that, but I did not see the pull request in rakudo/rakudo, only in my fork, which is pretty dumb. 06:44
JimmyZ most core setting gather/take code will be written by return Seq 06:45
grondilu though I guess I shouldn't have forked first and then edit, rather edit and let github fork, but I thought that would be the same.
JimmyZ grondilu: yeah, just edit it on rakudo/rakudo
grondilu ok I'll do it if Hotkeys has not done it already 06:46
Hotkeys Your code you get credit :p
JimmyZ grondilu: the example gather/take to Seq: github.com/rakudo/rakudo/commit/08...423a1f952a 06:47
06:50 Averna joined
grondilu I guess I should remove github.com/perl6/rakudo created by mistake 06:52
llfourn grondilu: yes please :) 06:53
grondilu done 06:54
llfourn \o/
06:58 hankache joined
llfourn grondilu: there is a test for permutations: github.com/perl6/roast/blob/master...utations.t 06:59
probs a good idea to run it
zengargoyle some folks might want to try git-hub (the tool). git hub -t clone <repo> # forks, then clones, then sets clone up to pull from original and push to forked
and git hub new # creates a pull-request 07:00
07:02 CIAvash joined, hankache left 07:18 hankache joined 07:21 tokuhiro_ joined
ShimmerFairy m: my grammar G { token TOP { <foo> }; proto token foo {*}; token foo:sym<specific> { abc { say "HIT" } <!> }; token foo:sym<general> { \w+ { say "HIT TOO" } } }; G.parse("abc") # something that's bugged me for a long time 07:21
camelia rakudo-moar 8ddc78: OUTPUT«HIT␤HIT TOO␤»
ShimmerFairy Specifically, the fact that there seems to be backtracking when the <!> is hit, in spite of the fact that I specifically use 'token' to avoid backtracking :) 07:22
Are the NYI ::, :::, and friends the only way to handle this, or could this be considered a bug? If it's intended, I'd like to understand why. 07:23
moritz ShimmerFairy: trying out different alternatives isn't backtracking
ShimmerFairy moritz: true, it's not backtracking in the regex sense, but it certainly is backtracking in the everyday "no wait, hang on" sense :)
(my bad, I had a feeling that it wasn't quite backtracking) 07:24
moritz ShimmerFairy: "token" only forbids proper backtracking, not your onw definition of it
it would be pretty pointless to allow | or || in tokens if they never took anything except the first branch
ShimmerFairy It still stands that I hate having to add ridiculous <!before abc> style preconditions to the general cases 07:25
I don't know how the rakudo source handles it; I thought the use of {} (presumably to force the end of a declarative portion) was a substitute for :: or whatever, but that doesn't seem to be the case. 07:26
moritz what exactly do you want to happen if the first branch matched?
07:26 tokuhiro_ left
ShimmerFairy moritz: really, I guess I want :: to be implemented. Being able to write abc :: <!> would make it so that you can go backwards ("backtrack") past the ::, and thus can't try another branch 07:28
moritz: btw, for what it's worth ::, ::>, and so on are all documented in S05 under "Backtrack control", along with : , so I think Perl 6 would agree with my usage of the term :) 07:29
moritz ShimmerFairy: then maybe you should implement :: :-)
ShimmerFairy moritz: believe me, I've thought about it lots of times. I have a feeling it's really really hard, though I'm slowly getting more annoyed with not having it :P 07:30
[Coke] .botsnack
yoleaux :D
synbot6 om nom nom
ShimmerFairy "The :: also has the effect of hiding any declarative match on the right from "longest token" processing by |." Huh, so it seems the "{} trick" is at least partially a :: substitute. 07:32
[Coke] .tell konobi I do some testing. I wouldn't say I handle the infrastructure. What's your question? 07:33
yoleaux [Coke]: I'll pass your message to konobi.
07:51 darutoko joined, Averna left 07:52 Averna joined, bombless_ left
grondilu I don't understand why but it appears that my patch to permutations does not make it faster once in the core. 07:53
07:56 xiaomiao joined
grondilu ah no, I just did not correctly write it locally 07:56
07:59 bombless_ joined 08:18 rindolf joined 08:20 xfix joined 08:35 diana_olhovik joined 08:39 diana_olhovik left, rurban joined 08:40 bombless_ left
moritz fwiw grondilu++'s patch sped up permutations(7) from 6.4s to 1.3s here 08:44
08:45 domidumont joined
[Coke] url? 08:46
moritz github.com/rakudo/rakudo/pull/585
spectesting now.
dalek kudo/nom: 57b83f4 | grondilu++ | src/core/native_array.pm:
improve permutations

using @permutations avoids computing permutations($n - 1) several times
Signed-off-by: Moritz Lenz [email@hidden.address]
08:51
09:02 molaf joined, c0r5um joined 09:03 hankache left 09:08 Averna left 09:15 hankache joined
hankache m: my Num $var = 0.1; 09:15
camelia rakudo-moar 57b83f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/d3NDYvVYJC␤Cannot assign a literal of type Rat (0.1e0) to a variable of type Num. You can declare the variable to be of type Real, or try to coerce the value with 0.1e0.Num or Num(0.1e0), or just write the va…»
hankache what is wrong? 09:16
Hotkeys Rat is not a subset of Num 09:17
hankache ok but what is the Num representation of 0.1 then?
Hotkeys you could do Real(0.1) 09:18
I lied
do Num(0.1) 09:19
hankache m: my Num $var = 0.1e0;
camelia ( no output )
Hotkeys or 0.1.Num
or that too
m: my Num $var = 0.1e0; say $var;
camelia rakudo-moar 57b83f: OUTPUT«0.1␤»
hankache m: my Num $var = 0.1e0; say $var.WHAT;
camelia rakudo-moar 57b83f: OUTPUT«(Num)␤»
hankache Isn't it a bit misleading? 09:20
m: my Rat $var = 1;
camelia rakudo-moar 57b83f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2QkuEH3Vzg␤Cannot assign a literal of type Int (1) to a variable of type Rat. You can declare the variable to be of type Real, or try to coerce the value with 1.Rat or Rat(1), or just write the value as 1.0…»
hankache m: my Rat $var = 1.0;
camelia ( no output )
Hotkeys Rat is just how floating points are represented by default in perl 6 09:21
it allows for things like
hankache since I am saying the var is Rat
Hotkeys m: say .1 + .2 - .3
camelia rakudo-moar 57b83f: OUTPUT«0␤»
hankache why do i still have to say 1.0
Hotkeys I'm not an expert on the type system in perl
hankache Hotkeys: yes if using Num 0.1 + 0.2 will return an approximation 09:22
Hotkeys yes
hankache m: 0.1e0 + 0.2e0; 09:23
camelia rakudo-moar 57b83f: OUTPUT«WARNINGS:␤Useless use of "+" in expression "0.1e0 + 0.2e0" in sink context (line 1)␤»
hankache m: say (0.1e0 + 0.2e0);
camelia rakudo-moar 57b83f: OUTPUT«0.3␤»
hankache oops
m: 0.1e0.WHAT.say;
camelia rakudo-moar 57b83f: OUTPUT«(Num)␤»
Hotkeys m: say 0.1e0 + 0.2e0 - 0.3e0;
camelia rakudo-moar 57b83f: OUTPUT«5.55111512312578e-17␤»
hankache Hotkeys++ 09:24
Hotkeys m: say 0.3.nude;
camelia rakudo-moar 57b83f: OUTPUT«(3 10)␤»
Hotkeys fractions make math nice
09:24 Averna joined
Hotkeys m: say 0.3333.nude; 09:24
camelia rakudo-moar 57b83f: OUTPUT«(3333 10000)␤»
hankache what i was saying is if I define my Rat $var 09:25
assigning to it 1 still gives an error
09:25 diana_olhovik joined
Hotkeys 'Rat objects store rational numbers as a pair of a numerator and denominator. Number literals with a dot but without exponent produce Rats.' 09:25
hankache i have to explicitly assign 1.0
Hotkeys it's just how they're represented
hankache i guess 09:26
Hotkeys you can always
m: my Rat $var = 1.Rat; say $var;
camelia rakudo-moar 57b83f: OUTPUT«1␤»
Hotkeys but at that point might as well use a .0
hankache exactly
pink_mist m: my Rat() $foo = 1; say $foo; # I thought this used to work? 09:27
camelia rakudo-moar 57b83f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/27DBKzRQXP␤Coercion Rat(Any) is insufficiently type-like to qualify a variable␤at /tmp/27DBKzRQXP:1␤------> 3my Rat() $foo7⏏5 = 1; say $foo; # I thought this used to␤ expecting any of:␤ …»
Hotkeys idk 09:32
moritz pink_mist: no, it only ever worked in signatures 09:33
pink_mist: the thing that now works on variables are type smilies, so you can say my Rat:D $var = 1.0
09:34 domidumont1 joined
dalek kudo/nom: 6268b83 | moritz++ | docs/ChangeLog:
More ChangeLog entries
09:36
Hotkeys I like the smilies
they make my code look happy
even when it gets angry
I also like that the (nu)merator (de)nominator sub is called .nude 09:37
09:37 domidumont left
Hotkeys also hankache, when you opt-in to type checking you can't complain when it checks your type :P 09:38
hankache Hotkeys i guess 09:42
i just thought that it will coerce 1 to 1.0 since I specified Rat 09:43
[Tux] test 50000 21.876 21.760
test-t 50000 18.294 18.178
pink_mist well, /I/ specified coercion ... but it didn't work out :P 09:44
[Tux] tony-o_, csv-parser *** 10004 8.458 8.342
that should have been 50000 instead of 10004. Is it in a state of being broken? 09:45
hankache pink_mist yes that is what i meant
Hotkeys go to "21:28 CurtisPoe" in irclog.perlgeek.de/perl6/2015-09-18/text
there is a conversation about this topic
09:46 eternaleye joined
pink_mist irclog.perlgeek.de/perl6/2015-09-18#i_11242555 <-- this might be a more useful link then :P 09:47
(and I was there, which was why I thought Rat() would work ... but I see TimToady++ trying that already there
and it didn't)
Hotkeys that's a smart link 09:50
hankache TBH it doesn't matter I was just trying to understand what works what doesn't
but i agree that if you choose to strongly type than you have to write 1.0 09:51
09:51 bombless joined
Hotkeys I just dynamic type most of the time because dealing with types is for nerds 09:51
nine Hotkeys: or for people who don't like to debug stupid mistakes ;) 09:53
yoleaux 04:49Z <psch> nine: something related to your bool_enum problem already happens in nom
04:49Z <psch> nine: as in, adding a method to an enum in nom already reaches similar problem
04:49Z <psch> nine: < enum Foo <a>; Foo.^add_method('bar', sub ($fles: ) { say $fles }); Foo.bar.say > is an example, which "Cannot bind to non-existing object lexical 'self'"
05:04Z <psch> nine: actually, half a braino on my part. changing 'sub' in that example to 'method' works fine, for the enum itself and elements too...
Hotkeys nine: nerd
hankache i like strong typing as nine put it it saves a lot of time in debug
Hotkeys I type sub parameters and such usually 09:55
I'm sure if I was doing a non-personal project I would care more about type safety
hankache i guess what i was asking for is strong typing with an option to implicit conversion 09:56
i am reading the irc log you just pointed 09:57
i guess masak has a point
09:57 domidumont1 left
hankache bottom line: you either want dynamic or safe, you can't have both at the same time 09:58
time to go figure out what those smilies do :) 10:01
bbiab
10:07 diana_olhovik left, RabidGravy joined
hankache can someone give me a FatRat example 10:09
thank
thanks*
m: my Rat $var = 1.0; 10:10
camelia ( no output )
hankache like this ^ but for FatRat
10:10 Sgeo joined
hankache i am also trying to mimic when .1 + .2 returns 0.30000000000000004 any idea which data type i should choose? 10:12
10:13 Sgeo_ left
RabidGravy m: my $m = 1.FatRat + 0.000000001; say $mWHAT; 10:16
camelia rakudo-moar 6268b8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xel2PByiqs␤Variable '$mWHAT' is not declared. Did you mean '&WHAT'?␤at /tmp/xel2PByiqs:1␤------> 3my $m = 1.FatRat + 0.000000001; say 7⏏5$mWHAT;␤»
10:16 vendethiel joined
RabidGravy m: my $m = 1.FatRat + 0.000000001; say $m.WHAT; 10:16
camelia rakudo-moar 6268b8: OUTPUT«(FatRat)␤»
RabidGravy you can make an Int or Rat into a FatRat by calling .FatRat on it and then any arithmetic operation involving that will result in FatRat 10:17
hankache m: say 0.1.FatRat + 0.2.FatRat; 10:21
camelia rakudo-moar 6268b8: OUTPUT«0.3␤»
hankache m: say 0.1.Num + 0.2.Num;
camelia rakudo-moar 6268b8: OUTPUT«0.3␤»
hankache :(
to what type should i coerce to get 0.30000000000000004 10:22
?
RabidGravy why do want the wrong answer?
10:23 Skarsnik joined
hankache RabidGravy to compare it to Rat and say: Perl 6 has your arithmetic done correctly 10:23
but i need to mimic the wrong result
dalek kudo/curli: f2193cc | (Stefan Seifert)++ | src/Perl6/World.nqp:
Fixup: remove debug output from "Turn lib into a proper pragma"
pink_mist maybe you can use one of the lower-case types? is there a real/float/double like there is an int? 10:24
10:24 domidumont joined
hankache so i can say this is what happens if you use python repl for example 10:24
and this is what happens if you use Perl 6 repl 10:25
10:25 spider-mario joined
hankache out of the box correct results 10:25
pink_mist well, easier to then just use a python repl :P
RabidGravy m: say sprintf "%.32f", 0.1.Num + 0.2.Num 10:26
camelia rakudo-moar 6268b8: OUTPUT«0.30000000000000000000000000000000␤»
RabidGravy still get the right result
hankache RabidGravy: Perl 6 is right even when you're wrong :D
catchy marketing line 10:27
RabidGravy I suspect that under the hood a lot of work is going on to make sure that it is very difficult to get the wrong answer 10:28
hankache pink_mist i think i'll just use the python repl
i think you can't reproduce the error because internally everything gets converted to Rat 10:29
but i am no expert 10:30
Perl 5 get it right also out of the box 10:32
vendethiel hankache: no it doesn't; try "print 0.3 == 0.1 + 0.2" 10:33
nine It's just rounding on output
hankache ruby and python don't get it right 10:34
m: print 0.3 == 0.1 + 0.2
camelia rakudo-moar 6268b8: OUTPUT«True»
vendethiel hankache: I meant in perl 5.
hankache need to go 10:37
thank you everyone for your guidance
RabidGravy Perl 5 gives you "0.30000000000000004440892098500626"
(or it does here)
10:38 bombless left
hankache RabidGravy in Perl 5: my $var = 0.1; my $var2 = 0.2; say $var+$var2; returns 0.3 10:39
mrf m: "aaa-222-aaa" ~~ /<[a..z]><[a..z0..9-]>*<[a..z0..9]>/; say $/.perl;
camelia rakudo-moar 6268b8: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "aaa-222-aaa", to => 11, from => 0)␤»
hankache sorry print $var+$var2
RabidGravy perl -E ' say sprintf "%.32f", 0.1 + 0.2 '
mrf is there a way to make ^ not consume the last char in the greedy *?
RabidGravy *? 10:40
10:41 hankache left
mrf RabidGravy: would that not make it get no chars? 10:41
RabidGravy less greedy
mrf m: "aaa-222-aaa" ~~ /<[a..z]><[a..z0..9-]>*?<[a..z0..9]>/; say $/.perl;
camelia rakudo-moar 6268b8: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "aaa-222-aaa", to => 2, from => 0)␤»
pink_mist mrf: I don't think the greedy * does consume the last char ... or the pattern wouldn't match
mrf pink_mist: it doesn't match
pink_mist it doesn't? 10:42
it seems to match from the 0th character to the 11th
though I guess I don't quite understand how the match object works
mrf m: "aaa-222-aaa" ~~ /<[a..z]><[a..z0..9-]>*?<[a..z0..9]>/; say $/; 10:43
camelia rakudo-moar 6268b8: OUTPUT«「aa」␤»
mrf m: "aaa-222-aaa" ~~ /<[a..z]><[a..z0..9-]>*<[a..z0..9]>/; say $/;
camelia rakudo-moar 6268b8: OUTPUT«「aaa-222-aaa」␤»
pink_mist see, it matches
mrf hmm. I think the example I am using is hiding my issue.
In a token that would fail.
ab5tract_ o/ #perl6 10:45
mrf m: grammar G {token label {<[a..z]><[a..z0..9-]>*<[a..z0..9]>}: token domain {<label>+ % '.'}; }; G.parse('aaa-22-aa2.foo', :rule<domain>).say;
camelia rakudo-moar 6268b8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/49a8gZqwT_␤Confused␤at /tmp/49a8gZqwT_:1␤------> 3el {<[a..z]><[a..z0..9-]>*<[a..z0..9]>}:7⏏5 token domain {<label>+ % '.'}; }; G.par␤ expecting any of:␤ colon pair␤»
RabidGravy m: aaa-222-aaa" ~~ /$<a>=<[a..z]>$<b>=<[a..z0..9-]>*$<c>=<[a..z0..9]>/; say $/<a>, $/<b>, $/<c>;
camelia rakudo-moar 6268b8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8Qc8fKO8Lg␤Two terms in a row␤at /tmp/8Qc8fKO8Lg:1␤------> 3aaa-222-aaa7⏏5" ~~ /$<a>=<[a..z]>$<b>=<[a..z0..9-]>*$<␤ expecting any of:␤ infix␤ infix stopper␤ statement…»
mrf m: grammar G {token label {<[a..z]><[a..z0..9-]>*<[a..z0..9]>}; token domain {<label>+ % '.'}; }; G.parse('aaa-22-aa2.foo', :rule<domain>).say;
camelia rakudo-moar 6268b8: OUTPUT«(Any)␤»
ab5tract_ quick question: is there an instrospection method for Uni that can reveal the width of a character? 10:46
as in single or double width.
mrf a subdomain is defined as a letter followed by any number of letter/digit/ghyphens followed by a letter or digit.
RabidGravy: Missing "? 10:47
m: "aaa-222-aaa" ~~ /$<a>=<[a..z]>$<b>=<[a..z0..9-]>*$<c>=<[a..z0..9]>/; say $/<a>, $/<b>, $/<c>; 10:51
camelia rakudo-moar 6268b8: OUTPUT«「a」「aa-222-aa」「a」␤»
mrf is confused
m: "aaa-222-aaa.foo" ~~ /[$<a>=<[a..z]>$<b>=<[a..z0..9-]>*$<c>=<[a..z0..9]>]+ % '.'/; say $/<a>, $/<b>, $/<c>; 10:53
camelia rakudo-moar 6268b8: OUTPUT«[「a」 「f」][「aa-222-aa」 「o」][「a」 「o」]␤»
mrf why does the regex work by the grammar doesn't!!!!
ab5tract_ mrf: afaik tokens do not backtrack, but regex do 10:54
not sure if this explains the behavior you are seeing or not, but it is a difference between the two
actually i think that might explain it pretty well
mrf m: grammar G {regex label {<[a..z]><[a..z0..9-]>*<[a..z0..9]>}; token domain {<label>+ % '.'}; }; G.parse('aaa-22-aa2.foo', :rule<domain>).say;
camelia rakudo-moar 6268b8: OUTPUT«「aaa-22-aa2.foo」␤ label => 「aaa-22-aa2」␤ label => 「foo」␤»
mrf ab5tract_++ # genius 10:55
ab5tract_: thank you so much
ab5tract_ no problem man!
nice trick by just using regex instead of token in the grammar! i wasn't aware that this was possible (haven't dipped my toes into the deep oceans of grammars yet) 10:56
10:56 diana_olhovik joined 10:57 xpen left
mrf ab5tract_: yeah the token keyword is just a way of saying regex without whitespace mattering and no back tracing. Rule is just regex with no back tracking 10:57
I love grammars but my brain hasn't really worked out the way you need to define them yet 10:58
arnsholt rule is token, but with whitespace mattering 11:00
11:00 autonomicon joined
ab5tract_ yeah, thats a good point arnsholt. whitespace doesn't matter by default in any regex, right? 11:00
arnsholt regex is with backtracking, no interpolation of <.ws> into whitespace 11:01
token has no backtracking, and no sigspace
mrf huh. I thought whitespace mattered in regex. Maybe thats my p5 brain remembering
arnsholt rule has no backtracking and sigspace
Yeah, whitespace is not syntactic in Perl 6 regexes 11:02
ab5tract_ . o ( how do we speak of all the "grammary" thingies at once? reg*xen? grammaria? )
mrf grammar? 11:03
11:04 Averna left, kjs_ joined
ab5tract_ but a grammar is a noun with a specific meaning within the context of what i'm taking about 11:08
s/context/contextual subset/
and its the least important one, as i want the word to collectively refer to regex/token/rule 11:09
dalek p: 8ffafe6 | (Stefan Seifert)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Hook up MoarVM's file locking ops
11:16
11:22 tokuhiro_ joined 11:26 tokuhiro_ left
mrf ab5tract_++ # getting my tests passing :D 11:30
11:32 kjs_ left 11:37 Ven joined 11:39 kjs_ joined 11:45 Ven left 11:46 vendethiel left, Ven joined
ab5tract_ cheers mrf! what are you hacking on? 11:51
mrf ab5tract_: ugexe wrote a load of grammars for rfcs whilst writing Gramamr::HTTP. It has not many tests so I am correcting that whilsty also moving them into a namespace ready for extraction to a seperate library of IETF grammars 11:53
ab5tract_ that sounds like some heavy lifting 11:54
mrf its not to bad. Just lots of repetative testing.
most of the hard work is already done by ugexe++. I am just rearranging 11:55
ab5tract_ well that's good to hear 12:16
Skarsnik hm what does that mean: 12:21
skarsnik@testperl6:~/devel/rakudo$ /usr/bin/perl t/harness --moar t/04-nativecall/12-sizeof.t 12:22
t/04-nativecall/12-sizeof.t .. Dubious, test returned 1 (wstat 256, 0x100)
it can't parse/run the file?
12:22 c0r5um left
bbkr_ cxreg: pong 12:23
mrf Skarsnik: Usually test died in some way. try running it without the harness and it shoudl show you whyt 12:25
nine Ah concurrency...always a challenge :) 12:26
bbkr_ .tell cxreg I'll be back online at 22 UTC today 12:28
yoleaux bbkr_: I'll pass your message to cxreg.
12:29 Ven left, Name_ joined 12:30 Ven joined, Name_ is now known as NameRequired
NameRequired g'day. i was wondering if perl6 is close to production readiness by now. christmas is coming 12:31
pink_mist I've heard of several people who already run it in production
and have been for some time
I don't think I'd do it personally though 12:32
12:32 telex joined
mrf NameRequired: It is AFAIU still on schedule for its first actual release in December. 12:32
NameRequired looks up strange acronym 12:33
pink_mist 'as far as I understand'
NameRequired that's great news. i got to go and buy a new book apparently 12:34
that logo though... 12:35
RabidGravy I don't believe that there is a currently up to date book
that is a new one hasn't been published in the last year as far as I know
mrf The documentation at docs.perl6.org however is pretty good and has a good search feature to 12:37
RabidGravy I haven't made rakudo segfault (by accident) in a month so I'd say it was good for production ;-)
mrf must remember to update the docs for ** 1^..^3 ranges as quantifiers in regexs 12:38
Skarsnik yes it works. I added a bool and size_t type in nativecall/rakudo moar :)
RabidGravy yay! 12:39
Skarsnik how I can submit this change? (I changed files affect rakudo/nqp/moar) 12:40
pink_mist make a pull request?
Skarsnik It 3 separate project (git repository) 12:41
RabidGravy yeah, you'll need separate pull requests (each referencing the order of dependency) I think
pink_mist so 3 pull requests :P
NameRequired rakudo: sub foo (Int $n where $n < 10) {}; foo(11)
camelia rakudo-moar 6268b8: OUTPUT«Constraint type check failed for parameter '$n'␤ in sub foo at /tmp/tmpfile:1␤ in block <unit> at /tmp/tmpfile:1␤␤»
NameRequired neat
rakudo: sub foo (Int $n where $n < 10) {}; foo(9) 12:42
camelia ( no output )
NameRequired i love that feature already :)
Skarsnik ok, since I am the perl6 group. I can create a branch to make a(3) pull request? 12:43
RabidGravy if you're going to do it more than one place you might consider a "subset" definition rather than doing it line
12:44 Averna joined, Averna left, Ven left
Skarsnik bool and size_t are C standard btw (bool is in C99) 12:45
NameRequired rakudo: subset SmallerThanTen of Int where 0 < * < 10; sub foo (SmallerThanTen $n) {}; foo(11)
camelia rakudo-moar 6268b8: OUTPUT«Constraint type check failed for parameter '$n'␤ in sub foo at /tmp/tmpfile:1␤ in block <unit> at /tmp/tmpfile:1␤␤»
NameRequired wow 12:46
rakudo: subset SmallerThanTen of Int where 0 < * < 10; sub foo (SmallerThanTen $n) {}; foo(9)
camelia ( no output )
NameRequired this is phantastic
12:46 Ven joined
RabidGravy Skarsnik, aren't rakudo and moarvm under their own "users" though? 12:46
NameRequired rakudo: subset SmallerThanTen of Int where 0 < * < 10; sub foo (SmallerThanTen $n) {}; foo(9.2)
camelia rakudo-moar 6268b8: OUTPUT«Type check failed in binding $n; expected Int but got Rat␤ in sub foo at /tmp/tmpfile:1␤ in block <unit> at /tmp/tmpfile:1␤␤»
Skarsnik m: sub foo(Int $a) {}; sub foo2(Int $a --> Int) {}; my int32 $b; foo($b); foo2($b); 12:47
camelia ( no output )
RabidGravy int32 is an Int ;-) 12:48
NameRequired shame there is no real CPAN6 though
RabidGravy m: say int32 ~~ Int
camelia rakudo-moar 6268b8: OUTPUT«True␤»
Skarsnik m: sub foo(Int $a) {}; sub foo2(Int $a --> Int) {}; my Num $b; foo($b); foo2($b);
camelia rakudo-moar 6268b8: OUTPUT«5===SORRY!5===␤Calling foo(Num) will never work with declared signature (Int $a)␤at /tmp/kB5rVNdlC3:1␤------> 3sub foo2(Int $a --> Int) {}; my Num $b; 7⏏5foo($b); foo2($b);␤Calling foo2(Num) will never work with declared signature (Int $a…»
Skarsnik hm what the use of --> then? x) 12:49
moritz return type checking
RabidGravy NameRequired, there are however already 452 different modules in the ecosystem
moritz m: sub f( --> Int ) { 'foo' }; f() 12:50
camelia rakudo-moar 6268b8: OUTPUT«Type check failed for return value; expected Int but got Str␤ in sub f at /tmp/3lqXF52Kzu:1␤ in block <unit> at /tmp/3lqXF52Kzu:1␤␤»
NameRequired moritz mein lieber! du erinnerst dich vielleicht an mich. "holli" bei PerlMonks. Ist schon ein paar Jahre her 12:51
Skarsnik it's to assert on the return type? or just the return type? I mean you can write sub foo returns Int
moritz NameRequired: what's your perlmonks username? 12:52
NameRequired holli 12:53
RabidGravy I think they are equivalent for the most part except --> in places where you can't put the returns
moritz Skarsnik: it's the same as 'returns', really
NameRequired: yes, I remember
NameRequired Is tina still around? you know, the girl with the arm thing 12:54
Skarsnik m: sub foo(--> Int, Str) {'foo'};
NameRequired and how are you?
camelia rakudo-moar 6268b8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gUF7MT8SlI␤Type 'Int' is not declared. Did you mean 'int'?␤at /tmp/gUF7MT8SlI:1␤------> 3sub foo(--> Int7⏏5, Str) {'foo'};␤»
RabidGravy gosh do people still use PerlMOnks? I don't think I logged in for at least five years
Skarsnik Intresting error xD
NameRequired RabidGravy: Me neither
moritz seems I've written 9 replies on perlmonks this year 12:57
m: say 6418 / (Date.today - Date.new('2007-05-21') 12:58
camelia rakudo-moar 6268b8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XhZZBSqdOX␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/XhZZBSqdOX:1␤------> 038 / (Date.today - Date.new('2007-05-21')7⏏5<EOL>␤ expecting any of:␤…»
moritz m: say 6418 / (Date.today - Date.new('2007-05-21'))
camelia rakudo-moar 6268b8: OUTPUT«2.070323␤»
moritz my average is still 2 posts per day, though :-)
RabidGravy as with all these things seeing the same questions over and over again gets tedious 12:59
13:00 Ven_ joined
NameRequired i see the mad scotsman is also logged into the channel. how come he hasn't told me to fucking rtfm yet? :D 13:02
13:02 Ven__ joined, Ven left, Ven_ left
NameRequired i understand rakudo is the implementation to go with, correct? 13:03
13:03 BenGoldberg joined
moritz yes 13:03
RabidGravy yes, it's the most complete and active
moritz s/most/only/ 13:04
Ven__ moritz: he's still right :P
RabidGravy apparently I last made a post on Perlmonks in January 2009 and before that December 2006 (which appears to be when I really stopped using it) 13:07
13:07 xpen joined
NameRequired Only 10 Megabytes? 13:07
Wow, that's really lightweight 13:08
RabidGravy there are other parts required 13:09
NameRequired I just installed the Windows version (yeah, yeah, i know). Seems to be complete (includes Moar) 13:11
RabidGravy ah right
there isn't the twenty five years of accreted modules that will never leave that Perl 5 has ;-) 13:12
dalek p: ae63fcd | johnspurr++ | src/HLL/Compiler.nqp:
Removed setting the input line separator
13:13
p: 8541494 | jnthn++ | src/HLL/Compiler.nqp:
Merge pull request #254 from johnspurr/rm-setinputlinesep

Removed setting the input line separator
13:15 Ven__ left, Ven joined
NameRequired well thanks for the infos. i gonna look into this. 13:21
as a reward i'll leave with this great newcomer band you got to check out: www.youtube.com/watch?v=TxZMfufRJf...-wUqkGy7Qy
bye
13:22 NameRequired left
nine It seems like $*PERL.compiler.id only changes when src/Perl6/Compiler.nqp is recompiled. That won't do. Any ideas on how to make it change on any settings recompilation? 13:23
RabidGravy maybe split that part out into some other file that is always regenerated? 13:25
13:26 kjs_ left 13:29 woolfy joined
RabidGravy if it was C I'd make a .h file that defined the one "#define COMPILER_ID ...." and adjust the makefile accordingly 13:29
13:29 woolfy left 13:30 Ven left, Ven joined 13:31 rurban1 joined, brrt joined, espadrine joined 13:36 rurban left
nine Seems like lizmat++ and jnthn++ discussed this off-channel, so I don't know the reasoning behind the current code :/ 13:36
lizmat good *, #perl6! 13:37
please make changes as you see fit
nine lizmat: so I just have to find out what would fit ;)
lizmat this was discussed between jnthn and me *before* his curli gist
nine: yes 13:38
moritz++ # get permutations catch 13:39
*good
lizmat is not awake yet
nine lizmat: do you still know why we would need the complicated construct of (IDHolder.WHO)<$ID>? 13:40
lizmat not at my present state of mind :-(
(which is a little hung over :-) 13:41
nine Ah, enjoy your hanging over then ;)
lizmat that part I usually don't :-) 13:42
anyways... a few hours from now I will be offline until sometime on Thursday
dalek kudo/nom: 8804424 | (Jimmy Zhuo)++ | src/core/List.pm:
micro optimization of combinations
13:43
kudo/nom: 6bc9bba | lizmat++ | src/core/List.pm:
Merge pull request #586 from zhuomingliang/patch-7

micro optimization of combinations
13:43 rurban joined
jdv79 the last hangover i has was on the night before the mayan doomsday in mia on the strip. 13:44
lizmat ah, it was actually grondilu++
jdv79 i order a mojito and what came was the size of a catelope or honeydew mekon 13:45
13:45 Ven left
lizmat jdv79: well, this one was from a mini-festival at the Magic City Casino :-) 13:45
jdv79: but yeah, I've seen those on the strip while we were cycling there
13:46 Ven joined
jdv79 nice 13:46
13:46 rurban1 left
brrt good * #perl6 13:47
13:48 kjs_ joined
rurban does perl6 already have a JSON decoder? 13:48
13:48 ramin joined
jdv79 many 13:48
RabidGravy yes
Skarsnik nop, but there is like 10 modules for it
13:49 ramin left
rurban I see. Is decode("true") allowed or not? It should be disallowed. All perl5 modules have it wrong 13:49
github.com/rurban/Cpanel-JSON-XS/issues/41
Skarsnik Not sure to understand this 13:50
RabidGravy rurban, perl6 -MJSON::Tiny -e'say from-json("true")'
Input (4 characters) is not a valid JSON string
in sub from-json at /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/site/lib/JSON/Tiny.pm:59
in block <unit> at -e:1
rurban perfect 13:51
RabidGravy so not allowed (by JSON::Tiny at least)
moritz RabidGravy: it's not a valid json string
rurban php documented this extension, perl5 has allow_nonref for this behavior
moritz json needs an array or object as top-level
RabidGravy I know, rurban asked I was just providing evidence that it was indeed not allowed
13:51 ifim joined 13:52 kid51 joined, ifim left
moritz I think allo_nonref can be useful, but it's not meant to be in JSON::*Tiny* 13:52
Skarsnik m: use JSON::Tiny; say from-json(True);
camelia rakudo-moar 6bc9bb: OUTPUT«===SORRY!===␤Could not find JSON::Tiny in any of:␤ file#/home/camelia/.perl6/2015.10-320-g6bc9bba/lib␤ inst#/home/camelia/.perl6/2015.10-320-g6bc9bba␤ file#/home/camelia/rakudo-m-inst-1/share/perl6/lib␤ file#/home/camelia/rakudo-m-inst-1/shar…»
rurban perl6 -MJSON::Fast -e'say from-json("true")'
Skarsnik r: use JSON::Tiny; say from-json(True); 13:53
camelia rakudo-moar 6bc9bb: OUTPUT«===SORRY!===␤Could not find JSON::Tiny in any of:␤ file#/home/camelia/.perl6/2015.10-320-g6bc9bba/lib␤ inst#/home/camelia/.perl6/2015.10-320-g6bc9bba␤ file#/home/camelia/rakudo-m-inst-1/share/perl6/lib␤ file#/home/camelia/rakudo-m-inst-1/shar…»
..rakudo-jvm 6268b8: OUTPUT«===SORRY!===␤Could not find JSON::Tiny in any of:␤ file#/home/camelia/rakudo-inst-1/share/perl6/runtime␤ file#/home/camelia/rakudo-inst-1/share/perl6/lib␤ file#/home/camelia/rakudo-inst-1/share/nqp/lib␤ file#/home/camelia/.perl6/2015.10-134-g2…»
13:53 ifim joined
RabidGravy JSON::Fast gives a somewhat more enlightening message 13:53
rurban Great. Something to brag about, (or point fingers to perl5) 13:54
Skarsnik one evalbot stuff as Task::Star?
*has
RabidGravy rurban, I've seen at one least one place in a Perl 5 module where that behaviour was actually documented as "not strictly allowed but permitted by convention as such and such does it" 13:56
moritz star-m: JSON::Tiny; say from-json('true')
camelia star-m 2015.09: OUTPUT«Could not find symbol '&Tiny'␤ in block <unit> at /tmp/b7xJcfE0yY:1␤␤Actually thrown at:␤ in block <unit> at /tmp/b7xJcfE0yY:1␤␤»
moritz star-m: use JSON::Tiny; say from-json('true')
camelia star-m 2015.09: OUTPUT«Input (4 characters) is not a valid JSON string␤ in sub from-json at /home/camelia/star-2015.09/share/perl6/lib/JSON/Tiny.pm:59␤ in block <unit> at /tmp/kE68B4yjdd:1␤␤»
Skarsnik thx moritz
rurban Problem is that the 3 main perl5 JSON modules, document it as strict, but implemented it as loose. There's even an error message: JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this) 13:57
JSON::Faster also got it right. Checked only 3 so far, but all seem ok
xenu g/win 17 13:59
oops
adrusi question about design: There's the "single argument rule" for autoflattening, but slurp arguments seem to violate that rule: (-> *@args { @args })((1, 2, 3), (4, 5, 6)) 14:00
moritz adrusi: yes, slurpies flatten; use -> +args { } if you want to write a routine that has single argument semantics 14:01
14:01 Ven left, aborazmeh joined, aborazmeh left, aborazmeh joined
adrusi I see 14:02
rurban star-m: use JSON::Fast; say from-json('true')
camelia star-m 2015.09: OUTPUT«a JSON string ought to be a list or an object␤ in sub from-json at /home/camelia/star-2015.09/share/perl6/lib/JSON/Fast.pm:295␤ in block <unit> at /tmp/ehwNLT3eV3:1␤␤»
rurban star-m: use JSON::Faster; say from-json('true')
camelia star-m 2015.09: OUTPUT«===SORRY!===␤Could not find JSON::Faster in any of:␤ file#/home/camelia/.perl6/2015.09/lib␤ inst#/home/camelia/.perl6/2015.09␤ file#/home/camelia/star-2015.09/share/perl6/lib␤ file#/home/camelia/star-2015.09/share/perl6/vendor/lib␤ file#/home/…»
adrusi moritz: then callers have to know what kind of varargs the routine uses? 14:03
14:03 Ven joined 14:04 espadrine_ joined, diana_olhovik left
Ven I can't remember who was talking about J on this channel, but now I can write and understand ]`({.,([: ": #-2:),{:)@.(#>3:), and for that I'm grateful :D 14:05
14:05 espadrine left
moritz adrusi: callers need to know the signature of the routine they call, yes 14:05
lizmat breakfast&
14:05 rurban left, rurban joined
moritz adrusi: you can't call any subroutine with any junk of arguments, and expect it to work 14:05
14:05 rurban left
dalek kudo/curli: 47add65 | (Stefan Seifert)++ | src/core/CompUnit/DependencySpecification.pm:
Fix undefined warnings on throwing "Could not find module" errors
14:06
adrusi moritz: true, I guess I just don't see the case where autoflattening of varargs is useful
lizmat I just did a small test on nqp::create(Foo) vs Foo.CREATE 14:07
the former is 2x as fast..
I think there's a lot to be gained by either properly optimizing .CREATE away, or replacing .CREATE in the code by nqp::create 14:08
really breakfast&
nine lizmat: .CREATE sounds like one of the simplest cases to optimize away. I really hope we can fix that.
14:09 BenGoldberg left 14:10 AlexDaniel joined
jdv79 why is it 2x diff? 14:10
14:11 kid51 left
moritz adrusi: it's very useful where something can't deal with nested structures 14:12
14:12 kid51 joined
dalek kudo/curli: 2163a7e | (Stefan Seifert)++ | src/core/IO/Handle.pm:
lock and unlock for IO::Handle

lock's $flag argument might need some more design
14:13
kudo/curli: 08c55d5 | (Stefan Seifert)++ | src/core/CompUnit/Precompilation (2 files):
Lock .precomp during precompilation of a module

Prevents multiple processes precomping the same file and processes loading precompiled files that are not yet fully written.
14:15
14:15 Ven left
mrf is there any reason not to make <Foo::Bar::baz> not automatically do the equivelant of $<baz> = <Foo::Bar::baz> by default? 14:15
14:16 Ven joined, kjs_ left
dalek kudo/curli: b5263dd | (Stefan Seifert)++ | src/core/Compiler.pm:
Make sure $*PERL.compiler.id changes on recompilation

Previously this id only changed when recompiling src/Perl6/Compiler.nqp. This new implementation can most probably still be improved, but at least works for now.
14:16
mrf it seems logical that anyone wanting to use a token/rule/regex ( ab5tract_ ) from another grammar would want to have the name capture with only the token name and not the fully qualified name 14:17
moritz mrf: unless you want to call two fully qualified token names with the same short name
mrf hmm yeah true 14:18
:(
just writing $<foo>=<Bar::Baz::foo> is really tedious
dalek ast/curli: e0e0b80 | usev6++ | S (3 files):
Unfudge passing tests for rakudo.jvm
14:19
ast/curli: 45297cc | lizmat++ | S03-operators/buf.t:
Update cumbersom CATCH tests to throws-like
ast/curli: 94099c8 | lizmat++ | S03-operators/buf.t:
Add tests for Buf.subbuf(^10)
ast/curli: 49d4301 | moritz++ | S09-typed-arrays/native-int.t:
Track improved error message from array[int].push and .unishift
ast/curli: a1e5aff | lizmat++ | S02-types/array-shapes.t:
Unfudge now passing tests
14:19 kjs_ joined
ast/curli: 5048f1b | (Stefan Seifert)++ | S (6 files):
Merge branch 'master' into curli
Heuristic branch merge: pushed 19 commits to rakudo/curli by niner
14:28 Sqirrel joined, BenGoldberg joined 14:30 havenwood joined 14:31 abaugher joined 14:34 grondilu joined, brrt left 14:35 brrt joined
havenwood Any good trick to get up arrow to show last command in the rakudo-star REPL? 14:36
tadzik yes, install Linenoise 14:38
(I thought it's installed with Star though)
timotimo ohai tadzik :)
14:39 Ven left, kjs_ left
timotimo havenwood: in general, you can use a nifty tool called "rlwrap" to give every program that doesn't have its own line editor a line editor with history for free 14:41
tadzik ohai timotimo :) 14:45
14:49 Ven joined 14:54 raoulvdberge joined 14:56 aborazmeh left
grondilu just installed Linoise and regrets it as it increase the REPL startup time quite a bit :/ 14:59
dalek kudo/curli: 06f21ba | (Stefan Seifert)++ | src/core/CompUnit/Repository/FileSystem.pm:
Don't try to load precomp files after changing the precomp store

In the following sequence: use Test; use lib 't/spec'; use Test::Utils; after the 'use lib' we not only may no longer precompile modules, but also may not load precompiled modules. That's because the precompiled Test::Utils may
  link to a different precompiled version of Test. On loading Test::Utils this
Test module would be loaded and conflict with the already loaded Test.
The moral of the story is: to take most advantage of precompilation, try to set up your repository chain before starting to load modules.
15:00
grondilu whines at the lack of "remove" command to panda 15:01
nine grondilu: once I'm done with this curli branch, a remove command should be rather straight forward to implement 15:02
dalek kudo/curli: d8a1658 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
Make precompilation errors non-fatal

Closing the output handle of a failed command throws a failure. Since precompile should fail non-fatally, we have to check the return value of the close call.
15:03
15:09 tokuhiro_ joined 15:11 khw joined 15:13 tokuhiro_ left 15:19 kjs_ joined
dalek kudo/curli: 63003c0 | (Stefan Seifert)++ | tools/build/NQP_REVISION:
Bump NQP revision for file locking ops
15:20
15:21 tokuhiro_ joined 15:25 tokuhiro_ left
nine Nice, panda's curli branch still works with the current curli branch :) 15:27
15:27 kjs_ left
tadzik :) 15:29
15:29 xpen left
nine I dare say we now have fully functional automatic precompilation of modules found in a FileSystem repository. I guess next up is CompUnit::Repository::Installation. Now that the low level pieces are all working, this should not be that hard. 15:30
lizmat nine++ 15:31
moritz nine++ indeed 15:34
tadzik nine++!
arnsholt jnthn: I think I'm getting a hang in rakudo-m when using a Thread. Got any tips for tracking down what's going on?
(Could be an interaction with NativeCall) 15:35
15:35 llfourn joined 15:40 llfourn left 15:42 zakharyas joined 15:48 kjs_ joined
timotimo tadzik: did you read my rant about rakudobrew and --build-options=--prefix=/opt/perl6 ? 15:49
arnsholt: if it's a true hang, perhaps try attaching GDB and doing "thread apply backtrace full"? 15:50
grondilu: you can also try to install linenoise with Zef instead of Panda (rakudobrew has build-zef, too)
tadzik timotimo: I noticed some of these words in a backlog, but I don't really have time to look at it for the next few days 15:51
timotimo oh
it's just an opinion thing, really
15:57 Psyche^ joined 15:58 domidumont left, yqt joined
tadzik well, I never expected rakudobrew to be used to install stuff anywhere else than inside rakudobrew's directory 15:59
it's designed for that and for that only
whether it should feature an option to maybe also be able to install stuff in general to wherever anyone wants is another question 16:00
timotimo i had argued that installing into the system is the opposite of what rakudobrew is for and as such you shouldn't be surprised when it suddenly says "perl6: command not found" when trying to build-panda 16:01
Skarsnik maybe prevent to do --config-opts=--prefix=something? or warn about it x) 16:03
16:04 cgfbee joined
timotimo .tell cygx btw if you see "0x00000000foo in ?? ()" lines in your backtrace in gdb that means the jit was involved and it does things that make gds not so happy 16:04
yoleaux timotimo: I'll pass your message to cygx.
dalek kudo/nom: 8e19973 | lizmat++ | src/core/ (15 files):
s/foo.CREATE/nqp::create(foo)/

This appears to have a positive effect on spectest duration/CPU usage, so assume this will be noticeable elsewhere as well. If not, please revert :-)
lizmat goodbye, #perl6! 16:05
see you in 5 days or so...
tadzik timotimo: yeah, my thoughts exactly
havenwood timotimo: rlwrap working great, thanks! good to know about.
timotimo you're welcome :)
jdv79 precomp is back 16:09
?
timotimo with Zef, yes. in the curli branch, yes (or rather: will soon?) 16:10
arnsholt timotimo: Six threads, four in epoll, one in zmq_poll via NativeCall, one in the GC apparently 16:16
timotimo there's a condition where we can deadlock when trying to start a gc run
because we stop all threads (that are in a stoppable state, as in: not inside native calls) for them all to start GCing at the same time 16:17
but in some case, somehow the instance->threads thing gets nulled
16:18 bombless joined 16:20 domidumont joined
arnsholt Might be it 16:23
Skarsnik Do someone has an idea how to know if an attribute is defined as HAS vs has?
arnsholt Especially since both threads are spending a lot of time inside native calls ATM
timotimo arnsholt: "a lot of time" doesn't mean much in this case
arnsholt: the other case that reproduces this is basically "loop { start { sleep 0.01 } }" 16:24
arnsholt Ah, right =) 16:25
timotimo s/basically//
16:28 bombless left
Skarsnik m: use NativeCall;class A is repr("CStruct") { has int32 $.a; HAS A $.b}; say A.^attributes 16:30
camelia rakudo-moar 8e1997: OUTPUT«(signal SEGV)»
timotimo oh, so you're trying to inline an A struct inside itself?
that'll go over well %)
but yeah, shouldn't segv
Skarsnik definitly x)
16:30 hartenfels joined 16:31 kjs_ left, Ven left 16:32 Ven joined
Skarsnik hm, that not very useful 16:33
m: use NativeCall;class B is repr("CStruct") {has int32 $.a} ;class A is repr("CStruct") { has int32 $.a; HAS B $.b}; say A.^attributes[0].perl
16:33 kjs_ joined
camelia rakudo-moar 8e1997: OUTPUT«Attribute.new␤» 16:33
Skarsnik m: use NativeCall;class B is repr("CStruct") {has int32 $.a} ;class A is repr("CStruct") { has int32 $.a; HAS B $.b}; say A.^attributes[0].inlined, A.^attributes[1].inlined 16:38
camelia rakudo-moar 8e1997: OUTPUT«01␤»
Skarsnik to answer my question on HAS and has
timotimo yeah, inlinedness is what HAS is about 16:40
16:46 Ven left 16:47 Ven joined
Skarsnik I should have added the cenum type while I was adding size_t and bool x) 16:50
zengargoyle good * #perl6
16:53 kjs_ left
Ven \o zengargoyle 16:57
Skarsnik I can't find how to display the name of a type. it's not something like A.WHAT ? 17:00
17:00 cygx joined
cygx o/ 17:01
yoleaux 16:04Z <timotimo> cygx: btw if you see "0x00000000foo in ?? ()" lines in your backtrace in gdb that means the jit was involved and it does things that make gds not so happy
cygx timotimo: in that case it's probaby TinyCC that was to blame, but same principle
zengargoyle m: my (Rat() $foo) = 1; 17:03
camelia ( no output )
awwaiid DC-Baltimore Perl Workshop April 16 2016 -- join us! Talk sign up: docs.google.com/forms/d/1wk9V7THT_...s/viewform 17:04
zengargoyle pink_mist: still around?
pink_mist no, not still ... again around :P 17:06
but I'm off in 4 minutes
zengargoyle reading backlog.... you can use Signature with my to do the Rat() thing. 17:07
pink_mist can you show example?
zengargoyle m: my (Rat() $foo) = 1;
camelia ( no output )
pink_mist ohh, cool! =)
zengargoyle++ thanks for showing! =)
zengargoyle just read Signatures doc a day or so ago... :)
Ven Skarsnik: .WHAT, but it's undef, so add in .perl 17:13
m: say 3.WHAT.perl
camelia rakudo-moar 8e1997: OUTPUT«Int␤»
Skarsnik Im: say 3.^name;
m: say 3.^name;
camelia rakudo-moar 8e1997: OUTPUT«Int␤»
dalek kudo/curli: ca05aca | (Stefan Seifert)++ | src/core/CompUnit/Repository/FileSystem.pm:
Simplify path manipulation code a bit
17:18
grondilu I have Role that I named "Foo". I'd like to implement this role, but any other name than "Foo" displeases me. I wish there was a way to distinguish a class from a role in a name. Like sigils, but for classes/roles. 17:21
s/in a name/and a name/ 17:22
17:22 tokuhiro_ joined
grondilu
.oO( hum maybe it works already since only a role can use "does" )
17:23
m: role Foo {}; class Foo does Foo {}
camelia rakudo-moar 8e1997: OUTPUT«5===SORRY!5=== Error while compiling /tmp/e7gHA_TlZi␤Redeclaration of symbol Foo␤at /tmp/e7gHA_TlZi:1␤------> 3role Foo {}; class Foo does Foo7⏏5 {}␤»
timotimo m: class Foo {}; class Bar does Foo {} 17:25
camelia rakudo-moar 8e1997: OUTPUT«5===SORRY!5=== Error while compiling /tmp/o86_pHMgfT␤Foo is not composable, so Bar cannot compose it␤at /tmp/o86_pHMgfT:1␤»
17:26 kjs_ joined
Skarsnik This bother me : pastebin.com/dzBVdyfV why the size returned by nativesizeof on the struct is not equal to the sum of the size of the attributes x) (it only does for this struct) 17:26
17:27 tokuhiro_ left
timotimo Skarsnik: do you know what "alignment" means? 17:27
17:28 MadcapJake joined
Skarsnik I am not sure, adding bytes to match an interesting number? (like a power of 2) 17:29
timotimo you've compared the NC class with nativesizeof with the same struct written in C code and printf sizeof?
Skarsnik Yes
zengargoyle Lawful, Neutral, Chaotic?
timotimo that's problematic, then.
could very well be that you're using different types in the C struct and the NC class 17:30
as in, something that has the same size but different alignment
brrt .tell cygx i cannot reproduce the segv on windows yet, but i can't build using *just* strawberry perl either
yoleaux brrt: I'll pass your message to cygx.
timotimo and yeah, alignment means that a field in a struct has to land on an offset divisible by a certain number, like 32 or 64
cygx brrt: what's your failure mode?
yoleaux 17:30Z <brrt> cygx: i cannot reproduce the segv on windows yet, but i can't build using *just* strawberry perl either
timotimo so you'll end up with holes 17:31
holes, as in: memory that's not used by anything
Skarsnik size are identical for the field itselfs
brrt let's see
Skarsnik The issue, it's the NC size that is bigger
brrt cygx: can't compile dyncall using gcc
cygx we should all be using C11 - it comes with _Alignof 17:32
brrt 'invalid conversion from DCpointer to DCString
timotimo Skarsnik: if the sizes of the individual fields are the same between NC and C, then it can only be due to alignment that NC thinks the class itself is bigger
cygx brrt: builds for me on Win7-64 with Strawberry Perl (64-bit) Portable 5.20.2.1-64bit 17:33
MadcapJake what's a pragma and what ones are there? 17:35
brrt is using windows 8.1 and strawberry perl 64 bit installation 5.22.0 17:36
but i have to be afk now 17:37
zengargoyle a pragma is something that tweaks the compiler... -ish
cygx brrt: assuming it's not some sort of mis-configure, perhaps hack the Makefile to lower error levels?
17:37 brrt left
cygx these types are void* and const char*, repectively 17:37
so they are not only ceonvertible, but even have the same representation
MadcapJake is there any docs on pragmas? I can't seem to find anything about them
zengargoyle like it's in the source code, but isn't really part of the code itself, instead it's there to tell the compiler to do something out of the ordinary. 17:38
timotimo i know at least MONKEY-TYPING, no-worries and fatal
17:38 llfourn joined
zengargoyle i think the line is not clearly defined in dynamic languages... 17:38
MadcapJake the old textmate perl6 highlighter had `oo|fatal` as pragmas 17:39
zengargoyle use lib 'lib' - is now a pragma IIRC
timotimo aye, but potentially only in the "curli" branch
zengargoyle in Perl 5 i think you could say that use BigNum is pragma-ish 17:40
Skarsnik hm 17:41
* So we keep track of that biggest element. */
MVMint32 multiple_of = 1;
MadcapJake anyone know if `oo` is still a pragma? I'm wondering if that's (if it means object-oriented) been "baked in" now.
Skarsnik /* The structure itself will be the multiple of its biggest element in size.
Probably the issue
psch m: use oo;
camelia rakudo-moar 8e1997: OUTPUT«===SORRY!===␤Could not find oo in any of:␤ file#/home/camelia/.perl6/2015.10-321-g8e19973/lib␤ inst#/home/camelia/.perl6/2015.10-321-g8e19973␤ file#/home/camelia/rakudo-m-inst-2/share/perl6/lib␤ file#/home/camelia/rakudo-m-inst-2/share/perl6/…»
timotimo could very well be
Skarsnik: maybe git blame the file to find out who last touched that and ask them where that decision comes from? 17:42
MadcapJake psch: haha thanks :)
17:43 xfix left
Skarsnik nop, not this 17:43
96 is 6x16 (max size)
MadcapJake m: use no-worries;
camelia rakudo-moar 8e1997: OUTPUT«===SORRY!===␤Could not find no-worries in any of:␤ file#/home/camelia/.perl6/2015.10-321-g8e19973/lib␤ inst#/home/camelia/.perl6/2015.10-321-g8e19973␤ file#/home/camelia/rakudo-m-inst-2/share/perl6/lib␤ file#/home/camelia/rakudo-m-inst-2/shar…»
cygx Too many positionals passed; expected 1 argument but got 1 17:44
thanks, rakudo: that's helpful...
17:44 llfourn left
MadcapJake m: use no worries; 17:44
camelia rakudo-moar 8e1997: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Gw_aB58swT␤Undeclared routine:␤ worries used at line 1␤␤»
MadcapJake timotimo: i found a july weekly that mentions a `no worries` pragma, but it doesn't seem to work 17:45
timotimo m: no worries; say "whaaaat"
camelia rakudo-moar 8e1997: OUTPUT«whaaaat␤»
MadcapJake so, it doesn't need a `use` call?
timotimo that's not correct 17:46
it's either "use" or "no
"
17:46 BenGoldberg left
MadcapJake ohhh, i didn't know that, interesting 17:46
17:47 BenGoldberg joined
timotimo that's a thing that was already in perl5, so it was taken over 17:48
zengargoyle fatal, internals, MONKEY-TYPING, nqp, strict, trace, worries, invocant parameters, cur, soft, variables, attributes
looking at Perl6/World do_pragma 17:49
MadcapJake zengargoyle: thanks!
timotimo "no internals"? :) 17:50
autarch I have a working pod node walker class that I think would be a good basis for rewriting Pod::To::HTML (and other Pod tools) - should I just put it up on GitHub under my name or do things like this go under the perl6 group?
timotimo autarch: you can always start out under your own name
it can be moved over later 17:51
autarch ("working" may be a stretch since it needs more test, but it _seems_ to work so far)
zengargoyle some of those are NYI or other special-ish things handling.
autarch timotimo: sounds good
any thoughts on naming? right now it's called Pod::NodeWalker - and include a Pod::NodeListener role
but I'm open to something else
avar s/w 6 17:52
zengargoyle autarch: are you matching on Pod::Block in your Walker? 17:54
autarch zengargoyle: yes
Skarsnik I need a name for my module that check size of NC stuff. Module::Helper::NCDiag ? 17:57
awwaiid Every time I read "Perl 6 borrows many concepts from human language. Which is not surprising, considering it was designed by a linguist." I keep wanting to edit it to "... considering it was designed by humans."
Skarsnik xD
17:58 raiph joined 17:59 BenGoldberg left, Ben_Goldberg joined
autarch github.com/autarch/Pod-NodeWalker 18:01
would it be more idiomatic to use multi methods in github.com/autarch/Pod-NodeWalker/...stener.pm6 ? 18:02
and just call most of the methods 'start' & 'end' 18:03
it also occurs to me that tihs would be even cleaner if there were co-routines. does Perl6 have that? 18:04
timotimo we have gather/take, which is a bit similar 18:05
ab5tract_ timotimo: can you elaborate on the differences?
autarch gather/take isn't exactly what I'd want - I'll make a gist - one sec 18:06
timotimo ab5tract_: our method of communicating back and forth is a bit weird 18:07
ab5tract_ sorry, I haven't been the best backlogger recently :/
autarch gist.github.com/autarch/57f8eeb48d93a5f17a65
timotimo other than that, not really that sure what the differences are :| 18:08
autarch if I could write that then I wouldn't need start vs end methods
Skarsnik What could be a good prefix for module that aims to help in the writing other module? on cpan it seem it's Module:: 18:09
18:09 dwarring joined
autarch Skarsnik: in Perl 5 there's Module:: and Dist:: 18:09
the latter mostly inspired by Dist::Zilla and similar modules 18:10
the issue with Module:: (and Dist:: too, I guess) is that's it not clear whethere these are tools for authors or tools for people to introspect/manipulate modules
so we end up with things like Module::Starter (tool for creating new distros) and Module::Runtime (runtime introspection and loading of modules) 18:11
zengargoyle autarch: yeah, i'd think multi method
zengargoyle has already added a Pod::Block::Data which would fall to ... start(Pod::Block:D $block) or something. 18:12
18:14 nowan joined 18:17 Ven left 18:18 Ven joined
autarch hmm, but now with multi methods the role's multi methods conflict with the class's implementation, even if I make the role methods stubs 18:19
18:20 AndChat380436 joined, nowan left
autarch m: role R { multi method foo (Any $foo) { ... } }; class C does R { multi method foo (Any $foo) { say $foo } }; C.new.foo(42) 18:22
camelia rakudo-moar 8e1997: OUTPUT«Ambiguous call to 'foo'; these signatures all match:␤:(C $: $foo, *%_)␤:(C $: $foo, *%_)␤ in block <unit> at /tmp/Gj6Q86pWxy:1␤␤»
autarch that seems like a bug
and in fact, I'd think that event _without_ the stub this should work, because class methods should shadow role methods of the same name/sig, right?
readable version of that code is at gist.github.com/autarch/9c809326bed918fda4ab 18:23
18:23 nowan joined
autarch so should I file a bug, and if so, where? 18:25
looks like this error comes from rakudo 18:26
raiph autarch: maybe rt.perl.org/Ticket/Display.html?id=124393 18:27
zengargoyle or is that the case for the submethod thing?
MadcapJake is there an `only` keyword anymore? I'm unable to locate it in the docs.
autarch raiph: yeah, I think that may be the same thing
zengargoyle MadcapJake: last time i tried 'only' it worked.
autarch hmm, when I click Comment on that bug I get a very weird page 18:28
zengargoyle nevermind, i was thinking of 'once' 18:29
pink_mist I thought comments were usually made by emailing
autarch I had to login
but it didn't tell me that, it just gave me a very broken page - gotta love RT
MadcapJake also is there a `category` keyword? I keep finding these words in the language-perl rules that aren't mentioned in the Perl6 docs
autarch well, gotta love heavily customized instances of RT, at least 18:30
18:33 Ven left, Ven joined, ponbiki joined 18:34 Ven left
ugexe using the RT web interface is always an adventure 18:34
18:34 Ven joined
autarch is there a list of bugs to fix by christmas? I'd nominate that one 18:35
ugexe thats an odd priority with about 1 month until release 18:38
timotimo the way communication between coroutine and ... the other thing is weird is: communicating data back to the coroutine is done by having the coroutine take-rw a scalar container that the consumer is then able to put values into for the coroutine to read out from again 18:39
autarch ugexe: it seems like having methods work properly in roles is pretty important 18:40
ugexe oh i thought you meant redoing the RT system
autarch heh, no, definitely not
I meant rt.perl.org/Ticket/Display.html?id=124393
18:42 raoulvdberge left
ab5tract_ thanks for clarifing timotimo :D 18:42
*clarifying 18:43
masak evening, #perl6
ab5tract_ o/ masak!
timotimo i want to be clarif instead of the clarif!
ab5tract_ how goeth thy day's respite?
Ven \o masak 18:45
masak ab5tract_: my day's respite goes well, thanks. 18:46
thinking of maybe doing something vaguely ambitious instead of just respiteful. :)
autarch prithee, good sir, tell us why thou speakest in the language of Shakespeare? 18:47
ab5tract_ heed and go forth!
pink_mist harken and sally forth!
ab5tract_ autarch: not exactly sure, tbh. maybe masak inspires my classical side?
autarch isn't that pre-classical? 18:48
although I'm not sure if music's classical period is the same time as other classical periods
ab5tract_ autarch: nope. and at the time, 'classical' would likely have referred to hellenic times 18:49
autarch good point
18:54 mr_ron joined 18:56 kjs_ left
ab5tract_ timotimo: i shot the clarif, but i did not shoot the clarifee 18:56
masak I feel honored to be inspiring anypony's classical side. 18:57
mr_ron .tell brrt his dyncall compile problem is known and documented here github.com/MoarVM/MoarVM/issues/292 18:58
yoleaux mr_ron: I'll pass your message to brrt.
mr_ron interesting it seems to build with an older version of Strawberry Perl - I'll give it a try ... 18:59
19:01 zakharyas left 19:03 Ven left 19:04 Ven joined 19:06 raiph left 19:10 CIAvash left 19:13 AndChat380436 left
nine Where does @*MODULES come from? It doesn't seem to be declared, except in perl6-debug.nqp 19:21
dalek kudo/curli: d991d92 | (Stefan Seifert)++ | src/core/CompUnit.pm:
Remove precomp handling from CompUnit.load
19:24
19:24 CIAvash joined
autarch gist.github.com/autarch/c818898a32390948dfdc 19:25
apparently the pod parser in the compiler is throwing away the term being defined
19:27 brrt joined
brrt cygx, good idea 19:27
yoleaux 18:58Z <mr_ron> brrt: his dyncall compile problem is known and documented here github.com/MoarVM/MoarVM/issues/292
brrt mr_ron: thanks 19:29
mr_ron brrt: I got past the dyncall problem by backing off to strawberry perl 5.20 but rakudobrew build moar is now failing at building "target 'CORE.setting.moarvm'"
brrt hmmm
yeah, that might be the same issue 19:30
cygx mr_ron: that's the issue I have
brrt which... moarvm version do y'all have?
cygx you need to set MVM_DISABLE_JIT or possibly even MVM_DISABLE_SPESH to continue
mr_ron cygx: thanks - will try it 19:31
cygx brrt: CORE.setting failing to compile on MinGW has been the state of affairs since forever 19:32
brrt hmmm 19:33
cygx the problem at runtime I described yesterday in #moarvm happened at 2015.10-95-g5f007a9
brrt ok, i have my suspicions
hmm 19:34
nine Does nqp::loadbytecode change any global state (except for $*MAIN_CTX)? IOW is it safe to try it and on failure just throw the results away? 19:36
19:42 llfourn joined 19:43 molaf left 19:44 raiph joined 19:46 llfourn left
cygx nine: what kind of failure? file not found? in that case, as far as I can tell, yes, that should be safe 19:47
autarch any thoughts on this - gist.github.com/autarch/c818898a32390948dfdc - is this a bug in the synopsis or rakudo?
nine cygx: an unhandled exception of a certain type 19:48
cygx nine: looking at the code, I think there's a uv_mutex_unlock missing in case MVM_cu_map_from_file throws... 19:49
19:49 Ven left
nine cygx: oh my. I'll keep that in mind for when I start playing around with that 19:49
19:49 brrt left
nine cygx: but sans bugs it should be safe? 19:49
19:50 Ven joined
nine cygx: otherwise I'd have to keep a list of the transitive dependencies for every precomped file. 19:52
arnsholt What's the difference between has and HAS? 19:53
cygx nine: I don't see why it shouldn't be safe, though I have no idea what running the deserialization frame entails
is that something you have to worry about?
arnsholt: HAS inlines the aggregate, has references it by pointer 19:54
19:55 diana_olhovik_ joined
moritz a missed oportunity to spell it HAZ :-) 19:55
nine cygx: I guess, I'll just have to try it. Thanks for the info :)
arnsholt Heh =)
20:03 Ven left 20:04 Ven joined
AlexDaniel .u µ 20:05
yoleaux U+00B5 MICRO SIGN [Ll] (µ)
AlexDaniel .u μ
yoleaux U+03BC GREEK SMALL LETTER MU [Ll] (μ) 20:06
AlexDaniel ughhh
μghhh*
20:06 znpy left, dwarring left
havenwood .u 􏿽xCD􏿽xBE 20:07
yoleaux U+037E GREEK QUESTION MARK [Po] (􏿽xCD􏿽xBE)
AlexDaniel havenwood: no problem with that, it looks different 20:08
havenwood AlexDaniel: Looks the same to me! I'm curious how it's different?
20:09 domidumont left
raiph autarch: your gist seems to work for me 20:09
autarch raiph: what output are you getting?
raiph Array $var = $[Pod::Block::Named.new(name => "pod", config => {}, contents => [Pod::Block::Named.new(name => "defn", config => {}, contents => [Pod::Block::Para.new(config => {}, contents => ["Item Definition"])])])] 20:10
AlexDaniel havenwood: you mean that you want to see how it looks on my screen?
autarch raiph: yes, note that "Item" has been discarded, contrary to the synopsis
havenwood AlexDaniel: (It looks exactly like a semicolon on mine.)
raiph autarch: stackoverflow.com/a/27936867/1077672
20:10 colomon joined
autarch raiph: what's that link telling me? 20:11
AlexDaniel havenwood: files.progarm.org/2015-11-15-22111..._scrot.png
havenwood AlexDaniel: Interesting, thanks!
mr_ron cygx: set both MVM_DISABLE_JIT=1 and MVM_DISABLE_SPESH=1 in environment and build of CORE.setting.moarvm still fails in "Stage parse"
AlexDaniel havenwood: actually, yes, when I look at clog I see no difference… depends on the font
autarch raiph: doh, now I see it 20:12
mr_ron bbl
autarch but that still seems broken, shouldn't contents be ['Item', 'Definition'] or something to separate the bit on the =defn line?
20:12 darutoko left
AlexDaniel what about changing all semicolons in some code to 􏿽xCD􏿽xBE? It has to be fun… 20:13
20:14 geraud joined
autarch so I still stand by the fact that this is a bug, but now it's a slightly different bug - I reported it at rt.perl.org/Ticket/Display.html?id=126651 20:14
20:15 kjs_ joined 20:17 autonomicon left
raiph autarch++ 20:18
20:18 znpy joined 20:19 Ven left
autarch when should I be reporting bugs where code behavior doesn't match a synopsis vs when should I submit a patch for the synopsis? 20:19
=table :caption('foo') - parses the caption as q{'foo'} instead of q{foo} 20:20
I'm pretty sure that's a mistake, but the roast tests only test =table :caption<foo>, which seems to parse correctly, so maybe the synopsis is out of date?
20:20 Ven joined
cygx mr_ron: I mixed up the word order - it's MVM_JIT_DISABLE and MVM_SPESH_DISABLE 20:20
mr_ron: cf `moar --help` 20:21
raiph autarch: i mention it on channel, wait a while to see what folk say (few mins to a few days)
autarch ok
raiph autarch: btw, the preference is for "what i did, what i got, what i expected" in rakudo reports 20:22
nine .tell jnthn Why should CompUnit::Repository::Installation when followed by another one consider its set of modules together with its following repo's? You wrote that the best option across the two of them wins, but I don't see how one can be better.
yoleaux nine: I'll pass your message to jnthn.
autarch raiph: I can update the bug report I just made 20:23
nine .tell jnthn a CompUnit either matches the DependencySpecification or it doesn't. When it does, in what regard can another candidate be "better"?
yoleaux nine: I'll pass your message to jnthn.
raiph ++autarch # :) 20:24
20:24 diana_olhovik_ left 20:29 rindolf left 20:33 Ven left
Ben_Goldberg .karma yoleaux 20:33
.ping 20:34
yoleaux There is no ping command; nor can this be construed as a response.
20:34 Ven joined, Ven left, Ven joined 20:35 Ven left, Ven joined 20:36 xfix joined
raiph autarch: q{'foo'} from :caption('foo') looks like a bug to me too 20:38
20:40 Ben_Goldberg left 20:43 hankache joined
zengargoyle is lost in Perl6::Pod helper functions and add_constant and compile_time_value 20:44
have: say $=data.perl -> Pod::Data.new(unkeyed => [], keyed => {}) 20:45
20:45 ifim left
zengargoyle have $*POD_DATA_UNKEYED ([]) and $*POD_DATA_KEYED ({}) populated 20:46
can't quite figure out incantation to put all the bits together. :)
autarch is there any sort of standard for how Perl6 modules should be documented anywhere? or a good example I could follow? 20:50
20:56 hankache left
Skarsnik follow p5 modules section maybe? 20:58
raiph autarch: CPAN? ;)
20:58 znpy left
autarch raiph: well, no, because I can write "=NAME" instead of "=head1 NAME" and such, right? 20:58
zengargoyle i think the spec has a list of =NAME things 21:02
Skarsnik is there something to do some formating with text like in p5? (with <<<< ?) 21:03
zengargoyle formats?
21:04 brrt joined
moritz Skarsnik: there's a Form module in the ecosystem 21:04
Skarsnik Oh thx 21:05
21:06 CIAvash left 21:11 Ben_Goldberg joined
raiph autarch: fyi, spec re heading names: design.perl6.org/S26#Semantic_blocks 21:13
autarch raiph: yep, found that
21:15 softmoth_ joined 21:16 sprocket joined, Possum joined
RabidGravy for some reason I concluded that it was better to use the P5 style headings for the time being but can't remember why 21:17
likely something not formatting the semantic blocks nicely 21:18
21:18 Sqirrel left, Sqirrel joined, BenGoldberg_ joined 21:19 telex left 21:20 telex joined 21:21 espadrine_ left 21:22 Ben_Goldberg left 21:24 tokuhiro_ joined
autarch btw, is the person who wrote the p6 Email::Simple here? 21:25
retupmoca: ^ 21:26
21:28 tokuhiro_ left
autarch alright, here's my module in all its glory (?) - github.com/autarch/perl6-Pod-NodeWalker 21:29
I'm still not sure about those names
21:29 kjs_ left
autarch so let's not add it to the ecosystem quite yet, but I'd appreciate any feedback people have 21:29
Skarsnik add a readme.pod or readme.md x) 21:30
autarch wishes for dzil6 21:32
README.md is added
21:34 rurban joined, Ven left, Ven_ joined
autarch heh, I just realized there's another module callked Pod::Walker already - though it has a bit of an odd API 21:37
21:37 kjs_ joined
autarch so I don't feel too bad for duplicating effort 21:38
no offense intended
pink_mist well the perl motto is that there's more than one way to do it; so providing more than one way sounds like a good thing :P autarch++ 21:39
autarch I kind of hope that Perl 6 can do a better job of providing at least 1 good way to do it 21:40
with Perl 5 there's often 5 modules that all do a similar thing awkwardly
21:41 llfourn joined, zakharyas joined
brrt in perl6 there will be 6 ways to do it awesomely 21:41
21:41 jesper_ joined 21:45 zakharyas left 21:46 BenGoldberg joined 21:47 brrt left 21:48 BenGoldberg_ left 21:49 Ven_ left
AlexDaniel in fact, looking at JSON modules it feels like we already have 6 ways in various places… 21:49
21:54 Ven joined, kaare_ left
Skarsnik Someone should write JSON::Pretier that does like JSON::Prety but with color 22:01
22:01 Sqirrel left
pink_mist throws some 't's at Skarsnik :P 22:03
dalek kudo/curli: 4a64a9c | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
A bit of code restructuring for readability
22:05
kudo/curli: 6f4b5b5 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Precompile installed modules in Repository::Installation
nine And with that, good night!
22:05 Ven left
pink_mist nine++ good night 22:05
22:05 xfix left 22:06 jesper_ left 22:07 zakharyas joined 22:08 Ven joined 22:12 ollej joined
timotimo nine++ # good progress on the curli branch 22:16
zengargoyle has anybody done a ctags thingy for Perl 6
22:18 raiph left 22:19 Ven left
timotimo yes 22:19
stmuk++ has 22:20
github.com/stmuk/p6-app-p6tags - also in the ecosystem
22:22 Ven joined, rurban left
zengargoyle cool 22:26
22:27 Ven left 22:30 BenGoldberg left
Hotkeys Skarsnik: JSON::PrettyColors 22:35
much better name
22:37 zakharyas left
timotimo JSON::RainbowUnicornFarts ? 22:39
22:39 Zoffix joined 22:42 TEttinger joined 22:45 raiph joined 22:56 cygx left
RabidGravy I think there should be more modules with unicorns 23:04
does Javascript have Junctions or anything that approximates? 23:05
jdv79 logic ops? 23:06
llfourn RabidGravy: erm no I don't think so
23:07 kjs_ left
RabidGravy it's just for URI::Template I'm using some test data I snarfed from a javascript library and it's using arrays of the possible arrangements of strings derived from what in Perl would be a hash 23:09
so it must loop and compare then I guess 23:10
timotimo you'll probably have more luck looking for "a list monad for javascript"
llfourn probs. Maybe you can overload '==' or something..
RabidGravy I've just arranged the tesrs to be "is $result, any($expected.list) ...." which works fine for single values too 23:13
llfourn nice
23:15 kjs_ joined 23:20 colomon left 23:25 sprocket left 23:35 dayangkun joined
flussence JS has Sets now, not exactly junctions but it's an improvement 23:36
23:38 Sqirrel joined
grondilu tbh I'm a bit disappointed by junctions. Back when I was learning Perl 6 I thought they were the coolest thing ever. Now I barely use them once in six months or something. 23:38
RabidGravy they're extremely useful in certain cases like the above which would otherwise require a horrible regex 23:42
xenu i use List::Util::any pretty frequently in p5 and junctions solve the same problem
RabidGravy it's part of the toobox, you may not use it often but when you need it it's decisive
xenu true 23:43
RabidGravy toolbox
23:43 Ven joined 23:44 brabo joined 23:48 kjs_ left 23:49 Ven left 23:51 Sqirrel left
zengargoyle i seem to use junctions quite a bit 23:52
RabidGravy depends on the kind of code you tend to make 23:56
23:56 Skarsnik left
RabidGravy I tend to use $foo ~~ Foo|Bar more than anthing else 23:56
23:58 ponbiki left 23:59 raiph left