Camelia, the Perl 6 bug

IRC log for #perl6, 2010-04-09

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 Mike joined #perl6
00:01 ShaneC joined #perl6
00:01 ShaneC left #perl6
00:04 lue afk
00:05 pugssvn r30350 | lwall++ | [STD] process conflict marker even if first thing in the file
00:10 * ingy heads off to give a talk about C'Dent to SeaPig
00:10 ingy see?
00:11 am0c joined #perl6
00:17 snarkyboojum joined #perl6
00:26 eternaleye joined #perl6
00:27 yinyin joined #perl6
00:29 yinyin joined #perl6
00:34 mikehh joined #perl6
00:38 sjohnson i am converting a bash programmer to Perl today.  he asked for my help.  today is a good day
00:38 sjohnson i will give him proper instruction, with beer as programmers oil
00:39 colomon \o/
00:48 jhuni joined #perl6
00:49 snarkyboojum joined #perl6
00:52 sjohnson hows it going colomon ?
00:52 colomon pretty good.
00:52 colomon very tired.
00:52 sjohnson what time do you have?
00:52 sjohnson <--- 5:52pm
00:52 colomon I managed to lose the key to the (locked) fridge during the drive from old home to new home today.  :(
00:52 colomon 8:52 pm
00:53 colomon (Though judging by the windows left open on this machine, my wife has already ordered a replacement.)
00:58 sjohnson darn
01:12 k23z__ joined #perl6
01:48 mikehh_ joined #perl6
01:56 Psyche^ joined #perl6
01:58 colomon http://use.perl.org/~Jonath​anWorthington/journal/40303 jnthn++
01:59 * colomon hopes to have tuits again by the weekend...
02:00 frzntoz joined #perl6
02:04 * sorear considers working on #73886 to take a little break from blizkost
02:05 nihiliad joined #perl6
02:20 justatheory joined #perl6
02:24 thowe joined #perl6
02:25 thowe having a heck of a time getting rakudo to build...
02:26 lisppaste3 thowe pasted "core dump" at http://paste.lisp.org/display/97534
02:26 thowe http://paste.lisp.org/display/97534
02:26 thowe hmm, cool.  Guess my link was redundant.
02:27 thowe At first I thought this box just didn't have enough RAM.  So I scraped together another 512M
02:27 thowe Now it has 1.5G and is still giving this error.  Also, I watched the mem with top and it seemed to have a lot free, so I don't think it is running out of RAM.
02:28 sorear are you building the latest version?
02:28 sorear are you using the latest version of Parrot?
02:28 sorear about a week ago, a memory issue was fixed in Parrot (not really a leak as such; it caused overallocation instead of overretention)
02:29 sorear rakudo memory usage has dropped from 1.7GB to 260MB
02:29 sorear um
02:30 sorear thowe: allocating 1+ GB on a 32 bit box, you're going to see out of memory well before you actually run out, because of memory fragmentation
02:31 sorear that core dump is just an out of memory error
02:38 REPLeffect joined #perl6
02:44 thowe Version     : 2.2.0-devel
02:44 thowe Is that new enough?
02:45 thowe I thought it grabbed the latest parrot via SVN, but this kind of sounds like it might be my issue.
02:55 agentzh joined #perl6
03:08 sorear thowe: 2.2.0-devel has been the parrot version number for weeks
03:08 sorear it's not really useful information at all
03:09 sorear try parrot-nqp -e 'say(pir::getinterp__p()[6]<revision>)'
03:10 sorear or, uh, parrot_config revision
03:10 meppl joined #perl6
03:13 yinyin left #perl6
03:17 frzntoz joined #perl6
03:31 f00li5h joined #perl6
03:35 mikehh__ joined #perl6
03:36 alester joined #perl6
03:44 f00li5h joined #perl6
03:52 thowe Pulling it all from the git repository was successful now.  Must have been that memory leak issue.
03:52 thowe sorear, Thanks for your help =]
04:01 meppl joined #perl6
04:31 xinming joined #perl6
04:39 molaf joined #perl6
04:39 xinming joined #perl6
04:47 rv2733 joined #perl6
05:22 hudnix joined #perl6
05:47 kaare joined #perl6
05:48 mjk joined #perl6
05:48 |mjk| joined #perl6
05:53 mberends joined #perl6
06:05 k23z__ joined #perl6
06:08 uniejo joined #perl6
06:12 masak joined #perl6
06:13 masak good morning, #perl6
06:14 sorear hello
06:18 Su-Shee joined #perl6
06:23 masak phenny: tell jnthn great post! http://use.perl.org/~Jonath​anWorthington/journal/40303 -- small nit: s/kötbullar/köttbullar/
06:23 phenny masak: I'll pass that on when jnthn is around.
06:23 Su-Shee he clearly never was at Ikea's.
06:33 pugssvn r30351 | masak++ | [S32/Temporal] oops, 1996 *was* a leap year
06:33 pugssvn r30351 |
06:33 pugssvn r30351 | Switching to 2006. Neural glitch pointed out by yary++.
06:37 hudnix joined #perl6
06:40 frettled Yawn morning, #perl6.  :)
06:42 meteorjay joined #perl6
06:47 sulo_seppa joined #perl6
06:49 sulo_seppa left #perl6
06:50 IllvilJa jnthn: Congratulations for acquiring the noble skill of cooking "K�ttbullar", now you're all set to survive in Sweden!
06:51 masak :)
06:51 REPLeffect joined #perl6
06:55 dalek rakudo: 4c94d70 | masak++ | src/core/Temporal.pm:
06:55 dalek rakudo: [Temporal] removed nanoseconds; chasing spec
06:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​c94d702f1684c3f820b03c814f2b1d29d93ba96
07:03 moritz_ good morning
07:03 masak o/
07:08 moritz_ bkeeler: yes, it adds more copying... but remember that = in PIR is mostly bindings, so match objects aren't actually copied, only the references to them
07:08 moritz_ bkeeler: and yes, that bothered me too, but I couldn't see how to preserve speed *and* add encapsulation
07:11 masak ah, correctness, you bane of performance...
07:13 moritz_ speaking of correctness.. thanks to jnthn++ the 'cool' branch now works again
07:14 masak \o/
07:14 drbean joined #perl6
07:14 moritz_ there are no methods yet moved to Cool
07:15 moritz_ but most builtins actually inherit from it
07:15 moritz_ $ ./perl6 -e 'say 42 ~~ Cool'
07:15 moritz_ 1
07:15 moritz_ hm, arrays don't
07:18 masak that's uncool.
07:45 masak hm, http://perlcabal.org/syn/S32/Temporal.html still hasn't updated. :/
07:48 moritz_ aye; somebody needs to investigate what goes wrong
07:48 riffraff joined #perl6
07:50 moritz_ now S12-introspection/parents.t fails in the 'cool' branch :-)
07:50 moritz_ because it relies on parent classes of built-in classes, not taking Cool into account
08:02 sorear what's so cool about having Cool?
08:04 moritz_ having less methods in Any
08:05 moritz_ point is, Larry wants $thing.sort to work even if $thing is not a List (or not Positional)
08:06 moritz_ so the old approach was to have method sort() in Any
08:06 moritz_ which kinda works, but is ugly
08:06 moritz_ because it means that Any has ~200 methods
08:06 moritz_ and all user defined classes have as many
08:07 moritz_ so now we shove those methods in the Cool class
08:07 moritz_ and most built-in classes inherit from it
08:08 moritz_ so users can decide if they want their objects to behave like built-ins (aka polymorphic) by inheriting from Cool
08:08 moritz_ or if they want "lite" classes by inheriting from Any
08:09 moritz_ it also means you can monkey patch most builtin classes by monkey patching 'Cool'
08:25 yahooooo joined #perl6
08:25 dakkar joined #perl6
08:28 masak joined #perl6
08:29 masak yay! wifi on a bus! \o/
08:29 moritz_ snakes! On a plane!
08:29 moritz_ uhm, wrong meme
08:29 masak still haven't seen that movie...
08:30 * moritz_ neither
08:30 moritz_ and frankly I don't think it's worth it
08:30 * mathw doesn't want to
08:30 Su-Shee I have a suggestion for perl 6, the movie. ;) http://code.google.com/p/gource/wiki/Videos my co-worker just rendered our cvs ;)
08:36 Khisanth joined #perl6
08:39 Khisanth joined #perl6
08:41 dmsantam joined #perl6
08:42 kfo_ joined #perl6
08:50 jnthn o/ folks
08:50 phenny jnthn: 06:23Z <masak> tell jnthn great post! http://use.perl.org/~Jonath​anWorthington/journal/40303 -- small nit: s/kötbullar/köttbullar/
08:51 jnthn oh kött!
08:51 masak :)
08:51 masak yes. short ö.
08:51 jnthn At least I didn't accidentally the camel testicles this time.
08:52 * jnthn is in meeting all day, but it's a slight break now. :-)
08:53 * masak still believes that the connection to camel testicles is quite far-fetched
08:53 masak maybe it's a Norwegian thing :P
08:53 jnthn I'm not sure Norway has camels...
08:53 masak that might factor into it somehow :)
08:54 sorear hello jnthn
08:54 moritz_ does smart matching against a signature actually bind it?
08:55 jnthn moritz_: yes and no
08:55 jnthn hi sorear
08:55 jnthn ooh, gotta concentrate on meeting again :-)
08:55 sorear *sketch?
08:56 moritz_ rakudo: my ($a, @b); (1, 2, 3) ~~ :($a, *@b); say $a; say @b.perl
08:56 p6eval rakudo 4c94d7: OUTPUT«Any()␤[]␤»
08:56 jnthn $dayjob
08:56 moritz_ rakudo: my ($a, @b); say 'yes' if (1, 2, 3) ~~ :($a, *@b); say $a; say @b.perl
08:56 p6eval rakudo 4c94d7: OUTPUT«yes␤Any()␤[]␤»
09:00 moritz_ colomon: from a quick glance it seems that the trig functions do evil things: call private methods from the parent class... AFAICT that will break once rakudo is less leaky with its privacy
09:02 moritz_ fwiw, the cool branch is coming along nicely
09:02 moritz_ (though not all of it pushed yet)
09:03 agentzh joined #perl6
09:04 masak moritz_++
09:04 sorear so apparently set $P24, $P25["foo"] doesn't actually result in a call to get_pmc_keyed_str
09:13 sorear rakudo: [ 1..50 ].sort
09:13 p6eval rakudo 4c94d7:  ( no output )
09:14 sorear rakudo: [ 1..500 ].sort.say
09:14 p6eval rakudo 4c94d7:
09:14 p6eval ..OUTPUT«1234567891011121314151617181920212223242​5262728293031323334353637383940414243444546474849​5051525354555657585960616263646566676869707172737​4757677787980818283848586878889909192939495969798​9910010110210310410510610710810911011111211311411​5116117118119120121122123124125126127128129130…
09:14 sorear rakudo: [ 1..5000 ].sort.batch(20).say
09:14 p6eval rakudo 4c94d7:  ( no output )
09:16 sorear (don't use sort on sorted arrays)
09:25 moritz_ should Exception inherit from Cool? it kinda feels wrong, but without it regex matching on $! doesn't work...
09:35 jnthn moritz_: Sounds like it could do so.
09:35 jnthn moritz_: Did the fix I suggested yesterday unblock things?
09:35 moritz_ jnthn: yes it did
09:35 moritz_ jnthn++
09:35 pausenclown joined #perl6
09:35 jnthn \o/
09:35 jnthn I'll try and improve the errors too.
09:36 bkeeler Heyas
09:36 moritz_ jnthn: the next problem I'm running into is that some anonymous classes appear in the spectest run, and then we call .perl on them. Which in turn calls substr()
09:36 moritz_ I haven't really debugged it yet
09:36 bkeeler Couldn't sleep so I got back up
09:36 moritz_ but either those anon classes need to inherit from Any
09:36 moritz_ or we have to make .perl more clever
09:36 moritz_ or ... dunno
09:37 jnthn hmm
09:38 moritz_ anyway, I need to look into that in more detail
09:48 snarkyboojum sorear: yeah, that sort returns in 1 minute and 5 seconds on my machine :)
09:48 sorear Why does anyone still use quicksort?
09:49 sorear mergesort has been around since 1945
09:49 moritz_ mergesort needs copies of arrays
09:49 moritz_ at least it's easier to implement it that way
09:51 jnthn Quicksort is kinda easy to implement.
09:51 jnthn Especially in Perl 6. ;-)
09:51 moritz_ especially if you don't really care about choice of pivot element :-)
09:52 jnthn Yeah
09:52 mathw .pick(*)
09:52 jnthn Even if you do then...yes, that.
09:52 sorear jnthn: this is a C quicksort in parrotland
09:52 jnthn But then you don't get to show off the sub-signature shiny.
09:52 moritz_ mathw: .pick(1)
09:53 sorear moritz_: heapsort!
09:53 jnthn Bubble sort!
09:53 moritz_ sorear: heapsort is not cache friendly at all
09:53 jnthn My O is *so* big.
09:53 jnthn ;-)
09:53 jnthn ooh, gotta pay attention to meeting agian :-)
09:55 sorear nothing using PMCs is cache friendly
09:57 szabgabx joined #perl6
09:59 moritz_ rakudo: class A {}; say A.cos
09:59 p6eval rakudo 4c94d7: OUTPUT«Method 'Num' not found for invocant of class ''␤current instr.: 'perl6;Any;cos' pc 376597 (src/gen/core.pir:0)␤»
09:59 moritz_ rakudo: class A {}; say A.substr(1)
09:59 p6eval rakudo 4c94d7: OUTPUT«()␤»
10:03 mberends joined #perl6
10:13 pausenclown std: class A { has B $.b; }; class B { has A $.a; }
10:13 p6eval std 30351: OUTPUT«[31m===[0mSORRY![31m===[0m␤In has declaration, typename 'B' must be predeclared (or marked as declarative with :: prefix) at /tmp/F93yVDuQE0 line 1:␤------> [32mclass A { has B[33m⏏[31m $.b; }; class B { has A $.a; }[0m␤Malformed has at /tmp/F93yVDuQE0 line 1:␤------>
10:13 p6eval ..[32m…
10:14 pausenclown how do i predeclare?
10:14 moritz_ class A { ... }
10:14 moritz_ literal ...
10:14 pausenclown std: class B{ ... }; lass A { has B $.b; }; class B { has A $.a; }
10:14 p6eval std 30351: OUTPUT«[31m===[0mSORRY![31m===[0m␤In has declaration, typename 'A' must be predeclared (or marked as declarative with :: prefix) at /tmp/2n1WuWuHsK line 1:␤------> [32m; lass A { has B $.b; }; class B { has A[33m⏏[31m $.a; }[0m␤Malformed has at /tmp/2n1WuWuHsK line 1:␤------>
10:14 p6eval ..[32…
10:15 pausenclown std: class B{ ... }; class A { has B $.b; }; class B { has A $.a; }
10:15 p6eval std 30351: OUTPUT«ok 00:01 107m␤»
10:15 pausenclown rakudo: class B{ ... }; class A { has B $.b; }; class B { has A $.a; }
10:15 p6eval rakudo 4c94d7:  ( no output )
10:15 pausenclown tx
10:16 pausenclown rakudo: class B{ ... }; class B{ ... }; class B{ ... }; class A { has B $.b; }; class B { has A $.a; }
10:16 p6eval rakudo 4c94d7:  ( no output )
10:30 clintongormley joined #perl6
10:32 mberends joined #perl6
10:42 nsh joined #perl6
10:43 sbp joined #perl6
10:44 pmurias joined #perl6
10:46 colomon moritz_: hmmm... I think there's a good argument to be made for moving to-radians and from-radians to Numeric, making them public, and adding them to the spec.  Anyone who does geometric work is going to end up wanting to use them sooner or later, in my experience.
10:57 pausenclown what's the new name for undef again?
10:59 pausenclown rakudo: say undef
10:59 p6eval rakudo 4c94d7: OUTPUT«Unsupported use of undef as a value; in Perl 6 please use something more specific:␤        Mu (the "most undefined" type object),␤   an undefined type object such as Int,␤    Nil as an empty list,␤    *.notdef as a matcher or method,␤ Any:U as a type constraint␤       or
10:59 p6eval ..fail() as a failure return␤       …
10:59 pausenclown rakudo: say Mu
10:59 p6eval rakudo 4c94d7: OUTPUT«Mu()␤»
10:59 pausenclown rakudo: say 1 if Mu
10:59 p6eval rakudo 4c94d7:  ( no output )
10:59 pausenclown rakudo: say 1 unless Mu
10:59 p6eval rakudo 4c94d7: OUTPUT«1␤»
10:59 pausenclown rakudo: say 1 unless (Mu)
11:00 p6eval rakudo 4c94d7: OUTPUT«1␤»
11:00 pausenclown rakudo: say 1 unless (0)
11:00 p6eval rakudo 4c94d7: OUTPUT«1␤»
11:00 pausenclown rakudo: say 1 unless (1)
11:00 p6eval rakudo 4c94d7:  ( no output )
11:01 pausenclown why is (0) false?
11:01 pausenclown rakudo: say 1 unless (0).elems
11:01 p6eval rakudo 4c94d7: OUTPUT«Method 'elems' not found for invocant of class 'Integer'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
11:01 pausenclown oh right.
11:10 jnthn rakudo: say "oh hai";
11:10 p6eval rakudo 4c94d7: OUTPUT«oh hai␤»
11:10 jnthn say [*] 1..10;
11:10 jnthn rakudo: say [*] 1..10;
11:10 p6eval rakudo 4c94d7: OUTPUT«3628800␤»
11:11 jnthn rakudo: sub postfix:<!>($n) { [*] 1..$n }; say 10!;
11:11 M_o_C joined #perl6
11:11 p6eval rakudo 4c94d7: OUTPUT«3628800␤»
11:12 arnsholt Speaking of which, how is the grammar informed of that new operator?
11:13 jnthn Just parses it and then augments the grammar :-)
11:13 jnthn See the bottom of Grammar.pm for info.
11:13 jnthn Meeting, afk :-)
11:13 arnsholt Great, thanks!
11:15 M_o_C joined #perl6
11:36 moritz_ colomon: +1 to speccing and making public
11:37 ruoso joined #perl6
11:42 pmurias ruoso: one question about adding representation polymorphism to p5, if a perl5 macro needs to use the runloop how will we do that? (saving the C stack?)
11:42 moritz_ the 'cool' branch works pretty well... the only new, non-bogus test failure is t/spec/integration/weird-errors.t
11:45 ruoso pmurias, that's where the PONIE-macro-magic-idea would get in
11:45 ruoso it would use C stack manipulation...
11:45 moritz_ sounds hard to debug
11:47 alester joined #perl6
11:50 pmurias ruoso: what's the PONIE-macro-magic-idea?
11:51 envi^home joined #perl6
11:52 ruoso pmurias, longjmp and friends
11:55 szabgabx joined #perl6
12:06 pmurias ruoso: what i think we should think about would be the use cases for the representation polymorphism in p5
12:07 ruoso pmurias, two cases I can think immediatly is PDL and Moose
12:09 pmurias with Moose using it store the accessors in a C struct?
12:09 pmurias * attributes
12:11 ruoso pmurias, yes
12:15 takadonet morning all
12:21 pausenclown any "official" thoughts regarding camelCase or underscore_style in Perl6?
12:21 frzntoz joined #perl6
12:24 moritz_ pausenclown: Perl 6 programmers tend to use the Perl 5 convention of using CamelCase for package names/type names...
12:24 moritz_ and using underscores or - for variables and routines
12:24 moritz_ my $first-second = 1; say $first-second;
12:25 moritz_ rakudo: my $first-second = 1; say $first-second;
12:25 p6eval rakudo 4c94d7: OUTPUT«1␤»
12:25 pmurias ruoso: it would be interesting to know if the moose guys show interest in that
12:25 pausenclown that's somewhat scary =)
12:25 moritz_ of course perl 5 doesn't allow - in identifiers
12:32 clintongormley joined #perl6
12:33 bluescreen joined #perl6
12:34 nadim joined #perl6
12:36 smash_ joined #perl6
12:36 smash_ hello everyone
12:40 ignacio_ joined #perl6
12:44 ruoso pmurias, certainly worth asking nothingmuch and stevan
12:44 moritz_ hi smash_
12:59 pausenclown rakudo: class A { method foo { "a" } }; my @arr = A.new,A.new; say "#" ~ @arr>>.foo
12:59 p6eval rakudo 4c94d7: OUTPUT«#a a␤»
13:00 pausenclown is this a bug?
13:00 pausenclown rakudo: class A { method foo { "a" } }; my @arr = A.new,A.new; say "#" ~ join('', @arr>>.foo)
13:00 p6eval rakudo 4c94d7: OUTPUT«#aa␤»
13:00 moritz_ pausenclown: what would you expect?
13:00 pausenclown no =)
13:00 pausenclown i was confused about the whitespace
13:01 moritz_ that's just stringification of a sequence/array/list
13:01 colomon rskudo: my @a = <a b>; say ~@a
13:01 colomon rakudo: my @a = <a b>; say ~@a
13:01 p6eval rakudo 4c94d7: OUTPUT«a b␤»
13:01 moritz_ rakudo: class A { method foo { "a" } }; my @arr = A.new,A.new; say "#" ~<< @arr>>.foo
13:01 colomon rakudo: my @a = <a b>; say @a
13:01 p6eval rakudo 4c94d7: OUTPUT«Method 'foo' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
13:01 p6eval rakudo 4c94d7: OUTPUT«ab␤»
13:02 moritz_ huh?
13:02 colomon you're calling foo after the ~
13:02 colomon (~<<@arr)>>.foo
13:03 moritz_ uhm, shouldn't the method call have a tighter precedence?
13:03 colomon dunno
13:03 moritz_ tighter than any infix operator, I should hope
13:03 colomon might be a bug in hyper dot
13:04 colomon ~<< is prefix, though...
13:04 moritz_ even so
13:04 colomon well, hmmm.
13:04 moritz_ no
13:04 moritz_ it's infix
13:04 colomon rakudo: class A { method foo { "a" } }; my @arr = A.new,A.new; say "#" ~@ar[0].foo
13:04 p6eval rakudo 4c94d7: OUTPUT«Symbol '@ar' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
13:04 moritz_ after "#" an operator is expected, not a term
13:05 moritz_ arr vs. ar
13:05 colomon rakudo: class A { method foo { "a" } }; my @arr = A.new,A.new; say "#" ~@arr[0].foo
13:05 p6eval rakudo 4c94d7: OUTPUT«#a␤»
13:05 alester joined #perl6
13:06 colomon yeah, okay, bug
13:07 colomon ~<< has to be prefix.  you're thinking <<~<<, I think?
13:07 colomon likely place for the bug is >>. in the parser, it's handled differently than all the other hyper-ops, and was written a long time ago.
13:08 colomon (I'd go after it, but I'm mostly watching the little guy as the movers deliver all our stuff.)
13:12 moritz_ you're right
13:12 moritz_ so I wonder why and how it's parsed at all
13:28 mikehh joined #perl6
13:29 * jnthn back from meeting
13:30 ignacio_ joined #perl6
13:30 snarkyboojum joined #perl6
13:31 takadonet jnthn: what are you working on today?
13:32 moritz_ std: '' ~<< @*ARGS
13:32 p6eval std 30351: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of << to do left shift; in Perl 6 please use +< or ~< at /tmp/Sx0VnTv2w3 line 1:␤------> [32m'' ~<< [33m⏏[31m@*ARGS[0m[31m===[0m​SORRY![31m===[0m␤Unsupported use of << to do left shift; in Perl 6 please use +< or ~< at
13:32 p6eval ../tmp/Sx0V…
13:33 jnthn takadonet: Some $dayjob bits, then my presentations for Russia, then we'll see what's left for Rakudo hacking. :-)
13:33 masak joined #perl6
13:33 takadonet masak: hey
13:33 jnthn lolitsmasak
13:33 masak` joined #perl6
13:39 ruoso joined #perl6
13:39 masak let's see, signatures in for loops default to Mu, right?
13:40 jnthn Should do, yes.
13:41 jnthn rakudo: for 1|2 -> $x { say $x.WHAT }
13:41 p6eval rakudo 4c94d7: OUTPUT«Junction()␤»
13:41 masak \o/
13:41 jnthn rakudo: for 1|2 -> Any $x { say $x.WHAT }
13:41 p6eval rakudo 4c94d7: OUTPUT«Int()␤Int()␤»
13:41 jnthn :-)
13:42 frzntoz joined #perl6
13:42 masak rakudo: my $i = 0; for 1|2 -> Any $x { ++$i }; say $i
13:42 p6eval rakudo 4c94d7: OUTPUT«2␤»
13:42 masak rakudo: my $i = 0; for 1|2 -> $x { ++$i }; say $i
13:42 p6eval rakudo 4c94d7: OUTPUT«1␤»
13:42 masak nice. :)
13:42 jnthn 'tis just a sig. :-)
13:43 masak hm. haven't really thought about junctions as something that can affect the number of iterations before.
13:44 jnthn Well, normally you'd not want them to, thus the Mu default. :-)
13:47 moritz_ rakudo: for 1 -> $x, $y? { say $y.WHAT }
13:47 p6eval rakudo 4c94d7: OUTPUT«Any()␤»
13:47 moritz_ it's constrained to Mu, but defaults to Any?
13:49 jnthn Just defaults to an empty scalar ATM, which defaults to Any
13:49 am0c joined #perl6
13:49 jnthn But that's probably not the right thing.
13:50 moritz_ rakudo: say (-> $x, $y? { }).signature.perl
13:50 p6eval rakudo 4c94d7: OUTPUT«:(Mu $x, Mu $y?)␤»
13:51 masak joined #perl6
13:51 mberends joined #perl6
13:53 rgrau_ joined #perl6
13:57 moritz_ is Date in Temporal.pod intended to be date-only, no time involved?
14:04 alester joined #perl6
14:04 frzntoz joined #perl6
14:06 moritz_ oh, Date is OutDateD
14:06 arnsholt moritz_: I think that's the usual way to handle these things, a Date, a Time, and a DateTime
14:07 ash__ joined #perl6
14:07 arnsholt Heh. But in Perl 6, all bets are off (as usual, I suppose =)
14:12 ash__ i just got scopes working in nq-nqp, now you can lexically scope or dynamically scope variables
14:19 masak joined #perl6
14:19 masak rakudo: "foo" ~~ /(foo)/; say "$0a"
14:19 p6eval rakudo 4c94d7: OUTPUT«Method 'ast' not found for invocant of class 'Undef'␤current instr.: 'perl6;Perl6;Actions;quote_escape:sym<$>' pc 264651 (src/gen/perl6-actions.pir:13636)␤»
14:19 * masak submits LTA rakudobug
14:19 masak rakudo: "foo" ~~ /(foo)/; say $0a
14:19 p6eval rakudo 4c94d7: OUTPUT«Confused at line 11, near "say $0a"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
14:19 masak alpha: "foo" ~~ /(foo)/; say "$0a"
14:19 p6eval alpha 30e0ed: OUTPUT«fooa␤»
14:20 masak jnthn: dredged up by November. the app cheese strikes again! :)
14:20 jnthn std: "foo" ~~ /(foo)/; say "$0a"
14:20 p6eval std 30351: OUTPUT«ok 00:01 110m␤»
14:21 jnthn std: "foo" ~~ /(foo)/; say $0a
14:21 p6eval std 30351: OUTPUT«[31m===[0mSORRY![31m===[0m␤Whitespace is required between alphanumeric tokens at /tmp/FKzDG5xV0J line 1:␤------> [32m"foo" ~~ /(foo)/; say $0[33m⏏[31ma[0m␤Whitespace is required between alphanumeric tokens at /tmp/FKzDG5xV0J line 1:␤------> [32m"foo" ~~ /(foo)/; say
14:21 p6eval ..$0[33…
14:22 jnthn rakudo: "foo" ~~ /(foo)/; say $0
14:22 p6eval rakudo 4c94d7: OUTPUT«foo␤»
14:23 jnthn cheese++
14:24 masak` joined #perl6
14:29 masak`` joined #perl6
14:29 nihiliad joined #perl6
14:34 masak fwiw, the only blocker left for November seems to be http://rt.perl.org/rt3/Tic​ket/Display.html?id=73912
14:35 masak` joined #perl6
14:37 jnthn masak`: The only one? Wow.
14:38 masak` well, the only one during the build phase. :)
14:39 Gothmog_ joined #perl6
14:46 ash__ joined #perl6
15:00 ignacio_ joined #perl6
15:01 masak GGE runs on master! \o/
15:01 moritz_ masak: it seems Dave also likes a date-only class - which is basically what Date::Simple is about which we've talked before
15:01 jnthn Wow!
15:01 jnthn masak++
15:01 jnthn masak: How many changes did you have to do?
15:01 masak` joined #perl6
15:01 masak` jnthn: none!
15:02 takadonet GGE?
15:02 moritz_ does it just run, or does it even passes its tests?
15:02 masak` moritz_: it runs test-regex. I haven't tried all tests.
15:02 masak` moritz_: will do now.
15:02 masak` takadonet: it's a grammar engine.
15:03 * jnthn wonders if it's any less glacial on master
15:03 arnsholt takadonet: Glacial Grammar Engine. A port of pmichaud's PGE to Perl 6
15:03 arnsholt In a nutshell: parsing Perl 6 grammars, entirely in Perl 6 code (almost, IIRC)
15:04 masak` it cheats in places. with things like /\w/
15:04 meppl joined #perl6
15:05 justatheory joined #perl6
15:08 masak the tests are slower than I remember them.
15:09 masak oh wait.
15:09 * jnthn will be kinda impressed if the tests are actually also all passing, or even mostly passing :-)
15:10 masak no... false alarm. it built and ran the tests using alpha :/
15:10 jnthn Oh. :-/
15:10 jnthn :-(
15:11 masak aye. new, probably more pessimistic, prognosis coming up.
15:11 masak jnthn: when's your trip to Russia?
15:12 jnthn Fly Sunday.
15:12 jnthn Talk Monday
15:12 jnthn Bizzarely, I then have Tue and Wed hanging around there too.
15:12 moritz_ profit Tue
15:12 moritz_ get drunk Wed
15:12 jnthn Though my talking is all on Monday.
15:13 jnthn Водка!!!
15:13 jnthn Actually I never, ever want to be drunk on vodka again.
15:14 moritz_ :-)
15:14 jnthn I acidentally the vodka in Minsk.
15:14 jnthn Once is...quite enough for a whole lifetime.
15:14 [particle] that's an undermistatement
15:15 masak ok.
15:15 masak joined #perl6
15:16 masak oh -- GGE is blocking on named enums. :(
15:16 * masak worksaround
15:17 jnthn ugh
15:18 jnthn I actually expect that I'll be able to spend most of the Tue and Wed hacking on Rakudo.
15:18 masak soudns much better than vodka :)
15:19 jnthn Oh, I'm sure I'll do both. :-)
15:19 jnthn Just in sensible quantities.
15:19 jnthn :-)
15:19 masak rakudo: my $a; my $b; qq[<$a\[$b\]>]
15:19 p6eval rakudo 4c94d7: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
15:20 masak alpha: my $a; my $b; qq[<$a\[$b\]>]
15:20 p6eval alpha 30e0ed: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤»
15:20 mberends updated the installer section of http://wiki.github.com/rakudo/​rakudo/whats-going-into-rakudo
15:20 masak do we consider this a new bug?
15:20 jnthn mberends++
15:20 masak mberends++
15:20 jnthn std: my $a; my $b; qq[<$a\[$b\]>]
15:20 p6eval std 30351: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/bALoUobxRf line 1:␤------> [32mmy $a; my $b; qq[<$a\[$b\[33m⏏[31m]>][0m    expecting any of:␤    postfix␤  postfix_prefix_meta_operator␤Compilation failed␤FAILED 00:01 110m␤»
15:20 jnthn Well. Hmm. :-)
15:21 jnthn masak: Can you re-write it into a construct that doesn't make my eyes bleed? ;-)
15:21 masak I'll try. :)
15:21 masak rakudo: qq[\[\]]
15:21 p6eval rakudo 4c94d7:  ( no output )
15:22 masak rakudo: my $a; qq[\[$a\]]
15:22 p6eval rakudo 4c94d7:  ( no output )
15:22 masak rakudo: my $a; qq[$a\[$a\]]
15:22 p6eval rakudo 4c94d7: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
15:22 masak aha. uhm.
15:22 masak it's being parsed as a postcircumfix *inside* the interpolated string.
15:22 jnthn rakudo: qq[uiff]
15:23 p6eval rakudo 4c94d7:  ( no output )
15:23 jnthn rakudo: qq[ui\[ff]
15:23 p6eval rakudo 4c94d7:  ( no output )
15:23 jnthn rakudo: qq[ui\[f\]f]
15:23 p6eval rakudo 4c94d7:  ( no output )
15:23 masak jnthn: no, you need the sigil.
15:23 jnthn rakudo: qq[ui\[f\]]
15:23 p6eval rakudo 4c94d7:  ( no output )
15:23 masak jnthn: it's the new interpolation code.
15:23 jnthn rakudo: my $x; qq[u$x\[f\]]
15:23 p6eval rakudo 4c94d7: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
15:23 jnthn Oh heh.
15:23 masak question is, is it wrong.
15:23 jnthn I'm...not entirely sure
15:24 masak I think it might be right to warn.
15:24 jnthn rakudo: my $x; $x\[f]
15:24 p6eval rakudo 4c94d7: OUTPUT«Could not find sub &f␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
15:24 masak the [ should be backwhacked, but not the second.
15:24 ash__ std: my $x; qq[u$x\[f\]]
15:24 p6eval std 30351: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/FjeGhtcjT2 line 1:␤------> [32mmy $x; qq[u$x\[f\[33m⏏[31m]][0m    expecting any of:␤     postfix␤  postfix_prefix_meta_operator␤Undeclared routine:␤   'f' used at line 1␤Compilation failed␤FAILED 00:01 108m␤»
15:24 masak hm. maybe neither need be, actually.
15:24 jnthn masak: It's parsing as unspace I think.
15:24 masak aye. so, optional.
15:24 moritz_ (one-pass parsing)++
15:25 jnthn I don't think it's a bug, but maybe we can warn better.
15:25 jnthn heh
15:25 jnthn rakudo: my $x = 'lol'; say "$x\    .uc()"
15:25 p6eval rakudo 4c94d7: OUTPUT«LOL␤»
15:25 pausenclown is there a nice way to write: return ' ' ~ $_ if $_ = join( ' ', self.attributes>>.xml
15:25 pausenclown *nicer
15:26 masak this part of GGE broke due to the new interpolation :)
15:26 masak I'd better change it.
15:26 jnthn Well, part of why I worked on interpolation is so Rakudo * users wouldn't get used to one interpolation semantics only to have their code broken for them when we did them properly later.
15:27 masak pausenclown: return ' ' ~ $_ if $_ given join(' ', self.attributes>>.xml)
15:27 masak jnthn: *nod*. I've been naughty without even realizing it :)
15:28 moritz_ std: "$0a"
15:28 p6eval std 30351: OUTPUT«ok 00:01 109m␤»
15:28 pausenclown masak: somehow i fail to see the advantage
15:28 jnthn masak: Aye, and I'm sure @other would be too. :)
15:29 payload joined #perl6
15:29 moritz_ given self.attributes».xml.join(' ') { return " $_" if $_ }
15:29 PerlJam pausenclown: what are you returning if the condition isn't true?
15:30 moritz_ or even   given self.attributes».xml { return ' ' ~ $_ if $_ }
15:30 masak pausenclown: it's not great, I grant you that.
15:30 masak moritz_++
15:30 moritz_ the stringification automatically adds whitespaces between items, so no need for an explicit join
15:31 moritz_ anyway, IME it help readability if you break such things up into two expressions
15:31 moritz_ or more
15:31 pausenclown rakudo: say '!' ~ $_ if given join( ' ', 1, 2, 3 )
15:31 p6eval rakudo 4c94d7: OUTPUT«Could not find sub &given␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
15:32 PerlJam pausenclown: you're missing a $_
15:32 pausenclown rakudo: given join( ' ', 1, 2, 3 ) { say '!' ~ $_ if $_ }
15:32 p6eval rakudo 4c94d7: OUTPUT«!1 2 3␤»
15:33 pausenclown "missing a $" ?
15:33 jnthn if $_
15:33 moritz_ a $_
15:33 masak I agree.
15:33 masak need an expression after the 'if'.
15:33 PerlJam rakudo: say '!' ~ $_ if $_ given join( ' ', 1, 2, 3 )
15:33 p6eval rakudo 4c94d7: OUTPUT«!1 2 3␤»
15:35 pausenclown that's ugly.
15:35 CokeBot9000 any perl6 hackers near NY, US?
15:35 pausenclown my version should work to, given how given works in moritz example (namely setting $_ implicitly)
15:36 moritz_ pausenclown: given is a statement, not an expression
15:36 jnthn if join( '', 1, 2, 3) -> $x { say "!$x"; }
15:37 PerlJam jnthn++
15:37 jnthn rakudo: if join( '', 1, 2, 3) -> $x { say "!$x"; }
15:37 p6eval rakudo 4c94d7: OUTPUT«!123␤»
15:38 masak std: if 1 <-> $x {}
15:38 p6eval std 30351: OUTPUT«ok 00:01 107m␤»
15:38 jnthn fejl
15:38 masak rakudo: if 1 <-> $x {}
15:38 p6eval rakudo 4c94d7: OUTPUT«Missing block at line 11, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
15:39 * masak submits rakudobug
15:40 moritz_ rakudo: <-> $x { }
15:40 p6eval rakudo 4c94d7: OUTPUT«Confused at line 11, near "<-> $x { }"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
15:40 moritz_ even easier
15:40 moritz_ rw lambda NYI
15:40 PerlJam <-> is parsed, just not everywhere it should
15:41 jnthn rakudo: my @x; for @x <-> $y { }
15:41 moritz_ rakudo: for 1, 2, 3 <-> $x { say $x }
15:41 p6eval rakudo 4c94d7: OUTPUT«Missing block at line 11, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
15:41 p6eval rakudo 4c94d7: OUTPUT«Missing block at line 11, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
15:41 moritz_ seems like not at all
15:41 * moritz_ has seldomly seen rw lambdas in "real" code
15:41 masak I'll phrase the ticket accordingly.
15:42 masak well, there's at least one in GGE :)
15:42 moritz_ rakudo: 'a' ~~ sub { .say }
15:42 p6eval rakudo 4c94d7: OUTPUT«Any()␤»
15:43 masak exactly one, actually.
15:43 PerlJam rakudo:  if 0 { say "hi" } else <-> { say "ho" }
15:43 p6eval rakudo 4c94d7: OUTPUT«ho␤»
15:43 PerlJam See?  :)
15:43 moritz_ urks
15:43 masak rw null sig? eww! :)
15:44 jnthn rakudo: 'a' ~~ sub { $^x.say }
15:44 p6eval rakudo 4c94d7: OUTPUT«a␤»
15:44 pugssvn r30352 | moritz++ | [t/spec] do not realy on $_ in anonymous subs
15:44 moritz_ s/realy/realy/
15:45 jnthn I don't think $_ in a sub, anonymous or otherwise, counts as a parameter.
15:45 jnthn moritz_: realy? ;-)
15:45 moritz_ erm, rely
15:45 * moritz_ should really go to bed
15:45 masak` joined #perl6
15:45 moritz_ realy. :-)
15:46 masak` it's OK. I can work around that one :)
15:50 PerlJam Hmm.  Every pblock should be able to take a <->, but that's not the case.   I think EXPR is perhaps being a tad too greedy.
15:50 jnthn Ugh.
15:51 moritz_ we've had such a bug in alpha too
15:51 moritz_ where -> wouldn't be parsed where a term was expected
15:52 masak joined #perl6
15:52 masak` joined #perl6
15:53 jnthn May be worth glancing the LTM prefixes in the generated code to see if <-> shows up as one.
15:53 masak rakudo: class A {}; class A is also {}
15:53 p6eval rakudo 4c94d7: OUTPUT«Illegal redeclaration of symbol 'A'␤current instr.: 'perl6;Perl6;Grammar;_block249' pc 40351 (src/gen/perl6-grammar.pir:360)␤»
15:54 jnthn augment
15:54 masak would it be possible to install a trait saying that 'is also' is deprecated?
15:54 jnthn ja.
15:54 * masak knows :)
15:54 jnthn multi trait_mod:<is>(*@, :$also!) { die "omfg use augment!" }
15:55 kaare_ joined #perl6
15:55 masak it's biting me, might bite others.
15:55 jnthn try it in traits.pm
15:55 moritz_ rakudo: multi trait_mod:<is>(*@, :$also!) { die "omfg use augment!" }; class A { }; class A is also { }
15:55 p6eval rakudo 4c94d7: OUTPUT«Illegal redeclaration of symbol 'A'␤current instr.: 'perl6;Perl6;Grammar;_block249' pc 40351 (src/gen/perl6-grammar.pir:360)␤»
15:55 moritz_ ... unless that error is thrown first :-)
15:56 jnthn Oh.
15:56 jnthn It...probably is. Grrr.
15:56 jnthn Worse, it's...rather hard to fix.
15:56 masak ok; never mind then.
15:56 jnthn Becuase we probably don't even parse the "is also".
15:56 jnthn Which is one of the reasons why it became a scope decl, rather than a trait. :-)
15:56 moritz_ not worth the effort, IMHO
15:57 moritz_ does t/spec/integration/weird-errors.t (after an 'svn up') pass on master?
15:57 moritz_ the test was bogus before, fixed now... and no idea if it's passing
15:58 moritz_ on the 'cool' branch one of the tests fails
16:00 slhsen joined #perl6
16:01 cdarroch joined #perl6
16:01 cdarroch joined #perl6
16:04 masak` joined #perl6
16:06 masak` rakudo: class A { sub b { 0x10 }; has %!c = "" => { "" => b }; }; A.new
16:06 p6eval rakudo 4c94d7: OUTPUT«Could not find sub &b␤current instr.: 'perl6;A;_block80' pc 613 (EVAL_1:263)␤»
16:07 masak` this is biting me currently. I use subs because constants didn't work in classes in alpha, and don't work at all in master.
16:07 masak` rakudo: class A { sub b { 0x10 }; has %!c = "" => b }; A.new
16:07 p6eval rakudo 4c94d7: OUTPUT«Could not find sub &b␤current instr.: 'perl6;A;_block80' pc 613 (EVAL_1:263)␤»
16:07 masak` jnthn: any ideas why this might be?
16:08 ash__ are there any plans for nqp to have type constraints?
16:08 jnthn masak`: lexical scope f'up, I guess.
16:08 * masak` submits rakudobug
16:08 jnthn masak`: file Rakudo bug but I can probably fix that without too much trouble.
16:08 masak` \o/
16:09 jnthn ash__: Not concrete ones, but certainly I think pmichaud may be open to having some basic support for that, especially for native types.
16:09 masak`` joined #perl6
16:09 masak`` rakudo: class A { sub b { 0x10 }; has $!c = b }; A.new
16:09 p6eval rakudo 4c94d7: OUTPUT«Could not find sub &b␤current instr.: 'perl6;A;_block80' pc 613 (EVAL_1:263)␤»
16:10 ash__ k, just wondering, i am trying to start doing basic code generation, type constraints are kinda nice, since you can say my Int $a and expect it to be an Int (or child), thus you have more knowledge at compile time about which operations you can do
16:10 ive joined #perl6
16:12 jnthn rakudo: class A { our sub b { 0x10 }; has $!c = b }; A.new
16:12 p6eval rakudo 4c94d7:  ( no output )
16:12 jnthn masak`: Horrible workaround above.
16:12 jnthn But I try and fix the bug soon.
16:16 proller joined #perl6
16:29 moritz_ rakudo: 1/0; say "alive"
16:29 p6eval rakudo 4c94d7: OUTPUT«alive␤»
16:30 jnthn Just makes a Rat. :-)
16:30 jnthn Though arguably should fail.
16:31 arnsholt Should it though?
16:31 moritz_ rakudo: my $x = fail('foo'); say $x
16:31 p6eval rakudo 4c94d7: OUTPUT«No exception handler and no message␤current instr.: '&fail' pc 17450 (src/builtins/Junction.pir:497)␤»
16:31 moritz_ rakudo: my $x = fail('foo'); say "alive"
16:31 p6eval rakudo 4c94d7: OUTPUT«No exception handler and no message␤current instr.: '&fail' pc 17450 (src/builtins/Junction.pir:497)␤»
16:31 tri1 joined #perl6
16:33 supernovus joined #perl6
16:36 jnthn arnsholt: I dunno, that's why I said arguably.
16:36 jnthn arnsholt: I guess if you never use the Rat, it kinda doesn't matter.
16:36 jnthn rakudo: say 1/0
16:36 p6eval rakudo 4c94d7: OUTPUT«Inf␤»
16:36 jnthn :-)
16:37 jnthn rakudo: 0/0
16:37 p6eval rakudo 4c94d7: OUTPUT«Divide by zero␤current instr.: 'infix:<div>' pc 326530 (src/gen/core.pir:13156)␤»
16:37 jnthn heh. :-)
16:37 orafu joined #perl6
16:37 kaare_ joined #perl6
16:39 arnsholt jnthn: I think you can argue both ways
16:39 TimToady I'd probably turn 0/0 into NaN
16:40 pugssvn r30353 | moritz++ | [t/spec] fudge failing integration test
16:40 arnsholt I think there are cases where dividing by zero result in a NaN or something could be nice
16:40 SmokeMachine joined #perl6
16:40 cj anyone here feel like being listed on my 'possible mentors' for Perl6 on the DLR?
16:40 TimToady we're still trying to be friendly to parallel algorithms here and not throw exceptions
16:41 moritz_ cj: I hope jnthn or diakopter might be intereted
16:41 TimToady esp diakopter, since he's working on something similar
16:41 cj moritz_: I'm putting diakopter in there whether he responds or not ;)
16:42 moritz_ cj: I could mentor such a project from the social / project-managment POV, but I couldn't really act as a technical aid
16:42 cj moritz_: okay.  Name?
16:42 moritz_ cj: Moritz Lenz
16:42 cj thanks ;)
16:42 lichtkind joined #perl6
16:42 moritz_ though diakopter would really be the better suited mentor
16:43 lichtkind what exactly does cool, autoboxing?
16:44 moritz_ lichtkind: I've explained it today once already, please backlog :-)
16:44 moritz_ or read the spec
16:44 ash__ joined #perl6
16:46 lichtkind moritz_: thanks its interesting but i asked for just the word, it is multible inhertance?
16:47 moritz_ Cool is class.
16:47 moritz_ multiple inheritance is a feature/concept
16:47 lichtkind so cool is nothingthe a special class?
16:48 moritz_ lichtkind: Cool is just as special as Array or Int or Any
16:48 moritz_ (except maybe for that fallback feature that's NYI and conjectural)
16:50 PerlJam Cool and Mu push the envelope a little bit on "cuteness" for class names.
16:51 lichtkind it has to its perl :)
16:51 lichtkind moritz_: thanks a lot
16:52 pmurias ruoso: i expanded the benefits section, http://socghop.appspot.com/gsoc/student_propos​al/show/google/gsoc2010/pmurias/t127020368113
16:52 ash__ i don't mind Mu, Cool seems like a funny name
16:53 TimToady well, that's because it is.  :)
16:54 TimToady It's good when things seem to be what they are!
16:54 moritz_ TimToady: should the List/Seq methods like sort, join etc. be in Cool or in Any?
16:54 moritz_ I think we've discussed that before, but haven't reached a good conclusion yet
16:54 PerlJam I would think Cool
16:54 TimToady once upon a time, it seems to me we had a reason for leaving the list ones in Any
16:55 moritz_ yes
16:55 TimToady because the list ones aren't so much about the internals, but how they behave as objects externally
16:55 moritz_ so that things like <foo>.join('') would work
16:55 moritz_ but since angle brackets and so on always return something Coolish, that's foolish :-)
16:56 TimToady it's not so much a conversion as a "list boxing"
16:56 moritz_ right
16:56 TimToady and therefore somewhat more fundamental
16:56 TimToady I'm cool with leaving it in Any.
16:56 moritz_ I can argue both ways, and I can implement it both ways.
16:56 PerlJam boxing goes in Any, "universal" conversions go in Cool ?
16:57 ash__ TimToady: i was curious about something, if scalars default to the Any constraint, is assigning the value Mu legal?
16:57 TimToady no
16:57 TimToady it's "too undefined" for that
17:00 uniejo joined #perl6
17:08 * PerlJam finds it stranger that there are so many SDL proposals to gsoc
17:08 * diakopter cj feel free to add me as a willing mentor
17:08 PerlJam s/stranger/strange/
17:09 diakopter cj: though my own efforts are on my own mini-dlr-ish thing.
17:09 PerlJam diakopter: that sounds perfect becuase  then you can compare notes and each make the other better.
17:18 uniejo joined #perl6
17:20 * diakopter looks at adding another emitter target to viv
17:30 ash__ joined #perl6
17:36 Chillance joined #perl6
17:36 cj diakopter: cool, thanks!
17:40 uniejo rakudo: say (^*)[0..9]
17:40 p6eval rakudo 4c94d7: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class 'Range'␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
17:49 moritz_ cj: your proposal lacks some very important information
17:50 moritz_ cj: like proposed architecture of the compiler
17:50 moritz_ and I also think that it should be clear before the start of the project what you want to implement in the scope of GSCO
17:50 moritz_ *GSOC
17:51 moritz_ I mean a short list of things like 'integers, strings, variable declaration + assignment, say(), if-statement' would be a huge step in the right direction
17:56 uniejo joined #perl6
18:01 ignacio_ joined #perl6
18:15 cj moritz_: architecture of the compiler?  Perhaps I don't have enough experience with compilers yet... My assumption is that it would target the CLR via DLR
18:15 diakopter cj: probably the biggest question is which parser will it use
18:15 diakopter since that kinda determines most other things
18:15 PerlJam which is cj's?
18:16 cj PerlJam: Perl6 on the DLR
18:16 * PerlJam opens up the list of projects
18:16 diakopter cj: and the correct answer to that question is ... :) Larry's STanDard parser
18:16 diakopter (since implementing anything else would be impossible even within the time allotted)
18:17 cj diakopter: what parsers are available?  How does your javascript interpreter do it?
18:17 diakopter that one uses larry's STD
18:17 cj diakopter: okay.  Is Larry's STanDard parser perl?
18:17 diakopter yes
18:18 cj diakopter: how do you get it to work in javascript?  do you bootstrap it outside of the js runtime?
18:18 diakopter no
18:18 diakopter it runs in perl
18:18 diakopter I wrote an emitter for its AST
18:19 diakopter that emits a JS function that creates the AST properly
18:20 diakopter I could do something similar for C#
18:20 diakopter actually
18:20 diakopter I could do something similar for RunSharp
18:20 diakopter o_O
18:21 diakopter (so it wouldn't have to invoke csc.exe at runtime)
18:22 diakopter I tried lots of routes to use YAML direclty
18:22 diakopter but I couldn't get the one in IronRuby to work
18:22 cj did you look at the YAML parser from IronRuby?
18:22 cj right
18:23 moritz_ cj: that's hardly an architecture
18:23 cj perhaps I should take a compiler course and apply next year.  maybe I'm still too ignorant ;)
18:25 M_o_C joined #perl6
18:25 M_o_C joined #perl6
18:27 moritz_ well, you could at least describe the stages that you're planning to implement
18:27 PerlJam cj: ignorance is sometimes good.  There are things that everybody knows can't be done ... until someone does it.  :)
18:27 moritz_ like lexing, parsing, building an AST, compiling to whatever primitives the runtime/backend understands
18:28 M_o_C joined #perl6
18:28 diakopter the DLR understand expression trees on/producing arbitrary types
18:28 diakopter Mu, Cool, Any would be 3 of those types
18:29 diakopter cj wouldn't be able to use much of the DLR's dispatch helpers; it would have to be just as dynamic as Rakudo's
18:30 diakopter user-declared classes could be translated to derivatives of Cool, but any multiple inheritance or roles would need to be compiled to calls to the custom dispatchres
18:31 diakopter the exception/control-flow model would have to be ignored
18:31 diakopter it's too complex for a less-than-a-man-year project
18:32 diakopter for the DLR at least
18:35 diakopter these are part of the reasons that, every time I look at it, I reject the idea of using the DLR as a backend
18:35 diakopter (to target the CLR)
18:36 diakopter Perl 6 is just _TOO_ dynamic
18:36 cj moritz_: I've run out of time to submit changes to that form, but I can flesh things out on my blog and point you to them.  I've got a call coming in 36 minutes ago that I expect Real Soon Now
18:38 ash__ joined #perl6
18:41 literal joined #perl6
18:43 avarab joined #perl6
18:49 ShaneC joined #perl6
18:50 PerlJam If masak's proposal doesn't make the cut I'm going to be really bummed.
18:51 diakopter what's the cut
18:51 diakopter I mean, is there a limit
18:51 PerlJam There is a limit but I don't know what it is yet.
18:52 diakopter is the limit already set (by someone)?
18:52 PerlJam But there appears to be much more interest in Parrot, SDL, and mojolicious
18:52 * jnthn is hopeful that masak's one will make it.
18:52 diakopter PerlJam: more than what
18:52 diakopter where is the interest measured, and is interest one of the qualifying factors?
18:52 diakopter and who makes the decisions?
18:53 PerlJam I'm just looking at the scores so far on the gsoc
18:53 diakopter url?
18:53 PerlJam diakopter: http://socghop.appspot.com/gsoc/org​/list_proposals/google/gsoc2010/tpf
18:53 PerlJam diakopter: have you applied to be a mentor for gsoc2010?
18:54 diakopter that link doesn't work for me
18:55 diakopter I guess not
18:55 PerlJam yeah, you have to be a potential mentor
18:55 ShaneC left #perl6
18:56 jnthn Yeah
18:56 diakopter how does that happen
18:56 jnthn PerlJam: Who votes on these, out of interest?
18:56 jnthn Perl Foundation folks?
18:56 PerlJam diakopter: http://socghop.appspot.com/site/home/site  there's a link on the bottom left
18:56 diakopter who approves these mentor applications
18:56 PerlJam diakopter: dukeleto and particle I think
18:57 PerlJam jnthn: people who have been approved as TPF mentors.
18:58 diakopter PerlJam: did you mean the limit has already been set, but you don't know it yet?  or that there will be a limit that will be set sometime
18:58 PerlJam diakopter: no, the limit hasn't been set.  It's however many slots TPF gets
19:01 PerlJam cj: btw, interesting eligibility information  :)
19:03 CokeBot9000 jnthn: you should offer to be a mentor, at least for any p6 stuff.
19:03 CokeBot9000 google will set the limit.
19:03 jnthn CokeBot9000: I already have. :-)
19:04 jnthn CokeBot9000: I've marked myself as willing to mentor masak++'s project too.
19:06 cj PerlJam: what portion?  the sexxy picture?
19:06 PerlJam yeah :)
19:06 nihiliad joined #perl6
19:06 PerlJam several of these proposals, if they don't make it for the GSoC, would make good grant applications to TPF
19:06 cj dhoss said he sent in his student id ;)
19:06 pausenclown rakudo: say 'a'.subst(/(.)/,"! $1 !")
19:07 p6eval rakudo 4c94d7: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
19:07 PerlJam though I understand that TPF has recently changed the grant process a bit.
19:07 pausenclown is there a workaround for this?
19:07 moritz_ can the proposals be changed after the submission deadline?
19:07 moritz_ pausenclown: yes. Use a closure as second argument
19:07 moritz_ pausenclown: it gets a match object passed in as argument
19:08 PerlJam pausenclown: your way causes $1 to be interpolated immediately.
19:08 moritz_ pausenclown: and then you can access $match[0]
19:08 PerlJam pausenclown: also, you want $0 looks like
19:08 pausenclown rakudo: say 'a'.subst({/ (.)/},"! $1 !")
19:08 p6eval rakudo 4c94d7: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
19:08 moritz_ 21:07 <@moritz_> pausenclown: yes. Use a closure as second argument
19:08 moritz_ second.
19:08 pausenclown oops.
19:08 PerlJam moritz_: well, the invocant is the first arg isn't it?  ;)
19:08 cj moritz_: looks like no
19:09 pausenclown rakudo: say 'a'.subst(/(.)/,{"! $1 !"})
19:09 p6eval rakudo 4c94d7: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
19:09 moritz_ PerlJam: bu!
19:09 pausenclown rakudo: say 'a'.subst(/(.)/,{"! $/[0] !"})
19:09 p6eval rakudo 4c94d7: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 10733 (src/builtins/Role.pir:90)␤»
19:09 moritz_ pausenclown: and read the rest of what I wrote too
19:09 kensanata joined #perl6
19:10 moritz_ rakudo: say 'a'.subst(/(.)/, -> $m { "! $m[0] !" })
19:10 p6eval rakudo 4c94d7: OUTPUT«! a !␤»
19:10 pausenclown how to catch the argument?
19:10 moritz_ or sub ($m) { ... }
19:10 pausenclown ah. already answered
19:10 PerlJam rakudo: say 'a'.subst(/(.)/, { "! $^a[0] !" });
19:10 p6eval rakudo 4c94d7: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block58' pc 739 (EVAL_1:253)␤»
19:12 PerlJam rakudo:  say { $^a }.(42)
19:12 p6eval rakudo 4c94d7: OUTPUT«42␤»
19:12 PerlJam rakudo:  say { "$^a" }.(42)
19:12 p6eval rakudo 4c94d7: OUTPUT«42␤»
19:12 PerlJam rakudo:  say { "! $^a !" }.(42)
19:12 p6eval rakudo 4c94d7: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: '_block46' pc 309 (EVAL_1:127)␤»
19:13 PerlJam interesting
19:13 moritz_ PerlJam: there's a ticket in RT for self-declaring formal paramters
19:13 moritz_ two actually, at least
19:13 riffraff joined #perl6
19:14 PerlJam rakudo:  say { "$^a !" }.(42)
19:14 p6eval rakudo 4c94d7: OUTPUT«42 !␤»
19:14 jnthn PerlJam: That's a curious bug. :-/
19:15 jnthn rakudo: say { "! $^a !" }.signature.perl
19:15 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a, Mu $a)␤»
19:15 jnthn hm. wtf.
19:16 PerlJam any text before the $ seems to add the extra parameter
19:16 PerlJam rakudo:  say { "$^a !" }.signature.perl
19:16 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a)␤»
19:16 PerlJam rakudo:  say { "a$^a !" }.signature.perl
19:16 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a, Mu $a)␤»
19:17 jnthn I can only guess that we're somehow falling into the interpolation rule twice.
19:17 jnthn Heck knows why.
19:17 jnthn Probably interesting to have a play with <?DEBUG>
19:17 TimToady some lookahead on the variable maybe?  in any case, the symbol table ought to only add one entry for a dup name
19:18 PerlJam rakudo: say { " $^a $^b" }.signature.perl
19:18 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a, Mu $a, Mu $b)␤»
19:19 PerlJam rakudo: say { "$^a $^b" }.signature.perl
19:19 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a, Mu $b)␤»
19:19 moritz_ wtbh?
19:19 jnthn TimToady: Well, yeah, that too I guess.
19:19 TimToady not sure there's much b in h
19:20 PerlJam TimToady: sure there is.  you should watch more horror movies  ;)
19:21 TimToady rakudo: say { "$^a$^a $^b" }.signature.perl
19:21 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a, Mu $a, Mu $b)␤»
19:21 PerlJam there was some show on syfy last night that depicted a reasonable approximation of h and there was lots and lots of b
19:21 TimToady rakudo: say { "$^a$^a$^a $^b" }.signature.perl
19:21 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a, Mu $a, Mu $a, Mu $b)␤»
19:21 pausenclown how do i control how a class instance stringifies?
19:21 PerlJam pausenclown: .Str
19:21 sjohnson hi guys
19:21 pausenclown i fell a little silly now =)
19:22 TimToady rakudo: say { "$^a" ~ "$^a" }.signature.perl
19:22 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a, Mu $a)␤»
19:22 PerlJam that's a separate bug
19:22 TimToady rakudo: say { $^a ~ $^a }.signature.perl
19:22 moritz_ rakudo: say { $^x }.signature.perl
19:22 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a, Mu $a)␤»
19:22 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $x)␤»
19:22 moritz_ why is it behind ;;? is that spec?
19:22 TimToady rakudo: say { $^a ~ $a }.signature.perl
19:22 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a)␤»
19:23 jnthn Well, since it's not a multi candidate, it hardly matters. ;-)
19:23 jnthn But I agree it's weird.
19:23 TimToady looks like it's using push logic rather than hash logic
19:23 PerlJam rakudo: say { $a ~ $^a }.signature.perl  # should error, right?
19:23 jnthn Will tweak it.
19:23 p6eval rakudo 4c94d7: OUTPUT«:(;; Mu $a)␤»
19:23 TimToady std: say { $a ~ $^a }.signature.perl
19:23 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $a is not predeclared at /tmp/7jkZYAHWsM line 1:␤------> [32msay { $a[33m⏏[31m ~ $^a }.signature.perl[0m␤Compilation failed␤FAILED 00:01 107m␤»
19:23 TimToady std: say { $^a ~ $a }.signature.perl
19:23 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
19:24 moritz_ std: multi infix:<+> { $^a + $^b }
19:24 p6eval std 30353: OUTPUT«ok 00:01 109m␤»
19:24 jnthn heh
19:24 pausenclown rakudo: class A { method a { 'A' }; method Str { self.a }; }; say "{ A.new }"
19:24 p6eval rakudo 4c94d7: OUTPUT«A␤»
19:24 jnthn OK, so I really do need to fix it. :-P
19:25 pausenclown rakudo: class A { method a { 'A class'  }; method Str { self.a }; }; say "{ A.new }"
19:25 p6eval rakudo 4c94d7: OUTPUT«A class␤»
19:25 pausenclown nice
19:25 jnthn My Rakudo tree is kinda busted at the moment though.
19:26 sjohnson rakudo: my $a = " happiness ".trim-leading;  say "[$a]"
19:26 p6eval rakudo 4c94d7: OUTPUT«[happiness ]␤»
19:26 jnthn rakudo: my $a = " happiness ".trim-following;  say "[$a]"
19:26 p6eval rakudo 4c94d7: OUTPUT«Method 'trim-following' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
19:26 jnthn aww.
19:26 TimToady trailing
19:26 jnthn Ah. :-)
19:27 TimToady as in "leading indicators/trailing indicators"
19:30 * PerlJam will still think "ltrim" and "rtrim" probably
19:31 TimToady left/right is a problem with rtl languages.  front/back head/tail, though head/tail means something else in FP lists
19:33 TimToady but leading/trailing is not bad from a huffman POV
19:34 TimToady beg/end is a possibility
19:35 arnsholt Hmm. I really wish nqp-rx supported integer precedence levels as well as string ones
19:36 moritz_ arnsholt: the Perl 6 model implies that you can add new precedence levels between existing ones
19:36 arnsholt Aha. That particular detail had slipped past me
19:36 arnsholt Now it makes more sense to use strings exclusively
19:38 arnsholt TimToady: end bypasses the ambiguity of tail as well
19:38 arnsholt (as well as being shorter =)
19:38 PerlJam arnsholt: which end?  :)
19:39 TimToady I know, I know! left-end/right-end...oh wait...
19:40 arnsholt PerlJam: Damn you! ^^
19:41 TimToady on the qq[u$x\[f\]] problem, I can't whether it's better to blow up on the ambiguous \, or to just force it not to be unspace and terminate the interpolation
19:42 TimToady can argue it both ways...
19:42 TimToady CAIBW
19:43 moritz_ TimToady: I'd be in favour of not allowing unspace in interpolations at all
19:43 TimToady that's not in question
19:43 PerlJam TimToady: i'd opt for the latter
19:44 moritz_ TimToady: I mean, if you need something more complicated than simple method calls, you'd better use a closure or concatenation or sprintf
19:44 jnthn Yeah, allowing whitespace in thre was a little surprising. :-)
19:44 moritz_ it's simply too much strain on the human parser
19:44 TimToady that's still not the question
19:45 TimToady we know we're not going to allow \ as part of the interpolation
19:45 jnthn Heh, I didn't until you just said so. :-)
19:45 TimToady the question is whether it's better to blow up or assume that the quote continues
19:45 jnthn rakudo: "hmm\ and an escaped space?"
19:45 p6eval rakudo 4c94d7:  ( no output )
19:45 jnthn std: "hmm\ and an escaped space?"
19:45 p6eval std 30353: OUTPUT«ok 00:01 108m␤»
19:45 jnthn (just curious)
19:46 moritz_ perl6: say "hm\ hm"
19:46 p6eval elf 30353, pugs, rakudo 4c94d7: OUTPUT«hm hm␤»
19:46 jnthn TimToady: Not sure. Dunno why anyone would escape a space...
19:46 PerlJam TimToady: There had better be a really good reason for an explosion and the errant unspace attempt doesn't strike me as explosive enough.
19:46 jnthn Well, in a regex they could sanely do so though.
19:48 Gruber joined #perl6
19:49 CokeBot9000 PerlJam: Which part of the grant process are you thinking about?
19:50 PerlJam CokeBot9000: dunno, I just remember seeing something about it changing recently, so I consider whatever I thought I knew obsolete until I make sure of the actual process.
19:51 moritz_ CokeBot9000: I think they want to garbage-collect proposals more agressively if the grant worker doesn't respond
19:51 CokeBot9000 hasn't changed that much. payments structure will be changing, but grant applications continue quarterly. We don't see a lot of P6 grants requests hitting the GC, though. (since it's probably easier to go through the Hague $$ first.)
19:51 CokeBot9000 full disclosure: I'm on the GC.
19:52 moritz_ speaking of which... what's up with masak's Web.pm grant?
19:52 moritz_ I think it was *almost* finished
19:52 [particle] it's blocking on Web 6.0
19:53 moritz_ OH NOEZ
19:53 CokeBot9000 GEEZ, we're still in Web 2.0
19:53 CokeBot9000 this could take a while.
19:54 Su-Shee I'm doing web threeandahalf. very shiny.
19:54 sjohnson can someone please help me figure out what perl6 does as far as whitespace trimming?  does it do unicode whitespace too?
19:55 sjohnson ahh.. maybe i should find it in the apocolypses before i get whacked with a bamboo stick
19:56 PerlJam sjohnson: Synopses
19:56 moritz_ sjohnson: Perl 6 uses consistent Unicode semantics.
19:58 sjohnson ok thanks
19:58 sjohnson i'll google for it etc
20:00 TimToady jnthn: we already outlaw unspace in regex
20:00 takadonet left #perl6
20:00 TimToady but that's only the kind with real space after it
20:01 TimToady and we don't allow cascaded postfixes, so the $a\[] situation doesn't arise
20:01 jnthn std: my $a; say "$a\    .foo()"
20:01 p6eval std 30353: OUTPUT«ok 00:01 109m␤»
20:01 jnthn TimToady: Ah, in spec?
20:01 sjohnson moritz_:  when you say semantics, do you mean it has a set way of handling what unicode chars the perl6 board of shadowy figures have deemed whitespace?
20:01 TimToady hmm
20:01 TimToady that could be a bug
20:02 TimToady std: / \ /
20:02 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes (' ') or use a backslashed form like \x20 at /tmp/EzqNId1sz1 line 1:␤------> [32m/ \[33m⏏[31m /[0mCompilation failed␤FAILED 00:01 107m␤»
20:02 TimToady probably parsing the variable with something too general
20:02 TimToady std: my $a; /$a \ /
20:02 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
20:02 moritz_ sjohnson: I'm not familiar with those shadowy figures
20:02 TimToady hmmmmmmm
20:02 TimToady very strange
20:03 TimToady std: my $a; /\d \ /
20:03 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes (' ') or use a backslashed form like \x20 at /tmp/GopteBOXFz line 1:␤------> [32mmy $a; /\d \[33m⏏[31m /[0mCompilation failed␤FAILED 00:01
20:03 p6eval ..10…
20:03 TimToady something from %*LANG<MAIN> must be eating the space after a var
20:04 sjohnson moritz_: sorry, i meant more like "unnamed devs who would be difficult to track down unless i know who was responsable for what"
20:04 PerlJam sjohnson: perl considers "whitespace" what unicode considers "whitespace"
20:05 moritz_ sjohnson: try unicode.org
20:05 sjohnson thank ous
20:06 PerlJam sjohnson: though perl also thinks of comments as "whitespace" while unicode doesn't
20:06 PerlJam :)
20:09 sjohnson at this moment, the perl6 particle in my brain is also considered whitespace
20:09 sjohnson still trying to learn the ins and outs of perl5!
20:10 sjohnson but i consider myself a good perl5 programmer.  starting to figure out perl internals on my own which is kinda neat
20:11 * sjohnson toots his own horn
20:11 PerlJam perl5 guts are nothing like perl6 guts though
20:11 moritz_ specifically since there are no perl6 guts :-)
20:11 moritz_ only rakudo guts, mildew guts, ...
20:12 jnthn Mmmm...guts.
20:12 sbp knife goes in, guts come out, that's what Osaka Seafood Concern is all about
20:12 * moritz_ had a decent steak for dinner, and is quite satisfied right now
20:13 * jnthn just did pasta pesto with fried bacon bits, but also had a rather larger lunch with @dayjobfolk
20:13 pmurias joined #perl6
20:14 jnthn One of those curious places where you put stuff on your plate and pay by weight. So it's a case of optimizing for light but nutritious. ;-)
20:15 frettled heh
20:15 ilogger2 joined #perl6
20:16 sjohnson i have found for the little S\d+ readings i have done, that the perl5 gut knowledge makes perl6 guts easier to understand, as it usually talks about the difference between the two
20:17 arnsholt jnthn: Sounds like an interesting optimisation problem. Did you model it when you got home? ^^
20:18 moritz_ sjohnson: problem is, the specs don't talk about which version of perl 5 it considers
20:18 moritz_ and perl 5 changes, too
20:18 sjohnson uh oh
20:18 sjohnson good thing i only understand the tip of the iceberg then of p5 :)
20:19 avar rakudo: my Str $str = " foo "; trim-leading($str)
20:19 p6eval rakudo 4c94d7:  ( no output )
20:19 avar perl6: my Str $str = " foo "; trim-leading($str)
20:19 p6eval elf 30353: OUTPUT«Undefined subroutine &GLOBAL::trim called at (eval 124) line 4.␤ at ./elf_h line 5881␤»
20:19 p6eval ..rakudo 4c94d7:  ( no output )
20:19 p6eval ..pugs: OUTPUT«*** No such subroutine: "&trim"␤    at /tmp/EO8YL8auvs line 1, column 24 - line 2, column 1␤»
20:19 avar perl6: my Str $str = " foo "; trim_leading($str)
20:19 p6eval elf 30353: OUTPUT«Undefined subroutine &GLOBAL::trim_leading called at (eval 123) line 4.␤ at ./elf_h line 5881␤»
20:19 p6eval ..pugs: OUTPUT«*** No such subroutine: "&trim_leading"␤    at /tmp/QeQgooVrG1 line 1, column 24 - line 2, column 1␤»
20:19 p6eval ..rakudo 4c94d7: OUTPUT«Could not find sub &trim_leading␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
20:19 avar perl6: my Str $str = " foo "; trim($str)
20:19 p6eval pugs: OUTPUT«*** No such subroutine: "&trim"␤    at /tmp/RjpCyKrLIK line 1, column 24 - line 2, column 1␤»
20:19 p6eval ..rakudo 4c94d7:  ( no output )
20:19 p6eval ..elf 30353: OUTPUT«Undefined subroutine &GLOBAL::trim called at (eval 123) line 4.␤ at ./elf_h line 5881␤»
20:20 avar meh:)
20:20 jnthn Guess a missing is export.
20:21 pmurias sjohnson: it might be usefull to note the places where the spec depends on p5 knowledge as it would be usefull to fill in the gaps
20:21 pmurias std: my $Foo::bar;
20:21 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
20:22 * arnsholt has a pwan
20:22 pmurias isn't my $Foo::bar an error?
20:22 ash__ no...
20:22 pmurias arnsholt: pwan = ?
20:22 pmurias ash__: what does that do?
20:22 ash__ thats the same as my Foo::<$bar>
20:22 ash__ (i believe)
20:22 pmurias and what does that do?
20:22 arnsholt pmurias: A plan (ref. hunting wabbits =)
20:22 ash__ declares a variable $bar in the in the Foo package
20:23 jnthn I guess the lexical package Foo.
20:24 ash__ std: my Foo::<$a>;
20:24 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤In my declaration, typename 'Foo::' must be predeclared (or marked as declarative with :: prefix) at /tmp/Dvg4jVFUw2 line 1:␤------> [32mmy Foo::[33m⏏[31m<$a>;[0m␤Malformed my at /tmp/Dvg4jVFUw2 line 1:␤------> [32mmy Foo::[33m⏏[31m<$a>;[0m
20:24 p6eval ..…
20:25 ash__ after thinking about it, i kinda expected my $Foo::bar to do that too...
20:25 ash__ std: module Foo { }; my Foo::<$bar>;
20:25 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/kuwUPecbrZ line 1:␤------> [32mmodule Foo { }; my Foo::[33m⏏[31m<$bar>;[0m␤Malformed my at /tmp/kuwUPecbrZ line 1:␤------> [32mmodule Foo { }; my Foo::[33m⏏[31m<$bar>;[0m    expecting any
20:25 p6eval ..o…
20:26 pmurias my declares a lexical variable, how can a lexical variable live in a package?
20:26 nadim joined #perl6
20:26 jnthn There's such thing as lexical packages.
20:26 nadim joined #perl6
20:26 ash__ rakudo: my $Foo::bar;
20:26 p6eval rakudo 4c94d7:  ( no output )
20:27 ash__ rakudo: my $Foo::bar = 3; say $Foo::bar;
20:27 p6eval rakudo 4c94d7: OUTPUT«Null PMC access in getprop()␤current instr.: '&infix:<=>' pc 16989 (src/builtins/Junction.pir:245)␤»
20:27 jnthn Rakudo has no clue about such things yet.
20:27 jnthn (I intend to try and change that in the next couple of weeks. :-))
20:28 pmurias TimToady: is my $Foo::bar legal?
20:28 TimToady no
20:29 ash__ http://perlcabal.org/syn/S02.html#Names says  "$Foo::Bar::baz      # compound identifiers separated by ::"
20:29 jnthn TimToady: Though given "my module Foo { our $bar };" then would $Foo::bar be a variable lookup inside that lexical package?
20:30 ash__ although later it says "Foo::Bar::<$baz>" is a legal alternative
20:30 jnthn That is, we can't assume that just because a variable has :: seperators in that we should immediately go look in the package?
20:32 payload joined #perl6
20:33 TimToady the point is that 'my' can't do that
20:33 arnsholt I wonder how NQP will handle 1200 precedence levels
20:33 TimToady you can't create lexical variables in someone else's scope, regardless what kind of namespace it is
20:33 jnthn TimToady: Sure, I agree with that.
20:34 jnthn Does our $Foo::bar make sense?
20:34 moritz_ arnsholt: snlowly, probably :-)
20:34 TimToady but yes, :: doesn't imply packages to the exclusion of named lexical scopes
20:34 ash__ so, my $Foo::bar; should complain if the package Foo::bar doesn't exist?
20:34 jnthn I guess that always dies.
20:34 TimToady UNIT::<$bar> names the 'my $bar' in the outermost scope
20:34 TimToady of the comp unit
20:34 TimToady my shouldn't allow :: at all
20:35 arnsholt moritz_: Yeah, that's what I'm guessing. I should probably generate the different preclevels on the fly as operators are defined
20:35 arnsholt But for now, I just make them all on INIT
20:35 TimToady it may be that it is taking the Foo as a subpackage of the current lexical scope though
20:36 TimToady create MY::Foo and then create MY::Foo::<$bar>
20:36 TimToady that might be what it's thinking
20:36 jnthn Hmm
20:37 TimToady not saying that's something we want necessarily
20:37 jnthn No, I'm not sure I'd like that.
20:37 TimToady but declarations don't search for package names, only normal lvalues/rvalues do
20:38 TimToady if a declaration can create a package, it can only do it as a subpackage of the current lexical scope
20:38 pmurias so our $Foo::bar is also illegal
20:39 TimToady yes, to my way of thinking
20:39 jnthn That makes me happy.
20:39 * pmurias is happy too
20:40 TiMBuS joined #perl6
20:40 moritz_ std: our $Foo::bar
20:40 p6eval std 30353: OUTPUT«ok 00:01 109m␤»
20:40 addy_ joined #perl6
20:40 TimToady can probably tell from the .syml whether that's a subpackage Foo
20:41 TimToady yes, that is what it is doing
20:41 TimToady it's creating UNIT::Foo::<$bar>
20:42 frzntoz joined #perl6
20:42 TimToady which there is some argument for allowing, though it will suprise anyone who thinks it declares something in GLOBAL::Foo
20:42 diakopter std: say ::UNIT::Foo::<$bar>
20:42 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable ::UNIT::Foo::<$bar> is not predeclared at /tmp/yWVYyFG2fc line 1:␤------> [32msay ::UNIT::Foo::<$bar>[33m⏏[31m<EOL>[0m␤Compilation failed␤FAILED 00:01 107m␤»
20:43 TimToady std: my $Foo::bar; say ::UNIT::Foo::<$bar>
20:43 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable ::UNIT::Foo::<$bar> is not predeclared at /tmp/iIgdeoHMuR line 1:␤------> [32mmy $Foo::bar; say ::UNIT::Foo::<$bar>[33m⏏[31m<EOL>[0m␤Compilation failed␤FAILED 00:01 107m␤»
20:43 TimToady std: my $Foo::bar; say UNIT::Foo::<$bar>
20:43 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
20:43 TimToady there, you see :)
20:43 TimToady std: my $Foo::bar; say MY::Foo::<$bar>
20:43 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
20:44 TimToady std: my $Foo::bar; { say OUTER::Foo::<$bar> }
20:44 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
20:44 diakopter std: my $Foo::bar; say ::BLARG::Foo::<$bar>
20:44 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
20:44 TimToady a typename starting with :: as an rvalue just says to assume there is such a type
20:45 diakopter it doesn't mind $bar though
20:45 TimToady std: ::NONESUCH
20:45 p6eval std 30353: OUTPUT«ok 00:01 106m␤»
20:45 TimToady std: NONESUCH
20:45 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤ 'NONESUCH' used at line 1␤Compilation failed␤FAILED 00:01 106m␤»
20:45 diakopter std: say ::BLARG::Foo::<$bar>
20:45 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
20:45 diakopter hm
20:45 TimToady it assumes the namespace hasn't even been created yet
20:45 TimToady that says someone will create BLARG::Foo, maybe even at run time
20:46 TimToady it basically turns a compile-time lookup into a run-time
20:46 TimToady which may fail, of course
20:46 TimToady prefix :: just says "Assume this is predeclared though it isn't"
20:47 TimToady std: ::NONESUCH;  NONESUCH;
20:47 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤ 'NONESUCH' used at line 1␤Compilation failed␤FAILED 00:01 106m␤»
20:47 TimToady doesn't go as far as to predeclare it though
20:48 TimToady however
20:48 TimToady std: my $Foo::bar;  Foo
20:48 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤ 'Foo' used at line 1␤Compilation failed␤FAILED 00:01 107m␤»
20:48 TimToady std: my $Foo::bar;  Foo; my class Foo {...}
20:48 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegally post-declared type:␤    'Foo' used at line 1␤Compilation failed␤FAILED 00:01 107m␤»
20:49 TimToady maybe it's broken, but $Foo::bar is supposed to assume class Foo {...} as a stub
20:54 TimToady s/assume/declare/
20:55 TimToady std: class Foo::Bar { has $.x }; Foo
20:55 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤ 'Foo' used at line 1␤Compilation failed␤FAILED 00:01 107m␤»
20:55 TimToady std: class Foo::Bar { has $.x }; Foo; class Foo { has $.y }
20:55 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegally post-declared type:␤    'Foo' used at line 1␤Compilation failed␤FAILED 00:01 107m␤»
20:55 TimToady hmm, yeah, it's borken somehow
20:55 ash__ where do package variables life? in any sort of lexical scope? or are they kept somewhere seperate?
20:56 PerlJam ash__: in the package's symbol table.  :)
20:56 TimToady package variables live in a package, but a package can be a typename in any namespace incl lexical
20:56 moritz_ ash__: 'our $x' has an $x living in the current package, and a lexical alias $x to it
20:56 moritz_ rakudo: our $x = 5; class A { method b { say $x } }; A.b
20:56 p6eval rakudo 4c94d7: OUTPUT«5␤»
20:57 moritz_ the access to $x is in another package (A), but it still gets the lexical alias
20:57 TimToady my $Foo::bar; is kinda short for my module Foo { our $bar } is it stands
20:58 TimToady or my package Foo { our $bar }
20:58 TimToady decommuting &
20:59 ash__ i know lexical values will look into OUTER for a matching name, so packages (eg. our $foo) would declare a lexical $foo and in a separate package table a $?PACKAGE::<$foo> ?
21:00 moritz_ yes
21:00 moritz_ (afaict)
21:00 ash__ i only have lexical scopes and dynamic scopes in my nq-nqp, so i'll have to figure out how i am going to do package scopes
21:00 moritz_ hashes :-)
21:00 ash__ hehe, thats all my current lexical scope is
21:00 ash__ a hash + a pointer to OUTER
21:01 ash__ and i have push(), pop(), top(), and find()
21:01 ash__ thats all i have needed for lexical scope
21:07 mikehh joined #perl6
21:08 cotto_work joined #perl6
21:12 jhuni joined #perl6
21:23 moritz_ phenny: tell jnthn that the 'cool' branch is ready for review and possibly merging. THe only new test failure is in t/spec/S12-introspection/parents.t where the tests are wrong (which I'd fix on merging)
21:23 phenny moritz_: I'll pass that on when jnthn is around.
21:24 jnthn moritz_: Cool!
21:24 phenny jnthn: 21:23Z <moritz_> tell jnthn that the 'cool' branch is ready for review and possibly merging. THe only new test failure is in t/spec/S12-introspection/parents.t where the tests are wrong (which I'd fix on merging)
21:24 jnthn moritz_++ # thanks for working on this
21:24 jnthn I'll look over it soon.
21:25 ash__ can you not do Foo::<$a> yet?
21:25 moritz_ ash__: nope
21:27 * moritz_ -> bad
21:27 moritz_ erm, bed
21:27 moritz_ bad too, sometimes :-)
21:28 jnthn ;-)
21:28 jnthn night o/
21:31 ash__ so, there is no current way of accessing a package var from another package
21:31 ash__ ?
21:32 ash__ except using sub's to access it maybe?
21:33 jnthn rakudo: module Lol { our $Cat = 'om nom nom' }; say $Lol::Cat;
21:33 p6eval rakudo 4c94d7: OUTPUT«om nom nom␤»
21:33 ash__ oh, i thought i tried that and got a bug, hmm
21:48 orafu joined #perl6
21:57 Sanitoeter joined #perl6
22:07 dolmen joined #perl6
22:12 IllvilJa joined #perl6
22:36 xabbu42 joined #perl6
22:59 wknight8111 joined #perl6
23:07 colomon joined #perl6
23:08 jnthn o/ colomon
23:08 colomon o/
23:08 jnthn How's the move going?
23:08 colomon great!
23:08 jnthn :-)
23:08 colomon unfortunately, our cable/internet has been out since 9am.
23:08 jnthn Ugh.
23:09 colomon I'm actually in the in-laws' driveway, bogarting their wi-fi.  (They're at our house, of course!)
23:09 colomon Just pushed the to-radians / from-radians move to Numeric.
23:09 jnthn \o/
23:09 jnthn I've been doing mostly presentation prep, and decided I should maybe catch up with my email queue that I've ignored for the last ages too...
23:10 jnthn Should get some decent hacking time next week though. :-)
23:10 colomon \o/
23:10 jnthn My talks are all on Monday.
23:10 colomon in Russia, this is?
23:10 jnthn Then I have Tue and Wed free.
23:10 jnthn Yeah.
23:10 colomon sweet.
23:10 jnthn No $dayjob things to take care of while I'm there. :-)
23:11 colomon good luck with that, and Tues and Wed should be good time for me, though I'll have some $work to take care of, and a pub session to check out.  :)
23:11 colomon I need to get going, good travels!
23:11 dalek rakudo: 43f8659 | (Solomon Foster)++ | src/core/ (4 files):
23:11 dalek rakudo: Move to-radians and from-radians from Any to Numeric, make them public.
23:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​3f8659f347df7390cf05b18921b04e6f0d180ff
23:11 jnthn yay pub!
23:11 jnthn See you, take care o/
23:11 colomon \o
23:13 orafu joined #perl6
23:28 silug joined #perl6
23:34 ShaneC1 joined #perl6
23:37 lichtkind joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs