»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
grondilu Hello. Someon on the French Perl 6 WP article wrote that MoarVM uses LuaJIT. That seems difficult to believe to me. 00:02
I mean, MoarVM does not use Lua at all, does it? 00:03
timotimo yes, it's not correct
we use DynASM, which is used by LuaJIT
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
grondilu ok 00:04
oh snap I've only now realised there were livestream videos for YAPC::EU 00:06
grondilu guess he'll just have to patiently wait for the records to be posted on YT 00:07
timotimo yes! 00:08
i'll probably miss masak's talk :(
grondilu that's the one about the awesome gotos, isn't it? 00:09
timotimo yes 00:11
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 :(
tassilo perl6: say 5; 00:20
camelia rakudo-{parrot,jvm,moar} e950e7, niecza v24-109-g48a8de3: OUTPUT«5␤»
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,,»
..rakudo-jvm c793d8: OUTPUT«(timeout)»
..rakudo-parrot c793d8: OUTPUT«r aoertaPu, hknJ lcesth,er»
colomon TimToady: lollipop syntax? 02:00
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.
dalek ast: 0dfc2dd | jimmy++ | S03-operators/assign.t:
Fix Redeclaration of symbol $a
04:10
TimToady m: say (<a b c>; 1,2,3).perl 04:40
camelia rakudo-moar c793d8: OUTPUT«("a", "b", "c"; 1, 2, 3)␤»
TimToady colomon: ^^ that syntax
list of lists
hence "lol"
m: say (<a b c>; 1,2,3)[*;1] 04:41
camelia rakudo-moar c793d8: OUTPUT«b 2␤»
lizmat commute, attempt #2 & 04:50
itz is the profiler on github? 05:16
oh I see it 05:20
hagiri ops 05:34
hello
;)
moritz good morning 06:03
masak good morning, #perl6 06:51
tadzik hello hello 06:59
Woodi hallo today :) 07:10
Woodi it was very -Ofun backlog today :) 07:12
Woodi jnthn++ as always (so far) :) 07:16
tadzik wow, copying that JSON data from the profile.html really makes vim stutter 07:17
it also pretty much kills joson_pp :D 07:18
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: benchmarksgame.alioth.debian.org/u3...p;data=u32
tadzik I wonder if rakudo will be able to load that 58-meg JSON from SpaceInvaders... 07:23
masak ah, found it. github.com/rakudo-p5/v5 07:24
tadzik wow, it didn't even took 3 minutes, and only ate 1.5G of ram :P 07:27
FROGGS[mobile] masak: I'm working in the nqp_to_perl6 branch 07:28
tadzik: lol 07:30
tadzik FROGGS[mobile]: perl5 with Json::XS did that in 0.17seconds, too short for me to glance at htop :)
I should now profile that JSON reading, and then profile parsing that, and... 07:31
FROGGS[mobile] :/
++tadzik
tadzik but first I want my nytprof-like code viewer 07:32
masak FROGGS[mobile]: during the day, would you have time to quickly walk me through the slang magic of v5? 07:39
FROGGS[mobile]: I'm curious because it might affect some later parts of my talk tomorrow. 07:40
FROGGS[mobile] masak: ohh, sure
masak FROGGS[mobile]: \o/ 07:42
masak FROGGS++ gave me a nice tutorial on privmsg. 08:14
tadzik heh, I was able to pull some data off the new shiny profiler: feather.perl6.nl/~tjs/linedata/SpaceInvaders 08:16
I now realized that it shows function _definitions_, not function calls
or not 08:17
it sometimes shows really weird stuff too
tadzik I wonder if the amount of zeros is the case of a mistake on my part or a low profiler resolution 08:19
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. :-)
tadzik jnthn: I see 08:21
jnthn: is "entries" including "jit_entries" and "inlined_entries"?
jnthn Yes 08:24
tadzik there are indeed many places in the profile where the time is 0. That's fast :D 08:30
masak tadzik: the line in `keypressed` with just a '}' that has nonzero entries is weird. 08:42
tadzik masak: yes 08:43
masak: I should stick names of called functions in there somewhere
but I assume it's something like <unit> or <anon> :o
tadzik masak: ok, this is actually what the profiler reports as the keypressed function, that particular line 08:49
masak tadzik: weird. I thought closing braces were much faster than that. 09:01
tadzik: from now on I'm going to try to minimize the closing braces in my programs. 09:02
clearly they are a resource hog.
tadzik masak: avoid the shebang as well, look how much time that takes
masak oh, I didn't see that, but yes!
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
masak :)
masak .oO( carve out the text with a chisel ) 09:04
tadzik I'll have to investigate moar
Ven :D 09:07
relative time is fun!
jnthn The line numbers at the moment corespond to the start of a routine or block, because it's doing routine-level profiling...
Well, or block level
tadzik feather.perl6.nl/~tjs/linedata/slow.pl yeah, that can't be right...
jnthn: so we can't really have statement-level at this point? 09:08
jnthn tadzik: No; it's just not recording that kind of data yet 09:09
(And we probably want it to be an option)
tadzik okay
masak I think people will generally expect statement-level data. 09:13
jnthn masak: Depends. I've happily been working with routine-level with the MSVC profiler... 09:20
hmm, I guess it's lunch time at the venue? :)
jnthn puts aside talk prep and wanders over :) 09:21
masak jnthn: practically lunch time. ribasushi is still talking here :) 09:22
jnthn :) 09:22
be there in a bit
will try and spot you :)
tadzik found an interesting website: www.bountysource.com/ 09:35
tadzik not much perl activity in there, though 09:36
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 09:51
FROGGS[mobile] *g* 10:18
jnthn Bah, those darn Perl 6 kids making the language more and more usable... :P 10:25
FROGGS[mobile] and they dare to do that with a proper design! 10:26
nwc10 no-one committed anything in the past few hours - what's up? Everyone at a conference, or something? 10:27
tadzik slackers!
nwc10 there's this new profiler. Everything should be instanenous now
jnthn <- writing code so I can write a talk about it for tomorrow :P 10:28
FROGGS[mobile] jnthn: about async, or do you have another slot? 10:34
jnthn async 10:35
tadzik will there be a surprise? :)
jnthn No :P
FROGGS[mobile] :/ 10:36
masak THERE IS NO SEKKRIT PROJECT 10:41
jaffa4 Did anyone go to yesterday Perl jhthn talk? Are there any slides available? 10:48
Any interesting information?
masak jaffa4: it was a well-liked talk. 10:49
jaffa4: jnthn implemented goto during one of the applauses. :P 10:50
jaffa4 you are joking 10:51
masak hence the ':P' 10:52
jnthn The slides can be found at jnthn.net/papers/2014-yapceu-performance.pdf 10:59
masak it was indeed a performance. :) 11:01
sergot o/ 11:01
tadzik \o 11:02
sergot tadzik: would you have some time to debug ssl today? :) 11:03
tadzik sergot: sure
sergot \o/ 11:05
tadzik++
tadzik looking into it now 11:05
sergot thank you 11:06
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:11
I'll just put a lot of prints in the code :D 11:12
sergot yea, it is probably the best way :) 11:14
Do you want the commit bit?
sergot bbiab 11:16
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("github.com")' eats all my memory and then the kernel kills it
my $content = buf8.new( @a[($msg-body-pos + 2)..*] ); -- this line is at fault 11:20
so it seems like it actually goes to infinity and beyond
lizmat finally made it to the hotel in Sofia 11:24
masak lizmat! \o/ 11:25
lizmat so where are you hanging out?
masak at Inter Expo venue place.
tadzik lizmat! \o/
masak currently listening to mst explaining how devops and prolog have a lot in common.
tadzik r: my $a = buf8.new([]); say "Foo: $a" # this is amusing 11:32
camelia rakudo-jvm c793d8: OUTPUT«java.lang.StackOverflowError␤␤»
..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…»
..rakudo-moar c793d8: OUTPUT«(signal )»
masak o.O
tadzik: please submit that. 11:33
tadzik I think concat is the problem
r: my $a = buf8.new([]); say $a
camelia rakudo-{parrot,jvm,moar} c793d8: OUTPUT«Buf:0x<>␤»
tadzik r: my $a = buf8.new([]); say "" ~ $a
tadzik . o O ( BOOM ) 11:33
camelia rakudo-jvm c793d8: OUTPUT«java.lang.RuntimeException: java.lang.StackOverflowError␤␤»
..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…»
..rakudo-moar c793d8: OUTPUT«(signal )»
tadzik r: my $a = buf8.new([]); say ~$a 11:34
camelia rakudo-{parrot,jvm,moar} c793d8: OUTPUT«Buf:0x<>␤»
masak some dispatch somewhere self-calls and goes into an infinite loop. 11:37
tadzik it would seem so, yes
tadzik reported. 11:40
masak tadzik++ 11:43
lizmat comute to venue& 11:54
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. 11:59
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:09
jnthn masak: Delegation may make more sense... 12:10
Hm, though maybe not from a performance view :)
masak jnthn: anything that works is interesting at this point. 12:14
timotimo m: use Perl6::Grammar:from<NQP>; grammar Foo is Perl6::Grammar { }; 12:43
camelia ( no output )
timotimo m: use Perl6::Grammar:from<NQP>; grammar Foo is Perl6::Grammar { }; Foo.parse("say 'hi';");
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␤…»
timotimo (Perl6::Grammar can't operate without Perl6::World) 12:47
masak ok, but it worked thus far. 12:59
timotimo oh my
masak that's encouraging, I think.
timotimo++
timotimo someone's running a little SSLStrip attack in the yapc event network?
masak yes, so it seems. :/
heh, there's an Ubuntu package called 'sslstrip'. 13:00
"Package description: SSL/TLS man-in-the-middle attack tool"
seems legit.
itz maybe he saw the forged arp packets 13:01
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:03
sergot tadzik: interesting 13:06
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:07
masak timotimo: I would be willing to look into this together with you. feels like it's close to working. 13:11
timotimo let me quickly get back to the spot i was at before 13:12
timotimo oh, my local install of perl6 needs to be re-built first 13:14
lightning talks are about to start, cool 13:15
tadzik sergot: I was wrong, it was another bug :)
I changed rooms a couple times, I'll now keep looking
sergot: now this is amusing. I get No such method 'bytes' for invocant of type 'Any'. Did you mean '.encode($encoding).bytes'? 13:16
www.fugly.com/media/IMAGES/Random/65_wat.jpg 13:17
it's inside an if $content { }
sergot hmm, something must be empty 13:18
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
I reported that bug
but now I have another ran with $content being empty
sergot hmmm 13:22
let me check something
tadzik is it possible that it sometimes receives nothing and then says "ah screw it, I give up"? 13:23
(guessing again)
sergot tadzik: try debuggin like this: github.com/sergot/io-socket-ssl/co...6cfdc9ae3e 13:23
timotimo m: use Perl6::Compiler:from<NQP>; class MyComp is Perl6::Compiler { }; say MyComp.new().eval("say 'hi there!'")
camelia rakudo-moar c793d8: OUTPUT«===SORRY!===␤Cannot find method 'parse'␤»
timotimo the HLL::Compiler wants to call the named method "parse", but is not succeeding 13:24
tadzik sergot: like how? :D
I have a recent Socket::SSL if that's what you mean
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
timotimo (but actually i have no idea what's going on) 13:26
sergot one sec 13:27
masak m: say sec 1 13:28
camelia rakudo-moar c793d8: OUTPUT«1.85081571768093␤»
masak ^ one sec :P
timotimo m)
masak m: say 1.sec 13:28
camelia rakudo-moar c793d8: OUTPUT«1.85081571768093␤»
jnthn m: say :1sec 13:29
camelia rakudo-moar c793d8: OUTPUT«␤»
jnthn m: say (:1sec)
camelia rakudo-moar c793d8: OUTPUT«"sec" => 1␤»
sergot tadzik: we should add some debugging here: github.com/sergot/io-socket-ssl/bl...L.pm6#L113 13:30
masak m: my $pair = :1sec; say $pair.value."$pair.key()"()
camelia rakudo-moar c793d8: OUTPUT«1.85081571768093␤»
sergot like I show you above
timotimo aaarrrggghh masak %) 13:31
masak m: my $pair = :1sec; say .value."$(.key)"() given $pair
camelia rakudo-moar c793d8: OUTPUT«1.85081571768093␤»
masak timotimo: :P
masak blames jnthn :)
sergot tadzik: www.openssl.org/docs/ssl/SSL_read....URN_VALUES
tadzik sergot: right. OpenSSL's read() method just ignores that realyl :0 13:32
sergot yeah... I should have done this.
sergot :) 13:33
sergot another task is to add throwing the exceptions 13:34
jnthn masak: That's *horrible* :P 13:35
masak grins
sergot tadzik: actually we should it in OpenSSL.pm6 13:36
tadzik sergot: yeah, in read() 13:37
it pretty much ignores the return value there
sergot tadzik: it is my fault :( 13:38
tadzik "it's not what you do, it's what you do after" :P
sergot I can do this right now
hehe :)
tadzik yes please :)
++sergot
sergot I've just added printing errors, about throwing exceptions I will think later :) 13:43
pushing in a while
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
sergot tadzik: pushed 13:47
should be enough for now
tadzik sergot++
trying it out
sergot: no new output :( 13:48
sergot eww 13:49
tadzik sergot: do you have a machine running ubuntu?
sergot yes 13:49
tadzik I can replicate that bug on those, did you try it there?
flussence
.oO( this thing that's currently being talked about sounds interesting and useful... )
13:49
tadzik yes 13:50
I love the idea
sergot What is it about? (my $connection sucks)
tadzik sergot: a new IM service, distributed open etc 13:51
flussence alternative to xmpp that isn't xml :)
tadzik sort of :)
and with good rooms, like irc
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
I mean, the same as yours
tadzik oh, good, so you can reproduce it :)
sergot sort of, because I cant get "Any"
only the bug with getting just the header
tadzik it varies, I had that yesterday, I don't have that today 13:53
it probably depends on what github sends
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
sergot it is something wrong with the chunked transfer encoding.. 13:57
I'm almost 100% sure.
tadzik: 14:01
this fixes the-any-problem:
- while $chunk-size > $content.bytes {
+ while $content && $chunk-size > $content.bytes {
it seems like a chunk can only contain the size 14:02
no, wait.. it's not correct
[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:03
masak [Coke].11yo++ 14:04
jnthn Now try .uc :D
masak "UR CAPITALS!" 14:05
tadzik utilize capitals? :P
masak "ultimate capitals" 14:06
flussence unlose capitals!
masak flussence wins :) 14:07
masak "mentee" is a wonderful word :) 14:28
gtodd is it correct? 14:29
jnthn Why not? :) 14:30
masak gtodd: "..." -- Humpty Dumpty 14:32
jnthn
.oO( Stubty Dumpty )
14:33
masak gtodd: en.wikipedia.org/wiki/Humpty_Dumpt...king-Glass
flussence ...is that mst in a kilt?
masak flussence: yes. 14:34
tadzik he's on stage now
gtodd heh
masak the backstory of mst giving these keynotes is something like the following:
TimToady kept giving keynotes about the evolution and thought process of Perl 6.
no-one gave keynotes about the continued evolution of Perl 5.
so eventually, mst stepped into that role. 14:35
(mst++)
gtodd one of these days he is going to talk about perl6 :-) 14:37
masak thing is, as much fun he makes of Perl 6, mst++ is one of the good guys. 14:38
gtodd for sure :-)
masak he may not ever turn into a regular Perl 6 user, having been too brain dam^W^Winfluenced by Perl 5. 14:39
but he *wants* Perl 6 to succeed.
gtodd heh ... SotV FIVE which means next time it will be SotV SIX hehe 14:40
masak dun dun *duuun*
heh, the Perl 5 release process has more or less converged on the Rakudo release process :P 14:41
good for them!
so... if Perl 5 is moving forward faster... 14:43
...is it now an acceleraptor? :P
jnthn was thinking that :P
flussence
.oO( or it's a hungry velociraptor )
masak signatures! \o/ 14:46
tadzik ...behind 40 experimental warnings :)
masak .oO( are you really *really* sure you want to switch this on? ) 14:47
what the heck is postfix deref?
tadzik $foo->{bar}->@ or so 14:48
instead of the @{} ugliness
masak I... uh...
ok, so it's like .list -- fine. 14:49
[Coke] jnthn: nice slides. I learned some stuff. 14:50
jnthn :) 14:52
dalek kudo-star-daily: fada594 | coke++ | log/ (14 files):
today (automated commit)
14:53
awwaiid maybe they should have named it ->list :) 15:13
moritz except that this breaks backwards compat 15:14
awwaiid which? 15:15
moritz what about existing methods called "list2?
*"list"
awwaiid if there is an existing method named list, then it is probably not an arrayref :)
FROGGS awwaiid: when you parse ->@ you can be sure that you have to array-deref, and you know that at compile time
gtodd ... are slides for each talk (e.g. the GOTO talk :-) act.yapc.eu/ye2014/talk/5634 ) available from the site?
FROGGS you don't know that with ->list 15:16
because that could be a method on an object
awwaiid ah yes, compile time. good point
moritz awwaiid: plessed array refs are valid objects in p5
awwaiid yeah, I realize that moritz. I spoke hastily :) 15:17
moritz awwaiid: and I know some production p5 code that uses them
awwaiid it's just so ... ugly. Don't get me wrong, @{..} isn't so purdy itself
moritz agreed
awwaiid and actualy it is ->@*, right? 15:18
I would prefer ->@
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:19
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
shouldn't matter how close it is as long as the usage is actually in the dynamic scope
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 :)
thanks TimToady
TimToady backlogged! oops, that means I now hafta go fix that faucet I've been putting off for two days... 15:44
TimToady wife coming home today, who would be unhappy that we broke the kitchen 15:44
awwaiid every time you backlog an issue you have to fix something on your house? 15:47
TimToady seems to work out that way :) 15:48
spider-mario (from Rakudo’s --help) “Output from --profile can be visualized by kcachegrind.” 16:51
can it? it writes HTML directly for me.
oh, it appears to depend on the backend. 16:53
flussence r-p got a profiler too at one point, though it goes into too much low-level detail imo 16:58
Ven I just realized that, when doing perl6, my code revolves around subsets. 17:32
rindolf Hi all. 18:03
Ven o/ 18:04
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:08
timotimo that's not a nice thing to say 18:10
in perl6, all the things we've taken in so far have worked pretty well together
and the syntax isn't awful, either
BizarreCake 'ello 18:19
Ven timotimo: it's from a python guy :P 18:24
he just wants those subsets and pattern matching :) 18:28
FROGGS o/ 18:42
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 ast: 8871f15 | (David Warring [email@hidden.address] | S32-scalar/undef.t:
supress a couple of warnings
ast: f67ab6c | (David Warring [email@hidden.address] | / (31 files):
Merge branch 'master' of github.com/perl6/roast
ast: 903d2d0 | (David Warring [email@hidden.address] | S03-operators/assign.t:
Merge branch 'master' of github.com/perl6/roast
ast: cde924b | (David Warring [email@hidden.address] | S10-packages/basic.t:
added test for RT #79464
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=79464
FROGGS it is just about 40 lines 18:44
dwarring [Coke]: RT #79464 can now be closed (hopefully) 18:48
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=79464
sergot tadzik: could you try it now? 18:55
tadzik: installing UA. :)
btyler FROGGS: sure, I'm happy to take a look at least 18:56
FROGGS btyler: it is about that: github.com/leandrob/node-psha1/blo...b/index.js
FROGGS btyler: the hmac+sha1 would be called as: hmac($data, $key, \&sha1, 256) 18:58
my uncertainty is about Buffer.copy
btyler eek, crypto stuff 19:01
FROGGS :/
if you can translate parts of it it would be very helpful already... I think I can google the rest then :o) 19:02
btyler: how do I load that script using nodejs? 19:04
pmurias it's a module
FROGGS so, require("lib/..."); ?
pmurias require("psha1") 19:05
FROGGS Error: Cannot find module 'psha1' 19:05
at Function.Module._resolveFilename (module.js:338:15)
pmurias you need to install it
FROGGS ahh 19:06
pmurias npm install psha1
btyler "npm install psha1" (it's on the package index: www.npmjs.org/package/psha1)
pmurias installs it into node_modules/
btyler like local::lib
FROGGS npm install psha1
npm WARN install Refusing to install psha1 as a dependency of itself
btyler ah, you're probably in the directory you cloned the repo into 19:07
FROGGS yeah, got it now
btyler 'npm install <foo>' installs a lib locally to your project. ok! :)
FROGGS hehe
btyler (and it reads the package.json for information about what the project is)
FROGGS weird :o)
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:08
btyler 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"?
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
btyler: thanks :o)
pmurias BizarreCake: doesn't seems a very good name 19:10
FROGGS BizarreCake: P6 might not be the best choice :o)
BizarreCake yeah..
FROGGS BizarreCake: choose something that an be found using google
BizarreCake I guess I'll have to do some major refactoring then... ;-;
dalek rl6-roast-data: 77dbbef | coke++ | / (6 files):
today (automated commit)
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?
pmurias yes 19:12
FROGGS sure
BizarreCake github.com/BizarreCake/P6 :)
[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.
FROGGS BizarreCake: nice what it can do already :o) 19:15
BizarreCake Not a lot haha
I'm working on type constraints right now
There's a small code snippet in the repository's main page demonstrating what it's currently capable of.
FROGGS well, it is still a lot of work for a one man army 19:16
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.
BizarreCake Its main purpose is to replace PHP in an HTTP server that I'll release later on. 19:18
Server side Perl 6 scripting.
And thanks :3
FROGGS :o)
BizarreCake: please keep us posted here about your progress
BizarreCake Sure haha 19:19
Ven (maybe it could even get a commit log bit, in time)
pmurias commit log bit?
BizarreCake :o That's a big goal haha 19:20
Ven pmurias: commits getting notified in the channel
Not sure how that's even called :D. 19:21
pmurias a github hook?
Ven yeah 19:22
pmurias there is a document somewhere detailing how to set it up 19:23
I always forget how to do it
BizarreCake: have you seen moarvm? 19:24
BizarreCake I have
I wrote my own VM to have it as self contained as possible.
Is it fast? 19:25
Ven BizarreCake: jnthn++ gave a talk about this yesterday, I'll try to find the link to his slides... 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
BizarreCake: jnthn.net/papers/2014-yapceu-performance.pdf
BizarreCake I had it compute the 30th fibonacci number, and I can't really say the results were spectacular.. 19:26
It's possible that I didn't compile it properly though
pmurias Ven: I have set up the github hooks a couple of times but I always forget the details 19:28
BizarreCake It takes 19 seconds to compute the 30th fibonacci number on Rakudo with a MoarVM backend. 19:29
pmurias with recursion? 19:30
BizarreCake Yes
pmurias numbers are bignums by default in perl6 19:32
BizarreCake oh
That explains it, I guess.
FROGGS time perl6 ../fib.p6 19:33
fib(30) = 832040
real0m7.951s
BizarreCake Hmm, that's still a lot
FROGGS time perl ../fib.pl 30 19:34
fib(30) = 832040
real0m0.726s
BizarreCake Ok 19:34
FROGGS time perl6 ../fib.p6
fib(30) = 832040
real0m3.821s
that's with native ints
BizarreCake Oh wait, the second one was done using Perl 5
In that case, that's still quite a lot.
pmurias FROGGS: could you nopaste your fib.p6, I would like to test it under nqp-js 19:35
FROGGS pmurias: 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.
FROGGS BizarreCake: 0.7 to 3.8 is not *that* bad
BizarreCake: look at jnthn's slides
spesh can already inline many things
heh, it allocates 1346268 Ints :o) 19:38
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.
instead of pushing the subroutine parameters directly onto the stack.
It's a needless allocation if the subroutine doesn't use the @_ array.
timotimo we don't do that 19:40
BizarreCake :o What's the workaround?
timotimo a subroutine only gets the @_ if you use it inside 19:41
per spec
m: sub test($a, $b) { say @_ }; test(1, 2)
camelia rakudo-moar c793d8: OUTPUT«===SORRY!=== Error while compiling /tmp/TEUtzjL6rU␤Placeholder variable '@_' cannot override existing signature␤at /tmp/TEUtzjL6rU:1␤------> sub test($a, $b) { say @_ }⏏; test(1, 2)␤ expecting any of:␤ …»
BizarreCake Hmm
timotimo m: sub test($a, $b) { say "hi" }; say &test.signature
camelia rakudo-moar c793d8: OUTPUT«:(Any $a, Any $b)␤»
timotimo m: sub test() { say @_ }; say &test.signature
camelia rakudo-moar c793d8: OUTPUT«===SORRY!=== Error while compiling /tmp/ra0Z43XD92␤Placeholder variable '@_' cannot override existing signature␤at /tmp/ra0Z43XD92:1␤------> sub test() { say @_ }⏏; say &test.signature␤ expecting any of:␤…»
timotimo m: sub test { say @_ }; say &test.signature
camelia rakudo-moar c793d8: OUTPUT«:(*@_)␤»
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
which makes thinks a bit more complicated
especially the 'shift' subroutine
FROGGS m: shift 19:43
camelia rakudo-moar c793d8: OUTPUT«===SORRY!=== 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␤----…»
BizarreCake :o!!
FROGGS BizarreCake: there is no bare shift
BizarreCake It was changed in Perl 6?
FROGGS yes
BizarreCake That's awesome
It is possible then.
BizarreCake My compiler can currently compute the 30th fibonacci number in around 0.495s 19:45
FROGGS time perl6 ../fib.p6
fib(30) = 832040
real0m1.467s
BizarreCake But if I can eliminate the @_ packaging, it could be a lot less
FROGGS updated: gist.github.com/FROGGS/cc3015b5c0a5ab67257c
pmurias: ^^
so fib(30) only takes twice the time of perl 5 19:46
pmurias does nqp support native sub arguments? 19:52
FROGGS what are native sub arguments? 19:53
pmurias sub foo(int $foo) {...} 19:54
after the compilation it took 0.126s
FROGGS time nqp-m ../fib.p6
fib(30) = 832040
real0m0.836s
pmurias: yes, nqp supports that 19:55
that's a parameter though
pmurias with compilation 0.410s
I'm still doing the cross compiling on parrot which is likely slowing me down 19:56
FROGGS yeah
you should switch, the early the better
pmurias could you gist the p5 version?
FROGGS github.com/parrot/parrot/blob/mast...rks/fib.pl 19:57
timotimo whatf's so expensive? 19:58
FROGGS timotimo: nqp-m is only .1s slower than P5
FROGGS (in case you are talking about fib) 19:59
pmurias so nqp-js is faster then p5 here on the fib example
FROGGS O.o
pmurias counting the compilation on parrot 20:00
FROGGS I'm not sure I believe that :o)
Ven his is in minutes :P
FROGGS *g*
lol
Ven now try with luajit :P
I bet those strict and warnings slow you down :P 20:01
.oO(( I should have .oO()'d these :P ))
pmurias Ven: "his is in minutes"?
Ven pmurias: I mean you're benchmarking in minutes instead of seconds
timotimo i think we ought to do a bit better at that 20:02
maybe 30 is just not enoug :P
well, doing fib via recursion is not a good idea anyway :D
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
FROGGS: if you don't belive me you can try for yourself ;)
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)
pmurias FROGGS: ok, I have time to make fib run even faster ;) 20:05
FROGGS bah 20:06
:P
pmurias switching from parrot to the moarvm seems the best way 20:07
FROGGS well, you can test your changes in a fraction of the time... that's always good 20:09
pmurias currently the compile time isn't that bad, but it's steadily getting slowe 20:13
* slower
Ven oh wow, just learned that haskell had half a million lines of code... back in 2011. 20:17
masak "haskell had"? what does that mean? 20:19
oh hai #perl6
FROGGS hi masak 20:20
Ven masak: errr, ghc.
masak ah.
Ven masak: sorry, I'm randomly talking about several languages again, and drowning a bit
masak heh :) 20:21
and ghc is written in...? C?
Ven C++, AFAIK
BizarreCake I think it's written in Haskell
Ven at least I think so, from some implementor guy's blog post I read
BizarreCake It's bootstrapped
masak BizarreCake: hi there. new? welcome.
BizarreCake haha thanks
Ven masak: backlog a bit, btw ;)
masak does 20:22
Ven www.aosabook.org/en/ghc.html 5.2 tells us.
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
masak BizarreCake: yes, please keep us posted about your progress. :)
geekosaur some bits of the runtime are written in C 20:25
masak BizarreCake: I suppose you're aware of the spectest suite?
cognome I thought haskell backend was using a C dialect, C--
BizarreCake They're my primary reference, yes.
masak ok, great.
BizarreCake: however far you get, it's *always* good to have parallel implementations.
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
cognome en.wikipedia.org/wiki/C--
BizarreCake :)
geekosaur (cmm is a fork of c--)
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.
BizarreCake Well, in time haha, I'm still learning Perl as I'm writing the compiler
BizarreCake Which is the main challenge for me, at the moment. 20:27
Before I implement a feature, I always need to make sure I understand it properly.
Which is why I sometimes wish the spec documents had more rigorous definitions in them.
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
BizarreCake Nope, I actually mean that
I'm learning both Perl and Perl 6 at the same time
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
BizarreCake: in here, "Perl" means "Perl 5 + Perl 6", kind of.
BizarreCake I'll be sure to, thanks :)
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 :(
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␤»
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)
camelia rakudo-moar c793d8: OUTPUT«354224848179261915075␤»
TimToady BizarreCake: ^^ 20:35
mind you, that's not how we'd do fib in P6 generally
BizarreCake It's cached, of course it'd run faster.
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]
camelia rakudo-moar c793d8: OUTPUT«354224848179261915075␤»
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
BizarreCake I'm benchmarking fib to try and measure how fast the bytecode instructions are executed. 20:38
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
I'm really bad with names though
masak BizarreCake: have you thought of a good name yet?
BizarreCake nope.. 20:40
Want to help? ;D
masak BizarreCake: I kind of have a history of naming Perl 6 compilers.
maybe I can help? :)
BizarreCake Be my guest haha
masak has named at least two
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).
masak BizarreCake: ok, so tell me about the salient features of your compiler.
BizarreCake uhh.. 20:41
Hmm, that's a difficult question for a compiler that doesn't really have a lot in it.
Ven masak: tel.github.io/2014/08/22/JSON_is_no..._notation/ codata! :P
BizarreCake I'm planning to use it in an HTTP server later on
and allow HTML files to have embedded <?perl6 ?> tags in them 20:42
Ven only <? please :P.
masak Ven: will read.
BizarreCake: ooh, that's an excellent idea. I've been meaning to look into a rakudo distribution that does that, too.
BizarreCake I can't really think of anything else haha 20:43
Ven (though people try to stay away from that :P)
masak BizarreCake: how about "arane" -- nice and short, Esperanto for spider (because you'll be using it for the web) 20:44
BizarreCake .. :o You're pretty good 20:45
masak easy to pronounce, unlike Niecza.
Ven Not sure how I knew it meant "spider" – I don't speak a single word of Esperanto.
BizarreCake I like it
masak Ven: but you're French.
Ven: araignée
Ven masak: yes? arachne makes me think about those too
masak oh yes, same root.
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
Should that work?
Ven oh, it's from greco-roman mythology, apparently: "arachne"
BizarreCake masak: I think it's settled then
Ven that's what I know, I guess
BizarreCake Arane it is :3
Ven BizarreCake: congrats on those legs ;)
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.
flussence kupopo: try compiling the pir to pbc and running that 20:47
Ven masak: how many (natural) langs do you know?
masak BizarreCake: there really should be an apostrophe in its place ("arane'"), but we can be liberal and skip that. :)
Ven: about seven.
Ven: but I only speak three of them well enough to brag about it.
BizarreCake I'll just add a section describing the etymology of the name haha
kupopo flussence: the compilation succeeds but I get the same error when I run the resulting binary
Ven masak: I only speak french and english enough to brag about it, so I'm kinda jealous now :P.
masak :)
Ven I can learn programming languages pretty easily, but I'm impressed with people speaking many natural languages 20:48
It's just, like, a different dimension in learning...
masak Ven: I'm not sure if you count Esperanto as "natural". if you don't, then I only speak two well.
Ven masak: why not?
masak I guess Esperanto is natural *enough* at this point...
it's certainly owned by its speaker community, at least. 20:49
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:50
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
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.
"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?
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
jnthn kupopo: As far as I know, you can pre-compile modules, but not individual scripts.
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:56
(or is that even possible?) 20:57
flussence get them to install niecza instead? */me ducks*
kupopo (and if not, what is pbc_to_exe for? 20:58
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... 20:59
who knows, maybe it works completely fine in one of those other languages parrot is designed for :) 21:00
masak 'night, #perl6 21:01
BizarreCake Cya
and thanks again :)
kupopo oh well... hopefully someone'll figure out how to do it someday. Thanks, all 21:02
flussence oh jeez, I've gotta be awake at *8:30* tomorrow to catch masak's talk? :) 21:04
pmurias kupopo: you will have to package up moarvm with your program 21:07
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
jnthn Not sure that became a tool though
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...)
dalek p-js: 263d8fc | (Pawel Murias)++ | src/vm/js/ (2 files):
Implement mul_i.

