»ö« 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.
TimToady for the record, I'm fine with assign_pos and assign_key 00:21
though we might want to go a step further and have WHENCE-less lvalues that represent those, so we can pass lvalues to natives
(in addition to those ops, not instead of) 00:22
basically, we need some sort of GC-safe pointers to both scalar natives and composites of natives 00:24
then $native++ becomes trivial to implement 00:25
TimToady and if these pointers are themselves considered a native type, they could also be incremented easily to point to the next array entry (with bounds checking, presumably) 00:28
as in Go's array pointers
and there are a whole bunch of optimizations that come into play as soon as we know an array is of fixed size 00:30
beginner hello 00:41
what would you guys recommend the best way to learn perl is 00:42
TimToady Learning Perl is a pretty good book for that
BenGoldberg beginner, If you join #perl, you'll get lots more advice on how to learn perl than you will here. 00:52
The #perl6 channel is for discussing perl6, a programming language which has many similarities to perl(5), but which is most definitely not the same language.
jnthn morning, #perl6 06:55
moritz \o jnthn, #perl6, * 06:56
jnthn TimToady: Thanks; I'll look into an assign_pos/assign_key. Yes, I plotted the container spec stuff to let me do native things, and be able to convey it down to the VM. Just didn't get to implement it yet. 07:00
timotimo o/ 07:03
nwc10 good *, #perl6 07:21
lizmat nwc10 o/ from Zurich 07:22
nwc10 wonders what is happening in Zurich today 07:22
jnthn Mmmm...Zurich :)
nwc10 or are you there because even the XP Zombie apocalypse would think twice about invading Switzerland? 07:23
brrt hi lizmat
and nwc10
and all
lizmat Damian teaching Perl 6
nwc10 aha.
nwc10 naughty Australians with their naughty cricket team 07:23
jnthn Does naughty in this case mean, "beating England"? :P 07:24
nwc10 obviously. 07:25
more than once.
sergot morning o/ 07:51
moritz notices with horror that openssh depends on openssl 07:52
moritz LHF: git-bisect rakudo to find the commit that leads to t/spec/integration/99problems-21-to-30.t failing tests 11:31
retupmoca moritz: openssh doesn't use TLS from openssl, so it isn't affected 12:13
(assuming you're talking about heartbleed) 12:14
nwc10 moritz: is there a last known good revision? 12:17
(not, to be clear, I'm not proposing to take the task, but if that's know then it makes the L much Lower) 12:18
moritz nwc10, anybody: should be good 3699aaf672c47987168e33a02c2c31b3a4798232 (trust by verify!) 13:27
lizmat wonders why we haven't implemented "is cached" yet 13:33
is there a particular reason for that? Or is that LHF
?
colomon lizmat: the simple case is pretty easy to implement 13:34
hard cases are hard.
though do I remember correctly that you can have hashes with non-string keys now? 13:35
that would help a lot
lizmat yes, you can 13:36
Sets/Bags/Mixes depend on them
well, in their original implementation :-)
but the same trick could be used for "is cached", I would think
lizmat decides to ponder on this some more :-) 13:39
lizmat would like to have *all* of Damian's examples *actually work*(TM)
colomon lizmat: perl6advent.wordpress.com/author/fo...23/page/2/
Damian's examples wheree?
lizmat at the Perl 6 course he is giving right now in Zurich, Switzerland 13:40
colomon oh!
sweet!
colomon remembers the p6 team adding a feature for Damian during one of his lectures at YAPC::NA 2010 (I think that was the year) 13:41
is there more information on the course somewhere online?
Ven thinks scalar parameters would be the easiest case of `is cached` 13:42
lizmat damian.conway.org/Courses/ProgPerl6.html
Ven would like to see that course, too 13:42
actually, easiest to cache is 0-ary 13:43
colomon damian++
Ven multi sub trait_mod:<is>(pattern match on empty sig $r, $:cached!) { my $cache; $r.wrap(-> { $cache // callsame }); } 13:44
tadzik I read Rationalized as Randomized, getting Randomized syntax and semantics
Ven r: say reverse "foo" # is that still true 13:47
camelia rakudo-jvm da1ef6: OUTPUT«(timeout)»
..rakudo-parrot da1ef6, rakudo-moar da1ef6: OUTPUT«foo␤»
colomon m: say flip "foo" 13:49
camelia rakudo-moar da1ef6: OUTPUT«oof␤»
Ven is trying to get rakudo-js to compile ... 13:57
Ven ... but fails doing so ! 14:02
Ven what's that "js-blib" yer talking 'bout ! 14:13
raiph Ven: aiui the initial cut at *NQP* on js must be wrapped first 14:26
Ven raiph: (auiu ?) initial cut ? 14:27
raiph sorry, aiui = as i understand it, first cut = a sufficiently working version 14:28
Ven raiph: then last part (:p) : "wrapped" ? I get that if it's self-hosting, you have to compile something first -- I followed README's instructions tho 14:30
raiph Ven: heh, sorry about all those idioms; by "wrapped" I just meant done -- NQP on js isn't yet (sufficiently) done 14:33
Ven raiph: oh, okay. I guess it should be something to move to moar by now, too ? 14:43
from what i see, moar didn't exist then ?
Ven can't even build rakudo because of a "syntax error in tools/lib/nqp/configure.pm" 14:48
raiph Ven: have you previously successfully built rakudo on the same system? 14:54
Ven raiph: nope, never. Thought I'd try and help somehow somewhere :) 14:55
raiph Ven: what instructions are you following? (link?) 14:56
Ven commuting & (thanks for the help raiph !) 14:58
raiph \o later 14:59
retupmoca I wrote some documentation for my LibraryMake module - could I get someone to read over it and make sure it's understandable/includes everything needed? github.com/retupmoca/P6-LibraryMake 15:05
retupmoca If you were to come in asking "How do I bundle and use a .so file with my panda distribution?", I want that README to give you what you need 15:06
moritz retupmoca: looks good 15:14
timotimo retupmoca: do you have any clue how to make this cooperate with pre-existing makefiles? 15:17
awwaiid "retupmoc7" was my handle when I was a TI-85 hacker. Greetings retupmoca!
I pronounced mine with a klingon accent, personally.
(the 7 is slient)
retupmoca timotimo: you want to just run 'make' on panda install? 15:20
jnthn yays I teached all the thigns
and will have more Perl 6 time/energy the rest of the week :)
decommute &
timotimo retupmoca: well ... i guess? 15:21
what if my game has assets that would be compiled "from source" (xcf to png for example) when you get it from my repo
retupmoca timotimo: you can write your own Makefile.in in the src (or whatever) directory 15:22
timotimo oh nice :) 15:23
retupmoca timotimo: that's what that is - an example of a Makefile.in that you would write
timotimo aaaaah
i see that now
good hint
retupmoca I should probably add a line about how those are examples of what you would write in your project 15:24
timotimo my confusion only serves to make your documentation better :) 15:25
retupmoca indeed :)
timotimo retupmoca: the change to NativeCall hasn't entered the master branch yet? 15:43
lizmat dinner& 15:57
vendethiel "you just subscribed to 26 perl6 repositories" thanks moritz ! 15:58
timotimo yay \o/ 16:05
vendethiel raiph: so, basically, I was following the install.txt 16:41
which didn't work on my school comp, but seems to work here ?!
raiph vendethiel: rakudo build requires a "recent" perl5; I'm guessing your school comp has a very old perl5 16:43
timotimo hehe. "recent" :) 16:43
from only shortly after i was born
geekosaur in particular, rhel / centos / scientific linux has perl 5.10 and there's a whole lot of stuff that doesn't work with it 16:44
(rhel is fairly common in .edu)
moritz vendethiel: you're welcome. As a policy, I tend to give everybody a commit bit to the p6 repos who had a pull request accepted 16:45
colomon moritz++ 16:45
moritz (or even asks nicely)
timotimo isn't 5.10 enough for rakudo's build scripts? 16:49
vendethiel raiph: it has perl 5.8.8, which is what the install.txt recommends 16:53
gmake-installdev completly blows up tho
and I can't seem to redirect stderr to stdout... 16:55
I guess 2>&1 doesn't work on windows uh ...
moritz: yeah, I guessed so :) 16:56
geekosaur you'd need a unixy shell, not cmd.exe, certainly 16:57
hm, actually it looks like cmd.exe *should* support that syntax 16:58
vendethiel yeah, I remember it working. 16:58
geekosaur (I know they added a subset of unix fd redirection over just >file type stuff, but didn't know that part was there) 16:59
vendethiel I get tons and tons of errors, but at the beginning I've got "Warning: Building a shared parrot library may conflict with your previously-installed C:\rakudo\bin\libparrot.dll" which very well might be the error
geekosaur I think that's known, yes, if you have an installed version then building a new one is problematic 17:00
vendethiel removed it, still getting 18k lines of errors. Whew. 17:03
raiph "Remove unneeded repos from github/perl6" 17:21
questhub.io/realm/perl/quest/53457...d24e00006d
comments (or acting on them) appreciated 17:22
vendethiel raiph: seems like those github/ should be github.com/ ?
timotimo yeah 17:23
raiph fixed
timotimo i don't think simple-tests has any useful bits, it's almost completely devoid of content 17:26
retupmoca timotimo: jnthn wanted to do the NativeCall change in a different way 17:31
timotimo OK 17:32
retupmoca and that other way is not yet written
retupmoca raiph: I know moritz is the one who forked Perl6-MIME-Base64 into perl6 org 17:37
back when I first started working on it
jnthn Hmm, no dalek 17:38
timotimo Optimize Hash.at_key and Hash.bind_key. 17:42
Gives a 14% saving on while_hash_set benchmark.
jnthn authored 5 minutes ago
raiph rurban: I'm spring cleaning github.com/perl6; thoughts about moving /nqp-rx?
Ven, timotimo, retupmoca: thx 17:43
timotimo nqp-rx ... isn't that replicated under parrot/? 17:44
timotimo at least i seem to recall it's now a closely-tied-to-parrot project 17:44
jnthn timotimo: you forgot the jnthn++ :P 17:45
timotimo jnthn++ 17:47
14%? i was hoping for something more like 14x! :P
jnthn timotimo: oh, that isn't the assign_key change :)
timotimo oh, it is not? 17:48
great! :)
timotimo is no longer disappointed
jnthn No, that's just some opts I spotted on the existing code path, which will make every hash access faster
timotimo anything spesh can do to make hash access even faster still? 17:49
jnthn Well, once multispec is done, probably yes :) 17:50
And later there'll be inlining too of course.
timotimo inlining will do all kinds of magical things 17:54
at least in my hopes & dreams 17:55
vendethiel -- Perl6 is getting fast :) 17:56
timotimo almost 17:57
not yet for this month's release anyway
vendethiel in the grand scheme of things 18:00
vendethiel -- according to keikaku
timotimo keikaku? 18:01
vendethiel plan 18:02
"according to keikaku" is an internet phrase though
timotimo ah, ok
jnthn hehe :) 18:03
jnthn I pushed adding assign_key and switching to it 20:04
No regressions that I can see :)
jnthn Really need to get multispec done; things were a good bit faster before I made assign_key a multi. 20:05
timotimo whoa. 20:07
vendethiel kinda wants to see how much % improvement that is 20:09
jnthn Hopefully quite a bit :)
jnthn Pushed a few more opts :) 20:31
Detrain &
colomon hmmm, stage parse was slower this time than earlier today. only by 1 second, but still…. ;) 20:39
timotimo with the very latest commits, there's a bit more code in there now 20:42
jnthn colomon: I've had variance of around a second in parse times on my laptop over the last day or so 20:49
colomon: Without much correlation to what I was changing.
colomon probably depends as much on what else my machine was running as anything. I was mostly just razzing you. 20:50
you keep on coming up with optimizations faster than I get a chance to try them.
timotimo m: say :16(ord("!")) 21:18
camelia rakudo-moar 541f9f: OUTPUT«Type check failed in binding $str; expected 'Str' but got 'Int'␤ in sub unbase at src/gen/m-CORE.setting:6774␤ in block at /tmp/PpN_lFOrAo:1␤␤»
timotimo oops, wrong way around
timotimo m: say ord("!").base(16) # like this? 21:18
camelia rakudo-moar 541f9f: OUTPUT«21␤»
timotimo m: say ord("!").base(2) # like this?
camelia rakudo-moar 541f9f: OUTPUT«100001␤»
timotimo m: say ord("+").base(2) 21:19
camelia rakudo-moar 541f9f: OUTPUT«101011␤»
jnthn Nice; spectest is a good bit faster on my machine at home than when I left on Sunday :) 21:21
timotimo \o/ 21:22
jnthn 290s instead of 314s.
timotimo oh wow 21:27
jnthn Yes, happy to have it back under 300s :) 21:30
segomos r: class a { method b { say self.b:defined; } }; my $d = a.new; say $d.b; 21:56
camelia rakudo-jvm 986916, rakudo-moar 986916: OUTPUT«(timeout)»
..rakudo-parrot 986916: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 143557 (src/gen/p-CORE.setting.pir:60951) (gen/parrot/CORE.setting:11212)␤called from Sub 'b' pc 167 ((file unknown):109) (/tmp/tmpfile:1)␤called from Sub 'b' pc 189 ((file unkno…»
timotimo huh?
segomos just wanted to see how it reacted.. 21:57
timotimo how is that :defined supposed to apply?
segomos r: class a { method b { say self.b.perl.say; } }; my $d = a.new; say $d.b;
camelia rakudo-moar 986916: OUTPUT«(timeout)» 21:58
..rakudo-jvm 986916: OUTPUT«java.lang.StackOverflowError␤␤»
..rakudo-parrot 986916: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 143557 (src/gen/p-CORE.setting.pir:60951) (gen/parrot/CORE.setting:11212)␤called from Sub 'b' pc 167 ((file unknown):109) (/tmp/tmpfile:1)␤called from Sub 'b' pc 189 ((file unkno…»
jnthn I suspect it ignores it and then just recurses forever :)
segomos timotimo: it's not, it should be the self.can or any one of the introspective functions, just curious how the engines other than moar are handling it
timotimo oh?
jnthn moar doesn't presently enforce a recursion limit 21:59
timotimo is that specced? that :defined would cause that behavior? 21:59
jnthn doesn't remember seeing it ever :)
segomos i don't think so
jnthn It'll be parsed due to longname, as a colonpair as part of the name, iirc. 22:00
timotimo mhm
jnthn Hm. I wonder why / ... { ... } ... / uses contextual scope to set up $/ 22:01
(for the block invocation)
segomos timotimo: just me screwing around - 22:02
timotimo is reading "php: a fractal of bad design" again
~_~
i had forgotten how many things there were in that
timotimo tortoisewrath.com/wat.htm#2000 - this is impressive 22:16
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...ml?id=2000
lizmat seems that dd1f4fad6b1929dba005042cc3fd330d30f53526 is the one breaking t/spec/integration/99problems-21-to-30.t 22:20
jnthn lizmat: Hmmm...very weird. 22:22
lizmat: If you've time/motivation, a golf would be very appreciated.
lizmat working on that 22:25
taking out this candidate:
#multi map(&code, @values) { @values.map(&code) }
fixes the tests
first failing test uses map, the second grep 22:26
jnthn HHmmm
lizmat since grep is implemented in terms of map, I though I'd first try that
jnthn What's the type of @values here?
lizmat } else { 22:27
(map { [@xs[0],$_.list] },combination($n-1,@xs[1..*])), combination($n,@xs[1..*])
}
lizmat the failing tests all use the non slurpy variant 22:32
not ok 12 - combinations work.
# got: '1 2 5 1 3 5 1 4 5 2 3 5 2 4 5 3 4 5'
# expected: '1 2 3 1 2 4 1 2 5 1 3 4 1 3 5 1 4 5 2 3 4 2 3 5 2 4 5 3 4 5'
not ok 13 - group works 22:33
# got: ''
# expected: '1 2 3 1 2 4 1 3 2 1 3 4 1 4 2 1 4 3 2 3 1 2 3 4 2 4 1 2 4 3 3 4 1 3 4 2
jnthn Yeah, I mean what would @values.WHAT be? 22:35
(e.g. what does combination return)
oh, hang on...how can that one there call the @values candidate? There are two args to map after the closure... 22:36
lizmat not sure 22:38
jnthn o.O 22:39
Weird
lizmat the elements are arrays 22:53
lizmat hmmm... seems we lost dalek: just committed a patch removing the non-slurpy candidate for map for now 23:01
lizmat starting to lose coherency, so gnight #perl6! 23:03
timotimo who can fix dalek? 23:04
timotimo m: say :16<34> 23:23
camelia rakudo-moar 986916: OUTPUT«52␤»
lue
.oO(say :16<➂➃>)
23:54