Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-04-10

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:00 jnthn I much prefer evenings too.
00:00 jnthn However, Slovakia is very much an early morning rather than a late night place.
00:00 TimToady if I get consistently less than 8 hrs sleep for more than a couple nights, my immune system seems to just shut down
00:01 TimToady in college I found I could alternate 5 and 8 hr nights
00:01 TimToady but two 5 hr nights in a row and I'd be asking for it
00:01 jnthn If I get too tired I just get fed up with everyone...
00:01 pmichaud 4 or 5 hr nights have long been the norm for me -- going even back to high school.
00:01 jnthn That seems to be the only really bad side-effect.
00:02 pmichaud usually I manage to put together a long string of 4 or 5 hr nights, and then have one 12 hr night.
00:02 jnthn I rarely get 8 hours. But I need a decent 6 or so most nights.
00:02 pmichaud it's not anything I do consciously -- it's just the way my  body seems to have adapted.
00:02 jnthn I always kinda wish I was one of the people who lay down and just fell asleep.
00:02 jnthn But that very rarely happens.
00:03 skids I know someone who doesn't even need to lie down. :-)  Totally envy him, or I would if he wasn't always more tired than me somehow.
00:03 jnthn Actually, now we're getting to summer I don't mind doing later nights and so on.
00:04 jnthn I just in winter hated getting up, starting working by midday and looking out the window a few hours into work and noticing it was already dark...
00:06 jnthn skids: ah, not having to lie down to sleep could be useful. Sleeping on the long-haul flights where it was appropriate to do so would be helpful...
00:09 TimToady well, if I remove sigil as a listop, the only test that fails to parse is the test for whether sigils can be used as listops :)
00:09 TimToady so I'm thinking to break that, and require slice 1,2 Z 3,4 instead of @@ 1,2 Z 3,4
00:10 TimToady then we can maybe do something sane with non-declarative ($,$) = stuff
00:11 TimToady though ($,*@) would still blow sky high
00:11 jnthn In what context?
00:12 TimToady non-declarative
00:12 jnthn rakudo: ($, *@) = (1,2,3)
00:12 TimToady two terms in a row
00:12 TimToady * and @
00:12 p6eval rakudo 70fc00: OUTPUT«Syntax error at line 1, near "($, *@) = "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
00:12 jnthn win
00:12 jnthn my ($, *@) = 1,2,3;
00:13 jnthn rakudo: my ($, *@) = 1,2,3;
00:13 pmichaud time for me to fetch dinner.  And I won't be using a scope on a deer rifle for it.  :-)
00:13 p6eval rakudo 70fc00:  ( no output )
00:13 pmichaud bbl
00:13 jnthn pmichaud: Use it on a cow and make cheezburger!
00:13 TimToady enjoy
00:13 jnthn pmichaud: I'll sleep soon, so night :-)
00:13 pmichaud jnthn: funny you should say that -- cheezburgers are indeed the preferred meal tonight from the (very tired) family
00:14 TimToady the last time my brother went deer hunting he made hamburger out of 3/4s of the meat
00:14 TimToady but the antlers were fine :)
00:19 jnthn I ate reindeer a copule of times and it was good.
00:20 jnthn But in the UK I got accused of "eating Christmas...how will Santa come now" ;-)
00:24 * skids wonders what stork tastes like
00:24 jnthn Never tried that.
00:25 jnthn I've not treid that many more interesting meats tbh.
00:25 jnthn Had wild boar in Belarus.
00:34 * jnthn ist spat
00:34 jnthn Night, folks
00:44 pugs_svn r26167 | lwall++ | Eliminate listop forms of sigils.
00:50 s1n joined #perl6
00:58 pugs_svn r26168 | lwall++ | [context.t] don't allow listop sigils any more
00:59 pugs_svn r26169 | lwall++ | [STD] treat bare sigils as (illegal) anonymous variables
01:02 LylePerl joined #perl6
01:20 Tene_ joined #perl6
01:24 pugs_svn r26170 | lwall++ | [STD] tame overzealous undef check that assumed variable couldn't match bare &
01:59 eternaleye joined #perl6
02:16 c9s joined #perl6
02:16 frew|work joined #perl6
02:28 c9s joined #perl6
02:52 alester_ joined #perl6
02:59 agentzh left #perl6
03:15 orafu joined #perl6
03:18 pmichaud rakudo:  my $b = *-3;  say $b(2);
03:19 p6eval rakudo 70fc00: OUTPUT«Use of uninitialized value␤invoke() not implemented in class 'Float'␤current instr.: '_block14' pc 110 (EVAL_17:52)␤»
03:19 pmichaud rakudo:  my $b = */2;  say $b(4);
03:19 p6eval rakudo 70fc00: OUTPUT«0.5␤»
03:19 pmichaud oops.
03:35 sitaram joined #perl6
03:50 amoc joined #perl6
04:17 Maghnus joined #perl6
04:36 pugs_svn r26171 | hinrik++ | [util/perl6.vim] remove listop sigils, highlight $ placeholder like a variable, not an operator
04:57 pmichaud TimToady: ping
04:58 pmichaud TimToady: earlier you said that infix:<..>   has (Int,Whatever) and a (Whatever,Int)  (and a (Str,Whatever) and a (Whatever,Str))
04:59 pmichaud do we also need (Int,Code), (Code,Int), (Code,Code), (Code,Whatever), (Whatever,Code) ?
05:01 japhb joined #perl6
05:01 pmichaud I'm thinking of the case   @a[*-3..*-1]
05:04 pmichaud or perhaps it's enough to have   (Any,Code) and (Code,Any) ?
05:05 pmichaud (and I guess (Code,Code) )
05:06 pmichaud multi sub infix:<..>(Code $f, $t) { -> $v { $f($v)..$t } }
05:13 pmichaud also, S09 has a couple of fossils:
05:13 pmichaud F    @results[-1] = 42;      # Same as: @results.unshift(42)
05:13 pmichaud @dwarves[-2..-1]        # Same as: @dwarves.unshift(<Groovy Sneaky>)
05:13 pmichaud = <Groovy Sneaky>;
05:20 sri_kraih joined #perl6
05:25 mib_ba0z3oeb joined #perl6
05:26 mib_ba0z3oeb hello?
05:28 pmichaud mib_ba0z3oeb: hello.
05:28 mib_ba0z3oeb thank god..
05:28 mib_ba0z3oeb i thought i was the only person left alive.....
05:30 mib_ba0z3oeb (figuralitivly  speaking......)
05:38 TimToady pmichaud: if we add in the Code variants along with Whatever variants, then we can do (*/2)+1 and such
05:38 pmichaud but I haven't quite figured out how that works yet.
05:39 TimToady hmm, for ranges, you mean.  lemme think about it some
05:39 pmichaud with   @array[*-3..*-1]    the postcircumfix sees a Code object
05:40 pmichaud so it invokes it, getting back a Range object
05:40 pmichaud do we re-dispatch to postcircumfix with the Range object?
05:41 pmichaud also,  several comments earlier seemed to indicate that  @array[1..*]  would be the same as @array[1..Inf]
05:42 pmichaud but I suspect the former has a finite number of elements (for a fixed array)  while the latter would be infinit
05:42 pmichaud *infinite
05:43 pmichaud i.e.:   my @a = <alpha beta gamma>;    say @a[2..*].elems,  @a[2..Inf].elems;   #  2, Inf
05:44 TimToady I suppose the Code forms also have to produce Code that is parameterized on the number of elements
05:45 pmichaud I don't think I follow
05:45 pmichaud or, I think I don't follow that
05:46 TimToady I think subscripting operations always trim to the known number of values
05:46 pmichaud but only for ranges, yse?
05:46 pmichaud because  we'd still want @a[5]  to give us back something and not trim
05:47 pmichaud it would also seem weird if    my @b = 1,2,3,4,5,6;   say @a[@b].elems   # 6 ?
05:48 pmichaud my $b = 1..6;   say @a[$b].elems    # 2?
05:48 justatheory joined #perl6
05:49 TimToady well, and @a[$b] bothers me in the first place, since $b doesn't normally interpolate into a list
05:50 pmichaud there's that also :-)
05:51 pmichaud does it do so in    (1,2, 3, $b, 4, 5, 6) ?
05:52 TimToady I dunno, ranges are just a problem; need to cogitate
05:53 pmichaud is it at all possible likely that the whatever handling of subscripts will change (or whatever in infix math ops)?
05:53 pmichaud I can switch rakudo to do   postcircumfix:<[ ]>  with code arguments, but we'll fail a few more tests because of the ranges issues
05:54 pmichaud (I don't mind regressing on tests... just don't want to do a lot of changes to postcircumfix:<[ ]> in rakudo just to have to turn around and switch it again if I can avoid doing that :-)
05:54 TimToady need to think, and my thinker is not completely on track right now (sinus infection)
05:55 pmichaud oh, very sorry to hear that.  I had a sinus infection a week or so ago; it's gone bu tleft me with a minor chest cough/cold
05:56 pmichaud another item to toss in the mix on this issue, then
05:56 pmichaud suppose I have a new type Foo and I want to define how postcircumfix:<[ ]>  operates on Foo objects.... what's the standard mechanism for doing that?
05:57 pmichaud obviously I'd say   "Foo does Positional" or something like that
05:57 pmichaud but how do I specify that an integer argument maps to some result?
05:57 TimToady but we need to figure how multi-dimensionality fits into the role
05:57 pmichaud is it a method or a multi sub?
05:57 pmichaud oh yes, and multi-dimensionality too.
05:58 pmichaud essentially, I'm wondering how we get slicing and closure behaviors into custom postcircumfix:<[ ]>  operations
05:58 TimToady I suspect we need to see how it works for normal arrays first, and then genericize it
05:59 pmichaud I wouldn't want to have to duplicate all of those, so I'm wondering if the generic forms somehow end up re-dispatching to the simple  postcircumfix:<[ ]>(Int) form
05:59 pmichaud so that my custom type defines a postcircumfix:<[ ]>(Int), and gets the slicing/whatever semantics automatically
05:59 TimToady well, I think the multi-dim version certainly has to traverse one dimension at a time with a simpler subscripter
06:00 pmichaud yes, that makes sense
06:00 TimToady it's possible that the simpler version is sufficient to generate the more complicated things, presuming multi-dim works similarly
06:01 TimToady but things like shaped arrays will work differently from AoA structures
06:02 TimToady it would be nice if [1;2] was indistinguishable from [1][2], but it might take some doing to get there
06:06 sitaram left #perl6
06:06 dalek rakudo: 3280d41 | pmichaud++ | build/gen_whatever_pir.pl:
06:06 dalek rakudo: Whatever arguments appear to have been flipped.
06:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​280d410372138e8f9e7a3f21b06fd9e78ed1848
06:09 agentzh joined #perl6
06:17 dalek rakudo: 712982a | pmichaud++ | docs/spectest-progress.csv:
06:17 dalek rakudo: spectest-progress.csv update: 356 files, 10284 passing, 0 failing
06:17 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​12982aa848ded75be689dbd1d86106a88d2384d
06:31 pmichaud rakudo:  my $b = [1,2,3,4,5];   for $b { .say }
06:31 p6eval rakudo 712982: OUTPUT«1 2 3 4 5␤»
06:31 pmichaud rakudo:  my $b = 1..5;  for $b { .say }
06:31 p6eval rakudo 712982: OUTPUT«1␤2␤3␤4␤5␤»
06:31 pmichaud that does seem inconsistent, now that I think about it.
06:32 pmichaud also, I wonder what the following should do
06:32 pmichaud my $b := (1,2,3,4);   for $b { .say }
06:34 pmichaud rakudo:  my $b = 1..5;  say (1,$b,3).elems;
06:34 p6eval rakudo 712982: OUTPUT«7␤»
06:38 pmichaud rakudo:  my $b = * / 2;  say $b(8);
06:38 p6eval rakudo 712982: OUTPUT«4␤»
06:38 pmichaud okay, that's better at least :-)
06:40 pmichaud time for much-needed sleep... bbiaw
06:47 silug joined #perl6
07:06 alexn_org joined #perl6
07:46 gfldex joined #perl6
08:08 barney joined #perl6
08:12 iblechbot joined #perl6
08:13 cai joined #perl6
08:19 DemoFreak joined #perl6
08:24 mikehh joined #perl6
08:24 cai_ joined #perl6
08:34 pmurias joined #perl6
08:51 cai_ left #perl6
09:11 ejs joined #perl6
09:15 drbean joined #perl6
10:00 schmalbe joined #perl6
10:26 plash joined #perl6
10:40 pmurias joined #perl6
10:40 M_o_C joined #perl6
11:01 ihrd joined #perl6
11:02 wknight8111 joined #perl6
11:18 literal joined #perl6
11:19 brunov joined #perl6
11:52 ihrd left #perl6
12:10 PerlJam joined #perl6
12:10 shachaf joined #perl6
12:10 allbery_b joined #perl6
12:10 mj41 joined #perl6
12:10 lucs joined #perl6
12:10 Woody2143 joined #perl6
12:10 frobnitz joined #perl6
12:10 pmichaud joined #perl6
12:10 yves joined #perl6
12:10 szbalint joined #perl6
12:10 scrottie joined #perl6
12:10 silug joined #perl6
12:10 zostay joined #perl6
12:10 broquaint joined #perl6
12:10 dukeleto joined #perl6
12:10 diakopter joined #perl6
12:13 rafl joined #perl6
12:16 Helios joined #perl6
13:09 ejs joined #perl6
13:14 explorer joined #perl6
13:16 sitaram joined #perl6
13:51 explorer joined #perl6
13:52 Tene joined #perl6
13:56 ejs joined #perl6
14:21 skids joined #perl6
14:25 nihiliad joined #perl6
14:32 DemoFreak joined #perl6
14:35 wolverian joined #perl6
14:59 riffraff joined #perl6
15:01 pugs_svn r26172 | pmurias++ | [re-smop] ported over Code add Hash.bind_key
15:02 rindolf joined #perl6
15:04 rindolf joined #perl6
15:05 justatheory joined #perl6
15:14 meppl joined #perl6
15:18 pmichaud jnthn: ping
15:53 Psyche^ joined #perl6
15:58 FurnaceBoy joined #perl6
16:02 nihiliad joined #perl6
16:14 pugs_svn r26173 | pmurias++ | [re-smop] fix memory leaks found by valgrind in the test suit
16:21 LylePerl joined #perl6
16:22 kimtaro joined #perl6
16:24 LylePerl ping jnthn
16:25 eiro "hello world".say
16:28 * TimToady .= awake(:sorta)
16:30 SIGJIT joined #perl6
16:31 LylePerl Hi TimToady
16:32 TimToady o/ ... _/ ... __
16:33 TimToady I've obviously been reading too much xkcd lately...
16:33 LylePerl :)
16:34 TimToady \o\ ... /o/ ... \o\ ... /o/
16:35 jnthn oh noes who wanted me?
16:35 TimToady everyone, it would seem
16:36 LylePerl jnthn: me
16:36 TimToady and pm
16:36 jnthn LylePerl,pmichaud: Oh hai I'm back from Good Friday service.
16:36 * jnthn figures if two people want him he must be in really big trouble :-)
16:37 LylePerl jnthn: I'm trying to document my learning how to contribute into some sort of guide that others like me can follow
16:37 jnthn LylePerl: Nice. :-)
16:37 LylePerl jnthn: I'm not having a good time building pugs on win32
16:37 rindolf Hi all.
16:38 jnthn LylePerl: It's been probably over a year or maybe 2 years since I tried that. :-|
16:38 jnthn rindolf: Hi
16:38 rindolf jnthn: how was the service?
16:38 LylePerl jnthn: How did you fare with haskell package regex-pcre-builtin?
16:39 jnthn rindolf: Was very nicely done, a good time to reflect on stuff. :-)
16:39 jnthn LylePerl: I don't think I tried that.
16:40 jnthn LylePerl: At least, I don't remember trying that...
16:41 LylePerl jnthn: It's needed for regexps to work, except it doesn't want to install. I could skip it, but that would be a bit of a killer
16:41 LylePerl jnthn: just wondered if you had issues and knew a way to resolve them... I'll plug on
16:41 jnthn LylePerl: 'fraid not. When I want to know what Pugs makes of something these days I tend to use the evalbot on this channel.
16:41 jnthn Which ain't practical if you want to run bigger things, I know.
16:43 pugs_svn r26174 | pmurias++ | [re-smop] make the mold assignment op respect reference counters
16:48 pmichaud jnthn: I worked on *-1 a bit last night, but ran into design issues
16:48 jnthn pmichaud: Eww. What sort of design issues?
16:48 pmichaud short summary:   @a[*-3..*-1]  is a bit... complicated
16:49 pmichaud discussion with TimToady at http://irclog.perlgeek.de/​perl6/2009-04-10#i_1053997
16:52 jnthn looking
16:54 TimToady turns into @a[ -> $end { infix:<..>( { $^e - 3 }($end), { $^e - 1 }($end) ) }
16:54 TimToady or something like that
16:55 pmichaud also weird is something like   @a[*-3..*]
16:55 TimToady so actually something more like
16:56 jnthn oh noes I failed it on the whatever ops!
16:56 pmichaud jnthn: only on a few of them :-)
16:56 pmichaud the commutative ones you got right :-)
16:56 jnthn Yeah!
16:57 jnthn OK, so is it along the lines of Range needs variants that take Code too?
16:57 pmichaud yes, and postcircumfix:<[ ]>  has to do various redispatches (possibly repeated)
16:58 TimToady probably need to pass in the whole range of subscripts, and let the Code decide whether it wants the whole range or just the end
16:58 pmichaud hmmm?
16:58 pmichaud I got lost there
16:59 jnthn Same
16:59 hercynium joined #perl6
16:59 jnthn pmichaud: I *think* Range variants shouldn't be so hard to do.
16:59 TimToady so @a[ -> $range { infix:<..>( { $^e - 3 }($range.to), { $^e - 1 }($range.to) ) }
16:59 TimToady or some such
17:01 pmichaud jnthn: oh, it might not be too hard to do -- i just wanted to get some guidance before committing to a particular solution
17:01 jnthn pmichaud: Sure, makes sense. Having to re-do stuff more times than necesary sucks.
17:01 TimToady but redoing stuff fewer times than necessary also sucks :)
17:02 pmichaud TimToady: okay, you're suggesting that infix:<..> with code arguments returns a closure that expects a range
17:03 TimToady might be wrong
17:03 pmichaud feels wrong
17:03 TimToady the $^e is wrong
17:03 pmichaud because... well,   postcircumfix:<[ ]>  doesn't know what kind of closure it has
17:03 pmichaud so   @a[*-1]   versus  @a[*-3..*-1]
17:03 pmichaud unless we pass a range to the *-1 case also
17:04 pmichaud (which then numifies to the number of items in the range)
17:05 jnthn I'm not quite sure I get the problem this is trying to solve...
17:05 jnthn turns into @a[ -> $end { infix:<..>( { $^e - 3 }($end), { $^e - 1 }($end) ) } looked about right to me...
17:05 jnthn Though does it not want to be $elems and not $end?
17:06 jnthn Since end is the last element that has a value?
17:06 TimToady yeah
17:06 pmichaud jnthn:   @a[1, 2, *-5..*-2, 7]
17:07 pmichaud I guess we just do redispatches
17:07 jnthn I think you'd have to take the 1, then the 2, then see you have a closure there and handle that as a closure, etc
17:07 pmichaud so,  in the case of   @a[*-3..*-1],   postcircumfix:<[ ]>(Code) ends up redispatching to postcircumfix:<[ ]>(Range)
17:08 jnthn I wasn't seeing it as you have a whole list of things that you can invoke with end.
17:08 TimToady the trouble with the formula above is it supplies $elems too early
17:08 TimToady it's supplying it to the arguments to .. rather than the returned closures
17:08 jnthn pmichaud: Erm...no, because we'd not have a Range passed, but a Code?
17:08 pmichaud jnthn: but the way you have it, the Code is returning a Range
17:08 jnthn pmichaud: Oh, I see
17:09 pmichaud so we evaluate the Code and get a Range back
17:09 jnthn You mean you re-dispatch *after* you run the Code. Right.
17:09 pmichaud right.
17:09 pmichaud re-dispatch might not be the correct word.
17:09 jnthn No, but I know what you're maning by it.
17:09 jnthn Or what i'm meaning by it.
17:09 pmichaud (correct word welcome here :-)
17:09 jnthn Or whoever started using it. ;-)
17:11 pmichaud in the case of  @[1, 2, *-5..*-2, 7]    we'd have postcircumfix:<[ ]>(List)  iterate (lazily!)  the list causing calls to postcircumfix:<[ ]>(Int) and postcircumfix:<[ ]>(Code)   (the latter of which would end up having to call postcircumfix:<[ ]>(Range) in order to evaluate the range that comes back from the code)
17:11 TimToady so @a[ { ( { $^x - 3 } .. { $^x - 1} ).($^elems) } ]
17:12 pmichaud yes, and postcircumfix:<[ ]>(Range) would handle the case when a Range has a Whatever as an endpoint
17:12 jnthn pmichaud: Good job our multi-dispatcher has a cache, no? ;-)
17:13 moritz_ hi
17:13 pmichaud hello, moritz
17:13 jnthn hi moritz
17:13 pmichaud I think I may go with something like that for now, so we have something "working", even if it changes substantially later.
17:14 jnthn It feels nice in that you can subclass just one variant.
17:14 moritz_ I did some hacking yesterday evening without having internet access, I'll rebase + test now, if everything works I'll push
17:14 pmichaud moritz_: hacking on ... ?
17:14 TimToady doesn't feel right to me; sounds like you're reinventing lists or something
17:14 TimToady but I guess subscript lists are special
17:14 TimToady at least for Code
17:15 pmichaud TimToady: I'll be totally fine with a redesign if/when you come up with one :-)
17:15 TimToady I don't like that a range in (1, $r, 3) expands
17:15 pmichaud I think it should not expand
17:15 pmichaud (after thinking about it last night)
17:15 TimToady Scalar of Range
17:15 moritz_ pmichaud: Hash.reverse (matches the spec now), and Hash.push
17:15 TimToady needs @ or |
17:15 pmichaud if I want an expanding range, I should do    my @r = 1..3
17:16 TimToady or :=
17:16 pmichaud right
17:16 TimToady since 1..3 would turn eager on you
17:16 pmichaud so,   my $r := 1..3;   (1, $r, 3)      #  expands ?
17:16 TimToady = 1..3
17:16 pmichaud where "expands"  means "interpolates"  ?
17:17 TimToady still don't like any $x acting plural
17:17 pmichaud yes, that's why I was asking about it :-)
17:17 TimToady my $r := [1,2,3]; (1, $r, 3)
17:17 TimToady doesn't expand
17:17 pmichaud sure, but I'd think that's because of the brackets
17:17 pmichaud I'd be curious about
17:18 pmichaud my $r := (1,2,3);  (1, $r, 3)
17:19 TimToady I think somehow the $ in the list puts the contents of $r back into item context if not already "itemized"
17:19 pmichaud so, a scalar container in list context always itemizes its contents?
17:20 TimToady esp if $r is a capture, we can't have it assuming |
17:20 pmichaud (er, treats itself as an item)
17:20 TimToady or maybe binding to a scalar makes sure its item isn't "naked" somehow
17:20 pmichaud that seems harder to me
17:21 pmichaud I might want to bind to a naked item.  I think the case we're worried about is when a scalar variable appears in a list
17:21 TimToady probably, but I'm not completely sure
17:21 pmichaud agreed, I'm not sure either.
17:22 TimToady well, we can fix it there, I suppose, and bear in mind the other possibility
17:22 pmichaud I'll see if I can get   (1, $range, 3)   to not expand range and see how it affects our current spectests
17:22 nihiliad joined #perl6
17:22 pmichaud I suspect it won't regress much.
17:22 pmichaud (if at all)
17:22 cdarroch joined #perl6
17:22 pmichaud someone that wants $range to expand can always do   (1, @$range, 3)
17:23 TimToady you subscriptor might need to expand the Range like it needs to do Code
17:23 TimToady but that would be bad again
17:23 pmichaud so that  @a[1, $range, 3]   expands $range?
17:23 TimToady so I think just Code is special
17:23 TimToady no, was a braino
17:23 pmichaud okay, good
17:24 TimToady now just wondering if we can easily detect the $range vs @$range error...
17:24 TimToady if +$range returns # elems, could be hard to spot
17:25 pmichaud I think it ends up being very analogous to    $array vs @$array
17:25 TimToady but by attaching the behavior to $range and not .. we get [$x..$y] to expand in the list okay
17:25 pmichaud right
17:26 pmichaud assigning ranges to scalars seemed to me to be very similar to assigning lists to scalars
17:26 pmichaud so....
17:26 pmichaud maybe a range in item context also becomes a capture of some sort?
17:26 TimToady maybe there's some way to require an explicit + in some circumstances
17:26 pmichaud (since a list in item context now becomes a capture)
17:27 TimToady Sure, range is just one way of specifying (a part of) a list
17:27 TimToady so ranges should act like lists to the extent possible
17:27 TimToady 1..3 should behave like 1,2,3
17:28 TimToady it's really just an optimization to evaluate ranges lazily instead of eagerly like p5
17:28 pmichaud yes, but unlike lists, ranges are (currently) mutable
17:29 TimToady which is probably a mistake
17:29 pmichaud I'd be happy if we eliminate that, I think.
17:30 pmichaud I'm not sure that .pop and .shift on ranges are all that useful.
17:30 jnthn What should iterating them then look like?
17:30 pmichaud same as iterating on a list
17:30 TimToady or have a separate DynRange object
17:30 jnthn (At the moment, the range is "consumed" as its iterated...)
17:30 pmichaud actually, iterating a range doesn't consume it
17:30 pmichaud at least, not in rakudo.
17:30 TimToady no harm, no foul :)
17:30 pmichaud rakudo's range iterators work on a clone of the range :-)
17:30 jnthn pmichaud: Oh really?
17:31 jnthn pmichaud: Oh, yes.
17:31 TimToady which is essentially a DynRange kind of object
17:31 jnthn They hadn't used to...
17:31 pmichaud anyway,   iterating a range is really the same as iterating a list -- it's not "consumed"
17:32 pmichaud (yes, the clone of the range ends up acting like a DynRange)
17:33 TimToady heh, Range is already listed as immutable in S02
17:33 pmichaud yes, I've sent a few messages (unasnwered) noting the discrepancy
17:34 pugs_svn r26175 | moritz++ | tests for typed hashes
17:34 pugs_svn r26176 | moritz++ | tests for Hash.push
17:34 * araujo pulls his clone in here to ask the question for the 'twisted' minds of perl6 hackers
17:34 pugs_svn r26177 | moritz++ | [t/spec] move Hash.reverse tests in separate file, and bring them up-to-date with the spec
17:34 pugs_svn r26178 | moritz++ | [t/spec] typed array and hash attributes
17:34 pugs_svn r26179 | moritz++ | [t] move is_rw_on_class to spec/
17:34 jauaor joined #perl6
17:35 dalek rakudo: 029aa51 | (Moritz Lenz)++ |  (2 files):
17:35 dalek rakudo: bring Hash.reverse up to date; test S32-hash/reverse.t
17:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​29aa517ebe4c44dcd34276c384511cf49914161
17:35 dalek rakudo: 7b2c47c | (Moritz Lenz)++ |  (2 files):
17:35 dalek rakudo: Implement Hash.push, and add S32-hash/push.t to spectest.data
17:35 dalek rakudo: All of these new tests pass except one, which trips over a Null PMC access in
17:35 dalek rakudo: type() from is_deeply in Test.pm
17:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​b2c47c49476916e5d4e44519fd11cbd8f1b0b2a
17:35 dalek rakudo: c44a05b | (Moritz Lenz)++ | t/spectest.data:
17:35 dalek rakudo: we pass the new S09-typed-arrays/hashes.t
17:35 pmichaud moritz++  # yay, reverse is fixed
17:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​44a05b7d93fac9b0f2f6d6106215d7ddb3e0a14
17:35 dalek rakudo: 79aba97 | (Moritz Lenz)++ | README:
17:35 jauaor what do you guys think it is the cleaner syntax in these two examples: http://pastie.org/442985
17:35 dalek rakudo: [README] reworked paragraph on rakudo.org
17:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​9aba97eeb02d906ca7d162db0c490e032a87a25
17:35 jauaor (not perl6 related but language design related)
17:35 jnthn moritz_: D'oh, I also did write some typed hash tests ;-)
17:35 skids boo, hash.reverse still exists :-)
17:36 moritz_ jnthn: it can't hurt to have multiple tests ;-)
17:36 jnthn moritz_: Perhaps s/typed_arrays/typed_data_structures/
17:36 jnthn typed-arrays/hashes.t feels odd ;-)
17:36 moritz_ that's the chapter name in S09
17:36 moritz_ I know it's odd
17:37 moritz_ rakudo: my Int %h; my Int %g; %h = %g; say "alive"
17:37 pmichaud hyphens, please :-)
17:37 p6eval rakudo 712982: OUTPUT«No applicable methods.␤␤current instr.: 'parrot;Mapping;!flatten' pc 9222 (src/classes/Mapping.pir:327)␤»
17:37 moritz_ pmichaud: aye
17:37 * pmichaud wants to convert all of the underscores in the spectest file/directory names to hyphens :-)
17:38 moritz_ pmichaud: feel free
17:38 pmichaud Mapping flatten?!?
17:38 jnthn .sub '!flatten' :method .tailcall self.'iterator'()
17:38 jnthn .end
17:39 jnthn moritz_: I suspect actually it's the call to .iterator that is failing
17:39 jnthn moritz_: I have a nearly-done local patch that'll fix that.
17:40 jnthn (Making more stuff use Perl 6 MMD. We've kinda hit the buffers with Parrot's MMD now.)
17:41 jnthn Am pondering when we dare to make all the built-in operators use Perl 6 MMD rather than the Parrot one too.
17:42 pmichaud as soon as I can parse the operator names
17:42 pmichaud (actually coming relatively soon)
17:42 jnthn Nice
17:42 pmichaud I played with it a bit last week.
17:44 moritz_ I have to go offline again, have fun ;-)
17:44 pmichaud great job, moritz!
17:45 moritz_ thanks pmichaud
17:45 Tene_ joined #perl6
17:46 jnthn BTW, I'm going to be mostly offline Monday/Tuesday/Wednesday until I get to NPW.
17:46 pmichaud okay, I'll be offline Tuesday
17:46 pmichaud I leave Tuesday from here but arrive Oslo Wed morning.
17:46 pmichaud So I expect to be online for parts of Wednesday
17:47 jnthn OK
17:47 jnthn If there's a pre-conference met-up I'll probably be at that, if you feel like making it too.
17:47 jnthn *meet-up
17:47 TimToady skids: but the semantics of %hash.reverse have changed
17:48 jnthn Though I won't blame you if you'd rather sleep off the lag than drink beer. ;-)
17:48 TimToady we also leave Tue
17:48 silug joined #perl6
17:49 pugs_svn r26180 | lwall++ | [S02,S03] Range objects are immutable, so distinguish from RangeIterator objects
17:50 jnthn I'm flying on Mon, but seeing some friends in Sweden ont he way to Oslo.
17:50 pmichaud I'll catch you sometime on Wed, no doubt.
17:50 jnthn Aye
17:51 jnthn We're at the same hotel too, IIRC.
17:51 pmichaud yes.... BW anker
17:51 jnthn Yes
17:51 TimToady I've no idea where we're staying :)
17:51 * jnthn points TimToady to his igloo.
17:51 TimToady I only know we're leaving Tue because I looked at the calendar...
17:52 TimToady I am grateful to be married to a logistician.
17:52 pmichaud me too!
17:54 * jnthn smokes his typed hashes patch
17:54 jnthn Gah, I want to fix slurpy type checking somewhat today too...
17:56 pdc When I first read about Perl 6 in brief, I thought autothreading seemed like a great idea. is this present in other languages?
18:01 jnthn rakudo: $*OUT.say("no" & "I don't think so");
18:01 p6eval rakudo 79aba9: OUTPUT«no␤I don't think so␤»
18:01 jnthn pdc: ^ ;-)
18:02 pdc you know, I don't know Perl or Perl 6. if you were being particularly clever, I probably missed it :)
18:02 jnthn pdc: I just called the say method with a Junction, such that it auto-threaded. :-)
18:03 pdc ah, I see now
18:03 pdc hehe
18:03 TimToady autothreading is definitely an atomic bazooka though
18:03 TimToady be sure to aim above the horizon with it
18:03 pdc jnthn: Perl is #1 on my todo list when I finish university in a month or so. so I'm idling here and #perl
18:03 pdc jnthn: so I just have the occasional question
18:03 TimToady and have a manhole handy to jump down
18:03 payload joined #perl6
18:04 jnthn TimToady: Wouldn't that me more important if it was an atomic boomerang? :-)
18:04 pdc although I'm still weighing-up Perl vs Puthon :\
18:04 skids That depends entirely on the balst radius
18:04 TimToady for an atomic boomarange you'd better have a darn thick manhole cover
18:04 TimToady s/e//
18:06 TimToady I think Python has got itself into a position where it cannot evolve much further with any rapidity
18:06 TimToady even Python 3000 was fairly trivial changes
18:06 TimToady (compared to Perl 6 :)
18:06 pdc but it looks like a really neat language, from what little I have seen
18:06 TimToady personally, can't stand dangling syntax
18:07 TimToady never liked outlines either :)
18:07 pdc though I will most likely opt for Perl, due to it offering more different to C, which I work in primarily
18:07 TimToady and Python really has no FP story
18:08 TimToady I think a language to complement C should really has some functional characteristics
18:08 pdc which Perl / Perl 6 does, am I right?
18:08 TimToady it's lambdas all over
18:09 TimToady the new -> $x, $y {...} notation is really just a lambda
18:09 pdc my main concern was the 'relevence' of the language. Having something that is useful to my career prospects would be great. Python certainly has popular opinion on it's side
18:09 TimToady for the moment
18:09 pdc yeah
18:10 pdc reading about Perl 6 actually made me reconsider my decision to go for Python
18:10 TimToady and I don't doubt it will last a long time, the same way C has
18:10 [particle]- TimToady: junctions in action... http://www.wired.com/images/articl​e/magazine/1510/pl_games1_630.jpg
18:10 TimToady but C already occupies the "too simple not to survive" niche :)
18:10 pdc you don't doubt Python will last, TimToady ?
18:11 TimToady oversimplifications always persist because the swee the complexity of the problem under someone else's carpet
18:12 TimToady *sweep
18:12 TimToady *they
18:12 TimToady gah
18:12 pdc I will grab the camel book soon and get cracking. thanks for your thoughts once again
18:13 TimToady look at all the problems caused in modern life that are arguably caused by C being too simple-minded about buffer overflows and such
18:13 TimToady have fun
18:13 pdc C is meant to be simple, though
18:13 jnthn [particle]: Hey, that looks like fun!
18:13 [particle]- conficker
18:13 pdc and C programmers need to not be simple
18:13 [particle]- jnthn: portal is a really fun, mind warping game
18:14 eiro is there a way to download mailing list archives fromm google groups
18:14 [particle]- too bad valve didn't end up hiring me :(
18:14 jnthn Aww. :-(
18:14 jnthn You still hunting?
18:14 [particle]- nope
18:14 eiro i want to read november's one
18:14 TimToady well, I don't really care how long it takes to win everyone over--Perl 6 is not intended to be a first programming language, but a last one.
18:15 pmichaud I like that quote.
18:16 pdc you guys probably hate this question but I read that the schedule hopes for Perl 6 to be pretty much done by Christmas. is it still on track?
18:16 jnthn Sure.
18:16 pmichaud pdc: "Yes"
18:16 [particle]- of course!
18:16 TimToady you've misconstrued the meaning of "Christmas"
18:17 [particle]- :)
18:17 jnthn pdc: We just ain't specific about *which* Christmas. ;-)
18:17 pdc hehehe
18:17 pmichaud it also depends on the definition of "done"  :)
18:17 [particle]- and the definition of "Perl 6"
18:17 pmichaud for example, when is Linux done?
18:17 TimToady "But after Perl 6 comes out every day will seem like Christmas"
18:18 pdc the 'yes' is sounding more like a 'no' with everything you say :)
18:18 payload joined #perl6
18:18 pmichaud pdc:  the issue is that "done" is a fairly nebulous term.
18:18 pdc I'm sure it is
18:18 TimToady look, we're trying to do something impossible here.  So we expect to fail.  But we expect lots of people to love our failure.
18:19 pmichaud do we have a page with good Perl 6 quotes somewhere?
18:19 pmichaud (I know we do for Parrot... I want a p6 equivalent :-)
18:19 TimToady but if you put up a page like that, I won't have anything left to say in my talks  :)
18:19 pdc okay then, thanks again. back to my C work.
18:19 pmichaud A language with as many quoting operators as Perl 6 really needs to have lots of quotes about it.
18:20 TimToady C, C, señor.
18:20 pmichaud TimToady: I have little doubt of your ability to continue coming up with excellent quotes, both in and outside of your talks.  :-)
18:21 TimToady I'll need to publish a little red book like Chairman Mao.
18:21 TimToady or maybe chartreuse
18:21 [particle]- what's the sound of one junction auto-threading?
18:22 TimToady one leg is both the same
18:22 TimToady oh wait, that's the answer to "what's the difference between a duck?"
18:24 sitaram left #perl6
18:24 TimToady shower &
18:34 skids rakudo: my %b; my %a = (:a<b c b>, :d<c c b>); %a.perl.say; %b.push(%a.reverse); %a = (); %a.push(%b.reverse); %a.perl.say;
18:34 p6eval rakudo 79aba9: OUTPUT«{"a" => ["b", "c", "b"], "d" => ["c", "c", "b"]}␤{"a" => ["b", "b", "c"], "d" => ["b", "c", "c"]}␤»
18:34 skids to pick nits, information was indeed lost
18:36 pmichaud the .reverse implementation didn't look quite right to me... but I didn't study it closely.
18:36 pmichaud feel free to file a ticket :-)
18:37 skids It's a spec thing not a bug... says two reverses "without losing information" but you lose ordering of the lists.
18:38 skids I don't see anything wrong with having the functionality.  Still don;t like that it's named reverse, but can live with it a bit more now, I suppose.
18:39 pmichaud I'm okay with using RT to file spec tickets :-)
18:39 pmichaud or you can mail p6l
18:39 skids Or I could just patch the spec to not make the claim :-)
18:39 pmichaud or that.  :-)
18:44 pugs_svn r26181 | skids++ | Be clear a doouble Hash.push(Hash.reverse) does not preserve all state
18:44 pugs_svn r26181 | skids++ | (value list order may be altered.)
18:59 programmer55 joined #perl6
19:00 programmer55 left #perl6
19:24 payload joined #perl6
19:26 pugs_svn r26182 | lwall++ | rename hash/pair reversal to "invert"
19:34 japhb joined #perl6
19:34 TimToady should probably define invert on List as well
19:35 skids What, twiddle Pairs else don't touch?
19:42 TimToady mappify to pairs and then invert those
19:43 TimToady so .kv would reverse to vk, put .pairs would just invert the pairs
19:43 skids Ah, as if used to initialize a hash, but without the hash.
19:43 TimToady yes, we need a name for pair-ification, if we don't have one already
19:43 skids (and then invert the imaginary hash and .kv)
19:44 TimToady I think we called it pairs() once upon a time
19:44 bacek__ joined #perl6
19:44 TimToady but maybe that's just Mapping()
19:45 skids "couple"?
19:45 TimToady "map", oh wait...
19:45 TimToady List.pair if given >2 args?
19:46 skids Z:pair?
19:48 skids I suppose if List.pair then Z.pair would just work though.
19:48 TimToady what is this Z type of which you speak? :)
19:48 skids Zip
19:48 skids Oh, missed smiley
19:49 skids They are hard to see on this font. 8-D
19:49 TimToady >B-{)
19:50 [particle]- .pare
19:52 skids P
19:52 skids :
19:52 skids 6
19:52 skids Camelia works better vertically, espcially if you have an uncurved 6 in the font
19:53 ZuLuuuuuu joined #perl6
19:59 ZuLuuuuuu left #perl6
20:01 ZuLuuuuuu joined #perl6
20:10 mncharity joined #perl6
20:11 mncharity Apropos TimToady's recent talks in Cambridge, apparently the MIT talk wasn't miked, so the stream, even if somewhere captured, didn't end up very usable.  The Harvard talk will eventually end up on...
20:12 pmurias mncharity: hi
20:16 mncharity ... on... I'm not sure.  http://www.hcs.harvard.edu/node/154 is the hsc page for it.  But now I'm not sure why I ended up with the impression that the video might show up there.  I have been told Harvard taped it.  :(  Ah well.
20:16 REPLeffect_ joined #perl6
20:16 mncharity hi pmurias :)
20:19 pmurias mncharity: is The Art of Ballistic Programming talk much different from the Studies in the Ballistics Arts one?
20:21 mncharity I've no idea, sorry.
20:43 ejs joined #perl6
20:50 wolverian joined #perl6
21:04 Whiteknight joined #perl6
21:07 msmatsko joined #perl6
21:11 iblechbot joined #perl6
21:14 Util joined #perl6
21:17 Util rakudo: my @a = (8); my @b = (9); for @a { for @b -> $b { .say }  }
21:17 p6eval rakudo 79aba9: OUTPUT«8␤»
21:17 Util std:    my @a = (8); my @b = (9); for @a { for @b -> $b { .say }  }
21:17 p6eval std 26182: OUTPUT«ok 00:02 37m␤»
22:02 Limbic_Region joined #perl6
22:28 jedai joined #perl6
22:49 skids joined #perl6
22:55 eternaleye joined #perl6
23:02 gilimanjaro joined #perl6
23:09 gilimanjaro left #perl6
23:09 FurnaceBoy joined #perl6
23:18 kanru joined #perl6
23:19 payload joined #perl6
23:21 bitfish joined #perl6
23:22 eternaleye joined #perl6
23:29 eternaleye joined #perl6
23:36 mncharity the #moose user list is interesting.  lots of people who used to be on #perl6.  actually, the #perl6 list is interesting too - lots of people who I've not heard in ages, or, hmm, noticed in the logs, but, those two aren't much of a sample anymore.  but still, curious.
23:45 pugs_svn r26183 | putter++ | misc/pX/putter/talk.txt: rm'ed.  An old concept sketch.
23:48 Tene jnthn: what's the status of lexical class augment?
23:49 mncharity @tell moritz_ re p6 project advertising, it might be worth doing a "state of p6", high-visibility general posting to the p5 community at some point.  a tiny sample of comments on #moose suggests even active p5 developers don't quite realize how shoestring the effort is.
23:49 lambdabot Consider it noted.
23:50 Tene mncharity: like what?
23:50 Tene I'm curious how their impression differs from reality.
23:51 jnthn Tene: Not started yet.
23:51 jnthn Tene: It's a kinda tricky-ish change.
23:51 Tene jnthn: is it in your roadmap?
23:52 jnthn Tene: I've no plans in the immediate future (as in, next couple of weeks) to work on it.
23:52 jnthn If it interests you, though, there no reason I can think of not to work on it. :-)
23:52 * Tene nods
23:52 Tene Might.
23:52 jnthn ;-)
23:52 jnthn How is the annotations stuff going?
23:52 jnthn Oh, I did have a question.
23:52 jnthn You mentioned issues with getting the annotations in effect.
23:53 jnthn However, Exception also has a method that gives you the annotations all the way down the caller chain.
23:53 jnthn So you could if producing a backtrace skip the top entry (which is die)...
23:54 jnthn (The backtrace method.)
23:55 Tene ah
23:55 Tene nice
23:55 Tene yes, that would be very nice
23:55 jnthn It's just a PMC array that you can iterate and it's a hash of various bits.
23:56 Tene nodnod
23:56 Tene I see.
23:56 jnthn (The annotations, the Sub PMC so you can get the name and namespace, etc)
23:56 mncharity Tene: there seems no impression of p6 being critically understaffed.  of that being why things are taking so long.  actually, some of that is from previous conversations, but #moose just reminded me.
23:56 Tene I'll add that to Parrot's exception error condition
23:57 Tene mncharity: what was the comment in #moose?
23:57 mncharity but that would be an interesting polling question.  what p5 folks think of p6.
23:57 Tene jnthn: you think it should be printed for resumed warnings, too?
23:57 jnthn Tene: Not by default, IMO.
23:58 Tene Okay.
23:58 jnthn Just for uncaught exceptions.
23:58 jnthn ah, OK, so warnings are excecptions too...
23:58 jnthn Exceptions where we die. :-)
23:58 Tene jnthn: uncaught warnings are automatically resumed.
23:58 jnthn Right.
23:58 Tene print HLL line number on uncaught warnings?
23:58 jnthn Yes
23:58 Tene kk
23:59 Tene driving home now...
23:59 jnthn And, though I don't know of we have an annotation emitted yet for it, filename.
23:59 jnthn OK, safe journey. And happy hacking. :-)
23:59 Tene yes, would be nice, currently NYI
23:59 jnthn I think compared to line numbers should be easy.
23:59 TimToady mncharity: there is no "staffing" going on here. :)  we don't have the management skills to deal with hoards of half-motivated people, and the fully motivated are already participating...

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

Perl 6 | Reference Documentation | Rakudo