pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | <stevan> Moose... it's the new Camel ":P | .pmc == PPI source filters!
Set by Alias_ on 16 March 2006.
TimToady perhaps not. that's why we say "to the extent possible" 00:00
certainly /foo/ ~~ /bar/ makes little sense.
b_jonas so it's almost symmetrical only because it DWIMs
(I don't like DWIM)
TimToady it can only DWIM when there's something fairly obvious to DWIM.
The point of having a DWI 00:01
M operator
is to keep all the weirdness in one spot.
it's a form of encapsulation
whatever we decide about ~~, given/while automatically does exactly the same thing. 00:02
b_jonas do you mean "when"?
TimToady and any number of "match this" parameters or "where" constraints automatically fall out too.
subset Odd where { $_ % 1 }
that falls out of $foo ~~ { $_ % 1 } 00:03
b_jonas btw, if we have smart matches, will grep do a smart match with its first argument, instead of just calling it as a function? (that's the way ruby does)
TimToady Yes, that would fall out too.
b_jonas nice 00:04
TimToady grep Dog, @mammals
b_jonas (and then we can remove the function call operator, as a function call is a smart match, and a regexp matching is a function call :) 00:05
TimToady um...
particle_ !!! is a term, that takes an optional argument? sounds like an op to me
TimToady I confess an inordinate fondness for function call syntax. 00:06
it would be a prefix op, yes.
in fact, pretty much an exact synonym for die.
particle_ right, which is what i'll code in pir for it
is ... also prefix? (can it take an arg?) 00:07
TimToady unless it's prefix precedence.
b_jonas uh. open()||!!!$!
particle_ make that open // !!! $!
TimToady as in !$a, $b is (!$a), $b
pity we don't have angly exclamation mark. 00:08
b_jonas but really I think !!! and ??? are nice syntax addittions as they catch the eye
TimToady wait, italic...
now where did Unicode put the italic font...
particle_ :)
b_jonas I used !! as an or operator in a language I made 00:09
is that close?
particle_ there's always the upside-down question mark
FurnaceBoy_ haha
b_jonas ?? was and
TimToady I'd be more inclined to use those for a ternary operator. :)
particle_ isn't that the same thing? :)
b_jonas I don't say we should use them 00:10
TimToady only if a ?? b returns a status that can be used by !!
that would be rather, iconic
b_jonas it was because ? and ! also had opposite significances in the language
TimToady ah well, everyone's a language designer. :-) 00:11
00:11 Khisanth joined
b_jonas A ? B was a conditional that tested A and if it was true, it evaluated B and jump out of the innermost set of parenthesis and make it return the value B returned 00:12
so (A; B ? ; D; *) was the equivalent of perl's {A; B and last; D; redo} 00:13
but it had the power that you could also return a value from the block which last can't 00:14
00:14 ruoso joined
TimToady well, a couple of days ago I proposed "last <== @retval" 00:14
b_jonas and (A ? B ; C) was the equivalent of (A ? B : C) 00:15
TimToady so basically ? is kind of a case operator like in infix "when".
s/in/an/ 00:16
b_jonas um. I don't know. ? could do an if-elseif condition, but it didn't do matches. and I don't know how when operates exactly. 00:17
was it like that postfix when and prefix when was different?
TimToady there is no postfix or prefix when. there's a statement control and a statment modifier... 00:19
00:20 amnesiac joined
b_jonas I'll just look it up 00:21
"If the smart match succeeds, the associated closure is executed, and the surrounding block is automatically broken out of." -- yes, than it is like that 00:22
or not. I assume "broken off" means what "next" does there 00:23
particle_ is Y= same as ōæ½xA5=?
b_jonas while my "?" was rather breaking out like "last"
TimToady next is meaninful only in a loop. 00:25
b_jonas yes, I've read further now,
"If you have a switch that is the main block of a for loop, and you break out of the switch either implicitly or explicitly, it merely goes to the next iteration of the loop."
TimToady the loop is conceptually outside the switch even if they're sharing the same braces. 00:26
b_jonas so my "?" operator is more powerful, because it can be used as a loop termination condition, which is one of the points why I introduced it 00:27
I wanted to have a loop where I can have the condition at the beginning, the end, or somewhere in the middle, with only one syntax, no need for separate ones like while{} and do{}while
just like bash does
TimToady sometimes people would rather have more than one construct, I've noticed. :) 00:28
you can write everything with loop {...} in Perl 6 too. But somehow I expect to see a lot of while loops yet. 00:29
b_jonas and how would you jump out of that in the middle?
TimToady last if condition, just like P5
b_jonas well, I don't say "?" was a good idea, but I just had to experiment with it at that time
and it also made the interpreter interesting. I didn't need exceptions but I could still jump out of a loop. 00:30
TimToady I've done an experiment or two in my time...
b_jonas what does "your time" mean there?
TimToady An "interesting" interpreter. Sounds like a curse. :) 00:31
b_jonas yep. that interpreter has "delete this;" and triple pointers
and it has triple pointers (like Foo ***var) at two places and I only understand one of them now 00:32
:(
TimToady my interpreter has a few rough spots too...
b_jonas well, it was a homework assignment. the point was that the professor didn't have a chance to understand it but I did.
the one I understand was because I of a tail call optimization 00:33
when the parser found a binary operator, it would normally had to parse both arguments and then create a node in the syntax tree passing both of them 00:34
but instead of that
TimToady "there's nothing that can't be solved with another level of indirection...except the problem of too many levels of indirection."
particle_ hence, the deref operator 00:35
b_jonas I parsed the first one, created a node with it, but the node constructor gave me back a pointer of where I should store the pointer to the node representing the second argument of the operand
that's two levels, the third is because C can have one return value only so I have to pass a pointer to it so that it can store the extra return value 00:36
I hope that didn't make sense
TimToady well, opcode trees will drive anyone nuts.
especially in C.
b_jonas but I've just read the HOP and it talks about such continuation thingies at some places 00:37
it's a good book contrary to what I say
I could have used a proper parser generator like bison you know, 00:38
and then I couldn't even have thought of such hacks
TimToady bison doesn't save you from that sort of thing, really...
you still have to build the opcode tree yourself.
b_jonas yes, it merely makes those sort of things impossible to do
it leaves no choice but to create the node after both arguments are available 00:39
TimToady you will note that we're not using bison or yacc for Perl 6. :)
particle_ but we are for parrot
b_jonas sure
TimToady parrot is, in some ways, heavily optimized for running Perl 5. :) 00:40
b_jonas it would have been impractical especially because compile and runtime is mixed in perl6 and bison is difficult to use with a garbage collector
without knowing bison's inner workings at least
particle_ true, but that's changing (in chip's mind) right now
TimToady yes, not leaking memory on a parse failure is really difficult with yacc. 00:41
b_jonas and of course you couldn't customize perl6 grammar in runtime with bison
hmm. optimized for running Perl 5? I didn't see that.
particle_ perl5 begat topaz begat parrot 00:42
TimToady it's just sort of natural--most of the parrot programmers know a lot more about Perl 5 than Perl 6, so it's kind of unconscious 00:43
but it's been getting better, particularly as we do a better job of actually saying what Perl 6 *is*... 00:45
particle_ the new generation of compiler tools (pge, tge) are making hll development much easier 00:46
TimToady The pugs implementation has done a wonderful job of flushing out a lot of the implicit P5isms of the P6 design. It's just there's some natural latency in that whole process. 00:47
particle_ there's much less latency now than there was a few years ago 00:48
TimToady The nice thing about flushing out the implicit P5isms is that then we can look at them and decide which ones were good ones and which ones were not so good.
b_jonas uhum 00:49
TimToady yes, a lot of us have been trying very hard to make that happen. :)
communities naturally tend to diverge unless there is a core of people who are actively working toward making them converge. 00:50
particle_ speaking of convergence... off to a perl meeting. cya! 00:51
TimToady ciao. and yes Y is yen. 00:52
b_jonas good night, everyone 00:54
01:12 Quell joined
TreyHarris note to any trainers out there: do not try to teach /m in the same class in which you introduce regexes. poor students' heads explode. 01:22
01:29 karjala joined 01:31 Quell joined 01:37 hlen joined
TimToady Hmm, I wonder if ^^ and $$ will fare better? 01:42
pmichaud so far they seem to work okay 01:46
01:47 qu1j0t3 joined
pmichaud well, I finally have the pge parser able to deal with whitespace, postfix, long dots, { } terms in <if>, statement modifiers, and all of the other fun quirks of this language. :-) pairs are probably next. 01:49
TimToady I mean whether ^^ and $$ will make people's heads explode if explained in the same class that regexes were introduced... 01:52
pmichaud right... when I described perl6 rules to dfw perl mongers last year, the heads exploded on far more than ^^ and $$. Most people could grok ^^ and $$ w/o problem (or maybe they were just too far gone by then to care) 01:54
TimToady commuting & 01:58
svnbot6 r10036 | audreyt++ | * pmichaud requested a Junction-free Test.pm, and here it is. 02:04
02:12 chovy joined
chovy audreyt: 02:12
audreyt mm? 02:13
chovy: ? 02:17
svnbot6 r10037 | audreyt++ | * librules: more optable node slots and API mockups. 02:22
02:23 jserv-- joined 02:44 r0nny joined 03:14 FurnaceBoy_ joined 04:05 mako132_ joined 04:28 nirgle joined 04:33 qu1j0t3 joined 05:12 iblechbot joined
ayrnieu pmurias - it doesn't seem that you ever understood me. I: don't want Q. Hate Q. Am totally glad that vim does not support it. 100%. Am irritated by !vim's support if it. 05:23
05:28 Blicero_ joined 05:31 rgs joined 05:37 xinming joined 06:03 Frances joined 06:27 marmic joined 06:28 Soga joined 06:51 KingDiamond joined 07:05 lypie joined, iblechbot joined 07:10 LCamel joined 07:37 Aankhen`` joined 07:53 KingDiamond joined 07:55 Toaster joined 08:03 drrho joined 08:17 Aragone is now known as Arathorn, Alias_ joined
Alias_ stomps in 08:18
seen TimToady?
jabbot Alias_: TimToady was seen 6 hours 20 minutes 11 seconds ago
Arathorn reads the Captures FAQ and looks petrified 08:20
whilst i can see how it might be useful to have a nice OO way of passing around arguments to functions/methods, complete with the invocant 08:21
Alias_ has visions of JavaScript
Arathorn i'm failing to see how you'd use it elsewhere - especially in the context of Rules capturing, which seems to be obliquely hinted at but never explained
you mean the 'arguments' keyword/pseudovariable/thing? 08:22
Alias_ Well, the fact that "this" sort of can follow you around
Arathorn ah, yeah
Alias_ everything is a Function
Except that every Function has an invocant 08:23
Which means everything is a Method, except you never say so
arcady huh? 08:24
Alias_ EXACTLY!
arcady I though invocant is optional
says so in the capture FAQ, at least
"at most one"
Arathorn but when you do $foo = \$bar, you're assigning $bar into the invocant slot of the $foo capture, right?
s/assigning/binding/ 08:25
Arathorn really doesn't understand why such a seemingly obscure feature merits the huffman of $$foo and $foo syntax
08:25 p5evalbot joined
arcady because it does the things that were done by those syntaxes in perl 5 08:25
or something like that 08:26
08:26 buu is now known as p5evalbot
Arathorn except you'd no longer use it for compound data structures 08:26
08:27 p5evalbot is now known as buu
Arathorn and you have the := operator to bind things together by reference 08:27
arcady yes 08:28
Arathorn so having "removed references from perl6", why do you still need $ and \? (other than to totally confuse migrating perl5 programmers)
esp. given that they're not actually syntactic sugar for := style binding magick
but a totally different structure under the hood 08:29
arcady binding is not references though
08:29 p5evalbot joined
arcady and, superficially, it does seem to work like references 08:29
when you do $foo = \$bar, you assign to $foo a reference with the invocant bound to $bar 08:30
arcady actually is just pretending that he knows what he's talking about
Arathorn i guess my problem is, then, that I can't see a scenario where you'd ever want to do that, given binding and compound DSs not needing refs
and that passing args into a function/method by reference happens by reference by default (by means of read-only proxies)? 08:31
unless you say 'is rw', or 'is copy' for that particular arg
anyway, this kind of confusion is prolly not conducive to the channel's (or my) wellbeing at this time of day 08:32
Arathorn applies coffee :/
arcady by binding to readonly variables, or something like that
08:33 p5evalbot joined
Arathorn right. so when would you ever want to $foo = \$bar in practice? 08:33
or is it just one more way to accomplish something like binding, but with a user-accessible capture object you can then play with?>
arcady in practice? doesn't seem too useful 08:35
though maybe $foo = \@bar might be more so
Arathorn heh
Arathorn can't see why, other than to tempt you to start writing $foo->[$baz] :) 08:36
arcady you can't even do that 08:38
you can, however, do $foo[$baz]
Arathorn hm, surely that should be $$foo[$baz] 08:39
08:39 elmex joined, Alias_ left
Arathorn or can you apply the [] to a capture object directly? 08:39
arcady yes, I think you can 08:40
wait. no, not like that 08:41
it would indeed have to be $$foo[$baz]
Arathorn well, i guess it does provide some kind of quasi-perl5 syntax for newbies to hang themselves with 08:42
and allows you to decorate all the capture nodes with arguments if you felt the urge 08:43
Arathorn boggles
arcady I think it's best to wait around for someone who actualy knows what all of it is for
Arathorn fair enough :)
arcady then all will be made clear
Arathorn thanks for bouncing ideas, all the same... 08:44
arcady they're bouncing too much in my head. time to sleep I think.
Arathorn night 08:56
09:10 nicbrown joined
lypie nothingmuch: you should mail me again daily until i do that thing btw :P 09:17
lypie is such a lazy !@#@
09:20 nicbrown joined
lypie audreyt: the new capture rules noted on the blog are interesting 09:32
lypie debates replying to article rather than using irc
Arathorn post a link if you comment on the blog rather than chat in here 09:35
as i also find the capture semantics interesting
interesting in a terror-inducing kinda way
lypie if i were to comment it would be on the pil2 nodes rather than capture
lol
09:36 dakkar joined
lypie wonders what string-buffer-fragments are and if they are in any way related to cords 09:38
Arathorn fair enough
integral lypie: I believe the answer to the second bit is: "Yes" 09:39
lypie integral: very neat
cords rock
09:40 macroron joined
integral yeah. 09:40
09:57 Soga joined 09:58 KingDiamond joined 10:03 frederico joined 10:04 xinming joined 10:09 GeJ joined
GeJ hello folks 10:09
is there any freebsd user around? with the latest firefox version if possible. 10:11
Grrrr yes
GeJ Mr. Grrrr... nice to see you. 10:12
Grrrr well, with firefox-1.5.0.1_2,1, I have not updated to the latest yet
audreyt TimToady: does @ signify integer keys, or orderedness?
xinming GeJ: I know audreyt use Freebsd...
audreyt TimToady: i.e., is @foo['moose'] more blasphemic or is %bar.keys.[0] more so? 10:13
i.e., if I have an ordered mapping from objects to objects, is that @ or %?
GeJ hum, ok. it's just that I bumped into a firefox crash while looking at audrey's www.pugscode.org/osdc/pugs.xul
Hello audrey, Happy Birthday btw :) 10:14
audreyt thanks! :)
lypie good reminder ;)
GeJ the crash happens after the slide "Pugs is..."
10:14 lichtkind joined
lypie happy birthday audreyt :) 10:14
GeJ: my firefox also really dislikes it 10:15
lichtkind hey :)
?eval d:{1}; goto d;
GeJ lypie: thanks... 10:16
10:16 evalbot_10031 is now known as evalbot_10037
evalbot_10037 Error: No such method in class Block: "&d" 10:16
GeJ lypie: distro?
lypie GeJ: debian?
hehe
working for me this time around
GeJ ok, so it maybe a FF issue and not only a FreeBSD one
hum... 10:17
lichtkind ?eval do{ return 1; 2;};
evalbot_10037 Error: cannot cast from VUndef to Pugs.AST.Internals.VCode (VCode)
lypie GeJ: firefox on debian is heavily patched, its unstable and crap
lichtkind ?eval do{ 2;};
lypie (where crap == it doesn't get rendering right in many instances due to non upstream patch sets)
audreyt try reload
evalbot_10037 2
Grrrr GeJ: works here - but it really depends on the extensions you have, I would imagine
audreyt see if it works better
lichtkind happy birthday audrey 10:18
audreyt (also space key should now work if you reload again)
lichtkind: thanks :))
GeJ 'The application 'Gecko' lost its connection to the display :0.0;' 10:21
'An exit code of 1 was returned by firefox'
Well, time to add debug symbols...
lypie hehe 10:22
GeJ sorry for the noise.
Arathorn audreyt: if you have a second to glance over my confusion at colabti.de/irclogger/irclogger_log/...l=120#l188 and elucidate for the masses, it'd be hugely appreciated 10:25
lypie audreyt: wrt pugs.xul, the perl5 example code with hash access -> the thing i hated most about p5 10:29
audreyt Arathorn: sec... 10:30
ok. the question was why \ and $ warrante 1 char.
Arathorn yup.
audreyt I can defend \ much easier than $ so I'll do thatfirst.
the motivation for \ is no longer complex data structures 10:33
but rather reusable argument lists
Arathorn right - and presumably not function/method calling by deference either, given you have read-only proxies by default, and 'is rw' and 'is copy'
okay - why would I ever want to reuse argument lists in practice? (if i weren't writing a dispatcher of some kind) 10:34
Arathorn was hoping/assuming that the answer was something to do with how Captures would be used by Rules, but can't seem to find any info apart from rather oblique hints ;)
audreyt Captures are superclasses of Match 10:35
so all Rule application return captures.
Arathorn is the invocant slot used on the Capture objects which get returned? 10:36
Arathorn tries to work out what it'd mean to one of them
audreyt yes. to wit
my $rv = ("x-y-z-moose" ~~ /(.)-(.)-(.)-<animal> :{ return *$/ }) 10:37
er
my $rv = ("x-y-z-moose" ~~ /(.)-(.)-(.)-<animal> :{ return give_birth(*$/) })
many things happen here
give_birth gets 'x','y','z' as positional args 10:38
and :animal<moose> as named
so far so good?
Arathorn yup, with you
audreyt it can return a Moose object
now $rv has the same positionals and named slots
and its invocant slot becomes that Moose object
makes sense?
Arathorn yes, it does. 10:39
audreyt now you can get back the Moose by saying
$rv as Animal
Arathorn presumably nested captures then become nested Captures within positional slots in the master Capture?
audreyt yes.
that's the idea.
so you can * into them
if you want to retrieve some of them as args to other funcs. 10:40
Arathorn ah ha!
audreyt this is all here to do what TGE does
(and more)
Arathorn has his 'ah ha!' moment
audreyt in a natural Perl6 syntax
so we can manipulate trees very easily
lypie Arathorn: hehe
audreyt since Capture is also the natural data type for XML elements.
or other annotated nodes with children.
so they should be unified, and the way to introduce literal of that kind is \(). 10:41
another sugar is &func\(1,2,3)
which is &func.assuming(1,2,3)
which would make haskell people envious
as this can assume into nameds as well.
so, imagine this as somewhat of our answer to Erik Meijer and his XML literals ;) 10:42
gaal whee, that's new isn't it?
audreyt (and native tree manipulations)
Arathorn yup, that makes a whole lot more sense now
lypie umm...
audreyt gaal: it's been around before I requested the p6l commit mailing
lypie gets the idea that he really should be reading this
dakkar I really look forward to a Captures-based DOM-like tree 10:43
audreyt Arathorn: your can also think that Rules become XSLT and binding become XQuery and deref+casting become XPath
gaal so is positional-named figured out?
audreyt but I prefer not to think that unless neccessary.
gaal: positional-named?
gaal audreyt: <doc><e/></e><e/></doc>
audreyt oh that. probably named "e" contains a simple Tuple 10:44
gaal s,/e,e/,
wolverian audreyt, whoa. I _really_ like &foo\(1, 2, 3). now figure out a way to fit that in with $obj.foo method call syntax :)
audreyt of three empty captures
that what Match is done now with
/<moose>+/
it's cheap and cheerful, so why not.
Arathorn: if you have some cycles to add some part of it -- or refactor altogether -- into Capture.pod that'd be lovely. 10:45
lichtkind audreyt sorry but whats all about that running gag with moose?
audreyt lichtkind: I have no idea.
it's all gaal's fault.
lypie bacon
aw, damn irssi and its unliner!
audreyt he is the archlambdamoose that brainwashed us all
10:46 Barry joined
audreyt by using moose in every examples during OSDC.il hackathon 10:46
(and then some.)
Arathorn audreyt: sure, will do
"Captures are a fundamental class for expressing annotated nodes with children, such as rules captures, argument lists, XML nodes, etc." sounds like it should make its way into Capture.pod somewhere near the top
gaal moose is the new orange...
lypie where can i find more docs on this &foo\(1,2,3) syntax? 10:47
audreyt Arathorn: sure... just commit :)
lypie as in, whats foo? :)
GeJ audreyt: some recent statistics based on #perl6 logs tend to prove that gaal is not the only one in the moose/elk conspiracy.
nm is as much (if not more) guilty as him
audreyt hm, strangely
S06 doesn't have the &foo\() form anymore 10:48
gaal GeJ: that merely exhibits the difference between activism and activatism.
audreyt reads the log
Barry Is this logged somewhere?
audreyt Barry: irc.pugscode.org 10:49
Barry How about #perl?
audreyt not sure 10:50
GeJ Barry: colabti.de/irclogger//irclogger_logs/perl6
audreyt oh, it's in S02.
postcircumfix:<\( )>
With multiple dispatch, C<&foo> may not be sufficient to uniquely name a 10:51
specific function. In that case, the type may be refined by using a
signature literal as a postfix operator:
gaal wicked cool
audreyt &foo:(Int,Num)
It still just returns a C<Code> object. A call may also be partially
applied by using an argument list literal as a postfix operator:
&foo\(1,2,3,:mice<blind>)
so, .variants and .assuming each get onechar huffman
somehow I think that's a good call :)
wolverian hrm, to get a bound method object, I do '&Class::meth\($obj:);', right?
audreyt wolverian: yes 10:52
wolverian I still wish that was prettier. oh well. :)
audreyt $obj.meth\();
is better
wolverian nooooo, does that work?!
audreyt that is speculative.
wolverian hrm. now I'm feeling torn. the \ is rather hidden there
audreyt $obj.can('meth')\();
is perhaps better 10:53
$obj.can('meth')\($obj); # I mean this
wolverian \($obj:)?
audreyt no
one arg is always imnplicit inv
close $fh;
wolverian oh. okay.
audreyt close $fh:;
same thing
wolverian right
makes sense
gaal {$obj.meth(*@_,*%_)} ?
audreyt ->\$_{$obj.meth(*$_)} 10:54
wolverian gaal, I was hoping for real partial application.. :)
gaal we don't have autocurrying either...
ah, -> \$_ is neat
though i'm not sure why it should work 10:55
audreyt why not?
gaal patmatch?
audreyt \$x in arglist captures all remaining stuff into a Capture 10:56
I mean paramlist.
I mean Signature. (darn)
gaal huh, okay
{$obj.meth(*$^a)} ? :)
Arathorn is Signature a superclass of Capture, then? 10:57
audreyt gaal: no that's positional
no.
Arathorn: these two are not at all related.
class-wise
Arathorn tries to understand why (1,2,3,:mice<blind>) describes a signature rather than an argument list
audreyt it descrives an argument list.
it has nothing to do with signature!
the mice<blind> is currying
(afk, brb...)
wolverian is --> a part of it? 10:58
audreyt part of Signature?
Arathorn oh, because it identifies the correct method based on the example argument list?
wolverian audreyt, right, or Capture
audreyt you can't say --> in Capture literals.
in Signature, opinions differ on whether it's a type constructor (which I think it is)
or just shorthand to attach two Signatures to one Sub, one for in and one for out. 10:59
dakkar is away: pranzo 11:00
audreyt Arathorn: now, justifying $. 11:01
if something can sensibly contain a distinguished, potentially lvalue, object 11:02
Arathorn purely for symmetry so that people can use it a bit like perl5?
audreyt then that something can define "as Scalar", which is what $ calls. 11:03
same way that +$foo calls $foo's "as Int".
Arathorn ok
doesn't $ just return the invocant slot of the Capture object, though? 11:04
audreyt that is what Capture defaults its "as Scalar".
11:04 TimToady joined
audreyt granted, it is somewhat difficult to imagine other uses for it 11:05
Arathorn ah, right
audreyt however, the term $() means $($/) 11:06
I mean, the prefix $ defaults to CALLER::<$/>
as @() and %()
wolverian wait.. we're stealing AJAX too now? :)
theorbtwo So $($foo) and $$foo mean completely different things? 11:07
audreyt theorbtwo: no, completely the same thing.
+($foo) vs +$foo.
wolverian: I think "Str as Scalar" is not defined
but you can define it as 11:08
"document.getElementById($?SELF)"
and write $("moose)"
er $("moose")
in your program
wolverian oh, we're adhering to the DOM? great!
audreyt whether it will make Perl6 a better Rails DSL platform remains to be seen ;) 11:09
Arathorn that's rather sexy
audreyt rather insane too :) 11:10
so, to summarize, I think prefix sigil casters are not as useful as circumfix \() and :() 11:11
they are sugary for various misc. purposes
and fit the general feeling of prefix casters 11:12
+ ~ ?
xinming and can :-) be prefix?
audreyt but if there are better uses for them, I wouldn't mind losing them
maybe. :) 11:13
theorbtwo xinming: If you want to define it, sure... I think. Make sure you let it be :) too, though, or you'll confuse people... 11:14
xinming hmm, If so, I think we might be able to write a macro to replace :-) into $, and then... We will work happily every day...
lichtkind ?eval do{ return 2; 1;}
audreyt I'd suggest using the unicode symbol
evalbot_10037 Error: cannot cast from VUndef to Pugs.AST.Internals.VCode (VCode)
audreyt U+263A U+263B
lichtkind: here I get 11:15
pugs> do{ return 2; 1;}
*** cannot return() outside a subroutine
I don't know why evalbot is confused.
lichtkind thanks audrey
xinming lichtkind: IIRC, you should use leave instead of return. :-)
11:15 nirgle left
lichtkind ximming but leave leaves no return values :) 11:16
Arathorn is $("moose") equivalent to %($/)<moose>?
uh, $($/)<moose> even 11:17
Arathorn tries to work out where the literal "moose" actually goes
xinming lichtkind: eg... my $a; $a = do loop (;test_statement;) { };
audreyt Arathorn: nonono
Arathorn: $("moose") is just that.
prefix:<$>("moose")
the only thing here is that
$()
means
xinming lichtkind: LW said it we should use leave to return the value...
audreyt $($/)
11:18 kane_ joined
audreyt by virtue of a default argument 11:18
xinming lichtkind: because if we use return, It will exit the sub...
Arathorn oh!
xinming hmm, not sub, the block...
Arathorn so you're making a method call to the invocant of $/, with "moose" as a single positional arg?
audreyt supposedly you can use leave with return values
Arathorn invocant in $/, even
audreyt leave Block <== 1,2,3; 11:19
but nobody would be on the other side to receive 1,2,3
so there's little point.
lichtkind xinming now i understand but do blocks you cannot leave prematurly?
audreyt Arathorn: sorry.
theorbtwo $() means $$/. $('foo') is infix:as('foo', ::Scalar). $/<foo> is postcircumfix:{"<",">"}($/, 'foo').
audreyt $(ANYTHING) means just that.
$() means $$/ only when there is nothing.
clkao what is $/ ? i assume it's diffferent from perl5 11:20
xinming lichtkind: perl can goto hell; :-)
audreyt proto prefix:<$> ($thing? = CALLER::<$/>)
clkao: it is something I'd like to see renamed to $?MATCH but not getting it :)
xinming lichtkind: hmm, I mean use goto...
theorbtwo clkao: It's the container of perl5's $1..$n, and the like, and such, and soforth.
lichtkind xinming hehe yeah but thats seems the only option :)
audreyt clkao: it is the previous result of ~~ against rules. 11:21
usually a Match object, which isa Capture object.
xinming lichtkind: No, there are other choices.
lichtkind: I think leave is for this purpose maybe...
lichtkind lichtkind: perl can goto hell; :-)
shit
wolverian $perl->can(goto => "hell") 11:22
audreyt theorbtwo: actually I suspect that $/<foo> is postcircumfix:{'{', '}'}($/, 'foo')
theorbtwo You can do sub {...}->() instead of do{...}, and get full sub semantics. Er, in perl5, that is.
audreyt theorbtwo: and there is a macro postcircumfix:{'<', '>'} that rewrites the call.
theorbtwo audreyt: Er, right. Whoops.
lypie ruby.can(keep_being=>:really_slow);
xinming thinks he should use perl 6 can goto hell...
audreyt lypie: I hear that YARV is fast 11:23
xinming lichtkind: dev.perl.org/perl6/list-summaries/2...02-07.html
theorbtwo xinming: Return always returns from the innermost block with the word "sub" at the beginning. leave returns from the innermost thing that can return... I think.
lypie audreyt: its not
audreyt too bad ;)
lypie audreyt: based on the benches and on the theory. it can never be fast
still just "an interpreted language"
xinming theorbtwo: yes, that's what I think also. :-)
audreyt but it's not YARV's fault by rather VALUE*'s
lypie audreyt: yarv can't even perform inlining 11:24
without inlining there is no such thing as performance :)
audreyt I thought it has AOT _and_ JIT
Arathorn battles his mental block in the hope that it may help anyone else solve the same mental block... 11:25
so $("moose") just returns $moose?
audreyt no.
Arathorn meh - sorry :(
audreyt $("moose") is an error ;)
lypie audreyt: /join #yarv
oops
audreyt: sorry. ignore that
audreyt I'm already there :)
Arathorn ah. 11:26
lypie that was what /i/ am pmeant to do :P
s/pm/m/
lypie gives up
theorbtwo Assuming you don't define it to do something else, that is.
lypie coffee time?
audreyt $("moose") means casting a string into a Scalar
which isn't really interesting or possible, as a string really doesn't have a scalar storage somewhere in it
it can of couse be defined to return itself
essentially making it a shorthand for scalar("moose")
but I think that's confusion. 11:27
so, an error is probably saner.
but if you supply a definition
so that it returns (say) an AJAX snippet
then that's fine ;)
theorbtwo Or it could be defined to do CALLER::$($argument), if you wanted to be evil.
audreyt yes, or that.
but thankfully you need to "env $moose" 11:28
otherwise it's not visible without runtime-specific backdoor functions
(which I'm sure will exist.)
lypie audreyt: i dislike the basic premise of writing a new runtime in anything other than the dest lang
theorbtwo lypie: You think assemblers should only be written in machine language? 11:29
audreyt lypie: that line of thinking usually only applies to languages that can be optimized statically.
like, writing perl5 interpreter with perl5 is insane.
and metacircular scheme interpreters isn't really popular in production.
xinming lypie: the first assembler is written in machine language... and after that, we can use the tools "people" invented... 11:30
lypie xinming / theorbtwo: i grok this. sorry
11:31 b_jonas joined
lypie audreyt: maybe i'm just a dreamer :) until i've failed i can't bare to think its not possible 11:31
xinming what does grok mean BTW. :-)
lypie xinming: understand, but at a deep level
xinming lypie: thanks 11:32
lypie xinming: www.urbandictionary.com/define.php?term=grok
audreyt it stands for "gestalt resonance of knowledge"
(or maybe not.)
lypie (that makes sense)
audreyt afk for real. bbiab 11:33
b_jonas also in the jargon file: www.science.uva.nl/~mes/jargon/g/grok.html 11:35
lypie nice ref
lypie hasn't read that for years
audreyt: what i recall of yarv was that there was not yet aot/jit. tho i'd really love a correction to be honest... 11:37
lypie also goes "afk" (aka, working)
dakkar is back (gone 00:42:01) 11:42
audreyt TimToady: can we get := becoming statement level? 11:45
nested := introduces parsing ambiguities.
\$x := \$y := $z
*@x := *@y := @z;
TimToady: desugaring two special forms from one text chunk neccesitates saving-buffer-then-parse-twice 11:46
something that is unnatural in p6
being statement level and always have no return value would help. 11:47
(in other words, the infix:<:=> macro wouldn't compose well with any other regular things) 11:48
(as it foces :() on lhs and \() on rhs)
theorbtwo So $a := $b is now :($a).bind(\($b)) ? 11:49
audreyt yes.
TimToady: in any case, parsing 11:51
$x where {3} := $y; 11:53
without backtracking 11:54
is interesting
and I also see that you specced
$ := moose();
form
I wonder if reparse is unavoidable there 11:55
or if we can make Signature syntax always also valid perl6 surface syntax.
s/surface/expression/ 11:56
also 11:58
theorbtwo What would $ := moose() do?
audreyt ($x : $y : $z) := (1,2,3)
theorbtwo: it would assert that moose returns at least one thing.
(and otherwise has no effect.)
theorbtwo Hm.
audreyt actually, exactly one thing.
theorbtwo You can always use explitic calls to :(), \(), and bind for the ones that aren't valid expressions. 11:59
audreyt yes.
but those nonvalids is currently part of S06
(see "twodogs")
which makes them valid, de jure
I merely wonder how we can parse them without rescanning.
especially if := is made infix.
as it is an usual infix macro that modifies parsing of LHS 12:00
(RHS is fine.)
theorbtwo Ah.
audreyt so, two problems 12:01
one is that x:=y:=z involves "y" punning
which is Bad Thing and should never happen in p6
another problem is
long...expression...here := moose
the long exp may be invalid p6exp but valid p6sig.
and how to parse that without prescan.
theorbtwo It's not x := (y := z), or (x := y) := z, but (x := y) and (y := z) ? 12:02
Does :(...) := ... make sense now, or could that be used to disambugate ?
audreyt it makes sensenow, unfortuately
:($x, $y) := Dog.new(x => 1, y => 2) 12:03
would bind 1 to $x and 2 to 4y.
$y
it's called, structural unpacking.
ayrnieu destructuring-bind 12:04
theorbtwo Um, funky...
audreyt very useful for writing tree matching :) 12:06
pmichaud: your input would also be welcome :)
(on matching SIG := ...) where SIG is an invalid p6 expresisno but valid p6 signature
) 12:07
theorbtwo BBIAB.
audreyt (one easy way out is forcing people to write :(SIG) := ... always, as theorbtwo observed) 12:09
and ordinary LHS := ... will simply take LHS to be an expression
and cast that to Signature at runtime.
and strucutral unpacking would be :( :(...) ) := b... 12:10
s/b//
I can't seem to find any other way out... suggestions welcome.
dakkar why 2 nested Sig object in that LHS?
audreyt dakkar: the outer one is Sig form
the inner one indicates a structural unpacking
see S02, Unpacking tree node parameters. 12:11
much like
[$x, $y] := foo
wolverian audreyt, do you happen to have any opinion on the best method of doing multitasking in perl5? :)
audreyt is very much ambiguous, and I think is better written as 12:12
:( [$x, $y] ) := foo
but maybe I'm missing something.
dakkar unpacking by assignment is done by :($x,$y)=expression_that_returns_hash() ?
(or something like that)
audreyt no, bind to expression that returns hash. 12:13
or rather
clkao ETOOMANYCOLONS
audreyt bind to a hash-ish invocant.
clkao: indeed
dakkar can unpack only with binding? not with assignment?
12:13 kolibrie joined
audreyt so maybe reparse is valid as long as LHS is valid expression? but it may trigger any number of macros 12:13
dakkar: yup.
dakkar stupid question: why? 12:14
audreyt because with binding the RHS preserves the structure
so you can say
sub f (Tree :($left, $right), Dog :($head, $tail) ) { ... } 12:15
f(tree(), dog());
as well as
# ignoring the reparse problem, according to current spec
(Tree :($left, $right), Dog :($head, $tail) ) := (tree(), dog());
whilst if it's assignment
the (tree(),dog()) would lose their identity 12:16
another example:
($x) := (x => 4); # binds $x to 4
($x) = (x=>4); # no way to recover $x 12:17
12:17 Limbic_Region joined
dakkar can I write :($head is copy, $tail)=give_me_a_list() ? 12:17
audreyt I suspect not, otherwise we are back to parse the list 12:18
dakkar s{=}{:=}
audreyt for Pair objects
oh
:=
dakkar sorry
audreyt so, according to the current syntax
give_me_a_list would need to return a hash
{head => 'moose', tail => 'foose')
}
for that to work
you probably really want
[$head is copy, *@tail] := give_me_a_list; 12:19
which would indeed work, if it returns a single list (or array) object.
dakkar yes, that one.
'binding' sounds to me like perl5's glob assignment... sharing of the container and stuff...
audreyt *nod*
dakkar so, in that last line you wrote, @tail would be a read-only alias to the rest of the list? 12:20
audreyt that's the idea, yes.
broquaint wonders how hard it would be to implement globs in perl6 ...
theorbtwo thinks the answer is /entirely/ too easy. 12:21
audreyt easily, just subclass Capture
and add a CODE, an IO, and a FORMAT slot.
dakkar ':=' has the same semantic as parameter-passing in a sub call, right?
audreyt dakkar: right, except lhs has no implicit "is readonly". 12:22
broquaint And I imagine adding a sigil would involve a bit of macro magic.
audreyt yeah. it involves defining
dakkar I think that the explicit 'this is a Signature' :() on the LHS of := is good documentation 12:23
otherwise reading expr_returning_a_sig() := something() is *way* ambiguous...
audreyt macro term:<|> is parsed / \| <name> / { Perl6::AST::Var.new(~$/) } 12:26
that would allow |var to start acting as a variable name.
12:27 elmex joined
audreyt (presuming the p6ast_draft nodes and a Perl6::AST package to hold them.) 12:27
audreyt likes it that there is much less hand waving around here :)
dakkar: indeed, I think LHS := RHS should always parse LHS as expr 12:28
and then evaluate into a sig
via casting if needed
to continue allowing
$x := $y
working
dakkar there is not enough context to disambiguate in the case of complex LHS, otherwise...
audreyt yeah, that's what I just observed... 12:29
b_jonas isn't that the same as with assignment? you have to parse the lhs without knowing it's an lvalue
lichtkind ?eval sub b {leave 2; return 1};b;
audreyt b_jonas: no, lvalue parses same as rvalue.
evalbot_10037 Error: No such method in class Int: "&leave"
Barry Is there an alphabetical index of Perl 6...um...functions (or whatever they're called) that includes := so someone could look up "colon" and learn what a := does? I'm not a beginning to end tech book reader.
b_jonas yes, because it has to
perl makes them the same 12:30
audreyt b_jonas: but sig doesn't parse same as expr.
lichtkind barry i just begun to make such an index
audreyt there are valid sigs that isn't valid expr
$,$,$ comes to mind.
b_jonas yes, that's the problem
Barry Bless you
audreyt *$,*@,*% another.
there are also valid exprs that isn't valid sig, or at least doesn't mean the same at all. 12:31
[BEGIN{ die 1 }] comes to mind.
lichtkind ?eval sub b { return 1};b; 12:33
evalbot_10037 1 12:34
lichtkind ?eval sub b { leave 1};b;
b_jonas I have once written a bison parser where I had to convert lvalues to rvalues at the first point where it became clear that they can't be rvalues
evalbot_10037 Error: No such method in class Int: "&leave"
b_jonas or, failing that, when they were used as rvalues
but that woul work only with a simple language
where such a conversion is easy to write 12:35
broquaint I'm a bit late to the Capture party, but \(...) returns a Capture right?
audreyt broquaint: well, it is a Capture literal
not really a call to prefix:<\>
theorbtwo It's not?
audreyt it's macro circumfix:<\( )>
but yes. :)
theorbtwo: it's not. 12:36
theorbtwo Er, right.
broquaint Ok. So \() no longer returns a list of references?
audreyt broquaint: right.
broquaint Marvellous.
b_jonas I needed all kinds of rules to convert different (grammatical) kinds of lvalues to rvalues
audreyt :D
b_jonas: yeah, if there is an universal translator fom p6 exp into signature
and make sure that signatures are a strict subset of p6 exp
much as lvalue is 12:37
b_jonas yes, that's why I said it's a problem
audreyt then the specced form would work
b_jonas I needed a rule to convert '[a, b, ' to an rvalue if the value after the comma was an rvalue itself
audreyt currently valid Sig forms that are not valid Expr forms:
Dog ::T $fido 12:38
b_jonas and a rule to convert an lvalue array '[a, b, c]' to an rvalue
audreyt --> Moose
b_jonas lots of duplications
audreyt $moose?
lypie returns
broquaint Although the pseudo-hash-ness of Captures seems a little dangerous. But I'm probably just being too suspicious.
audreyt $top ($left, $right)
broquaint s/a little dangerous/potential confusing/
12:38 Barry left
audreyt broquaint: pseudohash shares same set of underlying data. 12:39
broquaint: positional and named zones in Capture are entirely separate.
:)
broquaint They feel a little too close to PHP's associative arrays. I think that's where this discomfort comes from ;)
audreyt mm, I fail to note the similarity 12:40
b_jonas Captures sort of remind me to lua tables. these are just hashes, but are internally implemented in such a way that if they have integral keys, than array operations are fast on them 12:41
broquaint It's just a visual similarity.
None of the ickiness of: $a = array("one","two"); $a[0] === $a[one]
$a[1] === $a[one] # even 12:42
audreyt \(Body: :bgcolor<black> :topmargin(3) \(A: :href($url) 'Body Text'))
in this example, the [0] is the inner "A" capture
b_jonas audreyt: is Body the invocant there?
audreyt [0][0] is 'Body Text'
12:43 tifo joined
audreyt [0]<href> is $url 12:43
b_jonas: yes.
presumably a predefined type name
b_jonas ah, nice example
audreyt maybe we can call them X-expressions
;)
b_jonas and how would you use such a capture
I mean would you use it for calling a function or just access its individual elements? 12:44
audreyt say that is in $node 12:45
you can call
foo(*$node)
12:46 Southen joined
audreyt class Body; multi method foo (:$bgcolor where /black|blue/, *@children) { ... } 12:47
and maybe draw things based on other attributes
using the wonder of multimethods
broquaint Is there anything that perl6 can't do? 12:48
In theory?
audreyt solving the halting problem?
theorbtwo audreyt: BTW, don't write HTML element names with caps, please. 12:49
audreyt noted, but then lowercase classes are unboxed in p6
theorbtwo Hm, point, I suppose.
Should probably all be HTML::body, etc. 12:50
audreyt \(<body>: style => 'moose');
b_jonas theorbtwo: q is a reserver word, and link is a function
wolverian wouldn't the stringification handle it?
audreyt it even reads like xml ;)
12:50 azuroth joined
audreyt \(<link>: :href<moose.org/>); 12:50
b_jonas but I don't see why you'd need multi methods. don't you just need one method per class, like one in Body, one in A, etc? 12:51
audreyt b_jonas: oh sure.
the multi is for
:$bgcolor where 'black'
b_jonas hmm.
audreyt i.e. if you want to do different things based on only on invocant
but on values of certain args.
if the invocant is the sole discriminator
then ordinary methods would do fine. 12:52
wolverian where'd css go? :)
b_jonas css would be translated to multi methods
like 'table #big [bgcolor="red"] { font-size: 18px }' would become 'class Table; multi method foo(:$bgcolor where /red/, :$id where /big/, ...) { $.font_size = 18*px; SUPER.foo; }' 12:54
audreyt actually, SUPER is going away 12:55
it's now simply
next METHOD;
wolverian b_jonas, ah. right
except please change the bgcolor to something semantic in the example :)
audreyt or, even golfier:
call;
nothingmuch lypie: you should mail me daily to mail you daiily ;-) 12:56
b_jonas and with next METHOD, how do you change the arguments?
audreyt you can't
so use call.
nothingmuch lypie: seriously, it's a todo tracker... just add an item =)
audreyt call; # default to original arguments
call(); # calls with zero arguments 12:57
wolverian that's icky
b_jonas because I really want to add :font_size(18*px) to the arguments
audreyt (see S12)
12:57 theorbtwo joined
wolverian I mean, doesn't that make it a special case? 12:58
audreyt nope.
12:58 xinming joined
audreyt the signature for call is 12:58
lypie nothingmuch: hehe 12:59
audreyt proto call (*@; := CALLER::<@;>) { ...dispatch with *@;... }
13:00 particle_ joined
audreyt that is another thing that needs FAQ for :) 13:00
(see S12, Zero-dimensional argument list)
b_jonas now that's wierd 13:01
dakkar what's that semicolon for?
audreyt the semicolon twigil indicates a Capture with multiple named and positional sequences. 13:02
a Capture is ordinarily
invocant, positional, named
but it can actually be
invocant, (positional, named)*
to use regex notation
dakkar argh 13:03
audreyt that is, ordinarily a Capture has one set of pos/nam
but in bad times, it can have several.
zip(1,2,3;4,5,6;7,8,9)
shows an argument list of three sets of pos/nam
dakkar I parsed *@; as splat - array - end_statement ...
audreyt each one populated with 3 positional elements.
yes, me too, I think the choice of ; is weird 13:04
dakkar it's the "same" semicolon as in the C-style for...
broquaint Can you access the current function's Capture? e.g sub foo(This $a, That $b) { caller(0).args.delete('That') } # or summat
audreyt but then, it works in practice, so why not :)
broquaint: you can only do that in the sig.
otherwise it defeats optimization.
sub foo (\$args:(This $a, That $b)) { ... } 13:05
broquaint You can only do what in the sig?
Aah.
Nifty.
13:05 autark joined
audreyt so, back to this multiset thing. 13:05
b_jonas so if you say foo, then foo gets zero (pos,named) pairs? 13:06
but with foo(), it gets an empty one
audreyt yes.
ordinarily they don't differ at all.
for all Sigs that doesn't have *@;moose in it, it's entirely the same.
for Sigs that does have *@;, however, you can discriminate based on +@;moose. 13:07
b_jonas and I guess, if you want to call a subref with no (pos,named) pairs, you have to say something like $subref.call
audreyt note also that @;moose contains Capture objects with empty invocant part.
yes.
lypie audreyt: honestly i shouldn't join this channel... i feel like working on rubydium again :/ 13:08
theorbtwo So how do you get the positionals from the second set in :(1,2,3;4,5,6) ?
audreyt you mean \(1,2,3;4,5,6)
13:08 Qiang joined
audreyt ordinarily, if you bind it to say *@_ 13:08
it behaves identically as \(1,2,3,4,5,6)
which is to say, @(\(1,2,3;4,5,6)) is just (1,2,3,4,5,6). 13:09
theorbtwo Er, yes, I do.
audreyt nonordinarily, if you really want to distinguish
you bind it to *@;moose
and @;moose[0] would be \(1,2,3) 13:10
@;moose[1] would be \(4,5,6).
the twigil is where this behaviour happens
not the name 'moose'
(ok, that part of explanation is maybe unneccessary.)
13:11 amv joined
audreyt lypie: why is that a bad thing? 13:11
lypie audreyt: because it left me with no social life :P
audreyt Arathorn: are you still up to, er, capture this into Capture.pod? 13:12
svnbot6 r10038 | arathorn++ | Add elucidation from audrey on how Captures work in the context of
r10038 | arathorn++ | Rules, and how they can be used as a natural data type for XML-style
r10038 | arathorn++ | annotated nodes with children. Summarized from:
r10038 | arathorn++ | colabti.de/irclogger/irclogger_log/...l=212#l318
audreyt or someone else can take care of this?
Arathorn svnbot6 says all ;)
audreyt (everything above is fully specced in S06 and S12)
lypie lol
timing+++
audreyt Arathorn++
Arathorn that said, i've only summarized the initial part there
and probably mangled it fairly badly 13:13
audreyt looks fairly good actually
Arathorn++
theorbtwo Er, speaking of -- does svnbot6 miss merges from the svn.perl.org repo, or is there some deeper magic?
audreyt theorbtwo: the deeper magic is that the automerge is currently broken and I havn't got cycles to investigate strange svk merge-base errors. 13:14
I suspect per-file merge tickets isn't quite what I imagined them to be.
theorbtwo Ah.
Arathorn audreyt: not sure i totally grok the '$ calls "as Scalar"' -> document.getElementById($?SELF) -> $("moose") AJAX/RoR magick yet, so i'm going to hold off confusing Capture.pod still further 13:22
(and also $job prolly wants me back, for better or worse :)
audreyt :) 13:29
I think the @;parallel thing is more interesting
as in, makes more interesting question 13:30
the AJAX magick probably doesn't belong in FAQ :)
FMTYNTK, maybe.
Arathorn far more than you...? 13:37
particle_ need to know 13:38
Arathorn got NTK ;) 13:39
just checking i'd filled in FMTY right
audreyt (it's better known as FMTYEWTK)
particle_ oh. yes.
Arathorn ah, that's more familiar
Arathorn sues google for not doing a "did you mean to type: FMTYEWTK" :) 13:40
audreyt it does that if you do FMTYENTK
I did it just a few secs ago :)
13:50 vel6608 joined 13:51 fglock joined
audreyt journal up (awfully short this time) 13:59
good night :)
&
hm, maybe I should p6l my := question lest it's lost in huge scrollback. 14:00
lypie reads journal
14:03 pmurias joined
pmurias hi 14:03
theorbtwo Hi, pmurias.
You just missed audrey.
fglock audreyt: how do I get the text matched, if ${$match} returns the capture instead? 14:07
dakkar ~$/ (from one of the examples passed here) 14:08
audreyt fglock: what dakkar said 14:09
or hm
less confusingly, maybe make it a method? 14:10
usually the result object is simply the string
but in parser combinator mode it's the AST
theorbtwo Apparently, you didn't so much miss audreyt, she's just IRCing in the background.
audreyt maybe you can put the text matched into the AST and make that stringify as the source string. 14:11
fglock: btw, $rv is still the Match
$$rv is the Moose
it used to be $rv()
but then, specifying a code deref that you can't ever pass in anything feels weird 14:12
it was chosen to be .() simply to allow the $() shorthand to mean $/()
but now $() means $($/), and we get @() to mean @($/)
and %() to mean %($/)
so the original motivation goes away, and it doesn't need to be .() anymore,
so maybe the source fragment is better made available as $match.source. 14:13
clkao audreyt: what automerge breakness? 14:14
pulling file changes?
audreyt system("svk sm -m '' -I -l $path/S$k.pod //mirror/pugs/docs/Perl6/Spec/$v.pod\n");
single file sms
clkao hmm. ok let me take a look 14:15
which one is supposed to be merged?
audreyt the ticket reads
3eb29b82-81e5-0310-bad4-b280dcad658b:/doc/trunk/design/syn/S10.pod:8453
on docs/Perl6/Spec/Package.pod
clkao *nod*, you can do sm -t file.. but i mean which has changes
and fails to merge
audreyt Cannot find the path which '//mirror/pugs/docs/Perl6/Spec/Subroutine.pod' copied from. 14:17
this is with:
svk sm -m '' -I -l -t //mirror/pugs/docs/Perl6/Spec/Subroutine.pod
clkao doh, of course. me stupid
audreyt but if I use 14:19
clkao audreyt: r11638 is manual merge.. no ticket 14:20
"svk sm -C //mirror/p6-doc/design/syn/S10.pod Package.pod" gives me a 'g'
and the new ticket looks fine
audreyt svk sm -m '' -I -l //mirror/perl6/doc/trunk/design/syn/S06.pod //mirror/pugs/docs/Perl6/Spec/Subroutine.pod 14:21
I got Can't find merge base for /mirror/perl6/doc/trunk/design/syn/S06.pod and /mirror/pugs/docs/Perl6/Spec/Subroutine.pod
This is svk, version 1.07.
clkao oh fun. depot path doesn't work, but copath works
audreyt same for Package and S10 14:22
oh, what fun.
that a bug?
clkao wait
i was merging 10 -> sub.. wrong
wfm 14:23
audreyt with repopath?
clkao yues 14:24
audreyt svk 1.99?
clkao 1.07
audreyt :/ 14:25
clkao weird
14:25 mncharity joined
clkao s06 -> sub gives me conflict though 14:25
audreyt ok... maybe you can run the mergeloop?
14:25 mncharity is now known as putter
audreyt putter: hey! 14:25
ltns!
putter hi :) indeed... life. 14:26
audreyt putter: I've been holding off re::override release and such :)
putter p6 progress! !:)
lol
hmm, have some month+ old doc I could check in... someplace. but i'm thinking less-than-ideally fruitful development path, no? 14:27
audreyt I still think it's an useful interface. 14:28
clkao audreyt:
r11638 (orig r9989): audreyt | 2006-04-17 18:51:16 +0100
* Perl6::Spec - update to upstream r9741
audreyt that's by hand 14:29
clkao you don't really mean 9741... can you lookup the actual remote rev
so i can fix the merge tickets
audreyt you mean actual remote rev for each pod?
clkao no just that r9741 14:30
putter the re:override, certainly. but the underlying "let's reverse engineer some version of perlguts and try to magic an api where one wasn't intended"... less so.
clkao 'cause latest in p6-doc is r8874
so maybe it's your local rev
audreyt it's just typo
8741
sowwy 14:31
putter anyway. is there a cleanish "code as spec" of OPP existant? anything close?
clkao k
audreyt closest is still PGE/OPTable.pir.
putter shudder
theorbtwo Other People's Problems have a specification?
putter :)
audreyt ok, try
misc/pX/tewk/Ruby-Rules-Parser/OpTable.rb
it's ruby, should be clear ;) 14:32
but the algorithm in PIR land has changed (definitely for the better)
putter a pig in the sun is easier to see than a pig at night, but...
audreyt pmichaud merged all four tables into one
because as more distinguishers appear 14:33
four tables threatens to evolve into 8 and 16
so it's now a bitmap "mode"
putter hmm, operators and terms merged?!?
audreyt as you can see in my .h.
now a "expects" mitmask takes over.
#define PGE_OPTABLE_EXPECT_TERM 0x0010
#define PGE_OPTABLE_EXPECT_OPER 0x0060
#define PGE_OPTABLE_EXPECT_TERMPOST 0x0050
clkao there's weird conflict... is it line-encoding or stuff
putter wists for a high-level spec 14:34
audreyt putter: that is actually what I'm trying to start doing with C.
dakkar this is the second time I seen 'wist' used as a verb...
audreyt src/Text/Parser/OpTable.hs is very high level.
same algo as the ruby one
theorbtwo
.oO(If you wist upon a star, doesn't mawter where you are...)
putter whists even
audreyt not exactly friendly though, all the use of implicit parameters. 14:35
putter I was thinking p6. or rb. or even p5. OOy. clarity over performance. no bitmasks :)
dakkar theorbtwo: always thought that was 'wish' (never seen it written down, and English is not my native language)
theorbtwo dakkar: It is. It was a joke.
dakkar ow
audreyt I think C is the correct level here. I thought D is far saner because it has easy and fast hash/array with full OO
putter: this is not a very OO problem though :) 14:36
i.e. very little identities
s/little/few/
anyway, p5 has one 14:37
misc/pX/Common/Pugs-Compiler-Precedence/lib/Pugs/Grammar/Precedence.pm 14:38
codegens to Parse::Yapp
not OO at all
putter not entirely joke. just very very archaic - 65.66.134.201/cgi-bin/webster/webst...28=wistful
but making a comeback! :)
audreyt quite mature: fglock bases PGP6 on it.
putter but, it's wist, not whist. sorry
audreyt so, take your pick :)
integral wistful is archaic?!
putter no, wist 14:39
audreyt: thanks
audreyt (I really want C for something that can be shared, but that may be just me :))
and with Judy, it's asif I'm programming in D :)
pmichaud tis me also :-)
audreyt pmichaud: hey :)
putter re not oo, I just want a spec. a nice clean spec. C!=spec. nor pir. 14:40
obra (PGP6, audrey?0
audreyt obra: Pugs::Grammar::Perl6
obra ah. ok.
audreyt putter: I wonder if pmichaud can be bribed into annotating OPTable.pir with literate-style comments
that can then pod2html into spec. 14:41
putter C great for implementation, esp sharing. great thing. perhaps easier to write with clean spec in hand. perhaps easier to read too.
pmichaud audreyt: that's in my plans
depending on what one means by "literate-style comments" :-)
putter lol
pm++
audreyt :)
pmichaud as it is I had to re-do the stoptoken code this morning (not ci'ed yet), and I'm re-examining the handling of close tokens 14:42
audreyt ah, so still somewhat in flux... POD can definitely help then
(to track algo changes)
pmichaud well, it keeps fluxing because the language keeps fluxing. :-) 14:43
getting long dot to work took a bit of thought
oops, phone
putter second question... how goes the pugs grammar non-bt overhaul?
audreyt putter: it compiles, it parses sanities 14:44
runs sanities
it does _not_ parse Prelude
which is why I'm not checking it in.
putter how different from the current Parser.hs is it? I could use a reference grammar.... hopefully later today... 14:45
audreyt er, I posted a diff
in my blog
putter err, I meant, hopefully I'll be at the point of needing it, not, hopefully you will have done it ;) 14:46
audreyt oh. heh
we are still pondering how best to do this reference grammar thing.
theorbtwo wonders /what/ this reference grammar is.
Is it a perl6 grammar for perl6, without any implementation-specific details? 14:47
audreyt I still think compiling Parsec into Rules, turning the midstream tree munging into miniperl6 embedded, is sanest.
theorbtwo Ah. Yes, it is.
putter ah, there it is (the diff) 14:48
ok, np 14:49
PerlJam audreyt: nice question to p6c
audreyt PerlJam: thx. I try to make miniperl6-embedded a strict subset of p6 14:50
by exposing the p6ast nodes asis
but the Bind node has nontrivial surface form
and parsing them back is rather hard.
in any case, I'd welcome pairing on optable.c and/or extracting a spec out of OPTable.pir this weekend... hopefully with pmichaud's latest batch of edits factroed in 14:54
good night for real. 14:55
:)
&
putter oh, good night audreyt, thanks for your help 14:56
and pmichaud
lunch & hopefully back sometime this week. (lnog lunch) 14:57
lichtkind ? eval if not 0 {1} 14:58
dakkar ?eval if not 0 {1}
14:58 evalbot_10037 is now known as evalbot_10038
evalbot_10038 1 14:58
lichtkind thanks dakkar time to sleep 14:59
pmichaud good morning, PerlJam :-) 15:00
pmurias it's not proper ruby 15:05
sorry 15:06
theorbtwo G'night, lichtkind. 15:07
lichtkind thanks
15:07 lichtkind is now known as lk 15:10 pmurias joined
audreyt wakes up from an epiphany 15:49
pmichaud: ping
pmichaud: if all we have is a single precedence 15:50
and you have a populated tokentable space in various categories
surely it is possible to write out a non-backtracking Rule that parses as efficiently as OPTable?
stevan hands audreyt a glass of warm milk and sends he back to bed ..... it was just a bad dream honey, its okay 15:53
audreyt pmichaud: also, currently Pugs has "optional unary" category for eg rand 15:54
where
rand + 1; # this means rand() + 1
rand * 1; # this means rand() * 1 15:56
?eval rand +1000
evalbot_10038 994.0632201018891
audreyt ?eval rand + 1000
evalbot_10038 970.1031268271857
audreyt so, er, it heaves as rand(+1) but rand()*1 15:57
theorbtwo How's that diffierent from a normal unary?
Er, nevermind.
audreyt pmichaud: basically it tests if the next one is valid term; if yes it goes to rand(term); if not it parses as rand OP 15:58
theorbtwo Why does this need a seperate category?
audreyt pmichaud: perl5 does that. shall we?
theorbtwo: it doesn't, it's just prefix with "optional" arity.
but currently PGE::OpTable has no "optional unary" arity 15:59
hence the question.
in any case, I figure that we can compile a level of precedence to
theorbtwo I think it's a generally good idea. I can't think of a case that requires lots of lookaround, just to the next token, I think. 16:00
rand++ vs rand+1 requires more then one character, but only one token.
pmichaud audreyt: PGE::OpTable is supposed to allow optional unary via the "nullterm" property 16:01
prefix:<rand> is nullterm ... 16:02
audreyt ah. but it only makes sense for unary, right?
infix with nullterm bothsides would be fun
pmichaud and listfix
audreyt as is listop
yeah
pmichaud and I think listop allows nullterm
actually, infix can have a nullterm also :-)
audreyt on RHS only? 16:03
pmichaud yes, rhs only I think
but it can still chain
theorbtwo As in 1,2,3,
pmichaud theorbtwo: exactly -- infix:<,> is nullterm
audreyt pmichaud: so, is it possible, assuming a single precedence level, to write out a parse using rules alone? 16:04
TimToady did a sketch of that a few days back here, but incomplete
pmichaud audreyt: I hadn't really thought about it; my suspicion is that it is possible
audreyt putter asked for a spec, and that seems a good spec.
pmichaud: because if you take the highest level of prec 16:05
apply such compile-to-rule to that level
take the result rule as the "term" for next level
then you get a operator precedence parser with no backtracking
into a single topdown rule that should be as fast as the optable one
pmichaud I'm not sure it's "as fast" (more, long explanation) 16:06
originally PGE used a top-down parser for parsing p6rules 16:07
audreyt that is how the current Pugs low-level parser is built, and I originally thought that it can't work with p6rules because that you can't compose several hashes together, and you can't return a partially applied node
but p6 rules can do both now
top-down with no backtracking?
pmichaud yes, top-down, no backtracking
it was much slower than the current prec-parser version
audreyt what was the bottleneck? 16:08
pmichaud I don't know for sure. It could've been a quirk of implementation, plus since it was in PIR there were a lot of sub call overheads taking place
my thinking was the same as yours -- that since there wasn't any backtracking, it shouldn't make a big different. But my experience showed otherwise
s/different/difference/
audreyt mmmm.
but in any case, I think speccing optable with p6rule syntax may be interesting 16:09
16:09 justatheory joined
audreyt even if it runs slower, it can certainly make putter feel much better 16:09
pmichaud I'm fully willing to say it was inadequacy on the part of the programmer. But since TimToady advised that we were going to need a bottom-up parser anyway, it seemed like it was a good idea to use it for p6rules and I got the speed performance :)
audreyt oh right, we'd need a bottom up parser 16:10
I was just wondering if we can do what parsec does and compile it to a topdown parser.
(because in parsec I saw the reverse speed profile)
pmichaud interesting.
audreyt i.e. my hand-rolled Text.Parser.OpTable is no match for compiled-to-topdown parsers 16:11
it might be inadequacy on the part of programmer as well :)
pmichaud I've already started to document OpTable.pir, and I thought I'd give a "theory of operation" section in the pod
but it'll be at least a few days before I can have it really well spec'd 16:12
and I'm still trying to figure out how I want to deal with close tokens :-|
audreyt what was the problem?
pmichaud for some parses using the bottom-up parser, the close token isn't a token 16:13
for example: rx % pattern %
audreyt rx% moose %
pmichaud somehow the literal has to know that the '%' is a close token
because in rx/ %moose% / it isn't
audreyt can you push a local stoptoken? 16:14
and reuse the termination rule
pmichaud hmmmmmm
audreyt basically model the close not as a categ
but a stack of things to stop/ret from
particle_ don't forget balanced open-close tokens 16:15
{ }
pmichaud particle_: yes, I ran into that one last night :-|
audreyt sure, same thing...
particle_ how does perl5 do it?
audreyt because in
pmichaud p5 does interpolation
i.e., it uses a "quoted string"
audreyt if -e rx% moose {purr} % { ... } 16:16
the " {" in {purr is not treated as stoptoken
pmichaud oh, that's no problem, it's embedded in the rx term
the rx term will parse all the way to the closing %
audreyt ok, but suppose it's circumfix <rx% %>
instead of a term 16:17
particle_ if -e rx{ moose {<{>} } { ... } # should work, too
audreyt the same thing shall still happen
pmichaud then the { is within a circumfix op so it also doesn't count
particle_ ah, true
pmichaud at the moment, PGE only considers stoptokens at the "top level" -- i.e., outside of any circumfix ops
audreyt and it seems to suggest that "close" and "stoptoken" are very similar ideas 16:18
as perl6 has no superrightbracket that closes several opens at once.
pmichaud I thought about implementing it as "close", but decided separate was easier for now
audreyt (as in (+ 1 (cdr moose]
pmichaud I think I would probably introduce a new syncat for a superclose 16:19
particle_ :) seems like a good one
pmichaud (not needed for p6, but for a more general solution)
audreyt nod
pmichaud well, lemme see if I can detail the problem. when parsing a rule, the opp calls a <parse_ws_lit> subrule to parse out literals and whitespace 16:20
parse_ws_lit already knows about the standard metacharacters for p6rules, but it doesn't know about any user-specified terminator
16:21 SamB joined
pmichaud so, if the programmer has done rx %xyza% <parse_ws_lit> needs to know that % isn't a valid char in a literal 16:21
it has to get that information out-of-bound, so to speak
s/bound/band
particle_ sounds like a named optional arg to parse_ws_lit
audreyt pmichaud: (as an complete aside, do PGE support <%foo> or <@bar>?) 16:22
pmichaud but then every (sub)rule that will be called from the opp has to be able to handle that named optional arg
audreyt: not yet -- I'm wanting to get lexicals implemented first
audreyt ok 16:23
I just wonder if in <%foo>, rather than ignoring the values
maybe the values mean "is parsed".
pmichaud I thought that was already the case
audreyt no.
it only runs if the values are Code 16:24
not Match
I mean Rule
pmichaud but rules are Code
audreyt method without invocant?
or you mean
pmichaud or one can consider the match object to be the invocant
audreyt /moose/.("moosemoose") 16:25
is legal?
(that's what "rules are Code" would mean to me)
rx/moose/.("moosemoose"), to disambiguate a bit more,
pmichaud my basis is "rules are subs". I would take that to mean that they can be called as subs, and can take parameters. Certainly TimToady has been speaking of them that way 16:26
and I've been implementing them that way
audreyt named rules, for sure.
but rx literals?
(which is what <%foo> would contain)
pmichaud %foo['x'] = rx% moose %; seems a lot like %foo['x'] = sub { moose } ; 16:27
(modulus brackets)
PerlJam greetings
particle_ rx literal is then an anonymous sub
pmichaud right. "rules are subs"
audreyt pmichaud: ok... if that's the case, then it takes Match
to resume the parse state? 16:28
pmichaud I lost the antecedent of "it"
audreyt %foo<x>
i.e. if I do
%foo<x>.('bigmoose' ~~ /big/)
it would continue matching at the 'moose' position? 16:29
pmichaud yes
particle_ kewl
pmichaud at least in the current implementation
audreyt but that is quite unlike what "is parsed" does, iirc
"is parsed" works like
pmichaud I'll quickly admit to possibly being wrong about "is parsed" :-) 16:30
audreyt %foo<x>.('bigmoose' ~~ /<before big>/)
pmichaud ohhh
that's different :-)
audreyt yeah, hence my confusion :)
pmichaud at least, I think of it differently
going back to the original <%foo>
audreyt ok. it does a longest-token match on its keys 16:31
pmurias is it ok to check the beginnings of a C version of Inline::Parrot into misc/pX?
audreyt pmurias: sure!
pmichaud rechecks S05 to verify what he thinks he is going to say
audreyt S05 stupilates that if %foo<x> is a rule 16:32
it's run "as a subrule"
I mean, stipulates.
which seems to me that it will run after the 'big'
particle_ stupilates++
audreyt rather than as in opp, where it run before the 'big'
16:32 saorge joined
pmichaud TimToady and I had a conversation about that last year -- i.e., I asked t he same question 16:32
and I think the result was that it called the subrule at the beginning of the key, not after the key 16:33
16:33 _bernhard joined
audreyt but S05's wording clearly suggests otherwise 16:33
pmichaud or, more to the point, the key was treated as a zero-width match
audreyt I 100% agree with you here
so maybe just fix S05? :)
i.e. in 16:34
pmichaud we decided that because we don't want the called sub to have to do a lookbehind to figure out which key caused it to be called
audreyt If it is a string or rule object, it is executed as a subrule.
which suggests at the end of the match
change it to say ... "at the beginning of the match, treating the key as a zero-width match" 16:35
and maybe on the previous item
the one that says "string"
PerlJam So, in <%foo>, if the keys are rules, what are the values?
pmichaud same as %foo 16:36
audreyt pmichaud: so
pmichaud the difference between <%foo> and %foo is how the keys are treated
audreyt %foo = ('moose' => 'antler')
this will never match?
I have to say
%foo = ('moose' => 'mooseantler')
?
that seems counterintuitive.
lypie hehe
audreyt I'd suggest to treat Str and Rule values separately.
Str matches after
Rule matches before 16:37
makes sense?
lypie audreyt: i love the fact that i return from work and you are still talking while &'ed ;)
16:37 miyagawa is now known as Tatsuhiko
pmichaud I think we should get rid of the "or rule object" in If it is a string or rule object, it is executed as a subrule. 16:37
audreyt lypie: I have evil plans to make opp into a simple compiler that produces rules, and I'm making sure that rules does it :)
pmichaud because if it's a rule object, it's a closure
PerlJam lypie: perhaps audreyt's away cycles are much shorter than normal people's
lypie audreyt: yay evil plans ++++!
svnbot6 r10039 | pmurias++ | the beginning of a C version of Inline-Parrot
audreyt pmichaud: but for normal closures, we don't rollback the parse 16:38
to the begin point
we only do that for rules
normal closures are just run for side effects really
makes very little sense to move to begin-of-parse for them
so I think it's 3 cases
not 2 16:39
pmichaud except if I have %foo = ( 'moose' => &xyz, 'beaver' => &xyz )
then &xyz has no way of knowing if it was called by moose or beaver
16:39 Tatsuhiko is now known as miyagawa_
pmichaud (except lookbehind) 16:39
PerlJam pmichaud: unless whatever matched was implicitly passed as the topic for &xyz
(maybe not the topic, but passed implicitly none-the-less) 16:40
16:40 miyagawa_ is now known as miyagawa
audreyt yeah, that'd be natural. 16:40
pmichaud (not that lookbehind is necessarily bad)
audreyt i.e. the Match obtained by the key
is passed into the closure
which, when treated as a Str, becomes 'moose' or 'beaver'.
PerlJam right 16:41
audreyt but then, I probably don't want to rollback to before m/b.
I prolly only want to do that if I'm a subrule and want a say in whether the parse succeeded or not.
pmichaud but rollback on a closure would only occur if it returned or executed fail somehow 16:42
otherwise closures always succeed -- there's no 'rollback'
I do see the difference with "is parsed", however 16:43
audreyt yes
which is why the cursor shouldn't move to beginning
when the value is Code
but why it should do that when the value is Rule.
pmichaud I don't tend to think of cursors moving in closures anwyay
er, anyway
audreyt I agree 16:44
what I mean is
given
pmichaud %foo can call the closure with the cursor wherever it wants -- the closure doesn't move the cursor -- %foo does
audreyt my %x = (foo => { say "Hi" });
"foofoo" ~~ /<%x>/ 16:45
svnbot6 r10040 | pmurias++ | compiles and runs now
audreyt and
"foofoo" ~~ /<%x><%x>/
should probably both work.
pmichaud in each case, it's the <%x> that decides to move the cursor, not the closure
audreyt yes.
but compare to
my %x = (foo => rx/Hi/); 16:46
"fooHi" ~~ /<%x>/; # this should fail!
pmichaud there's a difference there -- rx/Hi/ has an explicit return
audreyt yes, but <%x> moves cursor back to 0
before invoking subrule 16:47
rx/Hi/
not stay at 3
as with the {say"Hi"} case.
pmichaud why does moving the cursor for { say "Hi" } make any difference?
audreyt "foofoo" ~~ /<%x><%x>/
or rather
"foofoo" ~~ /^<%x><%x>$/ 16:48
if cursor moves back to 0, that will fail
pmichaud it's not the closure that moves the cursor
audreyt if cursor doesn't move back for closures
then it will succeed.
pmichaud in both cases <%x> calls the closure or subrule
if the closure or subrule has an explicit return, then <%x> uses the explicit return to figure out where the cursor should go
if there's no explicit return, then <%x> puts the cursor at the end of the key
audreyt define explicit return 16:49
return 3; # surely not this?
pmichaud foo { return 0; } /
oops
rx / foo { return 0; } /
audreyt but I thought that is the result object syntax.
are we overloading things here? 16:50
pmichaud yes, I'm saying it's much the same thing
audreyt but it can't be
result object doesn't affect cursors
they are orthogonal
pmichaud thinks
PerlJam You guys are confusing to watch :) 16:51
pmichaud what should happen with %moose = ( foo => { return 3; } )
audreyt as currently specced 16:52
the return value for that Code is ignored
pmichaud "foofoo" ~~ rx/ %moose /
audreyt <%moose>
if it is not ignored, I suppose it sets the result object to 3.
pmichaud I'm asking about rx/ %moose /
16:52 amnesiac joined
audreyt ok. 16:53
pmichaud (in this case rx/ %moose / is the same as rx/ <%moose> / I think)
PerlJam A literal reading of S05 would say that the match fails. 16:54
pmichaud perljam: why?
audreyt no way...
it succeeds, and then nothing happens, is literal reading of S05
I think it can safely be extended to mean that the result object slot becomes 3
so $() is 3, and so is ~$/ and friends. 16:55
pmichaud but if we say the result object slot is 3, we should probably also immediately return from the match
PerlJam I'm reading where it says "An interpolated hash matches ..." and the list says closure -> execute, string -> subrule, 1 -> nothing special but succeeds, and "Any other value causes the match to fail."
pmichaud similar to what we do with / foo { return 3; } /
audreyt PerlJam: that is talkign about f==>1.
PerlJam: we have f=>&closure.
pmichaud: I'm less sure. 16:56
PerlJam oh, duh. I misread what pm wrote
audreyt if the user means
foo { return 3; }
TimToady the current S05 description of / %foo / and / <%foo> / is incorrect. 16:57
pmichaud yay! TimToady, our saviour!
audreyt then maybe it's just setting the "foo" named slot
and $<foo> would be 3
not the entire $/
TimToady: whew.
pmichaud audreyt: %foo doesn't capture
(sorry, %moose doesn't capture)
audreyt pmichaud: in that case, it can return from the toplevel match.
TimToady but I haven't backlogged enough to know what you're actually discussing...
audreyt so your interpretatinon would be correct 16:58
TimToady: ok. suppose we have
%foo = (x => /.../, y => { say 'hi' }, z => 'moose');
should
'xxx' ~~ /%foo/ 16:59
fail or succeed?
should
'yy' ~~ /^ %foo %foo $/
fail or succeed?
should
'zmoose' ~~ /%foo/
fail or succeed?
pmichaud audreyt++ excellent examples 17:00
TimToady my current S05 has the last one definitely succeeding.
audreyt I think "succeed" on all of them.
TimToady the first fails because x traverses the first x leaving not enough for ...
audreyt aha, but PGE's OpTable does it the other way
TimToady the third succeeds and leaves the cursor after the first y. 17:01
audreyt by resetting the begin for the "is parsed" rule for easy recognition of what was just parsed.
TimToady *second
audreyt TimToady: the $ assersion would fail then.
TimToady yes
oh, misread the 2nd 17:02
audreyt so it's actually fail, fail, succeed
TimToady I think second succeeds now
pmichaud I'm fine with 2nd and 3rd
audreyt good, that's at least consistent
TimToady in my s5 hash keys are always, always matched literally under longest token 17:03
audreyt now, to look at 1st closer
TimToady current s5 allows rules in keys, but that's bogus
pmichaud TimToady: (just more detail) last year I asked about this -- specifically the case of
audreyt the motivation is for the subrule in value slot to be able to reparse
TimToady consistently the key is the literal prefix to the rule that follows.
and i think the following rule can then assume that the literal has been traversed.
pmichaud %foo = (x => &sub, y => &sub) 17:04
audreyt if it doesn't do that, then it must take the matched part as arg
e.g. sub would receive a Match that stringifies to 'x' or 'y'
pmichaud so that &sub has no way to know what key caused it to be called
audreyt in pmichaud's example above
TimToady I think we can now make that an environment variable or some such.
audreyt $+/ works for that too.
or even preseeded $/. 17:05
TimToady right $/ is implcitly env.
audreyt but in any case, it's harder for subrules to read $+/.
so in
my $rule = rx{ ... };
%foo = (x => $rule, y => $rule);
pmichaud's idea is that the $rule can gein with 17:06
(x|y)
to essentially reparse the match
I find this cute, but a bit inconsistent, but would prefer if a clear wording in S05 is made
(otherwise I can't compile opp to rules :)) 17:07
TimToady another approach would be to have some way for the dispatcher to look at the rule and know whether it wanted the cursor before or after. 17:08
but I still think the default should probably be after.
audreyt so if I go 17:09
%moose := <%foo>
(or %moose := %foo)
in a rule
the subrules/subroutines in moose
gains visibility to $+<foo>
right? 17:10
(is that valid shorthand?)
(or do I have to write $+/<foo> ?)
sorry, wrong order.
/$foo := %moose/
%moose = (x => { say "I matched $+<foo>" }); 17:11
17:11 madero joined
audreyt 'x' ~~ /$foo := %moose/; # says "I matched x" 17:11
sane?
TimToady well $+/<foo> is certainly safer. Maybe we can allow the shorthand.
pmichaud does a called closure have any ability to affect the success of the "match"?
audreyt ok. but the visibility :)
pmichaud: "fail"
PerlJam TimToady: Can't you just use <before <%foo>> if you want the cursor before (if it's needed for individual keys, then it should be placed on individual keys) 17:12
TimToady but I'm not sure the binding to foo has happened yet.
pmichaud right
I don't think the binding has occurred yet if the match hasn't succeeded
audreyt TimToady: why not, though?
isn't a binding a "let" form
which can be backtracked later?
doesn't hurt to do two let in a row
TimToady I'd think if you're binding to %foo then you're inserting key/value pairs, and while you've traversed the key, you have no value yet. 17:13
audreyt sorry, $foo := %moose
not %foo := %moose
TimToady $foo has to contain the entire %moose match then 17:14
pmichaud in (modulo syntax) %moose = ( x => rx / $+<foo> more to match / )
clkao i wonder if all these seem so complicated because i know perl5 too much
pmichaud and then 'x' ~~ / $foo := %moose/
audreyt pmichaud: I think the cursor is already after
and you only use $+<foo> for disambiguation
pmichaud you're saying a subrule value doesn't move the cursor?
clkao if we change the sigils to some funny unicode it might be less confusing ;) 17:15
audreyt I think that's what TimToady says that should happen by default
and if I get visibility of how I matched
pmichaud oh, sorry, I'm making the wrong point :-)
audreyt I care less :)
pmichaud in %mose = ( x => rx / { do something with $+<foo> more to match / )
arrrrgh
audreyt yes.
pmichaud in %moose = ( x => rx / { do something with $+<foo> } more to match / ) 17:16
audreyt yes.
or, if you capture with (%moose)
pmichaud and 'xmoretomatch' ~~ / $foo := %moose /
what's the value of '$foo'?
PerlJam clkao: I think it's confusing because the semantics change from day to day on some things ;-)
audreyt then $+/[-1] gets you the last capture
clkao PANIC 17:17
audreyt pmichaud: inside the rx in %moose<x> it is x
then it's re-letted into 'more to match'
I mean 'moretomatch'
and is what the outside sees
I think it makes sens
TimToady clkao: this is a sausage factory.
pmichaud (I hope you mean 'xmoretomatch')
TimToady not for the squeamish...
pmichaud oh, maybe 'moretomatch' 17:18
audreyt pmichaud: I didn't mean that but come to think about it why not :)
heh
pmichaud decides now would be a good time to be squeamish
audreyt whichever one that's saner
PerlJam "moretomatch" is saner in my eyes.
TimToady how about <key> backs up over the current key? 17:19
pmichaud stepping back for a second, can I get a clarification of how "is parsed" should work then?
audreyt TimToady: sure, that'd work
PerlJam TimToady: Watching audreyt and pmichaud discuss this made me think that we should have <mark> and <rollback> assertions :-)
pmichaud I had been thinking that the keys of a hash would serve as selectors to is parsed rules 17:20
but that the is parsed rule would be responsible for the entire token, not just the part that came after the key
TimToady we kind of do now, given we're probably changing grammar rules not to backtrack by default
pmichaud so, if that's not the case, or if I'm making a connection that shouldn't be made, I could use a clarification 17:21
TimToady that to PerlJam...
pmichaud (btw, I'm *very* glad to hear that hash keys are always literal string matches, that makes me much happier) 17:23
TimToady is parsed is the same way, it's only the args after what would naturally be matched by the macro name
audreyt TimToady: but what of circumfix?
TimToady presumably <key> could work there too.
audreyt it should govern only the part inside 17:24
not including the close, right?
TimToady probably.
if we can automate it.
audreyt what of infix?
TimToady see my reply on p6c
PerlJam pmichaud: and when tries to use <%foo> with rx// keys, should perl tell them to go implement that feature? ;)
17:24 buu joined
TimToady it's illegal as soon as I check in my copy of S05 17:25
audreyt so, infix can't reparse lhs 17:26
TimToady that's what we decided at some point.
audreyt and := would rewrite the AST of lhs
TimToady has to just be normal expr
could 17:27
audreyt if it's :() literal, then it's preserved as is
otherwise it checks "simple"ness
and rewrite as it can
if it cannot... it's an expression and it prays it evaluates to a Signature.
like that?
TimToady It's one of those retro things that humans have a lot less trouble with than the computer.
but I'm inclined to go conservative and say :() is required on anything fancier than a variable list for now. 17:28
clkao mmm sausages...
audreyt the problem goes away if we have a preceding declarator
TimToady like -> :)
pmichaud okay, so the rule portion of an "is parsed" trait doesn't include whatever key(s) might have caused it to be called. Okay
TimToady -> $a := ... 17:29
ouch.
audreyt er no
what I had in mind is scope declator.
let $x := ...;
TimToady what about ::=
clkao the U+8178 operator
audreyt let ($x, $y, ...some sig here) := l...
same goes for ::=.
TimToady temporize to compiler?
audreyt no, bind at compile time 17:30
TimToady let would imply that it's unbound only on failure...
audreyt and temporize at runtime
but I mean, any declarator would fix
my ($x, $y, *@moose) := ...;
and even 17:31
TimToady so we get the lhs of infix macro as a parameter, the macro name is skipped but available as <key> or some such in the is parsed.
audreyt my ($x, $y, [*$hd, *@tl]) := ...;
(this would declare all four variables lexically)
TimToady biab
17:32 stevan joined
audreyt and :() := ... becomes a valid form as well 17:32
but ($x, $y) := foo(); would not be
TimToady ungone 17:33
audreyt but this is more optimized for consistency
I agree for sheer ergonomics, "simple expression" is better.
(but if the scope declarator idea works, then it becomes very easy to explain parameter list) 17:35
sub f ($x, $y) { ... }
is not unlike
TimToady hmm, constant &foo := means &foo ::= maybe 17:36
audreyt sub f (\$_) { my ($x is readonly, $y is readonly) := *$_; ... }
TimToady if declarators influence := time as well as = time.
audreyt *nod*
TimToady state $x := $y at first time...
audreyt declarators are already somewhat magical anyway... 17:37
my ($x, undef, $y) = (1,2,3); # valid p5
TimToady declarators already limit the expression to a subset of signatures, I think, so I don't see a downside.
audreyt so instead of continuing the "undef" trick 17:38
maybe now it can be written as
my ($x, $, $y) := (1,2,3);
yeah, and it's far easier to make rvalues from signatures 17:39
than the other way around.
in rvalue:
@foo = my($x, $, $y) := (1,2,3);
can simply mean
@foo = ($x, undef, $y);
TimToady I'd think that would declare $x and $y in the current scope. 17:40
audreyt sure, extending to the right :)
so actually, if we have 17:41
my $x = my $y = my $z = 4;
it still works all the same
TimToady interestingly, if = and := are listops, then right to left associativity just falls out of it.
audreyt my $x := my $y := my $z := 4
would work as well.
(using the declarator-signature rule) 17:42
TimToady: yeah, parsing them as listops makes some sense
it makes sense for all := instances 17:43
what about
say($x = 3, $y = 4); ?
17:43 ruoso joined
TimToady that's the anti-use case 17:43
particlarly in loop($x = 3, $y = 4; $x; $x++, $y++) 17:44
audreyt I'm find with scalar= being infix and list= infix+listop...
and because := doesn't care
it can always be listop
TimToady that fixes += and friends as well
audreyt or rather CaptureOp
i.e. "is parsed" using capture rule 17:45
TimToady yup
it's just an arglist...
audreyt in nodes without a static context
foo() = 1,3,4
we already say it defaults to list
TimToady yu
p
audreyt so parsing is preditable 17:46
predictable, even
TimToady unpredictable parsing is always odd
audreyt does that mean
my $x = 3;
confer scalar= because of $x is a simple Var 17:47
with $ sigil
but
my ($x) = 3;
confer list= because $x is now parsed as Sig?
17:47 fglock joined
TimToady I think that's what people would expect. 17:47
audreyt i.e. all Sig-declarator form is naturally listop=
and it even agrees with p5.
(without planning for it)
TimToady in particular, since my = happens exactly at the same time as ordinary assign woudl
audreyt right, my point is distinguishing between 17:48
my Int $x = 3;
with
my (Int $x) = 3
TimToady only difference is the context on the right, I think
audreyt yes.
so after declarator, we scan for either a very very simple form of type+var 17:49
or a paren, and it's sig inside it
the latter always listop=
17:49 pdcawley joined
TimToady seems good 17:50
audreyt the former might be infix= if the sigil calls for it.
woot!
I mean, yay!
pmichaud this sounds cool
TimToady I'm not so old I can't s/woot/yay/ in my head... :)
pmichaud *very* nice
(assuming I'm understanding what you two are talking about)
TimToady even if I'm still more than twice your age.
audreyt pmichaud: you are :) 17:51
PerlJam heck, even I'm understanding it :)
pmichaud I don't yet understand all of the details of how to make it work, though :-)
PerlJam pmichaud: That's the advantage of mostly being a lurker here ;)
audreyt TimToady: so, Sig would need to function as lvalue
but that's fine, I think it can be made to work 17:52
pmichaud out of curiosity -- the = in "@a = ..." would be...?
audreyt :($x, $y) = 1,2; # should work.
pmichaud: it would be listop= by virtue of @, I think
@a = 1,2,3; # should work
pmichaud same with %
audreyt aye
TimToady righto
17:53 Alya joined
pmichaud and how does the parser distinguish listop= from infix=? I didn't fully grok that part 17:53
TimToady :() = can steal constants but should still copy non-constants
probably
can't quite just translate to :=
audreyt have to pretend it's a lvalue tuple to begin with
and then work from there 17:54
pmichaud: three cases
PerlJam TimToady: copy? I thought it was binding (even without :=, but because it's a Sig)
pmichaud whips out a pen and pape...woops, this is irc!
TimToady my $x = $y doesn't alias
PerlJam TimToady: right, but :() = does. right? 17:55
17:55 fglock left
TimToady my :($x) = $y doesn't necessarilyhave to alias either 17:55
if we make people write
17:55 fglock joined
audreyt pmichaud: once you reach infix = 17:55
TimToady my :($x) := $y to mean that.
audreyt you look at $<lhs> to determine is-parsed of RHS 17:56
you can do that because supposedly the "parsed" rule has access to already committed part
case0: if it's a scalar-sigilled Var or Sym node -- that is, if it's term:<$> to begin with -- then it's normal infix= 17:57
17:57 ghenry joined
audreyt case1: if it's a declarator with no parens, i.e. "my Int $x = ...", then look at the Var part to see if it's $-sigiled. if yes, normal infix= 17:58
case2: everythiing else is listop=.
(this illustrates why parser combinators is a good idea as you can get the tree form of LHS instead of having to work with token match tree form.)) 17:59
s/tree form of LHS/P6AST tree form of LHS/
fglock audreyt: is '$' a prefix op in some sense? like in ${'var'} (if this is valid syntax) so '$'+'bareword' is a scalar variable 18:00
18:00 larsen joined
TimToady more concretely, you can look at $() instead of just $/ 18:00
audreyt but even if you only have the literal match string of LHS, you can still reparse ;)
TimToady ${} is dead in favor of $()
pmichaud audreyt: well, by the time I get to infix:+ i have the (parsed) version of the lhs argument already available, because of the reduction
TimToady and ${'foo'} was never valid in Perl 6 18:01
pmichaud the lhs is just the thing on the top of the termstack
TimToady you have to write $::{'foo'}
audreyt fglock: $moose is a Var term; $::('moose') is a Sym term; $('moose') is a Call on prefix:<$> with 'moose' as invocant.
pmichaud: right, but at OPTable you get a Match tree not a PASTt tree
pmichaud it's good enough for what I need :-)
audreyt pmichaud: so you need to work with various variants of possible $-stuff
particle_ is ${...} valid as anything in p6, like perhaps {...} as Scalar ? 18:02
TimToady $('moose') should probably fail.
audreyt "my Int $x", "$()", "$/", "scalar moose", etc.
TimToady: yes, by default
TimToady: in the backlog there is a crazy idea of defining it to return
"document.getElementById($_)" 18:03
to make Perl6 compatible with prototype.js.
but it's userland -- railland, in particular.
PerlJam So ... is this valid perl6? [=] my($x,$y,$z), 5; # or something similar?
TimToady I don't think we should negate the benefits of checking for accidental symbolic refs. 18:04
Juerd PerlJam: Heh. Even if it's valid, please never use it :)
audreyt PerlJam: I think it's kosher
pmichaud come to think of it, I don't think it would that difficult to get the opp to return the past
s/past/p6ast/ 18:05
it already does it for p6rules
audreyt pmichaud: uh, how'd you do that with TGE?
Arathorn ooooh
pmichaud currently I'm using tge to transform the parse tree to an ast
audreyt partial trees doesn't neccessarily compile
or compile the same way as toplevel 18:06
s/toplevel/it would be on/
particle_ my($a, $b) << 5; # same as [=] my($x,$y,$z), 5; ?
Arathorn finally ges the $('moose') <---> document.getElementById('moose') thing from earlier
by redefining "as Scalar" for strings to invoke document.getElementById
particle_ s/same/similar/
audreyt Arathorn: yeah. but really, bad idea :)
PerlJam particle_: I think you need a = near the << :)
Arathorn well, at least i understand it 18:07
audreyt Arathorn: _maybe_ makes sense on the JavaScript target.
it can be quite convenient.
but otuwise $*OS=='browser'... probably not good :)
s/otuwise/outside/
TimToady probably a bad idea to be incompatible too
audreyt oh, sure, it's all userland :) 18:08
particle_ perljam: sorry, typo, yep.
audreyt pmichaud: in any case, I think it'd be easier to ask the AST tree object 18:09
"do you confer scalar context on lvalue?"
pmichaud right
audreyt than somehow reconstruct this info by matching against parse tree
the latter way is... not really fun
pmichaud I'm wondering if we can build the ast lazily
audreyt that's what parser combinators do... 18:10
but parrot has no native thunks
so you'd need to somehow wing it.
pmichaud well, tge is essentially thunking things already
(if I understand it)
lately I've been toying with the notion of "returns" traits on rules 18:11
audreyt internally
but the return value is eager
and if there is a lot of backtracking, we want the return value be thunked 18:12
fortunately, p6 doesn't have much backtracking
so eager tree construction is fine I think
pmichaud I can certainly return a lazy something, yes?
audreyt sure, but if commit dominates, thunk creation cost overshadows saved scratch backtracked objects 18:13
(unless you make thunk creation cost really really low.)
(but that's not parrot.)
pmichaud I'll have to thunk about it some more
audreyt who would have thunk of that
pmichaud ...over lunch, at that :-)
btw, this was all a side-question off of the original discussion of terminating rule expressions. :-) 18:14
PerlJam If you're strictly talking about the bootstrap, "cost" doesn't matter too much and you can choose whichever way is easiest to understand/use.
audreyt pmichaud++ TimToady++ # /%x/ consistency; visibility of <key>; my (SIG); listop=; "is parsed" semantics 18:15
pmichaud but I'll come back to that later. Essentially I'm guessing the termination character will have to be passed out of band
audreyt we got a lot of things done :)
TimToady BLing, I'm worried that P5 folk will continually misunderstand $$foo[$bar]
precedence now makes that $($foo[$bar]) and they'll expect ($$foo)[bar] 18:16
I wonder if we should outlaw $$
audreyt $$foo[bar] in p5 means $foo.[bar]
PerlJam TimToady: There's lots more gotchas for p5 folk. One more won't hurt (much) ;)
audreyt not $$foo.[bar] 18:17
so if they expect $$foo.[bar], they deserve to get surprised
TimToady $$foo.bar then 18:18
Arathorn TimToady: i made that mistake earlier today, fwiw
(as a token p5 folk)
TimToady is now $($foo.bar), and p5 folk will parse ($$foo).bar
Arathorn colabti.de/irclogger/irclogger_log/...l=143#l222 to be precise
anyway 18:19
18:19 Arathorn is now known as Aragone
TimToady indeed, that's why I brought it up 18:19
audreyt why can't we say parse that as part of regular Var rule?
that is, make <sigil>+<name> always bind together
TimToady well, that's essentially what P5 does
Just means $ $foo is different from $$ foo.
$$foo, even 18:20
audreyt and both are different from $$foo.
oh wait, no, $ $foo is same as $$foo.
TimToady in result, but not in precedence
audreyt right.
that is what p5 people would expect 18:21
and I don't see anything inherently wrong
$foo already doesn't mean $(foo())
so it's just generalization of the same rule
TimToady it's just sort of recursive twigils...
audreyt maybe they are called pregils...
TimToady sigils as recursive twigils
pmichaud votes for zigils 18:22
TimToady but then what's $$$foo?
audreyt sligils
TimToady nsigils?
pmichaud $$$make $$$money $$$fast
audreyt pmichaud++
PerlJam audreyt++ :)
pmichaud time for a break -- bbiah 18:23
audreyt sligilsligilsligils # mm pretty bridge
TimToady Maybe they're all just igils
but some are more igil than others
audreyt ok, I need to get a ^C also 18:24
good night :)
&
TimToady let's see that 0..speed of light
almost
nite
audreyt TimToady: so, follow up on p6c thread?
TimToady k 18:25
18:25 zgh joined
pmichaud did we decided on $<key> and $<lhs> in "is parsed", or were those just idea placeholders with syntax to be determined later? 18:27
s/decided/decide
audreyt <key> would be special rule in fact 18:28
pmichaud and maybe $<lhs> should be $<pre>
audreyt no idea about $<lhs>- $<pre>
pmichaud oh, special rule
audreyt sigh
pmichaud okay, I can do that
audreyt (sigh = preempted :))
particle_ make that 0..^speed of light
audreyt woot! MSR paid for my YAPC::NA trip!
MSR++ 18:29
pmichaud so, <key> is a special subrule that returns the hash key that caused the rule to be called
audreyt yes.
pmichaud I agree, no idea bout <pre>
I'll think about it :-)
audreyt probably not <pre> :) probably visibility as $<pre>
or even just as $/. 18:30
but you'll think about it and I'll sleep :)
& 18:31
18:39 b_jonas joined, FurnaceBoy joined
TimToady left side is passed as an official parameter to macro, so could be seen in "is parsed" directly, or passed in as a parameter to an indirect rule. 18:43
<key> is a bit of a placeholder insofar as it might be clearer to call it <token> or some such that works for both macro name and <%hash> key. 18:45
course, the macro name turns into a key in some <%hash> somewhere, so maybe <key> is still fine from the grammar writer's point of view. 18:47
pmichaud a couple of questions
first, this means that whatever processes the rule in "is parsed( ... )" has to know that the ... is receiving a extra parameter
yes? 18:48
(either that, or all rules have to assume they're receiving extra params, or all rules have slurpy things, either of which is fine w/me)
18:48 weinig joined
pmichaud s/slurpy things/slurpy args 18:48
TimToady all methods implicitly have %_
pmichaud okay, great, excellent 18:49
I had forgotten about that -- that has some wonderful ramifications (in a good sense) for rules
thank you
(I hadn't forgotten, just didn't make the connection) 18:50
TimToady as in natural language, you can always put an adverb on the verb. The listener may, of course, not be able to make heads or tails of it.
pmichaud my other question: do we just have a single infix:=, or are there separate "things" for assignment?
(one more after this, actually)
TimToady Please pass the gravy graphically.
not sure quite what you're asking 18:51
pmichaud I'm looking at it from a parsing perspective; and trying to find out if I need to break some simplifications (more)
we have a scalar = that parses at one level of precedence, and a list = that parses at another
are they both known as "infix:=", or is there something that separates them? 18:52
TimToady I think that's all the parser needs to know. semantically you have to know when the assignment happens
since the declarator can change that.
pmichaud okay, then I didn't understand what was being said earlier 18:53
TimToady and, in a sense, the parser then needs to know that constant $x = 1
happens immediately
pmichaud how can @a = 1, 2, 3, 4 work if = is higher precedence than , ?
TimToady At the point that macro infix:<=> fires off, it dispatches "is parsed" based on its lhs's characteristics. 18:54
could even be "is parsed(test() ?? /foo/ !! /bar/)" I suppose. 18:55
18:55 nicbrown joined
TimToady test($lhs) rather 18:55
pmichaud okay, yes, this will get tricky then
I definitely have to do a bunch of stuff to the opp
TimToady depends on subsequent things seeing the bindings earlier in the macro declaration.
pmichaud @a = 1, 2, 3, 4 and @b = 5, 6, 7 18:56
TimToady or could just call in with a different precedence.
pmichaud right, the opp doesn't have a precedence parameter yet
but that becomes easy now that all rules take %_
s/easy/easier 18:57
TimToady :) * .5
pmichaud (still easier now that parrot's slurpy hashes actually work when slurpy arrays are present)
TimToady phone call in an hour, wandering here and there in the house to eat lunch and stuff... 18:59
any other questions for now? 19:00
pmichaud I have one last question but I'm trying to get the phrasing correct
TimToady "How did an idiot like you get put in charge of Perl?"
:)
pmichaud no, that's not it
okay, I have it
for convenience I defined a special "prelist" category to handle listops (e.g., say, etc.) 19:01
think it would be possible to use something like a prefix_meta*:<> to do it?
or maybe prefix_circumfix_meta_operator:<> 19:02
it probably doesn't matter now since you've described infix:= as a macro
so, never mind. I'll come back to it if it makes sense later 19:03
TimToady in fact, maybe %prefix rule could do similar trick to figure out which prefixes are listy.
pmichaud ooooh
*that* sounds pretty good 19:04
the trick has always been that a listop has one precedence coming in and another going out
TimToady <%prefix|%prelist> could still do longest token, and then you could use normal lookup.
I always thought of list ops as a left paren without a right paren. 19:05
so it'd be fine by me to do top-down at that spot.
pmichaud i.e., in 3 && say 'ok', the say looks like a term to the && but like a low-precedence paren to its list
I'm still holding the possibility of doing it top-down in reserve, but I have this feeling that it gets a little messy when dealing with postfixes and other ops
TimToady top-down handles surreal prec nicely. 19:06
instead of forcing parens to handle it.
pmichaud my observation is that it's very similar now to what we're doing with infix:=
TimToady depends on how well you parameterize the terminator set.
is parsed is top-down by definition. 19:07
pmichaud yup
okay, that gives me plenty to go on
many thanks
TimToady a macro is just a term, and a term implies top-down to me.
yer welcum.
pmichaud just out of curiosity, would you strongly *prefer* that listops be done top-down instead of the path I had been taking?
TimToady course infix macro ain't a term, but we'll gloss over that... 19:08
I think it's likely to produce better error messages in the long run
and it's not that big a speed hit.
pmichaud I agree it's not a speed hit
TimToady so my guess is that it'd be better.
and maybe cleaner, given you can clean the infinities out of precedence handling 19:09
pmichaud okay. I'm going to lunch, thanks again 19:10
TimToady me too, see you in 50 minutes
pmichaud omg, it's 19:10 already?!?
(the day has gone)
I didn't connect your "phone call in an hour" comment, sorry 19:11
19:31 PolettiX joined 19:32 PolettiX is now known as froh-doh 19:34 hexmode joined
obra indeed. time moves quickly 19:36
Can Perl6 fix time for me?
clkao the time machine operator
PerlJam clkao: it makes time? 19:37
clkao maybe zips
TimToady you'll have to take that up with TheDamian 19:38
particle_ do some profiling... DProf gives negative timing on some subs 19:42
TimToady Kind of like those waves that the front can travel faster than light if you ignore the fact that the average is still C. 19:44
obra "But Perl is far beyond C"
I,I "Light years ahead of C"
particle_ fixing time is a hard thing, but perl 6 makes it possible 19:45
TimToady Maybe Perl is really a language from the 22nd century. I'll never tell. 19:46
particle_ at this pace, it just might be :) 19:47
ruoso heh
that's the problem of Perl 6 being so lazy... 19:49
TimToady audreyt: I think @ signifies orderedness, but .[] implies integer keys to the extent that the optimizer is allowed to assume it.
audreyt: but @foo may supply a Hash role, and %foo may supply an Array role.
(backlogging cont...)& 19:50
PerlJam perl6 is clearly the work of a madman ;) 19:51
pmichaud "design by committee" rears its head, too :-| 19:53
19:53 lk joined
pmichaud fortunately the committee is headed by madmen and madwomen, so we should be safe 19:53
TimToady I think Audrey is maybe the time traveler. 19:54
would explain a lot.
lk hihi 19:55
19:55 lk is now known as lichtkind
PerlJam when audreyt talks to herself, she *really* talks to herself (from the future) 19:55
19:59 DaGo joined
TimToady would also explain the cavalier attitude to gender, if they have girl-boy guns by then. I read that in the TFOS guide. 19:59
19:59 gru joined, ghoq joined
ghoq #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai 20:00
#fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai 20:01
ruoso geez
ghoq #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai
rw-rw-r-- ...
ghoq #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai
rw-rw-r-- How do they cram that much stupid into one human being's head?
ghoq #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai
pmichaud times like this, /ignore comes in handy :-)
ghoq #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai
20:01 gru left
ghoq #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai 20:01
particle_ any ops about?
ghoq #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai 20:02
20:02 ghoq left
ruoso poor irc logger 20:02
kolibrie what is the name of the script to set up SVK properties on new files? 20:04
particle_ was that an Acme:: module in action
ruoso nah... Acme:: are supposed to be funny
TimToady patrick, are you able to get through to 6p call? 20:06
kolibrie found it: util/add-svn-props.sh 20:07
pmichaud TimToady: no
TimToady probably time keyed...
PerlJam pm: the rest of the cabal is really trying to give you a hint about something ;) 20:08
obra TimToady: you saw my irc msg? 20:10
svnbot6 r10041 | kolibrie++ | initial import of compile_p6grammar.pl
r10041 | kolibrie++ | * compiles grammars in Perl 6 syntax into Pugs::Compiler::Rule-based Perl 5 modules
TimToady obra: yes, I did. 20:11
20:13 coumbes joined 20:26 saorge joined 21:11 merlyn joined, high-rez joined 21:12 high-rez left 21:15 aufrank joined
aufrank hello all! 21:15
merlyn all("hello")? :) 21:16
lichtkind was that valid perl6? 21:17
theorbtwo all("hello") is. 21:18
Toaster read that all("hellow") works in C too :D 21:19
theorbtwo I'm not sure it's terribly meaningful making a single-element conjunction, but it's certianly legal. 21:22
21:22 heng joined 21:29 beppu joined 21:32 FurnaceBoy_ joined
ruoso wow... we'll have the first "brazillian lisp users meeting" in the FISL... 22:20
that surprised me...
22:36 Limbic_Region_ joined, Limbic_Region_ is now known as Limbic_Region 23:02 pdcawley joined 23:10 brad_ joined 23:18 Bgah joined
Bgah #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai 23:18
amv \o/
Bgah #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai
ruoso again...
particle_ aren't there any channel ops here?
ruoso I think it's time to have a bot op 23:19
23:19 Bzagah joined
ruoso to kill flood bot 23:19
Bzagah #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai
23:19 colares joined
Bzagah #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai 23:19
#fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai #fazlamesai 23:20
23:20 Bzagah left
beppu wtf? 23:22
theorbtwo beppu: Spam.
FurnaceBoy_ some guy in Wilmington Delaware, spamming freenode
or using a zombie there :| 23:23
svnbot6 r10042 | uzair++ | P6-style $0 was being used in the P5 version of the example. 23:26
23:29 lilo joined
lilo looks in 23:29
hi all....is everyone here mostly registered to nickserv and identified? 23:30
ruoso I think mostly are...
lilo hmmmm 23:31
let me see what I've got here
theorbtwo lilo: If you don't log yourself there's a log at irc.pugscode.org 23:33
ruoso BTW... I asked lilo for help about the spam bot...
23:45 Khisanth joined 23:48 ruoso left