»ö« 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.
[Coke] masak: is there a way to use macros to conditionally add an attribute to a class? 00:03
timotimo I would use the MOP for that, honestly :( 00:04
masak same.
masak [Coke]: it would be easier to discuss around a piece of code, I think. 00:04
[Coke] then I'll just reply to the list and you can take it from there. :)
(someone on p6-u went private on a thread, I just noticed) 00:05
timotimo happens to the best of us :)
jnthn 'night, folks 00:11
diakopter 'nite J
timotimo good night, jnthn!
[Coke] ~~ 00:12
jnthn Will be mostly offline for weekend; back home and with Perl 6 tuits on Monday :)
o/
[Coke] jnthn++
japhb_ [Coke]: What's the r-m % currently? 00:20
raydiak and does it crunch numbers faster than JVM? :) 00:21
japhb_ raydiak, For native types in heavy loops, I'd be surprised if it did -- the JVM jit is really good at that. 00:22
raydiak I won't hold my breath, then...but not using native types
japhb_ And Moar doesn't have a jit yet. It needs to be working fully correctly before we start turning broken code into ASM ops. ;-) 00:23
OK, then my #1 optimization tip will probably be: "native types in arrays, not HLL types in hashes"
timotimo i was thinking maybe we could get a specialized low-level hash for strings going? 00:24
as in string keys to string values
raydiak when I tried to use native types a couple months ago, I ran into NYI roadblocks
japhb_ timotimo: What's the use case for specializing just that particular mapping? 00:25
timotimo our native type arrays are, i believe, not thoroughly awesome yet
japhb_: not that sure
we may have some of those internally
perhaps it makes more sense to specialize just string keys
and make trie-like structures or red-black-trees with those
japhb_ BTW, did all the known bugs of Rakudo pre-allocating very large arrays get fixed? 00:26
timotimo i don't think i know about those? 00:27
raydiak r: my int $a = 1; my int $b = 2; say ($a+$b).perl;
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«3␤»
timotimo there was a fix to the for iterator to not create huge arrays all the time
japhb_ The 100_000 length array one was the first example I remember.
But then there was discussion of reducing the default size of hashes to 4 (or 8?) entries too, and some other such that I forget the details of. 00:28
There's something for your GC torture, nwc10: Check how many words (or even bytes) in fromspace are 0. That would give us a rough idea of how much we're overallocating for our actual usage. 00:30
That plus a histogram of allocation request sizes would go a long way.
Hmmm, IIRC MoarVM's GC is type-exact -- so we can actually have a histogram of allocated structures as well. 00:31
[Coke] still waiting for today's jvm run to finish, japhb_ 00:34
JVM is at S32-str/ords.t 00:35
japhb_ [Coke], Ah OK, gotcha. Thought my question just got lost in the chaos. :-)
timotimo hm. actually, we could build a python plugin to gdb to create the histogram 00:40
timotimo hm. actually ... 01:05
timotimo rakudo.moarvm may take much longer for stage mast than rakudo.parrot does for stage post/pir, but after that follows a compilation process to .pbc that takes quite a while, too 01:05
so it may not even be terribly surprising that moar takes so long for that part
timotimo hm 01:11
what is the meaning of ; inside call parens? 01:12
r: sub da(*@a, *%b) { say @a; say %b }; da(1, 2, 3; 4, 5, 6); da(:foo(1), :bar(2); :a<b>, :c<d>);
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«1 2 3 4 5 6␤().hash␤␤().hash␤»
timotimo r: sub da(*@a, *%b) { say @a; say %b }; da(1, 2, 3; 4, 5, 6); da(:foo(1), :bar(2), :a<b>, :c<d>);
camelia rakudo-parrot e32249: OUTPUT«1 2 3 4 5 6␤().hash␤␤("foo" => 1, "bar" => 2, "a" => "b", "c" => "d").hash␤»
..rakudo-jvm e32249: OUTPUT«1 2 3 4 5 6␤().hash␤␤("c" => "d", "a" => "b", "foo" => 1, "bar" => 2).hash␤»
timotimo huh!
is that a bug? that it doesn't pass any nameds in the second run if there's a ; in there? 01:13
thundergnat r: my @n = <John Doe Dick Harry Harry Doe Doe Harry Doe John>; say @n.Bag.invert.sort.reverse».value; 01:17
preflex thundergnat: you have 1 new message. '/msg preflex messages' to read it.
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«Doe Harry John Dick␤»
thundergnat ^^ xfix (or GlitchMr ) 01:18
timotimo oh, that's cool! :) 01:20
thundergnat++
japhb raydiak: There's a syntax error in lib/Pray/Geometry/Object.pm6 on line 197 in the version you pushed: 'is copy' shouldn't be used for a call (as opposed to declaration). I'm assuming you have that fixed locally and forgot to push it? :-) 01:24
timotimo i'm beginning to think that a whitelisting compiler that makes sure that no harmful code is executed would be a good thing to have included in rakudo itself 01:26
to allow things like safely checking the syntax of code, for example
dalek rl6-roast-data: 74f6ae9 | coke++ | / (5 files):
today (automated commit)
01:35
[Coke] +rakudo.moar,2014-01-04,73.33%,14e7659,20866,7437,392,966,29162,28494,
timotimo \o/ 01:36
[Coke] (I didn't bother re-running it. we're already a few more past that for tomorrow's run)
colomon moar's up to 73% already?!?!!!
[Coke] colomon: niecza's at 75.00 . :( 01:38
timotimo :\
grondilu is impressed by the 73% :) 01:40
colomon also
timotimo timo@kischde ~/build/rakudo (git)-[nom] % ./perl6-p -e 'sub output_args(*%a) { say %a }; output_args(:foo(1):bar(2):baz<abc>,:a(1):b(2):c(3))' 02:05
("foo" => 1, "a" => 1, "baz" => "abc", "b" => 2, "c" => 3).hash
r: sub output_args(*%a) { say %a }; output_args(:foo(1):bar(2):baz<abc>,:a(1):b(2):c(3))
camelia rakudo-parrot e32249: OUTPUT«("foo" => 1, "a" => 1).hash␤»
..rakudo-jvm e32249: OUTPUT«("a" => 1, "foo" => 1).hash␤»
raydiak japhb: I've no idea where that came from, but thank you! fix pushed 02:16
oh, now I see: that's apparenty something I *never* tested, as indicated by the comment above that method :P 02:17
BenGoldberg r: say "Happy "~'ߞ'.ord 03:03
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«Happy 2014␤»
Quom So, I've never been able to compile Rakudo on MoarVM. I get the error: Undefined symbols for architecture x86_64:␤ "_MVM_6model_add_container_config", referenced from:␤ _Rakudo_containers_setup in container.o… 03:07
on Mac OS X 10.9.1, nqp passes all spectests 03:08
*nqp-m
BenGoldberg I think I might have missed part of the discussion... are you cross-compiling Rakudo, with MoarVM as the target, or (if you've already cross-compiled) trying to bootstrap using the Rakudo that you've already built on M? 03:10
Quom ....
BenGoldberg Or am I just confused? 03:11
Quom I don't know.
[Coke] BenGoldberg: rakudo-moar is working for most people. no cross compiling.
BenGoldberg Oh, ok :)
BenGoldberg was confused ;) 03:12
Quom I got the error using my usual seperate directories `make install`ing everything to /usr/local, and eventually tried making a new rakudo directory in a different location and simply `--gen-moar`ing 03:13
s:3st/e/a/
[Coke] Quom: are you using hte moar-support branch? 03:14
Quom yes
[Coke] (of rakudo)
Quom yup
[Coke] with --gen-nqp=master and --gen-moar=master --backends=moar ? 03:15
Quom I can try that
[Coke] otherwise you might be settling for an older version of nqp/master - we're not quite there with making sure we have the right deps. 03:16
Quom I simply used `perl Configure.pl --backends=moar --gen-moar` the last time I tried
[Coke] er, of nqp/moar
Quom okay, but it wasn't working using sister directories for each of the projects that were all updated to lastest commit whenever I would try 03:17
[Coke] ah. 03:18
then probably a real bug.
Quom Hm. I'll file an issue if this isn't something that's been come across before 03:19
Mouq do I... 03:22
is this a MoarVM bug?
newbie_Perl6 NOW in Perl 6, <alpha> is <[a..z A..Z _]>, [S05]line2025, If I dislike it ( I want <alpha> is just <[a..z A..Z]>), what can I do? 03:28
Mouq just use <[a..zA..Z]>? 03:29
or define a token alpha { <[a..zA..Z]>+ }
lue r: say "_" ~~ /<alpha>/; say "_" ~~ /<alpha-[_]>/ 03:30
camelia rakudo-jvm e32249: OUTPUT«===SORRY!=== Error while compiling /tmp/FVaH62fuNq␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/FVaH62fuNq:1␤------> say "_" ~~ /<alpha>/; say "_" ~~ /<alpha⏏-[_]>/␤ e…»
..rakudo-parrot e32249: OUTPUT«===SORRY!=== Error while compiling /tmp/VwpdjUiXIs␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/VwpdjUiXIs:1␤------> say "_" ~~ /<alpha>/; say "_" ~~ /<alpha⏏-[_]>/␤ …»
Mouq newbie_Perl6: what are you using <alpha> for?
r: say "_" ~~ /<alpha>/; say "_" ~~ /<+alpha-[_]>/
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«「_」␤ alpha => 「_」␤␤Nil␤»
Mouq \o/ 03:31
I really don't know where to make this issue. I think I'll just wait until someone who can shed some light on it comes on. 03:34
newbie_Perl6 Please look at [S05]line2139,line2384, and many others
I think there are sometime, in Perl 6, <alpha> is just <[a..z A..Z]> 03:36
Mouq S05:2139 #I'm lazy 03:37
synopsebot Link: perlcabal.org/syn/S05.html#line_2139
Mouq newbie_Perl6: I see what you mean, the spec isn't self consistent. it seems to be saying that it is <[a..zA..Z]> 03:38
newbie_Perl6 yes
lue newbie_Perl6: <alpha> is supposed to include _ . Code examples trying [<alpha>|\_] are being redundant :)
Mouq I misunderstood what you meant, I think
lue oh wait, not \_, just _ 03:39
Mouq lue: yeah, because _ matches <alpha> :D 03:40
Mouq & 03:40
newbie_Perl6 <lue>, i know that 03:41
traditionally, [[:alpha:]] is [a-zA-Z] 03:44
My english is bad, I can't express myself, sorry. 03:45
thank you, Mouq and lue! 03:49
lue you're welcome :)
dalek ecs: ec84459 | lue++ | S05-regex.pod:
[S05] Fix redundant [<alpha>|_] examples.

