svn switch --relocate svn.openfoundry.org/pugs svn.pugscode.org/pugs/ | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com
Set by lumi on 8 November 2006.
coke realizes the main website never mentioned the hackathon. 03:57
coke fixes that oversight, belatedly. 04:03
cognominal notes that in regular Perl code interpolated in a regex, there is not much choice in the granularity of backracking. There is fail and that's it 04:05
or do I miss something?
eviltwin_b doesn't know but would assume "fail" should backtrack out of the clause containing the closure and trigger any alternatives. (which doesn't mean that's implemented, or that he's correct in his assumption) 04:15
coke realizes he meant to say that on #parrot, not #perl6 04:20
eviltwin_b (you don't really need more granulatiry than that because you cn describe the rest in the regex surrounding the closure 04:22
cognominal well, I want to back out the alternation not the regex 04:27
eviltwin_b so presumably fail is not yet doing the right thing, if it's not doing that 04:28
or else the synopsis is being unclear; I read it as being like any other failure i.e. failing the current alternative
cognominal anyway pugs seems not to handle closures in regex yet 04:35
eviltwin_b guess that solves that problem, then :) 04:36
cognominal ?eval token tk { { } } 04:38
evalbot_r14732 undef 04:38
cognominal apparently the eval bot is smarter than my pugs
?eval token tk { a { say "1"; fail; say "2" } | a { say "3"} } "a" ~~ m/<tk>/ 04:40
evalbot_r14732 *** Cannot parse regex: <tk>␤*** Error: ␤Match.new(␤ ok => Bool::False, ␤ from => 0, ␤ to => 0, ␤ str => "", ␤ sub_pos => (), ␤ sub_named => {}␤)
cognominal ?eval token tk { a { say "1"; say "2" } | a { say "3"} } "a" ~~ m/<tk>/ 04:41
evalbot_r14732 *** Cannot parse regex: <tk>␤*** Error: ␤Match.new(␤ ok => Bool::False, ␤ from => 0, ␤ to => 0, ␤ str => "", ␤ sub_pos => (), ␤ sub_named => {}␤)
eviltwin_b ?eval 512 ~~ / (\d+) { $1 < 256 or fail } /
evalbot_r14732 *** Cannot parse regex: (\d+) { $1 < 256 or fail } ␤*** Error: ␤Match.new(␤ ok => Bool::False, ␤ from => 0, ␤ to => 0, ␤ str => "", ␤ sub_pos => (), ␤ sub_named => {}␤)
cognominal ?eval token tk { { say "1"; } } "a" ~~ m/<tk>/
evalbot_r14732 *** Cannot parse regex: <tk>␤*** Error: ␤Match.new(␤ ok => Bool::False, ␤ from => 0, ␤ to => 0, ␤ str => "", ␤ sub_pos => (), ␤ sub_named => {}␤)
cognominal ?eval token tk { { } } "a" ~~ m/<tk>/
evalbot_r14732 *** Cannot parse regex: <tk>␤*** Error: ␤Match.new(␤ ok => Bool::False, ␤ from => 0, ␤ to => 0, ␤ str => "", ␤ sub_pos => (), ␤ sub_named => {}␤)
eviltwin_b ?eval 512 ~~ / (\d+) /
evalbot_r14732 Match.new(␤ ok => Bool::True, ␤ from => 0, ␤ to => 3, ␤ str => "512", ␤ sub_pos =>␤ (Match.new(␤ ok => Bool::True, ␤ from => 0, ␤ to => 3, ␤ str => "512", ␤ sub_pos => (), ␤ sub_named => {}␤ ),), ␤ sub_named => {}␤) 04:42
eviltwin_b guess it doesn't in fact do closures. or subrules
?eval token tk { (\d+) } 512 ~~ / <tk> / 04:44
evalbot_r14732 *** Cannot parse regex: <tk> ␤*** Error: ␤Match.new(␤ ok => Bool::False, ␤ from => 0, ␤ to => 0, ␤ str => "", ␤ sub_pos => (), ␤ sub_named => {}␤)
audreyt at SeaTac airport, boarding in <40min 07:30
lambdabot audreyt: You have 4 new messages. '/msg lambdabot @messages' to read them.
audreyt didn't get any MO work done :/ been jetting and lagging...
@massages
lambdabot cmarcelo said 2d 8h 33m 6s ago: i'll have some free time this week and with proper guidance I can help you doing oldland => newland or another groundwork... @tell me if it's the case.
Limbic_Region said 12h 52m 24s ago: Win32 build failure due to Pugs.Internals.ID sial.org/pbot/21082 I guessed that it had something to do with Pugs.cabal.in but just adding it as an exposed
module didn't fix the problem (though it died for a different reason)
Limbic_Region said 10h 32m 46s ago: nevermind the Pugs.cabal.in - apparently I was on the right track but there was more missing than just ID - fixed by cmarcelo++
nothingmuch said 9h 59m 48s ago: MO::Emit::P5 is ugly, but it works ;-) nothingmuch.woobling.org/MO/t/native_p5.t
audreyt nothingmuch: ooh. looking... 07:32
svnbot6 r14733 | andara++ | [runpugs] 10:07
r14733 | andara++ | -Added POD
r14733 | andara++ | Please test the runpugs devel version:
r14733 | andara++ | interactive: feather.perl6.nl:8080/cgi-bin/runpugs2
r14733 | andara++ | non-interactive: feather.perl6.nl:8080/cgi-bin/runpugs2?ia=0
lambdabot Title: Run Perl 6 Now -- in your browser!
Title: Run Perl 6 Now -- in your browser!, tinyurl.com/ymunfl
avar andara: one neat feature would be to stop backspace over pugs> 10:22
don't know if that's easy in js though
nothingmuch mooooooooooooooooooo 10:48
Juerd_ (__) 10:52
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~
svnbot6 r14734 | fglock++ | r15614@flavio-glocks-computer (orig r14721): fglock | 2006-11-10 23:00:13 -0200 11:13
r14734 | fglock++ | MP6 - fixed nodes s/Op:*/Apply/ (no name mangling yet)
r14734 | fglock++ | - Grammar.parse() compiles 'CompUnit's
r14734 | fglock++ | - 'grammar' compiles to CompUnit
r14734 | fglock++ | - method signature is optional
nothingmuch that's a cow, señor
Wøø_øøW 11:14
o o
| |
{-}
UGHGUGHG 11:17
third non spam job-interview-email thing this week
nothingmuch audreyt: ping 13:18
Limbic_Region salutations all 13:37
couple of questions - does andy frequent freenode and if he does, does he go by andy or petdance? 13:38
sjn o/ 13:48
nothingmuch audreyt: do you know if it's possible to change the pkg for a sub? 13:59
andara avar: I don't think it's very hard. I'll look into it. 14:00
smash_ good afternoon 14:13
sjn Q: I got the impression somewhere that there's work being done on automatic translation between Perl6 and other languages (back and forth, I assume). Have I understood correctly? 14:14
xinming sjn: I think you mean compile perl 6 to other language. :-) 14:17
sjn: and the answer is yes, we can now compile perl 6 into perl 5, javascript, haskell...
sjn how about the other way around? (JS, P5, Haskell to P6) 14:20
xinming sjn: I think they need a compiler.. ;-) 14:33
sjn: did you ever meet a program which translates machine language in to c? or even into basic... 14:34
sjn AFAIK, they're called "decompilers" 14:36
xinming sjn: What I mean is just a direction.... If you have source, you can translate to other forms easily, So does javascript -> perl 6, the problem is at javascript compiler side. 14:39
sjn Can't name one though. They're kind of mythcal beasts to me :)
avar andara++ # yay 14:43
sjn was thinking "why limit translation to just one direction, when the community anyway is creating 'translation devices' (compilers) from scratch?"
andara avar: got it working here on my box :-D
avar andara++ # more yay 14:44
andara: I also want ponies, give me ponies!
>:)
andara avar : sure. how about pink flying elephants? 14:45
avar no, I hate those 14:47
xinming sjn: from your logic... You can "translate" asm in to C... Is that possible? yes, that's possible... but not now. 14:51
sjn xinming: Well, I was specifically interested in P6/Parrot/Pugs etc... asm<->C may be a lost cause, but I'm hoping *<->P6 isn't :) 15:04
xinming sjn: think about the problem when you replace P6 with C in your last word 15:05
sjn sure, that's difficult, but C isn't being designed and implemented as we speak. :) 15:06
anatolyv sjn: perl5 is extremely idiosyncratic, with lots of things in it that are essentially defined by its (only) implementation. 15:11
anatolyv was poking around p5's toke.c just the other day... ouch. 15:12
avar you have to toke before looking at toke.c maybe?:) 15:13
anatolyv doubt it'd help much :)
aje baest_: ping. :) 15:16
baest_ aje: pong
gaal where is .as specced? 15:23
ah, S02 and it's .fmt now 15:24
anatolyv it is? 15:25
gaal thinks so
anatolyv i see it in S02:582
Limbic_Region gaal - this may be a doc bug, but .... 15:26
anatolyv look in the end of S13, gaal
is that the as you were looking for? 15:27
Limbic_Region S02 also has a couple of .as(Bytes)
and .as(ArabicChars)
Limbic_Region thinks that's likely doc bugs though
gaal there used to be something called .as that did formatting. then it got renamed to .fmt to free .as for ascription. 15:28
anatolyv Limbic_Region: $foo.as(Bytes) is the same as $foo as Bytes same as infix:<as>($foo, Bytes)
gaal so thanks all.
(i was looking for .fmt)
anatolyv ah. 15:28
Limbic_Region was just grepping and not reading 15:29
cd docs/Perl6/Spec
grep "\.as" *.pod
gaal Limbic_Region: yes thank you I found what I was looking for :)
anatolyv curiously enough, that misses the discussion in S13, Limbic_Region :) 15:30
what's the regexp for "as, provided 'method' is somewhere within 20 chars of it"?
Limbic_Region antolyv - guess you could have used word boundaries for as 15:33
gaal anatolyv: i don't know the answer, but two things you can do in Rules that you couldn't in regexps is reentrancy and "fail" from within a rule 15:44
well maybe you could in p5 re, but you'd need special robes and stuff 15:45
anatolyv I keep wishing I remembered how to print a few lines of context for each match when grepping. I finally looked it up now. -B 3 -A 2 will print 3 lines before and 2 after. 15:53
nothingmuch audreyt: please see nothingmuch.woobling.org/MO/t/native_p5.t again 16:34
lambdabot tinyurl.com/ygur42
nothingmuch it's got a much nicer example at the bottom =) 16:35
cmarcelo ola. 16:38
gaal hee! yhc haskell -> js is available 17:00
eviltwin_b haskell -> js? 17:08
eviltwin_b boggles
GnuVince haskell that produces JavaScript code? 17:13
Ben la c'est correct 17:15
tout le monde est parti d􏿽xEEner.
nothingmuch ingy: scsys.co.uk:8001/5021 17:17
lambdabot Title: perl_web paste from "nothingmuch" at 81.29.65.220...
nothingmuch nothingmuch.woobling.org/Generate-PMC/ 17:53
lambdabot Title: Index of /Generate-PMC
ingy hi nothingmuch!! 17:57
ingy nothingmuch: what is that paste for? 17:59
nothingmuch ingy: hola 18:01
it's a refactor of Module::Compile's PMC freshness check generator
so that we can use it for non source filters
like Moose related shit
ingy nothingmuch: can you patch M::C? 18:02
nothingmuch ingy: it's not yet high quality enough 18:03
no tests, etc ;-)
i'm playing around
but yes, in a few days
ingy ok
nothingmuch i'll also remove the Moose dep
GeJ Good morning all 18:47
nothingmuch audreyt: MO can dish out an el-cheapo .pmc ;-) 19:14
see #moose
fglock MiniPerl6 can now parse all it's source files 19:38
now debugging the Perl5 code generator... 19:39
nothingmuch fglock: i'm making good progress too 19:40
i have a simple Point implemented in MO
that compiles to "regular" perl 5 objects
and thenthat is serialized into a .pmc
fglock nothingmuch: cool - I hope we can integrate the projects soon :) 19:42
nothingmuch yes =) 19:43
fglock home & 19:44
nothingmuch run &
dmq Is there a Perl6 regex pattern for doing relative backreferences? 20:27
PerlJam dmq: what's a "relative backreferece"? 20:29
dmq well you have a pattern like /(foo)\1/ 20:37
thats an absolute back reference
now consider a pattern like $qr=/(foo)\-1/; as a hypothetical example. 20:38
so as written those two would be the same.
but consider something like /$qr$qr$qr/
the latter Would Just Work. The former pattern couldnt be used that way.
IOW, how do you embed pattern snippets containing backreferences without using some form of relative backreference. 20:39
PerlJam dmq: good question 20:42
dmq since i just posted a patch for doing the same for recursive patterns im thinking of how it should be done for backrefs. 20:43
so far the best ive come up with is (?\-1) 20:44
:-(
the other options was some kind of escape like \R-1 20:46
dmq or \B-1 \B+1 20:46
or maybe \o1
PerlJam Well, in perl6 you'd access the "match structure" directly I think. If $/ is the match object, and $/[0] is $0 (same as $1 in perl5), $/[1] is $1, and so on, you'd probably just use $/[-1]. But I wonder if that loses the temporal aspect (or left-to-right-ness) in composition. 20:47
dmq er, but wouldnt those follow the same rules as to the difference between $1 and \1 in a pattern? 20:48
PerlJam perl6 doesn't have \1
dmq it doesnt? 20:49
[particle] nope, that's gone
PerlJam nope. You get your variables ($0 and friends) immediately.
dmq so how does it distinguish between "the contents of this matches nth buffer" and "the contents of the previous matches nth buffer"
for instance /($1)(\1)/ 20:50
PerlJam what do you mean by "previous match" exactly /
?
okay, the "previous match" is destroyed unless you've saved it somewhere.
dmq ..\perl -e"$_='foofoo'; /^(foo)/ and /($1)(\1)/ and print $2" 20:51
prints 'foo'.
so you dont have access to the previous matches result for the next pattern unless you copy it? 20:52
PerlJam I'm not definitive, but that's how I understand it.
It's easy enough to save things though. 20:54
IS this something you find yourself doing often?
dmq oh im not fussed. 20:55
im just trying to extend the perl5 syntax to do things that cant be done currently.
to a certain extent ive given up on using perl6 as a template since it is so utterly different from perl5. 20:56
PerlJam good plan :)
dmq But at the same time id prefer not introduce incompatibility if i can avoid it.
And of course i reckon some of the stuff ive come up against is worth consideration by Larry.
like being able to do an embedded qr// becomes much more powerful with relative backreferences. 20:57
PerlJam dmq: though, in this case you'd do well to emulate perl6 I think. Have a "virtual array" holds $1, $2, etc. and is available immediately. 20:58
dmq i dont freedom to do changes like that.
and we do do that i guess. 20:59
:-)
PerlJam Well, it's not like someone is going to be dependent upon this thing that you haven't invented yet :)
dmq no, but im certain people have not been able to do things they should have been able to do because of its absence
if only because i bumped into the issue myself. 21:00
[particle] wonders if C<<print $1 if 'foofoo' ~~ m/ ^ (foo) ::: ($0)($0) /> will do the trick 21:01
maybe ::: should be <commit> 21:03
GnuVince ?seen audreyt 21:34
lambdabot audreyt is in #ghc, #haskell and #perl6. I don't know when audreyt last spoke.
obra GnuVince: I'm sure she's badly jetlagged 21:42
GnuVince obra: okay, thanks. My question can wait :) 21:43
obra It's always better to just ask
smash_ good evening 21:44
ashleyb dmq: back from lunch... Hey I've already come across that problem of relative referencese. 22:00
for example I am trying to capture something in quotes like: 22:01
<tag arg1="doublequote" arg2='singlequote'>
and I need to match the quote marks
so I'll vote for this being a common thing. 22:02
the match for that previous tag would be something like: 22:03
dmq i figured i wasnt the only. 22:04
only one
the question is how to represent it tho.
ashleyb qr/arg1=("|')<-[$0]>+$0 arg2("|')<-[$1]>+$1/ 22:05
but that would, as you say be easier and more generalizable without the absolute references.
dmq lets hope you do a char class and not an alternation tho eh?
ashleyb alternation? 22:06
dmq Sorry, thats beside the point. Yes i agree its exactly this type of thing i had in mind.
well using perl5 syntax you wrote ("|') but youd be better off saying ["'] 22:07
ashleyb but that doesn't capture.
and that is perl6 syntax
dmq right, but even still youd be better off saying (["']) than saying ("|')
ashleyb ok
fiar
fair
dmq buts its a totaly distraction from the core point. sorry 22:08
:-)
ashleyb maybe the '$/[-1]'
is the best thing.
dmq yeah, something like that I would express like
er, well, never mind. you get it.
im not up to translating perl6 regexes to perl5 right now. 22:09
:-)
the syntax you propose might work in perl6, but i need a perl5 solution.
ashleyb use pugs::compiler::rule? 22:10
dmq im starting to think the best i can come up with is (?\-1)
ashleyb that's what I'm doing
dmq im working on extending the perl5 regex engine.
ashleyb ah
ok
dmq im just here for cross fertilization as it were. :- 22:11
)
cj poos on dmq 22:17
dmq er, wrong kind of fertilizer. :-) 22:19
its been suggested that a solution is to implement something like @/in perl5. 22:21
anatolyv dmq: why is that the solution? 22:29
dmq i didnt say the i said a. 22:31
:-)
anatolyv :) 22:36
nothingmuch sup homies 23:16
Limbic_Region the sky, the ceiling, certain appendages - nothing unusual 23:18
merlyn dev.perl6.org/ for pugs coming back soon? 23:31
I miss the updates. :( 23:32
svn.perl.org/perl6 I mean
GeJ m􏿽xF8􏿽xF8se everyone 23:36
If I remember correctly (but I may certainly be wrong), TimToady said that Perl 6 would be written in Perl 6. Is this still the plan? 23:38
nothingmuch GeJ: yes
GeJ hello nm 23:39
[particle] although we have future plans to convert the source to perl 7
GeJ Since TimToady stated that there won't be The One Perl 6, but several implementations as long as they pass the official test suite. Those implementations will be bootstrappers like pugs is. correct? 23:43
nothingmuch GeJ: not necessarily 23:45
it's less "official" than you think, i suspect
but for perl to Not Suck™ it should be self hosting
GeJ hum, not sure to follow you. 23:46
[particle] perl 6 has features that make implementation much easier if it's self-hosting 23:47
GeJ I think I didn't grok the "self hosting" part. 23:48
nothingmuch well 23:49
perl 6 is supposed to be a good language for writing compilers and stuff like that
high expressiveness
good support for transformations
powerful data types
powerful control flow
one of the design checks is making sure that it can be cleanly implemented in itself 23:50
GeJ ok 23:51
but at some point there'll be the bootstrap issue. Hence the need of implementations like pugs. right? 23:52
nothingmuch precisely 23:53