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.
00:04 araujo joined 00:22 eggzeck joined 00:27 nekokak joined 00:40 thepler joined 00:42 eggzeck joined 00:44 gnuvince` joined 00:45 gnuvince` is now known as gnuvince 00:49 rodi joined 00:58 lyokato joined 01:05 owlsoul left 01:18 lyokato joined, nicodaemos joined 01:30 nekokak joined 01:33 fayland joined 01:54 fayland_ joined 02:00 fayland_ is now known as fayland 02:03 scsibug_ joined 02:44 coke joined 02:47 jrockway joined 03:01 mako132 joined 03:21 drbean joined
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
04:16 gantrixx joined
coke realizes he meant to say that on #parrot, not #perl6 04:20
04:20 USER__ joined, coke left
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
04:31 USER__ is now known as shar 04:34 [||-skotti-||] joined 04:35 [||-skotti-||] left
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
04:38 evalbot_r14721 is now known as evalbot_r14732
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 => {}␤)
04:47 mdiep joined 04:49 mdiep joined 04:59 scw joined 05:06 fayland_ joined 06:02 fayland__ joined, fayland__ is now known as fayland 06:15 BooK joined 06:28 kanru joined 06:37 pva-UF joined 07:09 marmic joined 07:28 iblechbot joined
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
07:36 nicodaemos joined 07:37 drrho joined 07:38 SCalimlim joined 08:09 BooK_ joined 08:20 fayland__ joined 08:27 Southen joined 08:29 fayland___ joined, fayland___ is now known as fayland 09:21 aje joined 09:27 buetow joined 09:28 kane-xs joined 09:44 idiotmax joined 10:03 andara joined
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
10:26 AndreySidorenko joined 10:30 elmex joined 10:32 avar joined
nothingmuch mooooooooooooooooooo 10:48
Juerd_ (__) 10:52
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~
10:56 ruoso joined
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
11:18 fglock joined 11:31 boo___ is now known as boo_, theorb is now known as theorbtwo 11:43 eggzeck is now known as eggzeck[laptop] 11:46 eggzeck joined 11:56 anatolyv joined 12:02 nipotan is now known as nipotaway 12:03 TimToady joined 12:22 Psyche^ joined 12:39 Psyche^ is now known as Patterner 13:08 eggzeck joined 13:15 wrac joined, iblechbot joined
nothingmuch audreyt: ping 13:18
13:35 Limbic_Region joined 13:37 GnuVince joined
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
13:45 drbean joined 13:48 sjn joined
sjn o/ 13:48
13:55 ruz joined 13:58 mr_ank joined
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
14:01 [particle] joined 14:10 polettix joined
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
14:54 rodi joined
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
15:10 penk joined, fglock joined 15:11 iblechbot joined
anatolyv sjn: perl5 is extremely idiosyncratic, with lots of things in it that are essentially defined by its (only) implementation. 15:11
15:12 mdiep joined
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 :)
15:14 cjeris joined
aje baest_: ping. :) 15:16
baest_ aje: pong
15:16 baest_ is now known as baest 15:20 vel joined
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
15:26 Eimi joined
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)
15:28 bonesss joined
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
15:35 mdiep joined 15:38 Eimi joined
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
15:52 wolverian joined
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
15:57 hexmode joined 16:03 the_dormant joined 16:07 crem joined 16:09 ingy joined 16:19 justatheory joined 16:27 norageek joined 16:28 gene9 joined 16:32 rodi joined 16:33 audreyt joined
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
16:37 thepler joined, cmarcelo joined
cmarcelo ola. 16:38
16:45 ofer1 joined 16:53 eggzeck_ joined, eggzeck_ is now known as eggzeck[laptop]
gaal hee! yhc haskell -> js is available 17:00
eviltwin_b haskell -> js? 17:08
eviltwin_b boggles
17:10 awwaiid joined
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...
17:19 marmic joined 17:22 mako132_ joined 17:34 andara left, chris2 joined 17:40 trym_ joined 17:45 rodi joined 17:51 ashleyb joined
nothingmuch nothingmuch.woobling.org/Generate-PMC/ 17:53
lambdabot Title: Index of /Generate-PMC
ingy hi nothingmuch!! 17:57
17:58 ruoso joined
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
18:07 weinig joined 18:44 HiTech69 joined
GeJ Good morning all 18:47
18:59 fglock joined 19:13 buetow joined, eggzeck_ joined, eggzeck_ is now known as eggzeck[laptop]
nothingmuch audreyt: MO can dish out an el-cheapo .pmc ;-) 19:14
see #moose
19:27 justatheory joined 19:32 SubStack joined 19:34 sweinig is now known as sweinig|away
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
19:43 elmex joined
nothingmuch yes =) 19:43
fglock home & 19:44
nothingmuch run &
19:44 fglock left 19:50 bernhard joined 20:11 larsen_ joined
dmq Is there a Perl6 regex pattern for doing relative backreferences? 20:27
20:28 zekvent joined
PerlJam dmq: what's a "relative backreferece"? 20:29
20:31 lisppaste3 joined 20:33 Aankhen`` joined
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
20:46 dduncan joined
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
21:04 Daveman joined 21:13 boo__ joined 21:18 dbrock joined 21:23 buubot joined 21:28 jferrero joined 21:34 thepler joined
GnuVince ?seen audreyt 21:34
lambdabot audreyt is in #ghc, #haskell and #perl6. I don't know when audreyt last spoke.
21:37 anatolyv joined
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
21:51 sweinig|away is now known as sweinig 21:53 buubot joined 21:57 justatheory joined
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
22:24 gnuvince joined 22:27 hexmode joined
anatolyv dmq: why is that the solution? 22:29
dmq i didnt say the i said a. 22:31
:-)
anatolyv :) 22:36
22:40 Limbic_Region joined 23:01 SubStack joined 23:02 zekvent left 23:08 sweinig is now known as sweinig|bbl
nothingmuch sup homies 23:16
23:18 zekvent joined
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
23:41 buetow joined 23:42 zekvent left
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
23:46 cjeris left
[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
23:55 mr_ank joined