»ö« | perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend!
Set by Tene on 14 May 2009.
jnthn rakudo: my @a = a => 1, b => 2, c => 3; for @a.reverse.hash.kv -> $k, $v { say "$k = $v" } 00:00
p6eval rakudo 595d36: OUTPUT«c = 3␤b = 2␤a = 1␤»
jnthn Dunno if that's nicer.
oh wait
that could lose the ordering
duh
japhb jnthn: won't that lose ordering?
jinx
jnthn should just sleep ;-) 00:01
japhb heh
We need you fully awake for tomorrow. ;-)
jnthn I can't think of much neater way than you have already tbh.
japhb FAir enough
00:01 payload1 left
jnthn rakudo: my @a = a => 1, b => 2, c => 3; for @a.reverse.map: *.kv -> $k, $v { say "$k = $v" } 00:01
p6eval rakudo 595d36: OUTPUT«c = 3␤b = 2␤a = 1␤» 00:02
jnthn There's always that.
japhb I'm still not used to unbracketed *.method syntax ...
Are { .method } and *.method exactly equivalent, aside from possible limitations on where *.method can appear? 00:04
jnthn japhb: Pretty much yes
japhb OK, cool
jnthn *.meth generates a closure
japhb: BTW, now that Tene++ has got importing from different HLLs working in Rakudo, I suspect importing stuff from Parrot libraries isn't so far off. 00:06
00:06 jferrero left
japhb :-) :-) 00:06
skids rakudo: my @a = a => 1, b => 2, c => 3; for @a.reverse { .kv -> $k, $v {say "$k = $v"} }
Tene jnthn: pm and I were talking about that earlier... We planned to work out the details after the Parrot release.
p6eval rakudo 595d36: OUTPUT«Statement not terminated properly at line 1, near "-> $k, $v "␤in Main (src/gen_setting.pm:0)␤» 00:07
00:07 cls_bsd joined
jnthn Tene: Awesome. :-) 00:07
skids: missing } 00:08
and maybe missing : too
And then .reverse doesn't want a block :-)
japhb That leads to the question of how to specify at the PIR level that I want my NCI wrappers to be exportable ... right now OpenGL.pir has a magic function that you call to export the contents of the namespace.
I'd love to drop that function, and the manual call from Perl, and have it Just Work. 00:09
jnthn japhb: The Perl 6 approach is along the lines of having a sub-namespace which contains aliases of the things to export, and I think the Parrot way has been following that somewhat.
erm, sorry 00:10
The HllCompiler way
It may end up looking that way for the Parrot modules, or may not...
00:11 fridim_ left
japhb OK, so currently the OpenGL stuff is in a namespace ['parrot'; 'OpenGL'], and the magic function knows which subs to export from there. You're saying I need to make a ['parrot'; 'OpenGL'; 'export_me_plenty'] or somesuch, export my stuff there at library load time, and then Rakudo will know to look there when I do 'use OpenGL;' ? 00:12
jnthn japhb: It's To Be Discussed, but it's quite feasible it will go along those lines, yes. 00:13
skids ramy @a = a => 1, b => 2, c => 3; for @a.reverse { for .kv -> $k, $v {say "$k = $v"} }kudo:
jnthn In Perl 6, you generally have two "tags"
skids rakudo: @a = a => 1, b => 2, c => 3; for @a.reverse { for .kv -> $k, $v {say "$k = $v"} } 00:14
jnthn ALL and DEFAULT
p6eval rakudo 595d36: OUTPUT«Scope not found for PAST::Var '@a' in ␤in Main (src/gen_setting.pm:3122)␤»
jnthn Actually it'd be more like ['parrot'; 'OpenGL'; 'EXPORT'; 'ALL' ] that they go into if it's following the same model.
skids rakudo: my @a = a => 1, b => 2, c => 3; for @a.reverse { for .kv -> $k, $v {say "$k = $v"} }
p6eval rakudo 595d36: OUTPUT«c = 3␤b = 2␤a = 1␤» 00:15
japhb OK, I was going to ask about how that interacts with tagging, but you beat me to it.
:-)
jnthn There may be some kind of sugar to save you writing all of the namespace aliases out by hand though.
skids (was missing a 'for' actually)
jnthn skids: There's More Than One Way To Make It Syntactically Valid ;-)
skids ...but it still helps if you can type :-) 00:16
japhb Is the assumption that Parrot languages that don't have the concept of import tags will just assume DEFAULT under the covers?
jnthn japhb: Yeah, I guess DEFAULT and ALL will just be the same thing and they'll both just have the export list. 00:17
Well, export hash I guess. 00:18
00:18 bacek left
japhb So tagless_lang importing from Rakudo imports DEFAULT, and tagless_lang exporting to Rakudo exports ALL = DEFAULT. Sensible. 00:19
00:19 donaldh joined
jnthn japhb: Yeah, I think it'll work out. 00:20
00:22 M_o_C left
s1n pmichaud: ping 00:24
00:24 payload joined
jnthn -> sleep, see y'all tomorrow 00:29
00:29 hercynium joined 00:32 bacek joined
japhb I need some help understanding why the following two are different: 00:32
rakudo: my @foo = a => (<x y z>), b => (<r g b>); say @foo.perl; for @foo.map: *.kv -> $k, $v { say $v.perl }
rakudo: my @foo = a => [<x y z>], b => [<r g b>]; say @foo.perl; for @foo.map: *.kv -> $k, $v { say $v.perl }
p6eval rakudo 595d36: OUTPUT«["a" => ["x", "y", "z"], "b" => ["r", "g", "b"]]␤"x"␤"z"␤"r"␤"b"␤» 00:33
rakudo 595d36: OUTPUT«["a" => ["x", "y", "z"], "b" => ["r", "g", "b"]]␤["x", "y", "z"]␤["r", "g", "b"]␤»
japhb The frustrating part is that the @foo.perl is the same in both cases.
pmichaud japhb: that will change soon. 00:36
(<x y z>) will itemize to a Capture, while [<x y z>] will be an Array.
TimToady bare <x y z> should probably also itemize to Capture
pmichaud Yes 00:37
TimToady since <> is defined in terms of ()
pmichaud Lists will itemize to Capture.
I've been waiting to do that as part of the other array/list refactors that need doing.
dinnertime here. 00:38
00:40 lichtkind joined
japhb OK, so just to be clear: The second case with [<x y z>] will be unchanged after your fixes. But will the first case with (<x y z>) change only in the @foo.perl part, with the for loop having the same behavior, or will both the .perl and the loop output change? 00:40
TimToady radudo: my @a = a => 1, b => 2, c => 3; for @a.reverse>>.kv { say $_.join(' = ') } 00:42
japhb (typo)
TimToady rakudo: my @a = a => 1, b => 2, c => 3; for @a.reverse>>.kv { say $_.join(' = ') }
p6eval rakudo 595d36: OUTPUT«c = 3␤b = 2␤a = 1␤»
skids TimToady: I thought hypers do not order? 00:43
TimToady they order return value, not order of execution 00:44
hypers would be useless if they scrambled the result
japhb Funky. So .kv is giving back a capture, but because you're using a block rather than a pointy, the capture is not flattening, but is available directly in $_?
TimToady it's returning an array of kv arrays
japhb s/flattening/binding
TimToady [['c','3'],['b','2'],['a','1']] 00:45
just another way to map the .kv over the values 00:46
japhb TimToady: gotcha. I was confused, and was assuming [('c', '3'), ('b', '2'), ('a', '1')]
TimToady well, it might do that eventually 00:47
japhb OK, so my assumption had some minor basis in sanity. Good.
TimToady I was just trying to replace the map, not illustrate captures 00:48
japhb sure.
meppl good night
00:48 cognominal left
TimToady perl6: my @a = (1..10); my @b = (11..20); sub infix:<XXX> ($a,$b) { say "$a $b" }; @a >>XXX<< @b 00:52
p6eval rakudo 595d36: OUTPUT«Statement not terminated properly at line 1, near ">>XXX<< @b"␤in Main (src/gen_setting.pm:0)␤»
..pugs: OUTPUT«2 12␤3 135 156 167 178 189 1910 201 11␤␤␤␤␤␤␤␤4 14␤»
..elf 26890: OUTPUT«Undefined subroutine &GLOBAL::XXX called at (eval 134) line 9.␤ at ./elf_h line 5881␤»
TimToady you'll note pugs doesn't actually call XXX in order 00:54
00:55 meppl left
TimToady pugs: my @a = (1..10); my @b = (11..20); sub infix:<XXX> ($a,$b) { "$a $b" }; say @a >>XXX<< @b 00:55
p6eval pugs: OUTPUT«1 112 123 134 145 156 167 178 189 1910 20␤»
00:55 eternaleye joined
TimToady but it still returns the results in order 00:55
skids: ^^^
skids thanks.
TimToady one of those spots where pugs still wins :) 00:56
skids :-)
TimToady decommutationalization & 01:02
01:16 Whiteknight left 01:21 cognominal joined 01:28 lambdabot left 01:33 lambdabot joined 01:49 justatheory joined 01:52 frew joined 01:54 justatheory left 01:58 cj joined
cj TimToady: have you ever mucked with wordnet databases? Is there a linguistics channel I should be asking this on? :) 01:59
02:08 unobe joined, rhr_ joined 02:12 unobe left 02:13 unobe joined 02:14 unobe left 02:20 unobe joined 02:22 rhr left 02:31 meppl joined 02:37 [particle] joined, [particle]1 left 02:42 sri_kraih_ joined
s1n cj: i've used wordnet before, but dunno if there's a channel (would be nice to know) 02:44
02:45 unobe left 02:46 lichtkind_ joined 02:47 lichtkind_ left 02:49 cdarroch left 02:51 sri_kraih left
TimToady cj: you mistake me for a real lingrist :) 02:53
cj TimToady: oh, you just work with those computer languages, eh?
02:59 lichtkind left 03:04 spx2_ is now known as spx2 03:05 hercynium left 03:17 alester joined 03:20 donaldh left, donaldh joined 03:31 LylePerl left, LylePerl joined 03:32 japhb_ joined 03:41 orafu left 03:42 orafu joined 03:43 cotto left, Maghnus joined, meppuru joined 03:48 cotto joined 03:49 japhb left 03:59 meppl left 04:18 H1N1[A] joined 04:20 xinming_ joined 04:26 justatheory joined 04:33 H1N1[A][Again] left 04:39 xinming left
[particle] context flea glammal 04:40
04:45 [particle] left 04:48 mikehh joined 04:50 skids left 05:00 alester left 05:02 mkehh left 05:05 araujo joined 05:07 nihiliad left 05:16 frew left
dalek kudo: 5e2e2c1 | pmichaud++ | src/ (3 files):
Add qx{}, qqx{}, q:x{}, qq:x{}.
05:25
05:28 ejs joined 05:32 Andronic joined 05:34 DemoFreak joined
pmichaud rakudo: say qx{ls} 05:49
p6eval rakudo 5e2e2c: OUTPUT«build␤Configure.pl␤CREDITS␤docs␤LICENSE␤Makefile␤parrot␤perl6␤perl6.c␤perl6.o␤perl6.pbc␤perl6.pir␤perl6_s1.pbc␤rakudo_revision␤README␤src␤t␤Test.pir␤Test.pm␤tools␤␤»
05:51 eternaleye left 05:55 eternaleye joined
TimToady rakudo: say qx{./perl6 -e 'say "hi"'} 05:59
p6eval rakudo 5e2e2c: OUTPUT«hi␤␤»
05:59 mberends joined
eternaleye Wow. 05:59
dalek kudo: 33dd7ac | pmichaud++ | docs/ (2 files):
Some news and announcement updates in preparation for release.
06:00
mberends hey! that is seriously ++! pmichaud++!
eternaleye ++pmichaud++ # this too 06:01
TimToady rakudo: say qx{./perl6 -e 'say qx[./perl6 -e "say q<hello #perl6>"]'} 06:03
p6eval rakudo 33dd7a: OUTPUT«hello #perl6␤␤␤»
eternaleye rakudo: say qq:x{ ./perl6 $*PROGRAM_NAME }, 'This should be interesting'
Uh oh 06:04
japhb_ I wondered how long people could resist the DoS
eternaleye I was just testing interpolation! My subconscious just had an idea... 06:05
I shouldn't have listened to it
06:06 japhb__ joined
pmichaud I'll be curious to know if qx{} works on Windows. 06:07
s1n pmichaud: ping 06:09
pmichaud @tell masak you might check the draft release announcement (docs/announce/2009-05) and tell me if there are any chagnes you'd like made
lambdabot Consider it noted.
pmichaud s1n: pong
s1n still giving out commitbit to perl6 on github?
pmichaud sure. What do you want the repo to be called for your project?
s1n epoxy-resin 06:10
06:10 brunov left
pmichaud what's your github id ? 06:11
s1n s1n
dalek kudo: 0ce0f62 | pmichaud++ | docs/ChangeLog:
Update ChangeLog a bit.
pmichaud do you have an existing git repo for it, or should it start new?
s1n none yet 06:12
pmichaud okay, starting new.
s1n thanks :)
pmichaud: btw, have you seen gitorious? it looks like it has a better patch review process
pmichaud now created: github.com/perl6/epoxy-resin/ 06:13
I haven't looked at gitorious yet, no. 06:14
06:14 [particle] joined 06:18 p6eval left, p6eval joined
moritz_ rakudo: say Regex ~~ Routine 06:19
06:19 DemoFreak left
p6eval rakudo 0ce0f6: OUTPUT«1␤» 06:19
s1n pmichaud++ thanks 06:21
bed& 06:22
06:23 japhb_ left, japhb__ is now known as japhb 06:25 amoc joined 06:31 iblechbot joined
pmichaud back later # bedtime 06:34
moritz_ good night 06:35
06:35 justatheory left 06:36 ejs left
japhb @tell masak pull request for proto waiting for you at github. :-) 06:41
lambdabot Consider it noted.
06:51 donaldh left 07:00 ElectricHeavyLan left 07:03 ejs joined 07:13 ejs left 07:19 smtms left 07:35 donaldh joined 07:46 ejs joined 07:55 donaldh left 07:57 ejs left, ejs joined 07:59 donaldh joined 08:05 M_o_C joined
Matt-W Morning 08:15
moritz_ good morning 08:16
Matt-W No 08:19
Not a good morning
Just a morning
araujo Just Morning 08:21
08:27 keepguessing left 08:28 tulcod joined
mberends Matt-W: hopefully the fact that pmichaud++ just gave us qx{} and qq:x{} makes the morning a bit better for, and it's Rakudoday as well! 08:33
s/for/for you/
moritz_ rakudo: my $a = "foo"; say uc qq:x{echo $a} 08:34
p6eval rakudo 0ce0f6: OUTPUT«FOO␤␤»
moritz_ woooot
mberends woooooooot 08:35
Matt-W mberends: That improves things a little bit
mberends :) 08:36
Matt-W say qx{find my car}
08:37 Su-Shee joined
Su-Shee hi. 08:37
mberends hi, are you going to play with SQLite today? 08:39
mberends must install Windows on a laptop for $work tomorrow 08:40
Su-Shee no, I have to get some work-for-rent done and afterwards I think I'll do some code for the blog in p6.
and put the 69845604 other ideas for parrot/rakudo on hold. ;) 08:41
08:41 DemoFreak joined
mberends rakudo: say qx{ find . -name '*car*' | wc -l }; 08:43
p6eval rakudo 0ce0f6: OUTPUT«25␤␤»
mberends Matt-W: is one of those your car? 08:44
moritz_: does evalbot run in a chroot jail? 08:47
08:49 M_o_C left
moritz_ mberends: yes 08:49
mberends: but please don't screw it anyway :-)
08:49 M_o_C joined
mberends moritz_: i would not deliberately, promise 08:51
08:51 bacek left 08:52 bacek joined
moritz_ at some point we need a safe mode 08:52
Matt-W mberends: unfortunately not 08:54
08:56 amoc left 08:57 dakkar joined 09:02 sparc joined 09:03 riffraff joined
mberends rakudo: print qx{env} 09:03
p6eval rakudo 0ce0f6:
..OUTPUT«SHELL=/bin/bash␤TERM=screen␤USER=evalenv␤LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;3…
mberends rakudo: %*ENV{"FOO"}="BAR"; print qx{echo $SHELL $FOO $SHELL} 09:05
p6eval rakudo 0ce0f6: OUTPUT«/bin/bash /bin/bash␤»
mberends fraid proper CGI apps must still wait 09:06
09:10 amoc joined 09:11 payload left, payload1 joined 09:12 fridim_ joined 09:18 M_o_C left
jnthn H H , 'tis Rakudo day. 09:20
tulcod holy cow, hubble pix gigapica.geenstijl.nl/2009/05/bye_b...ubble.html
Matt-W OH HAI jnthn 09:21
What marvels do you have planned today?
jnthn Matt-W: First, coffee...
Matt-W That sounds like a good start 09:22
09:39 amoc left 09:43 alc joined
dalek kudo: 34823c9 | masak++ | docs/announce/2009-05:
[docs/announce/2009-05] nitpicked about my home

