# IRC log for #perl6, 2014-03-12

All times shown according to UTC.

Time Nick Message
00:02 siruf joined #perl6
00:09 siruf joined #perl6
00:10 TimToady http://rosettacode.org/wiki/Bernoulli_numbers is an interesting task.  I couldn't figure out how do to it with folds and rotates, so for a second solution I used a self-destroying/reconstructing sequence operator :)
00:10 Mouq joined #perl6
00:11 treehug88 joined #perl6
00:11 colomon !!!!
00:11 TimToady if anyone else wants to add solutions using other equations, feel free :)
00:11 TimToady Bernoullis are weird beasties
00:13 TimToady colomon++ for making sure Rats and FatRats work :)
00:14 woolfy joined #perl6
00:15 * Mouq 's small Perl 6 contribution of the night http://codegolf.stackexchange.com/a/23787/15012 (sorry xfix++)
00:17 siruf joined #perl6
00:17 benabik Mouq: You could make it shorter and remove the note about associativity simply by removing support for exponents.  :-D
00:18 benabik Mouq: It takes you 10 characters to include it anyway.  ;-)
00:20 TimToady Mouq: this seems like it's solving a more complicated problem than is given at the top of the page
00:22 Mouq colomon: Done
00:23 Mouq TimToady: .eval works too, but you get bonus negapoints for not using eval or similar
00:23 Mouq That should probably say 'points' not 'characters' come to think of it
00:24 siruf joined #perl6
00:26 dayangkun joined #perl6
00:28 Mouq I don't think the "accepted" Perl 5 solution gets anywhere close to actually solving it.. :/
00:30 siruf joined #perl6
00:30 TimToady so maybe it's solving a different 'it'
00:31 benabik It does mention expressions, under Scoring.  (poorly organized, IMHO)
00:31 rurban left #perl6
00:31 Mouq TimToady: "-50 Bonus if your code can handle simple expressions, for example 55*96-12"
00:31 cognominal__ joined #perl6
00:31 Mouq But I agree, it says otherwise in the beginning
00:31 Mouq Anywho
00:31 Mouq The task is closed :)
00:32 Mouq And I have homework to do
00:32 Mouq o/ #perl6
00:37 bjz joined #perl6
00:54 [Sno]_ joined #perl6
00:54 telex joined #perl6
00:54 logie__ joined #perl6
00:55 wooden_ joined #perl6
00:55 wooden_ joined #perl6
00:55 btyler joined #perl6
00:55 ribasushi_ joined #perl6
00:56 flussenc1 joined #perl6
00:56 labster_ joined #perl6
00:57 gfldex_ joined #perl6
00:57 itz joined #perl6
00:58 SHODAN joined #perl6
00:59 hoelzro joined #perl6
00:59 geekosaur joined #perl6
00:59 ggherdov_ joined #perl6
00:59 Juerd joined #perl6
01:00 rurban__ joined #perl6
01:00 pdcawley joined #perl6
01:00 sunnavy joined #perl6
01:00 cxreg joined #perl6
01:03 klapperl joined #perl6
01:03 isacloud_ joined #perl6
01:04 japhb joined #perl6
01:04 Exodist joined #perl6
01:04 zamolxes joined #perl6
01:05 timotimo joined #perl6
01:05 yogan joined #perl6
01:06 xenoterracide joined #perl6
01:07 bjz_ joined #perl6
01:19 ggoebel11111 joined #perl6
01:19 __thou joined #perl6
01:19 Vlavv joined #perl6
01:21 woolfy joined #perl6
01:22 jeffreykegler joined #perl6
01:26 jeffreykegler re Bernoulli numbers: this is in fact the problem Lovelace and Babbage solved for her 1843 paper
01:27 jnap joined #perl6
01:41 skids joined #perl6
01:41 woosley joined #perl6
01:52 LootingLemur looking to build rakudo 2014.02 but does proxy does not allow git. Since no star distribution, which do I need to build first: nqp & parrot?
02:00 jeffreykegler left #perl6
02:01 skids Are you specifically looking for rakudo-parrot rather than rakudo-moar or rakudo-jvm?
02:01 skids In any case, VM first then NQP then rakudo, I imagine.
02:07 klapperl_ joined #perl6
02:10 FROGGS_ joined #perl6
02:11 LootingLemur thanks
02:17 bjz joined #perl6
02:24 timotimo rakudo star is only available for parrot so far
02:28 Sqirrel joined #perl6
02:35 * colomon fears he is going to have to translate this \$work code to p5 for speed.
02:36 timotimo colomon: not terribly long now and we'll be fast, too
02:36 * timotimo beds
02:36 colomon hope so!
02:38 BenGoldberg joined #perl6
02:38 colomon hmmm, 27 seconds forming and printing out a .perl of a large data structure...
02:57 go|dfish joined #perl6
02:58 felher joined #perl6
03:50 woosley1 joined #perl6
03:55 woosley joined #perl6
03:58 woosley2 joined #perl6
03:59 japhb__ colomon: Yeah, the string performance is right now one of the most frustrating things for me -- partially because I'm used to (for perl5) only having to care if I was using an asymptotically horrid algorithm on a really big dataset.
04:01 japhb__ I big part of what makes perl ... well ... "Perlish" for me is that I expect it is generally safe performance-wise to do things very idiomatically, rather than having to specify every little detail.  Perl 6 helps me think even more abstractly than Perl 5, and yet Rakudo forces me to think about implementation more than perl5.  That's jarring.
04:02 japhb__ But as timotimo says, hopefully that will be getting much better soon.  :-)
04:05 japhb__ .ask jnthn Is there an operation similar to Promise.then that allows me to say I'm not going to fork the execution path, so please just keep it scheduled in the same thread, rather than pessimistically spinning up a new thread to schedule the 'then' code on?
04:05 yoleaux japhb__: I'll pass your message to jnthn.
04:06 japhb__ .tell jnthn I'm fine with something like the .vow semantics that would *enforce* the non-forking execution path.
04:06 yoleaux japhb__: I'll pass your message to jnthn.
04:13 woosley joined #perl6
04:16 BenGoldberg n: my @b := gather { my @a; for 0 .. * -> \$m { push @a, FatRat.new(1, \$m+1); for reverse 1..\$m -> \$j { @a[\$j-1] = (@a[\$j-1] - @a[\$j]) * \$j }; take \$m => 0+@a[0] if @a[0] } }; say @b[^61]
04:16 camelia niecza v24-109-g48a8de3: OUTPUT«0 => FatRat.new(1, 1) 1 => FatRat.new(1, 2) 2 => FatRat.new(1, 6) 4 => FatRat.new(-1, 30) 6 => FatRat.new(1, 42) 8 => FatRat.new(-1, 30) 10 => FatRat.new(5, 66) 12 => FatRat.new(-691, 2730) 14 => FatRat.new(7, 6) 16 => FatRat.new(-3617, 510) 18 => Fat…»
04:17 BenGoldberg ^ a much faster technique for calculating Bernoulli numbers, for the RosettaCode task :)
04:17 SamuraiJack joined #perl6
04:21 ponbiki joined #perl6
04:21 TimToady well, except that then we only want about 30 of them :)
04:23 kaare_ joined #perl6
04:27 TimToady that's a heck of a lot faster :)
04:36 itz joined #perl6
04:36 ribasushi joined #perl6
04:37 pdcawley joined #perl6
04:50 TimToady BenGoldberg++ for noticing the duplicated work, the new RC entry is much, much faster, so I ran it up to B(100) :)
05:03 BenGoldberg :)
05:06 TimToady though I'm sure some Haskeller is going to look at how I destroy @a every time through and say "ick"  :)
05:06 TimToady but it was so convenient getting \$j from the remaining size of @a
05:09 TimToady I suppose I should write the point free version some time just for the good of my immutable^Wimmortal soul
05:10 BenGoldberg When I saw the way your code destroyed @a each time, my thought was... 'wtf?' :)
05:12 TimToady yeah, it's sort of a phoenix algorithm :)
05:33 kaleem joined #perl6
05:33 xenoterracide joined #perl6
05:46 woosley1 joined #perl6
05:52 hoverboard joined #perl6
06:03 LootingLemur compiling src/main.o In file included from src/main.c:4: src/moar.h:19:16: uv.h: No such file or directory src/moar.h:25:21: dynload.h: No such file or directory
06:03 LootingLemur trying to compile moar from source
06:12 Timbus_ have you cloned the cubmodules
06:12 Timbus_ submodules*
06:13 TimToady that's a buglette that jnthn++ left in his latest patches, I think
06:13 TimToady you probably want to use the versions picked by rakudo for the moment
06:16 TimToady or figure out how to get the right include directory installed maybe
06:22 perl007 joined #perl6
06:26 perl007_ joined #perl6
06:28 perl007 joined #perl6
06:28 vincent22 joined #perl6
06:30 moritz \o
06:32 [Sno] joined #perl6
06:46 LootingLemur thanks
06:51 woosley joined #perl6
06:52 woosley2 joined #perl6
06:57 woosley joined #perl6
06:59 woosley1 joined #perl6
07:03 woosley joined #perl6
07:03 clkao joined #perl6
07:16 kaleem joined #perl6
07:16 dmol joined #perl6
07:18 perl007 hi
07:19 perl007 is there a number larger than any other number but itself, aka Inf?
07:21 perl007 not for range construction, just simple assignment, comparison
07:22 Timbus_ .. you mean Inf ?
07:26 Timbus_ http://perlcabal.org/syn/S02.html#Infinity_and_NaN
07:27 perl007 thanks
07:27 Timbus_ theres not much there,
07:31 slavik joined #perl6
07:32 clkao joined #perl6
07:35 darutoko joined #perl6
07:38 clkao joined #perl6
07:49 clkao joined #perl6
07:59 dayangkun joined #perl6
08:04 rindolf joined #perl6
08:08 kaare_ joined #perl6
08:11 zakharyas joined #perl6
08:23 brrt joined #perl6
08:28 rindolf joined #perl6
08:31 Rotwang joined #perl6
08:32 rindolf joined #perl6
08:32 DarthGandalf joined #perl6
08:43 brrt people are still talking about 2048
08:43 brrt awesome
08:45 virtualsue joined #perl6
08:46 * moritz still only got to 1024
08:47 * brrt only got to 256 or so before giving up… :-)
08:48 yakudza 512 ):
08:49 tadzik hm. The game didn't appeal to me at all
08:51 cosimo_ what game?
08:52 moritz cosimo_: http://gabrielecirulli.github.io/2048/
08:58 woosley1 joined #perl6
08:59 masak_ joined #perl6
08:59 masak_ morning, #perl6
08:59 masak_ huh. someone seems to have taken my nick. or something.
09:00 masak_ I didn't know that could happen. I'm pretty sure I needed to identify with NickServ every time, and so on.
09:00 masak_ anyone know what the prudent thing to do in this case is?
09:00 tadzik go to freenode #staff
09:00 masak_ oki
09:01 tadzik because it was unused for a year or two
09:03 masak phew.
09:04 moritz masak: you can /msg identify nickserv masak <yourpass>  and then  /ghost masak
09:04 moritz oh, I see you already were successful
09:04 denisboyun joined #perl6
09:04 masak yes, #staff did indeed help me quickly.
09:05 masak moritz: the incantation I used, btw, was 'regain masak <pwd>'
09:05 masak (to nickserv)
09:05 moritz masak: oh nice, a shortcut
09:05 jnthn .tell japhb__ We don't have such introspection yet, sadly. Agree its needed. Also at some point the scheduler should start tuning itself based on throughput...
09:05 yoleaux 11 Mar 2014 23:43Z <japhb__> jnthn: Is there any way from Rakudo to see how many threads are actively running tasks, how many are blocked on e.g. IO, how many tasks *could* run if there was a thread available, etc?  I'm at the point now that I'm wanting to optimize the use of my thread pool to keep all my cores busy, and it would help to be able to introspect the states.
09:05 yoleaux 11 Mar 2014 23:47Z <japhb__> jnthn: A sample use case: I have an app that starts up chewing CPU in one or two cores, launches a bunch of tasks in different threads, they all start communicating with external processes, all cores max out briefly, some tasks finish, others go to low-CPU state and machine drops to only a core or two used for another 20 seconds before finishing.  And now I want to know why.  :-)
09:05 yoleaux 04:05Z <japhb__> jnthn: Is there an operation similar to Promise.then that allows me to say I'm not going to fork the execution path, so please just keep it scheduled in the same thread, rather than pessimistically spinning up a new thread to schedule the 'then' code on?
09:05 yoleaux 04:06Z <japhb__> jnthn: I'm fine with something like the .vow semantics that would *enforce* the non-forking execution path.
09:05 yoleaux jnthn: I'll pass your message to japhb__.
09:05 masak and then 'set enforce on', so it's less likely to happen again.
09:09 jnthn .tell japhb__ It will not spin up a new thread for "then" if there's already a free one, though I guess the current doesn't count as free. The right API design is to make .then take a scheduler to use to schedule the then, though. Then you'd just pass it CurrentThreadScheduler and be done.
09:09 yoleaux jnthn: I'll pass your message to japhb__.
09:10 tadzik oh, I thought the regular masak was re-registered by someone
09:11 masak not sure what happened.
09:11 masak but it was easy to undo.
09:11 pecastro joined #perl6
09:12 vincent21 joined #perl6
09:16 woolfy left #perl6
09:19 jnthn TimToady: The "doesn't build" issue was about Rakudo's extops not building against latest Moar HEAD, nto Moar itself not building...that one looks like a separate issue...
09:33 pecastro joined #perl6
09:34 FROGGS[mobile] joined #perl6
09:41 dakkar joined #perl6
09:48 eternaleye joined #perl6
10:00 kurahaupo joined #perl6
10:15 kurahaupo joined #perl6
10:17 eternaleye joined #perl6
11:11 timotimo o/
11:12 masak \o
11:22 bionoid joined #perl6
11:24 colomon |o|
11:27 perl007 perl6: ([7, 0], [9, 1], [14, 2], [Inf, 3], [Inf, 4]).min.perl.say;
11:27 perl007 eh
11:27 camelia niecza v24-109-g48a8de3: OUTPUT«[7, 0]␤»
11:27 camelia ..rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«[14, 2]␤»
11:28 perl007 how do we paste code here and what this should print?
11:29 timotimo you can put code onto gist.github.com and then write r: http://and_so_on/... to execute it
11:29 masak perl007: I don't remember reading anything about how arrays should sort wrt each other.
11:29 masak perl007: arrays aren't really value objects, they're reference objects, so it's not clear to me they should even be orderable.
11:30 timotimo aye. it would probably be wise to use a .sort with a custom metric and just get the [0]
11:30 masak perl007: what timotimo said.
11:31 perl007 well, min : {\$_[0]} works, so no sorting, ok, thanks
11:31 timotimo oh, i didn't realize min had that. cool.
11:40 denisboyun joined #perl6
11:43 masak r: say [[1, 2, 3], [4, 5, 6], [-7, 5]].min( *[0] )
11:44 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«-7 5␤»
11:44 masak perl007: *[0] is a shorter way to write { \$_[0] }
11:49 fhelmberger joined #perl6
11:58 timotimo r: my %foo of Hash; %foo<bar><baz> = 1; say %foo;
11:59 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«("bar" => {"baz" => 1}).hash␤»
11:59 hoverboard joined #perl6
12:01 timotimo i'm wondering if we should warn if the user types "my Hash %foo" or "my Array @a", as that means "hash of hashes" or "array of arrays" respectively, even though it *looks* like "my %foo is a hash" instead
12:01 timotimo we could then suggest to either use "my %foo of Hash" or "my %foo is Hash" instead to make it more clear
12:03 * moritz *finally* won 2048
12:03 moritz time to close the browser tab, and forget the URL
12:03 timotimo a friend of mine also told me he won and is now free to be productive again
12:05 kaare_ joined #perl6
12:06 timotimo masak: there's a rakudobug for you to report in #moarvm :)
12:13 virtualsue joined #perl6
12:14 _sri is the graal and truffle stuff for the jvm as exciting as it sounds here? http://www.chrisseaton.com/rubytruffle/ho​w-method-dispatch-works-in-jruby-truffle/
12:18 brrt joined #perl6
12:20 masak moritz: so, what's the trick? :)
12:21 moritz masak: the trick is to order the big-numbered tiles in ascending order, for example on the bottom row
12:21 masak r: sub z of Int { }; say &z ~~ Callable
12:21 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«True␤»
12:21 masak r: sub z of Int { }; say &z ~~ Callable[Int]
12:21 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«False␤»
12:21 * masak submits rakudobug
12:21 masak moritz: ooh
12:21 moritz and then row above that contains tiles with smaller numbers, with the biggest in right corner
12:21 cognominal__ joined #perl6
12:22 moritz in fact I had the bottom two rows ordered
12:22 moritz and then once you get a tile that's big enough, it can be propagated along the (2) bottom row(s)
12:23 masak r: multi x(Int &y) { say 1 }; multi x(Str &y) { say 2 }; sub z of Int { }; x &z
12:23 camelia rakudo-moar 1aeb7c: OUTPUT«Cannot call 'x'; none of these signatures match:␤:(Int &y)␤:(Str &y)␤  in sub x at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
12:23 camelia ..rakudo-parrot 1aeb7c: OUTPUT«Cannot call 'x'; none of these signatures match:␤:(Int &y)␤:(Str &y)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1219␤  in any  at gen/parrot/BOOTSTRAP.nqp:1210␤  in sub x at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
12:23 camelia ..rakudo-jvm 1aeb7c: OUTPUT«Cannot call 'x'; none of these signatures match:␤:(Int &y)␤:(Str &y)␤  in any  at gen/jvm/BOOTSTRAP.nqp:1212␤  in any  at gen/jvm/BOOTSTRAP.nqp:1202␤  in sub x at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
12:24 moritz it's not quite trivial to actually keep it up, but with a few trials, I made it
12:25 denis_boyun joined #perl6
12:27 masak ...how come the stacktrace of moar is different from JVM and Parrot, above?
12:28 moritz seems the stacktrace filtering only filters out BOOTSTRAP on moar
12:28 moritz might be a bug
12:28 masak that's what I was thinking...
12:30 sergot hi o/
12:31 masak sergocie! \o/
12:38 colomon r: my \$a = "this is a test".comb.set; for \$a -> \$elem { say \$a; };
12:38 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«No such method 'set' for invocant of type 'List'␤  in block  at /tmp/tmpfile:1␤␤»
12:38 colomon r: my \$a = "this is a test".comb.Set; for \$a -> \$elem { say \$a; };
12:38 camelia rakudo-parrot 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«set(t, h, i, s,  , a, e)␤»
12:38 camelia ..rakudo-jvm 1aeb7c: OUTPUT«set(a, e,  , h, s, i, t)␤»
12:39 kbaker joined #perl6
12:39 * colomon could have sworn it was supposed to be .set rather than .Set...
12:40 tadzik the output from jvm almost says "shit" :)
12:45 masak colomon: no, it's .Set because it coerces to a Set.
12:45 masak colomon: as far as I know, only the subs are lower-case.
12:45 colomon but it's .hash rather than .Hash?
12:45 masak yeah :/
12:46 masak and .list rather than .List
12:46 timotimo oh, huh.
12:46 colomon I foolishly expected consistency.
12:46 * colomon is pretty sure he did try .Hash first, earlier this week
12:46 * colomon is using Set operations in his code for \$work, btw.  ;)
12:50 himanshu joined #perl6
12:50 himanshu hello
12:50 himanshu how are you tadzik?
12:51 himanshu I am glad to see so many people here...
12:51 himanshu how is perl 6 going on?
12:52 masak himanshu: it's going very well!
12:52 moritz it's progressing fine, unless when I distract #perl6 with addictive games :-)
12:53 masak himanshu: Rakudo now has three very mature backends, each with its own superpower.
12:53 masak himanshu: Parrot has All The Modules, JVM has Really Quite Fine Threading Support, and moar is Quick and Nimble.
12:55 yakudza masak, So if I use parrot I can use all perl5 modules ?
12:56 timotimo masak: well, moar is still a little immature
12:56 himanshu so, when will it release? I was thinking of starting to use Rakudo
12:56 hoelzro good morning #perl6!
12:57 hoelzro himanshu: I've been using it for a while
12:57 hoelzro I haven't used it for
12:57 hoelzro *all* of my stuff, but it's fun to work with!
12:57 hoelzro you do encounter the occasional bug, though
12:57 hoelzro and performance is still improving
12:58 hoelzro on a side note, I saw this article on JRuby last night: http://www.chrisseaton.com/rubytruffle/ho​w-method-dispatch-works-in-jruby-truffle/
12:58 hoelzro thought others here might find it intersting
12:58 timotimo currently the kinds of bugs you're going to encounter are usually easily workaroundable
12:58 hoelzro interesting, even
12:58 himanshu I want to create crawlers using Perl 6, will be crawling shopping site more
12:58 hoelzro timotimo: that's a good point
12:58 timotimo and "is still improving" is a nce way to spell "still sucks" :)
12:58 kaleem joined #perl6
12:58 timotimo (and bugs you find are mostly fixed soon rather than late)
12:59 timotimo gotta run now
12:59 hoelzro timotimo: you saw right through me ;)
12:59 hoelzro but it's made *huge* strides since I started playing
12:59 timotimo aye
12:59 * timotimo kicks himself for still procrastinating so heavily on that block inlining optimization for nqp
12:59 timotimo AFK for real now.
13:00 himanshu bye bye
13:02 tadzik yakudza: nah, that doesn't work
13:02 tadzik masak meant all Perl 6 modules:)
13:06 guru joined #perl6
13:07 bionoid left #perl6
13:11 hoverboard joined #perl6
13:27 masak timotimo: "is still improving" does not necessarily mean "still sucks"... "good" and "improving" are mostly orthogonal concepts.
13:27 xragnar joined #perl6
13:29 JimmyZ it's good but needs to be better
13:34 jnthn Note that .hash/.list don't give you exactly Hash or List. .list on an Array gives you back the Array.
13:47 masak yeah, that's a good point.
13:47 masak they're... "fuzzy casts" or something like that.
13:56 moritz they are more like .positional and .associative
13:58 jnap joined #perl6
14:02 btyler joined #perl6
14:05 masak right.
14:06 thou joined #perl6
14:06 masak type casting is hard.
14:08 kivutar joined #perl6
14:19 treehug88 joined #perl6
14:26 bjz joined #perl6
14:29 zakalwe joined #perl6
14:31 zakalwe joined #perl6
14:31 zakalwe joined #perl6
14:34 [Coke] what does the "of Int" in "sub z of Int {} " indicate?
14:34 masak [Coke]: that the return value has to be Int.
14:35 masak [Coke]: which, now that I think about it, is a weird, isn't it? because that empty sub obviously doesn't live up to that contract.
14:35 masak AFAIR, 'of Int' and 'sub z(--> Int)' are the same.
14:36 moritz and 'returns Int'
14:36 [Coke] -1 for timtoady there.
14:37 [Coke] at least lets collapse of/returns into one.
14:38 [Coke] m: sub z of Int {}; say z.WHAT
14:38 camelia rakudo-moar 1aeb7c: OUTPUT«Type check failed for return value; expected 'Int' but got 'Any'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:596␤  in sub z at /tmp/A973PQEEQX:1␤  in block  at /tmp/A973PQEEQX:1␤␤»
14:38 masak now of/returns I'm pretty sure are/used to be different.
14:38 [Coke] masak: we get a runtime check, anyway.
14:38 [Coke] m: sub z of Int {return "eek"}; say z.WHAT
14:38 camelia rakudo-moar 1aeb7c: OUTPUT«Type check failed for return value; expected 'Int' but got 'Str'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:596␤  in sub z at /tmp/qnviywe5Y7:1␤  in block  at /tmp/qnviywe5Y7:1␤␤»
14:39 [Coke] ^^ seems like we could compile time catch that one, at least.
14:42 timotimo there's "sub foo of Int (signature) { body }" and there's "sub foo (signature) returns Int { body }"
14:42 timotimo if you have a bunch of attributes, like "will post" and "will pre", you may find the "returns" form more readable
14:42 timotimo if you have a complex/smart signature, you may want to put a --> in there, since it's already a big thingie
14:42 timotimo if it's just a little thing, the "of" form seems prettiest, i guess
14:43 bluescreen10 joined #perl6
14:44 * moritz kindas likes the 'returns' form, and --> Int is valuable in a non-routine signature, where 'returns' or 'of' aren't an option
14:44 moritz *kina
14:44 moritz *kinda
14:44 moritz whatever
14:44 [Coke] so --> Int is the bare minimum, and of and returns are both sugar?
14:45 moritz aye
14:47 timotimo what's the current spelling of "return nothing"? "returns Nil"?
14:48 timotimo r: sub foo returns Nil { 1 }; say foo;
14:48 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c: OUTPUT«Type check failed for return value; expected 'Any' but got 'Int'␤  in block  at /tmp/tmpfile:1␤␤»
14:48 camelia ..rakudo-moar 1aeb7c: OUTPUT«Type check failed for return value; expected 'Any' but got 'Int'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:596␤  in block  at /tmp/tmpfile:1␤␤»
14:48 colomon Is there a p6 module for handling (english) pluralization and punctation in lists?
14:49 tadzik I don't know of any
14:50 * colomon will put up with his report lacking proper grammar for a bit.
14:54 [Coke] colomon: that seems like a portable p5 module.
14:54 colomon "portable"?
14:54 [Coke] (not that you want to port it, but I bet it would be doable by someone looking to get dirty with P6)
14:54 [Coke] able to be ported.
14:54 colomon oh, as in a non-lazy person could port it?
14:55 tadzik if you find me a Perl 5 module, I can do this
14:55 [Coke] Yes. not implying you, you're busy. :)
14:55 tadzik for now, I'm not exactly sure what you need :)
14:55 tadzik turning 1 into 1st etc?
14:55 colomon no, turning attribute into attributes if there is more than one
14:55 colomon and then a list into A
14:55 [Coke] https://metacpan.org/pod/Lingua::ENG::Inflect ?
14:55 colomon or A and B
14:55 colomon or A, B, and C
14:56 colomon [Coke]: yes, like that for the first part.  though that is seriously overkill for my current needs.
14:57 colomon WORDLIST there is the second bit
15:11 masak I think the 'of' form is defendable as well -- because it occurs for list and map types, where 'returns' doesn't make much sense.
15:11 masak don't ask me what the subtle difference was between 'of' and 'returns', though -- ISTR there was one, but I'm drawing a complete blank on what it might've been.
15:12 timotimo still wondering how best to work against the massive duplications of strings in rakudo
15:13 timotimo like __lowered_param_\$n for example; there I can just have a little list of strings to cache these, since it definitely seems to be worth it
15:13 timotimo but what about other cases?
15:13 timotimo like OPER being crazy common
15:26 Ven joined #perl6
15:26 jnthn OPER we should look into where it's coming from
15:27 jnthn Some of the others, though, we could have a %*INTERNS declared in TOP or comp_unit, and then write a sub intern in Actions.pm that we call in various places.
15:27 timotimo mhm
15:27 timotimo i wasn't quite sure where OPER came from; it must be something non-constant, but it's not a composite of two, so it must be the result of some substring?
15:28 jnthn maybe, yeah...
15:28 jnthn Well, it's the ones that make it into gen2 that we really want to worry about rather than those that just exist in the nursery for a bit.
15:28 jnthn was OPER one of the gen2 ones
15:28 jnthn ?
15:28 timotimo yes
15:28 timotimo incredibly common there
15:29 Ven (what's gen2 ?)
15:29 timotimo where old objects come to live after they've proven that they're going to stick around longer
15:29 timotimo garbage colllector terminology
15:31 timotimo huh.
15:31 Ven (ooh :D)
15:31 timotimo my install/include contains dyncall/, but there's only dynload.h and dynload_alloc.h in there
15:33 xfix Interesting. I just installed Perl 1, and Perl 5 removes deprecated Perl 1 syntax, like do call()...
15:33 timotimo oh, ouch
15:33 timotimo modules.perl6.org shows "YAML Ainât Markup Language"
15:34 xfix Yet do call() still works in Perl 6.
15:34 timotimo we are perlers, we ought to know better than that! :)
15:34 timotimo < Content-Type: text/plain; charset=utf-8
15:34 moritz timotimo: yes, know better than that!
15:34 timotimo that's for https://raw.github.com/ingydot​net/yaml-pm6/master/META.info
15:35 jnthn timotimo: OK, curious...
15:35 huf ingy, helping people debug unicode bugs since forever ;)
15:35 timotimo :3
15:35 timotimo well, the html claims to be utf8
15:36 Ven never believe the html
15:36 timotimo well, the http header doesn't give a content encoding, only the content-type text/html
15:37 timotimo and then         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
15:37 timotimo and then YAML Ainâ<U+0080><U+0099>t Markup Language</dd>
15:39 sergot Is there one vm we should focus on or should we develop all of them? :)
15:39 huf usual wtf8
15:39 timotimo my \$json = \$ua->get(\$proj)->res->json; ← this is how the Info.pm in P6project of modules.perl6.org/web/lib fetches that; \$ua is a Mojo::UserAgent
15:42 timotimo i don't see how to tell mojo::useragent to do anything with encoding
15:44 _sri timotimo: encoding?
15:44 timotimo maybe we should replace my \$json = \$ua->get(\$proj)->res->json; with my \$json = decode_json(\$ua->get(\$proj)->res, binmode => ':encoding(UTF-8'))
15:44 timotimo oh, hold on
15:44 _sri wtf?
15:44 timotimo that binmode came from read_file, not from decode_json
15:44 _sri json is always utf-8
15:44 ingy huf: :D
15:45 ingy huf: sorry ☺
15:45 timotimo okay, i have no clue of perl5. this is where i get off and someone else can hop on :)
15:45 huf ingy: huh? you provide a vital service!
15:45 xfix JSON is any UTF.
15:45 _sri not true
15:46 huf ingy: this is also why my name on certain sites is hüftlb cícáfős
15:46 xfix _sri, RFC 4627
15:46 ingy
15:46 guru joined #perl6
15:46 _sri JSON is only UTF-8 now... the latest RFC revision made that pretty clear
15:46 xfix To be exact, "3. Encoding"
15:46 _sri xfix: RFC 7159
15:46 _sri RFC 4627 is obsolete
15:47 _sri the whole check the first two bytes to detect the encoding stuff is gone for good
15:47 _sri a bare "null" is now valid JSON too... fun times
15:48 huf timotimo: this works fine: perl -Mstrict -Mwarnings -MData::Dumper -MMojo::UserAgent -E 'binmode STDOUT, ":encoding(UTF-8)"; say Mojo::UserAgent->new->get("https://raw.github.com/ingydot​net/yaml-pm6/master/META.info")->res->json->{description}'
15:48 xfix Makes sense... considering that now the first two characters aren't guaranteed to be ASCII.
15:48 xfix If you can return string directly.
15:48 moritz fwiw the Mojolicious version might just be Very Old
15:48 huf so either your module versions are old and this is an already fixed bug OR someone isnt setting encoding layers properly
15:48 timotimo moritz: that may be an easy fix in that case :)
15:48 timotimo layers and layers and layers ...
15:49 skids joined #perl6
15:49 xfix _sri, even in the newest JSON, UTF-16 and UTF-32 are allowed.
15:50 xfix "JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32."
15:50 timotimo and JSON5? :)
15:50 xfix (by the way, I don't consider UTF-7 to be UTF)
15:50 _sri moritz: don;t think that matters here, it's just STDOUT not handling characters by default
15:50 xfix JSON5 doesn't exist.
15:50 timotimo it does not?
15:50 xfix Besides, it's not that JSON is compatible with JS.
15:50 moritz Jackson Five exists
15:51 huf well, used to
15:51 xfix ES5 has JSON object, but JSON5 doesn't exist.
15:51 _sri timotimo: welcome to perl5 :)
15:51 timotimo xfix: you're not up to date then :)
15:51 masak xfix: what does 'doesn't exist' mean?
15:51 Juerd I've never encountered any UTF-16 or -32 JSON.
15:51 xfix Because it's waste of space, perhaps?
15:51 masak xfix: did you mean that you haven't heard of it?
15:51 xfix Possibly.
15:52 _sri xfix: yea right... except there is no official way to signal any encoding other than UTF-8 now ;)
15:52 timotimo it's not really all that official, to be fair
15:52 xfix Anyway, JSON is not compatible with JS, because it allows \u2028 directly in strings, when JS doesn't.
15:52 masak right. not a strict subset.
15:52 timotimo what character is that?
15:52 xfix That could be as well a mistake, but it stays.
15:52 Juerd I think it'd be silly to have a JSON library handle anything other than UTF-8. It'd be spec-correct, but UTF-8 is the de facto standard for JSON.
15:52 masak m: say "\x2028".uniname
15:52 camelia rakudo-moar 1aeb7c: OUTPUT«No such method 'uniname' for invocant of type 'Str'␤  in block  at /tmp/1ucLVVadpe:1␤␤»
15:52 xfix .u 2028
15:52 masak dang. :)
15:52 yoleaux U+2028 LINE SEPARATOR [Zl] ( )
15:53 xfix .u 2029
15:53 masak m: say "\x2028".uni
15:53 yoleaux U+2029 PARAGRAPH SEPARATOR [Zp] ( )
15:53 camelia rakudo-moar 1aeb7c: OUTPUT«No such method 'uni' for invocant of type 'Str'␤  in block  at /tmp/1RJpZrQgGi:1␤␤»
15:53 masak m: say "\x2028".uniprop
15:53 camelia rakudo-moar 1aeb7c: OUTPUT«No such method 'uniprop' for invocant of type 'Str'␤  in block  at /tmp/bubYgHm9id:1␤␤»
15:53 xfix Those two characters are disallowed in strings.
15:53 xfix JS considers those to be new lines.
15:53 timotimo masak: .&uniprop
15:53 xfix But JSON doesn't.
15:53 Juerd _sri: UTF-16 or UTF-32 JSON can very easily be detected because there will be known plain text. The first character of JSON is always within the ASCII range.
15:53 masak timotimo: oh, right.
15:53 masak m: say "\x2028".&uniprop
15:53 camelia rakudo-moar 1aeb7c: OUTPUT«Zl␤»
15:53 camelia rakudo-moar 1aeb7c: OUTPUT«LINE SEPARATOR␤»
15:53 _sri Juerd: not anymore! ;p
15:53 Juerd _sri: ?
15:53 _sri Juerd: see RFC 7159
15:54 xfix The first character is still in ASCII range.
15:54 masak oh, so JSON is *finally* a strict subset? phew!
15:54 timotimo the first character still has to be ", doesn't it?
15:54 _sri Juerd: like i said before... a bare "null" is now valid JSON too :)
15:54 xfix null is in ASCII range.
15:54 timotimo is that a bare "null" or a "\"null\""?
15:54 xfix To write anything non-ASCII, you have to type " first.
15:54 huf who cares, " and n are both in ascii
15:54 _sri timotimo: bare
15:55 timotimo but not a null byte, yeah?
15:55 _sri bare strings and numbers are valid too now
15:55 Juerd _sri: It explicitly defines null as %x6e.75.6c.6c so that's definitely within the ASCII range.
15:56 Juerd string = quotation-mark *char quotation-mark
15:56 xfix Second byte may not be in ASCII range, but first has to be.
15:56 Juerd quotation-mark = %x22      ; "
15:56 Juerd No bare strings.
15:56 xfix I mean, character.
15:56 xfix Talking about bytes doesn't make sense here.
15:56 Juerd xfix: First non-whitespace character.
15:57 timotimo huh.
15:57 Juerd But it will still be one of less than two dozen allowed characters, each of which don't clash with any UTF-8 encoding of whitespace :)
15:57 timotimo my local ADT folder contains a .work with a bunch of subfolders (probably from when i installed it via "panda install .", and all of them include an "ogotype" directory
15:57 timotimo note the missing l from the beginning
15:57 timotimo how did that happen? %)
15:58 Juerd But still, nobody actually uses JSON with UTF-16 or -32 so why bother.
15:58 huf hahahahah how sure are you?
15:58 xfix Also, JSON has at least one byte.
15:58 xfix The second doesn't have to exist.
15:58 Juerd huf: Incredibly.
15:59 huf .... just for that, lemme make one ;)
15:59 Juerd huf: It wouldn't change the fact that nobody uses JSON with UTF-16 or -32. It would redefine "nobody" to include you :)
15:59 xfix JSON parser is easy.
15:59 xfix JSON writer is even easier.
16:00 Juerd xfix: And still there's so much "JSON" with unquoted keys...
16:00 huf Juerd: well, i'm no scotsman :)
16:00 xfix Unquoted keys is not JSON.
16:00 huf it's jsonesque
16:00 xfix It could be JS5N, or whatever the JSON based on ES5 would be called, but I don't care.
16:00 Juerd xfix: Indeed it isn't. But unlike UTF-16 and UTF-32 JSON, illegal unquoted keys JSON does actually exist.
16:01 xfix And people parse it using eval().
16:01 Juerd It makes more sense to support bare keys than to support UTF-16 :)
16:01 xfix Well, as long they don't call it JSON, it's fine.
16:01 xfix It could be YAML easily.
16:02 Juerd I hate the semantic indents of YAML.
16:02 Juerd And Python.
16:02 xfix Nothing stops you from writing {a: "b", c: "d"} in YAML.
16:02 Juerd Sigh
16:02 Juerd Oneliners aren't a solution :)
16:02 xfix Or even {a: b, c: d}
16:03 xfix Or even {name: YAML, description: Does stuff because why not.}
16:05 xfix Also, Python isn't that bad. Yes, it requires indentation. But at least it doesn't enforce whitespace any other way. b +c is perfectly fine, for example.
16:05 xfix CoffeeScript is more annoying. It cares about whitespace everywhere.
16:06 xfix And if you mistake whitespace position it won't make syntax error... no, it would be too easy - it will guess incorrectly what you mean.
16:06 brrt but coffeescript is totally self inflicted
16:07 Juerd This is what keeps me from using coffeescript
16:08 xfix http://coffeescript.org/#try:call%28%​29%20if%20true%0A%20%20stuff%28%29%0A
16:08 xfix Deindent stuff(), and it will be parsed completely differently.
16:10 xfix At least some of this nonsense was fixed. For example, if you started the program indented, if you tried to deindent it, the lines simply disappeared. Now it simply complains about "missing indentation".
16:13 xfix For example, int main() {} is completely valid CoffeeScript.
16:16 tadzik reading this discussion makes me never want to touch coffeescript :)
16:17 Ven xfix: That's an issue we're trying to solve ;)
16:18 Ven but the BDFL doesn't want to
16:18 * timotimo fixed ADT and wonders why it even worked in the mean time
16:18 Ven timotimo: how do you know it worked ;) ?
16:18 xfix And there are stupid design decision. ? is defined or operator.
16:19 xfix `a ? b ? 42` will complain about `b` not existing, because it's left-associative.
16:19 xfix decisions*
16:19 Ven xfix: Backwards compatibility issue
16:19 xfix Reminds me of ?: operator in PHP.
16:19 Ven I believe we all agree on the team that it'd be better the other way
16:20 xfix https://github.com/jashkena​s/coffee-script/issues/2199 - it's wontfix.
16:21 Ven xfix: I removed the wontfix :)
16:21 jnap1 joined #perl6
16:22 TimToady it's very difficult to recover from early stupid design decisions when people are using your language :)
16:22 Ven Yes. It's fixed in coffee's popular fork(s), though
16:22 xfix I actually wonder what would fixing this break.
16:22 Ven Even "Coffee 2.0" has it right
16:23 Ven xfix: Maybe corner cases of `and` & `or`, but these would probably be very very poor taste and discouraged in the first place
16:23 Ven Some people abuse or/and to mean `if else`
16:23 xfix Alternatively, it could be chain operator, like certain operators in Perl 6.
16:23 Ven xfix: chain operator ?
16:24 xfix 1 < 2 < 3
16:24 Ven We have that too
16:24 Ven You mean `a?.b?.c` ?
16:24 xfix I mean a ? b ? c.
16:25 xfix ?. is fine.
16:25 Ven xfix: would work with right precedence
16:25 * TimToady wonders if this is quite the right forum for redesigning coffescript :)
16:26 xfix Design mistakes happen.
16:26 Ven Haha, sorry. But you're definitely right on one point : changing stuff *after* is hard
16:26 xfix For example, it would be nicer if in fish shell () doesn't interpolate in "".
16:26 Ven Isn't even perl6 in that case ?
16:27 xfix But fixing it would break the compatibility.
16:27 masak Ven: isn't even perl6 what?
16:27 Ven masak: somewhat restricted due to bc breakages
16:27 masak Ven: well, yes, in the sense that we have users and code already.
16:27 masak Ven: but not nearly to the same degree as Perl 5, say.
16:28 mavcunha joined #perl6
16:28 Ven Yeah, that goes without saying ...
16:28 xfix Perl 5 just removed in Perl 5.20 the old syntax deprecated in Perl 5.
16:28 xfix do stuff();
16:28 masak \o/
16:28 xfix That syntax existed in Perl 1, and it was a mistake. It was removed long time later.
16:28 Ven I remember reading TimToady saying something like "Perl 6 is like what Perl 5 could evolve after decades of deprecation warnings"
16:29 Ven s/evolve/evolve into/
16:29 brrt left #perl6
16:29 masak Ven: "Think of Perl 6 more as Perl 16" :)
16:29 masak Ven: that's from a perlmonks post somewhere.
16:29 xfix Features were removed, even with bc concerns.
16:29 Ven masak: Definitely :)
16:29 xfix The biggest example I can think of are pseudo-hashes.
16:29 Ven xfix: what are these ?
16:30 xfix It's the feature that let you access array keys as hash keys.
16:30 xfix http://perldoc.perl.org/5.8.8/perlref.htm​l#Pseudo-hashes:-Using-an-array-as-a-hash
16:30 Ven xfix: Thanks -- I never actually used perl 5
16:30 xfix It was removed in Perl 5.10, because it was problematic to support in the code.
16:31 nwc10 that wasn't the story that I was told. :-)
16:31 xfix It was added in Perl 5.005, but even then it was a bad idea.
16:31 xfix They were*
16:31 nwc10 It (also) slowed down all (regular) array accesses
16:32 nwc10 or was it hash accesses. I forget. But it hurt all the code that wasn't using it
16:32 xfix Everything could be a pseudo-hash.
16:32 xfix could have been*
16:32 masak that's like the lithmus test of a bad feature.
16:32 Ven uh yeah, I can see why people may call it a hack :p
16:32 TimToady well, it woulda worked out much better if Perl 5 actually dispatched based on a type system, rather than oddles of 'if' statements once you're past the opcode dispatch
16:32 masak does it punish people who are not using it?
16:33 Ven masak: the doc says it does
16:33 TimToady we could easily put pseudohashes into Perl 6 as a type, and it would have very little effect on the built-ins
16:33 nwc10 masak: yes, because in Perl 5 everyone else still gets to execute the "if it's not this funny thing" check
16:33 TimToady just look at the typical opcode implementation in P5, it's a maze of nested ifs and elses
16:33 pmurias joined #perl6
16:33 * masak fails to find TimToady's perlmonks post, and only finds a comment by chromatic old enough to sound optimistic: http://www.perlmonks.org/?node_id=861690
16:34 masak by the way, I'm glad @people++ are digging into the concurrency bits.
16:34 Ven masak: is that ++ concurrent :) ?
16:35 xfix https://github.com/fish-sh​ell/fish-shell/issues/159
16:35 masak @people»++ :)
16:35 xfix This is one of most requested features in fish shell.
16:35 xfix But backwards compatibility is backwards compatibility.
16:37 xfix And \$() is against fish shell design guidelines.
16:37 masak ooh, here http://www.perlmonks.org/?node_id=861950 is a *list* of things that constitute "ready" for Perl 6.
16:37 masak from *2010*.
16:38 masak I don't know about all y'all, but if I/we ever get around to make that isperl6readyyet.com page, then we should probably consider the things on that list.
16:38 xfix Does Perl 6 have logging framework now?
16:38 TimToady 'of' and 'returns' were always just synonyms
16:38 masak xfix: you can override \$*OUT and \$*ERR :)
16:39 TimToady but we probably would not have added 'returns' if '-->' had existed at that point
16:39 masak srsly, though. no, I don't think it does have a logging framework.
16:39 xfix Something at least comparable with "console" object in JavaScript?
16:39 masak xfix: that's \$*OUT.
16:39 masak m: say \$*OUT.^name
16:39 camelia rakudo-moar 1aeb7c: OUTPUT«IO::Handle␤»
16:39 masak m: say \$*OUT.^methods
16:39 camelia rakudo-moar 1aeb7c: OUTPUT«open close eof get getc lines read seek tell write opened t print slurp spurt copy chmod IO path flush encoding d e f s l r w x z modified accessed changed say Str gist perl <anon> <anon>␤»
16:40 xfix \$*OUT doesn't even print timestamps.
16:41 kaleem joined #perl6
16:41 Ven masak: I actually got to that post :p
16:44 Ven TimToady: what would be 5 things you would remove out of perl 6 if it still was only a spec (and somebody would do the editing part for you) ?
16:45 TimToady there is nothing in there that I would not change based on backward compat
16:45 TimToady I still reserve the right to change anything till 6.0.0 comes out
16:45 xfix The features that were considered to be bad were already removed.
16:45 masak sometimes to the dismay of some of us... :)
16:45 Ven TimToady: well, you mentioned "returns"
16:46 TimToady well, a case could be made for removing 'returns' at this point
16:46 masak maybe we should ditch 'returns'.
16:46 masak 'of' is shorter.
16:46 masak and I'm not aware of any big uses of 'returns', knock on wood.
16:46 * Ven likes `of` but it not quite used to `-->`
16:46 xfix This is like join() and implode() in PHP.
16:46 Ven I'm too used to "argument lists"
16:47 TimToady after --> it's just reverse arguments :)
16:47 masak the thing I feel is weird about '-->' is that signatures are all about parameters... *except* for the '-->' bit, which is about return values.
16:47 TimToady it's describing in parameters and out parameters
16:47 masak it doesn't make any sense in the var-decl/routine unification of signatures, for example.
16:47 Ven masak: same feeling
16:49 xfix But what else it could be? sub Int factorial(Int \$value) { return [*] 1..\$value; } looks quite ugly.
16:49 TimToady it's my Int sub
16:50 TimToady std: my Int sub factorial(Int \$value) { return [*] 1..\$value; }
16:50 camelia std 09dda5b: OUTPUT«ok 00:01 129m␤»
16:50 TimToady std: my Int sub factorial(Int \$value --> Num) { return [*] 1..\$value; }
16:50 camelia std 09dda5b: OUTPUT«ok 00:01 130m␤»
16:51 TimToady hmm, that used to catch the error
16:51 TimToady std: my Int sub factorial(Int \$value --> Num) returns Str { return [*] 1..\$value; }
16:51 camelia std 09dda5b: OUTPUTÂ«[31m===[0mSORRY![31m===[0mâ�¤Extra 'of' type; already declared as type Int at /tmp/JG3AlSaNnb line 1:â�¤------> [32mctorial(Int \$value --> Num) returns Str [33mâ��[31m{ return [*] 1..\$value; }[0mâ�¤Check failedâ�¤FAILED 00:01 130mâ�¤Â»
16:51 TimToady std: sub factorial(Int \$value --> Num) returns Str { return [*] 1..\$value; }
16:51 camelia std 09dda5b: OUTPUT«ok 00:01 129m␤»
16:52 TimToady coulda sworn that one "worked"
16:52 TimToady n: sub factorial(Int \$value --> Num) returns Str { return [*] 1..\$value; }
16:52 camelia niecza v24-109-g48a8de3: OUTPUTÂ«Potential difficulties:â�¤  &factorial is declared but not used at /tmp/o83DNsk0Pb line 1:â�¤------> [32msub factorial[33mâ��[31m(Int \$value --> Num) returns Str { retur[0mâ�¤â�¤Â»
16:52 jnap joined #perl6
16:53 [Coke] coming from java, I'd be happy with "Int sub foo" to mean "sub foo returns Int"
16:54 xfix The thing is it's quite ugly. Integer subroutine foo?
16:55 xfix Anyway, whatever the option will be choosed, don't choose TypeScript method. It's just awful - https://gist.github.com/xfix/9511216
16:55 xfix Or perhaps it's not, if I think of ":" as "is"...
16:56 xfix sub factorial(\$value is Int) is Int { }
16:57 xfix Of course, backwards compatibility is backwards compatibility. It's not that such huge changes could happen.
16:57 xfix And well, "is" is already used for traits.
16:59 TimToady std: sub factorial(\$value of Int) of Int { [*] 2..\$value }
16:59 camelia std 09dda5b: OUTPUT«ok 00:01 128m␤»
16:59 perl007 For hash indexes <> is like {''}, shouldn't it be like {""}? For indexing hash of hashes with variable, different brackets look ugly.
17:00 xfix perl007, if you need variable, just use {} directly.
17:00 xfix Why have both \$a<\$b> and \$a{\$b}.
17:01 xfix Exactly.
17:01 perl007 <var><string> or {var}<string> which one would be better?
17:01 xfix <var><string> is indexing a list as a hash. Obviously it won't work.
17:02 xfix variable<> is just a syntactic sugar, if you need a literal key.
17:02 xfix So you don't have to write \$_GET['stuff'].
17:02 perl007 just sugar with double quotes
17:02 perl007 why not?
17:03 TimToady because then \$a<\$b> would mean the wrong thing
17:03 TimToady it's supposed to mean \$a{'\$b'}
17:03 xfix If you don't like it, you are free to modify language from language itself, or use \$a«\$b».
17:04 xfix And don't propose making single quotes interpolate. There is a reason why they don't.
17:04 perl007 no no, just that one :)
17:04 xfix < is single, « is double. It's consistency.
17:05 TimToady right, and then we have exactly the same kind of kludge that Perl 5 has with \$hash{key}
17:05 xfix Which I hate.
17:05 xfix Why I cannot simply type \$hash{shift} = 42, or something like this.
17:05 Juerd I'm entirely happy with that kludge.
17:05 Juerd I've learned to write \$hash{+shift}
17:05 metatodon joined #perl6
17:06 TimToady + as a no-op is another kludge :)
17:06 xfix I also hate this + prefix operator. It's hack.
17:06 xfix It's a hack in my opinion*.
17:06 Juerd TimToady: I'm entirely happy with that one too, because I need it to cancel the other kludge out :)
17:06 Juerd xfix: I'm a hacker. I don't mind hacks.
17:07 TimToady Physics teacher: Don't tell the mathematicians I said this, but you can just cancel out all these dx's and dy's...
17:07 Juerd :)
17:07 xfix Another one is | & ^ behaving differently depending on the variable internal type that can change when you do something as basic as adding zero to it.
17:08 Juerd xfix: That I can't stand.
17:08 Juerd It's like The unicode bug, but worse.
17:08 TimToady well, now, that's the thing, everyone wanted about 361 different things to be fixed, but nobody wanted the same set of things to be fixed :)
17:09 xfix xfixpear ~> perl -E 'my \$x = "1"; print \$x | "a"; \$x + 0; say \$x | "a";'
17:09 xfix q1
17:09 Juerd TimToady: I'm aware :)
17:09 xfix Why adding zero to variable, and doing nothing to it would do something. Because it's Perl.
17:10 Juerd xfix: Yes. This is just broken, but most people don't notice because they don't use this part of the language that much.
17:10 TimToady but that's okay, because today is Everyone's a Language Designer Day  :)
17:11 Juerd TimToady: Sweet! I'll begin this beautiful day by swapping => and : to make Perl 6 look more like Javascript
17:11 metatodon ELDDAY!
17:11 Juerd (The real reason is, of course, to drive everyone nuts.)
17:11 xfix And I'm going to begin this by removing \$ from variables, and adding automatic semicolon insertion.
17:11 xfix To make this look more like... JavaScript, you guessed it.
17:11 xfix my variable = 42
17:12 Juerd s/my/var/, s/sub/function/ and they'll wonder who added classes, junctions and grammars to JS... :)
17:12 metatodon xfix: automatic semicolon insertion? That way lies chaos.
17:12 xfix I actually prefer my to var.
17:12 xfix var is ugly, but whatever.
17:12 Juerd xfix: So do I
17:13 xfix And function. Couldn't they have made a shorter keyword?
17:13 Juerd Although I still like "a" better :P
17:13 moritz also, 'my' is shorter
17:13 Juerd moritz: "a" is even shorter!
17:13 * metatodon checks if it's April 1 today...
17:13 xfix metatodon, I like ASI.
17:13 Juerd xfix: fun'd be fun.
17:13 xfix https://github.com/xfix/python-form​at/blob/master/lib/python-format.js
17:14 moritz Juerd: '' is even shorter
17:14 cooper joined #perl6
17:14 Juerd moritz: Yes, but very hard to see.
17:15 xfix But that would make more bugs.
17:15 xfix I don't want Python.
17:15 xfix Or CoffeeScript.
17:15 xfix Where you declare new variable without wanting to make a new variable.
17:15 Juerd xfix: Of course you don't want any of those. They're all so entirely not Javascript!
17:16 TimToady .oO(and '' is shorter than 'script')
17:16 xfix I actually dislike \$ in Perl.
17:16 Juerd TimToady: In fact, "" is shorter than almost every "\$anything".
17:16 huf a 0byte source file has 0 bugs, therefore any shortening is worth it
17:16 Juerd huf: Except in Java
17:17 Juerd xfix: I tried \$ sigils in Javascript and found out that I really don't like how they look, but do like being able to tell the difference between things.
17:18 Juerd http://typing-speed-test.aoeu.eu/  is one experiment from that time, that's still online.
17:18 xfix Perl source codes could be cleaner without \$@%& noise, but well, it makes Perl feel like Perl.
17:18 Juerd Written in 2005 iirc.
17:18 * [Coke] realizes that xfix is not some new person.
17:19 [Coke] xfix: if you don't like sigils in Perl 6, you can avoid them.
17:19 Juerd [Coke]: New persons (often called "babies") often can't type yet.
17:20 xfix [Coke], GlitchMr, just mentioning.
17:20 xfix Juerd: Anyway, 435CPM. QWERTY, lame laptop keyboard.
17:21 Juerd xfix: Now try it with a sigil in front of every word ;)
17:21 Juerd (Don't... Waste of time!)
17:22 xfix This keyboard typing test wouldn't allow me to pass with \$ before each word.
17:22 xfix Oh wait, I can.
17:23 xfix ok, afk for one minute.
17:23 Juerd It will give you the "raw cpm" at the end of the test.
17:23 Juerd A typing test, afk?
17:23 Juerd What are you... Jedi?
17:24 Juerd 428 CPM with \$, 625 CPM without.
17:24 xfix 37 CPM.
17:24 xfix I mean, 378 CPM.
17:24 Juerd 37 would have been worrying.
17:24 xfix It's not that I have to type really quickly while programming.
17:24 xfix 400CPM is reasonable, to be honest.
17:25 Juerd I can't program as fast as I can copy words, anyway.
17:25 xfix True.
17:25 Juerd But I bet Java programmers can.
17:25 xfix Nice job on 625 CPM.
17:25 xfix I never bothered learning how to type on the keyboard.
17:25 Juerd Thanks. My high score of 666 was almost a year ago :|
17:26 xfix I also often press Backspac.
17:26 xfix Backspace*
17:26 Juerd I have something for that too. http://learn.dvorak.nl/
17:26 xfix I use QWERTY.
17:26 Juerd That's okay, the javascript will remap it for you ;-)
17:26 Juerd And once you've learned how to type properly, you can change your system wide settings.
17:27 Juerd It'll save you more finger movement than a lack of sigils could ever do.
17:27 xfix Is it worth it? I mean, I have lame laptop keyboard that simply cannot be typed on well.
17:27 xfix I get better results than 428 CPM when not being on laptop.
17:27 Juerd Yes. It's about the distance between keys.
17:27 Juerd And that's the same for practically all keyboards.
17:28 Juerd As for laptops: stick to higher end laptops, like Thinkpads, Apples and high-end Dells.
17:28 tadzik laptop keyboard can't be typed on well? Pfeh
17:28 Juerd My typing high score was on a Thinkpad keyboard.
17:29 tadzik I bought a thinkpad keyboard to my work computer, so I can have a trackpoint and not have to use a mouse
17:29 xfix Well, I guess I'm lying now, considering I have Lenovo laptop.
17:29 Juerd tadzik: I found the external ones to be of a lousy build quality.
17:29 xfix And the keyboard looks similarly to that in Thinkpads, even if it's not Thinkpad.
17:29 arnsholt joined #perl6
17:29 Juerd xfix: Oh, but it's different.
17:30 tadzik although the external one didn't lose a key yet
17:30 denisboyun joined #perl6
17:30 dalek rakudo-star-daily: 9066eed | coke++ | log/ (5 files):
17:30 dalek rakudo-star-daily: today (automated commit)
17:30 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/9066eed701
17:30 tadzik and I lost my S after.... 2 weeks on a top-tier ThinkPad?
17:30 xfix I'm still a student. I don't have money for some expensive computer, lol.
17:31 Juerd tadzik: My external thinkpad keyboard had a few wobbly keys and it bent rather easily.
17:31 tadzik I must say, I didn't try to bend mine :P But it doesn't bend by itself when I type on it, at least I don't notice it
17:31 Juerd I get angry. Well, not anymore, but I did.
17:31 tadzik it still uses the "old keys" though, I've read bad reviews on the "new keys" externals
17:32 tadzik but I mostly didn't by the "new keys" because it was wireless
17:32 Juerd I could smash the actual Thinkpad without causing any real damage, but the external Thinkpad-ish keyboard couldn't take hat.
17:32 Juerd s/hat\./that./
17:32 tadzik I don't think the external keyboard has a magnesium skeleton inside, or whatever it's made of
17:32 Juerd Yeah, it was the non-island style.
17:33 Juerd Indeed it doesn't.
17:33 Juerd Chickens?
17:33 tadzik I like island style, makes hair removal So Much Easier
17:33 tadzik people called them "chicklets", so I changed that to "chickens
17:33 Juerd I see
17:33 tadzik makes all those boring keyboard conversations a lot more interesting
17:33 Juerd Hair... yes. Nail clippings however become a new issue.
17:33 tadzik (no, I'm not relating it to this one)
17:34 tadzik (I mean the "omg mechanical keyboards" thing :))
17:34 metatodon tadzik: you mean flatbeds?
17:34 Juerd I have mechanical keyboards. I like them, but not as much as the Thinkpad laptop keyboards.
17:34 tadzik I never heard that work before
17:34 Juerd Flat beds, those are image scanners, right? :)
17:35 metatodon yep :P
17:35 dylanwh someone was like "Woah, a thinkpad. is that new? they still make those?"
17:35 xfix My leopard works, why should I change it?
17:35 Juerd dylanwh: It's taken them 4 years to make another high end Thinkpad, and they suck.
17:35 metatodon They get hot and I think of them as flatbeds. :P
17:35 Juerd dylanwh: I have an X240 now, and the X201s was better. I've used the T440, and the previous T (I forgot the number) was better.
17:36 kaare_ joined #perl6
17:36 Juerd But, I need the upgraded hardware, like USB3.
17:36 tadzik I have T430, it's nice
17:36 dylanwh yeah. I have a x230. I had an T420 but the screen was *shit*
17:36 aje_ joined #perl6
17:36 Juerd Thinkpad screens are always shit
17:36 dylanwh 1600x900 but horrible colors and hard to see
17:36 tadzik but even on lenovo.com people rant on x40 series in reviews
17:36 Juerd The X240 has ghosting that takes minutes to go away.
17:36 telex joined #perl6
17:36 dylanwh the x230 has a very nice screen.
17:36 Juerd dylanwh: Low-res.
17:36 dylanwh well, yes
17:37 Juerd Low res screens are never very nice.
17:37 Juerd I don't want my laptop to have a lower resolution than my phone, for crying out loud.
17:37 tadzik hmm. I have a 14" 1600x900 in a laptop, and 1680x1050 22" next to it
17:37 tadzik I hardly see the difference :)
17:37 Juerd (Not replacing the phone.)
17:37 dylanwh I would've asked for a chromebook pixel except that would've been awkward to ask @mozilla it... ;)
17:37 Juerd My external screen is 2560x1440, my laptop does 1920x1080. I'm addicted to high res displays.
17:38 tadzik I mean, the difference is extremely visibl
17:38 tadzik I'm not sure if it's worth it. It doesn't impact me in any way
17:38 Juerd Well, the past few years I've been doing web dev again
17:38 dylanwh I find my eyes are bad enough where I have to increase the font size so the extra real-estate isn't much
17:38 Juerd And I usually have a .css, a .js, a .html and a .pm open at the same time.
17:39 Juerd Sometimes extra .pm's or extra .js'es
17:39 Juerd And at the same time, I need a vertically huge browser window for debugging the javascript crap.
17:49 [Coke] lwp-simple is failing tests on R* candidate.
17:50 [Coke] jsonrpc still failing
18:00 isBEKaml joined #perl6
18:01 treehug88 joined #perl6
18:05 kurahaupo joined #perl6
18:30 moises joined #perl6
18:37 dwarring joined #perl6
18:42 dalek roast: 6ef36a7 | (David Warring david.warringgmail.com)++ | integration/advent2013-day08.t:
18:42 dalek roast: review: https://github.com/perl6/roast/commit/6ef36a7112
18:42 * dwarring ... day 08
18:43 [Coke] is warring here?
18:43 [Coke] ah, hi.
18:43 [Coke] are you on questhub?
18:43 dwarring hi Coke
18:43 dwarring yes and no
18:43 dwarring good idea, put it up on questhub
18:44 [Coke] I have some quests you can steal for advent coverage.
18:44 * dwarring checking questhub been a while
18:45 [Coke] eh no big deal, you can create your own quests. :) 
18:46 kurahaupo_mobile joined #perl6
18:48 dwarring [Coke]: I've created account dwarring on questhub
18:56 Rotwang1 joined #perl6
19:02 [Coke] https://questhub.io/player/dwarring -> internal http error
19:02 treehug88 joined #perl6
19:04 timotimo yeah, rather than "no such player" it gives that
19:05 * dwarring rechecking questhub
19:08 sftp joined #perl6
19:09 dwarring ok, looks like I just signed up then on questhub.org which is a knock-off of questhub.io !??
19:10 dwarring I've got a very old account on questhub.io
19:11 dwarring the id is 'david'
19:13 timotimo yeah, it would appear to be pretty cheap.
19:14 dwarring i don't think I can change my questhub id easily, so david it is
19:14 timotimo berekuk hangs out here sometimes, he could do it for you i'm sure
19:15 * dwarring would prefer dwarring but can live with david
19:16 lue Is it normal to get errors like "Missing or wrong version of dependency 'src/Perl6/Actions.nqp'" when running the spectest after making changes to rakudo, but before running make install?
19:16 timotimo yes, though it's far from optimal.
19:17 * masak is typing on a https://en.wikipedia.org/wiki/Model_M_keyboard
19:17 zaydon joined #perl6
19:17 masak force feedback, aah.
19:17 lue timotimo: alright, that explains all the new failures I got from Moar and JVM (but strangely no new ones from Parrot ☺)
19:18 zaydon left #perl6
19:19 timotimo did anybody want to look at why modules.perl6.org has busted characters in yaml's description?
19:19 [Coke] dwarring: invited you to the roast/advent quests. Steal all the points!
19:21 lue masak: lucky :) I still want a Space Cadet, or something just like it.
19:21 timotimo a friend of mine bought a keyboard for advanced cash registers
19:21 timotimo and re-ordered the buttons and re-programmed the firmware
19:21 timotimo now he's running a modified neo2 layout on it
19:25 xenoterracide joined #perl6
19:33 vendethiel r: 5 +| 6
19:33 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: ( no output )
19:33 vendethiel r: say 5 +| 6
19:33 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«7␤»
19:33 vendethiel I don't remember seing these in S03, but I probably missed it
19:36 timotimo http://perlcabal.org/syn/S0​3.html#Additive_precedence - here they are
19:36 timotimo well, at least +| and +^
19:39 lue timotimo: +& , +< , and +> are here: http://perlcabal.org/syn/S03.h​tml#Multiplicative_precedence
19:39 timotimo yup
19:39 timotimo i figured ven could do that much work by himself :P
19:41 * dwarring has signed up to roast/advent quests
19:41 vendethiel timotimo: I don't remember reading anything of that :o. I might've either been really tired or skipped over some stuff
19:41 timotimo mhm
19:43 vendethiel I probably went "meh I know the maths stuff, let's skip over it"
19:43 timotimo :D
19:43 lue .oO(come to think of it, I'm not sure the ~* family of ops could/should be used on strings. Such low-level-ness for a more abstract concept feels wrong)
19:44 timotimo well, strings are unicody
19:44 timotimo so you'll be getting quite strange results that depend on the normalisation form and everything
19:44 [Coke] for declaring multidim arrays, we have [4;2] - what about indexing them?
19:44 lue ~& and friends have to work on a specific encoding by their nature, so they currently coerce Strs to Bufs. (the spec even says such coercion is a design smell, fwiw ☺)
19:44 timotimo same deal, [Coke]
19:45 [Coke] same, yes?
19:45 [Coke] timotimo++
19:45 timotimo lue: fair enough
19:45 timotimo [Coke]: but you can also do [2][1]
19:45 lue I personally think someone who needs to do bitwise ops on strings will know best what kind of buffer to convert to :)
19:46 timotimo "but strings are just series of numbers from 0 to 127!"
19:47 [Coke] timotimo: I have a fiver ranting at me that [2][1] is too much syntax. :)
19:48 masak [Coke]: I look forward to [4;2] landing and me getting used to it.
19:48 lue .oO( @a[2][4]{'custom idx'}{7}[7] )
19:49 timotimo [Coke]: i had a branch at some point that turned LoL inside [ ] into "the right thing" - almost
19:49 timotimo IIRC i was told to rather wait for the list respec before tackling an actual merge
19:51 hoverboard joined #perl6
19:52 timotimo r: my %foobar; %foobar<hi> = "goodbye"; %foobar<bye>:delete; say %foobar;
19:52 camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«("hi" => "goodbye").hash␤»
19:52 masak m: say flat [1, [2, 3, [4, 5]]]
19:52 camelia rakudo-moar 1aeb7c: OUTPUT«1 2 3 4 5␤»
19:52 timotimo sergot: you don't need to check for the existence of an element in a hash to use :delete, re https://github.com/sergot/http-headers​/blob/master/lib/HTTP/Headers.pm6#L28
20:00 masak timotimo: you're probably right, but that line *doesn't* check for existence -- it checks for truthiness.
20:00 timotimo masak: huh?
20:00 timotimo oh
20:00 masak m: my %h = foo => 0; %h<foo> :delete if %h<foo>; say %h.perl
20:00 camelia rakudo-moar 1aeb7c: OUTPUT«("foo" => 0).hash␤»
20:00 timotimo that may very well be a bug, too, though
20:00 masak I assume so.
20:01 timotimo m: my %h = foo => 0; %h<foo>:exists:delete if %h<foo>; say %h.perl
20:01 camelia rakudo-moar 1aeb7c: OUTPUT«("foo" => 0).hash␤»
20:01 timotimo m: my %h = foo => 0; %h<foo>:exists:delete; say %h.perl
20:01 camelia rakudo-moar 1aeb7c: OUTPUT«().hash␤»
20:01 timotimo er, that was nonsense :)
20:02 stevan_ joined #perl6
20:06 dalek rakudo/nom: a0a5990 | lue++ | src/core/ (2 files):
20:06 dalek rakudo/nom: Rename .ast to .made, as per S05.
20:06 dalek rakudo/nom:
20:06 dalek rakudo/nom: The .ast method is still around, though now it's deprecated.
20:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a0a5990853
20:10 timotimo nqp: my %foo := nqp::hash("bar", 1, "baz", 2); my %frob := nqp::clone(%foo); say(%frob<bar>);
20:10 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«1␤»
20:10 timotimo neato
20:14 vendethiel Also, I'm (almost ! 2 to go) done with the synopsis and I'm wondering : why do we need so many declarators ? `let` `my` `temp` `our` etc
20:14 vendethiel also local and others?
20:14 timotimo well, they all do different things
20:14 skids scoping and state can get complicated, is why.
20:14 timotimo i didn't know "local" is a thing in p6?
20:15 vendethiel timotimo: probably confused `state`
20:15 timotimo ah, probably
20:15 timotimo well, all i can do is go through the list and say what each does and why it's not the same as something else
20:16 timotimo other than that: that's just the way it is
20:17 timotimo i have written some code. now is the time to try it and see if it b0rks horribly
20:18 timotimo oh, huh
20:18 timotimo how did that happen: Error while compiling op copy (source text: "nqp::copy(%antifilter)"): Arg count 1 doesn't equal required operand count 2 for op 'copy_f'
20:19 skids .oO(All those declarators and I still have to write \$a++; \$b = sub { my \$a2 = \$a; \$a2 + \$^arg } to capture value-at-closure-creation-time, is what gets me.)
20:20 skids erm.  missed a closure in that.
20:20 skids \$a++; \$b = { my \$a2 = \$a; { \$a2 + \$^arg } }
20:20 skids or whatnot.
20:21 timotimo hmm, something like ENTER doesn't do it?
20:21 timotimo actually, shouldn't state do it?
20:25 timotimo d'oh. i *tested* nqp::clone in this channel and i'm wondering why nqp::copy doesn't work
20:29 skids timotimo: yes, you can use state, but the problem is you have to introduce a new name even so.
20:29 skids Or use OUTER
20:30 skids Really just a prettiness issue though, you can do it, it's just not poetry.
20:38 masak vendethiel: technically `temp` and `let` aren't declarators.
20:39 vendethiel r: my temp \$a; #?
20:39 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUTÂ«[31m===[0mSORRY![31m===[0mâ�¤Type 'temp' is not declaredâ�¤at /tmp/tmpfile:1â�¤------> [32mmy temp[33mâ��[31m \$a; #?[0mâ�¤Malformed myâ�¤at /tmp/tmpfile:1â�¤------> [32mmy [33mâ��[31mtemp \$a; #?[0mâ�¤   â€¦Â»
20:39 masak vendethiel: also, after so many years with Perl 6, the only one I don't really care for is `our`.
20:40 skids What, not into sharing? :-)
20:40 masak m: my \$foo = 5; say \$foo; { temp \$foo = 42; say \$foo }; say \$foo
20:40 camelia rakudo-moar a0a599: OUTPUT«5␤42␤5␤»
20:40 masak vendethiel: `temp` above is not a declarator, because the variable \$foo is already declared.
20:42 timotimo same with let, no?
20:42 masak aye.
20:42 masak (and it's still the "same" variable, even when its value is being temporarily overwritten)
20:42 masak or, as with `let`, hypothetically overwritten.
20:43 xfix rn: my %statuses = (normal => 1,sleep => 2.5,frozen => 2.5,paralyzed => 1.5,poisoned => 1.5,burned => 1.5,);
20:43 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: ( no output )
20:43 camelia ..niecza v24-109-g48a8de3: OUTPUTÂ«Potential difficulties:â�¤  %statuses is declared but not used at /tmp/tmpfile line 1:â�¤------> [32mmy [33mâ��[31m%statuses = (normal => 1,sleep => 2.5,fr[0mâ�¤â�¤Â»
20:43 xfix hm, ok
20:43 lue masak: ooc, what's your issue with 'our'?
20:44 xfix Weird, it considers this hash to have odd number of elements, but I'm not quite sure why.
20:44 xfix rn: https://gist.github.com/xfix/9515886
20:44 camelia rakudo-jvm a0a599: OUTPUT«("burned" => 1.5, "poisoned" => 1.5, "normal" => 1, "frozen" => 2.5, "sleep" => 2.5, "paralyzed" => 1.5).hashCannot unbox a type object␤␤»
20:44 camelia ..rakudo-parrot a0a599: OUTPUT«("normal" => 1, "sleep" => 2.5, "frozen" => 2.5, "paralyzed" => 1.5, "poisoned" => 1.5, "burned" => 1.5).hashOdd number of elements found where hash expected␤  in method STORE at gen/parrot/CORE.setting:9064␤  in sub MAIN at /tmp/tmpfile:24␤  in an…»
20:44 camelia ..niecza v24-109-g48a8de3: OUTPUTÂ«[31m===[0mSORRY![31m===[0mâ�¤â�¤In parameter declaration, typename 'uint' must be predeclared (or marked as declarative with :: prefix) at /tmp/tmpfile line 21:â�¤------> [32m    uint[33mâ��[31m :\$max-hp,[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
20:44 camelia ..rakudo-moar a0a599: OUTPUT«("normal" => 1, "sleep" => 2.5, "frozen" => 2.5, "paralyzed" => 1.5, "poisoned" => 1.5, "burned" => 1.5).hashCannot unbox a type object␤  in sub MAIN at /tmp/tmpfile:20␤  in sub checker at src/gen/m-CORE.setting:3117␤  in method cando at src/gen/m-CO…»
20:45 xfix Any idea what I'm doing wrong?
20:45 timotimo what's with "where %statuses = "normal"?
20:45 skids trailing comma?
20:45 timotimo trailing comma should be allowed
20:45 xfix Oh...
20:45 timotimo i'd write { } instead, though
20:45 [Coke] look at the syntax highlighting.
20:45 xfix I want to have a default value, but this is a valid syntax.
20:45 timotimo ah, right
20:45 timotimo sorry, that always gets me
20:45 xfix is not*
20:46 xfix Hm, how can I have where with default value?
20:46 timotimo er, didn't we fix that?
20:46 skids Try adding some newlines IIRC having run into that bug.
20:46 timotimo worst case, you have subset types "BallType" and "StatusType"
20:46 * [Coke] again wishes p6 had /* */ ;P
20:47 lue [Coke]: but it does! :)
20:47 xfix #`()
20:47 [Coke] not quite the same, but ok. :)
20:48 jnthn evening, #perl6
20:48 lue o/ jnthn
20:48 [Coke] jnthn: O/!
20:49 xfix Also, yes, I've noticed syntax highlighting on GitHub.
20:49 lue ( Of course, if you want to do embedded comments the Cool Way™, you should go for things like #`⦃⦃⦃ ... ⦄⦄⦄ or #`﴾ ... ﴿ or #`☃ ... ☄ )
20:49 xfix .perl sorta confused me. If it assigned new value, why it has old value?
20:50 timotimo lue++ # snowman comet comment
20:50 timotimo xfix: what now?
20:50 xfix ("burned" => 1.5, "poisoned" => 1.5, "normal" => 1, "frozen" => 2.5, "sleep" => 2.5, "paralyzed" => 1.5).hashCannot
20:50 xfix Apparently, it's being written to, but it has old value.
20:51 xfix Because this script is Pokeball capture rate calculator.
20:51 timotimo you mean %statuses is being assigned to with the = "normal"?
20:51 xfix I think this happens.
20:51 xfix I want both where and default value.
20:51 xfix I tried Str :\$ball = "poke" where %balls, but it's a syntax error.
20:51 timotimo yes
20:51 timotimo have you tried a subset declaration?
20:51 xfix I guess I should try.
20:52 timotimo otherwise, an enum could also work
20:52 xfix Seems to work.
20:52 vendethiel r: my \$a = 0; say \$a; { temp \$a = 5; say \$a; }; say \$a;
20:52 timotimo and the .perl outputs the "old value" because the where clauses are being called after the whole script has run through
20:52 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUT«0␤5␤0␤»
20:53 timotimo i mean the main body of the script itself
20:53 vendethiel ah yeah, I see. That's kinda like `my \$*a;`
20:53 DarthGandalf joined #perl6
20:54 timotimo bleh. my new nqp-level optimization causes a Exception in thread "main" org.perl6.nqp.runtime.UnwindException during compilation of nqp itself :(
20:57 jnthn timotimo: Åhnejs! I think there's an envvar you can set to get more details.
20:57 timotimo Ohneins!
20:59 timotimo "Segmentation fault (core dumped)", well, that's interesting, too
21:00 BenGoldberg joined #perl6
21:00 jnthn Ooh!
21:00 jnthn Crash ALL the backends!
21:01 timotimo aye aye, sir
21:01 timotimo ... wait
21:01 timotimo i'd have to go in reverse to crash the *back*end, right?
21:02 LLamaRider joined #perl6
21:02 lue timotimo: the backend is the core of what makes this train run, so obviously the backend is the engine at the front :)
21:04 vendethiel what's the diff between `my \$*a = 1;` and `temp \$*a = 1;` ?
21:04 timotimo there isn't really one, as \$* is already dynamically scoped
21:05 vendethiel mmh. `temp` gets to dynamically scope too ?
21:05 BenGoldberg 'temp' is how perl6 spells 'local' from perl5.
21:05 vendethiel r: my \$a = 1; sub foo { say \$a; }; foo(); { temp \$a = 2; foo(); }
21:05 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUT«1␤2␤»
21:05 vendethiel BenGoldberg: I never did perl5, sorry
21:05 tadzik \$* is the new local
21:05 jnthn vendethiel: Essentially "none", but "my \$*a;" and "temp \$*a;" differ :)
21:06 jnthn The latter being kinda useful.
21:06 vendethiel jnthn: mind explaining ?
21:07 timotimo the latter assigns the current value of \$*a from before to the temporary new one
21:07 jnthn vendethiel: If you write "temp \$*a" then it keeps its value, but means any changes to the variable in the future will be reverted once you return from this routine.
21:08 vendethiel r:  sub foo { say \$*a; }; { my \$*a = 1; }; foo(); { my \$*a = 2; foo(); } foo();
21:08 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUTÂ«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32ma = 1; }; foo(); { my \$*a = 2; foo(); } [33mâ��[31mfoo();[0mâ�¤    expecting any of:â�¤   â€¦Â»
21:08 vendethiel r:  sub foo { say \$*a; }; { my \$*a = 1; }; foo(); { my \$*a = 2; foo(); }; foo();
21:08 camelia rakudo-parrot a0a599: OUTPUT«Dynamic variable \$*a not found␤  in method gist at gen/parrot/CORE.setting:12402␤  in method gist at gen/parrot/CORE.setting:1056␤  in sub say at gen/parrot/CORE.setting:13335␤  in sub foo at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
21:08 camelia ..rakudo-jvm a0a599: OUTPUT«Dynamic variable \$*a not found␤  in method gist at gen/jvm/CORE.setting:12381␤  in method gist at gen/jvm/CORE.setting:1053␤  in sub say at gen/jvm/CORE.setting:13293␤  in sub foo at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
21:08 kivutar joined #perl6
21:08 vendethiel r:  sub foo { say \$*a; }; my \$*a = 1; foo(); { my \$*a = 2; foo(); }; foo();
21:08 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUT«1␤2␤1␤»
21:09 vendethiel so, `temp \$*a` is like `my \$*a = \$*a` ?
21:10 vendethiel r:  sub foo { say \$*a; }; my \$*a = 1; foo(); { my \$*a; foo(); \$*a = 5; foo(); }; foo();
21:10 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUT«1␤(Any)␤5␤1␤»
21:10 vendethiel r:  sub foo { say \$*a; }; my \$*a = 1; foo(); { temp \$*a; foo(); \$*a = 5; foo(); }; foo();
21:10 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUT«1␤1␤5␤1␤»
21:10 vendethiel alrighty :-).
21:10 vendethiel r:  sub foo { say \$*a; }; my \$*a = 1; foo(); { my \$*a = \$*a; foo(); \$*a = 5; foo(); }; foo();
21:10 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUT«1␤(Any)␤5␤1␤»
21:10 vendethiel I guess the `my` comes first
21:11 vendethiel (conjecture : which might be why `my Dog \$a .= new` works ?)
21:11 BenGoldberg r: my \$*b = 1; { ++temp \$*b; say \$*b; }' say \$^b;
21:11 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUTÂ«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32mmy \$*b = 1; { ++temp \$*b; say \$*b; }[33mâ��[31m' say \$^b;[0mâ�¤    expecting any of:â�¤   â€¦Â»
21:11 BenGoldberg r: my \$*b = 1; { ++temp \$*b; say \$*b; }; say \$^b;
21:11 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUTÂ«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Cannot use placeholder parameter \$^b in the mainlineâ�¤at /tmp/tmpfile:1â�¤------> [32mb = 1; { ++temp \$*b; say \$*b; }; say \$^b[33mâ��[31m;[0mâ�¤Â»
21:11 BenGoldberg r: my \$*b = 1; { ++temp \$*b; say \$*b; }; say \$*b;
21:11 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUT«2␤1␤»
21:11 treehug8_ joined #perl6
21:11 BenGoldberg r: my \$*b = 3; { (temp \$*b) *= 5; say \$*b; }; say \$*b;
21:11 camelia rakudo-parrot a0a599, rakudo-jvm a0a599, rakudo-moar a0a599: OUTPUT«15␤3␤»
21:12 vendethiel Don't worry BenGoldberg, I got it :p
21:15 jnthn ...
21:16 lue would anyone mind if I changed the custom 'say2's here to 'note's? https://github.com/rakudo/rakudo/blob​/nom/src/core/Deprecations.pm#L62-L71
21:16 tadzik I tried one of the Javascript game frameworks
21:16 tadzik compiling the empty source file with typescript makes rakudo-jvm's startup overhead look blazingly fast
21:17 jnthn o.O
21:17 tadzik it takes almost 3 seconds
21:17 hoverboard joined #perl6
21:18 tadzik and it's 2.5 even if I don't load any frameworks on the way
21:19 masak clearly they have some reducible overhead there.
21:23 dalek rakudo/nom: b6e4a8e | lue++ | src/core/Deprecations.pm:
21:23 dalek rakudo/nom: Deprecation messages now work on rakudo-moar
21:23 dalek rakudo/nom:
21:23 dalek rakudo/nom: Additionally, replace the say2 sub here with note, which fulfills the
21:23 dalek rakudo/nom: same purpose.
21:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b6e4a8e4e0
21:25 timotimo good catch
21:26 lue I was just wondering why my shiny new .ast deprecation wasn't showing up in r-m is all :)
21:27 jnthn oh...we deprecated .ast in the end? :/
21:28 timotimo meh :|
21:28 jnthn I'd really have rather not do such a drastic deprecation in the same month I'm hoping to prepare/cut a Star on Moar/JVM.
21:28 jnthn Given it'll likely involve chasing lots of modules for fixes.
21:28 jnthn So don't be surprised if I veto that deprecation ahead of release if things don't look how I want Star module wise.
21:29 lue jnthn: it's been in S05 for a while, just finally got annoyed enough that my future-looking attempts at using .made weren't working :)
21:30 jnthn lue: Making ".made" work now is fine. Making ".ast" report that it's deprecated is what I'm worried about.
21:30 jnthn Those two are independent.
21:30 lue jnthn: yeah, I can definitely see where that can cause undue annoyances. Commenting out the DEPRECATED or something would be just fine for the next release.
21:30 tadzik I liked .ast :(
21:31 * masak too
21:31 * timotimo too
21:31 masak don't really see why it's being deprecated.
21:31 masak yeah, I know *that*.
21:31 lue make/made is a better pairing than make/ast, name-wise
21:31 masak but that doesn't make .ast wrong.
21:32 jnthn masak: Yes, I've argued for keeping both too :)
21:33 lue masak and others: check here: https://github.com/perl6/specs/commit/2​4373dc4ddedc05b6ddac603e03343931c720b4c
21:33 lue "Perhaps the .ast method should be kept as a synonym for .made, and may even have a check for AST-nodeness added, to give it additional implicit documentational value in the Perl 6 internals."
21:35 lue so there's nothing saying we can't have .ast, it's just currently no longer a part of the spec.
21:37 timotimo i have no idea what "ASTness" would be
21:37 timotimo especially since QAST isn't to spec.
21:38 virtualsue joined #perl6
21:38 btyler joined #perl6
21:39 lue Yeah, so I think we could just have .ast as a pure synonym.
21:40 lue (To be honest, I can't think of a time where you'd attach not-an-AST with make; in fact, it almost (almost) seems like make is the one that needs renaming)
21:41 jnthn lue: One of my recent talks had an example where .ast didn't really bifit
21:41 jnthn *fit
21:43 timotimo "astize" :P
21:43 timotimo astify?
21:43 lue jnthn: could it perhaps be the talk linked in that commit? :)
21:43 jnthn mebbe :P
21:43 lue timotimo: I was thinking &node or &nodify
21:43 timotimo .o( turn the result of this code into javascript code )
21:43 jnthn 'twas the one about temperature data I think :)
21:45 lue http://jnthn.net/papers/20​14-fosdem-perl6-today.pdf  is the one in the commit.
21:45 lue I wonder if it would be worth separating the concepts of "node in AST tree" and "annotation on Match object"
21:46 jnthn yeah, that's the one
21:46 timotimo i have a kinda strong feeling that you'd hardly ever see both
21:46 timotimo but you'll still have to pay for the extra storage, no?
21:46 jnthn Indeed...we don't want to make match objects any memory hungrier too :)
21:46 timotimo or mix in something
21:47 lue yeah, and I'm not sure "node in AST tree" could be much different from the other one.
21:48 lue The only real solutions I see is to just have .ast and .made as synonyms, or force people to give up .ast. I like the synonym one better.
21:49 timotimo agreed.
21:51 hoverboard joined #perl6
21:53 dalek nqp: 3ebb27f | jonathan++ | tools/build/MOAR_REVISION:
21:53 dalek nqp: Bump to a MoarVM with NativeCall.
21:53 dalek nqp: review: https://github.com/perl6/nqp/commit/3ebb27f557
21:53 dalek nqp: 2d19f41 | jonathan++ | t/nativecall/01-basic.t:
21:53 dalek nqp: Make NQP nativecall tests robust on Win32.
21:53 dalek nqp:
21:53 dalek nqp: At least, with MSVC. If we don't find standard C symbols, fall back to
21:53 dalek nqp: explicitly looking in the C library.
21:53 dalek nqp: review: https://github.com/perl6/nqp/commit/2d19f41141
21:53 dalek nqp: 05ab5cd | jonathan++ | tools/build/Makefile-Moar.in:
21:53 dalek nqp: Run t/nativecall/01-basic.t on MoarVM backend.
21:53 dalek nqp: review: https://github.com/perl6/nqp/commit/05ab5cd664
21:54 jnthn So, that's the very simple native call tests that NQP has passing on Moar...
21:54 timotimo \o/
21:55 jnthn "just" need to do the rest of the stuff to have NativeCall.pm build and pass tests now :P
21:56 timotimo how much stuff is it actually?
21:57 jnthn Well, I think we at least need to stub CStruct to get NativeCall.pm6 to compile
21:57 timotimo ah, CStruct, aye.
21:57 timotimo did we have a good idea for how to make variables from C land reachable in perl6?
21:57 jnthn Then some more work to get the test harness to work out as it needs to be able to build the C libraries to test against.
21:59 jnthn And after that comes CStr, CArray and CPointer...
21:59 jnthn uh, s/CPointer/CStruct
21:59 jnthn CPointer we already have.
21:59 jnthn And finally callbacks.
21:59 jnthn So yeah, some work.
22:00 stevan_ joined #perl6
22:00 timotimo i'm getting really, really, really few lex-to-locals in rakudo as opposed to nqp
22:00 jnthn timotimo: Well, dlsym can be used to reach the variables
22:02 timotimo oh. well, that's a good start
22:03 timotimo can we have re-use CPointer for that?
22:03 jnthn That feels a bit off...
22:04 timotimo not really exactly sure how to reach variables
22:04 jnthn I'll ponder it a bit.
22:04 itz joined #perl6
22:04 jnthn It's more an API design challenge than an implementation one, I think...
22:05 timotimo aye
22:05 jnthn I mean, "say get_cvar('lib', 'symbol', int32)" works...
22:05 timotimo and set_cvar as well, eh?
22:05 jnthn Yeah
22:06 jnthn But it sucks too. :)
22:06 jnthn 'cus you have to resolve the symbol every time.
22:06 timotimo just exposing that is a good start; as far as i can tell people have been using Inline::C for the equivalent of that
22:06 jnthn nqp::nativevar('lib', 'symbol', int32) returning something appropriate is closer, I just need to ponder what the appropriate thinguymmy is :)
22:07 timotimo that's right
22:07 sergot timotimo: thank you very much :)
22:08 timotimo you're welcome
22:09 sergot timotimo: pushed :)
22:10 dalek ecosystem: db4499d | sergot++ | META.list:
22:10 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/db4499de9a
22:10 jnthn I wonder if it ain't the same problem as passing rw natives... :)
22:10 timotimo may very well be
22:11 timotimo i'm looking forward to that fix as well :)
22:11 lue Is it alright if I just spec .ast as a synonym of .made then?
22:11 timotimo jnthn: hm, how do i best figure out if my lexical-to-local stuff has any good effect?
22:11 timotimo except for writing code and looking at the resulting qast
22:11 itz joined #perl6
22:12 jnthn timotimo: Well, that's one way. Also counting the number of MAST::Frames that show up if you disassemble NQP code..should be less after the opt if you are inlining
22:12 sergot timotimo: will be great if you check other my HTTP::* modules.
22:13 timotimo i don't even know that much about HTTP :)
22:14 timotimo jnthn: so i moar --dump the .moarvm and grep -c for what exactly?
22:14 cognominal joined #perl6
22:14 timotimo ah, i just had a not so excellent example file
22:15 jnthn ^\s+Frame_\d+':'
22:15 timotimo thank you
22:16 itz_ joined #perl6
22:17 timotimo hm. --dump segfault'd
22:18 timotimo at least it segfaulted in vm_destroy_instance
22:18 timotimo so that's not that terrible
22:18 timotimo https://gist.github.com/timo/eda741286aaa16a8a8b5
22:18 timotimo well, ww i guess
22:25 dalek specs: 3795799 | lue++ | S05-regex.pod:
22:25 dalek specs: [S05] Reintroduce the .ast method.
22:25 dalek specs:
22:25 dalek specs: Every good language has a few synonyms anyway :) .
22:25 dalek specs: review: https://github.com/perl6/specs/commit/3795799fb8
22:26 timotimo my optimization is obviously not working, as it doesn't reduce the amount of frames at all.
22:27 jnthn yeah, then it's inlining nothing...
22:34 dalek rakudo/nom: 5b109d6 | lue++ | src/core/Match.pm:
22:34 dalek rakudo/nom: Undeprecate .ast
22:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5b109d6542
22:35 arnsholt joined #perl6
22:37 larks joined #perl6
22:40 itz joined #perl6
22:44 timotimo i think i may be doing it all rong.
22:47 Ulti joined #perl6
22:47 bowtie joined #perl6
22:51 FROGGS joined #perl6
22:53 FROGGS hello from france!
22:53 timotimo france from hello!
22:53 lue FROGGS: allô!
22:55 timotimo oh, maybe i'm close to the goal now
22:55 timotimo but i'm not treating the outermost blocks properly yet
22:55 timotimo good ol' special cases
23:04 timotimo :\
23:04 timotimo not having too much success with this project
23:06 Psyche^ joined #perl6
23:18 timotimo do i have to scrap half of it and start over? :\
23:19 clkao joined #perl6
23:21 masak 'night, #perl6
23:21 lue ♞ masak o/
23:32 skids joined #perl6
23:36 Kelder joined #perl6
23:36 pecastro joined #perl6
23:37 d4l3k_ joined #perl6
23:37 Util joined #perl6
23:37 Mouq joined #perl6