Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-06-17

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 cognominal_ joined #perl6
00:04 [particle] joined #perl6
00:04 amoc joined #perl6
00:05 nihiliad joined #perl6
00:06 [particle] joined #perl6
00:19 cotto joined #perl6
00:25 amoc joined #perl6
00:26 frioux joined #perl6
00:29 bacek joined #perl6
00:29 DanielC_ joined #perl6
00:39 rfordinal joined #perl6
00:47 cognominal_ joined #perl6
00:48 araujo joined #perl6
01:07 nihiliad joined #perl6
01:16 meppl joined #perl6
01:17 mycelium joined #perl6
01:22 netfish joined #perl6
01:57 payload joined #perl6
01:57 Adrian-bne joined #perl6
02:18 rfordinal3643 joined #perl6
02:25 rfordinal joined #perl6
02:28 japhb pmichaud: How do I create a Parrot type from Rakudo?  In particular, I'd like to create a ManagedStruct.
02:32 rfordinal joined #perl6
02:43 eternaleye joined #perl6
03:03 araujo joined #perl6
03:09 agentzh joined #perl6
03:17 sparc joined #perl6
03:48 meppuru joined #perl6
03:50 rfordinal joined #perl6
04:06 frioux joined #perl6
04:25 s1n moritz_: you've been reposted on rapid-dev.net
04:39 nihiliad left #perl6
04:40 bejuryu joined #perl6
04:49 Tene japhb: with current rakudo, make a PIR library that exports it
04:50 japhb Tene: Yeah, I'm sorta going that route with inline Q:PIR anyway, since once I have a ManagedStruct, I have to access it the elements using PIR.  $MS[0] = $one does not DTRT.
04:54 charsbar joined #perl6
05:00 mikehh_ joined #perl6
05:01 Tene nice
05:02 Tene japhb: what does it do that is wrong?
05:04 japhb Tene: It tries to apply postcircumfix:[] to get an lvalue, which can then be stored into.  But ManagedStruct just wants to do a keyed set.
05:06 Tene ew
05:06 Adrian-bne left #perl6
05:07 Tene Rakudo still has a ways to go in dealing with foreign objects.
05:08 japhb Tene: nodnod
05:08 Tene I noticed the other day that a rakudo functionsignature with a &var in it won't work with non-rakudo code objects
05:08 Tene still need to report
05:08 Tene sleep now
05:08 Tene afk
05:08 japhb nodnod
05:16 bejuryu joined #perl6
05:20 bejuryu joined #perl6
05:30 _jaldhar joined #perl6
05:36 frioux joined #perl6
05:39 justatheory joined #perl6
05:45 bejuryu_ joined #perl6
05:50 digitalise joined #perl6
05:57 digitalise joined #perl6
06:00 sparc_ joined #perl6
06:02 xinming joined #perl6
06:04 sparc___ joined #perl6
06:08 xinming__ joined #perl6
06:08 moritz_ good morning
06:15 literal @tell masak: yeah, been extra-busy with some other real-life things unfortunately, will pick up the pace
06:15 lambdabot Consider it noted.
06:19 szabgab rakudo: my @x = 1..4:by(2);
06:19 p6eval rakudo 952fe6: OUTPUT«Statement not terminated properly at line 2, near ":by(2);"␤in Main (src/gen_setting.pm:0)␤»
06:19 szabgab still not working right ?
06:19 szabgab std: my @x = 1..4:by(2);
06:20 p6eval std 27101:  ( no output )
06:20 clintongormley joined #perl6
06:20 sparc___ joined #perl6
06:20 moritz_ right
06:21 szabgab rakudo: my @x = ('a' .. 'd')
06:21 p6eval rakudo 952fe6:  ( no output )
06:21 szabgab rakudo: my @x = ('a' .. 'd'); @x.perl.say;
06:21 p6eval rakudo 952fe6: OUTPUT«["a", "b", "c", "d"]␤»
06:21 szabgab wow, this does not work on my version
06:22 rfordinal joined #perl6
06:22 moritz_ wow, how old is your version?
06:23 szabgab try this:     perl6 -e'my @x = ('a' .. 'd'); @x.perl.say'
06:23 szabgab it works inside but not on -e
06:23 moritz_ szabgab: -e ' ... 'a' ... ' is a bad idea
06:23 szabgab about 18 hours old :-)
06:23 szabgab crap :-)
06:24 sparc_ joined #perl6
06:24 szabgab yeah, works with the correct quotation
06:24 moritz_ rakudo sees no quotes around a, which is why it tries to call sub a()
06:24 szabgab sorry for the noise
06:24 moritz_ and complains about "Could not find non-existent sub a"
06:24 moritz_ happens to all of us sometimes ;-)
06:25 szabgab I think actually the shell complained
06:25 szabgab but I am not sure
06:25 moritz_ if you have bash, no.
06:25 szabgab ah
06:26 xinming_ joined #perl6
06:44 DemoFreak joined #perl6
06:45 kimtaro joined #perl6
06:46 kimtaro_ joined #perl6
06:48 szabgab rakudo: my @x = <a b c>; for 0..@x.elems-1 -> $i { say "$i {@x[$i]}" }
06:48 p6eval rakudo 952fe6: OUTPUT«0 a␤1 b␤2 c␤»
06:48 szabgab is there a nicer way to write this without the -1 ?
06:48 literal @elems.end, I believe
06:48 lambdabot Unknown command, try @list
06:48 moritz_ rakudo: for <a, b, c>.kv -> $i, $v { say "$i $v" }
06:48 p6eval rakudo 952fe6: OUTPUT«0 a,␤1 b,␤2 c␤»
06:49 moritz_ rakudo: my @x = <a b c>; for ^@x -> $i { say "$i {@x[$i]}" }
06:49 p6eval rakudo 952fe6: OUTPUT«0 a␤1 b␤2 c␤»
06:49 moritz_ rakudo: my @x = <a b c>; for @x.keys -> $i { say "$i {@x[$i]}" }
06:49 p6eval rakudo 952fe6: OUTPUT«0 a␤1 b␤2 c␤»
06:49 moritz_ TIMTOWTDI
06:51 moritz_ plenty of possibilities, actually
06:51 szabgab thanks, now I have to explain that :-)
06:51 moritz_ I think .keys is best to explain
06:52 moritz_ it's just the list of indexes that are known on the array
06:52 szabgab yeah it seems so
06:52 moritz_ ^@x is also not hard... ^n is the range 0..(n-1)
06:52 moritz_ so it uses @x in numeric context
06:53 szabgab rakudo: my @x = <a b c>; @x[4] = 'e'; for @x.keys -> { say "$i {@x[$i[}" }
06:53 p6eval rakudo 952fe6: OUTPUT«Statement not terminated properly at line 2, near "[$i[}\" }"␤in Main (src/gen_setting.pm:0)␤»
06:53 szabgab rakudo: my @x = <a b c>; @x[4] = 'e'; for @x.keys -> $i { say "$i {@x[$i[}" }
06:53 p6eval rakudo 952fe6: OUTPUT«Statement not terminated properly at line 2, near "[$i[}\" }"␤in Main (src/gen_setting.pm:0)␤»
06:53 szabgab rakudo: my @x = <a b c>; @x[4] = 'e'; for @x.keys -> $i { say "$i {@x[$i]}" }
06:53 p6eval rakudo 952fe6: OUTPUT«0 a␤1 b␤2 c␤Use of uninitialized value␤3 ␤4 e␤»
06:53 szabgab oh I can't write
06:54 M_o_C joined #perl6
07:02 iblechbot joined #perl6
07:02 ejs joined #perl6
07:15 Matt-W Good morning
07:15 ZuLuuuuuu joined #perl6
07:20 moritz_ s1n: re rapid-dev.net - have you got a link for me?
07:23 agentzh joined #perl6
07:23 moritz_ s1n: never mind, found it.
07:24 kimtaro joined #perl6
07:26 rfordinal joined #perl6
07:30 moritz_ bah, these people used my blog entry without providing a link back to me
07:34 Matt-W :(
07:35 Su-Shee joined #perl6
07:35 Su-Shee hi
07:35 moritz_ time for me to make the license on my homepage clearer
07:36 szabgab rakudo: "a,b,c".split(",").perl.say
07:36 p6eval rakudo 952fe6: OUTPUT«["a", "b", "c"]␤»
07:36 szabgab rakudo: "a,b,c".split(/,/).perl.say
07:36 p6eval rakudo 952fe6: OUTPUT«Statement not terminated properly at line 2, near "(/,/).perl"␤in Main (src/gen_setting.pm:0)␤»
07:36 szabgab rakudo: "a,b,c".split("").perl.say
07:36 p6eval rakudo 952fe6: OUTPUT«["a", ",", "b", ",", "c"]␤»
07:36 szabgab so is the /,/ version a bug ?
07:36 moritz_ no
07:36 sparc_ joined #perl6
07:37 moritz_ but the error message isn't good
07:37 moritz_ in regexes you have to quote or escape all characters except digits and letters
07:37 szabgab in the spec I see this:    C<$*ARGS.split(/\n[\h*\n]+/)>
07:37 szabgab ah surry
07:37 szabgab sorry
07:37 szabgab I should really drink a tea
07:37 moritz_ std: "a,b,c".split(/,/).perl.say
07:38 p6eval std 27101:  ( no output )
07:38 SamuraiJack joined #perl6
07:38 szabgab rakudo: "a,b,c".split(/\,/).perl.say
07:38 moritz_ ouch, it's broken...
07:38 p6eval rakudo 952fe6: OUTPUT«["a", "b", "c"]␤»
07:38 moritz_ of course you can just use a literal ',' to split on
07:38 szabgab and the version where I used empty string for split ?
07:38 azawawi joined #perl6
07:38 szabgab the spec says I should use comb
07:38 azawawi good localtime()
07:39 SamuraiJack rakudo: "Hello world".uc.say
07:39 p6eval rakudo 952fe6: OUTPUT«HELLO WORLD␤»
07:39 moritz_ szabgab: I don't know by heart what the spec says, but rakudo might be lagging behind
07:39 moritz_ std: 1
07:40 p6eval std 27101:  ( no output )
07:41 p6eval joined #perl6
07:43 moritz_ std: 1
07:43 p6eval std 27101: OUTPUT«ok 00:02 35m␤»
07:43 moritz_ std: "a,b,c".split(/,/).perl.say
07:43 p6eval std 27101: OUTPUT«##### PARSE FAILED #####␤Unrecognized regex metacharacter at /tmp/hxl0IFM3Cg line 1:␤------> [32m"a,b,c".split(/[31m,/).perl.say[0m␤    expecting any of:␤        regex atom␤       rxinfix␤ ws␤FAILED 00:04 36m␤»
07:44 moritz_ szabgab: STD.pm has much nicer messages on syntax errors :-)
07:44 kimtaro_ joined #perl6
07:44 szabgab clearly :-)
07:45 azawawi moritz_: that's 100% correct :)
07:45 szabgab it even seems to be localized :-)
07:45 moritz_ is it? how so?
07:47 Molaf joined #perl6
07:50 szabgab I see lots of strange charters...
07:50 moritz_ that's ANSI terminal color codes
08:01 payload joined #perl6
08:06 barney joined #perl6
08:07 ejs joined #perl6
08:16 amoc__ joined #perl6
08:21 ejs1 joined #perl6
08:22 eMaX joined #perl6
08:30 Molaf joined #perl6
08:39 lambdabot joined #perl6
08:40 amoc joined #perl6
08:43 pasmo joined #perl6
09:00 clintongormley has anybody had to do an svn to git migration, that was actually successful?
09:00 clintongormley there are loads of results for those keywords in google, but i've tried a few different methods and none was terribly effective
09:02 SamuraiJack rakudo: my @numbers = 1,2,3; @numbers.say;
09:02 p6eval rakudo 952fe6: OUTPUT«123␤»
09:02 SamuraiJack rakudo: my @numbers = 1,2,3; @numbers.perl.say;
09:02 p6eval rakudo 952fe6: OUTPUT«[1, 2, 3]␤»
09:02 Khisanth wasn't that migration done for rakudo? :)
09:03 clintongormley Khisanth: i think so, which is why i'm hoping somebody here can point me in the right direction :)
09:04 Khisanth also supposedly a bunch of people in #poe on irc.perl.org :)
09:04 clintongormley oh yes?
09:04 clintongormley thanks
09:05 Khisanth using git-svn to checkout a full copy with the full history misses some things?
09:05 Khisanth clintongormley: and there is #git here
09:05 clintongormley my git foo is pretty rubbish
09:05 clintongormley but it doesn't look like it tracks the branches terribly well
09:05 moritz_ right
09:06 clintongormley i don't know how possible that is
09:06 moritz_ I know that Infinoid created a git mirror of parrot that tracked all the branches
09:06 moritz_ (I use that ever since)
09:06 moritz_ maybe he can give you some insight
09:06 clintongormley thanks moritz_ - i'll ping him
09:07 eMaX joined #perl6
09:07 xinming joined #perl6
09:08 clintongormley what time is Infinoid usually around?
09:08 moritz_ roughly always :-)
09:08 clintongormley heh :)
09:09 moritz_ I think he's US based
09:09 moritz_ clintongormley: btw I hope you've seen that I continued my perl-5-to-6 blog a bit
09:10 moritz_ "just for you" (no, not quite)
09:10 clintongormley moritz_: hmm i haven't - i subscribe to your perlgeek.de feed, but haven't seen much action there
09:10 clintongormley just that one about matching 9 digit numbers
09:11 moritz_ it's been two weeks or so... http://perlgeek.de/blog-en/perl-5-to-6/25-cross-meta-operator.html
09:11 clintongormley oh yes - i did see that
09:11 clintongormley you've just been on holiday, no?
09:12 clintongormley and you're going away again beginning of august?
09:12 moritz_ I've been on holiday, yes
09:13 moritz_ but not going away on August
09:13 clintongormley .oO( YAPC::EU...)
09:16 cognominal joined #perl6
10:00 donaldh joined #perl6
10:02 M_o_C joined #perl6
10:10 zamolxes joined #perl6
10:13 sri_kraih_ joined #perl6
10:15 kimtaro_ joined #perl6
10:22 schmalbe joined #perl6
10:30 pmurias joined #perl6
11:03 kimtaro joined #perl6
11:18 jaldhar Hello.  Just recompiled rakudo again yesterday and wow!  Things are progressing nicely.
11:18 jaldhar But I have one problem.  I get:
11:18 DanielC Which reminds me... I should recompile Rakudo :-)
11:19 jaldhar ResizablePMCArray: Can't pop from an empty array!
11:19 jaldhar unfortunately the error message onlys says "in main"
11:19 DanielC That is a Parrot error. When does it do that?
11:19 DanielC During compilation?
11:19 DanielC If so, that's Bad (TM)
11:19 jaldhar No at runtime it seems
11:20 DanielC Try: perl6 -e 'say "hello world"'
11:20 DanielC Does it still do that?
11:21 donaldh joined #perl6
11:21 jaldhar No.  Trivial programs work fine.  (I tried a few like this.)  The script that gives this error uses classes fwiw
11:22 DanielC Try to make the simplest possible script that reproduces the error.
11:22 DanielC perl6 -e 'class Foo {}'  ?
11:23 DanielC ResizablePMCArray is a parrot error, and 'main' refers to Rakudo's main() function.
11:23 jaldhar I'm trying to comment out different bits to see if I can't narrow it down.
11:23 DanielC thanks
11:23 DanielC Btw, I'm not a Rakudo developer, but I'm interested in making a good bug report, so that the guys how know Rakudo can fix it.
11:28 DanielC jaldhar: Can you post a copy of the script somewhere (e.g. pastebin.com) so I can look at it?
11:34 schmalbe jaldhar: I had that too. It went away after 'make realclean; perl Configure.pl'
11:36 ruz_mac joined #perl6
11:36 jaldhar DanielC,schmalbe: got to get the kids off to school.  I'll work on this again in an hour or so.
11:37 DanielC ok
11:42 ruz_mac p6eval: class Foo {method say {say "woot" } }; my $x = Foo.new(); $x.say();
11:42 DanielC rakudo: class Foo {method say {say "woot" } }; my $x = Foo.new(); $x.say();
11:42 p6eval rakudo 952fe6: OUTPUT«maximum recursion depth exceeded␤in method Foo::say (/tmp/UnD4BL0BXq:2)␤called from method Foo::say (/tmp/UnD4BL0BXq:2)␤called from method Foo::say (/tmp/UnD4BL0BXq:2)␤called from method Foo::say (/tmp/UnD4BL0BXq:2)␤called from method Foo::say (/tmp/UnD4BL0BXq:2)␤called from
11:42 p6eval ..method…
11:43 schmalbe p6eval: class Foo {method say {::say "woot" } }; my $x = Foo.new(); $x.say();
11:43 p6eval : $code
11:43 DanielC "say" is probably not the most inspired choice for a method.
11:43 ruz_mac DanielC: actually was trying different thing
11:43 DanielC k
11:44 azawawi joined #perl6
11:44 ruz_mac rakudo: class Foo {method say {say "woot" } }; my $x = Foo.new; say $x
11:44 p6eval rakudo 952fe6: OUTPUT«Foo()<0xb6857068>␤»
11:45 azawawi pmichaud: hi; any update on http://rt.perl.org/rt3/Public/Bug/Display.html?id=65994 ?
11:47 ruz_mac DanielC: built-in function call on an object that has a method with the same name
11:47 ruz_mac rakudo: class Foo { }; my $x = Foo.new; $x.say;
11:48 p6eval rakudo 952fe6: OUTPUT«Foo()<0xb67f0a70>␤»
11:48 ruz_mac rakudo: class Foo { method say {print "woot\n" } }; my $x = Foo.new; $x.say;
11:48 p6eval rakudo 952fe6: OUTPUT«woot␤»
11:48 cognominal_ joined #perl6
11:49 ruz_mac rakudo: class Foo { method say {print "woot\n" } }; my $x = Foo.new; say $x;
11:49 p6eval rakudo 952fe6: OUTPUT«Foo()<0xb6811fc8>␤»
11:49 ruz_mac sucks
11:50 ruz_mac is there plans on implementing such thing?
11:55 masak joined #perl6
11:55 masak literal: ping.
11:58 wolverian joined #perl6
12:07 M_o_C joined #perl6
12:09 masak jaldhar: hope you manage to narrow your problem down. did I understand you right that you downloaded everything from scratch? or did you update existing Parrot and Rakudo working copies?
12:09 ruz_mac rakudo: multi sub say { print "w@_w\n" }; say "woot"
12:09 p6eval rakudo 952fe6:  ( no output )
12:10 masak ruz_mac: in your 'class Foo' example, you're defining a method in Foo, but calling a sub. they have nothing to do with one another.
12:10 ruz_mac that suck
12:10 masak ruz_mac: also, in the above code, @_ wouldn't interpolate, because plain arrays don't interpolate right off.
12:11 masak ruz_mac: what sucks? that there's a distinction between methods and subs?
12:11 ruz_mac this is fine
12:11 ruz_mac no interpolation for arrays is fine
12:11 masak yes, I think it is.
12:11 masak it allows for email addresses to be written in qq strings.
12:12 ruz_mac no turning of bult-in call as sub into method call suck
12:12 masak ruz_mac: there is an automatic mechanism to do just that. it's called 'is export'.
12:13 ruz_mac example?
12:13 masak you'll find plenty of examples of that in S32, because many built-ins have a method and a sub form.
12:13 ruz_mac ah
12:14 ruz_mac method say is export {...} === autodeclaring sub say (MyClass $x, ...) {} ?
12:15 masak far as I understand, yes.
12:15 masak but you might have to be more specific with the method signature.
12:16 masak here's an example from S29:
12:16 masak multi Char method chr( Int $grid: ) is export
12:16 masak that gives you an Int.chr method and a chr(Int) sub.
12:17 ruz_mac that's cool
12:17 masak and it works in Rakudo. :) so whilst there are many things in Rakudo that suck, this is not one of them.
12:18 ruz_mac just was worried thatwe end up with something like: "hey, don't call subs if you want to treat overloaded objects properly" :)
12:19 macae joined #perl6
12:19 masak no, subs has just as powerful multi dispatch as do methods.
12:19 masak s/has/have/
12:19 Gorbad joined #perl6
12:30 Matt-W masak: you've had a good day for bug reports so far
12:30 masak today? none so far, I think.
12:31 skids joined #perl6
12:31 masak but yesterday was nice.
12:31 masak perl6-compiler lags a bit, because of massive filtering, even of bug reports.
12:31 Matt-W Aah
12:31 Matt-W That's why I'm only getting the emails now
12:31 Matt-W It's like an exploration of all the problems with enums
12:31 masak Matt-W: yes, I did a lot of Actual Coding yesterday. that brings out bugs.
12:31 masak Matt-W: enums, scopes and rebinding, yes/
12:32 Matt-W best way to find bugs, really
12:32 Matt-W try and use things
12:32 Matt-W see if you get a Null PMC Access
12:32 Matt-W It's nice to know so unequivocally that anything that gives you Null PMC Access is a bug :)
12:33 masak yes, I use that a lot.
12:33 masak if I get a Null PMC access, I don't ask questions. I just submit. :)
12:34 Matt-W Well
12:34 Matt-W what about if it's a duplicate?
12:35 masak Matt-W: that's why I've been flagging for a dedicated person to patrol the RT stack of bugs, and try to keep the bug count down.
12:35 masak :)
12:36 Matt-W I've been considering trying to fix a bug
12:37 Matt-W I don't know which one yet
12:37 Matt-W But it'd be fun to try
12:37 masak it is.
12:37 Matt-W And then, you know, I'd have some code in rakudo
12:37 masak even if you don't get all the way, you get a better grasp of the eventual solution.
12:37 Matt-W and that'd be very cool
12:37 Matt-W not that Form.pm isn't cool
12:37 * Matt-W rambles, and eats some more chocolate
12:38 * Matt-W also listens to Swedish folk music
12:39 masak :)
12:39 dalek rakudo: 9dc941f | pmichaud++ | build/PARROT_REVISION:
12:39 dalek rakudo: Bump PARROT_REVISION to 1.3.0.
12:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9dc941f5fa9282d3e4fca070db6efdfaa6b6204b
12:39 Matt-W Ahah! It's this tune!
12:40 Matt-W I've had it stuck in my head for weeks and now I actually know what it is!
12:40 sbp what's it called?
12:40 Matt-W Or at least, I know what its ID3 tag says it is
12:40 Matt-W well, I know the name of the set of tunes, which is 'Fransosen'
12:40 Matt-W the individual tunes within it presumably have names, but they're not provided
12:41 Matt-W mmmm... bagpipes...
12:46 pmichaud rakudo: class Foo {method say {say "woot" } }; my $x = Foo.new(); $x.say();
12:46 p6eval rakudo 952fe6: OUTPUT«./perl6: error while loading shared libraries: libparrot.so.1.2.0: cannot open shared object file: No such file or directory␤»
12:46 pmichaud bah.
12:46 pmichaud That's actually a Parrot error.
12:47 Matt-W argh
12:47 Matt-W and an irksome one too
12:47 Matt-W I assume it's just changed to libparrot.so.1.3.0
12:48 pmichaud oh.  I mean that the fact that "say" ends up recursively calling itself is a Parrot error.
12:48 pmichaud The libparrot thing looks like a (re)build problem.
12:48 iblechbot joined #perl6
12:49 Matt-W oh :)
12:49 pmichaud rakudo: class Foo {method say {say "woot" } }; my $x = Foo.new(); $x.say();
12:49 p6eval rakudo 952fe6: OUTPUT«sh: ./perl6: No such file or directory␤»
12:49 Matt-W so the say in the body of method say picks up on the method you're in the middle of defining
12:50 pmichaud yes, and it shouldn't.
12:50 pmichaud There's not an easy workaround for this without losing a few other items in the process.
12:51 Matt-W messy
12:51 Matt-W because what about defining methods which you do want to recurse into themselves?
12:52 pmichaud well, method recursion would be  $.say instead of plain 'say'
12:52 Matt-W true
12:52 Matt-W oh yes, very true
12:52 Matt-W syntactically, say shouldn't even be looking at the current class's methods...
12:52 pmichaud correct.  But Parrot stores methods as entries in namespaces.
12:53 Matt-W hmm
12:53 pmichaud so Rakudo ends up seeing the wrong 'say'
12:53 Matt-W So there's no way to say Parrot 'I'm looking for a 'say' which isn't a method'
12:53 pmichaud well, that'd be a workaround, not a fix.
12:54 pmichaud also it would break those cases where the method _should_ be entered in the namespace.
12:54 pmichaud (i.e., with 'is export')
12:54 Matt-W mmm
12:55 PerlJam good morning #perl6
12:55 Matt-W So how do you fix it then? :P
12:55 pmurias joined #perl6
12:55 pmurias hi
12:55 Matt-W Good afternoon, PerlJam
12:55 Matt-W and pmurias
12:55 pmichaud I'm waiting for someone on the Parrot side of things to fix it.
12:56 pmichaud Unfortunately it doesn't seem to be that high a priority.
12:56 amoc joined #perl6
12:56 jaldhar hmm url to the nopaste thingy in the topic isn't working
12:57 masak jaldhar: correct. try gist.github.com, that works for me.
12:57 jaldhar masak: ok
12:57 masak (doesn't auto-post on the channel, though)
12:57 Matt-W pmichaud: :( Do we have a workaround involving something like '::say'?
12:58 szabgab rakudo: my @x = <a b c>; @x.perl.say;
12:58 p6eval rakudo 9dc941: OUTPUT«["a", "b", "c"]␤»
12:58 szabgab rakudo: my @x = <a b c>; my @z = @x.perl;
12:58 p6eval rakudo 9dc941:  ( no output )
12:58 szabgab rakudo: my @x = <a b c>; my @z = @x.perl; @z.perl.say;
12:58 p6eval rakudo 9dc941: OUTPUT«["[\"a\", \"b\", \"c\"]"]␤»
12:59 szabgab see http://lastofthecarelessmen.blogspot.com/2009/06/perl-6-array-notation.html
12:59 pmichaud Matt-W: one might be able to use   $*IN.say
12:59 PerlJam "$*IN.say"?   that seems backwards
13:00 pmichaud szabgab: The spec changed for that in April; Rakudo hasn't caught up with it yet (because it's a fundamental change to the way Lists and return values are handled)
13:00 pmichaud PerlJam: backwards how?
13:01 pmichaud It's very likely that   <a b c>.perl   will produce parens instead of brackets.
13:01 PerlJam I'm out of context I guess.  I was thinking you wanted to output something to the standard output handle (and you do, but it just happens to be what's on $*IN, right?)
13:02 pmichaud $*IN is the standard output handle.
13:02 pmichaud oh.
13:02 pmichaud right.
13:02 pmichaud $*OUT
13:02 pmichaud bleh
13:02 pmichaud need dr pepper
13:03 * Matt-W dials CAFFEINE-911
13:03 pmichaud szabgab: oh, wait, I misread the blog post.
13:03 pmichaud Arrays are signified by brackets.
13:03 masak we should take up the tradition of a VICTUALS file, like Pugs has. :)
13:03 PerlJam pmichaud: I've got a bunch in the frig if you want one.  Bit of a trip to get it though :)
13:03 jaldhar DanielC: http://gist.github.com/131224
13:05 szabgab pmichaud,  ("a", "b")  will keep working right ?
13:05 PerlJam jaldhar: the ternary op is  COND ?? TRUE !! FALSE   btw
13:05 ruoso joined #perl6
13:05 szabgab and if I recall a discussing I was not paying attention too much, .perl does not create executable perl code
13:05 szabgab just some visual representation
13:06 moritz_ it should create executable perl code.
13:06 moritz_ it doesn't always do yet, though
13:06 pmichaud szabgab: ('a', 'b') builds a list, yes.
13:07 szabgab good so I did not screw that up :-)
13:07 Matt-W What's happening is that you're making an Array from a list, I believe
13:07 ruoso Bom dia, #perl6
13:07 pmichaud jaldhar:             if defined %.board{$rand}.occupant || $.player == $rand {
13:07 szabgab so should ["a", "b"] do the same ?
13:07 pmichaud is it possible that %.board{$rand} is undefined?
13:07 pmichaud ['a', 'b'] builds an Array
13:07 mizioumt joined #perl6
13:08 jaldhar pmichaud: but it shouldn't be should it?  It is setup in BUILD
13:08 szabgab but if I put either of those into a @x  they should be the same not ?
13:08 jaldhar PerlJam: that's what I have or am I missing something?
13:08 szabgab rakudo: @x = ['a', 'b']; @x.perl.say
13:08 p6eval rakudo 9dc941: OUTPUT«Symbol '@x' not predeclared in <anonymous> (/tmp/tlD0I5Up40:2)␤in Main (src/gen_setting.pm:3225)␤»
13:08 pmichaud szabgab: no, they're different, alas.
13:08 szabgab rakudo: my @x = ['a', 'b']; @x.perl.say
13:08 p6eval rakudo 9dc941: OUTPUT«[["a", "b"]]␤»
13:09 moritz_ @a = ['a', 'b'] assigns an array to first item of @a
13:09 pmichaud my @x = ('a', 'b')   leaves @x with two elements
13:09 pmichaud my @x = ['a', 'b']   leaves @x with one
13:09 PerlJam jaldhar:   $i == self.player ?? ' [player] ' :: ''   # is what you have.  (those are colons when they should be exclamations)
13:09 szabgab so now I am confused
13:09 Matt-W my $x = ['a', 'b']  gives you an Array object with two elements, I think
13:09 pmichaud PerlJam++ # good catch
13:09 pmichaud rakudo-- # should've caught it.
13:09 szabgab .perl creates an executable code but by executing it I don't get back the original one
13:10 Matt-W szabgab: bug!!!
13:10 masak :)
13:10 szabgab rakudo: my @x = <a b c>; my @z = @x.perl; @x.perl.say; @z.perl.say;
13:10 p6eval rakudo 9dc941: OUTPUT«["a", "b", "c"]␤["[\"a\", \"b\", \"c\"]"]␤»
13:10 pmichaud szabgab: You do get back the original -- you just can't assign it to an array variable and get the original thing.  Assigning it to a scalar would give you the original thing.
13:10 jaldhar PerlJam: oh yeah you're right!  I've been staring at it so long I just assumed that it was !!
13:10 azawawi joined #perl6
13:10 azawawi hi
13:10 masak azawawi: o/
13:10 szabgab rakudo: my @x = <a b c>; my $z = @x.perl; @x.perl.say; xz.perl.say;
13:10 p6eval rakudo 9dc941: OUTPUT«["a", "b", "c"]␤Could not find non-existent sub xz␤»
13:10 szabgab rakudo: my @x = <a b c>; my $z = @x.perl; @x.perl.say; $z.perl.say;
13:10 PerlJam jaldhar: also, rather than using "defined X || Y", you could use  "X // Y"
13:10 p6eval rakudo 9dc941: OUTPUT«["a", "b", "c"]␤"[\"a\", \"b\", \"c\"]"␤»
13:10 moritz_ szabgab: you should get the same back, but in scalar context
13:11 PerlJam jaldhar: you've got some perl5 habits leaking into you perl6 code methinks.
13:11 moritz_ szabgab: so my @a = (1, 2); @a = eval @a.perl will *not* recreate @a
13:11 pmichaud note that "defined X || Y" is not exactly the same as "X // Y", though
13:11 szabgab I still cannot understand how that is useful :-)
13:11 moritz_ szabgab: otherwise you couldn't serialize nested data structures
13:12 jaldhar PerlJam: its a translation from perl5 so probably.  Funny thing is I have started using // in my perl5 code.
13:12 PerlJam pmichaud: yes, but X // Y is what I think he really meant  :)
13:12 pmichaud PerlJam: I didn't check that.  :)
13:12 jaldhar it was
13:12 moritz_ if @a.perl returned (1, 2), then [1, [2, 3]] would serialize and de-serialize to (1, (2, 3)) which is reall a flat list
13:13 pmurias rakudo: my @a = <a b c>; my @z = eval(@x.perl);@x.perl.say;@z.perl.say;
13:13 p6eval rakudo 9dc941: OUTPUT«Symbol '@x' not predeclared in <anonymous> (/tmp/g5K7yBPg8Q:2)␤in Main (src/gen_setting.pm:3225)␤»
13:13 pmurias rakudo: my @x = <a b c>; my @z = eval(@x.perl);@x.perl.say;@z.perl.say;
13:13 p6eval rakudo 9dc941: OUTPUT«["a", "b", "c"]␤[["a", "b", "c"]]␤»
13:14 ruoso pmurias, have you seen my blog post on the initial notes on how to implement module loading?
13:14 pmurias ruoso: hi
13:15 pmurias ruoso: yes, just reread it
13:18 pmurias ruoso: with a bit of hackery i could make MildewSOLoader.load return the lexical scope of the loaded file
13:19 ruoso hi pmurias
13:20 pmurias or we could have the loaded file install it's own lexical symbol
13:20 szabgab pmurias, that still does not recreate the same thing
13:21 pmurias szabgab: i know, but it shows the problem more nicely instead of suffering from a missing eval
13:21 jaldhar ok now if I uncomment those commented bits, I no longer get the ResizablePMCError bug instead I get:
13:21 szabgab oh yes
13:21 jaldhar Method 'occupant' not found for invocant of class 'Failure'
13:21 jaldhar which I think is due to this line:
13:22 szabgab so is that considered to be a bug ?
13:22 jaldhar if defined %.board{$rand}.occupant || $.player == $rand {
13:22 pmurias ruoso: do you think the module or the importing code should alias the symbol?
13:22 PerlJam jaldhar: if %.board{$rand} isn't defined, that's what you'll get  :)
13:23 ruoso pmurias, it's the "need" statement that installs the symbol
13:23 ruoso not the foreign module
13:23 moritz_ except that undef should really be an instance of Object, not of Failure
13:24 ruoso pmurias, maybe MildewSOLoader could make the cache of the filename vs lexical scope
13:24 PerlJam moritz_: and that's the difference between truth and beauty for rakudo.
13:25 ruoso pmurias, as a side note... I'm still trying to figure out a way to take more advantage of using a shared object...
13:25 jaldhar PerlJam: but I'm trying to test if it is defined or not.
13:26 pmurias ruoso: shared object meaning the .so here?
13:26 ruoso pmurias, yes... I'm trying to figure out a way to have the code actually shared...
13:26 ruoso today the code is loaded to the program's memory
13:27 PerlJam jaldhar: no, you're testing if %.board{$rand}.occupant is defined or not.  but you still have to make sure that %.board{$rand} is defined before you can call .occupant on it.
13:27 pmurias ruoso: we don't compile to native code yet
13:27 ruoso pmurias, we compile the code loading to native code
13:27 ruoso the mold loading, I mean
13:28 pmurias ruoso: yes, but once we compile molds to C functions they will be shared right?
13:28 PerlJam jaldhar: looking at your paste again, it looks like you have an off-by-one error.  You initialize %.board{0..19}, but the values $rand can have are 1..20
13:28 ZuLuuuuuu joined #perl6
13:28 ruoso pmurias, only the function that causes the loading of the mold, not the mold itself
13:29 ruoso the mold will be in the program's memory
13:29 jaldhar PerlJam: ahh.  I thought I read in one of the apocalypses that .rand went from 0 .. n.  That would explain it.
13:30 pmurias ruoso: re cache i'm leaning towards having lowlevel primitives in C and stuff that builds on them in Perl 6
13:30 ruoso pmurias, I was thinking that a later optimization could mean replacing mold by lost in the generated code
13:31 ruoso pmurias, that's a sane approach
13:31 PerlJam jaldhar: even if that were the case,  20.rand.int will never give you -1  :-)
13:32 PerlJam jaldhar: (that's the only way to get a 0 in $rand)
13:32 ruoso pmurias, it could even make in time checks like "if SMOP_RI(capture) == SMOP__NATIVE__capture"
13:32 pmurias ruoso: re replacing molds by lost - i'm also thinking of it
13:32 ruoso and that would mean that the actual code is actually shared as a library
13:32 ruoso it wouldn't be in the program's memory
13:33 PerlJam jaldhar: you probably read that it gives you numbers from 0 .. ^N    which is the same as 0 .. (N-1)
13:34 pmichaud szabgab: what rakudo is currently doing is correct w.r.t. the specification
13:34 pmichaud it's arguable that the specification might want changing on this point
13:35 * pmurias is making MildewSOLoader return the outer scope...
13:38 payload joined #perl6
13:39 japhb pmichaud: Does there exist any source-level profiling tools for Rakudo? (i.e. tools to allow one to profile one's Perl 6 code)
13:39 pmichaud japhb: not yet.
13:39 M_o_C joined #perl6
13:39 PerlJam everytime I've seen MildewSOLoader, I've though "mildew slower"
13:39 pmichaud japhb: we have a proposal for a hague grant to create some, but it's running into some obstacles.
13:40 japhb What kind of obstacles?
13:40 pmichaud we have to make the case that it's on Rakudo's critical development path.
13:40 pmichaud (and these tools would enable us to profile a lot more than just Rakudo)
13:41 PerlJam pm: with more stuff moving into the setting, doesn't that help?
13:41 pmichaud PerlJam: in some senses it helps a little, but it still doesn't overcome the basic obstacle.
13:43 pmichaud japhb: anyway, short answer to your question is "no, we don't have any".  It would be cool if someone wanted to create some.  :-)
13:43 japhb pmichaud: (not unrelated): How do I iterate over a namespace, finding all the subs?
13:43 PerlJam Hmm.  ... where have I seen that before ... oh, I know ... PIR profiling tools  :)
13:44 japhb PerlJam: I actually looked at that once.  I realized I never have a long enough block of time to understand everything I need to understand to write the PIR profiling tools.
13:44 pmichaud japhb: in Rakudo?  or in PIR?
13:44 japhb pmichaud: either, since if only available in PIR, I'd just use Q:PIR from Rakudo.  :-)
13:45 pmichaud in PIR:
13:45 pmichaud $P0 = get_namespace
13:45 pmichaud $P1 = iter $P0
13:45 pmichaud loop:
13:45 pmichaud # you get the rest
13:45 jaldhar hmm apparently my redo is wrong too.
13:45 jaldhar Do block labels work the same as perl5?
13:46 pmichaud block labels are unimplemented in rakudo.
13:46 jaldhar i.e. label: { }
13:46 PerlJam jaldhar: perl6 doesn't recognize bare blocks as do-once loops like perl5 does.
13:46 japhb pmichaud: That much I knew.  The part I'm missing is how to find the Perl 6 subs among the fake subs (all the dross existing only to convert lexical scopes to something Parrot understands)
13:46 pmichaud ...the fake subs are in the namespace?
13:46 japhb Oh, duh.
13:46 japhb assumptions--
13:46 jaldhar hmm ok I'm going to have to rearrange this then.
13:47 PerlJam jaldhar: yes, and in the process you'll start to get the perl 6 nature :)
13:48 PerlJam jaldhar: I'm just betting that in rearranging things, you'll find a more perl6ian way.
13:50 jaldhar PerlJam: I'm thinking junctions.  Am I on the right track?
13:51 PerlJam jaldhar: I don't know .  I'd need to see code :)
13:53 jaldhar PerlJam: ah a challenge :-)  I'll be back after some research.
13:54 pugs_svn r27102 | pmurias++ | [re-smop] MildewSOLoader.load returns the outermost lexical scope of a module
13:54 pmurias ruoso: we have a way to get at the scope, what now?
13:54 viklund joined #perl6
13:55 ruoso now "need" should be able to find out which file to load, load it, and look for the symbol by that name to alias in the local scope
13:55 ruoso also, MildewSOLoader needs to keep a cache of the loaded libraries, so a library don't get loaded twice
13:55 ruoso this is important to keep the identity of the types
13:58 japhb rakudo: sub greet($person) { say "Hello, $person" }; my $name = &greet.name; &greet.wrap(sub { say "Starting $name"; callsame; say "Ending $name";}); greet("world")
13:58 p6eval rakudo 9dc941: OUTPUT«Starting greet␤too few arguments passed (0) - 1 params expected␤in sub Routine::!wrap_start_helper (/tmp/kGuxPJOYUE:1)␤called from sub _block73 (/tmp/kGuxPJOYUE:2)␤called from Main (/tmp/kGuxPJOYUE:2)␤»
13:58 szabgab pmichaud, so it is for TimToady to check out and decide if .perl should create a representation that can be used to recreate the original data or not
13:59 pmichaud szabgab: or perl6-language (more)
13:59 japhb pmichaud: what's wrong in my last rakudo eval?
13:59 pmichaud but as I mentioned before, technically speaking .perl is creating a representation that can be used to recreate the original data.  It simply can't be done using an array assignment (more)
14:00 pmichaud however, the following probably works:
14:00 pmichaud rakudo: my @x = <a b c>; my @z := eval(@x.perl); @x.perl.say; @z.perl.say;
14:00 p6eval rakudo 9dc941: OUTPUT«["a", "b", "c"]␤["a", "b", "c"]␤»
14:01 pmurias rakudo: my @x = <a b c>; my $z = eval(@x.perl);@x.perl.say;$z.perl.say;
14:01 p6eval rakudo 9dc941: OUTPUT«["a", "b", "c"]␤["a", "b", "c"]␤»
14:02 pmichaud so the real question is being asked is this:  Should .perl create something that will reproduce the original data when used with array assignment?  I can argue that one either way, which is why it likely needs more discussion on p6l.
14:03 PerlJam japhb: perhaps callsame isn't passing the original args.  I bet it would work if you did callwith("foo")
14:03 moritz_ pmichaud: we discussed it here, and afterwards TimToady added the restriction that @thing.perl should be the same as $(@thing).perl
14:03 azawawi pmichaud: hi
14:04 japhb PerlJam: hmmm.  jonathon's blog entry seems to indicate callsame should DTRT at this point, but I'll try callwith(@_)
14:04 pmichaud moritz_: in which case Rakudo's current implementation is doing the right thing.
14:04 azawawi pmichaud: any update on RT #65994  (fake-executables)?
14:04 pmichaud azawawi: no, sorry.
14:04 japhb PerlJam: that worked.  Twigs my efficiency hate, and lord knows what it will do with named args, but ah well.
14:04 moritz_ pmichaud: correct
14:05 pmichaud moritz_: it would be helpful if we could point to that discussion and link it to the blog post that started today's conversation :-)
14:05 azawawi pmichaud: "no problem"; # scheduling question to next month :)
14:05 PerlJam japhb: what's the link to jonathan's blog entry where he talks about this?
14:05 japhb PerlJam: http://use.perl.org/~JonathanWorthington/journal/39100
14:05 japhb ... lag ...
14:06 moritz_ pmichaud: if I find it, I will
14:07 azawawi std: my $line = prompt "what?";
14:07 p6eval std 27102: OUTPUT«Undeclared routine:␤   prompt used at 1 ␤ok 00:04 36m␤»
14:07 azawawi rakudo: my $line = prompt "what?";
14:07 p6eval rakudo 9dc941: OUTPUT«what?»
14:07 pmichaud rakudo:  sub greet($person) { say "Hello, $person" };  my $name = &greet.name; &greet.wrap({ say "Starting $name"; callsame;}); greet("world");
14:07 p6eval rakudo 9dc941: OUTPUT«Starting greet␤Hello, world␤»
14:07 eMaX joined #perl6
14:07 pmichaud the problem is the "sub"
14:08 pmichaud I'm guessing that "sub" is adding new arguments to the wrap.
14:08 azawawi TimToady: should prompt() be loaded in another PAD?
14:08 pmichaud (whether it should do that or not is an open question)
14:09 azawawi moritz_: what happens to evalbot query when it is waiting for IO from prompt() for instance?
14:09 moritz_ rakudo: say prompt('a')
14:09 p6eval rakudo 9dc941: OUTPUT«aLand der Berge, Land am Strome,␤»
14:10 moritz_ azawawi: the austrian national anthem is assumed as STDIN, at least for rakudo
14:10 azawawi moritz_: nice; thx
14:11 _jaldhar joined #perl6
14:11 moritz_ (though that will need some refactoring soon)
14:17 ejs2 joined #perl6
14:20 sbilik joined #perl6
14:21 nihiliad joined #perl6
14:23 mikehh joined #perl6
14:25 alester joined #perl6
14:26 japhb rakudo: my @subs := (&greet,&meet); for @subs -> $sub {my $name = $sub.name; say "Wrapping $name"; $sub.wrap({ say "Starting $name"; callsame; say "Ending $name";});}; sub greet($person) { say "Hello, $person" }; sub meet($person) { say "I see $person here." }; meet("world"); greet("world")
14:26 p6eval rakudo 9dc941: OUTPUT«Wrapping greet␤Wrapping meet␤Starting meet␤I see world here.␤Ending meet␤Starting meet␤Hello, world␤Ending meet␤»
14:26 japhb FAIL
14:26 japhb Last wrap wins.
14:27 japhb Am I doing something wrong, or is it a rakudobug?
14:27 moritz_ what would you expect?
14:28 japhb moritz_: not saying both routines are named "meet"
14:28 masak indeed.
14:28 moritz_ ah
14:28 masak that seems highly strange.
14:28 moritz_ bug, then
14:28 * masak submits
14:28 masak japhb++
14:28 japhb thx, masak
14:33 japhb rakudo: my @subs := (&greet,&meet); for @subs -> $sub {my $name = $sub.name; say "Wrapping $name"; $sub.wrap({ say "Starting {$sub.name}"; callsame; say "Ending {$sub.name}";});}; sub greet($person) { say "Hello, $person" }; sub meet($person) { say "I see $person here." }; meet("world"); greet("world")
14:33 p6eval rakudo 9dc941: OUTPUT«Wrapping greet␤Wrapping meet␤Starting !wrap_start_helper␤I see world here.␤Ending !wrap_start_helper␤Starting !wrap_start_helper␤Hello, world␤Ending !wrap_start_helper␤»
14:33 japhb So much for a workaround ...
14:33 japhb Hmmm.  Is there a way to get from the !wrap_start_helper to the wrapped routine?
14:39 krakan joined #perl6
14:41 masak japhb: .unwrap?
14:45 japhb masak: But I don't want to unwrap it.  I just want to reach inside the wrap.
14:45 jferrero joined #perl6
14:45 masak japhb: I see. don't know the answer to that.
14:45 masak the spec might.
14:46 masak for all I know, a sub is enough of a black box for it not to be meant to work.
14:47 rfordinal joined #perl6
14:48 japhb masak: hrmph.  ;-)
14:52 japhb Oh bargle.  Wrapped subroutines all appear the same in a stack trace.
14:53 donaldh joined #perl6
14:54 ejs2 left #perl6
14:55 ejs joined #perl6
15:10 justatheory joined #perl6
15:18 TimToady std: multi Char method chr( Int $grid: ) is export
15:18 p6eval std 27102:  ( no output )
15:21 donaldh joined #perl6
15:22 p6eval joined #perl6
15:22 moritz_ std: 1
15:22 p6eval std 27102:  ( no output )
15:23 TimToady gotta do something about that someday...
15:23 moritz_ well, if I knew what I'd do something about it
15:23 TimToady anyway, that syntax above is illegal
15:25 TimToady has to either be 'our Char multi method' or move the type to --> land
15:26 pugs_svn r27103 | lwall++ | [S29-functions] fix some misplaced types
15:35 alester_ joined #perl6
15:36 alester joined #perl6
15:38 alester_ joined #perl6
15:41 alester joined #perl6
15:43 alester_ joined #perl6
15:46 alester_ joined #perl6
15:49 TimToady rakudo: my @x = <a b c>; my @z := eval(@x.perl);@x.perl.say;@z.perl.say;
15:49 p6eval rakudo 9dc941: OUTPUT«["a", "b", "c"]␤["a", "b", "c"]␤»
15:49 moritz_ std: multi Char method chr( Int $grid: ) is export
15:49 p6eval std 27103: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/9Oz4X1xNI0 line 1:␤------> [32mmulti Char [31mmethod chr( Int $grid: ) is export[0m␤    expecting any of:␤       blockoid␤ routine_def␤      terminator␤       trait␤FAILED 00:02 35m␤»
15:50 TimToady pmurias: note use of := above
15:50 TimToady moritz_: you too :)
15:51 moritz_ TimToady: I know
15:51 TimToady std: multi Char method chr( Int $grid: ) is export {...}
15:51 p6eval std 27103: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/fDMu2DQ96T line 1:␤------> [32mmulti Char [31mmethod chr( Int $grid: ) is export {...}[0m␤    expecting any of:␤ blockoid␤ routine_def␤      terminator␤       trait␤FAILED 00:02 35m␤»
15:51 TimToady kind of a bad message
15:52 moritz_ aye
15:52 TimToady moritz_: just your response used = @(), which is harder :)
15:53 moritz_ TimToady: that depends. In the beginning I found containers and binding rather confusing, but I did know @{...} from perl 5
15:53 TimToady trough nough
15:55 TimToady what std: needs is some kind of 'make install' to give some semblance of transactional integrity
15:55 TimToady then the bot runs off the installed program/data
15:55 lichtkind joined #perl6
15:56 TimToady could be a fake install to a subdir for now
15:56 molaf_x joined #perl6
15:56 pmurias ruoso: re 'determine which file to load' - it's a unsolved problem as modules in Perl 6 are not supposed to be stored in a simple list
15:57 TimToady eh?  Perl 6 doesn't say anything about how the files are stored, only that you have to use the official api for the official library :)
15:58 TimToady and that once installed, a module gains an identity that is immutable
15:58 rfordinal joined #perl6
15:58 pmurias what's the official api?
15:58 ruoso pmurias, the CORE
15:58 TimToady so any ref to that module can be .perl'ified with just the identity
15:58 ruoso pmurias, but I guess we can implement a naive mapping from module-name to file-name for now
15:59 M_o_C joined #perl6
15:59 TimToady the official library api is still undefined, but statements like 'use' essentially do database queries, for some value of database or other
16:00 TimToady which can be very lightweight .oO(flat files) for now
16:00 ruoso can't a naive mapping like the one done by perl5 be made for now?
16:01 TimToady sure, and the user's local files will continue to use that mechanism, so it's not wasted effort
16:01 TimToady it's just we make a big deal about the "coming of age" of a module :)
16:04 cognominal joined #perl6
16:06 pmurias TimToady: one quick question, does role Foo {} define a &Foo?
16:07 TimToady no, why would it?
16:07 TimToady as a type, it might respond to .() however
16:08 TimToady but it would have to use its punned class as the target of the coercion, I imagine
16:09 justatheory joined #perl6
16:10 pmurias TimToady: it works like that in mildew, and i didn't know whether to fix that
16:10 TimToady a type is always parsed as a value, not a listop :)
16:11 TimToady so even if you say Foo(), it's not being parsed as a function call currently
16:11 TimToady arguably that's inconsistent
16:11 TimToady makes types more keywordy than "if"  :)
16:12 ruoso std: role Foo {  }; sub Foo { }; Foo();
16:12 p6eval std 27103: OUTPUT«ok 00:02 35m␤»
16:14 ruoso that would need to be an error then
16:14 ruoso since one cannot tell which one is pointed
16:15 TimToady actually, it would appear that std parses Foo() as a function call currently, hmm...
16:16 TimToady I suppose if a type did install an equivalent &Foo then we'd get collision detection for free
16:17 TimToady maybe I'm happy that Foo() parses as a function call
16:17 ruoso That was my initial guess
16:17 TimToady and I don't see much harm in it offhand
16:19 TimToady other than adding a bunch more entries to the symbol table, that is
16:19 TimToady I suppose &foo lookup could be taught to also look for foo
16:19 ruoso but that happens at compile-time, right>
16:19 ruoso ?
16:20 ruoso you mean trying to look for a type when no sub is found?
16:20 TimToady yes, depending on how you mean that
16:21 TimToady not as a fallback after complete failure
16:21 DemoFreak joined #perl6
16:21 TimToady but each probe of %SymTab{'&foo'} also looks for 'foo'
16:21 TimToady so scoping remains sane
16:22 ruoso hmm... I don't quite like the idea of special casing the lookup depending on the sigil
16:22 TimToady but maybe it's sanest to just add the &foo
16:23 ruoso that's more elegant
16:23 ruoso I think
16:23 ruoso because there are less exceptions
16:23 TimToady let's not prematurely optimize then
16:24 Psyche^ joined #perl6
16:24 lichtkind jnthn: some idle seconds?
16:25 ruoso TimToady, and I think it would be even more elegant if, conceptually, Foo.bar was Foo().bar
16:25 ruoso which could be easily optimized away
16:25 ruoso but the parsing would be more predictable
16:28 justatheory joined #perl6
16:30 Sark23 joined #perl6
16:32 * ruoso meeting && later &
16:32 pmichaud ...do we get to later only if meeting ends up failing?  ;-)
16:44 justatheory joined #perl6
16:48 cognominal joined #perl6
16:49 sri_kraih joined #perl6
16:53 cdarroch joined #perl6
16:57 TimToady naive PERT analysis doesn't take into account that a capability might make N other critical path capabilities twice as fast, without being anywhere on the critical path itself
16:57 TimToady profiling might be one of those
16:57 Sunbeam joined #Perl6
16:58 TimToady it's a bit like the typical American company optimizing for quarterly profits over long-term profits...
17:01 eternaleye joined #perl6
17:02 dukeleto joined #perl6
17:02 TimToady oh, I see pmichaud already pointed out the := solution
17:02 TimToady lazy backlogging--
17:03 TimToady pmichaud++
17:04 justatheory joined #perl6
17:05 pmichaud TimToady: yes, I've been having that particular discussion that profiling might not be directly on the critical path, but it's very likely to improve our critical path on the order of several months
17:06 pmichaud knowing that there are people who are being significantly impacted by the lack of such tools is also helpful
17:06 TimToady there's blockers, and then there's swamps...
17:07 DanielC What is a critical path?
17:07 TimToady http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPERT&amp;ei=yiI5SqGaMpHQtgOQr4D-Bg&amp;usg=AFQjCNHsZkr5pVLs4IA3-G-AduA97sSwbw&amp;sig2=2fqvEruQnRJM-0YaN62SkA
17:07 pmichaud http://en.wikipedia.org/wiki/Critical_path_method
17:07 DanielC *click*
17:08 DanielC thanks
17:08 pmichaud afk for a bit # picking up daughter from class
17:09 ejs1 joined #perl6
17:13 szabgab the subject points to http://sial.org/pbot/perl6 but is does not seem to work any more
17:13 szabgab gives 404
17:14 szabgab sorry I meant topic
17:15 moritz_ anyone knows who runs http://nopaste.snit.ch/paste?
17:17 M_o_C "<!-- $Id: paste-form.html,v 1.8 2003/12/05 17:29:45 rcaputo Exp $ -->" <-- seems like someone named rcaputo might have something to do with it, though I haven't heard this name before
17:18 M_o_C nevermind, it's the author of the script
17:18 moritz_ M_o_C: purl on #parrot knew
17:21 rfordinal left #perl6
17:24 szabgab moritz_, will you ask the author to add #perl6 to the list of channels ?
17:24 [particle] rocco caputo is an ex-parroter. he was here at the beginning.
17:24 moritz_ szabgab: already did (on #parrot)
17:25 pugs_svn r27104 | lwall++ | [STD,CORE] add types as routine names also
17:25 szabgab I see it
17:25 szabgab thanks
17:25 xomas joined #perl6
17:26 [particle] TimToady: do you think we'll l see a spec'd way to locate a module's disk location?
17:26 Topic for #perl6is now »ö« | http://perl6-projects.org/ | evalbot: 'perl6: say 3;' | irclog: http://irc.pugscode.org/ | UTF-8 is our friend!
17:26 [particle] er, without compiling it.
17:27 nihiliad joined #perl6
17:30 zamolxes joined #perl6
17:31 TimToady [particle]: likely
17:32 eternaleye joined #perl6
17:36 [particle] joy. no more 'perldoc -l' wonkery and failures.
17:38 jferrero joined #perl6
17:39 TimToady hmm, I'm suddenly wondering if we can use MMD for searching the module database and picking the best candidate...
17:41 TimToady would have to model newer versions in terms of tighter types, so probably not
17:51 Sark23 perl6: say 3;
17:51 p6eval elf 27104, pugs, rakudo 9dc941: OUTPUT«3␤»
17:53 meppl joined #perl6
17:57 Molaf joined #perl6
17:59 [particle] there's too many dimensions to be multi there.
17:59 [particle] Foo :ver<1>:auth<CPAN> may be a better match than Foo :ver<999>:auth<JRANDOM>
18:00 TimToady I'd agree that auth takes precedence over ver, which makes it funny that you usually want auth at the end
18:00 TimToady it's the least important, until it becomes the most important :)
18:02 [particle] ranking auths should be fun
18:04 moritz_ why ranking? either it matches, or it doesn't
18:04 moritz_ (or do you want to do multi dispatch with them?)
18:06 PerlJam moritz_: I think I'd prefer the CPAN auth over the JRANDOM auth  :)
18:16 justatheory joined #perl6
18:19 japhb joined #perl6
18:22 Su-Shee left #perl6
18:24 [particle] use Foo;
18:24 [particle] does the user mean Foo:ver<1>:auth<CPAN> or Foo:ver<999>:auth<JRANDOM> ?
18:25 moritz_ he means "I don't care which authority or version I get"
18:25 [particle] so it loads one with .rand?
18:25 PerlJam [particle]: I  think the user meant any Foo that could be found in the absence of a policy that restricts the choices.
18:25 [particle] er, .pick?
18:26 moritz_ load all of them ;-)
18:26 moritz_ as a junction, of course ;-)
18:26 [particle] ok, that's the php take on perl 6 module loading semantics.
18:27 [particle] perl should have a default policy that makes sense and is sensibly overrideable because you may know better than perl what it is you want
18:27 [particle] *makes sense for the average user
18:28 moritz_ is there an URL explaining the Perl 6 license, like http://dev.perl.org/licenses/ for Perl 5?
18:33 pmichaud moritz_: perhaps http://www.perlfoundation.org/artistic_2_0_notes  ?
18:34 moritz_ pmichaud: thanks
18:35 * moritz_ packages JSON::Tiny for CPAN
18:35 moritz_ as a kind of experiment
18:35 mizioumt joined #perl6
18:39 moritz_ rakudo: module JSON::Tiny :version<0.1.0> { 1 };
18:39 p6eval rakudo 9dc941: OUTPUT«Unable to parse module definition at line 2, near ":version<0"␤in Main (src/gen_setting.pm:1452)␤»
18:40 moritz_ rakudo: module JSON::Tiny :ver<0.1.0> { 1 };
18:40 p6eval rakudo 9dc941: OUTPUT«Unable to parse module definition at line 2, near ":ver<0.1.0"␤in Main (src/gen_setting.pm:1452)␤»
18:41 FurnaceBoy joined #perl6
18:44 netfish joined #perl6
18:45 moritz_ uploaded.
18:45 moritz_ now let's see the PAUSE mail trickling in...
18:45 dukeleto joined #perl6
18:47 hudnix joined #perl6
18:49 pugs_svn r27105 | lwall++ | [CORE] add utf8, utf16, utf32 as buffer types
18:49 pugs_svn r27105 | lwall++ | [STD] use a character class in spacey to cut down LTM entries
18:49 pugs_svn r27105 | lwall++ | [STD] fix parsing of "multi subfoo" to not see "sub"
18:49 pugs_svn r27105 | lwall++ | [STD] require whitespace after most declarators (but not sub)
18:50 StephenPollei [CORE] add utf8, utf16, utf32 as buffer types -- thats interesting considering yesterdays unicode talk that occured here yesterday
18:51 PerlJam std: sub foo { } temp &foo.wrap({ say "hi" });
18:51 moritz_ http://nopaste.snit.ch/16951 - PAUSE indexer didn't like my META.yml - any ideas why?
18:51 p6eval std 27105: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/izDvjHctNo line 1:␤------> [32msub foo { } [31mtemp &foo.wrap({ say "hi" });[0m␤    expecting any of:␤       infix or meta-infix␤      infix stopper␤    standard stopper␤ statement␤      statement
18:51 p6eval ..modifier loop␤    terminato…
18:51 PerlJam std: sub foo { }; temp &foo.wrap({ say "hi" });
18:51 p6eval std 27105:  ( no output )
18:56 [particle] moritz_: does provides: also need to specify version: ?
18:57 moritz_ [particle]: I just looked it up... it's not mentioned to be required on http://module-build.sourceforge.net/META-spec-v1.2.html
18:57 moritz_ but I might just as well try it with a version
18:57 [particle] http://search.cpan.org/~barbie/Test-CPAN-Meta-0.13/
18:57 justatheory joined #perl6
18:58 [particle] you can test it yourself, before submitting :)
18:58 moritz_ nice!
19:08 pugs_svn r27106 | lwall++ | [S02] define utf constrained buffer types
19:08 pugs_svn r27106 | lwall++ | [S02] nail down canonical name for instantiated types to use ident adverbial
19:08 pugs_svn r27106 | lwall++ |   (MyRole[MyType] still instantiates, but isn't the name of the resulting type)
19:10 amoc joined #perl6
19:12 moritz_ [particle]++
19:12 moritz_ indexer reported success.
19:12 moritz_ now I'm curious what will show up on CPAN
19:12 [particle] sweet.
19:12 ejs joined #perl6
19:13 Whiteknight joined #perl6
19:20 donaldh joined #perl6
19:22 PerlJam * GumbyPAN CPAN Upload: JSON-Tiny-0.1.1 by MORITZ
19:27 justatheory joined #perl6
19:31 payload joined #perl6
19:33 ejs0 joined #perl6
19:49 StephenPollei rakudo: my Positional $foo; $foo.isa(Positional).say
19:49 p6eval rakudo 9dc941: OUTPUT«0␤»
19:49 StephenPollei rakudo: my Version $foo; $foo.isa(Version).say
19:49 p6eval rakudo 9dc941: OUTPUT«Malformed declaration at line 2, near "Version $f"␤in Main (src/gen_setting.pm:0)␤»
19:50 StephenPollei rakudo: my Int $foo; $foo.isa(Int).say
19:50 p6eval rakudo 9dc941: OUTPUT«1␤»
19:50 StephenPollei interesting that Positional doesn't cause parse error but doesn't think it is what it's supposed to be
19:53 moritz_ rakudo: my Postional $foo; say $foo.PARROT
19:53 p6eval rakudo 9dc941: OUTPUT«Malformed declaration at line 2, near "Postional "␤in Main (src/gen_setting.pm:0)␤»
19:53 moritz_ rakudo: my Positional $foo; say $foo.PARROT
19:53 p6eval rakudo 9dc941: OUTPUT«Perl6Role␤»
19:54 moritz_ rakudo: role A { }; my A $x; say $x.WHAT
19:54 p6eval rakudo 9dc941:  ( no output )
19:54 moritz_ rakudo: my Positional $foo; say $foo.WHAT
19:54 p6eval rakudo 9dc941: OUTPUT«Positional()␤»
19:54 moritz_ rakudo: role A { }; my A $x; say $x.WHAT
19:54 p6eval rakudo 9dc941: OUTPUT«A()␤»
19:54 moritz_ rakudo: role A { }; my A $x; say $x ~~ A
19:54 p6eval rakudo 9dc941: OUTPUT«1␤»
19:54 moritz_ rakudo: my Positional $foo; say $foo
19:54 p6eval rakudo 9dc941: OUTPUT«Positional()␤»
19:54 moritz_ rakudo: my Positional $foo; say $foo ~~ Positional
19:55 p6eval rakudo 9dc941: OUTPUT«1␤»
19:55 moritz_ StephenPollei: it's not "isa" Positional because it's a Role
19:55 StephenPollei ok I didn't expect that, is that correct behavior?
19:56 moritz_ yes
19:56 StephenPollei I don't have clue what Positional does
19:56 moritz_ StephenPollei: if you don't want to bother with the subtleties of inheritance vs. role composition, you use ~~ Typename for type checking
19:56 StephenPollei rakudo: my Positional $foo; $foo.isa(Role).say
19:56 p6eval rakudo 9dc941: OUTPUT«0␤»
19:57 moritz_ Positional is the role that things like lists and arrays do, and that defines .[] and so on
19:57 StephenPollei oh ok
19:59 StephenPollei thanks
19:59 StephenPollei rakudo: my Associative $foo; $foo.isa(Associative).say
19:59 p6eval rakudo 9dc941: OUTPUT«0␤»
20:00 StephenPollei good thing to know because I'm running into a few of them that work the same way, I presume, and the rest a simple isa worked
20:00 pmichaud phone
20:02 StephenPollei I hope to add more to S02-builtin_data_types/declare.t and then I will be gone for about 11 days, but I shall return
20:07 iblechbot joined #perl6
20:13 ruoso joined #perl6
20:14 * ruoso back
20:21 DemoPhreak joined #perl6
20:23 pmurias joined #perl6
20:29 lichtkind ruoso: great im just go into bath
20:31 pmurias lichtkind: you can always take your laptop with you... ;)
20:31 lichtkind pmurias: i prefer to relax
20:31 pmurias ...instead of getting electrocuted :)
20:34 StephenPollei feel the soothing pulses of electrcity surge throughout you body as all your troubles simply melt away
20:37 dukeleto joined #perl6
20:43 lichtkind StephenPollei: i prefer meditation
20:43 lichtkind or some kind of altered state :)
20:50 fridim_ joined #perl6
20:53 lichtkind how can i get the pwd of my pugs svn account?
20:53 moritz_ lichtkind: check your mailbox
20:54 lichtkind moritz_: thanks a lot
20:55 StephenPollei ~/.subversion/auth/ has three files that might have you cached password
21:00 pugs_svn r27107 | lichtkind++ | added perl tablets to docs
21:00 lichtkind moritz_: ah hat gefunzt
21:01 moritz_ lichtkind: please prefix your commit messages with [$directory] or so
21:02 moritz_ lichtkind: so that people reading the commit message know where you added it
21:02 lichtkind gut
21:05 pmurias lichtkind: if you have an smop oriented questions for ruoso i might be able to anwser some of them
21:06 lichtkind pmurias: thanks a lot but i have here currently some urgent problem :)
21:16 moritz_ is the 'smop' evalbot target still usfull?
21:16 moritz_ (it currently executes pugs -Bm0ld)
21:19 pmurias not
21:19 pmurias * no
21:21 pugs_svn r27108 | moritz++ | [evalbot] cleanup
21:21 pugs_svn r27108 | moritz++ |
21:21 pugs_svn r27108 | moritz++ | * use separate file for STDIN
21:21 pugs_svn r27108 | moritz++ | * remove outdated 'smop' target
21:21 pugs_svn r27108 | moritz++ | * trailing ws
21:22 StephenPollei http://svn.pugscode.org/pugs/src/perl6/CORE.pad has int2 , int4, rat1, rat2, rat16, rat32 I don't think those are part of spec though??
21:22 p6eval joined #perl6
21:23 moritz_ StephenPollei: S09
21:23 moritz_ rakudo: say 1
21:23 p6eval rakudo 9dc941: OUTPUT«1␤»
21:23 moritz_ rakudo: say $*IN.get
21:23 p6eval rakudo 9dc941: OUTPUT«Land der Berge, Land am Strome,␤»
21:24 moritz_ still works, good
21:24 StephenPollei ok looking because I recall int1, int16 etc but not int2 and definately not rat16
21:24 moritz_ StephenPollei: get a copy of the spec, and grep ;-)
21:24 moritz_ or even better, ack
21:25 StephenPollei sure I found int2 and in4, but still not rat16 and friends, not sure if those even make any sense
21:25 moritz_ http://search.cpan.org/~petdance/ack-1.88/ack
21:26 moritz_ you're right
21:28 [particle] buubot: spack int2
21:28 buubot Couldn't match input.
21:28 StephenPollei yes just did `grep 'rat[0-9]' *pod` and found nothing, I assume that pugs is wrong to include rat16
21:28 [particle] buubot: spack int16
21:28 buubot Couldn't match input.
21:28 * [particle] slaps buubot
21:28 moritz_ pugs is wrong in many ways.
21:28 fridim_ joined #perl6
21:29 [particle] pugs was wrong from the start. i mean, haskell? come on! ;)
21:30 StephenPollei grep 'int[24]' *pod -- found S09-data.pod , S12-objects.pod , and S29-functions.pod
21:30 moritz_ pugs was right. Without I wouldn't have found my way into Perl 6 land
21:30 StephenPollei [particle], I never used haskell myself but I've heard good things and I'm not much of one for language wars
21:30 moritz_ don't ignore his smiley ;-)
21:31 StephenPollei oh yes too quick of me
21:31 [particle] :)
21:32 moritz_ speaking of which, I've got "real world haskell" lying on my desk for more than 3 months now, and I haven't made it past the 4th chapter yet
21:32 PerlJam moritz_: mail it to me so it can sit on my desk for a while too  :)
21:33 moritz_ ;-)
21:37 meppl joined #perl6
21:48 lichtkind no pmurias and no ruoso :(
22:07 StephenPollei rakudo: my Array of Int @box;
22:07 p6eval rakudo 9dc941: OUTPUT«Use of type object as value␤»
22:09 moritz_ rakudo: my Array[Int] @box
22:09 p6eval rakudo 9dc941: OUTPUT«Malformed declaration at line 2, near "Array[Int]"␤in Main (src/gen_setting.pm:0)␤»
22:09 moritz_ rakudo: my Int @box
22:09 p6eval rakudo 9dc941:  ( no output )
22:09 StephenPollei http://perlcabal.org/syn/S02.html#Hierarchical_types
22:09 moritz_ it's NYI
22:10 StephenPollei probably going to add a few of these declarations and then call it a day
22:10 StephenPollei NYI -- Not yet implemented .. yes I'll have to skip it
22:11 StephenPollei #?rakudo skip 'Not yet implemented'
22:20 dukeleto joined #perl6
22:24 pugs_svn r27109 | stephenpollei++ | [S02-builtin_data_types/declare.t] Positional Associative Abstraction utf8 utf16 num16 and some Hierarchical types added,etc
22:24 pugs_svn r27109 | stephenpollei++ | added place holders comments to add more things when I get back in 11 days
22:48 nihiliad joined #perl6
22:50 justatheory joined #perl6
22:57 kidd_ joined #perl6
23:03 TimToady joined #perl6
23:05 jferrero joined #perl6
23:17 pugs_svn r27110 | lwall++ | [S02/declare.t] mis-sigiled variable
23:21 donaldh joined #perl6
23:25 justatheory joined #perl6
23:30 pugs_svn r27111 | lwall++ | [CORE] reserve some missing native types; swap typenames with functions
23:30 pugs_svn r27111 | lwall++ |   (note that reserved typenames like complex128 aren't guaranteed to be
23:30 pugs_svn r27111 | lwall++ |       supported, but at least they'll parse!)
23:36 pugs_svn r27112 | lwall++ | [S09] add missing rat native types
23:37 pugs_svn r27113 | lwall++ | [CORE] rats smaller than rat8 byte considered useless
23:39 eternaleye joined #perl6
23:41 skids joined #perl6
23:55 eternaleye rakudo: my @x = <a b c>; my @y = |eval( @x.perl ); say @x.perl, @y.perl
23:55 p6eval rakudo 9dc941: OUTPUT«too many arguments passed (4) - 2 params expected␤in Main (/tmp/jShqD4v8G2:2)␤»

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

Perl 6 | Reference Documentation | Rakudo