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.
mugwump I hate those stupid keyboards that move the whole block down one row of keys, so that printscreen is where my fingers expect insert to be 00:00
arcady the 3 "useless" keys are pause/break, scroll lock, prtscrn/sysrq
theorbtwo is fossilized into using the old DOS edit logical copy-and-paste keys: shift-insert is paste.
Juerd Just because someone thought that nobody would use it. While that's *generally* true, it is still used in hotkeys like copy/paste hotkeys, and by 9 out of 10 cheap KVM switches.
arcady: Print Scrn is exceptionally useful.
theorbtwo Even worse, "power off" is where page up should be.
Er, wait, I have that reversed or somesuch. 00:01
Juerd I'm also quite used to ctrl|shift + insert
arcady I think for number of useless keys, though, sun keyboard wins
they even have a blank key 00:02
theorbtwo I hate it enough that the diag keys are in the wrong places on my laptop for playing nethack.
Juerd Though using OS X for a while, and a kinesis keyboard (with awkward insert position) has taught me to also love crtl + c|v
What are diag keys? 00:03
theorbtwo diagnol
Diaganol.
Er...
diagonal
(Because there is no usable numeric keypad, and I never learned "vi keys".) 00:04
Of course, this has meant that I waste much less time playing nethack on my laptop, and instead find other ways to waste time, like talk about keyboards on #perl6.
Juerd Diagonal keys?
I still don't know what you mean.
arcady like on a numeric keypad, I think 00:05
Juerd 7913?
00:06 frederico joined
arcady home, pgup, end, pgdn 00:07
audreyt TimToady: the new comment rule has a weird consequence
say I have
sub f {
...
}
if I prepend each line with #
to comment it out
then
#}
will introduce a comment block
to be terminated by { 00:08
that's what happened with Test.pm
theorbtwo Yeah, those.
audreyt a workaround is to limit legit opening to, well, opening quotes
but #{
is still possible
arcady that just seems wrong 00:09
audreyt another workaround is to use ## instead of #, but I'm not sure it's better
Juerd arcady: Multiline comments themselves just seem wrong
They naturally introduce visual and mechanical parsing troubles 00:10
audreyt $x.##{your advertisement here}.moose;
Juerd Inline comments ditto.
arcady yes
I don't see what was wrong with the existing comment mechanism
Juerd audreyt: Really, with either #{} or ##{}, who would actually use that to line up method names?
Or, worse, #x.##{
eh
Or, worse, $x.##{ 00:11
}.moose;
}.moose looks like it's a Hash method.
Or a method on a closure.
Not on $x
audreyt indeed
though line up doesn't need #
$x. .moose;
mugwump #* *# ?
audreyt is okay
long dot is quite orthogonal to inline comments 00:12
Juerd mugwump: Before we try and find useful glyphs, why aren't we discussing what problem inline comments solve?
Juerd doesn't like long dot either, but doesn't dislike it enough to fight it. 00:13
I personally still don't see any problem with space before dot.
mugwump I guess it's the problem where sometimes you have to change the layout of a piece of code to put a comment on it
Juerd mugwump: Do you have code to illustrate your guess? 00:14
mugwump or if you want to comment out a block, you have to use POD
Juerd Commenting out blocks is stupid by itself. But those who feel they have to, can use POD, or their programmer's editor to do so.
I don't see why they'd need a third way.
FurnaceBoy_ ` ' mapping to typographic single quotes was a convention used by Knuth, and perpetuated by GNU/texinfo
ditto `` '' as ligatures
Juerd I personally like if 0 { ... } better for temporary disabling code. 00:15
arcady you have to comment it out if it's a syntax error or something
Juerd No, if there's a syntax error, there are two possibilities
1. The code is irrelevant and can be *removed*
2. The code is needed and must be *fixed* 00:16
Commenting code is like removing it, only it doesn't clean up as much :)
arcady well, if you think you might want it back... 00:17
then you should be using version control.
Juerd Why would you want code back that isn't even syntactically correct? :)
I can't imagine people think like that...
arcady and inline quotes are, I think, even less useful 00:18
Juerd Agreed.
arcady err... comments
last time I used them, it was actually for some horrible java preprocessor thing
mugwump that's the nice thing about perl. timtowtdi. if you don't like a feature you don't have to use it
Juerd mugwump: But this kind of feature has great impact on other parts of the language. 00:19
arcady and it's a feature that if you don't know about can bite you
Juerd mugwump: And about how people perceive the code. Also, "if you don't like it, just don't use it" only works for people who never ever have to maintain other people's code.
arcady as just demonstrated
mugwump right, so if multiline/inline comments are to work, they should be visually obvious the first time you see them 00:20
Juerd And it has to be implemented, maintained, and tested.
mugwump: I'd really like to know why we'd need them, first.
audreyt anyway... this coding monkey has implemented them (committing)
Juerd I know that some people want them. I've never heard those people present any convincing case, though.
mugwump Juerd: but, you've already stated that you won't accept any explanation!
audreyt (it doesn't mean I neccessarily like single # to introduce inline comments)
TimToady audreyt: #} is not a legal opening sequence. 00:21
audreyt TimToady: but #{ is
Juerd mugwump: I haven't stated that.
TimToady yes.
audreyt TimToady: but q}...{ is fine, no?
same reason as q>...<
TimToady no, I don't think so.
audreyt oh, so it is biased.
TimToady I think so.
audreyt that means q>...>
is legal?
same as q!...! 00:22
TimToady in theory, but someone who does it should be shot.
Juerd TimToady++
audreyt gotcha.
Juerd TimToady: Though did you know that in Finland, >>foo>> quotes are used? :)
TimToady: I learned so today, from Wikipedia
TimToady That...explains a lot...
wolverian Juerd, they are rather oldish and not used in modern texts.
sorry. :) 00:23
arcady also, wikipedia says that " is called rabbit ears
wolverian there is no easy explanation..
Juerd wolverian: That's with all traditional quotes. They're replaced by ASCII ;)
Except in France, where they still stubbornly use their <<>>.
audreyt . o O (you believe things you read on wikipedia?)
wolverian Juerd, yeah. except it's not " that is used in print, but the curly version.
audreyt TimToady: anyway, that still leaves the #{ problem, though maybe it is nonfatal enough 00:24
TimToady I think so.
Juerd audreyt: I do! And you should too... you could learn things about yourself that you didn't already know :)
TimToady I only believe things inside French quotes.
audreyt Juerd: jimbo just two days ago said in taipei that you are supposed to believe in things in Wikipedia-stable only 00:25
Juerd #{ would introduce a comment? Probably a big problem, because many people are used to s/^/#'ing in vim.
audreyt (when it comes to happen RSN)
Juerd audreyt: Heh :)
wolverian: Blame MS Word.
TimToady shouldn't be a problem #{...#} still works. 00:26
as long as the brackets balance.
Juerd TimToady: Sure, but inside brackets, you don't parse Perl.
TimToady: So any quoted string in it, with an imbalanced pair, fails.
TimToady I think people will learn to do s/^/# / instead.
Juerd They shouldn't have to.
mugwump agreed.
TimToady screw 'em
Juerd They shouldn't have to discover that # alone no longer suffices. 00:27
audreyt #{
# {...}
svnbot6 r9887 | audreyt++ | * Implement the commenting rules in S02v22:
audreyt #}
svnbot6 r9887 | audreyt++ | $a.#(your advertisement here).method;
r9887 | audreyt++ | say #<<< Foo <bar> >>> "Hello, world";
audreyt would fail, no? or brackets in comments are still followed?
Juerd They shouldn't have to be bitten by a feature that they probably won't even ever used.
mugwump How about if you enforce a trailing # too?
Juerd Though this prediction can be ignored :)
audreyt #< 1<2 >
mugwump say #<<< Foo <bar> >>># "Hello, world"
audreyt I thought this should parse fine, not delayed 00:28
Juerd mugwump: An make it even uglier? Also, how far do you want to look ahead, when parsing? :)
audreyt Juerd: there is no lookahead :)
mugwump that doesn't need more than one token lookahead
Juerd audreyt: backtrack then
audreyt $x.#( moose )#.meth
Juerd: there is also no backtrack... failure to close an inline comment block is syntax error
not magical reparse
Juerd audreyt: I see.
Then, how far do you want to look ahead, or backtrack, visually? 00:29
theorbtwo thinks lookahead of up to 6 characters is OK. More then that and people forget what they are looking for.
audreyt I sorta like the balancing trailing # mugwump proposed.
Juerd My gut reaction to multiline comments is very negative.
theorbtwo So do I... but I still wonder why we need them.
audreyt it agrees with /*...*/, {-...-}, <--...-->
theorbtwo Humans think symmetry is good and orderly. I wonder how this works with MJD's hypothisis that symmetry detecting is about spotting preditors in the jungle. 00:30
audreyt cf: wadler.blogspot.com/2006/01/bikeshe...oring.html
Juerd I think we're all just wasting time and brain energy 00:31
theorbtwo audreyt: Except I think we are worrying a fair bit about the colour of the trim, and not at all about if we need a bike-shed at all.
audreyt wadler observes that "Lexical syntax of comments" is 8x more attractive than semantics :)
theorbtwo What was wrong with $foo. meth?
Juerd theorbtwo: That trailing dot is visually hard to spot at the end of a line. 00:32
theorbtwo: And makes that the next line looks like a function call, not a method call.
e.g.:
$foo.
bar().
baz();
audreyt say #<<< Foo <bar> >>> "Hello, world"; 00:33
say #<<< Foo <bar> >>># "Hello, world";
Juerd whereas this is immediately obvious, and what most people are used to already:
$foo
.bar()
.baz();
audreyt TimToady: I think the second form is quite a bit more readable...
Juerd Though \s+\. doesn't work if you insist that "foo .bar" mean "foo($_.bar)", which is a axiom I think we can do without. 00:34
mugwump and an accidental multiline comment is much more likely to be a syntax error, because hardly anyone puts comments right after }
theorbtwo $foo#{
wolverian Juerd, maybe we should just require ()s on sub calls. ;
;)
theorbtwo }#.bar seems like just about maximal uglyness. 00:35
Juerd wolverian: Well, not require it at all, but make it the obvious solution.
wolverian Juerd, that's a good point. how?
Juerd wolverian: Documentation, peer pressure...
wolverian warnings?
theorbtwo I don't like requiring parens on functions. Indeed, I don't even much like it on method calls, but I don't think it's avoidable there. 00:36
Juerd No, you shouldn't warn about ambiguity. You might as well forbid the syntax then.
theorbtwo It lets you think of a void context function call like a command.
wolverian theorbtwo, I agree, and I think most people her edo.
s,her e,here ,
Juerd, maybe foo\s*.bar should be forbidden. 00:37
Juerd wolverian: *? :)
wolverian: + then, please ;)
Otherwise I won't even consider it
wolverian it seems logical. always use ()
..to separate
Juerd wolverian: Don't forget that \n is in \s
wolverian mmhm
anyway, I'm not serious. just taking the python approach and seeing how it works 00:38
Juerd I think the "long dot" is fine, I just liked ... . better than . .
mugwump ā€œ$foo = .propertyā€ should work, but ā€œsay .propertyā€ shouldn't? 00:39
Juerd In any case \.\s+ doesn't work for me, and I like the old \s+\. best but realise that it is a problem if you consider .bar
wolverian mugwump, hopefully not. :)
theorbtwo I think long dot seems like a quite reasonable WTDI.
wolverian (as in, hopefully that is not true)
Juerd Or we could try to make . infix instead of postfix, and solve the entire thing with precedence. 00:40
theorbtwo For that matter, \s*...\s* being semanticly equiv to the empty string -- where one of the space-strings is nonempty -- seems reasonable. 00:41
Juerd (maybe.)
theorbtwo Er, that'd conflict with yaddayaddayadda, though.
wolverian heh. sub bomb { return { ... } }
Juerd sub bomb { { ... } } 00:42
Then it even looks like one
Good night
theorbtwo G'night, Juerd.
TimToady 'nite.
wolverian Juerd, hm, I thought the closure is immediately executed there
(due to some special rule whose motivation I forgot) 00:43
theorbtwo Um, there's the closure in void context rule, but that's not void context, it's an implicit return. Is there another rule I don't know about? 00:45
wolverian maybe I'm just confused, but that's what I remember. 00:46
audreyt ?eval sub f { { 3 } } say f()
evalbot_9886 OUTPUT[<SubBlock(<anon>)> ] bool::true 00:47
FurnaceBoy_ hehe
TimToady bare block at a statement boundary is just special cased to imply a "do".
that's a bug in pugs.
you have to return a block explicitly if that's what you mean. 00:48
?eval sub f { return { 3 } } say f()
theorbtwo Ah, it's not "in void context", but "as a top-level statement".
evalbot_9886 OUTPUT[<SubBlock(<anon>)> ] bool::true
theorbtwo That makes sense.
TimToady ?eval sub f { do { 3 } } say f() 00:49
evalbot_9886 OUTPUT[3 ] bool::true
TimToady that's supposed to be the default without the do.
audreyt fixed, committing.
theorbtwo s/a top-level statement/as the top level of a statement/
wolverian hrm, I don't really like that, probably because I don't like 'return' 00:50
TimToady if you see a { when you're looking for a new statement.
though, oddly, do { 3 } violates the other usage of "do statement".
well, I guess not really... 00:51
audreyt not really.
wolverian not if it's }\n? my brain melts
00:51 sneex joined
TimToady what's the } got to do with it? 00:52
audreyt I've also implemented #(...)# -- but not committing for now until S* changes :)
TimToady btw, why OUTPUT[3 ] and not OUTPUT[3]?
wolverian TimToady, the \n makes it a statement, or something.
audreyt TimToady: \n in IRC is flattened into space
TimToady Eh? this is Perl, not Python or Ruby...
audreyt TimToady: line-ending-after-}-adds-an-implicit-semicolon 00:53
TimToady It does imply a semicolon, I'll grant you. But
Juerd So does that make it Python, or Ruby?
TimToady you've already committed to the statement type as soon as you pass {
Juerd Choose now ;)
Though I'm sleeping, so I'll read the answer tomorrow
afk
TimToady ah. 00:54
I thought maybe it was interpolating ' ' after the last elem. :)
theorbtwo So +{\n...\n}\n is useless use of nummification in void context? 00:56
TimToady only if it *is* in void context. as the last statement it'd be "Don't know how to numerify a closure" or some such. 00:57
00:57 sneex left
theorbtwo Er, right. 00:59
00:59 cyrup joined
theorbtwo Which reminds me, do we still generate useless warnings where the definition is sideffectless, even if we can't prove it's not overriden with a sideeffectful version? 01:00
s/do/should/
s/reminds me/makes me wonder/
01:07 amnesiac joined 01:08 Quell joined
TimToady theorbtwo: we can if the proto specifies the multies are all readonly on the parameters in question. 01:13
and since "readonly" is the default... 01:14
but in the worst case we might not know till runtime. 01:15
(if then)
audreyt TimToady: consider 01:21
sub f { {$^a} }
what then?
also 01:25
sub f { ->{3} }
maybe both should return closure 01:26
and bare blocks only fold if there are no implicit params in it
makes sense?
01:28 jserv-- joined
audreyt (also I can't find the paragraph in the specs that talks about executing bare blocks in statement level) 01:29
svnbot6 r9888 | audreyt++ | * Revamped the bare-block-running rule. All statement-level 01:32
r9888 | audreyt++ | bare blocks always run immediately:
r9888 | audreyt++ | (sub { { 3 } }).() # 3 under any context
r9888 | audreyt++ | however, those with implicit params in it, as well as pointy
r9888 | audreyt++ | blocks, are exempt from this rule. (XXX unspecced)
TimToady Hmm, {print} has an implicit parameter too. I think we should probably blow up { {$^a} }. -> isn't a problem since it's not starting with { at the statement boundary. 01:36
audreyt TimToady: well, the implicit $+_ is fine I think
TimToady not if it executes at the wrong time. 01:37
audreyt currently pugs treats a bare block with $_ as the only implicit param as still "bare"
well, {print} is ambiguous.
TimToady that's the point.
return {print} isn't.
audreyt but {print $_} is
so one must write 01:38
do { print $_ }
or
do { print }
always?
TimToady Yes, and what you do with it depends on whether the { is at the statement boundary. I suspect.
no, bare {...} is always do {...}
audreyt ok... bare {$^a} would be an error
and bare {$_} would be special-cased to be fine
TimToady right, like do { $^a }
$_ likes to alias to its outer scope. 01:39
audreyt implemented as such. 01:41
(where in the S* is this, btw?)
TimToady might just be a p6l decision. need to research it more. 01:42
grep bare.block doesn't find it.
audreyt yeah, I can't seem to vgrep anything like it
seems to belong somewhere near beginning in S04 01:43
mugwump what built misc/pX/Common/Pugs-Compiler-Rule/lib/Pugs/Grammar/Rule/Rule.pmc ? v6-pugs ?
audreyt mugwump: no, lrep 01:44
see misc/pX/Common/Pugs-Compiler-Rule/Makefile.PL
01:45 kanru joined
audreyt bbiab... 01:45
mugwump ah, right
svnbot6 r9889 | audreyt++ | * Statement-level bare blocks with implicit params (except for $_) 01:46
r9889 | audreyt++ | become errors.
01:46 Leandro- joined
TimToady from A04: 01:46
[Update: Bare blocks are still legal, and always execute immediately
as expected. To return a closure you should use an explicit C<return>.]
Leandro- anybody know how translate it: $hhmmssd = date("His").substr(sprintf("%0.1f",microtime()),-1); to perl?
amnesiac Spanish++ 01:47
eerrr
audreyt TimToady: please update S04 when you get some cycles :)
&
TimToady k 01:48
gotto go spend some cycles calculating my income taxes though...
s/income/outgo/ is more like it...
heading home. &
Leandro- How i got the microtime? 01:54
01:54 justatheory joined
FurnaceBoy_ mathetes, This may sound a little strange, but, the whale, at the Denver Sea Park, is going to die, unless we get it to the moon. 01:55
wc
02:07 kanru joined 02:09 mako132_ joined 02:25 hlen_ joined 02:35 hlen_ is now known as hlen 02:48 DesreveR joined
mugwump I don't see any superclass stuff in S12. what's the syntax to call a superclass method? 02:52
(or next_method or whatever)
arcady with next, I think... 02:58
audreyt mugwump: "call" 02:59
mugwump thanks
audreyt or "next METHOD" if you don't care about rv
(bbiab) &
TimToady audreyt: I just special-cased # on the left margin to always be a line-end comment regardless. 03:08
mugwump that's awful 03:09
TimToady I'm tired of everything being awful regardless of what I decide. 03:10
audreyt TimToady: I just implemented it.
also, nesting.
TimToady thanks.
audreyt puts on the "coding monkey" hat.
TimToady ...to keep from getting her designer head bitten off, I presume. :)
audreyt indeed :)
moreover, I think it's actually somewhat sane now, with both nesting and 1col. 03:11
the 1col doesn't bother me 03:12
because we already special case
#line 10
which is also a 1col constraint.
TimToady and =begin
audreyt yeah.
writing unit tests for them
mugwump ok, maybe i'll warm to it
TimToady I saw some of them just coming through with svn up. audreyt++ 03:13
audreyt =)
all of the rest are implemented as of r 9890. 03:16
I really need to get back to $job now :)
audreyt waves &
svnbot6 r9890 | audreyt++ | * comments: finish off the rest of comment syntax as of r8637 svn.per.org:
r9890 | audreyt++ | use v6;
r9890 | audreyt++ | #line 1
r9890 | audreyt++ | #< this is still one-line comment
r9890 | audreyt++ | #< but this is inline comment >
r9890 | audreyt++ | #< and it <also> nests >
r9890 | audreyt++ | #[[[ even [[[across]]] multichar delims ]]]
TimToady uh, that last line wasn't how it's currently specced, but if it's easier to do it that way, I can change it. 03:17
audreyt I think it's quite a bit more symmetric 03:18
i.e. nesting only looks at the delims
TimToady I was going both ways about it.
it would be easy to persuade me to go the other way.
audreyt #[[[ simple [ nonbalance should be fine ]]]
because if you use [[[, you anticipate [ in it
TimToady I'm trying to remember why I decided the other way. I guess I
was influenced by how closures work in PGE. 03:19
audreyt well, we can also go
#[[[ #< foo > ]]]
but that would warrant the trailing # you don't like
so I think reusing the same set of delim all the way makes more sense
TimToady Okay, I'll fix it to the other way.
audreyt thanks :) 03:20
TimToady++
TimToady I also blinked at the 4. .say test a couple of times.
audreyt nod.
TimToady er, sqrt, actually. but that implies more lookahead than /^.\s/ 03:21
audreyt there's no lookahead really
TimToady Since 4. + 3 should probably be 7.
audreyt it's a parsefail.
arcady fwiw, ruby prohibits both 1. and .1
audreyt you can make it backtrack, but I don't think it's worth it 03:22
arcady: that's sane also.
TimToady I don't mind losing 1. 03:23
but .1 should continue to work, I think.
audreyt sure.
it's interesting in designing minip6-for-PGE-also-PIL2 how much we can get just be dropping BEGIN
TimToady well, at least it's probably an easy one to figure out a decent message for, given a bit of backtracking in the error message producer. 03:24
audreyt i.e. once BEGIN (and anything causing it) is dropped, almost all sugar disappears
TimToady which, of course, indicates the power of the beastie.
audreyt ?eval 1. +2
evalbot_9889 Error: unexpected " " or "." expecting "_", exponent, term postfix, "#", operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 03:25
audreyt (at line 1 column 2)
not the best errmsg ever, but at least the column position is clear
TimToady Should say, "1. must be written 1.0" 03:26
audreyt k.
TimToady but again, I'm assuming that all the backtracking smarts we don't allow in the real parse are brought to bear for better error messages. 03:27
so I'd say don't sweat it till we're self hosting.
audreyt yup.
TimToady on the other hand, the error we're currently getting indicates that it hasn't really committed to a long dot after seeing ". ", which it seems to me it could. 03:30
audreyt okay, implemented 03:32
audreyt praises a default-commit engine
TimToady I suspect we could figure out a way to make rules autocommit, at least pragmatically. 03:43
svnbot6 r9891 | audreyt++ | * postfix long-dot now commits by default and never backtrack.
audreyt $ ./pugs -e '1. +3'
*** unexpected "+" expecting "#" or "." at -e line 1, column 4
obviously the correct errmsg (without special casing) 03:44
TimToady audreyt++
audreyt yeah, autocommit is a win because it saves you the trouble of thinking (as any DBI programmers will attest) 03:45
really &
TimToady ciao, and thanks & 03:46
?eval 1.#(hmm) + 3 03:59
evalbot_9891 Error: unexpected "+" expecting "#" or "."
TimToady cool
04:06 cyrup left, hcchien_ joined 04:07 rashakil joined
arcady btw, ruby actually does parse 1. + 3 04:07
as 1.+(3) 04:08
calling the method '+' on 1, with argument 3
and .1 being prohibited is a fairly recent thing, presumably to rationalize the syntax
since it was allowed before, that means that it's at least parseable
TimToady Hmm. Well, if ruby ever wants to move from SMD to MMD, 1.+(3) is going to give them heartburn. 04:10
arcady yeah, they don't do MMD
a feature that I very much miss 04:11
TimToady ?eval 1. + 2
evalbot_9891 Error: unexpected "+" expecting "#" or "." 04:12
TimToady ?eval 1.+2
evalbot_9891 3/1
TimToady that's a bit wonky...
arcady ?eval 1.+ 2 04:16
svnbot6 r9892 | fglock++ | PCP - Precedence.pm passes some tests
evalbot_9891 3/1
svnbot6 r9893 | Darren_Duncan++ | ext/Rosetta/ : updated the docs about how Rosetta relates to 'The Third Manifesto' and about what the latter actually is 04:28
04:34 penk joined
TimToady 1.+ 2 should say "missing method name after .+" 04:41
and 1.+2 should say "2 is not a legal method name after .+" or some such...
arcady what does .+ do these days? 04:42
TimToady calls all the named methods like .*foo does, but requires at least
audreyt the .*/.?/.+ isn't yet supported.
TimToady one to succeed or throws and exception. 04:43
np
audreyt need to implement "call" properly for it
TimToady just saying where I think it should eventually go
audreyt commit a test :)
btw, how is ::Capture going?
TimToady haven't started yet. ghostwriters would not be looked askance at. 04:44
mugwump audreyt, does Module::Install handle building Module::Compile .pmc files at build time yet?
audreyt mugwump: sure 04:46
mugwump: you need to say
pmc_support;
mugwump nice!
audreyt TimToady: roger
svnbot6 r9894 | fglock++ | PCP - code, docs cleanup 04:50
mugwump utsl.gen.nz/talks/perl6.now/start.html # comments/feedback, anyone? I'll be giving this in ~1hour :) 04:51
04:51 Khisanth joined
TimToady that's not what "begat" means... 04:54
mugwump ain't it ?
oh, silly be 04:55
silly me
"perl 6 and haskell begat pugs" -- that's better, huh? 04:56
actually I think I'll just pull those parts, they're a fairly tenuous joke anyway 04:57
arcady I'm confused. are you your own grandfather?
: )
mugwump ok, so (perl5 + Haskell spec -> Haskell), (Haskell + perl6 spec -> pugs), (perl5 + perl6 spec -> perl6) 04:58
tenuous, because it requires "perl" (all versions) to be considered a parent of Haskell 04:59
usually you can get away with that sort of incongruency when giving a talk. But it's gone now :)
TimToady this is a nit, and maybe a bug in Moose, but $.x = 0 is still supposed to call the virtual accessor even in the current class. 05:00
mugwump right, is $:x = 0 the equivalent, then? 05:01
TimToady $!x = 0
mugwump The last time I asked about how that went I was told to look up the term, "necro-equine flagellation"
:)
audreyt mugwump: wow, you wrote my YAPC::NA talk for me 05:03
TimToady the :: in the P6 equivalent MMD examples is unnecessary for any predeclared class or role. 05:04
mugwump right
also there are nicer ways to write that. but I wanted the code to look very similar 05:05
audreyt Intermediate language: IMC
it's now always PIR
IMC is totally gone
mugwump heh, that's what I get for re-acquainting myself with things by browsing the source :) 05:06
the first version still used "pX" :)
TimToady but the P5 example doesn't use ::, so that makes it look different...
mugwump oh yeah, I keep forgetting that's valid p5 05:08
TimToady and you might note that coro is in fact completely unspecced with respect to P6...
mugwump oh, I thought I saw a draft somewhere along the line. 05:10
audreyt it's drafted in S17.
and implemented as such in JS/Pugs
also Hs/Pugs
but not yet canonical
TimToady does Perl6::Currying still use .prebind? We changed it to .assuming ages ago... 05:11
mugwump that module is now an antique
audreyt mugwump: "Brian Ingerson => "Ingy dot Net" 05:13
the umlaut over o is optional
merlyn Ingy dƶt Net
mugwump ok
TimToady someone is likely to ask you the relationship of lrep and pge
mugwump sure, they're parallel implementations, right? 05:14
audreyt right.
TimToady hopefully convergent...
but maybe we live in a hyperbolic space rather than elliptical...
audreyt (there is another rules implementation, Text.Parser.Rule, that I intend to use to converge to the same grammar)
TimToady What I implement 3 times is true? 05:15
audreyt indeed
(there is also a ruby port by tewk somewhere.)
mugwump hey, you only need three seperate implementations and a spec to get an IETF standard
TimToady what about Pecmarl? 05:16
audreyt ooh, Perl 6 rules as RFC ;)
mugwump Pecmarl?
TimToady p-ecma-rl
audreyt mugwump: it's not 05:18
next clear
it's
next METHOD
the label name is literal
mugwump fixes that
TimToady pcre -> pcrecma :)
mugwump ActiveParrot 05:19
TimToady does Builtins redefine caller if you only import system?
mugwump heh. I cut and paste that from the man page :) 05:20
I'll check
oh, heck, Contextual::Returns *does* require Want 05:23
TimToady given/when ... ? doesn't seem to have a slide yet
mugwump that's because I couldn't find a module that implemented it :)
lots of similar ones called switch etc
one of them almost has the spirit of smartmatch
TimToady but if Contextual::Returns uses a controlled subset of Want, maybe it's less core-dumpy. 05:25
mugwump it seems to only use it for Contextual::Return::Failure
audreyt clkao: hmm, seems we mussed Perl6::Binding...
missed, even. 05:26
TimToady not sure why 3D uses LEAVE. could just $.z = 0 before next METHOD. 05:27
audreyt mugwump: damian now pefers Perl6::Export::Attrs
mugwump right. well, I wanted it to be just like "after"
audreyt over Perl6::Export
mugwump audreyt: ok
maybe that's too academic a distinction 05:28
audreyt also, v6-pugs would (presuambly) use pugs -CPerl5
whilst v6-lrep would use lrep
(but that is still in flux.) 05:29
mugwump right, I wasn't sure whether the perl5 backend to pugs was still alive
audreyt *nod* keep it ambiguous for now :) 05:30
fordinal hi all
audreyt it's also possible that -CPerl5 just calls lrep.
mugwump cheat :P 05:31
05:32 fglock joined
audreyt that's what pugs has been doing all along :) 05:32
fglock hi! 05:33
mugwump oh. here was I thinking that perl5 was a regular backend like JS, parrot etc
hi fglock !
audreyt mugwump: yeah, but -CJS just calls pil2js.pl
only -CParrot is handled by haskell
gaal hey there 05:34
audreyt (bbiab...)
gaal quick type question
aw
audreyt make it quick :)
fglock audreyt: the P::C::X op-precedence parser now uses Parse::Yapp - thanks to some undocumented features :)
gaal Prim.hs around 1304 op2Ord 05:35
mugwump rebuilds and re-pushes the slides to the web server
gaal I'm adding "defined" guards for the input, to fail if an argument to &sign are undef 05:36
but this I can't figure out a signature that would allow this.
audreyt gaal: in op2Ord, test for
op2Ord f VUndef _ = fail ...
s/f/_/ 05:37
and again for another arg
like that?
gaal well, I tried explicit code (when or if) and got errors on rigid types, but i'l try this
audreyt to use that, change "a" in type to Val
mugwump thanks all for the feedback :)
audreyt mugwump: np :) good luck 05:38
gaal trying.
whee, yes, that worked. thanks :) 05:39
now to understand why
audreyt left as exercise :)
&
TimToady hmm, now that I look at it again, the multis still aren't right. If the sig has (Index, Whatever) the args aren't gonna show up in @_, so you'll need (Index $ix, Whatever, $what) 05:41
mugwump ok, I'll rework that 05:42
TimToady otherwise don't see anything else 05:43
and I should probably go to bed now...
mugwump thanks heaps TimToady !
TimToady don't mention it. 05:44
nite all. &
fglock mugwump: I'm working on a new p5 based compiler, which gets closer to the p6 spec than lrep
mugwump fglock: cool. thought about going DSCM for it? 05:45
(distributed source code management) = any(git, codeville, mercurial, monotone) 05:46
or just keep in the pugs tree?
fglock it's in pX/Common - it is modular: currently there are Pugs::Compiler::Rule (already in CPAN), Pugs::Compiler::Tokenizer (started yesterday), and Pugs::Compiler::Precedence (started today) 05:48
mugwump lastlog -clear 05:49
fglock then another module for the main grammar, and then an emitter, ... 05:50
audreyt fglock: did you see my notes here about try to ignore anything that desugars to BEGIN
as well as BEGIN itself 05:51
for now? because I think it's clearer to separate the language into two such parts.
i.e. all the BEGIN desugaring can be handled in one top-down macro layer
fglock yes - but I'm not sure what it means - have you written more about it? Is it related to compile time expression evaluation? 05:53
audreyt I'll try to write more about it tonight
really gotta run now... bbiab
05:54 GeJ joined
audreyt (the key idea being that p6 is completely regular if you ignore ::= and BEGIN{} and "sub foo" and only allow "my &foo := sub {...}") 05:54
GeJ good localtime folks 05:55
05:59 avar joined
fglock mugwump: the main idea is to make a compiler that p5 people can contribute to - lrep is too dense/monolithic/non-standard :) 06:00
06:02 Southen_ joined, azuroth joined
fglock hopefully, most of Pugs::Compiler will be readable code 06:07
06:11 jserv-- joined
arcady somebody should write a perl 6 compiler in perl 6 06:12
fglock arcady: that's the idea - lrep grammar is written in perl 6 already 06:14
now we need a precedence-parser module for perl 6 06:15
but we can 'use' a perl 5 module in the meanwhile
06:36 sockstat joined
fglock no new p6 summaries, no new pugs blogs :( 06:42
06:47 bsb joined 06:49 nothingmuch joined 06:59 fglock left 07:09 oozy joined 07:23 tifo joined
Juerd ōæ½xABtestōæ½xBB 07:23
Neat. What am I sending? latin1 or utf8?
tifo latin1 07:24
Juerd Darn
????????
??????
????????
Hm, guess so.
Ā«and now?Ā» 07:26
tifo utf8
Juerd Yay 07:27
Finally!
ę—„ęœ¬čŖž
Hm, that's still fucked up in display
It looked nice on the input line 07:28
ĉ ĝ Ä„ ĵ ŝ Å­ 07:29
:(
Ć©
So I'm sending utf-8, but something tries to make it latin1 for display... Or something like that :(
ę—„ęœ¬čŖž 07:33
Okay, that works better now. 07:34
Now I just need a better font
(What font on earth has japanese, but not esperanto characters?!)
Neat 07:35
ĉ ĝ Ä„ ĵ ŝ Å­
Now I just need a NICE font :)
07:35 dakkar joined
Juerd I now have all the scripts I care about display properly. Yay. 07:43
I wonder how I could input the euro symbol 07:46
07:47 nothingmuch joined
Juerd Hi nothingmuch! Ə hĆ vĆ© Ć»nÄ©cĆøde wƶrkƬng! :), err, ā˜ŗ 07:49
clkao audreyt: mm 07:55
08:00 pdcawley joined 08:16 KingDiamond joined
theorbtwo Juerd: Euro is compose,e,= on my keyboard: ā‚¬ 08:17
Juerd theorbtwo: Not on mine :( 08:22
I tried e= first, it made most sense, knowing L=(ā‚¤) and Y=(Ā„) 08:23
Ohh
Capital E
E=, not e=
ā‚¬
Wheee
ā‚¬ 99999999999,99
08:28 nothingmuch joined 08:29 tifo joined
theorbtwo That's kind of funky -- what does e= do? Nothing? 08:30
Juerd Nothing, indeed. 08:32
Same nothingness occurs with l= and y=
Well, y= gets to be =
theorbtwo Hm, most odd. 08:36
Juerd Where are these defined?
dakkar if you're under the x.org X11 server, the compose rules are in /usr/lib/X11/locale/<name of the locale>/Compose 08:37
Juerd Locale, eh? Hmm.
integral except that locale appears to be that of the X server, which may not bare a relation to your locale :-/
Juerd Oh, I do have one
dakkar (I'm not sure if the path is searched on the server's machine, or on the client's)
Juerd dakkar: I have no such file.
server == client here 08:38
dakkar Juerd: /usr/X11R6/lib/X11 etc?
Juerd dakkar: Sure it's not s/lib/share/?
dakkar Juerd: on my 2 Gentoo Linux machines, it's 'lib'
Juerd Hmm, Å­ is formed with compose-b-u 08:40
dakkar: More proof that Gentoo is not to be trusted!
:P
I would never have guessed the b
Though b for breve makes sense.
Hm, UU is Ŭ, like bU, but uu doesn't work. 08:41
theorbtwo /usr/X11R6/lib/X11/locale/en_US.UTF-8/Compose on my debian system. 08:42
Juerd Same here 08:43
Though I got there via /usr/share/X11/locale
(Ubuntu)
Hā‚‚O 08:44
Fun!
theorbtwo Hmm, some of the things in there don't work. 08:45
Juerd ā‘  ā‘” ā‘¢ :)
Heh, they exist all the way to ā‘³. I wonder WHY.
dakkar Juerd: mysteries of the Unicode 08:46
azuroth for simulating the lottery?
Juerd azuroth: With only ā‘ ..ā‘³?
theorbtwo Because some first-class charset they wanted to be able to round-trip easily contains them. 08:47
Juerd It seems so arbitrary :)
azuroth I don't actually have ā‘³. nor even 2470 08:48
Juerd ā€¹foo!ā€ŗ 08:49
<foo!>
The best glyph is somewhere in between, I guess
dakkar Ā« Ā»
Juerd TimToady: Will Perl 6 treat ā€¹theseā€ŗ the same way it treats <these>?
TimToady: Or is only Ā«thisĀ» unicodish?
dakkar Juerd: write a macro for that ;-) 08:50
Juerd dakkar: I'm not interested in macros, alternate grammars, modules, etcetera, right now. I'm interested in getting the most optimal standard language.
When it's released and I still don't like it, those things will be considered. 08:51
theorbtwo s/When/If/, or did you mean to be horribly fatalistic?
Juerd I did. 08:52
theorbtwo Ah.
Juerd My major complaint being that <-> isn't official yet
Hm, ā‘¤ is (5), but (c) is ā“’, not Ā©, which is oc. 08:54
:Ć¾ 08:55
(What other use can there be for Ć¾orn?) 08:56
theorbtwo Compressing Ć¾e? 08:57
Juerd And undo history? No thanks 08:58
08:59 marmic joined
Juerd ā€žCOOL!ā€ I can type traditional Dutch quotes now. 08:59
Hmmm...
ā‚¬foo = ā€žHello, World!ā€; 09:00
say Ā« ā‚¬foo Ā»;
I can see governments creating their own Perl standard, to further adhere to charset policies. 09:01
09:02 nnunley joined
Juerd $foo = ā€žā€; # funny looking empty string! 09:05
09:15 KingDiamond joined 09:28 bsb_ joined 10:07 chris2 joined 10:09 renormalist joined, KingDiamond joined 10:12 renormalist joined 10:18 cognominal joined 10:25 cognominal joined 10:30 elmex joined 10:31 cognominal joined 10:38 KingDiamond joined
dakkar is away: pranzo 10:59
11:05 b_jonas joined 11:28 kanru joined 11:33 kanru joined 12:03 tifo joined 12:11 kolibrie joined 12:14 revdiablo joined 12:17 tifo joined
audreyt TimToady: you outlawed 1.+3 completely 12:18
that's a bit surprising...
(but implemented)
Juerd I'm pleasantly surprised :) 12:19
rgs "." as a method call I assume
audreyt interestingly, ruby thinks 1.+3 is
rgs or as a decimal point ?
audreyt 1.infix:<+>(3)
er, I mean 1.-3 12:20
rgs: decimal point
"1." is no longer valid literal
rgs avoid ambiguous parsing
audreyt yup
rgs yes, "1." is not pretty
Juerd ?eval my $foo = 3; $foo.+int 12:22
evalbot_9894 Error: No such method in class Int: "&+int"
Juerd Hm
&+?
audreyt Juerd: the .+ form is not yet supported
(simulatenous multi dispatch)
it would mean calling .int for $foo and all its superclasses that defines int 12:23
theorbtwo I consider 1. evil, but scientists seem to think it's a perfectly normal way of writing 1 to one significant digit, rather then C<1>, which is one exactly. 12:25
Or, at least, that's what I was taught in high school.
audreyt *nod* 12:26
but then, scientists don't overload . to mean other things.
theorbtwo True enough. 12:29
Juerd audreyt: Good; I don't like the operator :) 12:30
audreyt well, $foo.?method can be convenient. 12:31
I'm not atall sure about .* and .+.
but I'm more prepared to lobby against a feature when it's 1)implemented and 2)used and 3)found to be evil 12:32
svnbot6 r9895 | audreyt++ | * Pugs.Parser.Number: "1." is now _not_ a valid literal.
r9895 | audreyt++ | (tests welcome)
dakkar is back (gone 01:33:00)
Juerd Yeah, well, don't expect 2) for .+ and .* 12:33
12:39 Limbic_Region joined 12:47 bsb_ is now known as bsb
bsb .* and friend seem a little ugly to me too 12:48
access to the list of methods using :canonical, :preorder, etc is nice 12:51
but they seem to be better iterated with code 12:52
list p5's sort & reduce
s/list/like
Limbic_Region casual observation: The list > 6 months ago was full of questions and threads that never came to resolution but spun off into dozens of tangental conversations 12:56
it seems that relatively recently this has changed 12:57
there is a whole lot more concreteness to answers and updates to synopses to support these decisive decisions
Limbic_Region feels good about that
audreyt praises Robrt for quickly setting up the commit->p6l gateway 12:58
all I did was complain a few times... and then it magickally happened (also with parrot pdds)
Limbic_Region: there were actually synopses updates, it's just they escaped p6l and was very hard to track 12:59
(also synopses typos/miscommits were completely elusive)
bsb It does seemed to have helped
Limbic_Region audreyt - I am not saying it was all doom and gloom but you know as well as I do there were plenty of things decided on the list that didn't seem to be captured 13:03
bsb I wish my complaining was as productive
Limbic_Region I am just saying things are looking much better
audreyt Limbic_Region: and I'm agreeings vigorously :)
s/s//
Juerd tƫst 13:04
Limbic_Region well, make sure the cabal knows that it hasn't gone un-noticed 13:06
I was going to attempt to send an email to the list stating as much but I apparently have lost access to gmail and half the internet
audreyt aww
Limbic_Region: you can make sure the cabal knows about it by saing "TimToady: *backlog mark*" or some such 13:07
but TimToady backlogs even more comprehensively than me it seems, so that seems to be unneccessary
13:10 SamB joined
audreyt bbl... 13:11
13:17 Qiang joined 13:20 colares joined 13:21 frederico joined
theorbtwo thinks audreyt having commit access and TimToady being here helped a lot too. 13:21
Then again, perhaps it's just me not being there that helped. 13:22
13:28 avarab_ joined
avarab_ Hey 13:28
Limbic_Region theorbtwo - what are you working on these days? 13:34
13:35 chris2 joined
theorbtwo Lots of this-and-that. 13:40
Currently, I'm messing about with zcode.
It's kind of funny, in a way. Of course, it's also horribly not-funny. I know I should get a job -- I'm more or less stuck in my life, I need some sort of external motivation. 13:47
But I'm afraid of work, in part because I need external motivation.
Limbic_Region adopt a child - having that sort of motivation will get you to do a lot 13:48
theorbtwo I'm /so/ not ready for that kind of responsibility.
kolibrie very rarely is one ready for responsibility - you just jump in 13:49
13:56 jserv-- joined
Limbic_Region theorbtwo - propose to Jess and offer to pay for the wedding 13:57
Limbic_Region thinks he is going to give theorbtwo a heartattack with all this potential external motivation
13:58 fglock joined
theorbtwo Yes, that seems quite likely. 13:59
svnbot6 r9896 | fglock++ | PC-Precedence - more specific tests, higher level API
14:07 moscaoo joined 14:14 cognominal joined 14:15 vel joined, autark joined 14:16 justatheory joined 14:20 cognominal joined 14:24 justatheory joined 14:25 mako132_ joined
Limbic_Region anyone know who is the keeper of S29 and where the draft copy might be available for perusal? 14:30
dev.perl.org/perl6 says it is Rod Adams 14:31
last modified 2006-03-16
but I also seem to recall one in the Pugs repository too
14:31 cognominal joined
Limbic_Region nevermind - it isn't there 14:32
14:36 renormalist left
moscaoo How I got the sub-second? 14:38
14:44 lichtkind joined 14:45 cognominal joined
gaal [OT] a c REPL: neugierig.org/software/c-repl/ 14:48
svnbot6 r9897 | fglock++ | PC-Precedence - fixed postcircumfix 14:55
14:58 penk left
moscaoo How i got the "day of the year"? For example: 1 January = 0, 2 January = 1.. 15:04
Limbic_Region moscaoo - it sounds like you are looking for julian date 15:05
PerlJam moscaoo: Jan 1 == day 1 , you're count is off :)
Limbic_Region this is a perl6 channel not a perl help channel so if you want to know how to do this in perl5 15:06
go to #perl and ask about POSIX 'strftime'
and fwiw - julian day is actually wrong but it is used incorrectly enough to be considered right
moscaoo [Limbic_Region] yes, julian date 15:08
how I got it?
15:08 amnesiac joined
PerlJam Limbic_Region: Even strftime uses %j for the julian day, so it's right enough :) 15:08
moscaoo: ask on #perl 15:09
Limbic_Region moscaoo - you go to #perl and ask how to use POSIX 'strftime'
moscaoo thank you
amnesiac no, you better want to read about it first :P
15:11 FurnaceBoy joined, m joined 15:20 hcarty joined
svnbot6 r9898 | fglock++ | pX/Common/Pugs-Grammar-Perl6 - perl6.pl - p6 grammar prototype 15:22
15:28 Aankhen`` joined
svnbot6 r9899 | gaal++ | r9912@sike: roo | 2006-04-10 14:48:40 +0300 15:28
r9899 | gaal++ | * Spec and test update: sign(undef) => fail, not undef
r9900 | gaal++ | r9913@sike: roo | 2006-04-11 18:24:21 +0300
r9900 | gaal++ | * make C<sign> and C<< <=> >> fail when an argument is undefined.
r9900 | gaal++ | * add a withDefined combinator for this kind of thing. Where else
r9900 | gaal++ | should we put it? C< cmp > probably, for a start...
15:34 hcarty left 15:41 chris2 joined 16:00 cjeris joined 16:04 justatheory joined 16:09 fglock joined 16:13 lumow joined 16:27 ghenry joined, m_ joined, m_ is now known as m 16:32 vel joined 16:33 vel joined 16:35 colares joined 16:36 cjeris left 16:37 pankaj_ joined 16:38 vel joined 16:42 pankaj_ joined 16:44 ghenry joined, Odin- joined, amv joined, LeTo joined, Juerd joined, audreyt joined, tewk joined, Steve_p joined
lichtkind can i say @primzahlen = 2,3,5,7,11,13,17,19,23; ? 16:45
pmurias hi all!
16:45 vel joined
fglock hi! 16:45
Limbic_Region I don't know - can you?
lichtkind ?eval @primzahlen = 2,3,5,7,11,13,17,19,23; 16:46
evalbot_9900 Error: Undeclared variable: "@primzahlen"
lichtkind ?eval my @primzahlen = 2,3,5,7,11,13,17,19,23;
evalbot_9900 [2, 3, 5, 7, 11, 13, 17, 19, 23] 16:47
lichtkind seems like array with one element which is listref
?eval my @primzahlen = (2,3,5,7,11,13,17,19,23); 16:48
pmurias pugs repo should set svn:eol-style to native automaticly
evalbot_9900 [2, 3, 5, 7, 11, 13, 17, 19, 23]
lichtkind ?eval my @primzahlen = ([2,3,5,7,11,13,17,19,23]);
evalbot_9900 [[2, 3, 5, 7, 11, 13, 17, 19, 23],]
lichtkind thanks evalbot 16:50
pmurias fglock: some file Pugs-Compiler-Tokenizer have mixed eol's, do you use the same repo in different operating systems? 16:51
svnbot6 r9901 | fglock++ | PC* - moved some files around
pmurias s/repo/working copy/
16:53 vel joined
fglock pmurias: yes - I use whatever is around :) 16:53
pmurias don't mind if i set eol-style to native? 17:01
fglock sure
integral there's a script in util/ to setup the standard properties on files 17:02
(it [util/add-svn-props.sh] also puts a mime-type of text/plain; charset=UTF-8 on the files) 17:03
pmurias why isn't it called automaticly upon file adding?
17:04 marmic joined
svnbot6 r9902 | fglock++ | PG-Perl6 - error calling superclass 17:06
17:06 pankaj_ joined, lumow left
FurnaceBoy pmurias, afaik, pre-commit hooks aren't allowed to modify the transaction? 17:08
integral pmurias: that'd have to be wired up server side
FurnaceBoy although I suppose a post-commit hook could do it 17:09
fglock I've got a problem in Pugs::Grammar::Infix.pm - '$self->SUPER::method' is calling the grandparent instead of the parent class 17:13
integral but unfortunately you can't access the hooks. you have to set them up using direct access to the repository
kolibrie fglock: how did that happen? 17:15
fglock I'm still debugging - it's something about some modules calling each other and interaction between BEGIN blocks 17:17
kolibrie nasty
Limbic_Region is there somehow circular inheritence then?
fglock I guess I'll just put everithing in a single module for now
everything 17:18
pmurias intergral: who can access them?
Limbic_Region avoids making a very bad joke about fglock going back in time and being his own father
17:19 q[uri] joined
fglock yes, it looks like circular inheritance - will try to fix it 17:19
integral pmurias: people who run openfoundry I guess, but not generally just people who use them for hosting
Limbic_Region fglock - out of curiosity - you are using SUPER because you have subclassed and overidden a method and need to invoke the original method from the parent right 17:21
fglock yes 17:22
Limbic_Region it would be interesting to know then what would happen if your subclass didn't overide the method and you let dispatch find it 17:23
not that it solves your problem - just seems like an interesting problem
kolibrie fglock: so your current work will allow people to write a grammar in p6, compile it to p5, and obtain match objects or AST structure from p5? 17:24
Limbic_Region fglock rawks 17:25
fglock kolibrie: I'm doing quite a few things - Pugs::Compiler::Rule compiles Rules to p5
lrep compiles simple p6 to p5
17:25 Qiang joined
fglock the other modules compile full-p6 to AST 17:26
Limbic_Region fglock - and this all "just works" - the person using your stuff doesn't need to know which to use where right 17:27
fglock Limbic_Region: ?
Limbic_Region I guess what I am asking is - do I need to know if I need lrep to use it 17:28
IOW - if I wanted to write X in p6 but have it run on p5 - do I need to know which thing(s) you are working on will accomplish that or can I just use fglock::rawks 17:29
kolibrie fglock: I'm interested in general-purpose data-extraction using p6 grammars, producing some AST structure defined by the grammar 17:31
pmurias kolibrie: the p6 grammars are the most mature part
fglock Limbic_Region: you can use lrep to compile simple p6 to p5 - you can call methods and rules just like normal p5 code 17:32
Limbic_Region that doesn't answer my question
how do I know what I need to use
fglock kolibrie: lrep can probably compile your grammar to p5, if you only use the things that are already implemented 17:33
kolibrie fglock: does it support return?
Limbic_Region if I knew nothing about your projects other than they are used to run p6 code on p5 - how would I choose which pieces were right for the p6 I was writing?
fglock Limbic_Region: you can use lrep to compile modules written in p6; you use P::C::R if you need rules inside your p5 code
kolibrie: yes 17:34
kolibrie fglock: cool - I'll try to build something this afternoon
fglock Limbic_Region: you can use P::C::Tokenizer or P::C::Precedence if you are writing a P6 compiler yourself 17:35
but P::C::Precedence can be used with AST in general 17:36
17:36 pankaj__ joined
PerlJam fglock: er... why are those restricted to "writing a perl6 compiler"? 17:37
fglock: specifically, P::C::P
does it have intimate knowledge of P::C::T? 17:38
fglock the tokenizer is specific to p6, mostly - but the op-precedence is generic
PerlJam okay, good.
Limbic_Region fglock - so IOW, if lrep doesn't do the job then you are on your own but here are the tools you need to survive in the desert?
fglock yes :)
PerlJam hands Limbic_Region a device that pulls water from N-dimensional space but forgets the instruction manual. 17:39
fglock lrep is "here is a bootstrapped p6 compiler"
17:39 _bernhard joined
fglock the other ones are tools for building a real compiler 17:39
Limbic_Region ok - I got it 17:40
if you want rules in p5 but want to write p5 - use X
if you want to write p6 and don't want to worry about how it gets to p5 - use Y but understand that it can't handle everything yet
if you wrote some p6 that Y couldn't handle or you are just interested in writing your own p6 compiler - use Z 17:41
17:41 justathe1ry joined
fglock if you want operator-precedence use W (rules are not the best tool for this) 17:42
PerlJam The time isn't quite ripe yet (IMHO), but it would make for an interesting article on perl.com (or elsewhere) to explain all of the tools that has come from parrot/pugs/perl6
Just a survey article "here are all of the tools"
then later, as the technology matures, some "here's how to use tool X" artricles.
Limbic_Region fglock - I asked the way I did (like an idiot) mostly because I wanted to write a follow up perlmonks node on the matter and partly because I am an idiot 17:43
fglock which node?
Limbic_Region saying that you can do p6 on p5 today without some more specific instructions is unlikely to draw any attention 17:44
perlmonks.org/index.pl?node_id=534224
Limbic_Region doesn't think the Perl6:: modules on CPAN today are used very much so why would this be any different 17:45
fglock I think the important points are - we have a bootstrapped compiler (and we can now work on a more complex one); and - you can help even if you only know perl5
compiling p6 to p5 is a byproduct 17:46
Limbic_Region fglock - well, what you sell and how you sell all depends on your target consumer
I'm not a marketing guy but I know what it takes for me to open the wallet 17:47
PerlJam idly wonders if anyone will recast the parser in HOP in terms of perl6 (or at least one of the bootstraps :-) 17:49
fglock the parser in PCR look a lot like the one in HOP - and that's a coincidence 17:51
kolibrie PerlJam: I thought someone already did: examples/hop6/Parser.pm
PerlJam kolibrie: oh did they? I haven't even looked.
fglock bbiab & 17:52
PerlJam fglock: I don't think it's so much of a coincidence if you understand the concepts elucidated in HOP
17:59 ruoso joined 18:00 pankaj__ is now known as spo0nman 18:02 KingDiamond joined 18:03 cognominal joined
fglock back 18:24
18:25 larsen joined
pmurias is there a way to trace how Inline::C compiles stuff? 18:28
Limbic_Region pmurias - IIRC there are flags for that 18:29
you can even make it so it doesn't remove the temprorary work in progress 18:30
Limbic_Region tries to find it 18:31
pmurias found them
thanks 18:32
Limbic_Region used them to have Inline::C write his XS for him (the easy way) 18:33
pmurias ordering Inline to print the details of the compile, made it give up,and solve the problem by itself 18:35
18:36 mako132_ joined
Limbic_Region heh - It was a heisenbug then 18:39
svnbot6 r9903 | fglock++ | Pugs-Grammar-Perl6 - tokenizer works for both operators and operands;
r9903 | fglock++ | generates the operator precedence table
18:40 david__ joined 18:45 chris2_ joined
pmurias Inline::C dosn't want to bind functions which return Parrot_Interp(dispite passing the typemap file mapping it with TYPEMAP 18:49
)
TYPEMAPS actually 18:50
18:52 p5evalbot joined
pmurias fixed the bug used void in the parameter list 18:53
svnbot6 r9904 | fglock++ | Pugs-Grammar-Perl6 - fixed long-names 19:00
r9905 | fglock++ | Pugs-Grammar-Perl6/perl6.pl - the expression compiler works 19:09
fglock that's the 3-layer perl6 compiler working :) 19:10
kattana_ :) fglock++ 19:11
fglock it still needs a lot of refactoring - the code is scary
Limbic_Region scary or ugly? 19:15
and flgock++
fglock both - perl6.pl is the prototype - now it needs to be separated into modules 19:17
bbiab &
19:20 nothingmuch joined 19:21 lichtkind joined
kolibrie fglock++ # 3-layer perl6 compiler works 19:22
ruoso fglock++ 19:27
19:29 chris2 joined
fglock back 19:34
19:34 nothingmuch_ joined
fglock ruoso: hi! 19:35
ruoso fglock, hi... 19:40
fglock, does this code already emits perl 5 code? 19:42
it looks like it does 19:43
ruoso is sad he doesn't have the time to play with it... :( 19:44
fglock ruoso: it generates AST only - actually, it generates perl5 code for compiling p6
but it doesn't do AST->perl5
ruoso hhmmm so it's still Perl 6 AST
fglock yes - but it can compile much more complex expressions than lrep does 19:46
ruoso fglock, nice...
but we still need a "Perl 6 AST -> Perl 5 AST" converter (we actually need to define what "Perl 5 AST" means) 19:47
or do you plan to use it to generate PIR?
fglock now you can build extendable languages - like, you can define new precedence levels in the rule compiler
19:48 avarab_ is now known as avarab, Cyrup joined
fglock ruoso: currently, it is a development platform for the p6 grammar - the objective is to define a single grammar that can be used by ghc-pugs, and pge-parrot 19:49
it's intentionally modular - so everithing after the AST will be done by other modules
everything
it would be nice if even the existing modules could be pluggable 19:50
also, Pugs::Compiler::Perl6 doesn't aim to be self-hosting - but it can be translated to p6 later 19:54
svnbot6 r9906 | fglock++ | PG-Perl6 - Pugs/Grammar/Expression.pm - encapsulates the expression parser
ruoso as soon as I have some free time, I'll try to play with languages/perl6 inside parrot... 19:58
mugwump we'll really be getting close to a p6 pre-alpha soon 19:59
one these grammars are used by pge on parrot etc
ruoso wishes he could have more free time...
mugwump, in theory the grammars fglock is writing can be used inside PGE... 20:00
s/inside/with/
mugwump ruoso: yes, as I mentioned in my talk last night to Wellington.pm (utsl.gen.nz/talks/perl6.now) 20:01
svnbot6 r9907 | fglock++ | PG-Perl6 - Pugs::Grammar::Expression->parse( q(10 + $a / "abc") )
r9907 | fglock++ | returns a match with AST
fglock ruoso: try Pugs-Grammar-Perl6/perl6.pl
ruoso running make in all Pugs-.+-.+ 20:04
fglock, impressive... 20:08
but it looks a lot like an optree 20:09
fglock and it is completely modular and extendable :)
ruoso :)
fglock you can change the AST at will
this is just what I need for testing
ruoso fglock++ 20:10
justathe1ry is learning Ruby
20:10 justathe1ry is now known as justatheory
fglock the plan is to have the AST in a separate module - but I'm not sure how to link modules together yet - maybe I'll use a compiler factory 20:11
ruoso fglock, I don't think you need to have such thing... let people write their compilers choosing from a set of individual modules
justatheory I'm trying to remember, does Perl 6 have something like Ruby's symbols/
fglock ruoso: it may be useful to have a default compiler in which you just say my $compiler = Compiler->new( rule_ast => 'mymodule' ) - but this is just syntax sugar 20:13
ruoso fglock, you can provide it as yet another separated module... 20:14
it doesn't need to be part of the rest
fglock yes, but you need to tell the compiler to use the other module instead of the default 20:15
ruoso hmm.... maybe you want to delimit better each layer... 20:17
in theory you should have A -op1-> B -op2-> C -op3-> D
justatheory ruoso: ah, cool.
ruoso I mean, each part should receive an input, return an output and that's all... 20:18
svnbot6 r9908 | fglock++ | PG-P6 - added tests for the expression parser
ruoso and then you can combine any implementation of op1,op2 and op3 to make a X -> Y compiler 20:19
fglock ruoso: the matching and ast generation are kind of glued together by using return-blocks 20:20
but I'm making it modular by using callbacks
ruoso hmmm... 20:21
wouldn't it be better to have the match returning just the match... and feeding the match to a match2ast module? 20:22
I mean... Perl 6 -matcher-> P6Match -match2ast-> P6AST 20:23
fglock it's much more complex - that's how parrot/TGE would work
but audreyt is the right person to ask 20:24
ruoso yes... that's MATCH -> PAST -> POST -> PIR 20:25
but separating the match from ast building can make it easier to detect dialects that can be represented in a smarter way in the ast... 20:27
20:33 vel joined
pmurias ruoso: hi 20:33
ruoso pmurias, hi 20:36
svnbot6 r9909 | fglock++ | PC-P6 - new module Pugs/Grammar/StatementControl.pm
20:43 larsen_ joined
svnbot6 r9910 | fglock++ | PG-P6 - added non-working test for statement-control 20:51
fglock audreyt, TimToady: what's the plan for detecting end-of-expression? like in 'if 1+1 {...}' - is it the space+'{' delimiter? 20:54
ruoso hopes the parenthesis are allowed only for expressions that doesn't contain blocks... 20:59
/parenthesis/non-parenthesis/ 21:00
it would be weird to have if {block condition} {run block}
mugwump isn't it just: if EXPR BLOCK
ruoso is a block an expression? 21:01
if $a = { closure } { block } 21:03
TimToady space + block is a top-level block only where an operator is expected, and you're not in brackets. 21:04
where a term is expected, it's just a closure argument. 21:05
(or a hash composer)
21:05 SamB joined, Southen_ joined, azuroth joined
pmurias if {block condition} {run block} is the tcl wat 21:05
s/wat/way/ 21:06
TimToady early Perl had "if BLOCK BLOCK" but we eventually deprecated it.
ruoso but... should 'if { a => 1 } { block }' work? 21:07
21:08 FurnaceBoy_ joined
TimToady a hash is true if it has any entries in it, so sure. 21:08
On the other hand, we haven't given an ordinary bare closure any kind of boolean value.
ruoso so... if { my $a = 1; print $a } { my $a = 2; print $a } is valid 21:09
TimToady so you'd have to write "if do { $retval } { block }" for that.
ruoso I know it would probably do nothing... 21:10
but it's still valid syntax...
TimToady if a bare closure has any kind of boolean value, it'd probably be true if defined. You need "do" to call it, or .() after.
Yes, the question is whether it has any useful semantics. 21:11
ruoso well... if you have how to get it later... maybe...
mugwump TimToady: is there a brief answer to when {} is a block and when it's a hash constructor? 21:12
ruoso at least for an obfu
TimToady Probably should give you "Useless use of a closure in boolean context" or some such.
mugwump someone asked me that last night, and I said I didn't know
TimToady basically if the top level looks like a list of pairs.
mugwump is that look-ahead? or is a block that returns just pairs automatically a hash constructor? 21:13
(I guess perl5 map { } already does something like this)
TimToady A bare block that just returns pairs is turned into a hash composer, basically. 21:14
mugwump what about an empty list of pairs?
21:14 vel joined
mugwump my $foo = {} 21:14
or my $foo = {function()}, where function() returns a list of pairs 21:15
TimToady I believe it defaults to hash in the absence of evidence to the contrary.
no, it has to syntactically be a list of pairs, (or at least the first list item has to be a pair).
if it's too ambiguous, you should just use hash() instead. 21:16
theorbtwo So does it default to hash in the absense of evidence to the contrary, or must it be syntactically a list of pairs?
They seem in direct conflict.
TimToady It's possible to fudge it so it works out. "do {}" is evidence to 21:18
the contrary.
as is {}.()
A bare {} is assumed to be hash, but we can also give it a polymorphic interface to .() that does nothing. 21:19
the important thing is that
$x = {};
$x<foo> = 1;
works.
ruoso should $x = {}; $x.() also work??? 21:20
TimToady Isn't that what I just said?
ruoso yes... just to be sure...
TimToady you don't have to allow for extensibility of the Code role, unlike the Hash role 21:21
mugwump heh, so {} both .does(Code) and .does(Hash)... sick, I like it
TimToady one could go as far as to disable the Code role as soon as you know it's a hash.
but there doesn't seem to be much point. 21:22
ruoso or as soon it's assigned to a var that is a hash
TimToady bound, I assume you mean.
ruoso yes
sorry
ruoso is used to some portuguese terms that conflict... 21:23
TimToady Maybe all hashes respond to .(), and empty hashes just happen to return undfe.
*undef
ruoso hmm... after all { a => b } can be understood as a closure that returns a pair... oooo... 21:24
TimToady maybe all Hashes and Arrays do generalized list comprehensions with the .() interface.
But that doesn't square entirely with Capture objects.
mugwump hey, btw, I ended up talking about the new inline/multiline comments thing to Wellington.pm... 21:25
TimToady I hope you told them how ugly it is. :) 21:26
mugwump and got groans when I mentioned 'except in the first column', and some smart aleck came up with some idea about adding a trailing # :)
avar likes inline comments;) 21:27
mugwump but hey, all's fair if you predeclare 'n' all
TimToady right-o
avar But I don't think they'd fit well into the Perl 6 syntax
mugwump avar: backlog for the flames 21:28
TimToady Er...
mugwump or refer p6l discussion
avar mugwump: I know
TimToady Or just read S02.
pmurias good night
TimToady sweet dreams 21:29
avar I sometimes use them in C when I have something like if (foo() || bar()) which I turn into if (/*foo() ||*/bar()) while debugging ;)
mugwump yeah, that's one handy use for them
sri_ stevan: ping 21:33
sri_ wants a new Moose
mugwump sri_: what's wrong with Moose at the moment? Missing higher order types? 21:34
sri_ missing roles
mugwump 0.03_01 has them
pause.perl.org/incoming/Moose-0.03_01.tar.gz
apparently cpan isn't replicating it or something 21:35
sri_ not found
mugwump or you can pull "cpan" branch from git://utsl.gen.nz/Moose
(that's my repo, not his :))
sri_ i'd prefer a tarball :)
mugwump www.utsl.gen.nz/pm/Moose-0.03_01.tar.gz 21:36
stevan sri_: you can ask in #moose too :) 21:37
sri_ mugwump++
stevan sri_: roles are incomplete though
sri_ hope it's complete enough fwiw 21:38
stevan sri_: wdyw?
sri_ i tell you once i know :)
stevan :)
sri_: ping me in #moose if it doesnt do what you want, and we can talk 21:39
stevan wanders off to eat some dinner
sri_ stevan++ 21:40
avar dinner++ 21:41
svnbot6 r9911 | fglock++ | PG-P6 - StatementControl.pm - parses bare block 21:49
fglock what category '<expression>?;' belongs to? 21:51
TimToady don't understand what you're asking... 21:57
fglock is there a category for plain-statement? 21:58
TimToady expression is one of the things in statement_control perhaps?
fglock I'll try to use it as statement_control 22:02
later & 22:12
svnbot6 r9912 | fglock++ | PG-P6 - added a failing test for 'statement;'
22:15 fglock left 22:16 Limbic_Region joined 22:25 tri joined 22:26 mako132_ joined
tewk ā„¢ 22:34
ā„¢ā„¢Ā”
Juerd Āæā„¢? 22:49
mugwump has ā„¢ bound to AltGr+Shift+8 on his keyboard :) 23:03
23:25 ruoso joined
ruoso starting to play with languages/perl6 in parrot... 23:25
ruoso having to debootstrap debian unstable to get prebuild parrot... 23:26
s/prebuild/prebuilt/
TimToady parrot builds rather rapidly (compared to Pugs). 23:27
mugwump and ghc6
avar TimToady: what doesn't?;)
mugwump OpenOffice ? :) 23:28
ruoso OpenOffice has 200Mb source
(ok... that probably includes artwork)
mugwump the OOo build takes something like 8 hours on a reasonably well equipped amd64 23:29
23:29 Cyrup left
avar Ugh, OO 23:30
Does it still need tcsh to build?
ruoso worse... it needs java
fortunally gcj is sufficient... 23:31
ruoso wonder where is Parrot::Config 23:34
I could find Parrot::Configure
but not Config
23:35 ruoso left, ruoso joined
ruoso realizes Parrot::Config should be one result of the build process... 23:41
ruoso also realizes the debian maintainer didn't include it in the final package... 23:42
ruoso will rebuild parrot and submit a bug report... sigh... 23:44
rafl, ping 23:46
nice to have the maintainer around :)
TimToady I'd go ahead and build bleedparrot--they seem to keep it pretty clean, and I always run pugs against the latest parrot. 23:47
ruoso hmm... debian version is still 0.4.2... 23:48
that's bad... 23:49
TimToady most days parrot passes 100% of its tests.
in a few minutes I can tell you whether today's bleedparrot passes. 23:50
ruoso hmm... that would be really nice...
but 23:51
0.4.3 is quite recent...
less than 10 days
it wouldn't hurt... 23:52
i think
TimToady r12178 (today) at least passes all pge, I can tell you. 23:53
All tests successful, 8 tests and 354 subtests skipped. 23:54
Files=230, Tests=4650, 317 wallclock secs (148.74 cusr + 47.46 csys = 196.20 CPU)
ruoso ok... I'll take it...
rafl, do you think it makes sense to have a parrot-svn package? 23:55
rafl, if you want help on the parrot package I can package the 0.4.3... 23:56
in the meanwhile
I'll build r12178
arcady I'd say most people are still getting it from svn and building themselves
ruoso I'm the lazy type...
TimToady I build it pretty much every day. 23:57
ruoso if it's in debian I prefer taking it...
TimToady It's not clear that the monthly builds are any cleaner on average...
ruoso 0.4.3 is just a monthly build?
TimToady basically
ruoso hmmm... that changes everything... 23:58
TimToady all you really know is that it built cleanly on leto's machine.
ruoso ok...
TimToady though I suppose he might have more than one he tries it on.
23:59 mako132_ joined