In addition to being redundant, they carry the unfortunate implication that <alpha> does not match underscore, which it in fact does. The underscore has been replaced with \- (match a hyphen) in these situations. newbie_Perl6++ for noticing.
03:54
Mouq r: say moose* ~~ 'mooseee' #I think I may have broken this during sigspace stuff 04:03
camelia rakudo-parrot e32249: OUTPUT«===SORRY!=== Error while compiling /tmp/lkVLi1rUny␤Undeclared routine:␤ moose used at line 1. Did you mean '&close'?␤␤»
..rakudo-jvm e32249: OUTPUT«===SORRY!=== Error while compiling /tmp/pAfOoNeNTr␤Undeclared routine:␤ moose used at line 1. Did you mean '&close'?␤␤»
Mouq oops
r: say 'mooseee' ~~ /moose*/ 04:04
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«「mooseee」␤␤»
Mouq oh! nope! *whew*
dalek ecs: c358c19 | lue++ | S05-regex.pod:
[S05] Remove redundant word
05:30
diakopter winter-- weather-- 06:54
[Coke] -6.7ºF here. 06:58
[Coke] writes a new script for processing the moar file to more handily segregate files by error condition. 06:59
masak r: sub to-celsius($fahrenheit) { return my $celsius = ($fahrenheit - 32) * 5/9 }; say "{to-celsius($fahrenheit)}ºC here." 08:34
camelia rakudo-parrot e32249: OUTPUT«===SORRY!=== Error while compiling /tmp/sjdYLBxt0d␤Variable '$fahrenheit' is not declared␤at /tmp/sjdYLBxt0d:1␤------> 2) * 5/9 }; say "{to-celsius($fahrenheit⏏)}ºC here."␤ expecting any of:␤ po…»
..rakudo-jvm e32249: OUTPUT«===SORRY!=== Error while compiling /tmp/g0mgKMIVeK␤Variable '$fahrenheit' is not declared␤at /tmp/g0mgKMIVeK:1␤------> 2) * 5/9 }; say "{to-celsius($fahrenheit⏏)}ºC here."␤ expecting any of:␤ postf…»
masak r: sub to-celsius($fahrenheit) { return my $celsius = ($fahrenheit - 32) * 5/9 }; say "{to-celsius(-6.7)}ºC here."
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«-21.5ºC here.␤»
masak wow.
moritz that is quite some temperature. 08:53
FROGGS Unexpected closing bracket at t/spec/op/attrs.v5:303 ------> FY_CODE_ATTRIBUTES { $proto = $_[1]; _: ⏏} 09:32
what is that even? (note the .v5) 09:33
moritz has never heard of a t/spec/op 09:34
masak r: macro m($code) { quasi { {{{$code}}} } }; class A { m(has $.x is rw) }; say A.new(:x('OH HAI')).x
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«OH HAI␤»
moritz FROGGS: some untracked files in your roast?
masak replies to the p6u email 09:34
FROGGS moritz: no no, that is a test file in v5 09:36
I just wander what _: should be in Perl 5... a label?
moritz I think so 09:38
masak gee, it feels good to have a slightly advanced macro actually *work* :P 09:39
masak r: my %h; macro attr($key, $val) { quasi { %h{ {{{$key}}} } = {{{$val}}} } }; attr("x", "OH HAI"); say %h<x> 09:46
camelia rakudo-jvm e32249: OUTPUT«java.lang.ArrayIndexOutOfBoundsException: 7␤␤»
..rakudo-parrot e32249: OUTPUT«(Any)␤»
masak huh!
r: my %h; macro attr($key, $val) { quasi { %h{ {{{$key}}} } = {{{$val}}} } }; attr("x", "OH HAI"); BEGIN { say %h<x> }
camelia rakudo-jvm e32249: OUTPUT«(Any)␤java.lang.ArrayIndexOutOfBoundsException␤␤»
..rakudo-parrot e32249: OUTPUT«(Any)␤»
masak bleh.
anyway, I think I know what's going on.
the assignment happens to a %h in the static lexpad. 09:48
not sure how to get at that %h to show it, though.
oh, hold on.
r: my %h; macro attr($key, $val) { quasi { %h{ {{{$key}}} } = {{{$val}}} } }; macro diag { quasi { say %h<x> } }; attr("x", "OH HAI"); diag; 09:49
camelia rakudo-jvm e32249: OUTPUT«java.lang.ArrayIndexOutOfBoundsException␤␤»
..rakudo-parrot e32249: OUTPUT«OH HAI␤»
masak there we go.
to be perfectly honest, I'm not even 100% sure this behavior is *wrong*.
(because the runtime %h doesn't exist by the point the macro is invoked) 09:50
it's closure semantics, basically.
masak submits rakudobug about %h being the static one, Justin Case
masak submits rakudobug about Rakudo JVM AIOOBE-ing 09:51
masak j: say "do you java.lang.ArrayIndexOutOfBoundsException on everything?" 09:54
camelia rakudo-jvm e32249: OUTPUT«do you java.lang.ArrayIndexOutOfBoundsException on everything?␤»
masak j: macro m {}; say "alive" 09:55
camelia rakudo-jvm e32249: OUTPUT«alive␤»
masak j: macro m { quasi {} }; say "alive"
camelia rakudo-jvm e32249: OUTPUT«alive␤»
masak j: macro m($c) { quasi {} }; say "alive" 09:55
camelia rakudo-jvm e32249: OUTPUT«alive␤»
masak j: macro m($c) { quasi { {{{$c}}} } }; say "alive"
camelia rakudo-jvm e32249: OUTPUT«alive␤» 09:55
masak j: macro m($c) { quasi { {{{$c}}} } }; say m "alive"
camelia rakudo-jvm e32249: OUTPUT«Cannot call 'match'; none of these signatures match:␤:(Cool:D : $target, *%adverbs)␤ in any at gen/jvm/BOOTSTRAP.nqp:1201␤␤»
masak eh. huh.
oh. m
j: macro id($c) { quasi { {{{$c}}} } }; say id "alive" 09:56
camelia rakudo-jvm e32249: OUTPUT«alive␤»
masak j: my %h; macro st($c) { quasi { %h<foo> = {{{$c}}} } }; say st "alive"
camelia rakudo-jvm e32249: OUTPUT«java.lang.ArrayIndexOutOfBoundsException␤␤»
masak ok, it's the %h
masak j: my $v; macro st($c) { quasi { $v = {{{$c}}} } }; say st "alive" 09:58
camelia rakudo-jvm e32249: OUTPUT«java.lang.ArrayIndexOutOfBoundsException␤␤»
masak or any variable, for that matter.
masak probably some OUTER not set up correctly. 09:58
masak hehe, lizmat++ added "HN'd" into the glossary :) 10:16
feels like there's a point where things aren't lexicalized, but just derived using a productive rule... 10:17
masak ("ack'd", "action'd", "adverb'd", "afk'd", "Any'd", "API'd", "Apocalypse'd", "AST'd", "attribute'd", "auth'd", "autopun'd", "backlog'd"...) 10:21
FROGGS .oO( masakbot'd ) 10:22
masak :P'd
& 10:30
moritz masak: on reading your blog post, I'm wonder if maybe the initial value for a run-time variable should be taken from the static variable 11:25
though that might lead to all kinds of over-sharing issues
masak moritz: hm. 13:30
moritz: did you mean 'on reading your email', or did you actually go back to an old blog post -- if so, which one? :) 13:31
FROGGS yeah, I was hoping that you've blogged :o) 13:34
masak I might still do that. 13:36
in fact...
masak starts writing something
FROGGS \o/
++masak 13:37
masak p: my $x; role R { method foo { say $x } }; class C does R {}; $x = "OH HAI"; C.new.foo 13:38
camelia rakudo-parrot e32249: OUTPUT«OH HAI␤»
masak this situation is very close to the one finanalyst found with macros. 13:39
but unlike it, it Does The Right Thing (from the user's perspective).
let's step through it in slow motion:
1. Role R is created. As part of that, R.foo gets an OUTER chain. Pointing to the static mainline, because that's all that exists at that point. so $x is the static version. 13:40
2. Class C composes in R. $x in .foo is still bound wrongly.
3. Program runtime begins.
4. <MAGIC HAPPENS> 13:41
5. The (live/runtime) $x is assigned "OH HAI"
6. C.new.foo is called, and somehow it gets ahold of the *live* $x
kinda similar, right? 13:42
roles have a step 4, and macros (currently) don't.
masak moritz: come to think of it, I think that's a saner solution than "take the initial value from the static variable". 13:44
masak I *think* github.com/rakudo/rakudo/blob/nom/....nqp#L1878 is setting up for step 4 in Rakudo. 13:46
timotimo o/ 13:48
masak \o 13:50
FROGGS -o 13:51
timotimo is going to be responsible for many changelog entries for rakudo this month :3 13:54
FROGGS O.o 13:56
what are you up to? 13:57
timotimo well, i'm already responsible for 2 entries out of 5 this month
and i'm about to make rakudo parse chains of adverbs in arglists properly
FROGGS bah, I just make something up and add it :P 13:58
moritz masak: yes, I meant email, not blog
FROGGS timotimo: cool! you mentioned it last night I think
timotimo is always happy when there's a big changelog 13:59
FROGGS ohh yeah :o)
I'd like to add "implemented loop labels"
masak oh, so I'm the release man this month :) 14:00
next month is vacant -- who wants to do it? 14:01
timotimo masak: i think i ought to do one by now
masak oh yes. 14:05
timotimo this is for rakudo, not star. right?
masak right. 14:07
timotimo i'm even well prepared for being a releaser as my keyboard has the ✔✘ symbols on it 14:09
(shift and numpad-7 and numpad-8)
as well as ♦♥♠♣ :)
dalek kudo/nom: d773e28 | masak++ | docs/release_guide.pod:
volunteer timotimo++ for Feb release
14:13
masak there. it is done.
timotimo good :)
moritz masak++ timotimo++ 14:15
masak r: my $x; BEGIN $x = 42; say $x
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«42␤»
masak why does this one not print '(Any)'? 14:16
timotimo "Currently Star is on a monthly release cycle; we expect to slow down to quarterly releases again sometime in 2013."
i don't see a list of volunteers for future star releases in star/tools/star/release-guide.pod :\ 14:17
tadzik if you put me there, I won't unput myself :) 14:18
unless it's tomorrow
timotimo it doesn't seem to even have a section, that's what i meant
nah, not that soon
it's still about 2 weeks until the rakudo release itself
masak r: our &bar; sub foo { my $x; our sub bar { say $x } }; bar 14:19
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«(Any)␤»
masak is there a way to write the above without the 'our &bar;' ?
dalek ar: 2d7332c | moritz++ | tools/star/release-guide.pod:
sign up tadzik++ for the January Star release
masak moritz++ tadzik++ 14:20
timotimo ah, that's what it looks like
moritz r: sub foo { my $x; our sub bar { say $x }; OUR::bar() 14:20
camelia rakudo-jvm e32249: OUTPUT«===SORRY!=== Error while compiling /tmp/ikCH3RfAPe␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/ikCH3RfAPe:1␤------> y $x; our sub bar { say $x }; OUR::bar()⏏<EOL>␤ expecting any of:…»
..rakudo-parrot e32249: OUTPUT«===SORRY!=== Error while compiling /tmp/vz4x8q1Obd␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/vz4x8q1Obd:1␤------> y $x; our sub bar { say $x }; OUR::bar()⏏<EOL>␤ expecting any …»
moritz r: sub foo { my $x; our sub bar { say $x } }; OUR::bar()
camelia rakudo-jvm e32249: OUTPUT«No such method 'Any' for invocant of type 'Parcel'␤ in any at gen/jvm/BOOTSTRAP.nqp:1658␤␤»
..rakudo-parrot e32249: OUTPUT«No such method 'Any' for invocant of type 'Parcel'␤ in any at gen/parrot/BOOTSTRAP.nqp:1680␤ in any at gen/parrot/BOOTSTRAP.nqp:1674␤ in any at gen/parrot/BOOTSTRAP.nqp:1669␤ in block at /tmp/n49D1ccP3q:1␤␤»
masak :/
moritz p: sub foo { my $x = 42; our sub bar { say $x } }; OUR::bar() 14:21
camelia rakudo-parrot e32249: OUTPUT«No such method 'Any' for invocant of type 'Parcel'␤ in any at gen/parrot/BOOTSTRAP.nqp:1680␤ in any at gen/parrot/BOOTSTRAP.nqp:1674␤ in any at gen/parrot/BOOTSTRAP.nqp:1669␤ in block at /tmp/Vw99OAilw5:1␤␤»
moritz p: sub foo { my $x = 42; our sub bar { say $x } }; &OUR::bar()
camelia rakudo-parrot e32249: OUTPUT«(Any)␤»
moritz p: say &OUR::bar()
camelia rakudo-parrot e32249: OUTPUT«No such method 'Any' for invocant of type 'Parcel'␤ in any at gen/parrot/BOOTSTRAP.nqp:1680␤ in any at gen/parrot/BOOTSTRAP.nqp:1674␤ in any at gen/parrot/BOOTSTRAP.nqp:1669␤ in block at /tmp/71H0ckjqc1:1␤␤»
masak p: class C { method foo { my $x = 42; method bar { say $x } } }; C.bar
camelia rakudo-parrot e32249: OUTPUT«(Any)␤»
moritz anyway, that error mesage is LTA
masak Yo dawg, I heard you like methods. 14:22
moritz p: module Bla; sub foo { my $x = 42; our sub bar { say $x } }; Bla::bar()
camelia rakudo-parrot e32249: OUTPUT«(Any)␤»
timotimo spectests his changes for adverbs
masak submits LTA error message
timotimo i'll probably have to build a few more tests, though
timotimo t/spec/S03-operators/adverbial-modifiers.rakudo.parrot .......... Dubious, test returned 1 (wstat 256, 0x100) 14:24
Failed 18/42 subtests (4 TODO tests unexpectedly succeeded)
that's good *and* bad :)
arnsholt Well, if the 4 passing TODOs are the things you wanted to implement, it's mostly good I suppose 14:28
Now you just (FSVO of just) have to figure out why the other tests fail =)
timotimo wow, so many failures :( 14:29
moritz "it's just array and hash indexing, what could go wrong?" 14:30
masak p: sub fac($N) { $N ?? fac($N - 1) * $N !! 1 }; say fac 6
camelia rakudo-parrot e32249: OUTPUT«720␤»
timotimo my approach to the problem may be wrong 14:36
masak r: for 1..3 -> $n { role R { method foo { say $n } } }; class C does R {}; C.new.foo 14:39
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«3␤»
masak I see. interesting. 14:40
r: role R { method foo {}; R.foo } 14:46
camelia rakudo-parrot e32249: OUTPUT«(timeout)»
..rakudo-jvm e32249: OUTPUT«Unhandled exception: java.lang.StackOverflowError␤ in (gen/jvm/Metamodel.nqp:2162)␤ in (gen/jvm/Metamodel.nqp:2462)␤ in (gen/jvm/Metamodel.nqp:2458)␤ in (gen/jvm/Metamodel.nqp:2456)␤ in (gen/jvm/Metamodel.nqp:1374)␤ in (gen/jvm/Metam…»
masak submits rakudobug
also,
r: role R { method foo {}; BEGIN R.foo }
camelia rakudo-parrot e32249, rakudo-jvm e32249: OUTPUT«===SORRY!===␤None of the parametric role variants for 'R' matched the arguments supplied.␤Cannot call ''; none of these signatures match:␤»
masak but I guess this one is easier to accept. 14:47
masak lol, I blogged! \o/ strangelyconsistent.org/blog/lexpad...eed-fixups 15:41
geekosaur blolg? 15:42
masak blolg'd. 15:46
arnsholt masak++ 15:52
Oh, and the Bayesian tweet made perfect sense to me =)
masak :) 15:57
[Coke] masak: (email) *facepalm* d'oh. 16:20
nwc10 itz_: it's not clear to me whether in all the discussion prompted by that blog post, anyone has proposed anything they are competant and willing to do, to try to address the migration problems that he lays bare. 16:21
nwc10 (not that I'm implying that it's either obvious or easy to change anything) 16:21
[Coke] masak: Didn't. Even. See that. 16:21
nwc10 nor do I think it appropriate or constructive to suggest anything, given that *I* am neither competant nor willing to help, with what is a sticky awkward and unfortunate situation. 16:22
as a side effect, I did find *this*, which is interesting: lucumr.pocoo.org/2013/7/2/the-updat...o-unicode/
particularly lucumr.pocoo.org/2013/7/2/the-updat...de-is-hard 16:23
arnsholt nwc10: I'm a bit suspicious of several of the suggestions in that last section 16:28
1 and 4 in particular
nwc10 yes, the Python 2.x approach is messy, as it causes runtime, data-driven exceptions 16:29
and I suspect that (4) is the wrong solution to a valid problem
(or a pair of valid problems - that OS interfaces might return filenames, etc, that aren't in the encoding that you thought you were dealing with 16:30
nwc10 and that one about headers not being in ISO-8859-1, as per various specs, but in UTF-8) 16:30
timotimo oh yay 16:31
my refinement of my code makes almost all test failures go away \o/
nwc10 agree, oh yay
oh, actual yay
not scarcasm yay
yay \o/
timotimo actually. the remaining test failures came from files cluttering my rakudo folder 16:32
so all i'm left with is passing TODOs and no failures \o/
arnsholt Cool!
timotimo on that topic, S32-io/copy.t uses the deprecated IO::Handle.copy method 16:33
i think perl6 could use a module just like python's "webbrowser" or "browser" or what it's called 16:48
timotimo is probably going to hack this up tonight
FROGGS timotimo: what does it do? 16:51
timotimo look it up :)
FROGGS meh
timotimo among other things, open a web browser in a clever manner
FROGGS I'm lazy
ahh
timotimo bbl
masak [Coke]: the strings? I missed it, too. 17:20
timotimo would that be Web::Browser? Desktop::Browser::Launch? 17:27
arnsholt I'd say Web::Browser 17:34
arnsholt Don't need to nest -that- deep. It's not Java, after all =) 17:34
timotimo hah 17:36
well, Web::Browser may be a module that *implements* a web browser ;)
i got the feeling that my extra code makes stage parse significantly slower 17:39
i may need to do something about that before i merge into nom
do dynamic variables from inside tokens/rules persist into the action method or is it called separately from one layer lower? 17:40
arnsholt IIRC a contextual should be visible in the action method, even when declared in the rule 17:41
timotimo r: grammar Foo { token TOP { :my $*test = "hi"␤ hey } }; class FooAct { method TOP { say $*test } }; Foo.parse("hey", :actions(FooAct.new));
camelia rakudo-jvm d773e2: OUTPUT«===SORRY!=== Error while compiling /tmp/mjfBD_yX6j␤Unrecognized regex modifier :my␤at /tmp/mjfBD_yX6j:2␤------> ⏏hey } }; class FooAct { method TOP { say␤ expecting any of:␤ postfix␤ infix…»
..rakudo-parrot d773e2: OUTPUT«===SORRY!=== Error while compiling /tmp/Uu8746H_ZN␤Unrecognized regex modifier :my␤at /tmp/Uu8746H_ZN:2␤------> ⏏hey } }; class FooAct { method TOP { say␤ expecting any of:␤ postfix␤ in…»
timotimo ... er?
is that nqp only?
nqp: grammar Foo { token TOP { :my $*test := "hi"␤ hey } }; class FooAct { method TOP { say $*test } }; Foo.parse("hey", :actions(FooAct.new));
camelia nqp-jvm: OUTPUT«Unrecognized regex modifier :my at line 2, near " $*test :="␤ in panic (gen/jvm/stage2/NQPHLL.nqp:379)␤ in (gen/jvm/stage2/NQPP6QRegex.nqp:389)␤ in mod_ident:sym<oops> (gen/jvm/stage2/NQPP6QRegex.nqp:389)␤ in !protoregex (gen/jvm/stage2/QRegex.nqp:756)…»
..nqp-parrot: OUTPUT«Unrecognized regex modifier :my at line 2, near " $*test :="␤current instr.: 'panic' pc 15975 (gen/parrot/stage2/NQPHLL.pir:5955) (gen/parrot/stage2/NQPHLL.nqp:426)␤»
..nqp-moarvm: OUTPUT«Unrecognized regex modifier :my at line 2, near " $*test :="␤panic␤»
arnsholt No, that should work in Rakudo as well, I think... 17:42
timotimo isn't that how i do it?
arnsholt Oh
Missing a semicolon
timotimo ah! :)
arnsholt r: grammar Foo { token TOP { :my $*test = "hi"; hey } }; class FooAct { method TOP { say $*test } }; Foo.parse("hey", :actions(FooAct.new));
camelia rakudo-parrot d773e2: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in method TOP at /tmp/RvTaH_x7N5:1␤ in any !reduce at gen/parrot/stage2/QRegex.nqp:724␤ in any !cursor_pass at gen/parrot/stage2/QRegex.nqp:686␤ in regex TOP at /tmp/RvTaH_x7N5:1␤…»
..rakudo-jvm d773e2: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in any !reduce at gen/jvm/stage2/QRegex.nqp:724␤ in any !cursor_pass at gen/jvm/stage2/QRegex.nqp:686␤ in method parse at gen/jvm/CORE.setting:12415␤␤»
timotimo er, yes
TOP($/)
arnsholt Oh, right =D
r: grammar Foo { token TOP { :my $*test = "hi"; hey } }; class FooAct { method TOP($/) { say $*test } }; Foo.parse("hey", :actions(FooAct.new));
camelia rakudo-parrot d773e2, rakudo-jvm d773e2: OUTPUT«hi␤»
timotimo great! 17:43
that'll make things significantly easier
hm. i can't seem to get the good performance back :| 17:53
at least i didn't break any other tests 18:00
dalek kudo/nom: 88b5ddf | (Timo Paulssen)++ | src/Perl6/ (2 files):
find chained adverbs and combine them into named args
18:03
kudo/nom: e5268be | (Timo Paulssen)++ | docs/ChangeLog:
proudly add another changelog entry
raiph timotimo: why +$/.list == in one place, +($/.list) == in another? 18:45
timotimo it may have been +@(...) before 18:59
timotimo so ... what to do now? :) 19:17
FROGGS fix all the bugs? 19:18
timotimo :\ 19:19
FROGGS *g* 19:20
timotimo WARNING root: emcc: cannot find library "m" 19:36
WARNING root: emcc: cannot find library "pthread"
WARNING root: emcc: cannot find library "rt"
WARNING root: emcc: cannot find library "dl"
:\
FROGGS O.o 19:39
what
have
you
don?
+e
timotimo you know what emcc is? :)
moritz has no idea
timotimo emscripten :) 19:40
FROGGS ahh
benabik I was going to guess Eastern Maine Community College.
timotimo i'll need to teach libuv to not build networking support it seems 19:41
pmurias timotimo: you are compiling moarvm to javascript? 19:45
timotimo i'll probably be easily discouraged if something doesn't work immediately
like libuv needing linux networking stuff 19:46
moritz implement IP-over-DOM :-) 19:47
timotimo m)
i'd much rather have a moarvm that does hardly any I/O at all 19:48
especially since i'll need to have some way to give it the .moarvm files etc etc 19:49
timotimo WARNING root: emcc: cannot find library "m" 19:55
WARNING root: emcc: cannot find library "pthread"
WARNING root: emcc: cannot find library "rt"
WARNING root: emcc: cannot find library "dl"
er, wrong
3rdparty/libuv/src/unix/linux-core.c:52:11: fatal error: 'linux/if_packet.h' file not found
maybe all i need to do is move the headers somewhere i can find them? 19:56
Mouq o/
timotimo but it's in /usr/include 19:57
Mouq I made a gist of the output I get trying to make Rakudo on MoarVM: gist.github.com/Mouq/8259841
timotimo why would emcc not look there?
Mouq Since I'm not sure where to put an issue/bug report
timotimo huh 19:58
make realclean?
Mouq timotimo: me? Sure, just tried that, fails with the same error. This happens even if I create a new rakudo directory and use --gen-moar 19:59
timotimo weird!
FROGGS MacOSX!
timotimo huh. 20:00
[Coke] r: "eek"; "ook" 20:01
camelia rakudo-parrot e5268b, rakudo-jvm e5268b: OUTPUT«WARNINGS:␤Useless use of constant string "eek" in sink context (line 1)␤»
timotimo gives up for the moment 20:03
pmurias: how's your progress with rakudo-js? :)
timotimo so ... where do i start with my shared memory experiments? 20:26
moarvm seems like a good target to start with dP
:P
FROGGS is that like the Bord's hive? :o) 20:28
Borg*
timotimo hehe 20:31
i may not need to do terribl ymuch 20:33
i can probably take most of the stuff from MVMArray and change everything that tries to realloc or something
pmurias timotimo: I haven't touched perl6/rakudo-js in a while, hopefully I'll get back to work on that soon 21:35
timotimo sounds good :) 21:36
nwc10 pmurias: you got network to your room? 21:45
timotimo how do you feel about having a compiler for nqp and a compiler for perl6 inside rakudo/nqp that will accept a whitelist of ops/subs/methods? 22:13
i'm not sure if i want to have the hassle of maintaining that "out of tree" 22:14
although, it may be easier than i think
i'm just not sure how to get at these compilers from inside rakudo
diakopter timotimo: use the & trick :D 22:25
(inject hooks as ops)
timotimo ... huh?
pmurias nwc10: yes 22:28
unclefester2 r: pack "S*", "a".encode("UTF-16") 22:29
camelia rakudo-jvm e5268b: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤ in any at gen/jvm/BOOTSTRAP.nqp:1201␤ in sub hyper at gen/jvm/CORE.setting:16503␤ in block at gen/jvm/CORE.setting:16470␤ in block at gen/jvm/CORE.setting:5317␤ in s…»
..rakudo-parrot e5268b: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤ in any at gen/parrot/BOOTSTRAP.nqp:1218␤ in any at gen/parrot/BOOTSTRAP.nqp:1209␤ in method Real at gen/parrot/CORE.setting:1002␤ in sub infix:<%> at gen/parrot/CORE.…»
unclefester2 r: pack "S", "a".encode("UTF-16") 22:30
camelia rakudo-jvm e5268b: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤ in any at gen/jvm/BOOTSTRAP.nqp:1201␤ in sub hyper at gen/jvm/CORE.setting:16503␤ in block at gen/jvm/CORE.setting:16470␤ in block at gen/jvm/CORE.setting:5317␤ in s…»
..rakudo-parrot e5268b: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤ in any at gen/parrot/BOOTSTRAP.nqp:1218␤ in any at gen/parrot/BOOTSTRAP.nqp:1209␤ in method Real at gen/parrot/CORE.setting:1002␤ in sub infix:<%> at gen/parrot/CORE.…»
pmurias nwc10: why do you ask?
nwc10: ah, I have seen the backlog 22:33
FROGGS r: unpack "S*", "a".encode("UTF-16") 22:35
camelia rakudo-jvm e5268b: OUTPUT«===SORRY!=== Error while compiling /tmp/OElBgjpR_x␤Undeclared routine:␤ unpack used at line 1. Did you mean '&pack'?␤␤»
..rakudo-parrot e5268b: OUTPUT«===SORRY!=== Error while compiling /tmp/FRjXUKoUTP␤Undeclared routine:␤ unpack used at line 1. Did you mean '&pack'?␤␤»
FROGGS meh
unclefester2: pack takes numbers and produces a buf
p: say pack "S*", 42
camelia rakudo-parrot e5268b: OUTPUT«Buf:0x<2a 00>␤»
unclefester2 the UTF-16 encoding of the string should return an a buf array of 16 bit numbers 22:36
FROGGS p: say "a".encode("UTF-16").perl 22:37
camelia rakudo-parrot e5268b: OUTPUT«utf16.new(97)␤»
FROGGS p: say "a".encode("UTF-16").list
camelia rakudo-parrot e5268b: OUTPUT«97␤»
FROGGS p: say pack "S*", "a".encode("UTF-16").list 22:38
camelia rakudo-parrot e5268b: OUTPUT«Buf:0x<61 00>␤»
FROGGS unclefester2: there you go
unclefester2 thanks - that helps ... 22:38
LTA message maybe 22:39
FROGGS at least not very helpful, yes
unclefester2 r: pack "S*", "ab".encode("UTF-16") 22:43
camelia rakudo-jvm e5268b: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤ in any at gen/jvm/BOOTSTRAP.nqp:1201␤ in sub hyper at gen/jvm/CORE.setting:16503␤ in block at gen/jvm/CORE.setting:16470␤ in block at gen/jvm/CORE.setting:5317␤ in s…» 22:44
..rakudo-parrot e5268b: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤ in any at gen/parrot/BOOTSTRAP.nqp:1218␤ in any at gen/parrot/BOOTSTRAP.nqp:1209␤ in method Real at gen/parrot/CORE.setting:1002␤ in sub infix:<%> at gen/parrot/CORE.…»
unclefester2 r: pack "S*", "ab".encode("UTF-16").list 22:44
camelia ( no output )
unclefester2 r: my $b = pack "S*", "ab".encode("UTF-16").list; say $b
camelia rakudo-parrot e5268b, rakudo-jvm e5268b: OUTPUT«Buf:0x<61 00>␤»
unclefester2 r: my $b = pack "SS", "ab".encode("UTF-16").list; say $b 22:44
camelia rakudo-parrot e5268b, rakudo-jvm e5268b: OUTPUT«Buf:0x<61 00 62 00>␤»
FROGGS r: my $b = pack "S*", |"ab".encode("UTF-16").list; say $b 22:45
camelia rakudo-parrot e5268b, rakudo-jvm e5268b: OUTPUT«Buf:0x<61 00>␤»
FROGGS weird 22:46
rightfold Good morning. 22:58
[Coke] ~~ 23:02
dalek kudo/moar-support: 9b4b4c4 | (Tobias Leich)++ | tools/build/Makefile-Moar.in:
create dirs we want to use, diakopter++
23:48