Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-05-07

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:17 spinclad as eighter fly flies fly, fly flies fly eighternal
00:26 spinclad nm: that sounds like good sympathy -- share pain, not suffering
01:03 mako132_ joined perl6
01:06 azuroth joined perl6
01:08 azuroth I need food!
01:10 szbalint Food for the mind, you've came to the right place.
01:13 TimToady wolverian: all object attributes are supposed to work like variables, so "temp undefine $*ARGS.irs" or some such ought to work.
01:44 wolverian TimToady, yeah. what I really wanted, I guess, was a tempified copy of the object for the duration of the method call chain.
01:44 wolverian I'm not sure if that's very sane.
01:53 Quell joined perl6
02:03 frederico joined perl6
02:08 neoesque joined perl6
02:14 spinclad { temp $foo; $foo.leg.mangle } # was it all just a bad dream? was it all just copyOnWrite? what is the extent of temporization?
02:16 integral_ joined perl6
02:16 spinclad # the spatial scope?
02:16 spinclad # as it were
02:18 DesreveR joined perl6
02:36 spinclad By S06, this seems to depend on $foo .TEMP method, and by default, preserves as much structure as $saved = $foo; ... $foo = $saved; , which again depends on $foo.
02:37 spinclad s[$foo][$foo's]
02:43 spinclad Note: S03 refers to S04 for temporization ['Note thae C<temp> and C<let> ... See S04 for more details.']  AFAICS this should refer to S06 instead.
02:43 spinclad s/thae/that/
02:53 integral joined perl6
02:57 Khisanth joined perl6
03:01 weinig is now known as weinig|sleep
03:06 macroron__ joined perl6
03:14 FurnaceBoy_ joined perl6
03:15 trym joined perl6
03:19 aufrank ?eval rule plain_a { [a]* }; 'aaa' ~~ / <plain_a> /;
03:20 aufrank ?eval rule assert_a { <[a]>* }; 'aaa' ~~ / <assert_a> /;
03:20 aufrank ?eval say "1"
03:20 * aufrank misses evalbot
03:21 kanru joined perl6
03:28 svnbot6 joined perl6
03:29 integral_ joined perl6
03:29 evalbot_10232 joined perl6
03:30 audreyt ?eval rule plain_a { [a]* }; 'aaa' ~~ / <plain_a> /;
03:30 evalbot_10232 Match.new(   ok => bool::true,    from => 0,    to => 3,    str => "aaa",    sub_pos => (),    sub_named =>     { "plain_a" =>         Match.new(           ok => bool::true,            from => 0,            to => 3,            str => "aaa",            sub_pos => (),            sub_named => {}         )     } )
03:30 audreyt ?eval rule assert_a { <[a]>* }; 'aaa' ~~ / <assert_a> /;
03:30 evalbot_10232 Match.new(   ok => bool::true,    from => 0,    to => 3,    str => "aaa",    sub_pos => (),    sub_named =>     { "assert_a" =>         Match.new(           ok => bool::true,            from => 0,            to => 3,            str => "aaa",            sub_pos => (),            sub_named => {}         )     } )
03:30 audreyt ?eval say "1"
03:30 evalbot_10232 OUTPUT[1 ] bool::true
03:31 obra 'morning, audreyt
03:32 audreyt greetings.
03:32 obra How's things?
03:33 audreyt just woke up. thinking about lighttpd packaging and general deployment strategy
03:33 * clkao . o O (runapp)
03:34 clkao there's a very noisy bird outside since 3am
03:34 obra audreyt: does this mean you're shaving the jifty packaging spec yak?
03:35 audreyt potentially. still want ot get the declarative-action yak done first today
03:35 obra *nod* very cool
03:35 audreyt there is a deadline some 26 hours from now for all this to work on win32 :)
03:35 audreyt so I'll... use whatever way most expedient.
03:35 obra Yow. understood.
03:36 audreyt (but the basic jifty was already ported a couple days ago in my checkin)
03:36 obra Yep. we've only found one small bug
03:37 obra File::Path chokes when you ask it to mkdir something existing
03:39 audreyt put a -e test before make_path?
03:40 obra -e or -d?
03:40 obra I'd gone with -d.
03:40 obra Oh. and actually, mason, deep inside somwhere does a ..unless (-e _)
03:40 obra which breaks with our loc
03:41 audreyt oh. right. I custom-patch that by hand
03:41 obra custom patch mason?
03:42 aufrank hi audreyt!  hi evalbot_10232!
03:42 audreyt no, rewrite HTML:::Mason::Compiler::ToObject::compile_to_file
03:42 obra oh.
03:42 audreyt *H::M::C::TO::ctf = sub { ... };
03:42 obra "ew"
03:42 audreyt granted, not a good idea.
03:43 * obra ponders *H::M::C::TO::_ = sub { }
03:44 * audreyt notes that *ANY::_ is just *::_
03:44 audreyt i.e. the parser has a special rule
03:45 obra oh god. I didn't realize.
03:45 * obra cries
03:45 obra Perl6 will make this all better? right? ;)
03:46 * FurnaceBoy_ pats obra
03:46 audreyt right :) actually Perl5.10 already does
03:46 audreyt via lexical _
03:49 aufrank basic rules question (the one I was trying to figure out with evalbot):  what's the difference between matching an asserted character class using an assertion and matching a raw character class using an assertion?
03:52 audreyt [a] is just the char "a"
03:52 aufrank I know
03:52 audreyt [a-z] is the string "a-z"
03:52 audreyt <[a-z]> is a char between a and z
03:52 aufrank right
03:53 aufrank oh
03:53 audreyt did I unask your question? :)
03:53 aufrank <[a..z]> === <[a-z]> ?
03:54 audreyt oh wait a minute
03:54 audreyt a-z now means 'a', or '-', or 'z'
03:54 audreyt a..z is correct. sorry.
03:54 audreyt I was confused by the :Perl5 example in S05.
03:56 aufrank rule plain_alpha { [alpha]* }; rule assert_alpha { <[alpha]>* }; 'abc' ~~ / <plain_alpha> / ;  'abc' ~~ / <asserted_alpha> / # what's the difference ?
03:57 aufrank I think it's something about what goes into $/, but I don't know what
03:58 audreyt the first one doesn't match.
03:58 audreyt or rather, it matches empty.
03:58 audreyt ?eval 'abc' ~~ /[alpha]/
03:58 evalbot_10232 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
03:59 audreyt ?eval 'abc' ~~ /[alpha]*/
03:59 evalbot_10232 Match.new(   ok => bool::true,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
03:59 audreyt square brackets is not the perl5 (?:...)
03:59 audreyt so it's like (?:alpha)
03:59 audreyt s/not/now/
04:00 aufrank oh
04:00 aufrank non capturing group
04:01 aufrank got it
04:01 kanru joined perl6
04:01 aufrank so <[...]> is enumerated or named character class, period.
04:01 * aufrank wishes things sank in faster =\
04:02 audreyt just need more gravity
04:02 aufrank I'd better start digging
04:28 eccles joined perl6
04:33 eccles hello
04:38 kanru joined perl6
04:38 aufrank hello
04:44 aufrank audreyt: should the signature parser work like the Moose example in S06 line 1050, where it returns a new object of class Param based on the contents of the match?
04:44 aufrank and then an object of class Signature based on the Param objects?
04:45 audreyt sec
04:47 aufrank rule positional { / <sigil> <name> / { return Param.new( :sigil<$/<sigil>>, :name:<$/<name>>) } } # naive example
04:47 aufrank ok, that was wrong in a bunch of ways
04:47 aufrank but hopefully the right parts got the point across
04:49 audreyt yo
04:49 aufrank hi hi
04:49 audreyt I think just get the parse tree working is a good 1st step
04:49 aufrank ok
04:49 audreyt the "production" part is as simple as
04:50 audreyt rule positional { <sigil> <name> : { return Param(*()) } }
04:50 aufrank ok, that makes sense
04:50 audreyt (which translates to Param.new(sigil=>$<sigil>, name=>$<name>)
04:50 audreyt )
04:50 aufrank right
04:51 audreyt which is why we brought in *() notation :)
04:51 aufrank so is it my job or the production job to know that postfix:<?> sets the optional bit to true?
04:52 audreyt the production job. and production will be part of rule
04:52 audreyt so you'll eventually need that too
04:52 audreyt see ruleFormalParam
04:52 audreyt line 380 src/Pugs/Parser.hs
04:53 audreyt that's how it'd eventually look like
04:53 audreyt (conceptually not syntactically)
04:54 aufrank this helps
04:54 aufrank thanks
04:54 audreyt np :)
04:54 aufrank do you want me to add fixes so that the requirement/optional markers are postfix?
04:54 aufrank or will that cause too much breakage>
04:54 aufrank ?
04:55 audreyt they already are
04:55 audreyt see line 386
04:55 aufrank    --   $foo is required -->  !$foo
04:55 audreyt it's after line 385
04:55 audreyt it's canonicalized internal representation
04:55 audreyt not parser
04:55 aufrank ok
04:55 audreyt see line 391
04:56 audreyt it's just so we can apply a foldr on it
04:56 aufrank ok, I get that :)
05:19 buu Wow
05:19 buu Your names are impressively hard to differentiate
05:19 aufrank yeah, that has come up today
05:19 aufrank is now known as aufrank_not_audr
05:19 aufrank_not_audr any better?
05:20 aufrank_not_audr =P
05:20 aufrank_not_audr is now known as aufrank
06:01 ghenry joined perl6
06:15 spinclad <auDREYT> auFRANK: much
06:16 spinclad :]
06:16 aufrank is now known as auFRANK
06:16 auFRANK fine by me
06:17 spinclad if you like
06:17 auFRANK what's a good rule for a valid key of a hash?
06:17 spinclad a string, unless the hash has another :shape
06:18 spinclad is that what you mean?
06:18 auFRANK ok, now say that in rule-speak :P
06:18 neoesque joined perl6
06:18 auFRANK token key { [ <alpha> | \d | _ ]+ } is too restrictive
06:19 auFRANK but is
06:19 spinclad depends who's parsing it, i imagine
06:19 auFRANK token key { <.>* } too pernissive>
06:19 auFRANK ?
06:19 cmarcelo joined perl6
06:19 spinclad i think it just must not be confusible with whatever closes its parsing
06:20 auFRANK good call
06:20 spinclad :key  %hash<key>  %hash{'{'}
06:20 spinclad the last form should allow any string
06:21 auFRANK I'm only dealing with :key right now
06:22 spinclad there, i'm not sure you can make much wider than other var names
06:22 auFRANK good news to me
06:23 spinclad :key(1) etc
06:23 spinclad :key, ...  :key:key2
06:23 auFRANK there's an exception, I think
06:23 auFRANK I'm pretty sure :1(2) is allowed
06:23 auFRANK but $1 is not allowed as a variable name, right?
06:24 audreyt :1(2) means something else
06:25 audreyt ?eval :8(123)
06:25 evalbot_10232 83
06:25 spinclad :2(1) parses 1 in binary; i'm not sure how that falls out of, or away from, adverbs/pairs generally
06:25 audreyt the :name() and :digit() forms are separate forms
06:25 spinclad (like audreyt said)
06:25 audreyt you can't use the :digit form to passin named param
06:25 auFRANK good good
06:26 auFRANK can you put traits on unpacked parameters?
06:26 auFRANK ( [ $foo, *@bar] is rw, $baz )
06:28 spinclad ( $pair [ $head, *@tail ] is rw ) ... i imagine so
06:28 spinclad (if i got that syntax right)
06:28 auFRANK ok, here goes nothin'
06:28 spinclad but in $pair ... is rw, perhaps the $pair is what's rw
06:29 spinclad but i think your form should work
06:32 svnbot6 r10233 | aufrank++ | initial attempt at rules for parsing signatures
06:32 svnbot6 r10233 | aufrank++ | only attempted single dispatch signatures so far
06:32 svnbot6 r10233 | aufrank++ | no invocant support, limited type parameter support
06:32 svnbot6 r10233 | aufrank++ | almost definitely need help with unpacked params
06:33 audreyt woot! auFRANK++
06:33 auFRANK it's very possible that I am hopelessly off the mark
06:33 spinclad auFRANK++
06:33 audreyt (and I wouldn't mind if you re/nick back to lower-case :))
06:33 auFRANK is now known as aufrank
06:33 aufrank phew, that's more like it
06:34 aufrank audreyt: I don't think I quite grok the magic of <%hash> forms
06:34 audreyt actually that looks Just Right
06:34 aufrank so if they are useful, they're not in this version
06:34 audreyt oh, there's no need to grok them for sigs
06:34 audreyt they are for e.g. <%infix>
06:34 audreyt allowing user-defined infix operator
06:35 aufrank do you think that unpacked params take types and traits?
06:36 aufrank sub chase ( Dog [$fido, *@doggies] are vicious, $cat ) {...}
06:38 spinclad i seem to recall that the unpacking form is generally another signature, so yes, types, constraints, traits, pretty much everything i think
06:39 audreyt yeah.
06:40 spinclad (Dog @pack [ $fido is nice, *@others are bad ] )
06:40 aufrank spinclad: are you think that sub would be called as chase(@pack1, @pack2) ?
06:41 aufrank my understanding was that unpacking happens in place, so you're describing two different array paremeters as opposed to unpacking the first one
06:41 aufrank s/think/thinking/
06:42 spinclad that would be (Dog @pack, Dog [ $fido is nice, *@others are bad ] )
06:42 aufrank oh
06:42 aufrank wow, ok, need to think about that :)
06:42 spinclad i was intending one @pack, with aliases on its head and tail
06:43 audreyt (bbiab)
06:44 spinclad sorry, must get up tomorrow ... to bed now &
06:44 aufrank gnight
06:44 aufrank thanks for the help
06:45 spinclad glad to see this getting real, though
06:45 spinclad glad to contribute
06:56 svnbot6 r10234 | aufrank++ | s/packed/unpacked/
06:56 svnbot6 r10234 | aufrank++ | more notes about broken stuff
06:56 svnbot6 r10234 | aufrank++ | attempted to handle observations from spinclad++
06:56 svnbot6 r10234 | aufrank++ |   (@foo [$head, *@tail])  # unpacks by aliasing
06:56 svnbot6 r10234 | aufrank++ |   (@foo, [$head, *@tail]) # unpacks second param in place
07:16 kattana_ joined perl6
07:24 elmex joined perl6
07:35 iblechbot joined perl6
07:41 svnbot6 r10235 | aufrank++ | described access to the match object for some Signature object attributes
07:41 svnbot6 r10235 | aufrank++ | removed explicit whitespace in rules, they're supposed to DWIM with :w
07:41 svnbot6 r10235 | aufrank++ | attempted to fix up type parameter handling, probably closer now
07:41 svnbot6 r10235 | aufrank++ | described some more rough spots
07:44 cmarcelo left perl6
07:54 aufrank ok, that's it for me for the night
08:20 SvenDowideit2 joined perl6
08:28 lisppaste3 joined perl6
09:03 larsen joined perl6
09:26 drbean_ is now known as drbean
09:51 neoesque joined perl6
09:59 iblechbot joined perl6
10:37 larsen_ joined perl6
10:54 meppl guten morgen
10:55 azuroth evening
10:57 meppl hello azuroth
10:57 azuroth hi meppl, what's up?
10:58 meppl its all fine
11:03 larsen joined perl6
11:04 kanru joined perl6
11:08 gaal how do I tell svn to remove a file from source control, without deleting my copy of it in the working directory?
11:08 gaal I hope it isn't  mv ; svn rm ; svn ci ; mv
11:40 FurnaceBoy joined perl6
11:42 gaal say, why are statement-ending blocks desireable? To make C<if> and friends consistent with everything else?
11:53 larsen_ joined perl6
12:32 macroron joined perl6
12:44 jsiracusa joined perl6
12:48 larsen joined perl6
12:52 Limbic_Region joined perl6
13:16 xinming joined perl6
13:17 larsen_ joined perl6
13:19 weinig|sleep is now known as weinig
13:45 TimToady gaal: yes, though rather than saying they're more consistent, I look at it more like, "the user doesn't have to worry about whether this block belongs to a built-in or not."
13:50 justatheory joined perl6
13:55 theorbtwo ...and thus you can write a grope function that really does look like grep.
14:02 Southen_ joined perl6
14:02 nothingmuch gaal: ping
14:03 pasteling "nothingmuch" at 84.108.53.74 pasted "YAPC iternary" (6 lines, 335B) at http://sial.org/pbot/17083
14:18 aufrank gaal: with svk there is a -K switch on rm that means "keep local copy"
14:19 aufrank I imagine there's something like that in svn
14:22 FurnaceBoy actually, I don't think there is
14:23 FurnaceBoy furthermore, even if you rm url:// remote and then 'svn up', it blows away the local file, rather than leaving it there unmanaged
14:24 * FurnaceBoy can't remember what would happen with local changes though
14:24 * FurnaceBoy should test it
14:43 fishb0t joined perl6
14:44 fishb0t 'lo all: If I have questions about parrot install - better to ask here, or #parrot on irc.perl?
14:48 aufrank I've had luck with #parrot for that
14:53 fishb0t thnx, I'll try that.
14:54 gaal <nothingmuch aufrank FurnaceBoy> >>.ack
14:55 * gaal writes a gripe function
14:57 szbalint :))
15:09 aufrank TimToady: I finally checked a first pass at Signature parsing, if you want to check it out
15:09 aufrank src/Pugs/Parser/Signature.pg
15:35 svnbot6 r10236 | aufrank++ | some fixes on accessing match objects
15:35 svnbot6 r10236 | aufrank++ | clarified my ideas about aliasing matches
15:44 FurnaceBoy_ joined perl6
16:21 Ymmv joined perl6
16:26 jsiracusa joined perl6
16:34 integral_ is now known as integral
17:00 justatheory joined perl6
17:10 gaal { my $foo = 42 ; my $foo = 54 }   # error? warning?
17:30 chris2 joined perl6
17:32 elmex joined perl6
17:33 m__ joined perl6
17:41 szbalint why, gaal?
18:07 larsen joined perl6
18:21 larsen_ joined perl6
18:42 penk joined perl6
18:42 penk joined perl6
18:43 penk joined perl6
18:44 penk joined perl6
18:50 Khisanth joined perl6
18:55 marmic joined perl6
18:56 ma|2duk joined perl6
18:58 ilogger2 joined perl6
19:26 DaGo joined perl6
19:39 ruoso joined perl6
19:39 aufrank joined perl6
19:51 aufrank left perl6
19:56 penk joined perl6
19:57 penk joined perl6
20:11 aufrank joined perl6
20:33 ludan joined perl6
20:33 ludan hi
20:36 Quell joined perl6
20:38 Quell joined perl6
20:40 DaGo joined perl6
20:52 svnbot6 r10237 | wolverian++ | typo fix
20:52 aufrank joined perl6
21:29 kanru2 joined perl6
21:34 aufrank should sub foo (@a [$b, @c [$d, *@e]], *@f) {...} be allowed?
21:34 aufrank can you unpack a parameter that is already being unpacked?
21:41 azuroth looks sane to me
21:44 Raftman joined perl6
21:51 wolverian can I use stub declarations to declare the signature of a set of multis?
21:51 wolverian s,stub declarations,a stub declaration,
21:53 azuroth like `multi foo(Int $x, Int $y), (Str $x, Num $y), ($x, $y, $z);`? interesting
21:53 xerox joined perl6
21:54 xerox audreyt: ping?
21:55 xerox Or anybody.
21:55 wolverian azuroth, actually, I was thinking along the lines of 'multi foo (Foo, Bar --> Baz) {...} multi foo ([], $bar) { ... } multi foo (@foo, $bar) { ... }'
21:55 xerox Anybody knows how does CPAN work on the security side?
21:57 szbalint depends which side of security.
21:58 xerox szbalint: mind to come to #haskell-overflow a second?
21:59 szbalint sure, if I can help it will turn out in a sec. :)
21:59 xerox Thank you
21:59 azuroth wolverian: that's a lot more normal. I don't know whether it's specced, but I'd also like it to be
22:01 wolverian good, someone agrees with me :)
22:04 wolverian btw, I also hope we have foldl, not just foldl1 (reduce)..
22:05 azuroth I would also kinda like a compile-time { ... }, if I were going to use it like that though
22:10 azuroth like... sub die_sub { die; die; die; }; macro infix:<...!> { $?ROUTINE := &die_sub # would this work? }; CHECK { for @subs -> $s { if $s == &die_sub &&  { die "this sub sucks" } } }
22:10 azuroth or something... I wonder whether it's doable
22:11 aufrank audreyt told me the other day about tiebreaking sigs for multis
22:11 aufrank so you can do `sub foo (Int $x, Str $y : Str $z Set $q) {...}`
22:11 aufrank s/sub/multi sub/
22:12 wolverian is that missing a ,?
22:12 aufrank that allows declaring more than set of invocants for the multi within the same signature
22:12 aufrank yes, there should be a , between $z and Set
22:16 aufrank and actually, I think it needs to be either a multi method or a multi submethod
22:17 aufrank because plain sub doesn't have an invocant?
22:21 azuroth hmm, maybe they aren't really invocants, just look like them?
22:23 aufrank I think they are actual invocants when they are split by colons like that
22:23 aufrank but I can't find this tiebreaking syntax anywhere in the syns
22:24 aufrank the closest I see is from S06
22:24 aufrank    Multimethod and multisub invocants are specified at the start of the
22:24 aufrank    parameter list, with a colon terminating the list of invocants:
22:24 aufrank
22:24 aufrank        multi sub handle_event ($window, $event: $mode) {...}   # two invocants
22:24 aufrank        multi method set_name ($self, $name: $nick) {...}       # two invocants
22:27 aufrank audreyt or TimToady:  is the tiebreaking inv syntax for multi sigs documented somewhere in the syns?  If so, where?
22:29 ludan audreyt: are you living in the netherlands?
22:29 * azuroth is off to TAFE
22:29 azuroth bye all!
23:19 SamB joined perl6
23:20 avar joined perl6
23:23 justatheory joined perl6
23:26 pdcawley_ joined perl6
23:33 meppl gute nacht
23:37 putter joined perl6
23:37 putter abs.t has constructs like   is(ref abs($_), ref $_, "got")
23:38 putter is this valid?
23:38 putter why does is it not parse like  is(ref(...))?
23:39 wolverian ref has a signature that takes one scalar?
23:39 dvorak what wolverian said
23:39 putter my impression is pugs considers arity, but a spec p6 parse doesn't.
23:40 putter I'm wondering if i'm mistaken about the latter
23:40 putter or whether abs.t is just non-spec
23:40 wolverian I hope p6 does.
23:41 putter non-trivial interaction with optional args.
23:41 wolverian mm.
23:47 audreyt p6 does consider 0, 1, and Inf
23:48 audreyt where 1 may be optional
23:48 audreyt and that's all it's allowed to care
23:48 audreyt i.e. as far as parser is concerned, (), ($), ($?), (*@)
23:48 audreyt are the only 4 variants
23:50 audreyt TimToady: strangely, this is implied, never documented. should we document it somewhere? S02?
23:51 putter so the parser consults the scope to determine from proto signatures whether an ident should be considered term, prefix, or... greedy something?
23:52 audreyt in PGE it's called "prelist"
23:53 audreyt for "prefix listop"
23:53 audreyt in Pugs/Hs currently it's a toplevel "apply sub" rule
23:53 audreyt outside normal precedence parsing
23:53 putter fine name.  still sitting here contemplating the consequences for the parser
23:54 putter nod
23:55 audreyt essentially that makes all listops the same prec level
23:55 audreyt otoh, not clear what "tighter" listops means.
23:55 pdcawley_ joined perl6
23:58 aufrank audreyt: do you know if tiebreakers are documented in a syn?
23:59 putter so when I compile a file, its parse is dependent on the arity of subs defined in my ::* of the moment?

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

Perl 6 | Reference Documentation | Rakudo