Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-08-23

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:01 grondilu joined #perl6
00:02 grondilu Hello.  Someon on the French Perl 6 WP article wrote that MoarVM uses LuaJIT.  That seems difficult to believe to me.
00:03 grondilu I mean, MoarVM does not use Lua at all, does it?
00:03 timotimo yes, it's not correct
00:03 timotimo we use DynASM, which is used by LuaJIT
00:03 timotimo it's basically a preprocessor that turns special C files with in-line "generate these assembler instructions into a buffer, please" code to a regular C file
00:04 grondilu ok
00:06 grondilu oh snap I've only now realised there were livestream videos for YAPC::EU
00:07 * grondilu guess he'll just have to patiently wait for the records to be posted on YT
00:08 timotimo yes!
00:08 timotimo i'll probably miss masak's talk :(
00:09 grondilu that's the one about the awesome gotos, isn't it?
00:11 timotimo yes
00:11 timotimo i think masaks talk is early enough in the day that i should be able to catch it, but i'll be out and about when jnthn's talk about asynchrony happens :(
00:12 Akagi201 joined #perl6
00:18 tassilo joined #perl6
00:20 tassilo perl6: say 5;
00:20 camelia rakudo-{parrot,jvm,moar} e950e7, niecza v24-109-g48a8de3: OUTPUT«5␤»
00:27 tphilipp joined #perl6
00:34 tphilipp joined #perl6
00:46 telex joined #perl6
00:53 BenGoldberg r: print sort -> $a, $b { state $x +^= 1; $x ?? Less !! More }, ' ,c Jleterhsnk,erarotP hua'.comb;
00:53 camelia rakudo-moar c793d8: OUTPUT«Just another Perl hacker,,»
00:53 camelia ..rakudo-jvm c793d8: OUTPUT«(timeout)»
00:53 camelia ..rakudo-parrot c793d8: OUTPUT«r aoertaPu, hknJ lcesth,er»
01:08 biff_512 joined #perl6
01:13 Akagi201 joined #perl6
01:14 Alula_ joined #perl6
01:19 xenoterracide joined #perl6
01:24 FROGGS_ joined #perl6
01:27 colomon joined #perl6
02:00 colomon TimToady: lollipop syntax?
02:05 Akagi201 joined #perl6
02:12 rindolf joined #perl6
02:21 chenryn joined #perl6
02:42 noganex joined #perl6
02:57 biff_512 joined #perl6
03:06 japhb .tell jnthn Thanks for the slides link, thank you VERY much for the profiler, and also many thanks for the shout-outs to perl6-bench.  :-)
03:06 yoleaux japhb: I'll pass your message to jnthn.
03:14 colomon joined #perl6
03:45 potatogim_ joined #perl6
03:46 PotatoGim_Home joined #perl6
04:09 SamuraiJack joined #perl6
04:10 dalek roast: 0dfc2dd | jimmy++ | S03-operators/assign.t:
04:10 dalek roast: Fix Redeclaration of symbol $a
04:10 dalek roast: review: https://github.com/perl6/roast/commit/0dfc2dd4e0
04:12 chenryn joined #perl6
04:33 kaare_ joined #perl6
04:34 woolfy left #perl6
04:40 TimToady m: say (<a b c>; 1,2,3).perl
04:40 camelia rakudo-moar c793d8: OUTPUT«("a", "b", "c"; 1, 2, 3)␤»
04:40 TimToady colomon: ^^ that syntax
04:40 TimToady list of lists
04:40 TimToady hence "lol"
04:41 TimToady m: say (<a b c>; 1,2,3)[*;1]
04:41 camelia rakudo-moar c793d8: OUTPUT«b 2␤»
04:46 biff_512 joined #perl6
04:50 lizmat commute, attempt #2 &
04:57 woosley joined #perl6
05:01 woosley joined #perl6
05:16 itz is the profiler on github?
05:20 itz oh I see it
05:23 woosley joined #perl6
05:33 hagiri joined #perl6
05:34 hagiri ops
05:34 hagiri hello
05:34 hagiri ;)
05:40 woosley joined #perl6
05:42 chenryn joined #perl6
05:43 anaeem1 joined #perl6
05:52 anaeem1_ joined #perl6
05:54 firnsy joined #perl6
06:03 moritz good morning
06:12 bjz joined #perl6
06:21 anaeem___ joined #perl6
06:33 dolmen joined #perl6
06:35 biff_512 joined #perl6
06:40 anaeem1_ joined #perl6
06:46 woosley joined #perl6
06:51 masak good morning, #perl6
06:59 tadzik hello hello
07:02 anaeem1_ joined #perl6
07:04 woosley joined #perl6
07:10 Woodi hallo today :)
07:10 ribasushi joined #perl6
07:12 Woodi it was very -Ofun backlog today :)
07:13 gfldex joined #perl6
07:16 Woodi jnthn++  as always (so far) :)
07:17 tadzik wow, copying that JSON data from the profile.html really makes vim stutter
07:18 tadzik it also pretty much kills joson_pp :D
07:22 masak where is FROGGS++ doing hiw v5 work?
07:22 Woodi 13x perl5 is starting to be -Oproductionish :)  possible next comparing to perl5 need to use some lower kicks ;)  eg. where perl5 lacks behind C too many times:  http://benchmarksgame.alioth.debian.org/u32/benchmark.php?test=all&amp;lang=gcc&amp;lang2=perl&amp;data=u32
07:23 tadzik I wonder if rakudo will be able to load that 58-meg JSON from SpaceInvaders...
07:23 dolmen joined #perl6
07:24 masak ah, found it. https://github.com/rakudo-p5/v5
07:27 tadzik wow, it didn't even took 3 minutes, and only ate 1.5G of ram :P
07:28 FROGGS[mobile] masak: I'm working in the nqp_to_perl6 branch
07:30 FROGGS[mobile] tadzik: lol
07:30 tadzik FROGGS[mobile]: perl5 with Json::XS did that in 0.17seconds, too short for me to glance at htop :)
07:31 tadzik I should now profile that JSON reading, and then profile parsing that, and...
07:31 FROGGS[mobile] :/
07:31 FROGGS[mobile] ++tadzik
07:32 tadzik but first I want my nytprof-like code viewer
07:39 masak FROGGS[mobile]: during the day, would you have time to quickly walk me through the slang magic of v5?
07:40 masak FROGGS[mobile]: I'm curious because it might affect some later parts of my talk tomorrow.
07:40 FROGGS[mobile] masak: ohh, sure
07:42 masak FROGGS[mobile]: \o/
07:47 chenryn joined #perl6
07:58 darutoko joined #perl6
08:14 masak FROGGS++ gave me a nice tutorial on privmsg.
08:16 tadzik heh, I was able to pull some data off the new shiny profiler: http://feather.perl6.nl/~tjs/linedata/SpaceInvaders
08:16 tadzik I now realized that it shows function _definitions_, not function calls
08:17 tadzik or not
08:17 tadzik it sometimes shows really weird stuff too
08:19 tadzik I wonder if the amount of zeros is the case of a mistake on my part or a low profiler resolution
08:20 jnthn tadzik: It records in nanoseconds but gives output in microseconds at the moment
08:20 yoleaux 03:06Z <japhb> jnthn: Thanks for the slides link, thank you VERY much for the profiler, and also many thanks for the shout-outs to perl6-bench.  :-)
08:21 tadzik jnthn: I see
08:21 tadzik jnthn: is "entries" including "jit_entries" and "inlined_entries"?
08:24 jnthn Yes
08:24 biff_512 joined #perl6
08:27 Alina-malina joined #perl6
08:30 tadzik there are indeed many places in the profile where the time is 0. That's fast :D
08:42 masak tadzik: the line in `keypressed` with just a '}' that has nonzero entries is weird.
08:43 tadzik masak: yes
08:43 tadzik masak: I should stick names of called functions in there somewhere
08:43 tadzik but I assume it's something like <unit> or <anon> :o
08:43 Alina-malina joined #perl6
08:49 Ven joined #perl6
08:49 tadzik masak: ok, this is actually what the profiler reports as the keypressed function, that particular line
08:54 gmunoz joined #perl6
08:54 kupopo joined #perl6
09:01 masak tadzik: weird. I thought closing braces were much faster than that.
09:01 masak tadzik: from now on I'm going to try to minimize the closing braces in my programs.
09:02 masak clearly they are a resource hog.
09:02 tadzik masak: avoid the shebang as well, look how much time that takes
09:02 masak oh, I didn't see that, but yes!
09:03 masak that's a horrible time sink!
09:03 tadzik also, I don't think self.add_text('(S)tart a new game', ...) can possibly take 45 seconds
09:03 masak :)
09:04 * masak .oO( carve out the text with a chisel )
09:04 tadzik I'll have to investigate moar
09:07 Ven :D
09:07 Ven relative time is fun!
09:07 jnthn The line numbers at the moment corespond to the start of a routine or block, because it's doing routine-level profiling...
09:07 jnthn Well, or block level
09:07 tadzik http://feather.perl6.nl/~tjs/linedata/slow.pl yeah, that can't be right...
09:08 tadzik jnthn: so we can't really have statement-level at this point?
09:09 jnthn tadzik: No; it's just not recording that kind of data yet
09:09 jnthn (And we probably want it to be an option)
09:09 tadzik okay
09:13 masak I think people will generally expect statement-level data.
09:14 dolmen joined #perl6
09:17 salv0 joined #perl6
09:19 jnthn masak: Depends. I've happily been working with routine-level with the MSVC profiler...
09:20 jnthn hmm, I guess it's lunch time at the venue? :)
09:20 chenryn joined #perl6
09:21 * jnthn puts aside talk prep and wanders over :)
09:22 masak jnthn: practically lunch time. ribasushi is still talking here :)
09:22 chenryn joined #perl6
09:22 gmunoz joined #perl6
09:22 jnthn :)
09:22 jnthn be there in a bit
09:22 jnthn will try and spot you :)
09:31 dolmen joined #perl6
09:32 chenryn joined #perl6
09:33 jaffa4 joined #perl6
09:33 Alina-malina joined #perl6
09:35 tadzik found an interesting website: https://www.bountysource.com/
09:36 tadzik not much perl activity in there, though
09:50 denis_boyun_ joined #perl6
09:51 tadzik btw, interesting fact: I talked to a de facto Perl 6 hater yesterday, after jnthn's talk, and he said "I'm afraid I eventually will have to switch to Perl 6 at some point" :P
10:02 gmunoz joined #perl6
10:13 biff_512 joined #perl6
10:18 FROGGS[mobile] *g*
10:22 anaeem1 joined #perl6
10:22 dolmen joined #perl6
10:24 jnthn Bah, those darn Perl 6 kids making the language more and more usable... :P
10:26 FROGGS[mobile] and they dare to do that with a proper design!
10:27 nwc10 no-one committed anything in the past few hours - what's up? Everyone at a conference, or something?
10:27 tadzik slackers!
10:27 nwc10 there's this new profiler. Everything should be instanenous now
10:28 jnthn <- writing code so I can write a talk about it for tomorrow :P
10:33 Khisanth joined #perl6
10:34 FROGGS[mobile] jnthn: about async, or do you have another slot?
10:35 jnthn async
10:35 tadzik will there be a surprise? :)
10:35 jnthn No :P
10:36 FROGGS[mobile] :/
10:41 masak THERE IS NO SEKKRIT PROJECT
10:48 jaffa4 Did anyone go to yesterday Perl jhthn talk? Are there any slides available?
10:48 jaffa4 Any interesting information?
10:49 masak jaffa4: it was a well-liked talk.
10:50 masak jaffa4: jnthn implemented goto during one of the applauses. :P
10:51 jaffa4 you are joking
10:52 masak hence the ':P'
10:56 Alina-malina joined #perl6
10:59 spider-mario joined #perl6
10:59 jnthn The slides can be found at http://jnthn.net/papers/2014-yapceu-performance.pdf
11:01 masak it was indeed a performance. :)
11:01 sergot o/
11:02 tadzik \o
11:03 sergot tadzik: would you have some time to debug ssl today? :)
11:03 tadzik sergot: sure
11:05 sergot \o/
11:05 sergot tadzik++
11:05 tadzik looking into it now
11:05 anaeem1 joined #perl6
11:06 sergot thank you
11:06 Alina-malina joined #perl6
11:07 spider-mario joined #perl6
11:09 gmunoz joined #perl6
11:11 tadzik I'm pretty sure that if I have a breakpoint in the middle of a request to github.com it times out and closes the connection
11:12 tadzik I'll just put a lot of prints in the code :D
11:14 sergot yea, it is probably the best way :)
11:14 sergot Do you want the commit bit?
11:16 sergot bbiab
11:17 Alina-malina joined #perl6
11:18 masak can I declare a Perl 6 grammar that inherits from Rakudo's Perl6::Grammar? is the latter somehow reachable from Perl 6 userspace?
11:18 tadzik sergot: ok, this is interesting: perl6 -Ilib -e 'use HTTP::UserAgent; HTTP::UserAgent.new.get("https://github.com")' eats all my memory and then the kernel kills it
11:20 tadzik my $content = buf8.new( @a[($msg-body-pos + 2)..*] ); -- this line is at fault
11:20 tadzik so it seems like it actually goes to infinity and beyond
11:22 Alina-malina joined #perl6
11:23 lizmat joined #perl6
11:24 * lizmat finally made it to the hotel in Sofia
11:24 masak lizmat! \o/
11:25 lizmat so where are you hanging out?
11:25 masak at Inter Expo venue place.
11:25 tadzik lizmat! \o/
11:25 masak currently listening to mst explaining how devops and prolog have a lot in common.
11:26 Alina-malina joined #perl6
11:32 tadzik r: my $a = buf8.new([]); say "Foo: $a" # this is amusing
11:32 camelia rakudo-jvm c793d8: OUTPUT«java.lang.StackOverflowError␤␤»
11:32 camelia ..rakudo-parrot c793d8: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 142392 (src/gen/p-CORE.setting.pir:61408) (gen/parrot/CORE.setting:11718)␤called from Sub 'Stringy' pc 233104 (src/gen/p-CORE.setting.pir:96775) (gen/parrot/CORE.setting:1038)␤ca…»
11:32 camelia ..rakudo-moar c793d8: OUTPUT«(signal )»
11:32 masak o.O
11:33 masak tadzik: please submit that.
11:33 tadzik I think concat is the problem
11:33 tadzik r: my $a = buf8.new([]); say $a
11:33 camelia rakudo-{parrot,jvm,moar} c793d8: OUTPUT«Buf:0x<>␤»
11:33 tadzik r: my $a = buf8.new([]); say "" ~ $a
11:33 tadzik . o O ( BOOM )
11:33 camelia rakudo-jvm c793d8: OUTPUT«java.lang.RuntimeException: java.lang.StackOverflowError␤␤»
11:33 camelia ..rakudo-parrot c793d8: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 142392 (src/gen/p-CORE.setting.pir:61408) (gen/parrot/CORE.setting:11718)␤called from Sub 'Stringy' pc 233104 (src/gen/p-CORE.setting.pir:96775) (gen/parrot/CORE.setting:1038)␤ca…»
11:33 camelia ..rakudo-moar c793d8: OUTPUT«(signal )»
11:34 klaas-janstol joined #perl6
11:34 tadzik r: my $a = buf8.new([]); say ~$a
11:34 camelia rakudo-{parrot,jvm,moar} c793d8: OUTPUT«Buf:0x<>␤»
11:37 masak some dispatch somewhere self-calls and goes into an infinite loop.
11:37 tadzik it would seem so, yes
11:40 tadzik reported.
11:43 masak tadzik++
11:48 isBEKaml_mobile joined #perl6
11:51 isBEKaml_mobile left #perl6
11:51 isBEKaml_mobile joined #perl6
11:52 isBEKaml_mobile left #perl6
11:53 dolmen joined #perl6
11:54 lizmat comute to venue&
11:57 chenryn joined #perl6
11:57 [Sno] joined #perl6
11:59 colomon masak: pretty sure you're supposed to be able to inherit from Perl6::Grammar, but last time I checked (admittedly a long while ago) you couldn't yet.
12:02 biff_512 joined #perl6
12:05 zakharyas joined #perl6
12:06 bjz joined #perl6
12:06 dolmen joined #perl6
12:09 masak surely there's some way -- even if it's very hacky -- to extract Perl6::Grammar out of the NQP world so we can inherit from it?
12:10 jnthn masak: Delegation may make more sense...
12:10 jnthn Hm, though maybe not from a performance view :)
12:14 masak jnthn: anything that works is interesting at this point.
12:18 bjz joined #perl6
12:39 nbrown_ joined #perl6
12:43 timotimo m: use Perl6::Grammar:from<NQP>; grammar Foo is Perl6::Grammar { };
12:43 camelia rakudo-moar c793d8: ( no output )
12:43 timotimo m: use Perl6::Grammar:from<NQP>; grammar Foo is Perl6::Grammar { }; Foo.parse("say 'hi';");
12:43 camelia rakudo-moar c793d8: OUTPUT«Could not locate compile-time value for symbol Block␤  in any find_symbol at src/Perl6/World.nqp:2297␤  in any stub_code_object at src/Perl6/World.nqp:949␤  in any comp_unit at src/Perl6/Grammar.nqp:1010␤  in any TOP at src/Perl6/Grammar.nqp:347␤…»
12:47 timotimo (Perl6::Grammar can't operate without Perl6::World)
12:59 masak ok, but it worked thus far.
12:59 timotimo oh my
12:59 masak that's encouraging, I think.
12:59 masak timotimo++
12:59 timotimo someone's running a little SSLStrip attack in the yapc event network?
12:59 masak yes, so it seems. :/
13:00 masak heh, there's an Ubuntu package called 'sslstrip'.
13:00 masak "Package description: SSL/TLS man-in-the-middle attack tool"
13:00 masak seems legit.
13:00 SHODAN joined #perl6
13:01 itz maybe he saw the forged arp packets
13:03 timotimo i wonder if i should be for this; putting the power in everybody's hands does even out the distribution of power, but it'd also put regular users with no understanding of security into more danger ...
13:06 sergot tadzik: interesting
13:06 dolmen joined #perl6
13:07 timotimo masak: i recently investigated deriving from Perl6::Compiler to write the majority of the iperl6kernel in perl6 rather than nqp, but ran into some interesting issues with the code calling methods by name or something like that
13:11 masak timotimo: I would be willing to look into this together with you. feels like it's close to working.
13:12 timotimo let me quickly get back to the spot i was at before
13:14 xenoterracide joined #perl6
13:14 timotimo oh, my local install of perl6 needs to be re-built first
13:15 timotimo lightning talks are about to start, cool
13:15 tadzik sergot: I was wrong, it was another bug :)
13:15 tadzik I changed rooms a couple times, I'll now keep looking
13:16 tadzik sergot: now this is amusing. I get No such method 'bytes' for invocant of type 'Any'. Did you mean '.encode($encoding).bytes'?
13:17 tadzik http://www.fugly.com/media/IMAGES/Random/65_wat.jpg
13:17 tadzik it's inside an if $content { }
13:18 sergot hmm, something must be empty
13:19 sergot about eating the whole ram: FROGGS told me some time ago, that it can be caused by concating Any with buf.new.
13:19 tadzik yes, that's exactly it
13:20 tadzik I reported that bug
13:20 tadzik but now I have another ran with $content being empty
13:22 sergot hmmm
13:22 sergot let me check something
13:23 tadzik is it possible that it sometimes receives nothing and then says "ah screw it, I give up"?
13:23 tadzik (guessing again)
13:23 sergot tadzik: try debuggin like this: https://github.com/sergot/io-socket-ssl/commit/ef1908f2f0d2a06786625f438fcbba6cfdc9ae3e
13:23 timotimo m: use Perl6::Compiler:from<NQP>; class MyComp is Perl6::Compiler { }; say MyComp.new().eval("say 'hi there!'")
13:23 camelia rakudo-moar c793d8: OUTPUT«===SORRY!===␤Cannot find method 'parse'␤»
13:24 timotimo the HLL::Compiler wants to call the named method "parse", but is not succeeding
13:24 tadzik sergot: like how? :D
13:24 tadzik I have a recent Socket::SSL if that's what you mean
13:24 timotimo i think it's related to the difference between nqp and perl6's stuff; maybe it needs a decont before it meth-calls or something like that
13:25 nbrown_ joined #perl6
13:26 timotimo (but actually i have no idea what's going on)
13:27 sergot one sec
13:28 masak m: say sec 1
13:28 camelia rakudo-moar c793d8: OUTPUT«1.85081571768093␤»
13:28 masak ^ one sec :P
13:28 timotimo m)
13:28 masak m: say 1.sec
13:28 camelia rakudo-moar c793d8: OUTPUT«1.85081571768093␤»
13:29 jnthn m: say :1sec
13:29 camelia rakudo-moar c793d8: OUTPUT«␤»
13:29 jnthn m: say (:1sec)
13:29 camelia rakudo-moar c793d8: OUTPUT«"sec" => 1␤»
13:30 sergot tadzik: we should add some debugging here: https://github.com/sergot/io-socket-ssl/blob/master/lib/IO/Socket/SSL.pm6#L113
13:30 masak m: my $pair = :1sec; say $pair.value."$pair.key()"()
13:30 camelia rakudo-moar c793d8: OUTPUT«1.85081571768093␤»
13:30 sergot like I show you above
13:31 timotimo aaarrrggghh masak %)
13:31 masak m: my $pair = :1sec; say .value."$(.key)"() given $pair
13:31 camelia rakudo-moar c793d8: OUTPUT«1.85081571768093␤»
13:31 masak timotimo: :P
13:31 * masak blames jnthn :)
13:31 sergot tadzik: https://www.openssl.org/docs/ssl/SSL_read.html#RETURN_VALUES
13:32 tadzik sergot: right. OpenSSL's read() method just ignores that realyl :0
13:32 sergot yeah... I should have done this.
13:32 liztormato joined #perl6
13:32 sergot :)
13:33 biff_512 joined #perl6
13:34 sergot another task is to add throwing the exceptions
13:35 jnthn masak: That's *horrible* :P
13:35 * masak grins
13:36 sergot tadzik: actually we should it in OpenSSL.pm6
13:37 tadzik sergot: yeah, in read()
13:37 tadzik it pretty much ignores the return value there
13:37 liztormato joined #perl6
13:38 sergot tadzik: it is my fault :(
13:38 tadzik "it's not what you do, it's what you do after" :P
13:38 sergot I can do this right now
13:38 sergot hehe :)
13:38 tadzik yes please :)
13:38 tadzik ++sergot
13:43 sergot I've just added printing errors, about throwing exceptions I will think later :)
13:43 sergot pushing in a while
13:44 tadzik close enough to debug that bug, probably :)
13:44 carlin the kitten in the background on the profiler reveal slides is so adorable :3
13:47 sergot tadzik: pushed
13:47 sergot should be enough for now
13:47 tadzik sergot++
13:47 tadzik trying it out
13:48 tadzik sergot: no new output :(
13:49 sergot eww
13:49 tadzik sergot: do you have a machine running ubuntu?
13:49 sergot yes
13:49 tadzik I can replicate that bug on those, did you try it there?
13:49 erkan joined #perl6
13:49 flussence .oO( this thing that's currently being talked about sounds interesting and useful... )
13:50 tadzik yes
13:50 tadzik I love the idea
13:50 sergot What is it about? (my $connection sucks)
13:51 tadzik sergot: a new IM service, distributed open etc
13:51 flussence alternative to xmpp that isn't xml :)
13:51 tadzik sort of :)
13:51 tadzik and with good rooms, like irc
13:52 sergot tadzik: I hadn't such a problem earlier (on ubuntu as well) but I've upgraded it and it looks like it is the same now.
13:52 sergot I mean, the same as yours
13:52 tadzik oh, good, so you can reproduce it :)
13:52 sergot sort of, because I cant get "Any"
13:52 sergot only the bug with getting just the header
13:53 tadzik it varies, I had that yesterday, I don't have that today
13:53 tadzik it probably depends on what github sends
13:55 liztormato left #perl6
13:55 sergot ok, I ve just got it, but it says we read 6 bytes just before this error, so it doesn't print the err code
13:55 raiph joined #perl6
13:57 sergot it is something wrong with the chunked transfer encoding..
13:57 sergot I'm almost 100% sure.
14:01 sergot tadzik:
14:01 sergot this fixes the-any-problem:
14:01 sergot -                            while $chunk-size > $content.bytes {
14:01 sergot +                            while $content && $chunk-size > $content.bytes {
14:02 sergot it seems like a chunk can only contain the size
14:02 sergot no, wait.. it's not correct
14:03 [Coke] showed my 11 year old jnthn's slide with the code from Jonathan to jnthn; me: "what do you think the .lc does?" her: "... lose capitals?" (I love this girl. :)
14:04 masak [Coke].11yo++
14:04 jnthn Now try .uc :D
14:05 masak "UR CAPITALS!"
14:05 tadzik utilize capitals? :P
14:06 masak "ultimate capitals"
14:06 flussence unlose capitals!
14:07 masak flussence wins :)
14:08 nbrown_ joined #perl6
14:13 klaas-janstol joined #perl6
14:16 telex joined #perl6
14:21 mr-foobar joined #perl6
14:23 raiph joined #perl6
14:28 masak "mentee" is a wonderful word :)
14:29 gtodd is it correct?
14:30 jnthn Why not? :)
14:31 nbrown_ joined #perl6
14:32 masak gtodd: "..." -- Humpty Dumpty
14:33 jnthn .oO( Stubty Dumpty )
14:33 masak gtodd: https://en.wikipedia.org/wiki/Humpty_Dumpty#In_Through_the_Looking-Glass
14:33 flussence ...is that mst in a kilt?
14:34 masak flussence: yes.
14:34 tadzik he's on stage now
14:34 gtodd heh
14:34 masak the backstory of mst giving these keynotes is something like the following:
14:34 masak TimToady kept giving keynotes about the evolution and thought process of Perl 6.
14:34 masak no-one gave keynotes about the continued evolution of Perl 5.
14:35 masak so eventually, mst stepped into that role.
14:35 masak (mst++)
14:37 gtodd one of these days he is going to talk about perl6 :-)
14:38 masak thing is, as much fun he makes of Perl 6, mst++ is one of the good guys.
14:38 gtodd for sure :-)
14:39 masak he may not ever turn into a regular Perl 6 user, having been too brain dam^W^Winfluenced by Perl 5.
14:39 masak but he *wants* Perl 6 to succeed.
14:40 gtodd heh ... SotV FIVE   which means next time it will be SotV SIX hehe
14:40 masak dun dun *duuun*
14:41 masak heh, the Perl 5 release process has more or less converged on the Rakudo release process :P
14:41 masak good for them!
14:43 masak so... if Perl 5 is moving forward faster...
14:43 masak ...is it now an acceleraptor? :P
14:43 * jnthn was thinking that :P
14:43 flussence .oO( or it's a hungry velociraptor )
14:45 dolmen joined #perl6
14:46 masak signatures! \o/
14:46 tadzik ...behind 40 experimental warnings :)
14:47 * masak .oO( are you really *really* sure you want to switch this on? )
14:47 masak what the heck is postfix deref?
14:48 tadzik $foo->{bar}->@ or so
14:48 tadzik instead of the @{} ugliness
14:48 masak I... uh...
14:49 masak ok, so it's like .list -- fine.
14:50 [Coke] jnthn: nice slides. I learned some stuff.
14:52 jnthn :)
14:53 dalek rakudo-star-daily: fada594 | coke++ | log/ (14 files):
14:53 dalek rakudo-star-daily: today (automated commit)
14:53 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/fada5943b8
15:13 awwaiid maybe they should have named it ->list :)
15:14 moritz except that this breaks backwards compat
15:15 awwaiid which?
15:15 moritz what about existing methods called "list2?
15:15 moritz *"list"
15:15 awwaiid if there is an existing method named list, then it is probably not an arrayref :)
15:15 FROGGS awwaiid: when you parse ->@ you can be sure that you have to array-deref, and you know that at compile time
15:15 gtodd ... are slides for each talk (e.g. the GOTO talk :-) http://act.yapc.eu/ye2014/talk/5634 ) available from the site?
15:16 FROGGS you don't know that with ->list
15:16 FROGGS because that could be a method on an object
15:16 awwaiid ah yes, compile time. good point
15:16 moritz awwaiid: plessed array refs are valid objects in p5
15:17 awwaiid yeah, I realize that moritz. I spoke hastily :)
15:17 moritz awwaiid: and I know some production p5 code that uses them
15:17 awwaiid it's just so ... ugly. Don't get me wrong, @{..} isn't so purdy itself
15:17 moritz agreed
15:18 awwaiid and actualy it is ->@*, right?
15:18 awwaiid I would prefer ->@
15:19 flussence (I've got an actual perl6 question for once!) I'm trying to do something crazy along the lines of «temp $*OUT = $something; $curried-closure-that-outputs-stuff.()», but it's not working. How close do I have to put the $*OUT assignment to the actual &say call to have an effect?
15:20 FROGGS joined #perl6
15:25 TimToady try 'my $*TEMP = $something;' instead and see if it works better than temp, which has not all the lovin's it needs in the past
15:25 TimToady shouldn't matter how close it is as long as the usage is actually in the dynamic scope
15:26 TimToady and as long as something innerer doesn't override it
15:26 flussence aha, if I shove "my $*OUT = ...;" inside the closure it barfs the way it should. that works for me :)
15:26 flussence thanks TimToady
15:34 nbrown_ joined #perl6
15:35 go|dfish joined #perl6
15:37 guru joined #perl6
15:40 nbrown_ joined #perl6
15:44 TimToady backlogged! oops, that means I now hafta go fix that faucet I've been putting off for two days...
15:44 rurban1 joined #perl6
15:44 TimToady wife coming home today, who would be unhappy that we broke the kitchen
15:44 potatogim_ joined #perl6
15:46 cibs joined #perl6
15:47 potatogim_ joined #perl6
15:47 potatogim_ joined #perl6
15:47 awwaiid every time you backlog an issue you have to fix something on your house?
15:48 TimToady seems to work out that way :)
15:53 PotatoGim_Home left #perl6
16:00 rurban1 joined #perl6
16:25 pmurias joined #perl6
16:26 psch joined #perl6
16:27 rurban1 left #perl6
16:29 denis_boyun_ joined #perl6
16:41 nbrown_ joined #perl6
16:51 spider-mario (from Rakudo’s --help) “Output from --profile can be visualized by kcachegrind.”
16:51 spider-mario can it? it writes HTML directly for me.
16:53 spider-mario oh, it appears to depend on the backend.
16:58 flussence r-p got a profiler too at one point, though it goes into too much low-level detail imo
17:15 thou joined #perl6
17:25 Ven joined #perl6
17:32 Ven I just realized that, when doing perl6, my code revolves around subsets.
17:33 zakharyas joined #perl6
17:35 xenoterracide joined #perl6
17:39 raiph joined #perl6
17:42 nbrown_ joined #perl6
18:03 rindolf joined #perl6
18:03 rindolf Hi all.
18:04 Ven o/
18:08 Ven "C++ is a horrible language. In fact, I don't consider it a language any more. It's a conglomerate of plagiarisms with an awful syntax. I mean, every language borrows ideas from neighboring ones, but C++ has this Perl-6 aroma to it: if it exists, we'll take it in. I"
18:10 timotimo that's not a nice thing to say
18:10 timotimo in perl6, all the things we've taken in so far have worked pretty well together
18:10 timotimo and the syntax isn't awful, either
18:18 BizarreCake joined #perl6
18:19 BizarreCake 'ello
18:23 Ven joined #perl6
18:24 Ven timotimo: it's from a python guy :P
18:28 Ven he just wants those subsets and pattern matching :)
18:35 cognome joined #perl6
18:35 pmurias joined #perl6
18:39 dwarring joined #perl6
18:42 FROGGS o/
18:43 nbrown_ joined #perl6
18:44 FROGGS I know it is rather off topic, but is somebody here that is willing to translate something from node-js to perl 5 for me?
18:44 dalek roast: 8871f15 | (David Warring david.warring@gmail.com)++ | S32-scalar/undef.t:
18:44 dalek roast: supress a couple of warnings
18:44 dalek roast: review: https://github.com/perl6/roast/commit/8871f15c14
18:44 dalek roast: f67ab6c | (David Warring david.warring@gmail.com)++ | / (31 files):
18:44 dalek roast: Merge branch 'master' of https://github.com/perl6/roast
18:44 dalek roast: review: https://github.com/perl6/roast/commit/f67ab6c9a9
18:44 dalek roast: 903d2d0 | (David Warring david.warring@gmail.com)++ | S03-operators/assign.t:
18:44 dalek roast: Merge branch 'master' of https://github.com/perl6/roast
18:44 dalek roast: review: https://github.com/perl6/roast/commit/903d2d0f04
18:44 dalek roast: cde924b | (David Warring david.warring@gmail.com)++ | S10-packages/basic.t:
18:44 dalek roast: added test for RT #79464
18:44 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=79464
18:44 dalek roast: review: https://github.com/perl6/roast/commit/cde924b189
18:44 denis_boyun_ joined #perl6
18:44 FROGGS it is just about 40 lines
18:48 dwarring [Coke]: RT #79464 can now be closed (hopefully)
18:48 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=79464
18:55 sergot tadzik: could you try it now?
18:55 sergot tadzik: installing UA. :)
18:56 btyler FROGGS: sure, I'm happy to take a look at least
18:56 FROGGS btyler: it is about that: https://github.com/leandrob/node-psha1/blob/master/lib/index.js
18:58 FROGGS btyler: the hmac+sha1 would be called as: hmac($data, $key, \&sha1, 256)
18:58 FROGGS my uncertainty is about Buffer.copy
19:01 btyler eek, crypto stuff
19:01 FROGGS :/
19:02 FROGGS if you can translate parts of it it would be very helpful already... I think I can google the rest then :o)
19:04 FROGGS btyler: how do I load that script using nodejs?
19:04 pmurias it's a module
19:04 FROGGS so, require("lib/..."); ?
19:05 pmurias require("psha1")
19:05 Ven joined #perl6
19:05 FROGGS Error: Cannot find module 'psha1'
19:05 FROGGS at Function.Module._resolveFilename (module.js:338:15)
19:05 pmurias you need to install it
19:06 FROGGS ahh
19:06 pmurias npm install psha1
19:06 btyler "npm install psha1" (it's on the package index: https://www.npmjs.org/package/psha1)
19:06 pmurias installs it into node_modules/
19:06 btyler like local::lib
19:06 FROGGS npm install psha1
19:06 FROGGS npm WARN install Refusing to install psha1 as a dependency of itself
19:07 btyler ah, you're probably in the directory you cloned the repo into
19:07 FROGGS yeah, got it now
19:07 btyler 'npm install <foo>' installs a lib locally to your project. ok! :)
19:07 FROGGS hehe
19:07 btyler (and it reads the package.json for information about what the project is)
19:07 FROGGS weird :o)
19:08 btyler anyways, the buffer stuff isn't too crazy, but I'm not sure what the direct analogue in p5 is. I guess stuff with vec or pack/unpack? I haven't messed around in that area very much at all
19:09 btyler http://nodejs.org/api/buffer.html the node API docs are generally pretty complete and good quality
19:09 BizarreCake Is it okay to call a Perl 6 compiler I'm writing "P6"?
19:09 Sqirrel joined #perl6
19:09 BizarreCake Now that I think about it... the name seems a bit too generic and one that could be used by official compilers in the future..
19:09 FROGGS buf.copy(targetBuffer, [targetStart],..) # that's helpful indeed
19:09 FROGGS btyler: thanks :o)
19:10 pmurias BizarreCake: doesn't seems a very good name
19:10 FROGGS BizarreCake: P6 might not be the best choice :o)
19:10 BizarreCake yeah..
19:10 FROGGS BizarreCake: choose something that an be found using google
19:10 BizarreCake I guess I'll have to do some major refactoring then... ;-;
19:10 dalek perl6-roast-data: 77dbbef | coke++ | / (6 files):
19:10 dalek perl6-roast-data: today (automated commit)
19:10 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/77dbbefa73
19:11 Ven BizarreCake: I use P6 to say "Perl 6" all the time :/ (also,link?)
19:11 BizarreCake Is it okay for me to post a link to my github repository here?
19:12 pmurias yes
19:12 FROGGS sure
19:12 BizarreCake https://github.com/BizarreCake/P6 :)
19:13 [Coke] dwarring: closed.
19:13 BizarreCake That link will only be valid for a little while I guess, since I have to change the name.
19:15 FROGGS BizarreCake: nice what it can do already :o)
19:15 BizarreCake Not a lot haha
19:15 BizarreCake I'm working on type constraints right now
19:15 BizarreCake There's a small code snippet in the repository's main page demonstrating what it's currently capable of.
19:16 FROGGS well, it is still a lot of work for a one man army
19:16 BizarreCake :)
19:17 BizarreCake It's kind of a challenge for me since I'm learning Perl as I'm writing the compiler..
19:17 Ven You're crazy! It's great :D.
19:18 BizarreCake Its main purpose is to replace PHP in an HTTP server that I'll release later on.
19:18 BizarreCake Server side Perl 6 scripting.
19:18 BizarreCake And thanks :3
19:18 FROGGS :o)
19:18 FROGGS BizarreCake: please keep us posted here about your progress
19:19 BizarreCake Sure haha
19:19 Ven (maybe it could even get a commit log bit, in time)
19:19 pmurias commit log bit?
19:20 BizarreCake :o That's a big goal haha
19:20 Ven pmurias: commits getting notified in the channel
19:21 Ven Not sure how that's even called :D.
19:21 pmurias a github hook?
19:22 Ven yeah
19:23 pmurias there is a document somewhere detailing how to set it up
19:23 pmurias I always forget how to do it
19:24 pmurias BizarreCake: have you seen moarvm?
19:24 BizarreCake I have
19:24 BizarreCake I wrote my own VM to have it as self contained as possible.
19:25 BizarreCake Is it fast?
19:26 Ven BizarreCake: jnthn++ gave a talk about this yesterday, I'll try to find the link to his slides...
19:26 cognome joined #perl6
19:26 Ven pmurias: well, not sure what the URL for that push thingie is, but otherwise you basically just set it in the "repo settings" field
19:26 Ven BizarreCake: http://jnthn.net/papers/2014-yapceu-performance.pdf
19:26 BizarreCake I had it compute the 30th fibonacci number, and I can't really say the results were spectacular..
19:26 BizarreCake It's possible that I didn't compile it properly though
19:27 pmurias joined #perl6
19:28 pmurias Ven: I have set up the github hooks a couple of times but I always forget the details
19:29 BizarreCake It takes 19 seconds to compute the 30th fibonacci number on Rakudo with a MoarVM backend.
19:30 pmurias with recursion?
19:30 BizarreCake Yes
19:32 pmurias numbers are bignums by default in perl6
19:32 BizarreCake oh
19:32 BizarreCake That explains it, I guess.
19:33 FROGGS time perl6 ../fib.p6
19:33 FROGGS fib(30) = 832040
19:33 FROGGS real0m7.951s
19:33 BizarreCake Hmm, that's still a lot
19:33 FROGGS time perl ../fib.pl 30
19:34 FROGGS fib(30) = 832040
19:34 FROGGS real0m0.726s
19:34 BizarreCake Ok
19:34 FROGGS time perl6 ../fib.p6
19:34 FROGGS fib(30) = 832040
19:34 FROGGS real0m3.821s
19:34 FROGGS that's with native ints
19:34 BizarreCake Oh wait, the second one was done using Perl 5
19:34 BizarreCake In that case, that's still quite a lot.
19:35 pmurias FROGGS: could you nopaste your fib.p6, I would like to test it under nqp-js
19:36 FROGGS pmurias: https://gist.github.com/FROGGS/cc3015b5c0a5ab67257c
19:36 BizarreCake I've read somewhere that it performs a full dynamic method dispatch for every arithmetic operation, so that could be why.
19:36 FROGGS BizarreCake: 0.7 to 3.8 is not *that* bad
19:36 FROGGS BizarreCake: look at jnthn's slides
19:36 FROGGS spesh can already inline many things
19:38 FROGGS heh, it allocates 1346268 Ints :o)
19:39 FROGGS from --profile: "In total, 5385138 call frames were entered and exited by the profiled code. Inlining elminated the need to create 1346232 call frames (that's 20%). "
19:39 BizarreCake I found that the biggest reason for the slowdown, at least in my compiler, is the fact that parameters must be packaged into the @_ array every time a method is called.
19:39 BizarreCake instead of pushing the subroutine parameters directly onto the stack.
19:39 BizarreCake It's a needless allocation if the subroutine doesn't use the @_ array.
19:40 timotimo we don't do that
19:40 BizarreCake :o What's the workaround?
19:41 timotimo a subroutine only gets the @_ if you use it inside
19:41 timotimo per spec
19:41 timotimo m: sub test($a, $b) { say @_ }; test(1, 2)
19:41 camelia rakudo-moar c793d8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/TEUtzjL6rUâ�¤Placeholder variable '@_' cannot override existing signatureâ�¤at /tmp/TEUtzjL6rU:1â�¤------> [32msub test($a, $b) { say @_ }[33mâ��[31m; test(1, 2)[0mâ�¤    expecting any of:â�¤   …»
19:41 BizarreCake Hmm
19:41 timotimo m: sub test($a, $b) { say "hi" }; say &test.signature
19:41 camelia rakudo-moar c793d8: OUTPUT«:(Any $a, Any $b)␤»
19:41 timotimo m: sub test() { say @_ }; say &test.signature
19:41 camelia rakudo-moar c793d8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ra0Z43XD92â�¤Placeholder variable '@_' cannot override existing signatureâ�¤at /tmp/ra0Z43XD92:1â�¤------> [32msub test() { say @_ }[33mâ��[31m; say &test.signature[0mâ�¤    expecting any of:â�¤â€¦Â»
19:41 timotimo m: sub test { say @_ }; say &test.signature
19:41 camelia rakudo-moar c793d8: OUTPUT«:(*@_)␤»
19:42 BizarreCake I thought about optimizing it away by searching for @_ inside the subroutine's body, but I know that a lot of subroutines can take @_ as a default parameter
19:42 BizarreCake which makes thinks a bit more complicated
19:42 BizarreCake especially the 'shift' subroutine
19:43 FROGGS m: shift
19:43 camelia rakudo-moar c793d8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/n3ZhMF9cH8â�¤Calling proto of 'shift' requires arguments (if you meant to operate on $_, please use .shift or use an explicit invocant or argument)â�¤    Expected: :(@)â�¤at /tmp/n3ZhMF9cH8:1â�¤----…»
19:43 BizarreCake :o!!
19:43 FROGGS BizarreCake: there is no bare shift
19:43 BizarreCake It was changed in Perl 6?
19:43 FROGGS yes
19:43 BizarreCake That's awesome
19:43 BizarreCake It is possible then.
19:44 nbrown_ joined #perl6
19:45 BizarreCake My compiler can currently compute the 30th fibonacci number in around 0.495s
19:45 FROGGS time perl6 ../fib.p6
19:45 FROGGS fib(30) = 832040
19:45 FROGGS real0m1.467s
19:45 BizarreCake But if I can eliminate the @_ packaging, it could be a lot less
19:45 FROGGS updated: https://gist.github.com/FROGGS/cc3015b5c0a5ab67257c
19:45 FROGGS pmurias: ^^
19:46 FROGGS so fib(30) only takes twice the time of perl 5
19:52 pmurias does nqp support native sub arguments?
19:53 FROGGS what are native sub arguments?
19:54 pmurias sub foo(int $foo) {...}
19:54 pmurias after the compilation it took 0.126s
19:54 FROGGS time nqp-m ../fib.p6
19:54 FROGGS fib(30) = 832040
19:54 FROGGS real0m0.836s
19:55 FROGGS pmurias: yes, nqp supports that
19:55 FROGGS that's a parameter though
19:55 pmurias with compilation 0.410s
19:56 pmurias I'm still doing the cross compiling on parrot which is likely slowing me down
19:56 FROGGS yeah
19:56 FROGGS you should switch, the early the better
19:56 pmurias could you gist the p5 version?
19:57 FROGGS https://github.com/parrot/parrot/blob/master/examples/benchmarks/fib.pl
19:58 timotimo whatf's so expensive?
19:58 FROGGS timotimo: nqp-m is only .1s slower than P5
19:58 Ven joined #perl6
19:59 FROGGS (in case you are talking about fib)
19:59 pmurias so nqp-js is faster then p5 here on the fib example
19:59 FROGGS O.o
20:00 pmurias counting the compilation on parrot
20:00 FROGGS I'm not sure I believe that :o)
20:00 Ven his is in minutes :P
20:00 FROGGS *g*
20:00 FROGGS lol
20:00 Ven now try with luajit :P
20:01 Ven I bet those strict and warnings slow you down :P
20:01 Ven .oO(( I should have .oO()'d these :P ))
20:01 pmurias Ven: "his is in minutes"?
20:01 Ven pmurias: I mean you're benchmarking in minutes instead of seconds
20:02 timotimo i think we ought to do a bit better at that
20:02 timotimo maybe 30 is just not enoug :P
20:02 timotimo well, doing fib via recursion is not a good idea anyway :D
20:03 pmurias Ven: pre rewrite nqp-js was 100x slower than parrot, that's why once I saw the bechmarks I started rewriting it
20:03 pmurias FROGGS: if you don't belive me you can try for yourself ;)
20:04 zakharyas joined #perl6
20:04 timotimo well, care has been taken to make perl6 optimizer-friendly (and nqp even more so)
20:04 FROGGS pmurias: will do that soon-ish... but not today :o)
20:05 colomon joined #perl6
20:05 pmurias FROGGS: ok, I have time to make fib run even faster ;)
20:06 FROGGS bah
20:06 FROGGS :P
20:07 pmurias switching from parrot to the moarvm seems the best way
20:09 FROGGS well, you can test your changes in a fraction of the time... that's always good
20:10 lizmat joined #perl6
20:13 pmurias currently the compile time isn't that bad, but it's steadily getting slowe
20:13 pmurias * slower
20:17 Ven oh wow, just learned that haskell had half a million lines of code... back in 2011.
20:19 masak "haskell had"? what does that mean?
20:19 masak oh hai #perl6
20:20 FROGGS hi masak
20:20 Ven masak: errr, ghc.
20:20 masak ah.
20:20 Ven masak: sorry, I'm randomly talking about several languages again, and drowning a bit
20:21 masak heh :)
20:21 masak and ghc is written in...? C?
20:21 Ven C++, AFAIK
20:21 BizarreCake I think it's written in Haskell
20:21 Ven at least I think so, from some implementor guy's blog post I read
20:21 BizarreCake It's bootstrapped
20:21 masak BizarreCake: hi there. new? welcome.
20:21 BizarreCake haha thanks
20:21 Ven masak: backlog a bit, btw ;)
20:22 * masak does
20:22 Ven http://www.aosabook.org/en/ghc.html 5.2 tells us.
20:24 cognome jnthn++ # talk slides
20:24 geekosaur ghc is written in ghc's dialect of haskell. go back far enough and you'll find early versions written in a dialect of Lazy ML
20:24 masak BizarreCake: yes, please keep us posted about your progress. :)
20:25 geekosaur some bits of the runtime are written in C
20:25 masak BizarreCake: I suppose you're aware of the spectest suite?
20:25 cognome I thought haskell backend was using a C dialect, C--
20:25 BizarreCake They're my primary reference, yes.
20:25 masak ok, great.
20:25 masak BizarreCake: however far you get, it's *always* good to have parallel implementations.
20:26 masak BizarreCake: so especially that kind of feedback would be wonderful.
20:26 geekosaur cmm is used by the code generator; I don't think any of the runtime is written in it, and the compiler itself certainly isn't
20:26 cognome http://en.wikipedia.org/wiki/C--
20:26 BizarreCake :)
20:26 geekosaur (cmm is a fork of c--)
20:26 masak BizarreCake: in fact, now I half-expect you to come back with tricky one-liners on camelievalbot and challenge us with the why and how.
20:26 BizarreCake Well, in time haha, I'm still learning Perl as I'm writing the compiler
20:26 SamuraiJack joined #perl6
20:27 BizarreCake Which is the main challenge for me, at the moment.
20:27 BizarreCake Before I implement a feature, I always need to make sure I understand it properly.
20:27 BizarreCake Which is why I sometimes wish the spec documents had more rigorous definitions in them.
20:28 masak BizarreCake: by the way, some people will misunderstand if you say "Perl" when you mean "Perl 6". that's generally fine here, but in some forums that'd be a faux pas of sorts.
20:28 geekosaur c-- / cmm makes a good intermediate language for code generation, but is a bit too platform dependent for use as a direct target so not really suitable for implementing parts of the runtime
20:28 BizarreCake Nope, I actually mean that
20:28 BizarreCake I'm learning both Perl and Perl 6 at the same time
20:29 masak BizarreCake: if you have any (*any*) questions about details of the spec, there are oodles of people here ready to help with that.
20:29 masak BizarreCake: in here, "Perl" means "Perl 5 + Perl 6", kind of.
20:29 BizarreCake I'll be sure to, thanks :)
20:30 masak BizarreCake: like "the Perl community" consists of all the Perl 5 and Perl 6 peeps like those at the currently ongoing YAPC::EU.
20:30 geekosaur s/direct target/source language/ I am too tired :(
20:34 TimToady m: proto fib(|) is cached {*}; multi fib(0) {0}; multi fib(1) {1}; multi fib(\n) { fib(n-1) + fib(n-2) }; say fib(30)
20:34 camelia rakudo-moar c793d8: OUTPUT«832040␤»
20:34 TimToady m: proto fib(|) is cached {*}; multi fib(0) {0}; multi fib(1) {1}; multi fib(\n) { fib(n-1) + fib(n-2) }; say fib(100)
20:34 camelia rakudo-moar c793d8: OUTPUT«354224848179261915075␤»
20:35 TimToady BizarreCake: ^^
20:35 TimToady mind you, that's not how we'd do fib in P6 generally
20:35 BizarreCake It's cached, of course it'd run faster.
20:35 kupopo joined #perl6
20:35 BizarreCake You're right, no one really computes fib(30) using a recursive implementation.
20:35 TimToady m: constant fib = 0, 1, *+* ... *; say fib[100]
20:35 camelia rakudo-moar c793d8: OUTPUT«354224848179261915075␤»
20:36 BizarreCake Those are just small details that could lead to performance impacts in bigger problems :)
20:36 TimToady but as a benchmark of call overhead, you could do worse
20:38 BizarreCake I'm benchmarking fib to try and measure how fast the bytecode instructions are executed.
20:39 TimToady by the way, I agree that "P6" is too generic; we use that all the time here to indicate the language when we're too lazy to type Perl 6
20:39 BizarreCake .. yeah haha
20:39 BizarreCake I'm really bad with names though
20:39 masak BizarreCake: have you thought of a good name yet?
20:40 BizarreCake nope..
20:40 BizarreCake Want to help? ;D
20:40 masak BizarreCake: I kind of have a history of naming Perl 6 compilers.
20:40 masak maybe I can help? :)
20:40 BizarreCake Be my guest haha
20:40 * masak has named at least two
20:40 kupopo Should rakudo-star + parrot be able to build Perl 6 programs into binaries?  I've tried on 3 different computers (mac and linux built from source and an ubuntu binary distro) and all give the same error about missing or wrong version of src/Perl6/Grammar.nqp when I run parrot (though perl6 can execute it directly).
20:40 masak BizarreCake: ok, so tell me about the salient features of your compiler.
20:41 BizarreCake uhh..
20:41 BizarreCake Hmm, that's a difficult question for a compiler that doesn't really have a lot in it.
20:41 Ven masak: http://tel.github.io/2014/08/22/JSON_is_not_object_notation/ codata! :P
20:41 BizarreCake I'm planning to use it in an HTTP server later on
20:42 BizarreCake and allow HTML files to have embedded <?perl6 ?> tags in them
20:42 Ven only <? please :P.
20:42 masak Ven: will read.
20:42 masak BizarreCake: ooh, that's an excellent idea. I've been meaning to look into a rakudo distribution that does that, too.
20:43 BizarreCake I can't really think of anything else haha
20:43 Ven (though people try to stay away from that :P)
20:44 nbrown_ joined #perl6
20:44 masak BizarreCake: how about "arane" -- nice and short, Esperanto for spider (because you'll be using it for the web)
20:45 BizarreCake .. :o You're pretty good
20:45 masak easy to pronounce, unlike Niecza.
20:45 Ven Not sure how I knew it meant "spider" – I don't speak a single word of Esperanto.
20:45 BizarreCake I like it
20:45 masak Ven: but you're French.
20:45 masak Ven: araignée
20:45 Ven masak: yes? arachne makes me think about those too
20:45 masak oh yes, same root.
20:45 flussence there is a vague technical reason to have some word after a <? - it makes it valid xml syntax (though that still depends on what happens before the next ?>)
20:46 kupopo I'm assuming it's a problem with my environment or command-line or something: $ perl6 /tmp/hello.p6  # hello  $ perl6 --target=pir --output=/tmp/hello.pir /tmp/hello.p6  $ parrot /tmp/hello.pir
20:46 kupopo Should that work?
20:46 Ven oh, it's from greco-roman mythology, apparently: "arachne"
20:46 BizarreCake masak: I think it's settled then
20:46 Ven that's what I know, I guess
20:46 BizarreCake Arane it is :3
20:46 Ven BizarreCake: congrats on those legs ;)
20:46 Ven (also from the latin "aranea")
20:46 masak BizarreCake: if people ask, the actual Esperanto word is "araneo" with an "o" at the end. but you're allowed to lop off the final "o" on (nominative) nouns for poetry purposes.
20:47 flussence kupopo: try compiling the pir to pbc and running that
20:47 Ven masak: how many (natural) langs do you know?
20:47 masak BizarreCake: there really should be an apostrophe in its place ("arane'"), but we can be liberal and skip that. :)
20:47 masak Ven: about seven.
20:47 masak Ven: but I only speak three of them well enough to brag about it.
20:47 BizarreCake I'll just add a section describing the etymology of the name haha
20:47 kupopo flussence: the compilation succeeds but I get the same error when I run the resulting binary
20:47 Ven masak: I only speak french and english enough to brag about it, so I'm kinda jealous now :P.
20:47 masak :)
20:48 Ven I can learn programming languages pretty easily, but I'm impressed with people speaking many natural languages
20:48 Ven It's just, like, a different dimension in learning...
20:48 masak Ven: I'm not sure if you count Esperanto as "natural". if you don't, then I only speak two well.
20:48 Ven masak: why not?
20:48 masak I guess Esperanto is natural *enough* at this point...
20:49 masak it's certainly owned by its speaker community, at least.
20:50 flussence kupopo: oh, I'm not sure if anyone's ever had that use case working properly. Those files are usually only used as a compilation cache alongside the input .pm/.pl files...
20:51 kupopo I can get past the Grammar.nqp error by running from ~/Downloads/rakudo-star-2014.04/rakudo - in that case it complains about missing/wrong version of gen/parrot/stage2/QRegex.nqp
20:51 denis_boyun_ joined #perl6
20:52 kupopo which seems like it's trying to use whatever bootstrapping framework was used to build the perl6 binary but that it may not work for anything else
20:52 masak BizarreCake: for the people who wonder where the stress falls, it technically should be "arané" -- but I think the more natural one is "aráne", and "árane" sounds kinda exotic, too. so maybe simply leave it open to people's whim.
20:53 masak "aráne" is more of a kin with "rakúdo" and "Niécza"
20:53 flussence kupopo: have you done a "make install" on rakudo?
20:55 BizarreCake masak: Noted :)
20:55 kupopo flussence: yes, that's how I installed it, though I did set PREFIX=$HOME/local/opt/rakudo - but I get the same error on the ubuntu 'rakudo' distro
20:55 jnthn kupopo: As far as I know, you can pre-compile modules, but not individual scripts.
20:56 kupopo jnthn: I see - that was the gist I got from trying --target=jar as well - a jar library but no main class.  What the best way to package a perl6 program to be usable by someone on a workstation that hasn't installed rakudo?
20:57 kupopo (or is that even possible?)
20:57 flussence get them to install niecza instead? */me ducks*
20:58 kupopo (and if not, what is pbc_to_exe for?
20:59 flussence pir is a standalone language by itself, it'd probably work fine for simple cases of that, just not for rakudo-on-nqp-on-parrot...
21:00 flussence who knows, maybe it works completely fine in one of those other languages parrot is designed for :)
21:01 masak 'night, #perl6
21:01 BizarreCake Cya
21:01 BizarreCake and thanks again :)
21:02 kupopo oh well... hopefully someone'll figure out how to do it someday.  Thanks, all
21:04 flussence oh jeez, I've gotta be awake at *8:30* tomorrow to catch masak's talk? :)
21:07 pmurias kupopo: you will have to package up moarvm with your program
21:08 jnthn I *think* tadzik managed to package that up with some game he made a while back...
21:08 pmurias kupopo: I don't think currently a premade packer for that exists
21:08 jnthn Not sure that became a tool though
21:12 pmurias kupopo: what program do you want to bundle up?
21:12 flussence bundling an entire r-m isn't a huge burden, it's 36MB uncompressed (and becomes half that if you *only* compress CORE.setting.moarvm...)
21:18 dalek nqp-js: 263d8fc | (Pawel Murias)++ | src/vm/js/ (2 files):
21:18 dalek nqp-js: Implement mul_i.
21:18 dalek nqp-js:
21:18 dalek nqp-js: Polyfill Math.imul when it's not implemented by the javascript engine.
21:18 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/263d8fcc5c
21:18 dalek nqp-js: d4a8694 | (Pawel Murias)++ | src/vm/js/ (2 files):
21:18 dalek nqp-js: Implement nqp::iterator.
21:18 Ven flussence: timezone :P ?
21:18 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/d4a86943de
21:18 dalek nqp-js: 5762520 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
21:18 dalek nqp-js: The iterators are false in boolean context when they are no more values to iterate.
21:18 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/5762520e6a
21:18 dalek nqp-js: 02cd9eb | (Pawel Murias)++ | src/vm/js/ (3 files):
21:18 dalek nqp-js: Implement for, pass test 15.
21:18 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/02cd9eb96c
21:18 dalek nqp-js: 8b69b80 | (Pawel Murias)++ | src/vm/js/ (3 files):
21:18 dalek nqp-js: Pass tests 6 and 11.
21:18 dalek nqp-js:
21:18 dalek nqp-js: Implement slurpy positional parameters, immediate blocks, and fix binding to and array element.
21:18 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/8b69b8057e
21:18 Ven pmurias++
21:18 Ven rip dalek
21:22 flussence Ven: YAPC-0200, or thereabouts :)
21:22 Ven flussence: in absolute time if possible, this doesn't really help :P
21:23 flussence okay okay, UTC+1...
21:26 raiph joined #perl6
21:29 Ven map+(Fizz)[$_%3].(Buzz)[$_%5].(Bazz)[$_%7]||$_,1..100 <- FizzBuzzBazz in p5. Not sure p6 can beat that :P
21:32 tadzik whatwhat
21:33 aindilis joined #perl6
21:33 Ven tadzik: exactly!
21:34 tadzik I die manage to bundle moarvm with my game, it was 2.2M xz'd
21:35 tadzik it also didn't work :)
21:35 tadzik s/die/did/
21:37 jnthn oh...
21:37 dolmen joined #perl6
21:38 vukcrni joined #perl6
21:38 psch the p5 snippet isn't that complicated.  (Fizz) is a list, [$_%3] indexes it at the $_ % 3 position
21:39 psch so for any case where in 1..100 $_ % 3 is not 0 it prints nothing
21:39 psch . is the concat operator
21:39 tadzik because it relied on some modules living in /home/tadzik
21:39 psch and ||$_ should be clear
21:39 tadzik no matter what the prefix was
21:39 Ven psch: I havn't said it's complicated :)
21:40 psch Ven: right, tadziks 'whatwhat' prompted my explanation
21:40 psch not sure if it was neccessary
21:41 psch as for "beating it", no idea if we can have it shorter in p6
21:43 psch tbh, why the + is needed in the p5 snippet is a bit beyond me
21:43 Ven it should do Nothing (TM)
21:43 psch because '(a)[0]' doesn't compile, while '+(a)[0]' does
21:43 Ven expression pos?
21:45 nbrown_ joined #perl6
21:45 psch i think it's map magic
21:46 psch i.e. 'map+(A), 1..2' does the same as 'map {(A)}, 1..2'
21:46 colomon joined #perl6
21:47 psch Ven: depending on what 'pos' means in your last line this might be what you meant :)
21:47 erkan joined #perl6
21:47 Ven position. i.e. make perl "want" an expression instead of a statement
21:49 kupopo joined #perl6
21:49 kupopo pmurias: they don't exist yet, i've got some scripts i share with colleagues and i was considering reworking them in p6, but it's a no-go if they can't run them
21:50 Ven oh, so I have to be up at 8AM like flussence to get masak's talk?
21:51 Ven flussence: you're from germany or about, right?
21:51 flussence nope, uk :)
21:51 Ulti uk++
21:51 Ven oh, sorry
21:52 SamuraiJack joined #perl6
21:53 BenGoldberg joined #perl6
21:56 psch Ven++: that might be it.  i'm not sure i (can|want to) figure out details right now
21:56 psch it's late and there's a talk to watch early tomorrow... :)
22:09 nbrown_ joined #perl6
22:10 * Ven is just wondering what time is it at sofia atm
22:10 dolmen joined #perl6
22:10 jnthn 01:10
22:11 Ven so I need to be up by 9h30.
22:33 flussence joined #perl6
22:36 colomon joined #perl6
22:57 xragnar_ joined #perl6
23:11 Akagi201 joined #perl6
23:12 nbrown_ joined #perl6
23:12 btyler joined #perl6
23:22 nbrown_ joined #perl6
23:46 xenoterracide joined #perl6
23:52 telex joined #perl6

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

Perl 6 | Reference Documentation | Rakudo