around. I tried to express this as succinctly-but-still-correct as possible in the announcement. Further edits are appreciated.
09:46
09:47 payload joined, payload left, payload joined 09:48 payload1 left
jnthn Uppsala. Stockholm. They're both in the north anyways. :-P 09:49
jnthn has coffee and finished backlogging
09:56 flw joined 09:57 DemoFreak left 09:59 flw is now known as su2admin, fridim_ left 10:01 su2admin is now known as flw 10:02 clintongormley joined 10:04 amoc^ joined
dalek kudo: dcc0fdd | jnthn++ | build/PARROT_REVISION:
Bump PARROT_REVISION up to the revision of the Parrot release, so we're testing against the Parrot Thursday's release should run on.
10:09
kudo: 6685755 | jnthn++ | docs/ChangeLog:
Few extras for the ChangeLog.
jnthn pmichaud: (for when you're backlogging ;-)) We might be able to close this one now: rt.perl.org/rt3/Ticket/Display.html?id=49812 ? Or did we only do part of it? 10:12
10:21 flw left 10:30 [particle] left, lambdabot left 10:33 lambdabot joined 10:34 payload left, payload joined 10:35 [particle] joined 10:36 baest left 10:39 M_o_C joined 10:40 tulcod left 10:50 [particle] left 10:51 payload left 10:59 [particle] joined 11:01 [particle] left 11:05 [particle] joined 11:06 [particle] left 11:10 [particle] joined 11:11 M_o_C left, dakkar left, p6eval left, Andronic left, sri_kraih_ left, Patterner left, charsbar left, Eevee left, yahooooo left, jnthn left, buu left, Maddingue left, [particle] left 11:12 jnthn joined, M_o_C joined, dakkar joined, p6eval joined, Andronic joined, sri_kraih_ joined, Patterner joined, charsbar joined, Eevee joined, yahooooo joined, buu joined, Maddingue joined, irc.freenode.net sets mode: +o jnthn 11:15 [particle] joined 11:16 jnthn left, yahooooo left, Eevee left, Patterner left, Andronic left, buu left, Maddingue left, sri_kraih_ left, p6eval left, M_o_C left, dakkar left, charsbar left, [particle] left 11:17 estrabd_ left
literal do all public object attributes become valid named arguments to .new() ? 11:18
11:18 jnthn joined, M_o_C joined, dakkar joined, p6eval joined, Andronic joined, sri_kraih_ joined, Patterner joined, charsbar joined, Eevee joined, yahooooo joined, buu joined, Maddingue joined, irc.freenode.net sets mode: +o jnthn
literal if so, how would one exclude an attribute from that? 11:18
moritz_ literal: by writing a custom constructor 11:19
11:19 [particle] joined 11:20 donaldh left
literal that seems tedious for such a simple thing :P 11:20
a trait on the "has $.attr" declaration would be convenient
moritz_ submethod new { $?CLASS.bless }
how very tedious
11:20 donaldh joined
moritz_ or 'method new' 11:20
jnthn moritz_: bless probably needs an arg...
11:20 kst left
literal how does this say that some arbitrary attribute is to be exluded from .new ? 11:21
moritz_ literal: that writes a .new that doesn't set any attribute
11:21 kst joined
literal so you'd have to manually list all the ones you want to include 11:21
more tedious :)
11:21 [particle] left
moritz_ or manually delete those from %_ that you want to exclude 11:22
and pass |%_ to bless
or so
literal yeah but that doesn't complain if the user passes it to .new
moritz_ neither does the current one
jnthn method new(*%named where { !%^x.contains('exclude') }) { ... } # or some such
moritz_ superfluous arguments are ignored
literal oh, ok
moritz_ literal: anyway, feel free to write a mail to p6l and propose it
jnthn We can't provide sugar for everything people could possibly want... :-S 11:23
literal I haven't really looked at Perl 6 objects much, it was just a thoughtt
moritz_ well, maybe it's not a bad idea
11:25 [particle] joined
literal I was just looking at programming-scala.labs.oreilly.com/ and thought "neat, they have class Foo (SIGNATURE) { }" and thought "oh wait I don't even need that in Perl 6 because it is determined by the public attributes", then wondered about excluding some from the constructor 11:25
jnthn tbh I'd probably prefer to leave this in the module world.
class Foo does CoolAutoConstructor[exclude => 'foo'] { } 11:26
moritz_ or it could be a custom trait
jnthn That'd be a cool easy module to write.
Yeah, or do it with a custom trait perhaps.
But then you need to somehow pull in a new method.
moritz_ (don't know how easy or hard that is) 11:27
since traits are mixins... seems possible
well, the trait is applied on an attribute, and you need to obtain the class to which the attribute belongs
so some kind of introspection will be necessary
jnthn Right, but you're mixing into the variable rather than the class...though if there's a way to get at the class...
Matt-W you'd need a path that says 'hey, variable, are you a class attribute? Can I talk to your class please?' 11:28
jnthn Yeah, I'm just not entirely sure how that would look.
moritz_ maybe CALLER::$?CLASS in the trait_auxiliary:<is> multi
jnthn Maybe that, yes.
If $?CLASS is context.
jnthn spectesting fix for 64594 - that wins us +19 tests. 11:29
11:29 [particle] left
Matt-W woohoo 11:29
jnthn moritz++ for the tests :-) 11:30
Matt-W looks up the bug
ooch
11:33 payload joined 11:34 icwiener joined 11:35 [particle] joined 11:37 [particle] left 11:40 [particle] joined 11:42 [particle] left, iblechbot left 11:45 [particle] joined 11:47 [particle] left, alc left 11:50 [particle] joined 11:52 [particle] left 11:55 [particle] joined 11:57 [particle] left 12:00 ruoso joined, [particle] joined
ruoso Hello! 12:00
12:01 [particle] left
pugs_svn r26891 | jnthn++ | [t/spec] Some unfuding for Rakudo. 12:03
dalek kudo: 6229131 | jnthn++ | src/classes/Object.pir:
Fix typed array and hash attributes so that the type checking is enforced. Resolves RT#64594.
12:04
12:05 [particle] joined
jnthn rakudo: class Foo { has $.x = rand }; say Foo.new.x; say Foo.new.x; say Foo.new.x; 12:06
p6eval rakudo 668575: OUTPUT«0.652888946076022␤0.652888946076022␤0.652888946076022␤»
moritz_ ouch
jnthn lolz
moritz_ rakudo: say rand, rand, rand
p6eval rakudo 668575: OUTPUT«0.6477605147092650.620590299225540.79427869505356␤»
jnthn I made you a random number but I eated it.
moritz_: I've fixed it locally.
moritz_ well, .652888946076022 looks like a good random number to me :-) 12:07
jnthn moritz_: Just wanted to make sure existing Rakudo really did it wrong.
12:07 [particle] left
jnthn moritz_: Yeah, but it's kinda the debian ssh definition of random. ;-) 12:07
moritz_ right.
jnthn
.oO( that was inflamatory )
moritz_ rakudo: class Foo { has $.x = rand }; my @a = map { Foo.new.x } 1..10; say ?(all(@a) == all(@a)) 12:08
p6eval rakudo 668575: OUTPUT«Statement not terminated properly at line 1, near "1..10; say"␤in Main (src/gen_setting.pm:0)␤»
jnthn Also my change makes this one work...
moritz_ rakudo: class Foo { has $.x = rand }; my @a = map { Foo.new.x }, 1..10; say ?(all(@a) == all(@a))
jnthn class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b; }
say Foo.new.c
p6eval rakudo 668575: OUTPUT«1␤»
jnthn 3
moritz_ cool
jnthn Which fails under current Rakudo.
masak should be happy about that one :-) 12:09
moritz_ rakudo: say ?(all(1, 2, 3) == all(1, 2,4))
p6eval rakudo 668575: OUTPUT«0␤»
moritz_ uhm, that check should be [==] @a, of course 12:10
12:10 [particle] joined
moritz_ don't mess with junctions when you can mess with hyper ops instead :-) 12:10
jnthn >>==<< is hyper op btw
[==] is reduction
moritz_ erm, yes
I meant meta ops
jnthn :-)
12:11 ejs1 joined
jnthn async { qx{make spectest}; } qx{ make lunch} 12:11
12:12 [particle] left
pmichaud rakudo: say qx { echo 'good morning #perl6' } 12:14
p6eval rakudo 668575: OUTPUT«good morning #perl6␤␤»
12:14 riffraff left
Matt-W pmichaud: showoff :) 12:14
moritz_ quite understandable once you've got that feature working :-)
did anybody test that on windows? 12:15
(me looks at jnthn)
12:15 [particle] joined
jnthn ooh, no, but can do 12:15
> say qx { echo 'good morning #perl6' } 12:16
Unable to open filehandle from path ' echo 'good morning #perl6' '
lambdabot <no location info>:
lexical error in string/character literal at chara...
jnthn lambdabot: stfu
moritz_ is there an echo builtin on windows?
jnthn aye
Matt-W but it's nto a program
jnthn C:\Consulting\parrot\trunk\languages\rakudo>echo 'good morning #perl6'
'good morning #perl6'
Matt-W it's a builtin I think
on unix it's /usr/bin/echo 12:17
jnthn Matt-W: ah, good point
Matt-W but there's no echo.exe on windows
moritz_ jnthn: just try say qx{dir}
12:17 [particle] left
Matt-W I think that's also a builtin 12:17
jnthn moritz_: That doesn't work either, but I think that is also builtin.
But I tried say
moritz_ oh my
jnthn qx{ notepad } which is a program
And same error. 12:18
Matt-W damn
jnthn aye :-(
Matt-W windows' process model is quite different
it's one of the less pleasant bits of crossplatform programming IMO 12:19
moritz_ windows and VMS seem to cause the most trouble for Perl 5
12:20 [particle] joined 12:22 ejs left, [particle] left 12:25 [particle] joined 12:27 payload left 12:29 iblechbot joined 12:40 skids joined
Matt-W moritz_: that's because windows and vms are the most weird things around 12:40
jnthn I fear that it's something that'd need fixing at a Parrot level rather than a Rakudo one. :-( 12:42
12:43 mizioumt joined
pmichaud Yes, I'm pretty sure it's a Parrot level fix, since all that Rakudo is doing is 'open' with an 'rp' mode. 12:44
12:44 justatheory joined, zamolxes joined
jnthn Aye. In which case, it ain't going to be something we can fix in the Rakudo release (since the Parrot release is already cut). 12:45
moritz_ then you should note in the ChangeLog that it's Unix only 12:49
12:56 smtms joined 12:57 iblechbot left 13:07 [particle] left
Matt-W aye, and then see about getting it fixed for parrot 1.3 13:09
13:10 [particle] joined, [sbp] joined 13:12 [particle] left 13:15 [particle] joined 13:17 [particle] left 13:18 kst left, kst joined
jnthn thinks he's finally down the various spectest failures his fixes to attr init caused. 13:19
13:19 DemoFreak joined
Matt-W excellent 13:19
jnthn (There was a rather subtle issue when you had a parametric role and were using one of its parameters to initialize the attribute.) 13:20
13:20 [particle] joined
Infinoid Does rakudo build with the parrot 1.2.0 installed on feather? Sounds like partcl is having problems (with pbc_to_exe for example), and I want to know if there are any blockers. 13:21
jnthn Infinoid: afaik Rakudo won't build on an installed Parrot yet 13:22
Infinoid So "it's broken but not a blocker"?
jnthn (So if it won't under 1.2.0 I don't think it's a regression.)
See what pm just said on #parrot
13:22 [particle] left
Infinoid ok, thanks 13:22
jnthn wonders if we have any tests for class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b; } style stuff. 13:23
13:25 [particle] joined
rjh i was looking at SQL::Interpolate::Filter which is pretty cool 13:26
it does sql/SELECT * FROM foo WHERE x = $x/
and interpolates the variables automatically
it uses rather dodgy source filtering though
i assume perl 6 can do this natively?
jnthn Aye, there should be a clean way to do that in Perl 6. 13:27
13:27 [particle] left
jnthn Guess it's a custom quoting construct of some kind. 13:27
rjh So you define your own quoting construct and that's an arbitrary block of code that runs over the text inside? 13:28
13:30 sbp is now known as sbp-not-spb
jnthn I think the cleanest way is just to derrive a sub-language. 13:30
13:30 [particle] joined
jnthn And parse it using normal Perl 6 grammar syntax. 13:31
And have some kind of action handler to do the Right Thing when a variable is seen.
pmichaud okay, I think I know how to resolve/workaround the "rakudo is slow in its own HLL" problem
jnthn pmichaud: With or without a Parrot change? 13:32
pmichaud without
jnthn If we can do it without one, then it'll benefit this release.
pmichaud there's a bug we likely ought to have fixed in Parrot as well
jnthn OK, great.
*nod*
13:32 [particle] left
jnthn Well, next release... 13:32
I spotted the "performance improvements" in ChangeLog and was like, "hmm" 13:33
I MADE YOU A PERFORMANCE IMPROVEMENT BUT HLL EATED IT.
pmichaud gist.github.com/114815 # basic reason why rakudo is slower in its own HLL 13:34
jnthn rjh: See for example grammar Q is STD { 13:35
Well, below there
And token escape:sym<$> {
And what's in there.
pmichaud: ah, sucky 13:36
pmichaud anyway, we just should always use the get_root_namespace form when building objects from (parrot) PMC types
jnthn *nod* 13:37
pmichaud ohhhhhhh crap
PGE needs to do the same, then.
I can't fix that part without a parrot change.
jnthn :-( 13:38
But wait - PGE runs in Parrot HLL, no?
Or does it have its own HLL?
pmichaud the code it produces doesn't.
jnthn oh
pmichaud PGE is just a compiler.
jnthn *nod* 13:39
OK, but that's not the bit that is primarily responsible for say while 1..5000 { $i++ } being so slow.
pmichaud right
I suspect that bit is in dispatch somewhere.
anyway, I'll make adjustments and we'll see what we get.
jnthn *nod*
pmichaud uh oh 13:44
it gets worse
(not unsolvable, but worse)
jnthn pmichaud: If the issue is that it's looking for the PMCProxy that was created in the wrong namespace... 13:45
...is not a possible solution just to create and alias them ourself at startup? 13:46
Then we have one bit of workaround code that we can rip out later.
Rather than loads of little workarounds.
pmichaud no, that's not exactly it
currently, every call to e.g. $P0 = new ['ResizablePMCArray']
creates a new ProxyPMC
er, PMCProxy
jnthn Ouch. 13:47
13:47 sbp-not-spb is now known as sbp
pmichaud although that could be because 'new' is looking it up in the wrong namespace and then creating it 13:47
13:47 justatheory left
pmichaud anyway, I suspect the correct answer (and the one I'm working on) is that we should never be doing $P0 = new ['ResizablePMCArray'] 13:47
13:47 ejs2 joined
pmichaud instead, it has to be 13:47
$P0 = get_root_global ['parrot';'ResizablePMCArray']; $P0 = new $P0 13:48
jnthn *nod*
pmichaud but I'm not sure what we have to do for, say Perl6Scalar or ObjectRef
jnthn All PMCs live in the Parrot HLL.
pmichaud are those in the parrot hll or in the perl6 hll?
I think the "all PMCs live in the Parrot HLL" is likely to bite Parrot at some point. 13:49
jnthn I was saying it more as a "the way it is" rather than "the way it should be". :-)
13:49 ejs1 left 13:51 mizioumt1 joined
moritz_ ok, I'm gone for vacations... I might drop in a few times in the next few days, but all in all: "see you in 3 weeks" ;-) 13:51
pmichaud it is going to be a pain to convert all of the $P1 = new ['Perl6Scalar'] to $P0 = get_root_namespace ['parrot';'Perl6Scalar']; $P1 = new $P0 13:52
especially the ones in actions.pm
jnthn moritz_: Have an awesome vacation. :-)
moritz_ jnthn: thanks ;-)
pmichaud moritz_: happy travels!
moritz_ thank you 13:53
jnthn pmichaud: It is. Have you considered a PIR macro so it can still be one line?
pmichaud I _really_ prefer to avoid PIR macros. 13:54
jnthn Any particular reason?
I've never been bitten by basic use of them.
(Never tried to be excessively clever...)
pmichaud to me, they tend to reflect improper design 13:55
but more than that
in this case, most instances of $P1 = new ['Perl6Scalar'] are being generated directly from PCT/PAST and not from code we write ourselves in actions.pm 13:56
and I'd prefer to not make PAST call the macros.
(e.g., as part of 'viviself' options)
Matt-W moritz_: three weeks! Lucky you!
jnthn pmichaud: OK, fair enough.
Matt-W so what's wrong with saying new ['Perl6Scalar'] now? 13:57
pmichaud it creates an extra PMCProxy object on each invocation.
Matt-W ouch
so every time rakudo makes an object it gets hit with an extra new pmc? 13:58
pmichaud not every time, but a lot of them.
Matt-W enough, clearly
pmichaud we get extra new pmcs every time we create a new instance of $_, $/, and $!, at minimum :-)
Matt-W that happens quite a lot, doesn't it
jnthn Indeed. 13:59
Matt-W Oh dear
pmichaud I might go ahead and use a macro for our hand-rolled PIR code, though.
I don't want actions.pm to be using macros
13:59 skids left 14:00 skids joined
pmichaud heh 14:00
instead of a macro, it's _almost_ worth creating a dynop.
that might make actions.pm easier to handle as well 14:01
Matt-W it'd be nice to have something that keeps it a one-liner
else someone's bound to stick the bad way in by mistake 14:02
jnthn pmichaud: dynop works for me. 14:05
14:06 DemoFreak left
pugs_svn r26892 | jnthn++ | [t/spec] Some unfudging, test review/tweak and additional tests for attribute initialization. 14:07
pmichaud I really wish there was a clear-cut description of class name resolution in Parrot. 14:08
e.g. what difference is there (if any) between $P0 = new 'Integer' and $P0 = new ['Integer']
14:09 payload joined
dalek kudo: f62aa0f | jnthn++ | src/ (2 files):
Refactor our handling of attribute initializers. The RHS should become an anonymous method. This should get us in line with the spec, and resolves at least RT#65346.
14:09
jnthn pmichaud: Aye, same.
pmichaud: I've never been too clear on what the difference is. 14:10
Or what ['Foo'] actually means.
pmichaud well, it's changed over time.
jnthn Ah.
14:14 mizioumt left
jnthn dives into the multi-dispatcher to try and sort out 64882 14:16
14:16 [sbp] left 14:17 [sbp] joined 14:18 iblechbot joined
pmichaud any ideas what to call the dynop? We'd only use it when creating PMC instances. 14:24
jnthn new_pmc
14:26 masak joined
Matt-W surprisingly_unslow_new 14:26
masak Rakudo Day! \o/
lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
jnthn masak: Indeed. :-)
pmichaud I thought of 'new_pmc' also, but I fear it's too easily confused with 'new' 14:27
masak jnthn: excuse me, but Uppsala is _not_ in the north of Sweden. :P
jnthn rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new.c
p6eval rakudo f62aa0: OUTPUT«3␤»
jnthn masak: Tell that to the average Swede. :-P
pmichaud masak: thanks for the update to the announcement; fwiw, you can pretty much change that section to say whatever you want about Stockholm.pm
Matt-W Friend of mine went to university in Uppsala 14:28
pmichaud masak: new toy
rakudo: say qx{ls};
p6eval rakudo f62aa0: OUTPUT«build␤Configure.pl␤CREDITS␤docs␤LICENSE␤Makefile␤parrot␤perl6␤perl6.c␤perl6.o␤perl6.pbc␤perl6.pir␤perl6_s1.pbc␤rakudo_revision␤README␤src␤t␤Test.pir␤Test.pm␤tools␤␤»
masak pmichaud: I have surprisingly little contact with Stockholm.pm -- I usually meet them at Sweden-arranged NPWs.
pmichaud++ # qx!
jnthn "Stockholm.pm is the best pm group in the world. We travel together in our volvos to Ikea, and eat meatballs together while talking about Perl."
masak jnthn: yes; so what? don't all pm groups do that? :) 14:29
@messages
Matt-W No
lambdabot TimToady said 15h 14m 4s ago: STD isn't trying to be a full POD parse yet, and I don't think writing the specs for it via the bug reporting system is going to be terribly efficient :)
Matt-W Nottingham.pm appears to have folded
masak TimToady: you do have a point. 14:30
pmichaud stares at that word "yet"
masak lambdabot: did you lose my other messages?
14:30 [sbp] left
pmichaud masak: anyway, feel free to adjust the announcement to your liking :-) 14:31
masak TimToady: let me know if there's some way, besides helping with the Pod::Parser effort, to efficiently spur Pod parsing development.
pmichaud (and yes, what you have now is fine)
masak pmichaud: thank you. :)
14:31 [sbp] joined, justatheory joined
jnthn oh noes my stereotypes missed mentioning abba... ;-) 14:31
masak pmichaud: I did consider finding out the last number of rakudobug tickets I've submitted, and adding that. 14:32
but for some reason, it felt a bit like boasting... :P
pmichaud masak: self-promotion is okay in my book :-)
14:32 payload1 joined 14:33 payload left
pmichaud and in this case, it's effectively Rakudo citing your accomplishments, as opposed to you boasting about them :-) 14:33
masak how convenient. :) 14:35
(people emailing, offering summer jobs)++ 14:36
Matt-W nice 14:37
14:43 sbp is now known as sbp`, [sbp] left 14:44 nihiliad joined 14:45 sbp joined 14:46 mizioumt joined 14:47 sbp` left 14:48 sbp` joined
masak ooh, and $.c = $.a + $.b works too now. jnthn++ 14:54
14:55 zamolxes left
jnthn masak: Thought you'd like that one. 14:56
masak jnthn: I do indeed! 14:57
jnthn Woo. 2 MMD bugs fixed in 1 patch. ...if I make it through the spectets.
aww..no. 14:58
15:03 jferrero joined
pmichaud "new_parrot" # dynop to create a new PMC for a parrot class 15:03
as in
$P0 = new_parrot 'Integer'
or
masak japhb: thank you very much for the pull request. I've now reviewed the code. haven't decided whether to pull it in or not yet.
pmichaud $P0 = new_parrot 'Perl6Scalar'
15:04 mizioumt1 left
jnthn pmichaud: Well, it reads kinda OK. 15:04
pmichaud I'm open for other suggestions, still.
jnthn Still prefer new_pmc, but not a big deal.
pmichaud new_pmc strikes me as being too close to the various C functions of similar names. 15:05
jnthn ah, true
masak japhb: (there's certainly nothing wrong with the code quality, by the way. it's just that (1) I've been thinking of exactly this type of change in the past few days, and I arrived at a slightly different design, and (2) I'm not sure whether the addition of the 'graphdeps' subcommand is necessary for proto. maybe that should be a module using proto instead.)
pmichaud kind of like how get_pointer, get_addr, etc. are currently all convoluted 15:06
jnthn looks at S06-multi/positional-vs-named.t and wonders (a) is it right and (b) how on earth did we ever pass it before.
pmichaud checking.
jnthn oh duh
ignore me
we don't run it.
I think it's wrong anyways.
multi earth (:$me) {"me $me"};
multi earth (:$him) {"him $him"};
Expecting those two to not be ambiguous (certainly in Perl 6.0.0) is most likely wrong. 15:07
pmichaud originally mmd-based-on-named-args was part of the spec.
jnthn Aye.
OK, in this case my patch might be OK.
15:09 tulcod joined
masak wherein lies the difficulty in named-args-based mmd? (not questioning that it's difficult, just ignorant/curious.) 15:10
pmichaud it's very easy to end up with ambiguous dispatch. 15:11
masak in a qualitatively different way from other dispatch?
pmichaud I'm not sure about that. 15:12
jnthn masak: The narrowness analysis gets a bit more complex since you need to match up nameds. The dispatcher gets harder 'cus it has to do the same. Trying to build an efficeint MMD cache for nameds is harder too. 15:13
pmichaud It does seem that it complicates the narrowness criteria a fair bit.
jnthn I haven't spent time working through all of the issues that would arise from it.
I can say that getting the positional case correct and efficient has been non-trivial. 15:14
masak ok.
jnthn (And continues to be...)
masak jnthn++ # Perl 6 MMD
jnthn I don't know it'd be impossible to do, but I do know perl6multisub.pmc is not the simplest bit of code in Rakudo already. ;-) 15:15
And MMD is kind of a "hot path" too.
masak maybe another target for a review blog post...
I already have the spectest suite and PGE queued up, though...
jnthn masak: In 65700 subset types are now enforced, but here we seem to hit issues because a lexical subset type doesn't work out too well. 15:17
masak: If you have a moment, feel free to confirm that and transform the ticket into one about that.
erm, for the respective "that"s. 15:18
masak I submitted my first rakudobug on 2008-05-07. Since then, I've submitted 393 rakudobugs. that's a smidgeon over 1 bug per day. 15:19
15:20 donaldh left, alester joined
jnthn masak++ 15:20
High Score!
15:20 donaldh joined
masak :) 15:20
15:20 [particle] joined
masak jnthn: what's the ticket number? 15:20
jnthn masak: I wrote it... 15:21
rt.perl.org/rt3/Ticket/Display.html?id=65700 # clicky
pmichaud afk for a bit
masak jnthn: ah, I thought that was a Parrot revision number. :)
jnthn oh :-)
masak changes ticket 15:24
15:25 hercynium joined
masak jnthn: I can confirm that the evaluation still gives exactly the same result on my box. 15:27
jnthn: so if you want, I can change the ticket subject to "lexical subset types don't work out to well" 15:30
jnthn masak: Well, if you do: 15:34
rakudo: subset B of Int where { $^n < 10 }; class A { has B $.c }; A.new( c => 20 ); say "alive" 15:35
p6eval rakudo f62aa0: OUTPUT«Type mismatch in assignment; expected something matching type but got something of type Int()␤in Main (/tmp/I9bgeo9Pp5:1)␤»
jnthn rakudo: subset B of Int where { $^n < 10 }; class A { has B $.c }; A.new( c => 2 ); say "alive"
p6eval rakudo f62aa0: OUTPUT«alive␤»
jnthn So it's clearly checking the subset type when it's non-lexical.
rakudo: my subset B of Int where { $^n < 10 }; class A { has B $.c }; A.new( c => 20 ); say "alive"
p6eval rakudo f62aa0: OUTPUT«alive␤»
jnthn It's when we stick a "my" there that we run into issues. 15:36
15:37 Psyche^ joined
masak ah. 15:40
masak updates ticket
jnthn Ooh, I get a test fail but the test is bogus. rakudo_fixes++
oh, hang on...
:-S
15:51 eternaleye left 15:52 Patterner left, Psyche^ is now known as Patterner
TimToady rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new(:a(40)).c 15:54
p6eval rakudo f62aa0: OUTPUT«42␤»
PerlJam rakudo++
TimToady rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new(:b(41)).c
p6eval rakudo f62aa0: OUTPUT«42␤»
TimToady rakudo++ indeed 15:55
jnthn++ too
masak rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new(:c(42)).c
PerlJam yeah, can't forget jnthn++
p6eval rakudo f62aa0: OUTPUT«42␤»
masak ...just to complete the set.
PerlJam (of course, these results could all just be special cases that we're being fooled into believing are general ;-) 15:56
[particle] rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new(:a(44), :b(-2)).c
p6eval rakudo f62aa0: OUTPUT«42␤»
[particle] rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new(:a(99), :b(-99), :c(42)).c
p6eval rakudo f62aa0: OUTPUT«42␤»
[particle] jnthn++ rakudo++ 15:57
TimToady rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new(:b(Object)).c
p6eval rakudo f62aa0: OUTPUT«Use of type object as value␤1␤»
TimToady rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new(:b(undef)).c
p6eval rakudo f62aa0: OUTPUT«Use of uninitialized value␤1␤»
TimToady rakudo: say Object === undef
p6eval rakudo f62aa0: OUTPUT«0␤» 15:58
TimToady erm
PerlJam rakudo: class Foo { has $.a = 1; has $.b = 2; has $.c = $.a + $.b;}; say Foo.new(:b(Object but 4)).c
p6eval rakudo f62aa0: OUTPUT«The but operator can only be used with a role or enum value on the right hand side␤in Main (/tmp/IK2K4SAsLn:1)␤»
TimToady rakudo: say undef.WHAT
p6eval rakudo f62aa0: OUTPUT«Failure()␤»
dalek kudo: 14bba5f | masak++ | docs/announce/2009-05:
[docs/announce/2009-05] added details about rakudobugs
jnthn TimToady: What is the "erm" at? I didn't see anything that looked wrong.
TimToady is okay
I was still thinking undef is Object, but Failure is okay 15:59
rakudo: my $x; say $x.WHAT
p6eval rakudo f62aa0: OUTPUT«Failure()␤»
TimToady that doesn't seem right
jnthn No, it doesn't. 16:00
TimToady uninitialized isn't failure
jnthn That shoulda been Object, right?
TimToady I wouldn't *mind* if undef === Object
PerlJam that poor, poor variable. I bet it has a complex about being a failure
TimToady one should use fail() to return failure
or maybe undef should be Nil 16:01
skids PerlJam: wait, Failure is an imaginary number? :-)
16:02 dakkar left
masak while we're all here: what's the accepted way to answer the question "was the value of this parameter passed or was it assigned its default value?"? 16:02
jnthn TimToady: Maybe Nil so it behaves more nicely in lists, yeah...
[particle] (undef as Nil)++
16:02 kst left
PerlJam TimToady: undef == Nil feels right to me. 16:02
[particle] that's how i have thought of it
TimToady well, currently specced to be Failure
16:02 kst joined
jnthn TimToady: How are your branes doing on re-speccing traits, btw? 16:02
[particle] good thing i don't read the spec much ;) 16:03
PerlJam masak: how do you tell the difference between the default and being assigned the same value as the default?
TimToady well, the question is whether 1,$undef,3 should complain, I suppose
skids masak: I thought the whole idea of defaults was to make the code not have to bother with that scenario?
PerlJam masak: I don't think you can. (or, it seems a strange thing to want to me anyway)
skids If you want that, don't use an default, use a //= in the body. 16:04
masak skids, PerlJam: hold on, I'll drag up the RT ticket where I last formulated this question.
(or something a bit like it)
TimToady jnthn: on traits, there's a dependency on exactly how syntax changes propagate to another scope, which I'm still trying to work out
jnthn TimToady: Do you see traits as a language tweak?
(I hadn't been.) 16:05
masak ah, here: rt.perl.org/rt3/Ticket/Display.html?id=64928
jnthn Or do you mean just the same underlying thing that they both need?
TimToady new trait_auxiliarys and verbs are tweaks
masak oh right, so it's "how do I know whether an optional typed param was passed?" 16:06
TimToady and I think every tweak wants to desugar to an augment slang, but I really want to get that working in STD
masak I think the way things are now is a bit problematic.
TimToady unfortunately this is all on the border of what STD can't do
because it doesn't actually run Perl 6
pmichaud ...so, we need STD running in rakudo, yes? ;-) 16:07
jnthn TimToady: In the case where you you define a multi trait_auxiliary:<is>(...) {...} too?
TimToady: That is, even if you aren't introducing new syntax, just an overload?
PerlJam Clinton was right to ask about the definition of "is" :)
jnthn (I'm trying to get a sense of what counts as a language tweak.)
PerlJam masak: why do you need to know?
TimToady well, it's certainly something that has to get imported at least, like any other multi 16:08
jnthn Sure.
masak PerlJam: if I have a parameter %h? I might somethimes want to know whether it was passed or not.
PerlJam: I don't remember exactly why I needed it in this particular instance.
TimToady so probably that can just be considered a strange name
masak PerlJam: I just think it's a reasonable question.
TimToady I think importing strange names has to trigger the addition of syntax
if the syntax isn't already there
jnthn Sure. So overloading an existing operator with another multi counts as a language tweak? 16:09
16:09 baest joined
TimToady kinda 16:09
masak PerlJam: the alternative is to make two multisubs, one with and one without the param. that's certainly an option, but sometimes the code in the two multis would be very similar, only differing in one place, say.
jnthn :-)
PerlJam masak: okay, I finally read through that IRC log. Yes, defined() seems like a good way to tell if an optional parameter was given a value or not. (but if you really want to differentiate between a default value and a passed value, I don't see the utilityz) 16:11
s/z//
TimToady rakudo: my $x; $x .= new; say $x.WHAT
p6eval rakudo 14bba5: OUTPUT«Failure()␤» 16:12
masak PerlJam: no, but I definitely would like to know whether an optional param was passed or not.
rakudo: my (%h?)
p6eval rakudo 14bba5: OUTPUT«get_pmc_keyed_str() not implemented in class 'String'␤in Main (/tmp/6vPzQGbrFH:1)␤»
masak jnthn: bug? :)
16:12 jan_ joined
masak std: my (%h?) 16:12
p6eval std 26892: OUTPUT«ok 00:02 37m␤»
PerlJam but what does it mean? :) 16:13
TimToady it means that *if* you were to bind to it, it would be optional
16:14 payload1 left
jnthn masak: I'm not even sure where ti's blowing up... 16:14
*it's
masak jnthn: that wasn't my question. :)
jnthn oh, runtime.
Hmm
TimToady my Any $x; $x .= new; say $x.WHAT 16:15
rakudo: my Any $x; $x .= new; say $x.WHAT
p6eval rakudo 14bba5: OUTPUT«Any()␤»
16:15 ejs2 left
jnthn masak: It shouldn't crash like that. 16:15
TimToady rakudo: my Object $x; $x .= new; say $x.WHAT
masak submits rakudobug
p6eval rakudo 14bba5: OUTPUT«Object()␤»
jnthn But I'm not really sure what it means... :-)
masak :)
jnthn: "what use is a new-born baby?" :) 16:16
TimToady rakudo: my (%h?) := ()
p6eval rakudo 14bba5: ( no output )
TimToady rakudo: my (%h) := ()
p6eval rakudo 14bba5: ( no output ) 16:17
jnthn TimToady: I *very* much doubt binding is doing the right thing in Rakudo like that yet.
TimToady: Would my (%h?) actually declare a %h?
TimToady no, it declares %h
masak :) 16:18
TimToady the thing in parens parses exactly like a signature
jnthn TimToady: I think you interpreted my question as "...declare a %h??" ;-)
masak feels like Alice in Wonderland 16:19
skids masak: there's that conjecture about stacking longnames, not to say that's necessarily the best resolution.
TimToady what is the name of the hash called?
jnthn %h
masak skids: not sure what that would entail.
skids Just a multi with multiple signatures sharing the same body.
masak TimToady: no, that's the name of the hash. not what the hash is called.
skids It's supposedly somewhere in S12
masak (in Mandarin Chinese, people say "my name is called...") 16:20
rjh and in French?
PerlJam TimToady: so, would that mean that my ($a,$b,$c) := mumble would (should) complain if one of $a, $b, or $c isn't provided by the RHS?
TimToady yes 16:21
masak rjh: in French, "I call myself...", AFAIU.
jnthn masak: AFAIU too.
heh, Rakudo is generating some pretty hashed up PIR for my (%h?) 16:22
masak this signature binding stuff is just begging for something like Prolog-style unification.
TimToady shh
masak :)
TimToady that's for 6.0.1
skids me llamo lama 16:23
jnthn skids: Ain't that Spanish?
skids yes, with a poorly spelled english llama 16:24
PerlJam Just don't defer too much stuff to the future. You don't want to end up like Knuth and only have 4ish volumes of a 7 volume set.
masak Knuth++ 16:25
what he's finished is impeccable.
if anything, we should be more like him. :)
PerlJam: you're not implying that Perl 6 isn't revolutionary enough already, are you? :) 16:26
jnthn Oh, I think my (%h?) the .viviself might be tripping things up. 16:27
16:28 azawawi joined
azawawi hi all 16:29
skids OT: www.aggregate.org/MAGIC/ <-- I knew most of these but some I had never seen. Like the dual linked list XOR trick. 16:31
16:31 cdarroch joined 16:40 jferrero left 16:41 nihiliad left 16:42 azawawi left
masak rakudo: sub foo(%h?) { say %h.defined }; foo 16:43
p6eval rakudo 14bba5: OUTPUT«1␤»
jnthn oh phew finally...I think my MMD fix passes all existing tests plus the new ones.
That was a lotta effort for a little patch... 16:44
16:44 Fuad joined
Fuad hi all 16:44
jnthn hi Fuad
Fuad How are you jnthn ?
masak Fuad: hello, buddy!
Fuad Hello ,masak:)
jnthn Fuad: I'm good, thanks. :-)
Fuad Hows you bros?:)
masak is just fine 16:45
jnthn Fuad: Happily hacking on Rakudo, trying to get some bugs cleaned up before the release.
masak jnthn++ 16:46
pugs_svn r26893 | jnthn++ | [t/spec] Several tests to cover a couple of now-resolved RT tickets. 16:48
16:50 masak left
dalek kudo: 01ec2a7 | jnthn++ | src/pmc/perl6multisub.pmc:
Fix up Perl6MultiSub to not let named paramters get in the way in various cases. Resolves two RT tickets. Also name a magic value and a little visual tweak.
16:51
jnthn OK, that's that done.
What now...
rakudo: class A { has &!m = method {}; method f { &!m() } }; A.new.f 16:52
p6eval rakudo 14bba5: OUTPUT«No such attribute '!m'␤in method A::f (/tmp/JSBdZRgt1W:1)␤called from Main (/tmp/JSBdZRgt1W:1)␤»
jnthn Maybe this one. :-)
Fuad :) 16:54
16:54 mberends left 16:56 payload joined 16:57 gbacon left
Tene pmichaud: I have ideas for hllcompiler support for PIR libraries... will detail later. 17:01
Must go to work now.
17:04 ejs joined
pmichaud Tene: excellent. 17:04
17:14 ejs left, justatheory left 17:15 Fuad left 17:29 amoc^ left, sri_kraih_ left 17:33 ejs joined 17:35 sparc left, nihiliad joined 17:38 ElectricHeavyLan joined 17:39 nihiliad left 17:41 japhb left 17:45 nihiliad joined 17:48 ascent__ is now known as ascent_ 17:53 abra joined
jnthn std: class x { has &!foo; method y($x) { $x.&!foo } } 17:54
p6eval std 26893: ( no output )
jnthn huh
std: class x { has &!foo; method y($x) { $x.&!foo } }
p6eval std 26893: ( no output )
jnthn :-(
17:57 ejs left 18:00 ejs joined
pugs_svn r26894 | lwall++ | [STD] allow .& as noted by jnthn++ 18:02
18:02 [particle]1 joined
jnthn rakudo: .ffs 18:07
p6eval rakudo 01ec2a: OUTPUT«Method 'ffs' not found for invocant of class 'Failure'␤»
jnthn Hmm.
TimToady also not a failure 18:08
variables should not be (un)initialized to Failure
jnthn nod 18:09
18:10 lichtkind joined
jnthn Hmmm. Cook or go for pizza+pivo... 18:11
jnthn nearly has attributes with & sigils working now...
TimToady std: std: class x { has &!foo; method y($x) { $x.&!foo } } 18:12
p6eval std 26894: OUTPUT«##### PARSE FAILED #####␤Syntax error at /tmp/qbkVwnXP2E line 1:␤------> class x { has &!foo; method y($x) { $x.&!foo } }␤ expecting postfix_prefix_meta_operator␤FAILED 00:03 53m␤»
TimToady hasn't reprocessed yet
std: std: std: std: std: std: class x { has &!foo; method y($x) { $x.&!foo } }
p6eval std 26894: OUTPUT«##### PARSE FAILED #####␤Illegal redeclaration of 'std' at /tmp/fcAfqfBBDF line 1:␤------> std: std: std: std: std: class x { has &!foo; meth␤FAILED 00:02 35m␤»
TimToady heh, caught me 18:13
jnthn chases TimToady++'s STD change. 18:15
18:16 fridim_ joined
jnthn woo, works 18:17
(will commit spectest for it later too) 18:19
TimToady std: class x { has &!foo; method y($x) { $x.&!foo } } 18:22
p6eval std 26894: OUTPUT«ok 00:03 53m␤»
jnthn \o/
TimToady btw, trait_verb and trait_auxiliary are going to combine into trait_mod, but the actual action routines will not use those names, but some variant of TRAIT_IS(), TRAIT_DOES(), etc 18:23
18:23 justatheory joined
TimToady trait mods are the syntax, and the multis to which we dispatch are just uppercase to indicate automatically called routines 18:24
so when you add syntax for a trait_mod, the compilation of it needs to say what routine to call with what arguments 18:26
(I presume that currently there is a call to trait_auxiliary:<is> hardwired in there somewhere
18:26 nsh joined
TimToady it would just hardwire to TRAIT_IS (or whatever) instead 18:26
jnthn Well, there isn't, because we've been cheating on the built-in traits.
I was going to modify things to be calling trait_auxiliary:<is>, but anyways :-) 18:27
How does this deal with namespacing of, e.g. rw?
TimToady ah, well, we could cheat to the extent of extracting the <sym> and munging it into the name, but it won't help the problem that different trait_mods actually process different arguments
18:28 Chillance joined
TimToady doesn't say anything about namespaces yet 18:28
jnthn We cheat just out of making it work. I'm fine with whatever it's meant to become.
18:28 gbacon joined 18:29 nsh left, japhb joined
jnthn OK, I'm feeling lazy...pizza it is. bbiab 18:30
18:32 M_o_C left, nsh joined 18:33 nsh left 18:37 nsh joined 18:38 nsh left, nsh joined, nsh left 18:49 nihiliad1 joined, nihiliad left 18:51 justatheory_ joined 18:54 justatheory left 18:55 nihiliad joined, nihiliad1 left 18:58 finanalyst joined
finanalyst is there anything in the specifications that associates directory structure with module naming? Eg. if i "use mym::subm" must i have .../mym/subm.pm? 19:01
19:01 abra left, donaldh left
TimToady see S11:236 19:05
19:09 pmurias joined 19:12 masak joined
masak flakyneighbourwifi. hello. 19:13
finanalyst TimToady: sorry to be a half-wit: is there a neat way to see the line numbers using the html versions of the synopses? or will i need to get the pod version? 19:14
masak finanalyst: you can 'view source' and see the line numbers.
but getting the pod version isn't such a bad idea either. 19:15
19:16 icwiener_ joined, icwiener left
finanalyst thanx for view source idea. i did download, but they change faster than i can keep up. so i prefer now to view from web 19:17
masak finanalyst: well, by downloading via svn or git-svn, keeping up is as easy as updating the local copy.
...with the added bonus that if you want to know what changed, you can query the commit logs. 19:18
19:18 FabioCavallaro joined
finanalyst view source doesnt work cos all the extra html padding bias the line numbers 19:19
masak I'm sorry?
19:20 donaldh joined
finanalyst duh (: 19:21
i was looking at the html version of the Synopsis
changed to pod version
now it works.
masak I have no idea what didn't work for you, but I'm glad it works now. :) 19:22
jnthn back from dinner 19:24
19:24 FabioCavallaro left, meppuru left
finanalyst just to explain: i look at the Synopses at perlcabal.org/syn/ 19:25
these have a version that is marked up with html
the extra html lines increase the number of lines
dalek kudo: 60f709d | jnthn++ | src/parser/grammar.pg:
Follow a STD.pm addition.
19:27
19:29 clintongormley left 19:30 lambdabot left, kst left 19:31 Scorp|away joined, kst joined
Scorp|away Hi. I appearently am address banned from #perl. I have no idea why, but I was hoping someone could unban me? 19:31
pugs_svn r26895 | jnthn++ | [t/spec] Tests for attributes with the & sigil. 19:32
dalek kudo: ba0b2be | jnthn++ | src/ (2 files):
Some tweaks to handle has &!foo and has &.foo. Resolves RT#64650 and RT#64270.
19:33
19:33 lambdabot joined 19:35 Scorp|away is now known as Scorp1us
xinming_ Scorp1us: I'm asking you for this. 19:35
in #perl
19:36 justatheory joined 19:37 xinming_ is now known as xinming, DemoFreak joined
Scorp1us I got this: #perl unable to join channel (address is banned) 19:37
xinming Scorp1us: It's ok, You are now in #perl, let's not pollute this channel. :-) 19:38
19:40 masak left 19:41 justatheory left 19:44 masak joined 19:45 DemoFreak left 19:48 DemoFreak joined, masak left 19:49 justatheory joined 19:59 tulcod left 20:00 justatheory_ left 20:04 finanalyst left 20:16 szabgab left 20:24 tulcod joined
ruoso decommute & 20:29
20:29 ruoso left 20:30 justatheory left
dalek kudo: b4f301d | jnthn++ | docs/ChangeLog:
ChangeLog tweaks.
20:37
20:39 ejs left 20:40 kidd joined 20:44 donaldh_ joined 20:48 skids left, DemoFreak left 20:51 DemoFreak joined 20:55 pmurias left, skids joined 21:02 Su-Shee left 21:03 H1N1[A] left 21:10 bacek left 21:13 mizioumt left 21:16 meppl joined 21:22 H1N1[A] joined, Whiteknight joined 21:31 szabgab joined 21:35 donaldh_ left 21:46 [particle]1 left
jnthn is getting there with meta-ops for user defined ops 21:57
sub infix:<wtf>($a, $b) { $a ~ "WTF" ~ $b }
my $a = "OMG"; $a wtf= "BBQ"; say $a;
OMGWTFBBQ
21:59 jferrero joined 22:02 Whiteknight left 22:12 bacek joined, ruoso joined 22:17 nihiliad left
pugs_svn r26896 | jnthn++ | [t/spec] Basic tests for meta-operators generated from user defined operators. 22:19
22:23 justatheory joined 22:26 icwiener_ left 22:27 justatheory left 22:32 [particle]1 joined 22:33 alester left 22:42 M_o_C joined
pmichaud jnthn: is every infix: op that gets added also defining its metaop versions? 22:48
22:49 ElectricHeavyLan left 22:50 szabgab left
jnthn pmichaud: I've left the original gen_metaop approach for all built-ins. 22:51
pmichaud sure, but that doesn't answer my question :-)
jnthn pmichaud: We only follow this new code-path for user-defined ops.
pmichaud okay, *that* answers it :-)
22:51 tulcod left
jnthn And then only for infixes. 22:51
pmichaud I might want to review the patch before it goes in.
or, if you can just nopaste it real quick, I can see if the approach agrees with me :-) 22:52
22:52 szabgab joined
jnthn oh, gah, I already did commit 22:52
oh, wait, but I didn't push
pmichaud spectested it yet?
jnthn ...erm, how does I get a diff of something I comitted but didn't push?
yes, spectested.
all pass.
pmichaud git diff ORIG_HEAD or git diff FETCH_HEAD or something like that
jnthn Plus the new test file I wrote.
pmichaud Go ahead and push, then if spectest passes.
I might ask you to refactor it :-) 22:53
jnthn OK
TimToady the spectest doesn't test if Xwtf is list infix prec
if list infix, should need the extra parens aroung its args
jnthn pmichaud: That's fine, though it'll be tomorrow for the refactor in that case, I'm tired.
TimToady *shouldn't
pmichaud jnthn: no problem, it'll be tomorrow before I can tell you if I want a refactor. :-)
jnthn pmichaud: But you'll probably be happy to know that it adds very little to actions.pm 22:54
dalek kudo: 6381427 | jnthn++ | src/ (2 files):
Implement generation of meta-ops for user-defined operators. Resolves RT#65660.
pmichaud hopefully your changes don't stomp on the huge set I've just made.
jnthn pmichaud: And mostly works in terms of lexicals.
pmichaud: Unlikely. It's a few lines added in actions.pm.
And then one contiguous bunch of PIR in op.pir
So basically only 2 hunks. :-) 22:55
pmichaud okay, it looks generally okay.
pugs_svn r26897 | lwall++ | [metaoperators] test that Xwtf is list infixy
pmichaud no refactor needed as yet :-)
jnthn We could probably generalize it a bit more by swapping around the order of the arguments to !HYPEROP
TimToady: Happily, it still passes just fine like that :-) 22:56
jnthn adds the test file to spectest.data 22:58
TimToady++ # reviewing the new tests
pmichaud I generally prefer to be using .const 'Sub' instead of find_name these days, fwiw.
*much* safer.
(e.g., in generate_meta_op_sub) 22:59
seems like generate_meta_op_sub could also be doing the set_hll_globals
jnthn pmichaud: I did originally, then wanted to choose different ones...but yes, I could still have passed in the sub rather than the name...
dalek kudo: 3c425eb | jnthn++ | t/spectest.data:
Add S13-overloading/metaoperators.t to spectest.data.
pmichaud anyway, cool work :-) jnthn++ 23:01
jnthn pmichaud: Aye. You're probably right on both of those...
pmichaud: Anyway, another day. :-)
pmichaud sure.
jnthn How's the op going?
pmichaud I may refactor it a bit (after release) to have that function also handle the token for the operator itself, as well as its meta ops. 23:02
23:02 iblechbot left
jnthn use.perl.org/~JonathanWorthington/journal/39011 # rakudo day report 23:02
pmichaud the op itself was very easy to implement -- converting all of the existing uses of new 'XYZ' is a bit tedious.
jnthn *nod*
Have you see a performance increase from the ones you did so far? 23:03
pmichaud a bit.
I did a short test using the new op versus the old way of doing it and saw a significant increase
nopasting...
(waiting for perl6 to build, actually)
jnthn Down to 326 tickets now. 23:05
We have more RT tickets than Parrot. ;-) 23:06
But Parrot has TTs too. :-)
pmichaud gist.github.com/115147 # cost of using $P0 = new ['Integer'] versus $P0 = root_new ['parrot';'Integer'] 23:07
jnthn OK, pretty significant. 23:08
pmichaud: How often are we creating Perl6Scalar PMCs BTW? Are they the most common type we create? 23:09
pmichaud especially since it impacted pretty much every ResizablePMCArray, Perl6Scalar, ObjectRef, P6invocation, Perl6MultiSub, etc.
anytime we enter a block we get at least three Perl6Scalar PMCs (for $_, $/, $!)
anytime we call a sub we end up with an ObjectRef 23:10
jnthn Resolving the name by string/key every time is a real drag.
Especially when in a given run we can (once) map the name to an ID.
pmichaud we'd still have to do the lookup of that id.
jnthn I'm wondering if we can do that once though, and have a dynop that creates it by ID. 23:11
Yes, it's evil evil evil.
pmichaud you mean a constant int of some sort?
probably epic fails with .pbcs 23:12
jnthn No, you'd do it per run and cache it.
pmichaud cache it where?
right now it's going to be fairly efficient -- at least as efficient as going from a key to a namespace 23:13
jnthn static INTVAL id = 0;
inline op create_p6s(out PMC, in PMC) { if (id == 0) lookup; $1 = pmc_new_init(interp, id, $2); goto NEXT();
}
gah, pasting fial
*fail
pmichaud oh, you mean just for Perl6Scalar
not in genera 23:14
l
jnthn yeah, thus why I was asking if it's a hot path.
pmichaud I'm not sure it's that hot.
jnthn But really I'd hope a JIT could do the general case...
"We know new + this constant string = this type ID"
pmichaud they aren't strings, though. 23:15
they're keys
jnthn They're still PMC constants, ze?
pmichaud sure, they're PMC constants, no problem.
anyway, it's something I'd want to profile before pursuing too far.
jnthn Sure, I'm not suggesting we do it Right Now.
I'm just pondering how we can do better in the future. 23:16
pmichaud btw, something to keep in mind when looking at using :immediate for hll sub mapping is to make sure it will still work with precompiled .pbc's
iirc, :immediate subs get lost when converting to .pbcs
jnthn Yes, good point, already considered it. :-) 23:17
pmichaud okay, good.
jnthn I do it in the :load :init too.
pmichaud but isn't that too late?
jnthn I do both.
pmichaud when the bytecode gets saved to .pbc, do the subs of the .pbc already have their newly blessed type in place? 23:18
jnthn As I understand it, if we're creating them as Perl6MultiSub thanks to the hll_map then we'll be freezing them as Perl6MultiSub too.
pmichaud okay, I still haven't figured out how that works.
jnthn So there won't be anything to re-bless at startup.
pmichaud I.e., how does the frozen Perl6MultiSub know how to map to the (dynpmc) type when loaded?
jnthn Just the same as it does for MultiSub today.
Ugh. I didn't check that bit worked. :-| 23:19
I was under the impression it did.
pmichaud and presuming that we do ./parrot hello.pbc
jnthn (That there's a fix-up table for this stuff.)
pmichaud how would the Perl6MultiSubs in hello.pbc deal with the fact that the Perl 6 compiler hasn't even loaded yet?
23:20 donaldh left
jnthn In terms of their contents, they shouldn't care, just as Parrot MultiSub doesn't today. 23:20
23:20 donaldh joined
pmichaud except that Parrot MultiSub is already known to be loaded when we start up Parrot 23:20
because it's a "core PMC"
jnthn There's a references segment in a PBC that is supposed to contain the things that we need to load.
pmichaud okay, I'll presume it works until I see otherwise, then :-) 23:21
jnthn Yeah, I'm maybe assuming too much works, when actually it doesn't yet.
It'll need fixing up at some point, though.
pmichaud I'd just say to make sure the "compile to pbc and run pbc" option works before being too hasty on commit.
jnthn Going on re-blessing is kinda gonna suck...
pmichaud if it doesn't work, we need to decide which is more important
or an appropriate workaround.
jnthn Sure.
Making everything a Perl6MultiSub will solve various lingering issues. 23:22
I'm wanting this for more than just a little start-up performance win.
pmichaud will Rakudo still be able to work with non-Perl6MultiSubs?
jnthn You mean, from outside of the Parrot HLL?
pmichaud yes, libraries not written in Rakudo. 23:23
jnthn (Ones created outside of and passed in or imported...)
Yes, I see no reason why not.
pmichaud okay.
jnthn The end goal here is that we'll emit all sub calls and method calls just as Parrot ones, so it shouldn't matter what you're calling etc.
pmichaud that's an end goal I'd really like. :-)
jnthn The abstraction is going to get leaky if you start trying to introspect them.
pmichaud I don't mind if non-Rakudo subs leak. 23:24
jnthn But if you just wanna call them, sure, shoudln't be an issue.
pmichaud if someone is importing stuff from some other hll, then leaks are a little bit to be expected.
jnthn Trying to .signature or .candidates a non-Rakudo multi is probably not going to end well.
I think - and aim for - nothing worse than a "method not found" error though. 23:25
pmichaud I'm fine with .signature and .candidates pessimization
okay, time for dinner here. bbl. Nice work today, as always.
jnthn :-)
Enjoy dinner
I'm probably sleeping soon, so catch you tomorrow. 23:26
23:27 cotto left 23:32 cdarroch left 23:35 cotto joined, cotto left 23:39 araujo left 23:40 araujo joined, bacek left 23:42 araujo left, cotto joined 23:44 araujo joined 23:48 araujo left 23:49 sri_kraih joined 23:52 DemoFreak left 23:55 jferrero left