Polyfill Math.imul when it's not implemented by the javascript engine.
21:18
p-js: d4a8694 | (Pawel Murias)++ | src/vm/js/ (2 files):
Implement nqp::iterator.
Ven flussence: timezone :P ?
p-js: 5762520 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
The iterators are false in boolean context when they are no more values to iterate.
p-js: 02cd9eb | (Pawel Murias)++ | src/vm/js/ (3 files):
Implement for, pass test 15.
p-js: 8b69b80 | (Pawel Murias)++ | src/vm/js/ (3 files):
Pass tests 6 and 11.

Implement slurpy positional parameters, immediate blocks, and fix binding to and array element.
Ven pmurias++
rip dalek
flussence Ven: YAPC-0200, or thereabouts :) 21:22
Ven flussence: in absolute time if possible, this doesn't really help :P
flussence okay okay, UTC+1... 21:23
Ven map+(Fizz)[$_%3].(Buzz)[$_%5].(Bazz)[$_%7]||$_,1..100 <- FizzBuzzBazz in p5. Not sure p6 can beat that :P 21:29
tadzik whatwhat 21:32
Ven tadzik: exactly! 21:33
tadzik I die manage to bundle moarvm with my game, it was 2.2M xz'd 21:34
it also didn't work :) 21:35
s/die/did/
jnthn oh... 21:37
psch the p5 snippet isn't that complicated. (Fizz) is a list, [$_%3] indexes it at the $_ % 3 position 21:38
so for any case where in 1..100 $_ % 3 is not 0 it prints nothing 21:39
. is the concat operator
tadzik because it relied on some modules living in /home/tadzik
psch and ||$_ should be clear
tadzik no matter what the prefix was
Ven psch: I havn't said it's complicated :)
psch Ven: right, tadziks 'whatwhat' prompted my explanation 21:40
not sure if it was neccessary
as for "beating it", no idea if we can have it shorter in p6 21:41
psch tbh, why the + is needed in the p5 snippet is a bit beyond me 21:43
Ven it should do Nothing (TM)
psch because '(a)[0]' doesn't compile, while '+(a)[0]' does
Ven expression pos?
psch i think it's map magic 21:45
psch i.e. 'map+(A), 1..2' does the same as 'map {(A)}, 1..2' 21:46
psch Ven: depending on what 'pos' means in your last line this might be what you meant :) 21:47
Ven position. i.e. make perl "want" an expression instead of a statement 21:47
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:49
Ven oh, so I have to be up at 8AM like flussence to get masak's talk? 21:50
flussence: you're from germany or about, right? 21:51
flussence nope, uk :)
Ulti uk++
Ven oh, sorry
psch Ven++: that might be it. i'm not sure i (can|want to) figure out details right now 21:56
it's late and there's a talk to watch early tomorrow... :)
Ven is just wondering what time is it at sofia atm 22:10
jnthn 01:10 22:10
Ven so I need to be up by 9h30. 22:11