Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-05-18

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 TimToady I don't think you have to declare it.  @_ is born env like $_
00:01 audreyt sub f ($x, *@_) {}
00:01 audreyt so @_ is env by virtue of its name?
00:01 Khisanth joined perl6
00:01 audreyt can I convey this env-hood to other things in the param list?
00:01 TimToady I think so.  It's either that or by virtue of *, but I don't really like that.
00:02 TimToady sub foo (env $x) {...}
00:02 audreyt but that's a type
00:02 TimToady declarators are keywords
00:02 theorbtwo sub foo ($x is env) {...} ?
00:02 audreyt sub foo (env Int $x) {}
00:02 audreyt then
00:02 audreyt worksforme
00:02 TimToady sub foo (our Int $x) is just a semantic error, not a syntactic one.
00:03 audreyt actually it can be made to work easily
00:03 audreyt by really rebinding the our $x away
00:03 audreyt on each invocation
00:04 theorbtwo That doesn't sound very "our", but perhaps I'm just perl5thinking -- I don't recall the difference between my and our in perl6.
00:04 TimToady but we have the basic syntax "decl (decl $x, decl $y)" where the inside declarator overrides the outer.
00:04 audreyt my ($x, $y, our $z)
00:05 audreyt that just follows from allowing declarators in Sigs
00:05 TimToady yep
00:05 audreyt since my now takes a Sig
00:05 TimToady sub foo ($x, state $y = 0) might even make sense
00:06 TimToady but maybe not
00:06 audreyt so maybe the special syntax
00:06 audreyt sub moose ($.x)
00:06 audreyt is just sugar for
00:06 audreyt sub moose (has $x)
00:06 TimToady what I was thinking, under the redecl is the same rule
00:07 TimToady but that also kinda means you could put the *only* has into the BUILD args.
00:08 TimToady submethod BUILD ($.typo)
00:08 TimToady "how did I get a typo attribute?"
00:09 audreyt right.
00:09 svnbot6 r10376 | audreyt++ | * Signature.pg: Allow declarators to precede a param
00:09 svnbot6 r10376 | audreyt++ |   (must occur before the optional type).
00:09 audreyt so maybe not a good idea after all
00:14 TimToady should "my ::T $foo" be working yet?
00:15 TimToady doesn't seem to parse.
00:15 audreyt it's parsed and not handled now
00:16 audreyt now, as in, r10373
00:17 TimToady I get  unexpected ":" expecting comment, qualified identifier, variable name or "("
00:17 svnbot6 r10377 | audreyt++ | * Parse for "my ::T $x"
00:18 TimToady will that handle "my ::('T') $x" as well?
00:19 TimToady (or not handle as well)
00:21 audreyt I don't think we should handle symbolics there...
00:21 audreyt maybe it can be made to work by forcing a parse-time evaluation
00:27 TimToady probably not necessary.  Can always predeclare with class T {...}.
00:28 TimToady that's what I did in the test in question.
00:29 audreyt k.
00:29 audreyt so, why is
00:29 audreyt foo({...}.meth)
00:29 audreyt not kosher?
00:29 audreyt foo({...}.meth, 1, 2, 3)
00:29 audreyt would it be parsed as
00:29 audreyt foo({...}    $_.meth)
00:29 audreyt two terms in a row?
00:30 audreyt I thought in a paren-call, it's okay to use {} that way
00:30 TimToady It's probably okay--I'm just not sure we should let people get in the habit of bare {}.meth
00:30 audreyt the dot-after-block is only "loose" on bare
00:30 audreyt bare {}.meth is always
00:30 audreyt (bare({})).meth
00:31 TimToady say {}.meth is currently (say {}).meth
00:31 audreyt yeah
00:31 audreyt but say({}.meth) should be fine
00:32 audreyt forcing people to write say(({}.meth)) doesn't quite make sense
00:32 TimToady other than arity, are there any .meth that are likely to be applied to a bare block?
00:32 audreyt .assuming?
00:32 TimToady and that's only in tests...
00:32 audreyt {$^x + $^y}.assuming(x=>3)
00:32 TimToady in real code it's almost always &block.arity
00:32 TimToady &block.assuming
00:32 audreyt {x => 3}.keys
00:32 audreyt ?
00:33 TimToady why would you write that in non-test code?
00:33 audreyt {x => 5, y => 6}.pairs
00:33 audreyt ?
00:33 audreyt {x => 5, y => 6}.{$x}
00:34 audreyt as a shorthand lookup
00:34 audreyt (I use that in p5)
00:34 audreyt $foo = {x => 5, y => 6}->{$current_key};
00:35 audreyt print {x => 5, y => 6}->{$current_key};
00:35 TimToady which won't work in P6
00:35 TimToady (print {...}).{}
00:35 audreyt so we already said we force parens
00:35 audreyt print ({...}{})
00:35 audreyt but then, if this
00:35 audreyt print({...}{})
00:35 audreyt doesn't parse, that's quite strange
00:36 TimToady .() is always a bit weird.
00:36 audreyt what do we gain, though, by making that a parsefail?
00:37 TimToady possibly some mental consistency
00:37 audreyt ?eval true({}{})
00:37 TimToady bot's been down for a while
00:38 audreyt restarting
00:38 audreyt but I think the consistency is more to ()than to arglist
00:38 audreyt visually, if inside (), then . is no longer loose
00:39 meppl gute nacht
00:39 TimToady but then you're always scratching your head as to whether a {} is equiv to ;
00:39 audreyt schlaf gut
00:39 meppl ;)
00:39 audreyt you mean to {}; ?
00:40 hikozaemon joined perl6
00:40 audreyt not sure where the headscratching comesfrom
00:40 TimToady sort {}.say
00:40 TimToady the {} terminates the list
00:40 audreyt but the rule is just
00:41 audreyt "blocks in bare arglists are self-terminating unless followed by a comma"
00:41 audreyt it already is magical when followed by newline
00:41 audreyt in the same position
00:41 audreyt so two magicks
00:41 audreyt but
00:42 audreyt say({}.{})
00:42 audreyt wouldn't self-terminate and
00:42 audreyt say({}
00:42 TimToady the mental problem with that rule is that you have to run all the way to the beginning of the list to determine whether it's one of those
00:42 audreyt , 1)
00:42 audreyt does not introduce an implicit semicolon
00:42 audreyt the implicit statement-ending block already dpeend on the same "am I in a bracket" test
00:43 audreyt so I think mentally it's going to be in the same slot
00:43 TimToady could be
00:44 evalbot_10377 joined perl6
00:45 TimToady but the statement think only happens at the top level, while this can happen at any level, and produce a rather obscure bug, as it did in the .arity tests.
00:47 TimToady and you can't just simply scan for parens: 1,2,3, mumble 4,5,6, {}.foo
00:48 audreyt why did the {}.meth become lose at the first place?
00:48 audreyt if it's just for .map:{x}.grep:{y}
00:48 audreyt then we can say that the ":" binds tightly to the {}
00:48 audreyt instead of saying any {x}.meth in list is loose
00:49 TimToady doesn't work for listops
00:49 audreyt which listops?
00:49 TimToady sort
00:49 audreyt sort {$^y <=> $^z}, 1, 2, 3;
00:49 audreyt sort {$^y <=> $^z}.moose, 1, 2, 3;
00:49 audreyt I don't think it's a big problem to let .moose parse as meth instead of parsefail
00:50 audreyt (or am I missing something?)
00:50 TimToady according to current rules that's (sort {}).moose
00:50 audreyt right
00:50 audreyt but why?
00:50 audreyt previously Pugs treats .map:{x} as ":-binding-block"
00:51 audreyt instead of any-block-not-folllowed-by-comma-is-selfterm
00:51 audreyt it seemed to work okay
00:51 audreyt (not 100% sure, just tossing around ideas)
00:52 TimToady I think adverbial :{} is brittler than the current rule even with the {}.foo problem.
00:52 tewk joined perl6
00:52 TimToady .map: looks like a listop to me
00:53 Odin- joined perl6
00:53 audreyt er, I think it's a listop too
00:53 audreyt it's just a listop that eats the first block.
00:54 TimToady but .map:{}, 1,2,3
00:54 TimToady except there's no : there to make it a list op if the {} eats it.
00:54 audreyt .map({}, 1, 2, 3)
00:54 audreyt mm.
00:55 audreyt say [].meth
00:55 audreyt say ().meth
00:55 audreyt say {}.meth
00:56 audreyt maybe I can train my eyes so they parse differently to my brain
00:56 audreyt takes some effort though.
00:56 TimToady say {};.meth
00:56 audreyt yes
00:57 TimToady I was kinda going that way yesterday
00:57 audreyt that's why I'm using my already-formed semiautomatic cortex
00:57 audreyt that is, the part of my brian that handles appending semicolons to blocks
00:57 audreyt to deal with this
00:58 TimToady but that kind of implies "sort 3,1,2;.say"
00:58 audreyt (which is why it's trying to reuse the "am I in a bracket" disambiguator)
00:59 audreyt oh, you mean a "literal" semicolon? I'm thinking of a "conceptual" breaker
00:59 audreyt just as the toplevel stmt introduces an unseen stmt breaker after {}
00:59 audreyt the bare list introduces an unseen expr breaker
00:59 audreyt but as you said, in expr level it's more subtle than stmt level
01:06 audreyt in Chinese there are two commas
01:06 audreyt one two separate expressions
01:06 audreyt s/two/to/
01:07 audreyt and one to separate arguments
01:08 theorbtwo Um, what do they look like.
01:08 theorbtwo s/\./?/; # I do that way too much.
01:09 TimToady , and 、presumably
01:09 TimToady or vice versa
01:10 audreyt yeah
01:10 audreyt the expression one is Ff0C FULLWIDTH COMMA
01:10 macroron joined perl6
01:10 audreyt the list-arg one is 3001 IDEOGRAPHIC COMMA
01:10 audreyt each has "lower case" variants
01:10 audreyt FE50 and FE51, respectively
01:11 audreyt so it'd be naturaly to use 3001 to separate function arguments
01:11 audreyt but never mind :)
01:12 audreyt phone, brb
01:14 TimToady yay, now pass 11122 in smoke.
01:14 TimToady have to toddle of myself.
01:14 TimToady later &
01:14 audreyt TimToady++
01:23 svnbot6 r10378 | fglock++ | PCR - bugfixes; passes 38/40 tests; added a 'reverse' match option for implementing <after>
01:43 amnesiac joined perl6
01:55 * obra finds an amusing quote on wikipedia.
01:55 obra "The pearls are usually harvested three years after the planting, but it can take up to as long as six years before a pearl is produced." -- http://en.wikipedia.org/wiki/Pearl
01:57 audreyt rofl
01:59 stevan_ obra: that means we can expect Perl 6,... oh....  next christmas?
02:01 obra "The community brainstorming process finished August 1, 2000"
02:02 obra "Looks like it will be ready for OSCON"
02:05 sri_ joined perl6
02:05 stevan_ obra: nice!
02:06 * stevan_ prepares to port the $company_cash_cow to Perl 6
02:07 scw joined perl6
02:16 SamB joined perl6
02:24 neoesque joined perl6
02:28 avar joined perl6
02:48 FurnaceBoy joined perl6
03:18 Quell joined perl6
03:43 coumbes joined perl6
04:04 Quell joined perl6
04:08 Quell joined perl6
04:24 arguile joined perl6
04:54 Ymmv joined perl6
04:59 Khisanth joined perl6
05:05 aufrank anyone: ping
05:05 aufrank I guess audreyt in particular
05:06 audreyt pong
05:06 aufrank hi hi
05:06 audreyt hey
05:06 aufrank got a minute to talk through the rest of Capture.pg?
05:06 aufrank in particular, how should I match a positional?
05:07 aufrank it seems like it might just be <expression>
05:07 audreyt it is
05:07 audreyt <expression ,>
05:07 aufrank but I need to be able to say <expression> ~= <named>
05:08 aufrank !=
05:08 aufrank sorry, too much matlab
05:08 audreyt        x <- namedArgOr parseExpWithTightOps
05:08 audreyt namedArgOr other = try namedArg <|> other
05:09 audreyt so basically use an alternation
05:09 audreyt [ <named> | <positional> ]
05:11 aufrank will the restriction that all required positionals need to precede optional positionals be reflected at the parsing level, or does that only come in once you're connecting the Capture to the Signature?
05:11 audreyt the latter.
05:11 audreyt the parsing level does not really know what the Signature will have
05:11 audreyt since you can bind a \(cap)
05:11 audreyt to multiple :(sig)
05:11 audreyt using :=
05:12 audreyt so when parsing Capture, assume no knowledge of the eventual sig
05:12 aufrank ok, makes sense :)
05:13 aufrank in a rule, where whitespace matters, how is extra whitespace in grouping or binding handled?
05:13 PerlJam plus captures may be used other places than just signatures
05:13 audreyt aufrank: elaborate wiht an example?
05:14 aufrank rule foo { [ $<bar> := <baz> ] <qux><quux> }
05:14 aufrank am I asserting anything about the whitespace matching between <baz> and <qux>
05:15 aufrank rule foo { [ <baz ]<
05:15 aufrank sorry
05:15 aufrank rule foo { [ <bar> ]<baz> } # same as
05:16 audreyt ah.
05:16 aufrank rule foo { [<bar>] <baz> }
05:16 audreyt in short, yes.
05:16 audreyt sorry, I mean, yes you are asserting
05:16 audreyt _any_ whitespace is translated to <?ws>
05:16 TimToady perhaps not whitespace around :=
05:16 audreyt but most certainly within []
05:17 TimToady yes
05:17 aufrank ok
05:17 audreyt the := is a token in itself
05:17 audreyt with two sides
05:17 audreyt so yeah, maybe not around :=.
05:18 TimToady but it does potentially seem useful before a quantifier.
05:18 TimToady <bar> * allowing whitespace between bars.
05:18 audreyt especially if bar itself is a token that doesn ot cae about ws
05:18 aufrank    rule default { = $<default> := <expression( terminates => ',' )> }
05:18 PerlJam er, what?
05:19 TimToady otherwise you'd have to write [<bar> ]*
05:19 audreyt that is slightly different though
05:19 audreyt since it eats up trailing ws
05:19 elmex joined perl6
05:20 PerlJam in keeping with historical terminology, the quantifiers act on the preceding atom.  Making <bar> * work as you suggest breaks the "atom" idea
05:20 TimToady the whitespace isn't an atom
05:20 audreyt PerlJam: p5 allows that under /x
05:21 TimToady whitespace is always metasyntactic.  Just sometimes it's metasyntactic for <?ws>, sometimes for <null>
05:22 aufrank ok, here's an example that I think is tricky
05:22 aufrank but maybe it's obvious
05:22 audreyt not mutually exclusive, obvious and tricky...
05:23 aufrank rule positional { [ <sigil><twigil>? $<internal> := <external>? ] }
05:23 TimToady trobvickious
05:23 aufrank do I have to run those together to avoid asserting whitespace?
05:23 audreyt broktvicious
05:23 aufrank <sigil><twigil>?$<internal> := <external> # better?
05:23 TimToady I'd say you probably want a token when youstart playuing with sigils.
05:23 audreyt I think so.
05:24 TimToady *playing
05:24 aufrank TimToady: ok, pretend I had a more rule-worthy example ;)
05:26 phpError joined perl6
05:27 TimToady <ws> is only the default whitespace handler.  I think there are probably explicit things a token can do the whitespace that might be around it, like undo the previous <ws>, or nullify a subsequent <ws>.
05:28 TimToady this is a generalization of the old :w thing of "unless there is already a whitespace matcher in that gap"
05:28 TimToady but what is a whitespace?
05:28 TimToady unless the tokens themselves have control of it?
05:29 TimToady basically, the whitespace is entirely managed by the tokens then, and rules only default to <ws> in the absence of guidance from the tokens.
05:29 penk left perl6
05:30 * PerlJam imagines parts of paintings negotiation who will be the foreground and who will be the background.
05:30 jabbot joined perl6
05:30 PerlJam s/tion/ting/
05:31 aufrank so if I'm defining a token that will always be bounded by whitespace on either side, but might contain optional whitespace somewhere within it,
05:31 jabbot joined perl6
05:31 aufrank I use token foo { <bar> <ws>? <baz> }
05:31 aufrank rather than rule foo { <bar> <baz> }
05:31 aufrank ?
05:31 TimToady most things should only worry about the internal whitespace.
05:32 jabbot joined perl6
05:32 TimToady s/things/tokens/
05:32 aufrank right, because they'll usually be put into rules which will handle whitespace around them on their behalf
05:33 TimToady or into another token that doesn't want the whitespace.
05:33 aufrank yeah
05:34 TimToady but I think some tokens (<block> maybe) want to be able to say "here's my whitespace policy, and it doesn't matter whether rules put whitespace after me.
05:34 penk joined perl6
05:34 aufrank I see
05:34 TimToady or want to examine the whitespace before them to be sure they're in the right state.
05:35 aufrank token foo { <bar> }.assuming( <ws> = /.../ )
05:35 aufrank or something
05:36 TimToady so all this implicit <ws> skipping is all kind of the default in the absence of more explicit direction for that particular "gap".
05:36 aufrank so a token could define policies for leading, internal, or trailing gaps
05:36 TimToady and that explicit direction can come from any level in the tree.
05:38 aufrank so there could be a grammar-wide whitespace-before-tokens policy, is an example of this?
05:38 TimToady so at a particular position, we schedule a sigspacey <?ws>, but we don't actually do it till we get down to the token in question, and if it doesn't care, we do a <?ws> before calling the token.  On the other end, the token can somehow say
05:39 TimToady "I already handled the whitespace".
05:39 TimToady and nullify any implicit <?ws> going back up the rules.
05:42 TimToady might just be sufficient to let the token explicitly go back to before the leading whitespace.  And of course it can chew up the following whitespace itself, if it isn't trying to change the definition of whitespace.
05:42 PerlJam So basically the default <?ws> is going to be smart enough to notice successive "calls" and delay execution until the appropriate time.    Are these smarts encapsulated in such a way that users that redefine <?ws> don't have to recreate them?
05:43 coops joined perl6
05:43 bjoern_ joined perl6
05:43 TimToady a very good question.
05:44 TimToady that says to me that we do want to delay the call to <?ws> till the last moment.
05:44 TimToady and not try to just "undo" it.
05:46 TimToady but the question remains of how we know that the token is going to handle its own whitespace
05:47 baest joined perl6
05:48 TimToady I suppose there could be a modifier that nullifies the parent implicit <ws> requests
05:48 pfenwick joined perl6
05:49 TimToady the alternative seems to be to try to recognize things things like \s, and that doesn't allow for <weird> rules that recognize whitespace, nor does it make it easy to match \s**{0} whitespace.
05:50 aufrank the idea there is that if a token wants to manage its own whitespace, it should use something other than the special <ws> form to match it?
05:51 TimToady maybe token always means implicit <ws> around it where requested by parents, and if you want more control, you just have to write your own regex instead of a token.
05:51 TimToady and a regex ignores <ws> requests from parents.
05:53 aufrank TimToady: tokens always have whitespace around them in rules, or in other tokens?
05:53 aufrank token foo { <bar> <baz> } # whitespace around them?
05:53 mtve joined perl6
05:54 TimToady whitespace is not significant in a token.
05:55 aufrank ok, that's what I thought
05:55 TimToady It's probably sufficient to just say that whitespace in a rule represents <?ws> and let the grammar rewrite <?ws> to get fancy with token cancellation policies.
05:56 aufrank works for me
05:56 aufrank at least as far as I've thought it out so far
05:57 TimToady if a token can find out where the previous <ws> started matching, that's probably good enough for now.
05:58 TimToady where previous means the ws that actually did something, since several rules might have attempted to skip ws, and only one will have succeeded.
05:59 TimToady so the current match object somehow has to keep track of "beginning of current whitespace"
05:59 svnbot6 r10379 | aufrank++ | cleaned up whitespace handling in tokens and rules
06:00 TimToady which could be quite a few lines and comments ago...
06:00 aufrank that was in Signature.pg
06:01 PerlJam Hmm.  must only one have succeeded?
06:01 TimToady the second one will be after the <ws>
06:01 PerlJam Imagine that all of the consecutive <?ws> in execution order are all aliases for each other.
06:02 PerlJam (i.e. they're really the same <?ws?
06:02 TimToady unless you write your <ws> as a kind of lookahead: "here's the whitespace I would have skipped if I'd skipped it"
06:02 PerlJam <?ws>)
06:02 TimToady yes, but then the question keeps coming up of how you know when to "really" match the ws.
06:03 TimToady but yes, effectively, they're the same <ws>
06:03 PerlJam How often would someone want to capture implicit whitespace?  That seems like a strange thing to me.  It seems that if whitespace were that important the user would have said so in the regex
06:03 TimToady and the token that wants to assert something about its preceding whitespace should not have to figure out which previous <ws> was the real one.
06:04 xern joined perl6
06:05 TimToady yes, we may well be overengineering this for now.  <ws> is idempotent unless someone wants to know which <ws> matched.
06:07 TimToady mostly a token will only want to know *whether* there was whitespace before it, if it's trying to do tricks like our statement-level block.
06:07 TimToady and even that can be handled by calling it carefully.
06:07 bjoern_ what's the type for "any object"? Any, Whatever, no type, ...?
06:07 PerlJam bjoern_: Any
06:07 xern joined perl6
06:08 PerlJam bjoern_: or perhaps Object
06:08 bjoern_ is there a document that discusses these?
06:08 xern joined perl6
06:10 TimToady it's sort of scatter about the synopses.
06:10 TimToady *scattered
06:10 TimToady basically Any will match any time, and box it up if it has to.
06:10 TimToady *type
06:11 TimToady Object is only "official" class-based objects
06:11 TimToady but there can also be prototype based objects that aren't really class based, just respond to .meta somehow.
06:12 bjoern_ right, that makes sense
06:12 bjoern_ so what about Whatever?
06:12 TimToady those are also Any but probably not Object.
06:13 TimToady Whatever is an Any type that doesn't match any type at all.  It's intended to mean "just DWIM this somehow".
06:13 TimToady it's up to the particular operator to dwim it.
06:13 PerlJam so Whatever is a typeless type?  :)
06:14 TimToady something like that.
06:14 bjoern_ heh
06:14 TimToady arguably it's at the bottom of the type hierarchy rather than the top.
06:14 TimToady for instance, range operator will interpret Whatever as some kind of infinity.
06:14 TimToady So 0..* is 0..Inf
06:15 TimToady but "a"..* is not expressible otherwise
06:15 TimToady since there's no "alphabetic infinity".
06:15 PerlJam TimToady: so what happens when I smartmatch against Whatever?  Is the result always True or do we just disallow it?
06:16 TimToady in subscripts Whatever means "everything that makes sense in the dimension".
06:16 TimToady it depends on the operator, so in this case it depends on ~~.
06:17 TimToady I imagine ~~ should probably always match * meaning "don't care".
06:17 TimToady but * is intended to mean "don't care" in the permissive sense, not the nihilistic sense.
06:18 TimToady arguably though ~~ should never match * because nothing is actually of the Whatever type.
06:18 PerlJam $thing ~~ *   seems like it would be asking if $thing is something rather than nothing.  i.e. Whatever as long as it's something.
06:18 TimToady and you should really use Any if you mean Any,
06:19 TimToady it really comes down to what people will want "when *" to mean.
06:20 PerlJam I predict a lack of concensus  :)
06:21 TimToady but a majority would probably want it to match anything.
06:21 PerlJam Though I guess it could be useful when the when in question happens to live in a CATCH block.
06:21 TimToady that is, "when *" would mean the same as "default"
06:22 PerlJam Hmm.  right now I'm thinking of it more as "always" rather than "default"
06:23 svnbot6 r10380 | aufrank++ | changes to Capture.pg:
06:23 svnbot6 r10380 | aufrank++ | prefix:<*> goes to prefix:<[,]>
06:23 svnbot6 r10380 | aufrank++ | only bareword keys parse as opening named args
06:23 svnbot6 r10380 | aufrank++ | values are expressions terminated by ','
06:23 svnbot6 r10380 | aufrank++ | rule for captures
06:28 PerlJam It's clearly past my bedtime, so I'll spare you guys my babbling until tomorrow  ;)
06:28 PerlJam good night all.
06:28 * PerlJam &
06:29 aufrank gnight :)
06:29 TimToady night sounds like a good plan to me. &
06:30 aufrank I guess I'm gone too, then :)
06:41 iblechbot joined perl6
06:51 svnbot6 r10381 | aufrank++ | added named subrules for different bracketing characters in Signature.pg
06:51 svnbot6 r10381 | aufrank++ | marked some tasks as done in README.org and added some new ones
07:25 buu_ joined perl6
07:45 reZo joined perl6
07:45 svnbot6 r10382 | scw++ | Pugs::Compiler::Rule ratchet: alternation with repeat eval fail fixed
07:47 marmic joined perl6
07:59 cdfh joined perl6
08:00 reZo joined perl6
08:22 andara joined perl6
08:28 buu_ is now known as buu
08:31 coops joined perl6
08:44 bjoern_ Is it possible to use "anything that does a specific role" as a type and if, how?
08:45 azuroth surely..?
08:46 azuroth I'd think that `sub foo(MyRole $a)` would just work?
08:47 bjoern_ that'd make sense, but I couldn't find that in S12 so far...
08:47 andara left perl6
08:49 sri__ joined perl6
08:49 bjoern_ ah, the bit after "Conjectural: " in S12 seems to use that
08:50 andara joined perl6
09:05 iblechbot joined perl6
09:43 lichtkind joined perl6
09:43 lichtkind is the --> operator syntax still valid?
09:47 azuroth --> as in returns?
09:49 meppl guten morgen
10:05 lichtkind guten morgen :)
10:05 lichtkind azuroth i mean in signaturs
10:07 andara left perl6
10:29 andara joined perl6
10:39 kane__ is now known as kane-xs
11:12 andara joined perl6
11:16 bjoern_ hmm, HTTP::Server::Simple should use .bytes not .chars to determine the Content-Length, I think
11:23 theorbtwo Aye.
11:37 kanru joined perl6
11:38 jsiracusa joined perl6
11:51 rashakil joined perl6
11:55 rashakil joined perl6
12:19 iblechbot joined perl6
12:21 mako132_ joined perl6
12:33 aufrank good morning
12:33 orafu joined perl6
12:34 audreyt morning
12:34 * audreyt is just about to sleep
12:37 audreyt *wave*
12:37 aufrank bye!
12:37 aufrank audreyt: does pmichaud have a way of running tests on .pg files?
12:41 wolverian lichtkind, yes
12:43 Limbic_Region joined perl6
12:43 particle_ joined perl6
13:01 azuroth left perl6
13:02 andara left perl6
13:03 nothingmuch joined perl6
13:31 justatheory joined perl6
14:01 andara joined perl6
14:05 lichtkind thanks wolverian
14:06 wolverian you're welcome
14:09 lichtkind wolverian what do you think are the 5 single best bits of perl6
14:10 wolverian single bits are not very information rich
14:10 Juerd lichtkind: 1, 1, 0, 1 and 0.
14:10 Juerd I forgot the offsets.
14:10 bjoern_ married bits aren't either...
14:11 lichtkind juerd very funny but you know what i want to do
14:11 lichtkind juerd i write my tut because you dont have to give such talks like in bochum every time
14:12 lichtkind wolverian i meant short pieces of perl6 syntax that enlightens you
14:13 Juerd lichtkind: I like doing it though :)
14:13 wolverian lichtkind, @foo[$i], @bar».baz, .meth_on_self, roles, mmd
14:13 wolverian I can't keep it solely to syntax :)
14:14 lichtkind with @bar».baz  you mean hyper op
14:15 wolverian yes.
14:15 Juerd lichtkind: The best features, IMO, are: OO, grammars+rules, parallel execution (junctions and hyper ops), lexical everything (my class, my sub), Perl written in Perl
14:16 lichtkind wolverian yeah but my point is that part of my perl6 tut will by an apetizer, short chunks of perl5 code and equal perl6 to state is clear how perl6 evolved
14:16 lichtkind into something very cooler
14:16 lichtkind my bits i brought was
14:18 lichtkind a simple junction, chained comparsion, as sub with siganture , a short class with an autogenerated accessor, and 2 for loops demonstrating ranges with steps(by) and multiple iterators
14:18 lichtkind maybe i forgot something thatswhy i ask you
14:20 Grrrr [+] 1,2,3
14:20 wolverian signature unpacking
14:20 wolverian (i.e. pattern matching in haskell terms)
14:20 lichtkind whats that?
14:21 lichtkind i mean signature unpacking
14:21 lichtkind yes grrrr that its worth to mention
14:21 wolverian search for "Unpacking" in S06
14:22 wolverian although I think Larry did away with * so I don't know if the syntax there is right anymore..
14:22 Juerd I don't like the recent * changes at all.
14:23 lichtkind you mean * dont stand vor slurpy arrays anmore?
14:23 lichtkind and yadda is only necesary in sub but not blocks?
14:23 wolverian I think it doesn't flatten anymore. I'm not sure if it still means slurpy array in sigs
14:25 * szbalint needs to catch up on changes...
14:27 theorbtwo I thought the recent changes mostly got rid of prefix * and **, replacing them with words or [,].
14:27 theorbtwo Am I wrong?
14:27 scw joined perl6
14:27 lichtkind but you guys think that i've got all the coolest quick to explain features?
14:28 theorbtwo "All the coolest quick"?
14:29 theorbtwo I'm not so sure about this double-at-sign stuff, but I also don't understand it.
14:31 lichtkind theorbtwo all the coolest*,* quick to explain
14:32 elmex joined perl6
14:32 trym joined perl6
14:35 xern joined perl6
14:38 theorbtwo joined perl6
14:41 justatheory joined perl6
14:41 pfenwick joined perl6
14:41 avar joined perl6
14:41 obra joined perl6
14:41 mako132 joined perl6
14:41 domm joined perl6
14:41 amv joined perl6
14:41 drbean joined perl6
14:41 jdv79 joined perl6
14:41 clkao joined perl6
14:41 svnbot6 joined perl6
14:41 marcus_ joined perl6
14:41 TreyHarris joined perl6
14:41 Soga joined perl6
14:41 tcliou joined perl6
14:41 notsri joined perl6
14:41 qwacky joined perl6
14:41 rlp joined perl6
14:52 hexmode joined perl6
15:10 penk joined perl6
15:20 hexmode joined perl6
15:30 aufrank joined perl6
15:44 pmichaud 12:37 <aufrank> audreyt: does pmichaud have a way of running tests on .pg files?
15:44 pmichaud aufrank: not at the moment, no
15:45 pmichaud I'm looking for a good way to do tests on tree results
15:46 andara_ joined perl6
16:01 Aankhen`` joined perl6
16:18 particle_ joined perl6
16:20 wolverian what's wassercrat's nick here, again?
16:22 particle_ i think it's wolverian ;) # KingDillyDilly
16:22 wolverian thanks
16:22 wolverian :)
16:28 andara left perl6
16:30 bpederse joined perl6
16:36 ludan joined perl6
16:36 ludan re
16:50 FurnaceBoy joined perl6
16:53 bradleym joined perl6
16:54 amnesiac joined perl6
17:00 lisppaste3 joined perl6
17:13 aufrank joined perl6
17:43 cdfh joined perl6
17:57 particle_ ?eval say '\x0123abg'
17:57 evalbot_10377 is now known as evalbot_10382
17:57 evalbot_10382 OUTPUT[\x0123abg ] Bool::True
17:57 particle_ ?eval say '0x0123abg'
17:57 evalbot_10382 OUTPUT[0x0123abg ] Bool::True
17:57 particle_ ?eval say "0x0123abg"
17:57 evalbot_10382 OUTPUT[0x0123abg ] Bool::True
17:57 particle_ ?eval say "\x0123abg"
17:57 evalbot_10382 OUTPUT[𒎫g ] Bool::True
17:58 particle_ hrmm
17:59 kolibrie joined perl6
18:02 kolibrie OT: I installed inkscape a few hours ago, some other stuff got upgraded, now startx appears to do nothing except blank the display and kill the keyboard
18:02 kolibrie anyone have any pointers or places I should look, or Xorg and/or debian foo?
18:03 bjoern_ I think there is a #inkscape channel nearby, and there is #svg
18:03 mtve joined perl6
18:03 Juerd kolibrie: /var/log/Xorg*
18:04 particle_ juerd: how was your perl6-oo talk?
18:04 * kolibrie examines /var/log/Xorg.0.log
18:07 ruoso joined perl6
18:09 Juerd particle_: It went well
18:10 Juerd particle_: But unfortunately, I couldn't explain roles well.
18:10 particle_ i'm just glad you were able to stay awake through it
18:10 Juerd Well, I could explain the technical side well, but not when to use them instead of MI or mixins
18:10 Juerd My talk was the first
18:10 kolibrie Juerd: how far through the traits paper did you get?
18:10 particle_ they're so new, when to use them is still largely undefined
18:10 Juerd Because they scheduled two Perl 6 related talks (lt's Parrot talk, and my Perl 6 OO talk) at the same time, and the first speaker was late.
18:11 Juerd kolibrie: Somewhere around page 40
18:11 Juerd I understand why roles rock, now
18:11 Juerd That's no problem anymore.
18:11 pfenwick left perl6
18:11 Juerd The problem's now that I don't see any reason to use inheritance anymore :)
18:11 * kolibrie will have to read that paper some time
18:12 Juerd It's very technical, and even mathematical
18:12 Juerd It usos some equations to prove things. I have no idea how to read them.
18:12 Juerd   uses
18:13 szbalint_ joined perl6
18:14 kolibrie Juerd: so, I'll ask you if I have mathematical questions :)
18:14 Juerd No, don't :)
18:16 kolibrie :(
18:16 szbalint_ is now known as szbalint
18:17 FurnaceBoy is now known as ShitOnAStick
18:18 ShitOnAStick is now known as NiceNick
18:20 NiceNick is now known as FurnaceBoy
18:24 cdfh joined perl6
18:27 ingy `_`
18:27 Juerd sh: _: command not found
18:27 particle_ man juerdsh
18:28 Juerd No manual entry for juerdsh
18:28 FurnaceBoy Juerd++
18:48 weinig joined perl6
18:57 larsen joined perl6
19:07 tatiane joined perl6
19:08 tatiane left perl6
19:27 cdfh joined perl6
19:47 FurnaceBoy joined perl6
19:49 larsen_ joined perl6
19:49 aufrank Juerd: glad to hear the talk went well :)
19:53 Steve_p joined perl6
19:55 coops joined perl6
19:57 bernhard joined perl6
20:14 weinig is now known as weinig|away
20:19 andara joined perl6
20:22 FurnaceBoy_ joined perl6
20:28 andara ?eval [+] 1,2,3
20:28 evalbot_10382 6
20:28 Ymmv joined perl6
20:29 andara ?eval [*] 11,22,33
20:29 evalbot_10382 7986
20:30 larsen joined perl6
20:30 andara ?eval $a=[11,22,33] and [+] $a
20:30 evalbot_10382 Error: Undeclared variable: "$a"
20:31 andara ?eval (@a=(11,22,33))&&([+] @a)
20:31 evalbot_10382 Error: Undeclared variable: "@a"
20:31 Gothmog_ try my
20:32 andara thanks.
20:32 Gothmog_ np
20:32 andara eval (my @a=(11,22,33))&&([+] @a)
20:32 Gothmog_ Question mark missing. :-)
20:33 andara :-|
20:33 Gothmog_ ?eval my @a = (11, 22, 33); [+] @a
20:33 evalbot_10382 66
20:33 andara yup
20:34 Gothmog_ Hm...
20:35 Gothmog_ ?eval 5 >>+<< (1, 2, [3, 4, [5, 6]])
20:35 evalbot_10382 (6, 7, 8.0)
20:38 Gothmog_ Shouldn't this evaluate to (6, 7, [8, 9, [10, 11]])?
20:39 Gothmog_ ?eval my @a = (1, [2, 3]); my @b = 5 >>+<< @a; say @a; say @b;
20:39 evalbot_10382 OUTPUT[12 3 67 ] Bool::True
20:39 Gothmog_ ?eval my @a = (1, [2, 3]); my @b = 5 >>+<< @a; say @b[1];
20:39 evalbot_10382 OUTPUT[7 ] Bool::True
20:42 Gothmog_ This isn't according to the synopses, I think.
20:42 Gothmog_ There isn't even a test for this, if I didn't overlook something...
20:43 gdickie ?eval 5 +<< (1, [2, 3])
20:43 evalbot_10382 Error:  unexpected end of input expecting block, "\\", "$/", "$!", ">>" or "<<"
20:44 Gothmog_ I think you have to put >> on the other side 'cause + is an infix op...
20:44 Gothmog_ 5 will be "upgraded" to an array automagically.
20:59 kolibrie &
21:07 froh-doh joined perl6
21:16 FurnaceBoy joined perl6
21:31 jsiracusa joined perl6
21:45 lichtkind joined perl6
21:47 pdcawley joined perl6
22:01 pen1 joined perl6
22:02 marcus_ joined perl6
22:02 drbean_ joined perl6
22:02 jdv79_ joined perl6
22:03 clkao_ joined perl6
22:03 TreyHarris joined perl6
22:05 pen1 is now known as penk
22:06 domm joined perl6
22:07 notsri joined perl6
22:07 froh-doh joined perl6
22:07 Steve_p joined perl6
22:07 amnesiac joined perl6
22:07 ludan joined perl6
22:07 justatheory joined perl6
22:07 avar joined perl6
22:07 obra joined perl6
22:07 mako132 joined perl6
22:07 domm joined perl6
22:07 amv joined perl6
22:07 jdv79 joined perl6
22:07 svnbot6 joined perl6
22:07 Soga joined perl6
22:07 tcliou joined perl6
22:07 qwacky joined perl6
22:10 mako132 joined perl6
22:11 domm joined perl6
22:16 Steve_p_ joined perl6
22:20 kanru joined perl6
22:21 froh-doh left perl6
22:27 Hue-Bond joined perl6
22:54 cybertrickle_ joined perl6
22:54 Khisanth joined perl6
22:55 obra_ joined perl6
22:55 amv_ joined perl6
22:57 justatheory joined perl6
22:58 notsri_ joined perl6
23:02 FurnaceBoy is now known as FB|zzz
23:04 Soga joined perl6
23:07 tcliou joined perl6
23:10 ludan joined perl6
23:10 avar joined perl6
23:10 svnbot6 joined perl6
23:10 qwacky joined perl6
23:20 Odin-LAP joined perl6
23:40 Quell joined perl6
23:44 weinig|away is now known as weinig
23:50 vytautas joined perl6
23:56 dvorak joined perl6

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

Perl 6 | Reference Documentation | Rakudo