Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-11-15

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 Psyche^_ joined #perl6
00:02 adrusi anyone know of any good in-depth explanations of contexts and containers/references?
00:03 adrusi 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?
00:03 Ven adrusi: I know we have http://doc.perl6.org/language/containers
00:04 tomoko joined #perl6
00:04 tomoko m:  'say [+] ^1000001'
00:04 camelia rakudo-moar 94ad45: OUTPUT«WARNINGS:␤Useless use of constant string "say [+] ^1000001" in sink context (line 1)␤»
00:05 adrusi Ven: huh, small world, I was active in the coco issue board years ago, yeah
00:05 adrusi I'll look into that
00:06 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;
00:06 camelia rakudo-moar 94ad45: OUTPUT«500000500000␤»
00:06 TimToady tomoko: that is not very optimized yet
00:07 tomoko why? in my machine 50 s
00:08 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 camelia rakudo-moar 94ad45: OUTPUT«(timeout)»
00:08 grondilu (you guys are not trying hard enough)
00:09 tomoko TimToady: Thanks
00:09 grondilu making a multi candidate for [+] $range was discussed some time ago
00:10 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?
00:10 psch geraud: it's 0 to N-1
00:10 psch m: say ^5
00:10 camelia rakudo-moar 94ad45: OUTPUT«^5␤»
00:10 psch m: say eager ^5
00:10 camelia rakudo-moar 94ad45: OUTPUT«(0 1 2 3 4)␤»
00:10 TimToady ^N is short for 0 ..^ N
00:10 psch TimToady++ # for "why is it that"
00:11 TimToady grondilu: you'd like it to work for .reduce(&[+]) as well, for instance
00:12 geraud TimToady, psch : thanks for the explanation.
00:15 Ven joined #perl6
00:18 Skarsnik Good night people x)
00:23 xpen joined #perl6
00:36 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:43 TimToady it should work, or if it doesn't, it should anyway :)
00:44 softmoth_ joined #perl6
00:44 grondilu it works, it's just that it "looks" weird.
00:45 dD0T joined #perl6
00:46 dD0T left #perl6
00:46 hacst joined #perl6
00:52 raiph joined #perl6
00:53 TimToady one could, I suppose, say that 'unit' autoimports anything it doesn't recognize
00:58 Ben_Goldberg joined #perl6
01:01 BenGoldberg joined #perl6
01:04 BenGoldberg joined #perl6
01:08 rurban joined #perl6
01:13 khw joined #perl6
01:21 tokuhiro_ joined #perl6
01:23 khw joined #perl6
01:27 zengargoyle joined #perl6
01:27 zengargoyle left #perl6
01:28 zengargoyle joined #perl6
01:55 geraud joined #perl6
01:59 grondilu m: role { method f(Hash[Real,UInt]:) {...} };
01:59 camelia rakudo-moar 94ad45: ( no output )
01:59 grondilu m: role { method f(Hash[Real,UInt]:D:) {...} };
01:59 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:) {...} };␤»
01:59 grondilu m: role { method f(Any:D:) {...} };
01:59 camelia rakudo-moar 94ad45: ( no output )
01:59 grondilu m: role { method f(Array[Real]:D:) {...} };
01:59 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:) {...} };␤»
02:00 grondilu std: role { method f(Array[Real]:D:) {...} };
02:00 camelia std : OUTPUT«No such file or directory»
02:00 grondilu ?
02:00 grondilu std: role { method f(Array[Real]:) {...} };
02:00 camelia std : OUTPUT«No such file or directory»
02:00 camelia std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤#perl6 <grondilu> std: role { method f(Array[Real]:) {...} };␤»
02:00 grondilu std: 1+1
02:00 camelia std : OUTPUT«No such file or directory»
02:01 camelia 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?
02:02 grondilu std: role { method f(Hash:D:) {...} };
02:02 camelia std : OUTPUT«No such file or directory»
02:02 grondilu m: role { method f(Hash:D:) {...} };
02:02 camelia rakudo-moar 94ad45: ( no output )
02:02 grondilu m: role { method f(Hash[Real]:D:) {...} };
02:02 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:) {...} };␤»
02:02 camelia std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤»
02:09 aborazmeh joined #perl6
02:09 aborazmeh joined #perl6
02:11 skids joined #perl6
02:22 BenGoldberg joined #perl6
02:24 TimToady grondilu: testing patch to speed up [+]
02:25 Ben_Goldberg joined #perl6
02:25 grondilu cool
02:26 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?
02:28 TimToady it could be done pretty easily now, I suspect
02:28 grondilu nice
02:32 softmoth_ joined #perl6
02:33 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 grondilu although maybe what takes some time is the instanciation of the long array, not the additions.
02:34 grondilu m: say [+] rand xx 100_000; say now - INIT now
02:34 camelia rakudo-moar 94ad45: OUTPUT«50118.9803380321␤0.739346␤»
02:35 grondilu wow that's ridiculously faster than on my machine
02:35 dalek rakudo/nom: 6d97011 | TimToady++ | src/core/ (4 files):
02:35 dalek rakudo/nom: optimize [+]
02:35 dalek rakudo/nom:
02:35 dalek rakudo/nom: There is now also a sum function which calls into a sum method.
02:35 dalek rakudo/nom: Any.sum is 10-20% faster than the generic reduce routine, while
02:35 dalek rakudo/nom: Range.sum is O(N) faster. :)
02:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d970110df
02:35 grondilu so it's now O(1)? :)
02:36 TimToady ayup
02:37 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 grondilu lack of JIT?
02:37 grondilu I mean it does not have JIT and I wonder if that is the reason.
02:38 TimToady rand isn't terribly fast, but doubtless we can do better
02:39 grondilu doesn't it link to the standard C library or something?
02:40 grondilu 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:45 grondilu (unless it was on coursera)
02:45 adu joined #perl6
02:45 TimToady runs in about .25 seconds here
02:46 grondilu oh yeah it was on coursera: "Statistical Mechanics:  Algorithms and Computations"  https://class.coursera.org/smac-002
02:46 psch huh
02:46 psch oh, boxing maybe
02:46 grondilu .25 seconds compared to 11 seconds is way too big.  Something's wrong.
02:47 psch that is, the 2 orders of magnitude between 1kk rand calls between p5 and p6
02:47 psch 'cause &rand maps nearly 1:1 to a call to whatever exactly tinymt64 does for random numbers
02:48 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
02:48 psch metasin: rosettacode is a good thing to peruse, but CORE is also great, although sometimes less idiomatic for the sake of performance
02:49 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::
02:49 grondilu so that I4ll have class Vector does MultiVector {...}
02:50 * psch doesn't recall off-hand if there's something on p6advent re parametric polymorphism...
02:50 psch but that's a potential third thing to look through, http://perl6advent.wordpress.com that is
02:51 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 metasin I should probably start a blog
02:52 metasin (or leave comments on rosettacode)
02:54 grondilu hum, interestingly, (rand xx 100_000)[*-1] takes only 2 seconds
02:55 grondilu it the access of the last element optimized or something?
02:55 TimToady eager could be more efficient, but it didn't seem to help here
02:55 Ben_Goldberg joined #perl6
02:56 grondilu (map { rand }, ^100_000)[*-1]  # 10 seconds
02:56 grondilu go figure
02:56 Ben_Goldberg joined #perl6
02:57 psch oh, right
02:57 psch grondilu++ # pointing me at the folly in my bench
02:57 psch the 2 orders of magnitude mentioned before were actually thunking overhead
02:57 psch 'cause i ran < rand xx 1_000_000 > vs < rand x 1_000_000 > - the latter being p5
02:58 psch m: for ^1_000_000 { rand }; say now - INIT now
02:58 camelia rakudo-moar 6d9701: OUTPUT«0.35346198␤»
02:58 Ben_Goldberg joined #perl6
02:58 grondilu ^ this takes 2 seconds on my machine
02:59 psch grondilu: well, camelia rebuilds at :48, among two others iirc
02:59 psch not sure if the commits between your build and current camelia matter, though
03:00 psch also, now - INIT now obviously skips at least a bit of runtime
03:00 grondilu wow:
03:00 psch like, at least as much as it takes to reach INIT time, however much that might be :)
03:00 grondilu $ $ time perl6 -e 'say [+] do for ^100_000 { rand };'
03:01 grondilu real    0m24.977s
03:01 grondilu user    0m24.720s
03:04 * psch shrugs and goes back to correctness before performance
03:07 zengargoyle joined #perl6
03:12 Ben_Goldberg m: say BEGIN { time } - INIT { time }
03:12 camelia rakudo-moar 6d9701: OUTPUT«0␤»
03:14 TimToady m: say INIT { now } - BEGIN { now }
03:14 camelia rakudo-moar 6d9701: OUTPUT«0.01202545␤»
03:15 TimToady time is POSIXly only accurate to seconds
03:15 Ben_Goldberg joined #perl6
03:16 Ben_Goldberg joined #perl6
03:25 grondilu m: say .elems given my @ = 1, slip 0 xx 100;
03:25 camelia rakudo-moar 6d9701: OUTPUT«101␤»
03:25 grondilu m: say .elems given my @ = slip 0 xx 100, 1;
03:25 camelia rakudo-moar 6d9701: OUTPUT«2␤»
03:25 grondilu not sure this is ok
03:26 psch m: say .elems given my @ = slip (0 xx 100, 1);
03:26 camelia rakudo-moar 6d9701: OUTPUT«2␤»
03:26 psch m: say .elems given my @ = (slip 0 xx 100), 1;
03:26 camelia rakudo-moar 6d9701: OUTPUT«101␤»
03:26 psch m: say (slip ^10, 1).elems
03:26 camelia rakudo-moar 6d9701: OUTPUT«2␤»
03:26 psch m: say (slip(^109, 1).elems
03:26 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…»
03:26 psch m: say (slip(^10), 1).elems
03:26 camelia rakudo-moar 6d9701: OUTPUT«11␤»
03:27 psch grondilu: i came across exactly that recently, when writing tests for native is rw dispatch
03:28 psch grondilu: < sub foo(int $x) { $x + 1 }; is foo 5, 6 >, or thereaboiut
03:28 psch -i
03:28 psch grondilu: there's no way for any given sub call to know when to stop parsing the following infix:<,> as arguments
03:29 psch m: sub f($) { }; say f 1, 2 # blergh
03:29 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␤»
03:29 psch grondilu: well, except for parens of course :)
03:30 noganex_ joined #perl6
03:31 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
03:32 psch but yes, slip seems special enough to let it be different that general sub calls
03:35 psch m: say my @ = so 0, not 1
03:35 camelia rakudo-moar 6d9701: OUTPUT«[False False]␤»
03:35 psch well, that's definitely waterbedding
03:35 psch moving slip prec, i mean
03:36 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
03:36 camelia rakudo-moar 6d9701: OUTPUT«[1 1 2]␤»
03:36 grondilu oh wait, I see
03:36 TimToady though usually those end up in a flat anyway
03:37 grondilu how can I add numeric arrays of different size, filling blanks with 0?
03:38 grondilu (if you see what I mean)
03:41 psch grondilu: <<+>> expands the shorter side with itself
03:41 grondilu yeah
03:41 psch grondilu: so [1] <<+>> [1,2,3] means [1], * ... * <<+>> [1,2,3]
03:41 psch err
03:41 psch grondilu: so [1] <<+>> [1,2,3] means ([1], * ... *) >>+<< [1,2,3] # a bit more precise, i think
03:43 PerlJam except that won't actually work.  :)
03:43 psch PerlJam: right, "a bit"... :/
03:43 psch i can't think of anything worky that doesn't involve manually filling @a to +@b elems
03:43 PerlJam me either
03:43 grondilu m: sub vector-sum(@a, @b) { gather for ^max(+@a,+@b) { take (@a[$_]//0) + (@b[$_]//0) } }; say vector-sum([1], [0, 0, 1])
03:43 camelia rakudo-moar 6d9701: OUTPUT«(1 0 1)␤»
03:44 grondilu that's meeeh
03:44 grondilu so dull
03:44 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..? ;)
03:44 PerlJam Seems like a policy of filling with identity elements would be more useful than filling with another copy of the array
03:44 grondilu lol
03:45 grondilu PerlJam: agreed
03:46 grondilu though it's definitely arguable
03:48 PerlJam I'm pretty sure it has been argued before too  ;)
03:50 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␤␤»
03:50 psch j: enum Foo <a>; Foo.^add_method('bar', sub ($fles: ) { say $fles }); Foo.bar.say
03:50 camelia rakudo-jvm 6d9701: OUTPUT«java.lang.NullPointerException␤  in sub  at /tmp/XmevxipF1i:1␤  in block <unit> at /tmp/XmevxipF1i:1␤␤»
03:50 psch welp, they agree somethings wrong...
03:51 psch the interesting bit is, i'm not even actually using self... vOv
03:51 psch moar has a check there jvm doesn't, but clearly something else is wrong in the lookup or somesuch...
03:52 psch re: expanding shorter side, i think repetition is more intuitive
03:52 psch that's just intuition though, and i think i'm mostly confident in it because it's what seems to be established already... :S
03:53 TimToady «+» basically goes with APL semantics
03:54 TimToady what we might do is modify »+« to check to see if there's a meaningful default on the small side, and use that
03:55 TEttinger joined #perl6
03:55 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:56 psch wouldn't that break e.g. "foo-" <<~>> @list-of-stuff-without-foo-prefix
03:56 psch m: say [~]
03:56 camelia rakudo-moar 6d9701: OUTPUT«␤»
03:56 grondilu &[~] is not a group operation
03:57 psch oh.  what is a group operation?
03:57 grondilu (but it has a neutral element, so nevermind)
03:57 grondilu psch: nah forget it
03:57 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
03:58 psch ('cause i really don't know, and would like to :P )
04:00 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 psch so that's probably the "nah forget i"
04:00 psch +t
04:02 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:03 lizmat joined #perl6
04:04 Ben_Goldberg joined #perl6
04:04 grondilu joined #perl6
04:06 bombless_ joined #perl6
04:07 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:␤␤»
04:08 psch neat
04:08 lizmat .botsnack
04:08 yoleaux :D
04:08 synbot6 om nom nom
04:08 psch "Actually thrown at:\n"
04:10 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…»
04:10 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«(1 0 1)␤»
04:11 ha joined #perl6
04:14 TimToady joined #perl6
04:16 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␤------> 0 xx (@b-@a)) Z+ (flat @b, 0 xx (@a-@b))7⏏5<EOL>␤    expecting any of:␤…»
04:16 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«(1 0 1)␤»
04:18 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)␤»
04:18 grondilu not too bad, but not great either
04:20 softmoth_ joined #perl6
04:23 dalek rakudo/nom: 01747cb | lizmat++ | src/core/Any.pm:
04:23 dalek rakudo/nom: Make Any.sum 2x faster still
04:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/01747cbb51
04:25 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
04:25 Hotkeys grondilu: ++
04:25 dalek roast: a1e5aff | lizmat++ | S02-types/array-shapes.t:
04:25 dalek roast: Unfudge now passing tests
04:25 dalek roast: review: https://github.com/perl6/roast/commit/a1e5affeb3
04:26 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
04:26 psch +h
04:26 lizmat and the my for the value outside of the loop
04:26 psch lizmat++ # perf work
04:26 Hotkeys oh neat
04:27 Hotkeys makes sense
04:27 lizmat it's a very hot loop for long lists/arrays
04:27 Hotkeys what is hot in this context
04:27 lizmat and there's not much else
04:27 konobi [Coke]: ping
04:27 lizmat Hotkeys: hot in the sense of often executed
04:27 Hotkeys ah
04:28 Hotkeys is it better to use .sum over [+]
04:28 lizmat that should not matter much anymore
04:29 grondilu .sum could be useful in a pipe
04:29 lizmat maybe you can notice it for very small lists
04:29 TimToady I think moving prifix:<|> to loose unary makes a lot of sense
04:30 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
04:30 Hotkeys does
04:30 Hotkeys op =:= &infix:<+>
04:30 Hotkeys +        ?? &sum
04:30 TimToady the only casualty is the usage that goes |<a b c> xx 3
04:30 Hotkeys make it just call sum
04:30 Hotkeys when used like [+]
04:31 TimToady yes, that's what it does
04:31 Hotkeys fancy
04:31 grondilu |@array xx $n  is quite a useful expression imho
04:31 grondilu could become a major idiom
04:32 TimToady I think we have more |(1..10) right now that could be |1..10
04:32 grondilu that would be nice indeed
04:32 TimToady and there's either flat or .Slip for the other
04:32 adu lizmat: what do you mean "the my"?
04:33 lizmat my $value;
04:33 adu lizmat: so "my" = "variable declaration"
04:34 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?
04:34 lizmat you usually want to have them lexically scoped, hence the "my"
04:34 Hotkeys you mean i shouldn't use 'our' for everything?
04:34 Hotkeys :p
04:35 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
04:35 lizmat Hotkeys: probably, yes
04:35 konobi it's similar to var/let in javascript
04:36 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..? )
04:36 Hotkeys or Dim in VB
04:36 konobi and of course javascript's strict mode comes directly from perl5 too
04:36 * Hotkeys had to take a VB course in HS
04:36 * Hotkeys wanted to die
04:36 Hotkeys metaphorically of course
04:36 psch Hotkeys: i did pascal (and delphi) in my national HS equivalent
04:36 psch two different courses
04:37 psch 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
04:37 Hotkeys so that was much less painful
04:37 adu lizmat: my background is lex, yacc, ANTLR and Python, and so far I haven't found something that Perl6 doesn't do better
04:37 Hotkeys permutations
04:37 Hotkeys unless that was optimized recently
04:38 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...
04:38 Hotkeys lol
04:38 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
04:39 Hotkeys I enjoy writing in perl 6 and I don't need anything too performance-heavy right now
04:39 Hotkeys so I've been using it for things
04:39 * llfourn wonders if he's the only one who didn't have programming available in HS....
04:39 konobi mmm... seems like perl6 could really do with some dtrace =0/
04:40 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 Hotkeys but other than that it's peachy
04:41 konobi Hotkeys: termcap probably
04:41 psch Hotkeys: the line ugexe++ (i think) pointed you at recently is probably it
04:41 Hotkeys oh I must've missed that
04:41 psch Hotkeys: 'cause, afair, it changes the expected line ending
04:41 Hotkeys was it the one in the Handle.pm
04:41 psch Hotkeys: no, i think it was in NQP somewhere
04:42 Hotkeys yeah I might've missed that then
04:42 Hotkeys time to go log hunting
04:43 psch Hotkeys: it was in the last 3 or 4 days i think... but i'm not 100% sure it was ugexe :/
04:43 Hotkeys hm
04:43 Hotkeys would there be a git link i can look for
04:43 Hotkeys oh
04:44 grondilu m: say [+] ^10**100;
04:44 camelia rakudo-moar 01747c: OUTPUT«49999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000␤»
04:44 Hotkeys https://github.com/perl6/nqp/blob/master/src/HLL/Compiler.nqp#L397
04:44 * grondilu wonders how many languages can compute this sum :)
04:44 Hotkeys Do I have to rebuild for modifying nqp stuff
04:45 zengargoyle llfourn: i think there are a bunch of people here who didn't even have computers in HS.
04:45 grondilu m: say [+] 2..10**100;
04:45 camelia rakudo-moar 01747c: OUTPUT«50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999␤»
04:45 psch Hotkeys: yes.  the easiest way is deleting your nqp-m.bat and running the contents of config.status in your rakudo src root
04:45 Hotkeys how to do this on windows :p
04:45 psch where the nqp-m to delete is the installed one, not the on in the rakudo src root
04:46 grondilu TimToady++ ([+] $range)  Probably not very useful, but still pretty cool
04:46 zengargoyle the closest thing to computer science back in my days was typing.   probably more usefull in the end
04:46 * llfourn redirects his wonder to wondering whether he is the only one under 30 who didn't have prgramming availble in HS
04:46 * psch is only barely under 30 :S
04:46 * Hotkeys is 18 so is very under 30
04:46 xiaomiao joined #perl6
04:46 krakan joined #perl6
04:46 TimToady grondilu: I consider Range.sum to be a down payment on other types that will be able to beat the generic algo
04:47 grondilu ok, looking forward to see those types
04:47 rjbs joined #perl6
04:48 * grondilu has recompiled rakudo and anxiously times [+] rand xx 100_000
04:48 grondilu nice!
04:48 grondilu 3.22s
04:48 zengargoyle i've used |<a b c> xx 3 more than i've even thought about |(1..10)
04:49 grondilu lizmat++ (.sum optimization)
04:49 konobi TimToady: is it [Coke] that handles the build/test infrastructure?
04:49 psch .tell nine something related to your bool_enum problem already happens in nom
04:49 yoleaux psch: I'll pass your message to nine.
04:49 psch .tell nine as in, adding a method to an enum in nom already reaches similar problem
04:49 yoleaux psch: I'll pass your message to nine.
04:49 psch .tell 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'"
04:49 yoleaux psch: I'll pass your message to nine.
04:50 bitmap joined #perl6
04:50 moznion joined #perl6
04:50 skaji joined #perl6
04:51 psch .tell jnthn http://irclog.perlgeek.de/perl6/2015-11-15#i_11540381 is kinda-sorta what block bool_enum from being mergeable.  the segfault is the some, except with getlex instead of bindlex, which somewhat off-by-ones, as mentioned earlier
04:51 yoleaux psch: I'll pass your message to jnthn.
04:52 psch .tell jnthn "is the same [issue]", not "is the some"...
04:52 yoleaux psch: I'll pass your message to jnthn.
04:52 isBEKaml joined #perl6
04:52 isBEKaml grondilu: Do you have the script to time [+] somewhere? I'd like to take it for a spin on my machine
04:53 tokuhiro_ joined #perl6
04:54 psch m: enum Foo <a>; Foo.^add_method('bar', sub ($fles: ) { say $fles }); Foo.bar.say
04:54 camelia rakudo-moar 01747c: OUTPUT«Cannot bind to non-existing object lexical 'self'␤  in sub  at /tmp/7slLii_Wqn:1␤  in block <unit> at /tmp/7slLii_Wqn:1␤␤»
04:55 psch from what i gather, something in there compiles to a getlex(self) call, but an EnumHOW doesn't install a self
04:55 psch not sure how correct that interpretation is, though...
04:57 rhr joined #perl6
04:57 Hotkeys oh I see
04:58 Hotkeys config.status just has the configure.pl options etc.
04:58 ilogger2 joined #perl6
04:59 mprelude joined #perl6
05:00 dalek rakudo/nom: 8ddc787 | lizmat++ | src/core/List.pm:
05:00 dalek rakudo/nom: Another sum to beat the generic algo (30% faster)
05:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8ddc7878e7
05:00 M-Illandan joined #perl6
05:01 grondilu isBEKaml: I just run '$ time perl6 -e 'say [+] rand xx 100_000;'
05:02 grondilu but you can also use the 'now - INIT now' idiom
05:04 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 #perl6
05:05 psch .tell jnthn nvm, confused myself with sub vs method
05:05 yoleaux psch: I'll pass your message to jnthn.
05:05 Hotkeys grondilu: oh that's a neat idiom
05:05 Hotkeys is there a list of idioms somewhere
05:05 grondilu not really.  It's very subjective.
05:06 Hotkeys psch: I changed that line to nqp::setinputlinesep($stdin, "\r\n");
05:06 Hotkeys it works buttery smooth now
05:06 psch Hotkeys: better just remove it complete
05:06 Hotkeys oh
05:06 psch Hotkeys: 'cause we set the line ending in Handle.pm
05:06 Hotkeys alright
05:06 psch Hotkeys: if you'd PR as you have it locally you'd break the linux repl :)
05:06 psch (i am assuming you want to PR this...)
05:06 Hotkeys (probably?)
05:07 Hotkeys I've never actually PR'd before what is the proper procedure
05:07 * Hotkeys is a babby contributor
05:07 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
05:07 konobi Hotkeys: have a peek at tput and the win32 cap
05:07 psch *fork
05:09 isBEKaml grondilu: Nice, 2.23s
05:09 * psch gets some shuteye... o/
05:09 * lizmat goes to sleep as well
05:10 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␤␤»
05:11 grondilu I vaguely recall having stumbled upon a similar issue before, while trying to implement the Numeric role in a custom role.
05:12 grondilu Shouldn't Foo.Numeric prevail, as it is defined in the current file or something?
05:15 kanishka joined #perl6
05:18 tokuhiro_ joined #perl6
05:18 Hotkeys oh wow
05:18 Hotkeys permutations is a lot faster than it used to be
05:18 Hotkeys I rescind my earlier comment
05:18 Hotkeys wait
05:19 Hotkeys I lied
05:19 Hotkeys I rescind my rescinding
05:20 xinming left #perl6
05:30 znpy joined #perl6
05:30 znpy p6
05:31 znpy p6: say 3.WHAT;
05:31 camelia rakudo-moar 8ddc78: OUTPUT«(Int)␤»
05:35 M-Illandan p6: say 42 ## test
05:35 camelia rakudo-moar 8ddc78: OUTPUT«42␤»
05:47 kaare_ joined #perl6
05:57 Hotkeys pull request done
05:57 Hotkeys this is exciting
06:00 bombless_ joined #perl6
06:01 znpy joined #perl6
06:02 isBEKaml_ joined #perl6
06:03 Actualeyes joined #perl6
06:06 Actualeyes joined #perl6
06:06 Actualeyes left #perl6
06:18 AlexDaniel h
06:20 Averna joined #perl6
06:22 znpy hey guys, do you know if there is going to be books like "Learning Perl 6" or "Programming Perl 6" ?
06:22 znpy also, is it my impression or Perl is losing its historic camel mascotte for the new butterfly mascotte ?
06:23 grondilu talking about permutations, I know how to make it faster
06:23 Hotkeys the butterfly is just for perl 6
06:24 Hotkeys grondilu: please do :P
06:24 Hotkeys znpy: I'm sure once perl releases around christmas a book might get started
06:24 Hotkeys s/perl/perl 6/
06:25 znpy Hotkeys: so the Camel is still the mascotte ?
06:25 grondilu https://gist.github.com/grondilu/115db8332c875b440ba8
06:25 Hotkeys for perl 5
06:25 llfourn znpy: perl5 => camel/raptor, perl6 => butterfly
06:25 Hotkeys ^^
06:26 znpy oh
06:26 znpy :(
06:26 llfourn perl7 => butterfy on a camel smoking a cigar
06:27 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.
06:28 llfourn grondilu: what do you mean?
06:29 grondilu I think it's supposed to be a proper fork (under my name), but currently it's just a clone.
06:29 raiph joined #perl6
06:29 llfourn just fork it on GH and add remote
06:29 llfourn then push to your GH fork and then PR
06:31 grondilu oh crap, I think I forked it under the wrong name.
06:32 grondilu github asked under which name I'd like to fork it.  It proposed "grondilu" and "perl6".  I chose perl6, and now it's https://github.com/perl6/rakudo, which is quite unexpected.
06:33 Sgeo_ joined #perl6
06:33 llfourn grondilu: haha nice
06:33 Hotkeys grondilu: oh wow that is a lot faster
06:33 llfourn yeah your gonna waanna delete that :P
06:33 TimToady znpy: the camel is just the larval form of the butterfly
06:33 TimToady Camelia's wingspan is really about 3 meters
06:34 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
06:34 znpy i guess i'll have to accept it
06:35 Hotkeys lol TimToady
06:35 llfourn The camel will still be around for a while I'm sure ;)
06:38 Hotkeys it just did permutations(8).reverse[0] in 6.7 seconds versus 42.5 seconds for the current version
06:38 Hotkeys I'm not going to try any higher because it took several minutes last time I tried permutations(9)
06:39 TimToady eager might help
06:39 grondilu jeez I still don't understnad how git works
06:39 Hotkeys relevant https://xkcd.com/1597/
06:41 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 #perl6
06:42 grondilu I did, but here it is again:  https://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
06:42 Hotkeys that's all I need
06:43 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
06:43 JimmyZ grondilu: using Seq is lazy too.
06:44 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:45 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.
06:45 JimmyZ grondilu: yeah, just edit it on rakudo/rakudo
06:46 grondilu ok I'll do it if Hotkeys has not done it already
06:46 Hotkeys Your code you get credit :p
06:47 JimmyZ grondilu: the example gather/take to Seq: https://github.com/rakudo/rakudo/commit/084e462eeb592902c88cf9a57fdbe9423a1f952a
06:50 Averna joined #perl6
06:52 grondilu I guess I should remove https://github.com/perl6/rakudo created by mistake
06:53 llfourn grondilu: yes please :)
06:54 grondilu done
06:54 llfourn \o/
06:58 hankache joined #perl6
06:59 llfourn grondilu: there is a test for permutations: https://github.com/perl6/roast/blob/master/S32-list/permutations.t
06:59 llfourn probs a good idea to run it
06:59 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
07:00 zengargoyle and git hub new # creates a pull-request
07:02 CIAvash joined #perl6
07:18 hankache joined #perl6
07:21 tokuhiro_ joined #perl6
07:21 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␤»
07:22 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:23 ShimmerFairy 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
07:23 ShimmerFairy moritz: true, it's not backtracking in the regex sense, but it certainly is backtracking in the everyday "no wait, hang on" sense :)
07:24 ShimmerFairy (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
07:24 moritz it would be pretty pointless to allow | or || in tokens if they never took anything except the first branch
07:25 ShimmerFairy It still stands that I hate having to add ridiculous <!before abc> style preconditions to the general cases
07:26 ShimmerFairy 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:28 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:29 ShimmerFairy 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 :: :-)
07:30 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
07:30 yoleaux :D
07:30 synbot6 om nom nom
07:32 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:33 [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 #perl6
07:52 Averna joined #perl6
07:53 grondilu I don't understand why but it appears that my patch to permutations does not make it faster once in the core.
07:56 xiaomiao joined #perl6
07:56 grondilu ah no, I just did not correctly write it locally
07:59 bombless_ joined #perl6
08:18 rindolf joined #perl6
08:20 xfix joined #perl6
08:35 diana_olhovik joined #perl6
08:39 rurban joined #perl6
08:44 moritz fwiw grondilu++'s patch sped up permutations(7) from 6.4s to 1.3s here
08:45 domidumont joined #perl6
08:45 [Coke] url?
08:46 moritz https://github.com/rakudo/rakudo/pull/585
08:46 moritz spectesting now.
08:51 dalek rakudo/nom: 57b83f4 | grondilu++ | src/core/native_array.pm:
08:51 dalek rakudo/nom: improve permutations
08:51 dalek rakudo/nom:
08:51 dalek rakudo/nom: using @permutations avoids computing permutations($n - 1) several times
08:51 dalek rakudo/nom:
08:51 dalek rakudo/nom: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
08:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/57b83f4ad7
09:02 molaf joined #perl6
09:02 c0r5um joined #perl6
09:15 hankache joined #perl6
09:15 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…»
09:16 hankache what is wrong?
09:17 Hotkeys Rat is not a subset of Num
09:17 hankache ok but what is the Num representation of 0.1 then?
09:18 Hotkeys you could do Real(0.1)
09:18 Hotkeys I lied
09:19 Hotkeys do Num(0.1)
09:19 hankache m: my Num $var = 0.1e0;
09:19 camelia rakudo-moar 57b83f: ( no output )
09:19 Hotkeys or 0.1.Num
09:19 Hotkeys or that too
09:19 Hotkeys m: my Num $var = 0.1e0; say $var;
09:19 camelia rakudo-moar 57b83f: OUTPUT«0.1␤»
09:19 hankache m: my Num $var = 0.1e0; say $var.WHAT;
09:19 camelia rakudo-moar 57b83f: OUTPUT«(Num)␤»
09:20 hankache Isn't it a bit misleading?
09:20 hankache m: my Rat $var = 1;
09:20 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…»
09:20 hankache m: my Rat $var = 1.0;
09:20 camelia rakudo-moar 57b83f: ( no output )
09:21 Hotkeys Rat is just how floating points are represented by default in perl 6
09:21 Hotkeys it allows for things like
09:21 hankache since I am saying the var is Rat
09:21 Hotkeys m: say .1 + .2 - .3
09:21 camelia rakudo-moar 57b83f: OUTPUT«0␤»
09:21 hankache why do i still have to say 1.0
09:21 Hotkeys I'm not an expert on the type system in perl
09:22 hankache Hotkeys: yes if using Num 0.1 + 0.2 will return an approximation
09:22 Hotkeys yes
09:23 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)␤»
09:23 hankache m: say (0.1e0 + 0.2e0);
09:23 camelia rakudo-moar 57b83f: OUTPUT«0.3␤»
09:23 hankache oops
09:23 hankache m: 0.1e0.WHAT.say;
09:23 camelia rakudo-moar 57b83f: OUTPUT«(Num)␤»
09:23 Hotkeys m: say 0.1e0 + 0.2e0 - 0.3e0;
09:23 camelia rakudo-moar 57b83f: OUTPUT«5.55111512312578e-17␤»
09:24 hankache Hotkeys++
09:24 Hotkeys m: say 0.3.nude;
09:24 camelia rakudo-moar 57b83f: OUTPUT«(3 10)␤»
09:24 Hotkeys fractions make math nice
09:24 Averna joined #perl6
09:24 Hotkeys m: say 0.3333.nude;
09:24 camelia rakudo-moar 57b83f: OUTPUT«(3333 10000)␤»
09:25 hankache what i was saying is if I define my Rat $var
09:25 hankache assigning to it 1 still gives an error
09:25 diana_olhovik joined #perl6
09:25 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
09:25 Hotkeys it's just how they're represented
09:26 hankache i guess
09:26 Hotkeys you can always
09:26 Hotkeys m: my Rat $var = 1.Rat; say $var;
09:26 camelia rakudo-moar 57b83f: OUTPUT«1␤»
09:26 Hotkeys but at that point might as well use a .0
09:26 hankache exactly
09:27 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:␤      …»
09:32 Hotkeys idk
09:33 moritz pink_mist: no, it only ever worked in signatures
09:33 moritz 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 #perl6
09:36 dalek rakudo/nom: 6268b83 | moritz++ | docs/ChangeLog:
09:36 dalek rakudo/nom: More ChangeLog entries
09:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6268b83f0a
09:36 Hotkeys I like the smilies
09:36 Hotkeys they make my code look happy
09:36 Hotkeys even when it gets angry
09:37 Hotkeys I also like that the (nu)merator (de)nominator sub is called .nude
09:38 Hotkeys also hankache, when you opt-in to type checking you can't complain when it checks your type :P
09:42 hankache Hotkeys i guess
09:43 hankache i just thought that it will coerce 1 to 1.0 since I specified Rat
09:43 [Tux] test             50000    21.876    21.760
09:43 [Tux] test-t           50000    18.294    18.178
09:44 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
09:45 [Tux] 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
09:45 Hotkeys go to "21:28 CurtisPoe" in http://irclog.perlgeek.de/perl6/2015-09-18/text
09:45 Hotkeys there is a conversation about this topic
09:46 eternaleye joined #perl6
09:47 pink_mist http://irclog.perlgeek.de/perl6/2015-09-18#i_11242555 <-- this might be a more useful link then :P
09:47 pink_mist (and I was there, which was why I thought Rat() would work ... but I see TimToady++ trying that already there
09:47 pink_mist and it didn't)
09:50 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
09:51 hankache but i agree that if you choose to strongly type than you have to write 1.0
09:51 bombless joined #perl6
09:51 Hotkeys I just dynamic type most of the time because dealing with types is for nerds
09:53 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
09:53 yoleaux 04:49Z <psch> nine: as in, adding a method to an enum in nom already reaches similar problem
09:53 yoleaux 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'"
09:53 yoleaux 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...
09:53 Hotkeys nine: nerd
09:53 hankache i like strong typing as nine put it it saves a lot of time in debug
09:55 Hotkeys I type sub parameters and such usually
09:55 Hotkeys I'm sure if I was doing a non-personal project I would care more about type safety
09:56 hankache i guess what i was asking for is strong typing with an option to implicit conversion
09:57 hankache i am reading the irc log you just pointed
09:57 hankache i guess masak has a point
09:58 hankache bottom line: you either want dynamic or safe, you can't have both at the same time
10:01 hankache time to go figure out what those smilies do :)
10:01 hankache bbiab
10:07 RabidGravy joined #perl6
10:09 hankache can someone give me a FatRat example
10:09 hankache thank
10:09 hankache thanks*
10:10 hankache m: my Rat $var = 1.0;
10:10 camelia rakudo-moar 6268b8: ( no output )
10:10 hankache like this ^ but for FatRat
10:10 Sgeo joined #perl6
10:12 hankache i am also trying to mimic when .1 + .2 returns 0.30000000000000004 any idea which data type i should choose?
10:16 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 #perl6
10:16 RabidGravy m: my $m = 1.FatRat + 0.000000001; say $m.WHAT;
10:16 camelia rakudo-moar 6268b8: OUTPUT«(FatRat)␤»
10:17 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:21 hankache m: say 0.1.FatRat + 0.2.FatRat;
10:21 camelia rakudo-moar 6268b8: OUTPUT«0.3␤»
10:21 hankache m: say 0.1.Num + 0.2.Num;
10:21 camelia rakudo-moar 6268b8: OUTPUT«0.3␤»
10:21 hankache :(
10:22 hankache to what type should i coerce to get 0.30000000000000004
10:22 hankache ?
10:22 RabidGravy why do want the wrong answer?
10:23 Skarsnik joined #perl6
10:23 hankache RabidGravy to compare it to Rat and say: Perl 6 has your arithmetic done correctly
10:23 hankache but i need to mimic the wrong result
10:23 dalek rakudo/curli: f2193cc | (Stefan Seifert)++ | src/Perl6/World.nqp:
10:23 dalek rakudo/curli: Fixup: remove debug output from "Turn lib into a proper pragma"
10:23 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/f2193cc499
10:24 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 domidumont joined #perl6
10:24 hankache so i can say this is what happens if you use python repl for example
10:25 hankache and this is what happens if you use Perl 6 repl
10:25 spider-mario joined #perl6
10:25 hankache out of the box correct results
10:25 pink_mist well, easier to then just use a python repl :P
10:26 RabidGravy m: say sprintf "%.32f", 0.1.Num + 0.2.Num
10:26 camelia rakudo-moar 6268b8: OUTPUT«0.30000000000000000000000000000000␤»
10:26 RabidGravy still get the right result
10:26 hankache RabidGravy: Perl 6 is right even when you're wrong :D
10:27 hankache 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
10:29 hankache i think you can't reproduce the error because internally everything gets converted to Rat
10:30 hankache but i am no expert
10:32 hankache Perl 5 get it right also out of the box
10:33 vendethiel hankache: no it doesn't; try "print 0.3 == 0.1 + 0.2"
10:33 nine It's just rounding on output
10:34 hankache ruby and python don't get it right
10:34 hankache m: print 0.3 == 0.1 + 0.2
10:34 camelia rakudo-moar 6268b8: OUTPUT«True»
10:34 vendethiel hankache: I meant in perl 5.
10:37 hankache need to go
10:37 hankache thank you everyone for your guidance
10:37 RabidGravy Perl 5 gives you "0.30000000000000004440892098500626"
10:37 RabidGravy (or it does here)
10:39 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;
10:39 camelia rakudo-moar 6268b8: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "aaa-222-aaa", to => 11, from => 0)␤»
10:39 hankache sorry print $var+$var2
10:39 RabidGravy perl -E ' say sprintf "%.32f", 0.1 + 0.2 '
10:39 mrf is there a way to make ^ not consume the last char in the greedy *?
10:40 RabidGravy *?
10:41 RabidGravy less greedy
10:41 mrf RabidGravy: would that not make it get no chars?
10:41 mrf m: "aaa-222-aaa" ~~ /<[a..z]><[a..z0..9-]>*?<[a..z0..9]>/; say $/.perl;
10:41 camelia rakudo-moar 6268b8: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "aaa-222-aaa", to => 2, from => 0)␤»
10:41 pink_mist mrf: I don't think the greedy * does consume the last char ... or the pattern wouldn't match
10:41 mrf pink_mist: it doesn't match
10:42 pink_mist it doesn't?
10:42 pink_mist it seems to match from the 0th character to the 11th
10:42 pink_mist though I guess I don't quite understand how the match object works
10:43 mrf m: "aaa-222-aaa" ~~ /<[a..z]><[a..z0..9-]>*?<[a..z0..9]>/; say $/;
10:43 camelia rakudo-moar 6268b8: OUTPUT«「aa」␤»
10:43 mrf m: "aaa-222-aaa" ~~ /<[a..z]><[a..z0..9-]>*<[a..z0..9]>/; say $/;
10:43 camelia rakudo-moar 6268b8: OUTPUT«「aaa-222-aaa」␤»
10:43 pink_mist see, it matches
10:43 mrf hmm. I think the example I am using is hiding my issue.
10:43 mrf In a token that would fail.
10:45 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;
10:45 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␤»
10:45 RabidGravy m: aaa-222-aaa" ~~ /$<a>=<[a..z]>$<b>=<[a..z0..9-]>*$<c>=<[a..z0..9]>/; say $/<a>, $/<b>, $/<c>;
10:45 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…»
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;
10:45 camelia rakudo-moar 6268b8: OUTPUT«(Any)␤»
10:46 ab5tract_ quick question: is there an instrospection method for Uni that can reveal the width of a character?
10:46 ab5tract_ as in single or double width.
10:46 mrf a subdomain is defined as a letter followed by any number of letter/digit/ghyphens followed by a letter or digit.
10:47 mrf RabidGravy: Missing "?
10:51 mrf 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」␤»
10:51 * mrf is confused
10:53 mrf 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」]␤»
10:53 mrf why does the regex work by the grammar doesn't!!!!
10:54 ab5tract_ mrf: afaik tokens do not backtrack, but regex do
10:54 ab5tract_ not sure if this explains the behavior you are seeing or not, but it is a difference between the two
10:54 ab5tract_ actually i think that might explain it pretty well
10:54 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;
10:54 camelia rakudo-moar 6268b8: OUTPUT«「aaa-22-aa2.foo」␤ label => 「aaa-22-aa2」␤ label => 「foo」␤»
10:55 mrf ab5tract_++ # genius
10:55 mrf ab5tract_: thank you so much
10:55 ab5tract_ no problem man!
10:56 ab5tract_ 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 diana_olhovik joined #perl6
10:57 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:58 mrf I love grammars but my brain hasn't really worked out the way you need to define them yet
11:00 arnsholt rule is token, but with whitespace mattering
11:00 autonomicon joined #perl6
11:00 ab5tract_ yeah, thats a good point arnsholt. whitespace doesn't matter by default in any regex, right?
11:01 arnsholt regex is with backtracking, no interpolation of <.ws> into whitespace
11:01 arnsholt token has no backtracking, and no sigspace
11:01 mrf huh. I thought whitespace mattered in regex. Maybe thats my p5 brain remembering
11:01 arnsholt rule has no backtracking and sigspace
11:02 arnsholt 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? )
11:03 mrf grammar?
11:04 kjs_ joined #perl6
11:08 ab5tract_ but a grammar is a noun with a specific meaning within the context of what i'm taking about
11:08 ab5tract_ s/context/contextual subset/
11:09 ab5tract_ and its the least important one, as i want the word to collectively refer to regex/token/rule
11:16 dalek nqp: 8ffafe6 | (Stefan Seifert)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
11:16 dalek nqp: Hook up MoarVM's file locking ops
11:16 dalek nqp: review: https://github.com/perl6/nqp/commit/8ffafe6d4a
11:22 tokuhiro_ joined #perl6
11:30 mrf ab5tract_++ # getting my tests passing :D
11:37 Ven joined #perl6
11:39 kjs_ joined #perl6
11:46 Ven joined #perl6
11:51 ab5tract_ cheers mrf! what are you hacking on?
11:53 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:54 ab5tract_ that sounds like some heavy lifting
11:54 mrf its not to bad. Just lots of repetative testing.
11:55 mrf most of the hard work is already done by ugexe++. I am just rearranging
12:16 ab5tract_ well that's good to hear
12:21 Skarsnik hm what does that mean:
12:22 Skarsnik skarsnik@testperl6:~/devel/rakudo$ /usr/bin/perl t/harness --moar t/04-nativecall/12-sizeof.t
12:22 Skarsnik t/04-nativecall/12-sizeof.t .. Dubious, test returned 1 (wstat 256, 0x100)
12:22 Skarsnik it can't parse/run the file?
12:23 bbkr_ cxreg: pong
12:25 mrf Skarsnik: Usually test died in some way. try running it without the harness and it shoudl show you whyt
12:26 nine Ah concurrency...always a challenge :)
12:28 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 Name_ joined #perl6
12:30 Ven joined #perl6
12:31 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
12:31 pink_mist and have been for some time
12:31 pink_mist I don't think I'd do it personally though
12:32 telex joined #perl6
12:32 mrf NameRequired: It is AFAIU still on schedule for its first actual release in December.
12:33 * NameRequired looks up strange acronym
12:33 pink_mist 'as far as I understand'
12:34 NameRequired that's great news. i got to go and buy a new book apparently
12:35 NameRequired that logo though...
12:35 RabidGravy I don't believe that there is a currently up to date book
12:35 RabidGravy that is a new one hasn't been published in the last year as far as I know
12:37 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 ;-)
12:38 * 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 :)
12:39 RabidGravy yay!
12:40 Skarsnik how I can submit this change? (I changed files affect rakudo/nqp/moar)
12:40 pink_mist make a pull request?
12:41 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
12:41 pink_mist so 3 pull requests :P
12:41 NameRequired rakudo: sub foo (Int $n where $n < 10) {}; foo(11)
12:41 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␤␤»
12:41 NameRequired neat
12:42 NameRequired rakudo: sub foo (Int $n where $n < 10) {}; foo(9)
12:42 camelia rakudo-moar 6268b8: ( no output )
12:42 NameRequired i love that feature already :)
12:43 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 #perl6
12:45 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)
12:45 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␤␤»
12:45 NameRequired wow
12:46 NameRequired rakudo: subset SmallerThanTen of Int where 0 < * < 10; sub foo (SmallerThanTen $n) {}; foo(9)
12:46 camelia rakudo-moar 6268b8: ( no output )
12:46 NameRequired this is phantastic
12:46 Ven joined #perl6
12:46 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)
12:46 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␤␤»
12:47 Skarsnik m: sub foo(Int $a) {}; sub foo2(Int $a --> Int) {}; my int32 $b; foo($b); foo2($b);
12:47 camelia rakudo-moar 6268b8: ( no output )
12:48 RabidGravy int32 is an Int ;-)
12:48 NameRequired shame there is no real CPAN6 though
12:48 RabidGravy m: say int32 ~~ Int
12:48 camelia rakudo-moar 6268b8: OUTPUT«True␤»
12:48 Skarsnik m: sub foo(Int $a) {}; sub foo2(Int $a --> Int) {}; my Num $b; foo($b); foo2($b);
12:48 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…»
12:49 Skarsnik hm what the use of --> then? x)
12:49 moritz return type checking
12:49 RabidGravy NameRequired,  there are however already 452 different modules in the ecosystem
12:50 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␤␤»
12:51 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
12:52 moritz NameRequired: what's your perlmonks username?
12:53 NameRequired holli
12:53 RabidGravy I think they are equivalent for the most part except --> in places where you can't put the returns
12:53 moritz Skarsnik: it's the same as 'returns', really
12:53 moritz NameRequired: yes, I remember
12:54 NameRequired Is tina still around? you know, the girl with the arm thing
12:54 Skarsnik m: sub foo(--> Int, Str) {'foo'};
12:54 NameRequired and how are you?
12:54 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'};␤»
12:54 RabidGravy gosh do people still use PerlMOnks?  I don't think I logged in for at least five years
12:54 Skarsnik Intresting error xD
12:54 NameRequired RabidGravy: Me neither
12:57 moritz seems I've written 9 replies on perlmonks this year
12:58 moritz 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␤------> 8 / (Date.today - Date.new('2007-05-21')7⏏5<EOL>␤    expecting any of:␤…»
12:58 moritz m: say 6418 / (Date.today - Date.new('2007-05-21'))
12:58 camelia rakudo-moar 6268b8: OUTPUT«2.070323␤»
12:58 moritz my average is still 2 posts per day, though :-)
12:59 RabidGravy as with all these things seeing the same questions over and over again gets tedious
13:00 Ven_ joined #perl6
13:02 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 Ven__ joined #perl6
13:03 NameRequired i understand rakudo is the implementation to go with, correct?
13:03 BenGoldberg joined #perl6
13:03 moritz yes
13:03 RabidGravy yes, it's the most complete and active
13:04 moritz s/most/only/
13:04 Ven__ moritz: he's still right :P
13:07 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 xpen joined #perl6
13:07 NameRequired Only 10 Megabytes?
13:08 NameRequired Wow, that's really lightweight
13:09 RabidGravy there are other parts required
13:11 NameRequired I just installed the Windows version (yeah, yeah, i know). Seems to be complete (includes Moar)
13:11 RabidGravy ah right
13:12 RabidGravy there isn't the twenty five years of accreted modules that will never leave that Perl 5 has ;-)
13:13 dalek nqp: ae63fcd | johnspurr++ | src/HLL/Compiler.nqp:
13:13 dalek nqp: Removed setting the input line separator
13:13 dalek nqp: review: https://github.com/perl6/nqp/commit/ae63fcdf45
13:13 dalek nqp: 8541494 | jnthn++ | src/HLL/Compiler.nqp:
13:13 dalek nqp: Merge pull request #254 from johnspurr/rm-setinputlinesep
13:13 dalek nqp:
13:13 dalek nqp: Removed setting the input line separator
13:13 dalek nqp: review: https://github.com/perl6/nqp/commit/85414946b9
13:15 Ven joined #perl6
13:21 NameRequired well thanks for the infos. i gonna look into this.
13:21 NameRequired as a reward i'll leave with this great newcomer band you got to check out: https://www.youtube.com/watch?v=TxZMfufRJfo&amp;list=PLHCU7f172fa57Lakn43a4Zg-wUqkGy7Qy
13:21 NameRequired bye
13:23 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:25 RabidGravy maybe split that part out into some other file that is always regenerated?
13:29 woolfy joined #perl6
13:29 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 woolfy left #perl6
13:30 Ven joined #perl6
13:31 rurban1 joined #perl6
13:31 brrt joined #perl6
13:31 espadrine joined #perl6
13:36 nine Seems like lizmat++ and jnthn++ discussed this off-channel, so I don't know the reasoning behind the current code :/
13:37 lizmat good *, #perl6!
13:37 lizmat please make changes as you see fit
13:37 nine lizmat: so I just have to find out what would fit ;)
13:37 lizmat this was discussed between jnthn and me *before* his curli gist
13:38 lizmat nine: yes
13:39 lizmat moritz++  # get permutations catch
13:39 lizmat *good
13:39 * lizmat is not awake yet
13:40 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  :-(
13:41 lizmat (which is a little hung over :-)
13:41 nine Ah, enjoy your hanging over then ;)
13:42 lizmat that part I usually don't  :-)
13:42 lizmat anyways... a few hours from now I will be offline until sometime on Thursday
13:43 dalek rakudo/nom: 8804424 | (Jimmy Zhuo)++ | src/core/List.pm:
13:43 dalek rakudo/nom: micro optimization of combinations
13:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8804424c6e
13:43 dalek rakudo/nom: 6bc9bba | lizmat++ | src/core/List.pm:
13:43 dalek rakudo/nom: Merge pull request #586 from zhuomingliang/patch-7
13:43 dalek rakudo/nom:
13:43 dalek rakudo/nom: micro optimization of combinations
13:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6bc9bbafac
13:43 rurban joined #perl6
13:44 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++
13:45 jdv79 i order a mojito and what came was the size of a catelope or honeydew mekon
13:45 lizmat jdv79: well, this one was from a mini-festival at the Magic City Casino  :-)
13:45 lizmat jdv79: but yeah, I've seen those on the strip while we were cycling there
13:46 Ven joined #perl6
13:46 jdv79 nice
13:47 brrt good * #perl6
13:48 kjs_ joined #perl6
13:48 rurban does perl6 already have a JSON decoder?
13:48 ramin joined #perl6
13:48 jdv79 many
13:48 RabidGravy yes
13:48 Skarsnik nop, but there is like 10 modules for it
13:49 ramin left #perl6
13:49 rurban I see. Is decode("true") allowed or not? It should be disallowed. All perl5 modules have it wrong
13:49 rurban https://github.com/rurban/Cpanel-JSON-XS/issues/41
13:50 Skarsnik Not sure to understand this
13:50 RabidGravy rurban, perl6 -MJSON::Tiny -e'say from-json("true")'
13:50 RabidGravy Input (4 characters) is not a valid JSON string
13:50 RabidGravy in sub from-json at /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/site/lib/JSON/Tiny.pm:59
13:50 RabidGravy in block <unit> at -e:1
13:51 rurban perfect
13:51 RabidGravy so not allowed (by JSON::Tiny at least)
13:51 moritz RabidGravy: it's not a valid json string
13:51 rurban php documented this extension, perl5 has allow_nonref for this behavior
13:51 moritz json needs an array or object as top-level
13:51 RabidGravy I know, rurban asked I was just providing evidence that it was indeed not allowed
13:51 ifim joined #perl6
13:52 kid51 joined #perl6
13:52 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);
13:52 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…»
13:52 rurban perl6 -MJSON::Fast -e'say from-json("true")'
13:53 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…»
13:53 camelia ..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 #perl6
13:53 RabidGravy JSON::Fast gives a somewhat more enlightening message
13:54 rurban Great. Something to brag about, (or point fingers to perl5)
13:54 Skarsnik one evalbot stuff as Task::Star?
13:54 Skarsnik *has
13:56 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')
13:56 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␤␤»
13:56 moritz star-m: use JSON::Tiny; say from-json('true')
13:56 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␤␤»
13:56 Skarsnik thx moritz
13:57 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 rurban JSON::Faster also got it right. Checked only 3 so far, but all seem ok
13:59 xenu g/win 17
13:59 xenu oops
14:00 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:01 moritz adrusi: yes, slurpies flatten; use -> +args { } if you want to write a routine that has single argument semantics
14:01 aborazmeh joined #perl6
14:01 aborazmeh joined #perl6
14:02 adrusi I see
14:02 rurban star-m: use JSON::Fast; say from-json('true')
14:02 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␤␤»
14:02 rurban star-m: use JSON::Faster; say from-json('true')
14:02 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/…»
14:03 adrusi moritz: then callers have to know what kind of varargs the routine uses?
14:03 Ven joined #perl6
14:04 espadrine_ joined #perl6
14:05 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 moritz adrusi: callers need to know the signature of the routine they call, yes
14:05 lizmat breakfast&
14:05 rurban joined #perl6
14:05 moritz adrusi: you can't call any subroutine with any junk of arguments, and expect it to work
14:06 dalek rakudo/curli: 47add65 | (Stefan Seifert)++ | src/core/CompUnit/DependencySpecification.pm:
14:06 dalek rakudo/curli: Fix undefined warnings on throwing "Could not find module" errors
14:06 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/47add656fe
14:06 adrusi moritz: true, I guess I just don't see the case where autoflattening of varargs is useful
14:07 lizmat I just did a small test on nqp::create(Foo) vs Foo.CREATE
14:07 lizmat the former is 2x as fast..
14:08 lizmat 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 lizmat really breakfast&
14:08 nine lizmat: .CREATE sounds like one of the simplest cases to optimize away. I really hope we can fix that.
14:10 AlexDaniel joined #perl6
14:10 jdv79 why is it 2x diff?
14:12 moritz adrusi: it's very useful where something can't deal with nested structures
14:12 kid51 joined #perl6
14:13 dalek rakudo/curli: 2163a7e | (Stefan Seifert)++ | src/core/IO/Handle.pm:
14:13 dalek rakudo/curli: lock and unlock for IO::Handle
14:13 dalek rakudo/curli:
14:13 dalek rakudo/curli: lock's $flag argument might need some more design
14:13 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/2163a7ecaf
14:14 dalek rakudo/curli: 08c55d5 | (Stefan Seifert)++ | src/core/CompUnit/Precompilation (2 files):
14:14 dalek rakudo/curli: Lock .precomp during precompilation of a module
14:14 dalek rakudo/curli:
14:14 dalek rakudo/curli: Prevents multiple processes precomping the same file and processes loading
14:14 dalek rakudo/curli: precompiled files that are not yet fully written.
14:15 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/08c55d5978
14:15 mrf is there any reason not to make <Foo::Bar::baz> not automatically do the equivelant of $<baz> = <Foo::Bar::baz> by default?
14:16 Ven joined #perl6
14:16 dalek rakudo/curli: b5263dd | (Stefan Seifert)++ | src/core/Compiler.pm:
14:16 dalek rakudo/curli: Make sure $*PERL.compiler.id changes on recompilation
14:16 dalek rakudo/curli:
14:16 dalek rakudo/curli: Previously this id only changed when recompiling src/Perl6/Compiler.nqp.
14:16 dalek rakudo/curli: This new implementation can most probably still be improved, but at least
14:16 dalek rakudo/curli: works for now.
14:16 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/b5263dd282
14:17 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
14:18 mrf hmm yeah true
14:18 mrf :(
14:18 mrf just writing $<foo>=<Bar::Baz::foo> is really tedious
14:19 dalek roast/curli: e0e0b80 | usev6++ | S (3 files):
14:19 dalek roast/curli: Unfudge passing tests for rakudo.jvm
14:19 dalek roast/curli: review: https://github.com/perl6/roast/commit/e0e0b803a8
14:19 dalek roast/curli: 45297cc | lizmat++ | S03-operators/buf.t:
14:19 dalek roast/curli: Update cumbersom CATCH tests to throws-like
14:19 dalek roast/curli: review: https://github.com/perl6/roast/commit/45297cc5be
14:19 dalek roast/curli: 94099c8 | lizmat++ | S03-operators/buf.t:
14:19 dalek roast/curli: Add tests for Buf.subbuf(^10)
14:19 dalek roast/curli: review: https://github.com/perl6/roast/commit/94099c85ec
14:19 dalek roast/curli: 49d4301 | moritz++ | S09-typed-arrays/native-int.t:
14:19 dalek roast/curli: Track improved error message from array[int].push and .unishift
14:19 dalek roast/curli: review: https://github.com/perl6/roast/commit/49d43012f7
14:19 dalek roast/curli: a1e5aff | lizmat++ | S02-types/array-shapes.t:
14:19 kjs_ joined #perl6
14:19 dalek roast/curli: Unfudge now passing tests
14:19 dalek roast/curli: review: https://github.com/perl6/roast/commit/a1e5affeb3
14:19 dalek roast/curli: 5048f1b | (Stefan Seifert)++ | S (6 files):
14:19 dalek roast/curli: Merge branch 'master' into curli
14:19 dalek roast/curli: review: https://github.com/perl6/roast/commit/5048f1bfdf
14:19 dalek Heuristic branch merge: pushed 19 commits to rakudo/curli by niner
14:28 Sqirrel joined #perl6
14:28 BenGoldberg joined #perl6
14:30 havenwood joined #perl6
14:31 abaugher joined #perl6
14:34 grondilu joined #perl6
14:35 brrt joined #perl6
14:36 havenwood Any good trick to get up arrow to show last command in the rakudo-star REPL?
14:38 tadzik yes, install Linenoise
14:38 tadzik (I thought it's installed with Star though)
14:38 timotimo ohai tadzik :)
14:41 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:45 tadzik ohai timotimo :)
14:49 Ven joined #perl6
14:53 raoulvdberge joined #perl6
14:59 * grondilu just installed Linoise and regrets it as it increase the REPL startup time quite a bit :/
15:00 dalek rakudo/curli: 06f21ba | (Stefan Seifert)++ | src/core/CompUnit/Repository/FileSystem.pm:
15:00 dalek rakudo/curli: Don't try to load precomp files after changing the precomp store
15:00 dalek rakudo/curli:
15:00 dalek rakudo/curli: In the following sequence:
15:00 dalek rakudo/curli: use Test;
15:00 dalek rakudo/curli: use lib 't/spec';
15:00 dalek rakudo/curli: use Test::Utils;
15:00 dalek rakudo/curli: after the 'use lib' we not only may no longer precompile modules, but also may
15:00 dalek rakudo/curli: not load precompiled modules. That's because the precompiled Test::Utils may
15:00 dalek rakudo/curli: link to a different precompiled version of Test. On loading Test::Utils this
15:00 dalek rakudo/curli: Test module would be loaded and conflict with the already loaded Test.
15:00 dalek rakudo/curli:
15:00 dalek rakudo/curli: The moral of the story is: to take most advantage of precompilation, try to set
15:00 dalek rakudo/curli: up your repository chain before starting to load modules.
15:00 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/06f21ba642
15:01 * grondilu whines at the lack of "remove" command to panda
15:02 nine grondilu: once I'm done with this curli branch, a remove command should be rather straight forward to implement
15:03 dalek rakudo/curli: d8a1658 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
15:03 dalek rakudo/curli: Make precompilation errors non-fatal
15:03 dalek rakudo/curli:
15:03 dalek rakudo/curli: Closing the output handle of a failed command throws a failure. Since
15:03 dalek rakudo/curli: precompile should fail non-fatally, we have to check the return value of
15:03 dalek rakudo/curli: the close call.
15:03 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/d8a165835c
15:09 tokuhiro_ joined #perl6
15:11 khw joined #perl6
15:19 kjs_ joined #perl6
15:20 dalek rakudo/curli: 63003c0 | (Stefan Seifert)++ | tools/build/NQP_REVISION:
15:20 dalek rakudo/curli: Bump NQP revision for file locking ops
15:20 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/63003c0f0d
15:21 tokuhiro_ joined #perl6
15:27 nine Nice, panda's curli branch still works with the current curli branch :)
15:29 tadzik :)
15:30 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:31 lizmat nine++
15:34 moritz nine++ indeed
15:34 tadzik nine++!
15:34 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?
15:35 arnsholt (Could be an interaction with NativeCall)
15:35 llfourn joined #perl6
15:42 zakharyas joined #perl6
15:48 kjs_ joined #perl6
15:49 timotimo tadzik: did you read my rant about rakudobrew and --build-options=--prefix=/opt/perl6 ?
15:49 timotimo arnsholt: if it's a true hang, perhaps try attaching GDB and doing "thread apply backtrace full"?
15:50 timotimo grondilu: you can also try to install linenoise with Zef instead of Panda (rakudobrew has build-zef, too)
15:51 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
15:51 timotimo it's just an opinion thing, really
15:56 Psyche^ joined #perl6
15:58 yqt joined #perl6
15:59 tadzik well, I never expected rakudobrew to be used to install stuff anywhere else than inside rakudobrew's directory
15:59 tadzik it's designed for that and for that only
16:00 tadzik whether it should feature an option to maybe also be able to install stuff in general to wherever anyone wants is another question
16:01 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:03 Skarsnik maybe prevent to do --config-opts=--prefix=something? or warn about it x)
16:04 cgfbee joined #perl6
16:04 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.
16:04 dalek rakudo/nom: 8e19973 | lizmat++ | src/core/ (15 files):
16:04 dalek rakudo/nom: s/foo.CREATE/nqp::create(foo)/
16:04 dalek rakudo/nom:
16:04 dalek rakudo/nom: This appears to have a positive effect on spectest duration/CPU usage,
16:04 dalek rakudo/nom: so assume this will be noticeable elsewhere as well.  If not, please
16:04 dalek rakudo/nom: revert  :-)
16:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8e19973b5b
16:05 lizmat goodbye, #perl6!
16:05 lizmat see you in 5 days or so...
16:05 tadzik timotimo: yeah, my thoughts exactly
16:05 havenwood timotimo: rlwrap working great, thanks! good to know about.
16:05 timotimo you're welcome :)
16:09 jdv79 precomp is back
16:09 jdv79 ?
16:10 timotimo with Zef, yes. in the curli branch, yes (or rather: will soon?)
16:16 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
16:17 timotimo 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 timotimo but in some case, somehow the instance->threads thing gets nulled
16:18 bombless joined #perl6
16:20 domidumont joined #perl6
16:23 arnsholt Might be it
16:23 Skarsnik Do someone has an idea how to know if an attribute is defined as HAS vs has?
16:23 arnsholt Especially since both threads are spending a lot of time inside native calls ATM
16:23 timotimo arnsholt: "a lot of time" doesn't mean much in this case
16:24 timotimo arnsholt: the other case that reproduces this is basically "loop { start { sleep 0.01 } }"
16:25 arnsholt Ah, right =)
16:25 timotimo s/basically//
16:30 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)»
16:30 timotimo oh, so you're trying to inline an A struct inside itself?
16:30 timotimo that'll go over well %)
16:30 timotimo but yeah, shouldn't segv
16:30 Skarsnik definitly x)
16:30 hartenfels joined #perl6
16:32 Ven joined #perl6
16:33 Skarsnik hm, that not very useful
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].perl
16:33 kjs_ joined #perl6
16:33 camelia rakudo-moar 8e1997: OUTPUT«Attribute.new␤»
16:38 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␤»
16:38 Skarsnik to answer my question on HAS and has
16:40 timotimo yeah, inlinedness is what HAS is about
16:47 Ven joined #perl6
16:50 Skarsnik I should have added the cenum type while I was adding size_t and bool x)
16:50 zengargoyle good * #perl6
16:57 Ven \o zengargoyle
17:00 Skarsnik I can't find how to display the name of a type. it's not something like A.WHAT ?
17:00 cygx joined #perl6
17:01 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
17:01 cygx timotimo: in that case it's probaby TinyCC that was to blame, but same principle
17:03 zengargoyle m: my (Rat() $foo) = 1;
17:03 camelia rakudo-moar 8e1997: ( no output )
17:04 awwaiid DC-Baltimore Perl Workshop April 16 2016 -- join us! Talk sign up: https://docs.google.com/forms/d/1wk9V7THT_SA5mq2lH_qJEMoR0QSQ53Pch-5bMhRpOQs/viewform
17:04 zengargoyle pink_mist: still around?
17:06 pink_mist no, not still ... again around :P
17:06 pink_mist but I'm off in 4 minutes
17:06 zengargoyle reading backlog.... you can use Signature with my to do the Rat() thing.
17:07 pink_mist can you show example?
17:07 zengargoyle m: my (Rat() $foo) = 1;
17:07 camelia rakudo-moar 8e1997: ( no output )
17:07 pink_mist ohh, cool! =)
17:07 pink_mist zengargoyle++ thanks for showing! =)
17:07 zengargoyle just read Signatures doc a day or so ago... :)
17:13 Ven Skarsnik: .WHAT, but it's undef, so add in .perl
17:13 Ven m: say 3.WHAT.perl
17:13 camelia rakudo-moar 8e1997: OUTPUT«Int␤»
17:13 Skarsnik Im: say 3.^name;
17:13 Skarsnik m: say 3.^name;
17:13 camelia rakudo-moar 8e1997: OUTPUT«Int␤»
17:18 dalek rakudo/curli: ca05aca | (Stefan Seifert)++ | src/core/CompUnit/Repository/FileSystem.pm:
17:18 dalek rakudo/curli: Simplify path manipulation code a bit
17:18 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/ca05aca9b7
17:21 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:22 grondilu s/in a name/and a name/
17:22 tokuhiro_ joined #perl6
17:23 grondilu .oO( hum maybe it works already since only a role can use "does" )
17:23 grondilu m: role Foo {}; class Foo does Foo {}
17:23 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 {}␤»
17:25 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 #perl6
17:26 Skarsnik This bother me : http://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:27 timotimo Skarsnik: do you know what "alignment" means?
17:28 MadcapJake joined #perl6
17:29 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?
17:29 Skarsnik Yes
17:29 zengargoyle Lawful, Neutral, Chaotic?
17:29 timotimo that's problematic, then.
17:30 timotimo could very well be that you're using different types in the C struct and the NC class
17:30 timotimo as in, something that has the same size but different alignment
17:30 brrt .tell cygx i cannot reproduce the segv on windows yet, but i can't build using *just* strawberry perl either
17:30 yoleaux brrt: I'll pass your message to cygx.
17:30 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
17:30 cygx brrt: what's your failure mode?
17:30 yoleaux 17:30Z <brrt> cygx: i cannot reproduce the segv on windows yet, but i can't build using *just* strawberry perl either
17:31 timotimo so you'll end up with holes
17:31 timotimo holes, as in: memory that's not used by anything
17:31 Skarsnik size are identical for the field itselfs
17:31 brrt let's see
17:31 Skarsnik The issue, it's the NC size that is bigger
17:31 brrt cygx: can't compile dyncall using gcc
17:32 cygx we should all be using C11 - it comes with _Alignof
17:32 brrt 'invalid conversion from DCpointer to DCString
17:32 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
17:33 cygx brrt: builds for me on Win7-64 with Strawberry Perl (64-bit) Portable 5.20.2.1-64bit
17:35 MadcapJake what's a pragma and what ones are there?
17:36 * brrt is using windows 8.1 and strawberry perl 64 bit installation 5.22.0
17:37 brrt but i have to be afk now
17:37 zengargoyle a pragma is something that tweaks the compiler... -ish
17:37 cygx brrt: assuming it's not some sort of mis-configure, perhaps hack the Makefile to lower error levels?
17:37 cygx these types are void* and const char*, repectively
17:37 cygx so they are not only ceonvertible, but even have the same representation
17:37 MadcapJake is there any docs on pragmas? I can't seem to find anything about them
17:38 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 #perl6
17:38 zengargoyle i think the line is not clearly defined in dynamic languages...
17:39 MadcapJake the old textmate perl6 highlighter had `oo|fatal` as pragmas
17:39 zengargoyle use lib 'lib' - is now a pragma IIRC
17:39 timotimo aye, but potentially only in the "curli" branch
17:40 zengargoyle in Perl 5 i think you could say that use BigNum is pragma-ish
17:41 Skarsnik hm
17:41 Skarsnik * So we keep track of that biggest element. */
17:41 Skarsnik MVMint32 multiple_of = 1;
17:41 MadcapJake anyone know if `oo` is still a pragma? I'm wondering if that's (if it means object-oriented) been "baked in" now.
17:41 Skarsnik /* The structure itself will be the multiple of its biggest element in size.
17:41 Skarsnik Probably the issue
17:41 psch m: use oo;
17:41 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/…»
17:41 timotimo could very well be
17:42 timotimo 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 Skarsnik nop, not this
17:43 Skarsnik 96 is 6x16 (max size)
17:43 MadcapJake m: use no-worries;
17:43 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…»
17:44 cygx Too many positionals passed; expected 1 argument but got 1
17:44 cygx thanks, rakudo: that's helpful...
17:44 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␤␤»
17:45 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"
17:45 camelia rakudo-moar 8e1997: OUTPUT«whaaaat␤»
17:45 MadcapJake so, it doesn't need a `use` call?
17:45 timotimo that's not correct
17:46 timotimo it's either "use" or "no
17:46 timotimo "
17:46 MadcapJake ohhh, i didn't know that, interesting
17:47 BenGoldberg joined #perl6
17:48 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
17:49 zengargoyle looking at Perl6/World do_pragma
17:49 MadcapJake zengargoyle: thanks!
17:50 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?
17:50 timotimo autarch: you can always start out under your own name
17:51 timotimo 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)
17:51 zengargoyle some of those are NYI or other special-ish things handling.
17:51 autarch timotimo: sounds good
17:51 autarch any thoughts on naming? right now it's called Pod::NodeWalker - and include a Pod::NodeListener role
17:51 autarch but I'm open to something else
17:51 avar s/w 6
17:54 zengargoyle autarch: are you matching on Pod::Block in your Walker?
17:54 autarch zengargoyle: yes
17:57 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."
17:57 Skarsnik xD
17:58 raiph joined #perl6
17:59 Ben_Goldberg joined #perl6
18:01 autarch https://github.com/autarch/Pod-NodeWalker
18:02 autarch would it be more idiomatic to use multi methods in https://github.com/autarch/Pod-NodeWalker/blob/master/lib/Pod/NodeListener.pm6 ?
18:03 autarch and just call most of the methods 'start' & 'end'
18:04 autarch it also occurs to me that tihs would be even cleaner if there were co-routines. does Perl6 have that?
18:05 timotimo we have gather/take, which is a bit similar
18:05 ab5tract_ timotimo: can you elaborate on the differences?
18:06 autarch gather/take isn't exactly what I'd want - I'll make a gist - one sec
18:07 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 :/
18:07 autarch https://gist.github.com/autarch/57f8eeb48d93a5f17a65
18:08 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
18:09 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 dwarring joined #perl6
18:09 autarch Skarsnik: in Perl 5 there's Module:: and Dist::
18:10 autarch the latter mostly inspired by Dist::Zilla and similar modules
18:10 autarch 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
18:11 autarch 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
18:12 * zengargoyle has already added a Pod::Block::Data which would fall to ... start(Pod::Block:D $block) or something.
18:14 nowan joined #perl6
18:18 Ven joined #perl6
18:19 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:20 AndChat380436 joined #perl6
18:22 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␤␤»
18:22 autarch that seems like a bug
18:22 autarch 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?
18:23 autarch readable version of that code is at https://gist.github.com/autarch/9c809326bed918fda4ab
18:23 nowan joined #perl6
18:25 autarch so should I file a bug, and if so, where?
18:26 autarch looks like this error comes from rakudo
18:27 raiph autarch: maybe https://rt.perl.org/Ticket/Display.html?id=124393
18:27 zengargoyle or is that the case for the submethod thing?
18:27 MadcapJake is there an `only` keyword anymore? I'm unable to locate it in the docs.
18:27 autarch raiph: yeah, I think that may be the same thing
18:27 zengargoyle MadcapJake: last time i tried 'only' it worked.
18:28 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
18:29 autarch I had to login
18:29 autarch but it didn't tell me that, it just gave me a very broken page - gotta love RT
18:29 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
18:30 autarch well, gotta love heavily customized instances of RT, at least
18:33 Ven joined #perl6
18:33 ponbiki joined #perl6
18:34 ugexe using the RT web interface is always an adventure
18:34 Ven joined #perl6
18:35 autarch is there a list of bugs to fix by christmas? I'd nominate that one
18:38 ugexe thats an odd priority with about 1 month until release
18:39 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:40 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
18:40 autarch heh, no, definitely not
18:40 autarch I meant https://rt.perl.org/Ticket/Display.html?id=124393
18:42 ab5tract_ thanks for clarifing timotimo :D
18:43 ab5tract_ *clarifying
18:43 masak evening, #perl6
18:43 ab5tract_ o/ masak!
18:43 timotimo i want to be clarif instead of the clarif!
18:43 ab5tract_ how goeth thy day's respite?
18:45 Ven \o masak
18:46 masak ab5tract_: my day's respite goes well, thanks.
18:46 masak thinking of maybe doing something vaguely ambitious instead of just respiteful. :)
18:47 autarch prithee, good sir, tell us why thou speakest in the language of Shakespeare?
18:47 ab5tract_ heed and go forth!
18:47 pink_mist harken and sally forth!
18:47 ab5tract_ autarch: not exactly sure, tbh. maybe masak inspires my classical side?
18:48 autarch isn't that pre-classical?
18:48 autarch although I'm not sure if music's classical period is the same time as other classical periods
18:49 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 #perl6
18:56 ab5tract_ timotimo: i shot the clarif, but i did not shoot the clarifee
18:57 masak I feel honored to be inspiring anypony's classical side.
18:58 mr_ron .tell brrt his dyncall compile problem is known and documented here https://github.com/MoarVM/MoarVM/issues/292
18:58 yoleaux mr_ron: I'll pass your message to brrt.
18:59 mr_ron interesting it seems to build with an older version of Strawberry Perl - I'll give it a try ...
19:04 Ven joined #perl6
19:21 nine Where does @*MODULES come from? It doesn't seem to be declared, except in perl6-debug.nqp
19:24 dalek rakudo/curli: d991d92 | (Stefan Seifert)++ | src/core/CompUnit.pm:
19:24 dalek rakudo/curli: Remove precomp handling from CompUnit.load
19:24 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/d991d927dd
19:24 CIAvash joined #perl6
19:25 autarch https://gist.github.com/autarch/c818898a32390948dfdc
19:25 autarch apparently the pod parser in the compiler is throwing away the term being defined
19:27 brrt joined #perl6
19:27 brrt cygx, good idea
19:27 yoleaux 18:58Z <mr_ron> brrt: his dyncall compile problem is known and documented here https://github.com/MoarVM/MoarVM/issues/292
19:29 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'"
19:29 brrt hmmm
19:30 brrt yeah, that might be the same issue
19:30 cygx mr_ron: that's the issue I have
19:30 brrt which... moarvm version do y'all have?
19:30 cygx you need to set MVM_DISABLE_JIT or possibly even MVM_DISABLE_SPESH to continue
19:31 mr_ron cygx: thanks - will try it
19:32 cygx brrt: CORE.setting failing to compile on MinGW has been the state of affairs since forever
19:33 brrt hmmm
19:33 cygx the problem at runtime I described yesterday in #moarvm happened at 2015.10-95-g5f007a9
19:33 brrt ok, i have my suspicions
19:34 brrt hmm
19:36 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:42 llfourn joined #perl6
19:44 raiph joined #perl6
19:47 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 - https://gist.github.com/autarch/c818898a32390948dfdc - is this a bug in the synopsis or rakudo?
19:48 nine cygx: an unhandled exception of a certain type
19:49 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 nine cygx: oh my. I'll keep that in mind for when I start playing around with that
19:49 nine cygx: but sans bugs it should be safe?
19:49 Ven joined #perl6
19:52 nine cygx: otherwise I'd have to keep a list of the transitive dependencies for every precomped file.
19:53 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
19:53 cygx is that something you have to worry about?
19:54 cygx arnsholt: HAS inlines the aggregate, has references it by pointer
19:55 diana_olhovik_ joined #perl6
19:55 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 :)
19:55 arnsholt Heh =)
20:04 Ven joined #perl6
20:05 AlexDaniel .u µ
20:05 yoleaux U+00B5 MICRO SIGN [Ll] (µ)
20:05 AlexDaniel .u μ
20:05 yoleaux U+03BC GREEK SMALL LETTER MU [Ll] (μ)
20:06 AlexDaniel ughhh
20:06 AlexDaniel μghhh*
20:07 havenwood .u ;
20:07 yoleaux U+037E GREEK QUESTION MARK [Po] (;)
20:08 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 raiph autarch: your gist seems to work for me
20:09 autarch raiph: what output are you getting?
20:10 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?
20:10 autarch raiph: yes, note that "Item" has been discarded, contrary to the synopsis
20:10 havenwood AlexDaniel: (It looks exactly like a semicolon on mine.)
20:10 raiph autarch: http://stackoverflow.com/a/27936867/1077672
20:10 colomon joined #perl6
20:11 autarch raiph: what's that link telling me?
20:11 AlexDaniel havenwood: https://files.progarm.org/2015-11-15-221110_87x29_scrot.png
20:11 havenwood AlexDaniel: Interesting, thanks!
20:11 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"
20:11 AlexDaniel havenwood: actually, yes, when I look at clog I see no difference… depends on the font
20:12 autarch raiph: doh, now I see it
20:12 mr_ron bbl
20:12 autarch but that still seems broken, shouldn't contents be ['Item', 'Definition'] or something to separate the bit on the =defn line?
20:13 AlexDaniel what about changing all semicolons in some code to ;? It has to be fun…
20:14 geraud joined #perl6
20:14 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 https://rt.perl.org/Ticket/Display.html?id=126651
20:15 kjs_ joined #perl6
20:18 raiph autarch++
20:18 znpy joined #perl6
20:19 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:20 autarch =table :caption('foo') -  parses the caption as q{'foo'} instead of q{foo}
20:20 autarch 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 #perl6
20:20 cygx mr_ron: I mixed up the word order - it's MVM_JIT_DISABLE and MVM_SPESH_DISABLE
20:21 cygx 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)
20:21 autarch ok
20:22 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.
20:22 yoleaux nine: I'll pass your message to jnthn.
20:23 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"?
20:23 yoleaux nine: I'll pass your message to jnthn.
20:24 raiph ++autarch # :)
20:33 Ben_Goldberg .karma yoleaux
20:34 Ben_Goldberg .ping
20:34 yoleaux There is no ping command; nor can this be construed as a response.
20:34 Ven joined #perl6
20:34 Ven joined #perl6
20:35 Ven joined #perl6
20:36 xfix joined #perl6
20:38 raiph autarch: q{'foo'} from :caption('foo') looks like a bug to me too
20:43 hankache joined #perl6
20:44 * zengargoyle is lost in Perl6::Pod helper functions and add_constant and compile_time_value
20:45 zengargoyle have: say $=data.perl -> Pod::Data.new(unkeyed => [], keyed => {})
20:45 ifim left #perl6
20:46 zengargoyle have $*POD_DATA_UNKEYED ([]) and $*POD_DATA_KEYED ({}) populated
20:46 zengargoyle can't quite figure out incantation to put all the bits together. :)
20:50 autarch is there any sort of standard for how Perl6 modules should be documented anywhere? or a good example I could follow?
20:58 Skarsnik follow p5 modules section maybe?
20:58 raiph autarch: CPAN? ;)
20:58 autarch raiph: well, no, because I can write "=NAME" instead of "=head1 NAME" and such, right?
21:02 zengargoyle i think the spec has a list of =NAME things
21:03 Skarsnik is there something to do some formating with text like in p5? (with <<<< ?)
21:03 zengargoyle formats?
21:04 brrt joined #perl6
21:04 moritz Skarsnik: there's a Form module in the ecosystem
21:05 Skarsnik Oh thx
21:11 Ben_Goldberg joined #perl6
21:13 raiph autarch: fyi, spec re heading names: http://design.perl6.org/S26#Semantic_blocks
21:13 autarch raiph: yep, found that
21:15 softmoth_ joined #perl6
21:16 sprocket joined #perl6
21:16 Possum joined #perl6
21:17 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:18 RabidGravy likely something not formatting the semantic blocks nicely
21:18 Sqirrel joined #perl6
21:18 BenGoldberg_ joined #perl6
21:20 telex joined #perl6
21:24 tokuhiro_ joined #perl6
21:25 autarch btw, is the person who wrote the p6 Email::Simple here?
21:26 autarch retupmoca: ^
21:29 autarch alright, here's my module in all its glory (?) - https://github.com/autarch/perl6-Pod-NodeWalker
21:29 autarch I'm still not sure about those names
21:29 autarch so let's not add it to the ecosystem quite yet, but I'd appreciate any feedback people have
21:30 Skarsnik add a readme.pod or readme.md x)
21:32 * autarch wishes for dzil6
21:32 autarch README.md is added
21:34 rurban joined #perl6
21:34 Ven_ joined #perl6
21:37 autarch heh, I just realized there's another module callked Pod::Walker already - though it has a bit of an odd API
21:37 kjs_ joined #perl6
21:38 autarch so I don't feel too bad for duplicating effort
21:38 autarch no offense intended
21:39 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:40 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 autarch with Perl 5 there's often 5 modules that all do a similar thing awkwardly
21:41 llfourn joined #perl6
21:41 zakharyas joined #perl6
21:41 brrt in perl6 there will be 6 ways to do it awesomely
21:41 jesper_ joined #perl6
21:46 BenGoldberg joined #perl6
21:49 AlexDaniel in fact, looking at JSON modules it feels like we already have 6 ways in various places…
21:54 Ven joined #perl6
22:01 Skarsnik Someone should write JSON::Pretier that does like JSON::Prety but with color
22:03 * pink_mist throws some 't's at Skarsnik :P
22:04 dalek rakudo/curli: 4a64a9c | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
22:04 dalek rakudo/curli: A bit of code restructuring for readability
22:04 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/4a64a9c770
22:04 dalek rakudo/curli: 6f4b5b5 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
22:04 dalek rakudo/curli: Precompile installed modules in Repository::Installation
22:04 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/6f4b5b58f6
22:05 nine And with that, good night!
22:05 pink_mist nine++ good night
22:07 zakharyas joined #perl6
22:08 Ven joined #perl6
22:12 ollej joined #perl6
22:16 timotimo nine++ # good progress on the curli branch
22:16 zengargoyle has anybody done a ctags thingy for Perl 6
22:19 timotimo yes
22:19 timotimo stmuk++ has
22:20 timotimo https://github.com/stmuk/p6-app-p6tags - also in the ecosystem
22:22 Ven joined #perl6
22:26 zengargoyle cool
22:35 Hotkeys Skarsnik: JSON::PrettyColors
22:35 Hotkeys much better name
22:39 timotimo JSON::RainbowUnicornFarts ?
22:39 Zoffix joined #perl6
22:42 TEttinger joined #perl6
22:45 raiph joined #perl6
23:04 RabidGravy I think there should be more modules with unicorns
23:05 RabidGravy does Javascript have Junctions or anything that approximates?
23:06 jdv79 logic ops?
23:06 llfourn RabidGravy: erm no I don't think so
23:09 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:10 RabidGravy 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"
23:10 llfourn probs. Maybe you can overload '==' or something..
23:13 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 #perl6
23:35 dayangkun joined #perl6
23:36 flussence JS has Sets now, not exactly junctions but it's an improvement
23:38 Sqirrel joined #perl6
23:38 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:42 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
23:42 RabidGravy it's part of the toobox, you may not use it often but when you need it it's decisive
23:43 xenu true
23:43 RabidGravy toolbox
23:43 Ven joined #perl6
23:44 brabo joined #perl6
23:52 zengargoyle i seem to use junctions quite a bit
23:56 RabidGravy depends on the kind of code you tend to make
23:56 RabidGravy I tend to use $foo ~~ Foo|Bar more than anthing else

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo