Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-08-14

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:03 bacek joined #perl6
00:04 bacek joined #perl6
00:23 felipe joined #perl6
00:28 LimbicRegion joined #perl6
00:32 ggoebel joined #perl6
01:18 Schwern joined #perl6
01:28 lambdabot joined #perl6
01:34 drbean_ joined #perl6
01:47 SamB joined #perl6
02:34 kanru joined #perl6
02:47 alester_ joined #perl6
02:51 xinming_ joined #perl6
03:01 elmex_ joined #perl6
03:39 penk joined #perl6
03:40 snooper joined #perl6
04:12 xinming joined #perl6
04:35 BinGOs_ joined #perl6
04:45 cathya joined #perl6
05:40 baest joined #perl6
05:43 baest joined #perl6
05:44 PZt joined #perl6
06:01 Psyche^ joined #perl6
06:34 ashizawa joined #perl6
06:58 Alias_ joined #perl6
07:00 Alias_ joined #perl6
07:07 kst joined #perl6
07:07 xinming_ joined #perl6
07:12 davidwhitewings joined #perl6
07:12 davidwhitewings left #perl6
07:13 xinming__ joined #perl6
07:39 kst joined #perl6
08:25 sri_work joined #perl6
08:58 smg joined #perl6
09:01 xinming joined #perl6
09:06 sri_work_ joined #perl6
09:10 Schwern joined #perl6
09:10 xinming_ joined #perl6
09:16 xinming joined #perl6
09:23 rindolf joined #perl6
09:36 pmurias joined #perl6
10:01 ludan joined #perl6
10:03 ZuLuuuuuu joined #perl6
10:09 meppl joined #perl6
10:32 penk left #perl6
10:37 zamolxes joined #perl6
10:40 redicaps joined #perl6
10:40 redicaps left #perl6
10:44 ZuLuuuuuu left #perl6
11:28 jferrero joined #perl6
11:42 vixey joined #PERL6
12:03 jan__ joined #perl6
12:56 Zapad joined #perl6
12:57 Lorn_ joined #perl6
13:12 luqui joined #perl6
13:22 cmarcelo joined #perl6
13:32 ZuLuuuuuu joined #perl6
13:42 ruoso joined #perl6
13:52 TJCRI joined #perl6
13:57 donaldh joined #perl6
14:10 ZuLuuuuuu left #perl6
14:16 xinming_ joined #perl6
14:34 hercynium joined #perl6
14:44 ggoebel drops stone down well
14:44 ggoebel .
14:45 ggoebel ..
14:50 pugs_svn r21897 | ruoso++ | [smop] putting some comments on test/27, explaining how the defaultblocksignature should work!
14:52 Lorn joined #perl6
14:55 meppl joined #perl6
14:55 ruoso Considering every block is a closure, is it a known side effect that the entire outer-scope-tree of that block is going to be preserved while the closure is preserved? or should it explicitly check which values are in use in the inner block and make a new scope with that values?
14:56 ruoso i.e.: placing the same restrictions on what goes into the closure that p5 has...
15:01 jferrero joined #perl6
15:01 donaldh joined #perl6
15:04 ron_ joined #perl6
15:06 ruoso pugs: class Foo { has Code $.code; method foo { say $.code.() }; my $b; { my $a = 1; $b = Foo.new({ return eval '$a + 1' }); }; $b.foo;
15:06 p6eval pugs: OUTPUT[*** ␤    Unexpected end of input␤    expecting ";" or "}"␤    at /tmp/BdWQUK8Jqv line 2, column 1␤]
15:07 ruoso pugs: class Foo { has Code $.code; method foo { say $.code.() }; }; my $b; { my $a = 1; $b = Foo.new({ return eval '$a + 1' }); }; $b.foo;
15:07 p6eval pugs: OUTPUT[*** Must only use named arguments to new() constructor␤    Be sure to use bareword keys.␤    at /tmp/mwQ0VRevbf line 1, column 83-121␤]
15:07 ruoso pugs: class Foo { has Code $.code; method foo { say $.code.() }; }; my $b; { my $a = 1; $b = Foo.new(code => { return eval '$a + 1' }); }; $b.foo;
15:07 p6eval pugs: RESULT[2]
15:07 ron_ perl6: class Foo { method fooey { say 'fooey'} } ; class goo { } ; sub goo() { return 'Foo' }; my $goo = goo.new; $goo.fooey;
15:07 p6eval pugs: OUTPUT[*** No such method in class Str: "&fooey"␤    at /tmp/56bboXlcSp line 1, column 108-118␤]
15:07 p6eval ..elf 21897: OUTPUT[fooey␤]
15:07 p6eval ..rakudo 29834: RESULT[fooey␤1]
15:08 ruoso pugs: class Bar { method DESTROY { say 'destroyed' } }; class Foo { has Code $.code; method foo { say $.code.() }; }; my $b; { my $a = 1; my $unused = Bar.new(); $b = Foo.new(code => { return eval '$a + 1' }); }; say 'before'; $b.foo;
15:08 p6eval pugs: OUTPUT[before␤destroyed␤]
15:09 ruoso pugs: class Bar { method DESTROY { say 'destroyed' } }; class Foo { has Code $.code; method foo { $.code.() }; }; my $b; { my $a = 1; my $unused = Bar.new(); $b = Foo.new(code => { return eval 'say $a + 1' }); }; say 'before'; $b.foo;
15:09 p6eval pugs: OUTPUT[before␤2␤destroyed␤]
15:10 ruoso pugs seems to preserve the entire outer-scope-tree....
15:10 ruoso which is what I also plan to do
15:11 Exodist joined #perl6
15:15 * ruoso later &
15:17 ZuLuuuuuu joined #perl6
15:20 ron_ perl6: class Foo { method fooey { say 'fooey'} } ; class goo { } ; sub goo() { return Foo }; my $goo = goo.new; $goo.fooey;
15:21 p6eval elf 21897, pugs, rakudo 29834: OUTPUT[fooey␤]
15:23 justatheory joined #perl6
15:38 dalek joined #perl6
15:42 kanru joined #perl6
15:58 moritz_ re (just for a short time)
16:08 cjfields joined #perl6
16:10 pugs_svn r21898 | Auzon++ | [gsoc_spectest] adding test for :$whatever notation (added 4 tests)
16:11 Auzon (hi moritz_. Hope you're having fun)
16:12 moritz_ hi Auzon
16:12 moritz_ yes, vacations were very nice
16:12 moritz_ still have a few days off ;)
16:13 vixey joined #PERL6
16:13 Auzon enjoy the rest of your time off then :)
16:14 moritz_ I will - and then I'll backlog (only the commits, not all of IRC)
16:14 moritz_ how is your project going?
16:15 Auzon I think I'm doing OK. I think I'll end up with 700+ commits, which is about what I predicted
16:15 Auzon err, s/commits/tests/
16:15 moritz_ perlbot: karma Auzon
16:15 perlbot Karma for Auzon: 160
16:15 moritz_ expectations exceeded in terms of karma ;)
16:16 Auzon Hopefully it'll help out my real karma :P
16:17 ZuLuuuuuu left #perl6
16:17 iblechbot joined #perl6
16:30 rdice joined #perl6
16:43 vixey joined #PERL6
16:54 funktio joined #perl6
17:03 moritz_ afk again
17:03 moritz_ ttfn folks
17:20 revdiablo joined #perl6
17:21 jferrero joined #perl6
18:34 rindolf Hi all.
18:47 zamolxes joined #perl6
18:58 Lorn_ joined #perl6
19:25 Auzon Is there a way to combine two files and preserve history in SVN?
19:33 pugs_svn r21899 | Auzon++ | [deprecated-syntax] added a note about :todo<bug> being Pugs-specific
19:33 Auzon StephenPollei++ for bringing this to my attention
19:39 rindolf Auzon: I don't think so.
19:39 rindolf Auzon: I don't think any version control system can do that.
19:41 Auzon I suppose it's not often needed. Well, I guess I'll just do this as cleanly as possible and take the svn blame for all of it
19:41 SamB Auzon: move the bigger file to the right name and merge in the smaller file
19:41 SamB or something
19:42 Auzon Problem with that is that the smaller file is the correct name.
19:53 vixey joined #PERL6
20:08 pmichaud pugs:  say 1[0].WHAT;
20:08 p6eval pugs: OUTPUT[Int␤]
20:08 pmichaud pugs say 1[1].WHAT;
20:08 pmichaud pugs: say 1[1].WHAT;
20:08 p6eval pugs: OUTPUT[Scalar␤]
20:09 pmichaud pugs:  my @a;  say @a[0].WHAT;
20:09 p6eval pugs: OUTPUT[Scalar␤]
20:09 pmichaud pugs:  say 1[].WHAT;
20:09 p6eval pugs: OUTPUT[Int␤]
20:09 pmichaud pugs: my @a;  say @a[].WHAT;
20:09 p6eval pugs: OUTPUT[Array␤]
20:09 pmichaud pugs:  my @a;  say @a[0,1].WHAT;
20:09 p6eval pugs: OUTPUT[Array::Slice␤]
20:10 pmichaud pugs:  say 1[0,1].WHAT;
20:10 p6eval pugs: OUTPUT[Array::Slice␤]
20:10 [particle] i'm thinking 42[1] should return an out of bounds error
20:10 [particle] rather than, say, 0
20:10 pmichaud yes, an auto-promoted array could certainly have a shape that does bounds checking
20:10 pmichaud if no bounds checking, then it would at least return undef
20:11 TimToady I guess it depends on whether such an array counts as autovivifiable
20:11 pmichaud I'm just seeing what pugs does
20:11 TimToady @foo[1] would return an autovifiable undef
20:11 lambdabot Unknown command, try @list
20:11 [particle] agreed on @foo
20:11 TimToady looks like it's treating zen slice as a noop
20:11 pmichaud pugs:  say 1[].WHAT;  # this one is weird
20:11 p6eval pugs: OUTPUT[Int␤]
20:11 TimToady which seems reasonable
20:12 [particle] but 42[1] = 23??
20:12 pmichaud oh, I could probably live with that
20:12 pmichaud well, 42 is readonly, so we can't really assign to it
20:12 pmichaud although I suppose the List that gets auto-created might not be readonly.  But it probably could be as well.
20:12 TimToady but maybe 42[1] just promotes to indexable list or some such, but not autoviv... I dunno
20:13 pmichaud anyway, I'm not trying to drive spec here -- just trying to come up with a reasonable first step
20:13 [particle] 42 is Int, which doesn't do Enumerable
20:14 [particle] 42.keys ??
20:14 TimToady pugs: say 42.kv
20:14 p6eval pugs: OUTPUT[*** Not a keyed value: VInt 42␤    at /tmp/tboJZaGPjW line 1, column 5 - line 2, column 1␤]
20:15 pmichaud pugs:  say 42.values
20:15 p6eval pugs: OUTPUT[*** Not a keyed value: VInt 42␤    at /tmp/PQZ5RwVhv2 line 1, column 5 - line 2, column 1␤]
20:15 pmichaud rakudo:  say 42.values
20:15 p6eval rakudo 29834: OUTPUT[Method 'values' not found for invocant of class 'Int'␤current instr.: '_block11' pc 21 (EVAL_13:13)␤]
20:15 pmichaud (just haven't implemented it yet.)
20:15 TimToady pugs: say 42.elems
20:15 p6eval pugs: OUTPUT[1␤]
20:16 [particle] so, a scalar constant will autopromote to a constant, read-only array?
20:16 [particle] "foo".elems
20:16 [particle] rakudo: "foo".elems
20:16 p6eval rakudo 29834: RESULT[1]
20:17 TimToady well, the question is what $foo.elems and $foo[0] guaratee
20:17 TimToady *guarantee
20:17 TimToady and does that guarantee extend to when you're not sure what's in $foo
20:18 TimToady 42 is a just a silly degenerate case of $foo
20:18 pmichaud particle:  we already have that   "foo".grep(...)   acts the same as ("foo",).grep(...)   :-)
20:18 [particle] pugs: $foo = (1,"bar",$object).pick;  say $foo[0]
20:18 p6eval pugs: OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$foo" requires predeclaration or explicit package name␤    at /tmp/MQTliqwIvx line 1, column 5␤]
20:18 [particle] pugs: my $foo = (1,"bar",$object).pick;  say $foo[0]
20:18 p6eval pugs: OUTPUT[*** ␤    Unexpected "$foo"␤    expecting "=", "::", context, ":" or "("␤    Variable "$object" requires predeclaration or explicit package name␤    at /tmp/qFijdsHKlc line 1, column 4␤]
20:19 [particle] pugs: my $object; my $foo = (1,"bar",$object).pick;  say $foo[0]
20:19 p6eval pugs: OUTPUT[␤]
20:19 [particle] pugs: my $object; my $foo = (1,"bar",$object).pick;  say $foo[0]
20:19 p6eval pugs: OUTPUT[␤]
20:19 TimToady yes, there's a strong tagmemic undercurrent throughout Perl that if you use something as if it's something else, it goes out of its way to behave that way
20:19 [particle] yep, like tcl's shimmering
20:19 TimToady using a scalar as if it's a list is just one of those things
20:19 TimToady but number as a string and string as a number are also fundamental
20:20 [particle] and that may commute to number as list and string as list
20:20 [particle] but not list as number
20:20 TimToady and [0] is useful for getting the first element if someone forgot to wrap a scalar into a list
20:21 [particle] $foo[<a b c>] # $foo[3] ?
20:21 TimToady that's a slice
20:21 TimToady it's a *bad* slice, of course
20:22 TimToady $foo{<a b c>} would be better
20:22 [particle] or $foo[<1 2 3>]
20:22 TimToady $foo<a b c> is the same thing
20:22 TimToady you have to say $foo[+<a b c>] to get a 3
20:23 [particle] so i'm getting at the fact that scalars can act as list, but not vice-versa
20:23 TimToady a list in item context turns into an array
20:23 TimToady my $x = 1,2,3 is the same as my $x = [1,2,3]
20:23 TimToady well, except it wouldn't parse
20:24 TimToady my $x = (1,2,3) though
20:24 [particle] instead of perl 5, where $x = 3
20:24 [particle] but not because that's the size of the list
20:24 TimToady nothing in p6 ever returns the last element by default
20:24 [particle] yep. sane.
20:24 TimToady that was residual C brain damage
20:24 [particle] ok, i think the edge cases are fleshed out
20:25 TimToady I'm sure you'll find some more. :)
20:25 [particle] 42[0] is workable
20:25 rindolf Hi TimToady
20:25 TimToady howdy
20:25 rindolf TimToady: how do you like Copenhagen so far?
20:25 TimToady not bad at all, though we got rained on this morning a bit
20:26 TimToady but that's our fault for walking in the park  :)
20:27 ryanc joined #perl6
20:30 luqui joined #perl6
20:34 wknight8111 joined #perl6
20:35 TimToady <thunk> &
20:35 rindolf TimToady: BTW, did your wife come with you to Israel back in OSDC::Israel::2004?
20:56 rindolf How freaky! Someone blogged about the Danish band Alphabeat in regard to YAPC-EU and now lastfm-player puts them as the first song.
21:02 rdice left #perl6
21:18 explorer__ joined #perl6
21:23 explorer__ joined #perl6
21:41 Limbic_Region joined #perl6
22:19 StephenPollei rakudo: my Int @foo;
22:19 p6eval rakudo 29834: OUTPUT[get_iter() not implemented in class 'Integer'␤current instr.: '_block11' pc 60 (EVAL_6:32)␤]
22:19 StephenPollei pugs: my Int @foo;
22:19 p6eval pugs: RESULT[\()]
22:26 xinming joined #perl6
22:37 * rindolf is listening to t.A.T.u. - Gomenasai-aL6dsH BYsI
22:37 rindolf Wonderful song.
22:38 rindolf It's my Tatu favourite up to now.
23:22 cotto_work joined #perl6
23:50 bacek joined #perl6
23:59 Auzon rakudo: say #{foo} "hi"
23:59 p6eval rakudo 29834: OUTPUT[␤]

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

Perl 6 | Reference Documentation | Rakudo