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.
00:18 nnunley_ joined 00:26 EdLin joined
theorbtwo ponders a parser. 00:35
00:37 Quell joined
theorbtwo It's not for a perl6-related project, but there are a lot of parsers from this channel that are meant to be nice general-purpose parsers (or parser-generators) for perl5, and I'm pondering using one of those, because the existing alternatives kind of suck. 00:43
Cough, cough... is this thing on?
buu No 00:56
theorbtwo Do you know what the best thingy that fits my description above is? Or, indeed, any of them? 01:00
Ah! 01:02
Pugs::Compiler::Rule
pugs/misc/pX/Common/Pugs-Compiler-Rule
01:07 jserv-- joined 01:23 EdLin left
pasteling "theorbtwo" at 62.56.24.236 pasted "Death of a salesman^W Pugs::Compiler::Rule" (16 lines, 410B) at sial.org/pbot/17021 01:29
theorbtwo boggles.
01:35 beppu` joined
audreyt {} ? 01:37
you mean []?
or []?
obra gr. I want my strongly typed perl5.
audreyt I mean, [<object>+]? ?
obra: perl5 is strongly typed.
maybe you want statically typed perl5 :)
obra I want multiple types, then
;)
It would have saved me an hour of "foo" being compared to a regex. 01:38
with "eq"
audreyt ahh.
obra "It's strongly typed. You can only have scalars"
Juerd And arrays, and hashes, ...
audreyt not true, there is also arrays and hashes and io and format and code!
...but yeah. nothing more than that
obra audreyt: hm should have the "sort by milestone" you want within a few hours. 01:39
audreyt oooooh
aufrank it always surprised me that format snuck in there as a basic type
audreyt will take a relook then
aufrank: it goes way back to perl1
aufrank yeah
audreyt that was the "r" part of perl
aufrank formats are one part of the Apocolypses that haven't gotten much attention since then 01:40
or did I miss that part?
obra "they're being moved into user space"
audreyt aufrank: see Perl6::Form on CPAN 01:41
aufrank checks 01:42
theorbtwo OOooh, life.
audreyt: I wanted \{ ... \}, and I'm not sure what I wanted with that inner object bit. 01:43
But if it's not going to give something more then "Unknown error", then I think I don't want to write my parser in it.
audreyt I think it's a Yapp thing.
which is certainly no excuse. :) 01:44
$job, bbiab
aufrank ?eval 'a' ~~ / a /; 01:49
evalbot_10184 *** Cannot parse PGE: a *** Error: Cannot find the parrot executable in PATH Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} )
TimToady my goodness, in my pugs that returns a much simpler value "Segmentation fault". 01:51
aufrank heh, mine too
I've been striving to get to the above error :)
TimToady evalbot may not build PGE embedded. Do you? 01:52
(I embed PGE)
theorbtwo It sounds like it doesn't, because otherwise it wouldn't need to attempt to find the parrot executable.
aufrank for my last build I took parrot out of the embed flags
but I still didn't get the error above
TimToady ok, I was running an ancient pugs by accident. 01:53
aufrank and what error do you get now?
TimToady I get a Match.new(...)
aufrank hrm 01:54
aufrank goes to build a fresh one
TimToady difference between running "pugs" and "./pugs"... :/
I stopped installing pugs when it kept rebuilding Yaml::Syck as root and then failing to clean up as non-root. 01:55
audreyt ?eval 1 ~~ /1/ 02:01
evalbot_10184 *** Cannot parse PGE: 1 *** Error: Cannot find the parrot executable in PATH Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} )
audreyt TimToady: that particular bug is now fixed
?eval 1 ~~ /1/
evalbot_10184 Match.new( ok => bool::true, from => 0, to => 1, str => "1", sub_pos => (), sub_named => {} ) 02:02
audreyt there you go
(external parrot)
TimToady It was aufrank's bug. (and me running an ancient pugs by accident) 02:03
or were you speaking of the Syck bug?
audreyt the syck one 02:05
it's now in third-party
and we no longer rm it before each build
aufrank ?eval 'a' ~~ / a /; 02:06
evalbot_10184 Match.new( ok => bool::true, from => 0, to => 1, str => "a", sub_pos => (), sub_named => {} )
aufrank hey, look at that!
when did that happen?
audreyt 5 minutes ago?
aufrank oh boy!
audreyt I built parrot and symlinked it in my feather's ~/bin/
aufrank hrm. if I run the installed pugs I get a segfault on matches. if I run pugs in the build directory, I get a bus error. 02:29
02:29 neoesque joined
audreyt I'll look at parrotembed bitrot later (or you can also fire up gdb) 02:30
meanwhile, build without embed; that should work. 02:31
aufrank ooh, sorry. this was without embed already =\
audreyt you sure? try ldd 02:32
shouldn't bus error without embed...
aufrank I did still get the bad magic number error that I posted last night 02:34
I should chase that one down and see if it's the culprit
audreyt also rm the installed parrot 02:35
parrot isn't designed to be installed :/
(yet)
aufrank oh, ok
audreyt it consistently links on wrong libraries
and even fails building
when there is /usr/local/bin/parrot and /usr/local/lib/libparrot*and /usr/local/include/parr*
aufrank so I should remove those, too? 02:36
audreyt yup
02:52 neoesque joined 02:55 justatheory joined 03:31 qu1j0t3 joined 03:36 weinig is now known as weinig|sleep
aufrank ?eval my $x = 'b'; my $y = $x ~~ / a b c /; say $x; say $y; 03:46
evalbot_10184 OUTPUT[b ] bool::true
aufrank ?eval my $x = 'b'; my $y = $x ~~ / a <(b)> c /; say $x; say $y; say $/[0]; 03:47
evalbot_10184 *** Cannot parse PGE: a <(b)> c *** Error: Null PMC access in invoke() OUTPUT[b ] bool::true
aufrank ?eval my $x = 'b'; my $y = $x ~~ / a (b) c /; say $x; say $y; say $/[0]; 03:48
evalbot_10184 OUTPUT[b ] bool::true
03:52 macroron joined
TimToady that's never going to match unless $x contains a and c as well. 03:53
and I don't believe PGE implements <( ... )> yet. 03:54
?eval my $x = 'abc'; my $y = $x ~~ / a (b) c /; say $x; say $y;say $/[0]; 03:55
evalbot_10184 OUTPUT[abc abc b ] bool::true
aufrank yeah, that's the ticket! 03:56
I was curious about $x = 'abc'; $x ~~ / (a) <(b)> c /; 04:02
what's in $/[0] and $/[1] ?
is it 'a' and 'b', or is there an interaction between the assertion and the regular capture 04:03
04:05 nirgle joined 04:07 KingDillyDilly joined
KingDillyDilly Two tildes should mean approximately equal to, and I don't care what anyone says. 04:07
04:07 KingDillyDilly left
TimToady $0 would end up with 'a'. $1 would end up with nothing. $$/ would end up with 'b'. 04:07
the parens in <(...)> have nothing to do with regular capture parens except by analogy. 04:09
aufrank ok
TimToady and conveniently, the value ends up in $(), so there's some mnemonic value there too.
aufrank that one makes sense :) 04:10
04:13 dvorak joined
aufrank TimToady: I don't find $$/ in any of the syns when I grep. Did I misgrep or is it not in there? 04:19
$($/) is there 04:20
04:22 nirgle left
aufrank is $$/ shorthand for $($/)? If so, is $$/ always the same as $() ? 04:23
TimToady yes, those are always the same. 04:27
$($a) and $$a are always the same. 04:28
aufrank thanks 04:35
04:35 Ymmv joined 04:55 ko1_away is now known as ko1 05:23 neoesque joined 05:27 Quell joined 06:00 FurnaceBoy_ joined, neoesque joined 06:01 FurnaceBoy_ joined, Quell joined, dvorak joined, beppu` joined, jserv-- joined, Blicero joined, xinming joined, drbean_ joined, SubStack joined, rgs joined, trym joined, meppl joined, beppu joined, theorbtwo joined, szbalint joined, q[uri]_ joined, gaal joined, Kattana joined, ajs_home joined, amv joined, evalbot_10184 joined, nothingmuch joined, miyagawa joined, stevan joined, stclare joined, steve`` joined, cjn joined, lisppaste3 joined, froh-doh joined, xern joined, Shabble_ joined, integral joined, perlbot joined, qwacky joined, sri_ joined, hcchien joined, rmoriz joined, rashakil joined, tcliou joined, Soga joined, PerlJam joined, oozy joined, arguile joined, Odin- joined, Grrrr joined, scw joined, arcady joined, merlyn joined, kane-xs joined, mugwump joined, Gothmog_ joined, broquaint joined, jabbot joined, kcwu joined, webmind joined, wolverian joined, knewt joined, jiing_ joined, rw-rw-r-- joined, cookys joined, Maddingue joined, gugod joined, ingy joined, locksy joined 06:06 f0rth_ joined 06:10 r0nny joined 06:30 ko1 is now known as ko1_away 06:33 Aankhen`` joined 06:34 iblechbot joined 06:57 r0nny joined 06:58 Ymmv joined 07:00 miyagawa joined 07:02 Quell joined 07:05 elmex joined 07:06 Alias_ joined
Alias_ seen audreyt? 07:06
jabbot Alias_: audreyt was seen 4 hours 29 minutes 28 seconds ago
Alias_ nice to see you finally got a bot that supports that
audreyt: Re: my comments the other day about using SQLite in the 6PAN client. You may be interested to hear that it looks like Firefox is going to be embedding SQLite for it's data storage :) 07:07
audreyt: So it looks like we won't be the only ones getting into that game :)
Anyways, that is all
07:07 Alias_ left 07:10 drrho joined 07:31 Cryptic_K joined 07:33 webmind joined 07:34 KingDiamond joined 07:37 Juerd joined, wolverian joined 07:39 ringen joined 07:40 audreyt joined 07:45 Aragone is now known as Arathorn 07:48 Juerd joined, audreyt joined, pmichaud joined, chip joined 07:50 integral joined, knewt joined, broquaint joined, Shabble joined, mugwump joined 07:51 kcwu joined 07:55 Quell joined 07:57 marmic joined 08:01 Maddingue joined 08:02 Odin- joined, stclare joined, arguile joined 08:04 cjn joined 08:34 arcady joined, Ymmv joined 08:55 ringen left 09:32 Ymmv joined 09:41 nnunley joined 09:42 nnunley joined 09:44 Kattana joined 09:51 xerox joined
xerox Hey hey hey! 09:51
azuroth hi hi hi 09:54
xerox So, we've got some pugs projects for the Summer of Code 09:55
Is it like there aren't many students around here... or wasn't it published ennough?
I thought that we're likely to get flood of applications from pugsers :-)
Arathorn could it be that surfing the everchanging waters of pugsland is a bit too intimidating for your average socer? 09:58
xerox Possibly.
I wonder if you could spread the word a bit.
I don't know where to blarf
theorbtwo If I were a student, I think I'd jump at the chance to have something this cool, and this structured, and get paid to do it. 09:59
xerox hackage.haskell.org/trac/summer-of-code/
theorbtwo However, I'm not, and thus inelegable.
azuroth I was going to try for it, but it overlaps far too much with when the majority of my TAFE work is :-(
xerox hackage.haskell.org/trac/summer-of-...r=priority 10:00
These so far.
theorbtwo TAFE?
azuroth turtle and four elephants
or technical and further education, I think? it's an Australian vocational education institute
theorbtwo Aaah. 10:01
10:14 nnunley_ joined
azuroth hmm. just an idea, but maybe "we try to call them /regex/ because they haven't been regular expressions for a long time ..." should be "call them regex - not regular expressions - because" 10:28
it just seems so hard-wired in my head that regex == regular expressions that the italics doesn't do it enough for me. I could be the only one, though 10:29
10:29 Blicero left
azuroth is a grammar a type declarator? hmm 10:30
10:35 Odin-LAP joined 10:42 knewt_ joined, qmole_ joined 11:01 mago_ joined, nnunley joined 11:10 chris2 joined 11:13 knewt_ is now known as knewt 11:15 jserv-- joined 11:23 neoesque joined 11:24 mago__ joined 11:52 flounder99 joined 12:00 sahadev joined
flounder99 ?eval my @h=(1,2);@h .=reverse;@h.perl.say; 12:02
evalbot_10184 OUTPUT[[2, 1] ] bool::true
flounder99 ?eval my @h=(1,2);@h .=reverse.reverse;@h.perl.say;
evalbot_10184 OUTPUT[[2, 1] ] bool::true
wolverian instead of foo.perl.say, you can just say foo 12:03
?eval my @h = (1, 2); @h.=reverse.=reverse
evalbot_10184 Error: unexpected "=" expecting ".", subroutine name, array subscript, hash subscript or code subscript
wolverian damn :)
?eval my @h = (1, 2); @h.=reverse.=reverse
theorbtwo ?eval my @h=(12,34); @h.=reverse;
wolverian er
flounder99 looks like .=foo.bar doesn't run bar
evalbot_10184 Error: unexpected "=" expecting ".", subroutine name, array subscript, hash subscript or code subscript
wolverian flounder99, or it runs (@h.=reverse).reverse 12:04
which doesn't assign the second reverse's return value to anything
flounder99 you need the whitespace before .=
wolverian ?eval my @h = (1, 2); @h.=reverse
evalbot_10184 Error: unexpected "=" expecting ".", subroutine name, array subscript, hash subscript or code subscript
wolverian oh, I see.
theorbtwo ?eval my @h=(12,34); @h .= reverse; @h
evalbot_10184 [34, 12]
wolverian ?eval my @h = (1, 2); @h .= reverse .= reverse
evalbot_10184 Error: the right-hand-side of .= must be a function application
wolverian sigh :)
theorbtwo Ah, good, it is correctly doing a listy reverse and not a stringy one. 12:05
wolverian ?eval my @h = (1, 2); @h .= reverse for 1..2
evalbot_10184 undef
wolverian ?eval my @h = (1, 2); @h .= reverse for 1..2; @h
evalbot_10184 [1, 2]
wolverian well, that works.. should foo.=bar.=baz fail?
flounder99 ?eval my @h=(1,2);@h .=(reverse.reverse);@h.perl.say; 12:06
evalbot_10184 Error: cannot cast from VStr "perl6" to Pugs.AST.Internals.VCode (VCode)
wolverian ?eval my @h = (1, 2); [.=] (@h, &reverse)
evalbot_10184 Error: unexpected "[" expecting comment, ";", end of input, Doc block, block declaration, declaration, construct or expression
wolverian ;)
flounder99 might be .= has same precidence as . so @h .=foo.bar does (@h=@h.foo).bar 12:08
12:09 jsiracusa joined
flounder99 ?eval my @h=(1,2);my @g=(@h .=reverse.reverse);@g; 12:09
evalbot_10184 [2, 1]
flounder99 I guess not 12:10
azuroth ?eval my @h = (1,2); (@h .= reverse) .= reverse; @h 12:11
evalbot_10184 [2, 1]
azuroth weird. where is that second one going?
wolverian looks like a bug. add a test?
azuroth ?eval my @h = (1,2); @h .= reverse 12:12
evalbot_10184 [2, 1]
flounder99 looks like .=foo.bar doesn't run bar
wolverian ?eval "foo".=uc.lc
evalbot_10184 Error: unexpected "=" expecting ".", subroutine name, array subscript, hash subscript or code subscript
wolverian ?eval "foo" .=uc.lc
evalbot_10184 Error: Can't modify constant item: VStr "foo"
wolverian ?eval ("foo" .=uc).lc
er 12:13
duh
evalbot_10184 Error: Can't modify constant item: VStr "foo"
wolverian ?eval my $foo = "foo"; ($foo .=uc).lc
evalbot_10184 "foo"
wolverian that worked
?eval my $foo = "foo"; ($foo .=uc) .=lc
evalbot_10184 \"foo"
wolverian ?eval my $foo = "foo"; ($foo .=uc) .=lc; $foo
evalbot_10184 \"foo"
wolverian so did that
azuroth ?eval my $foo = "FoO"; ($foo .=uc).lc
evalbot_10184 "foo"
wolverian ?eval my @foo = qw(a b c); (@foo .=reverse) .=reverse; @foo 12:14
evalbot_10184 ["c", "b", "a"]
wolverian yeah, that definitely looks like a bug.
azuroth my @foo = (1,2,3); @foo .= reverse
flounder99 is it in reverse or .= ?
azuroth ?eval my $a = "foo"; $a .= uc 12:15
?eval my @foo = (1,2,3); @foo .= reverse
evalbot_10184 \"FOO"
[3, 2, 1]
flounder99 ?eval my $foo="FoO";$foo .=uc.lc;$foo;
evalbot_10184 \"foo"
azuroth ?eval my $a = "foo"; $a
evalbot_10184 \"foo"
wolverian ?eval my @foo = qw(a b c); @foo .=grep: {$_ eq 'a'} 12:16
evalbot_10184 ["a",]
wolverian ?eval my @foo = qw(a b c); @foo .=grep: {$_ ne 'a'} .=grep: {$_ ne 'b'}
evalbot_10184 Error: unexpected "=" expecting ".", subroutine name, array subscript, hash subscript or code subscript 12:17
wolverian ?eval my @foo = qw(a b c); @foo .=grep: {$_ ne 'a'} .grep: {$_ ne 'b'}
evalbot_10184 Error: cannot cast from VList [VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubBlock, subEnv = Just (MkEnv {envContext = CxtSlurpy (mkType "Any"), envLValue = False, envLexical = MkPad (padToList [("$?1",[(<ref>,<ref>)]),("$_",[(<ref>,<ref>)]),("$__evalbot_print",[(<ref>,<ref>)]),("$code",[(<ref>,<ref>)]),("$lang",[(<ref>,<ref>)]),("&?BLOCK_EXIT",[(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>)]
azuroth maybe it's like, ref-vs-copy stuff?
wolverian ?eval my @foo = qw(a b c); (@foo .=grep: {$_ ne 'a'}) .grep: {$_ ne 'b'}
evalbot_10184 Error: unexpected "." expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
wolverian well, that certainly looks bogus
seems to be the error is in Array::postfix:<.=> 12:18
not Array::reverse
flounder99 I noticed it when trying to reverse keys and values in a hash with %h .=kv.reverse
azuroth oh, wow. so .= isn't a consistent operator, like dot is?
flounder99 ?eval my $foo="FoO";$foo .=uc.lc;$foo;
evalbot_10184 \"foo"
flounder99 why does that work? 12:19
azuroth I would love to know... 12:20
wolverian azuroth, it doesn't seem to be implemented that way right now, or there is another bug that it's tickling
flounder99 at least it DWIMs in that case
azuroth yeah... hmm 12:21
flounder99 ?eval my $foo="FoO";$foo .=uc;$foo;
evalbot_10184 \"FOO"
flounder99 ?eval my $foo="FoO";$foo .=uc.lc.ucfirst;$foo; 12:22
evalbot_10184 \"FoO"
azuroth what's the length method on a string?
?eval my $foo = "FoO"; $foo .=length.say
evalbot_10184 OUTPUT[FoO ] \bool::true
azuroth that is weird...
?eval my $foo = "FoO"; $foo .=lc.say
evalbot_10184 OUTPUT[FoO ] \bool::true 12:23
12:23 kolibrie joined
azuroth ?eval my $foo = "FoO"; $foo .=lc.say; $foo 12:23
evalbot_10184 OUTPUT[FoO ] \bool::true
azuroth ?eval my $foo = "FoO"; $foo .=say.lc; $foo
evalbot_10184 \"foo"
flounder99 that seems to me it should be "1" , the lower case of the return of "say", right? 12:25
12:26 Limbic_Region joined
azuroth yeah, and it's not even calling say 12:26
flounder99 ?eval my $foo="FoO";my $bar=$foo.say;$bar;
evalbot_10184 OUTPUT[FoO ] \bool::true
flounder99 ?eval my $foo="FoO";my $bar=$foo.print;$bar;
evalbot_10184 OUTPUT[FoO] \bool::true
flounder99 I'm used to "print" returning true, usually 1 12:27
but I see it is returning true
12:30 avarab joined
flounder99 perl -e '$foo="FoO";$bar=print $foo;print $bar;' prints FoO1 12:30
avarab flounder99: what's the return value of print() ? 12:31
flounder99 ?eval print(print("foo")) 12:33
evalbot_10184 OUTPUT[foo1] bool::true
theorbtwo The second print is stringifying Bool::True, and getting 1.
?eval ~Bool::True
evalbot_10184 Error: No such sub: "&Bool::True" 12:34
theorbtwo ?eval ~bool::true
evalbot_10184 "1"
flounder99 ?eval print(my $foo = print("foo"))
evalbot_10184 Error: No such method in class Any: "&my"
flounder99 ?eval my $foo;print($foo=print("foo")) 12:35
evalbot_10184 OUTPUT[foo1] bool::true
flounder99 ?eval my $foo;say($foo=say("foo")) 12:36
evalbot_10184 OUTPUT[foo 1 ] bool::true
flounder99 ?eval my $foo;say($foo="foo".say))
evalbot_10184 Error: unexpected ")" expecting ":", term postfix, comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
flounder99 ?eval my $foo;say($foo="foo".say) 12:37
evalbot_10184 OUTPUT[foo 1 ] bool::true
flounder99 ?eval my $foo;$foo="foo".say;$foo.perl.say; 12:39
evalbot_10184 OUTPUT[foo \bool::true ] bool::true
13:00 weinig|sleep is now known as weinig 13:01 aufrank joined 13:12 rlp joined 13:13 Qiang joined 13:26 hexmode` joined 13:30 lichtkind joined 13:36 fglock joined
lichtkind hi i just startet an perl6 apetizer tour, selfexplaining by showing perl5 and perl6 equivalent and just showing the best bits, is there anything like this in pugs svn? 13:41
audreyt docs/other/porting_howto 13:43
or, more modernly
theorbtwo There's also the Exgises, which are very out of date.
lichtkind yeah but i want to keep it short, not like exegesis 13:44
i just want to make people wow
that they generate some motivation
theorbtwo Yeah, IIRC at least some of the exgises are wow, but certianly not short.
lichtkind please what means IIRC? 13:45
theorbtwo wonders if verbosity is an industrial risk of being a linguist.
If I Recall Correctly.
lichtkind thanks
theorbtwo I tend to use it a lot, because my memory sucks, and I feel like I should warn people.
lichtkind its nop but as far i dont know it it troubles a bit 13:46
13:47 audreyt_ joined
audreyt_ the ISP is down again :/ 13:47
(to feather)
there is docs/Perl6/Perl5/Differences.pod
theorbtwo No problem. I'd much rather you ask then not have any clue what I'm on about.
audreyt_ hacking on Differences.pod is very welcome
lichtkind audreyt_ ist the svn.openfoundry.org/pugs/docs/other...ting_howto up to date (especially the long dot section) ? 13:48
audreyt_ I think it's massively out of date
can you merge it into Differences.pod and/or fix it? 13:49
lichtkind audreyt_ i will when its all more progressed, im still learning 13:50
@array.end ??? i think ist @array.last?
13:51 audreyt__ joined
audreyt_ it's .end 13:51
"last" might be confused with loop control
lichtkind thanks so got it outdated from the book 13:52
audreyt_ the book is infinitely outdated by this point... 13:53
13:53 audreyt_ is now known as audreyt
lichtkind yes but thats what i started with, i began this tutorial 2 weeks ago 13:54
13:54 jserv-- joined
lichtkind maybe you get my idea when you see wiki.perl-community.de/bin/view/Wis...ialAnhangC 13:54
13:54 fglock joined
lichtkind even if you cant german 13:54
audreyt k
fglock theorbtwo: did you get the problem with Pugs::Compiler::Rule fixed? 13:55
lichtkind the Differences.pod i would write in a different way
13:55 wolverian joined
audreyt lichtkind: please refactor mercilessly 13:55
azuroth is grammar a 'type declarator', like class etc?
oh no, never mind 13:56
lichtkind :) no doubt audreyt i would do it anyway :)
13:56 pmichaud joined 13:57 Juerd joined
lichtkind when i do it, still have my own open source project, dragging for attention 13:57
13:57 webmind joined, chip joined 13:58 audreyt_ joined, PerlJam joined 13:59 justatheory joined 14:04 orafu joined 14:09 eric256 joined
theorbtwo fglock: I decided to go with Parse::RecDescent instead. It's not as shiney, nor as fast (I assume -- you can't get that much slower then PRD), but it's a known quantity for me... 14:17
fglock theorbtwo: ok 14:18
theorbtwo The problem is that PRD gives poor error messages, and when I'm learning something, error messages are my god. 14:19
14:19 hexmode` joined
fglock theorbtwo: good point 14:30
14:30 penk joined
PerlJam theorbtwo: add that to the SoC list of ideas: make PRD have better error messages. 14:33
14:34 sahadev joined
ingy audreyt_: ping0rz 14:34
fglock theorbtwo: oh, do you mean PCR messages, right? 14:35
particle_ fglock: parse::recdescent 14:36
kolibrie fglock: have you done any work on regex/token/rule in PCR, or should I just pass in the appropriate modifiers? 14:37
14:38 eric256 left
fglock kolibrie: I did some experiments (RuleInline.pl), but there is nothing implemented yet 14:39
audreyt ingy: pong 14:40
kolibrie fglock: I don't need it yet, but I'm thinking of using PCR in production, and want to make sure any grammars I write are somewhat stable
14:40 audreyt_ is now known as audreyt
ingy audreyt: where is that pappy code we wrote again? 14:41
fglock kolibrie: PCR implements 'regex' - there is no rule and token yet. We can state that PCR->compile compiles 'regex' by default, and the you are safe 14:45
s/the/then/
kolibrie fglock: okay 14:46
audreyt ingy: svn.kwiki.org/audreyt/Wiki/ 14:48
ingy audreyt: gugod and I are working on doing wysiwyg editing for all of wikipedia 14:50
audreyt cool 14:51
ingy the wikipedia syntax is quite complicated
we are thinking of using haskell to parse it to json
audreyt sure, pappy should be able to handle it 14:52
ingy and creating a test system to show that we can roundtrip all of wikipedia from wikitext to html and back
audreyt if you need more flexibility, use the pappy-compatible packrat monad
see this for example: pdos.csail.mit.edu/~baford/packrat/...vaMonad.hs
I'm sure gugod can navigate you around :)
ingy and using json as the intermediate canonical format 14:53
audreyt: I was wondering by doing the text2json transformation in Haskell, if I can prove anything methematically 14:55
wolverian hrm 14:56
what's this: Loading Prelude... pugs: performMayjorGC not supported in threaded RTS (yet)
exits immediately after that
audreyt wolverian: wow. never seen that 14:58
wolverian I wonder what Mayjor is, too :)
audreyt what ghc/platform are you on?
wolverian or rather, who
The Glorious Glasgow Haskell Compilation System, version 6.5
ubuntu dapper
hrm, that's a local ghc 14:59
it might even be a patched ghc
wolverian sighs
14:59 ruz joined
wolverian and I don't have the uninstall target anywhere 14:59
wolverian hits head on the wall
audreyt nono
that's fine
wolverian system ghc is 6.4.1. should I try with that? 15:00
audreyt look at src/Pugs/Eval.hs
wolverian mmkay
audreyt delete the performGC line
and see if that works
wolverian do I need to reconfigure?
er, run Makefile.PL, that is
audreyt nope
wolverian okay
making
oops, I ran make clean 15:01
okay, now I'm making :) 15:02
ingy audreyt: ?
audreyt ingy: what properties would you like to prove? 15:03
no-syntax-failure? roundtrip? linear time?
ingy audreyt: that the entire syntax is covered by the parser 15:04
wolverian makes some tea while pugs is building 15:05
15:06 chris2 joined
audreyt ingy: ok... you need to come up with the definition of "entire syntax" somehow; packrat always find a parse when it can (through backtracking), so it makes induction a bit easier 15:10
or you can also write a QuickCheck to generate random snippets and make sure that they all roundtrip correctly
wolverian just write it on the blackboard.. 15:11
that's what real mathematicians do
15:16 obscurite joined
clkao scw++ # proposal 15:17
wolverian proposal? 15:18
audreyt we need more proposal
15:18 FurnaceBoy joined 15:19 vel joined
wolverian audreyt, works now 15:29
audreyt k
mmm
wolverian (with the hide-patched ghc 6.5)
audreyt k
I just did a cross-compiling port of GHC to AIX 4.3 today 15:30
involved a lot of C hacking
so I'm a bit burned now :)
wolverian hehe, that's fine
does the change I did affect my pugs a lot? 15:31
audreyt which change? performGC?
wolverian yeah
(I didn't change anything else, hopefully) 15:32
audreyt I think it means DESTROY is not called on end of program
scw clkao: they redirect the proposal that soon!
audreyt for objects
that's fine
wolverian yeah
audreyt scw: it's all automagic
scw audreyt: Hmm more like magic than automatic :p
audreyt hen is the SoC submission deadline? 15:33
scw next monday i think
szbalint 8th of may
audreyt oh ok
so still some time
scw in west coast time
audreyt already saw 3 pugs-related proposals :D
szbalint will submit a 4th soon
audreyt ooh. 15:34
what'd be that about?
scw audreyt: should be, say, 5/9 9:00am in +0800
15:35 Southen_ joined
szbalint I'm waiting for Tim Bunce's detailed email atm. He gave me a shorter reply already about Perl 6 DBI 15:36
audreyt ah k.
clkao scw: what are you going to do if perl5 based rule parser is too slow? 15:37
scw clkao: tune it :p 15:38
clkao grins 15:39
scw clkao: maybe caching or so, I haven't really think of it
scw going home &
15:40 macroron joined
audreyt packrat caching, yay! 15:40
15:48 q[uri] joined
obscurite anyone using any of the "perl 6 implementations" for anything in production? 15:50
or know of anyone who is?
just curious for the novelty of it
szbalint audreyt: If I get my application accepted, or if noone gets this idea through, I'd develop the code in ext/DBI/ if you don't mind. 15:53
audreyt surely I don't mind :) 15:55
obscurite: svnbot6 and evalbot_10184 here (and in #parrot) is considered "production" 15:56
obscurite: a while ago I used Pugs in $jobs
obscurite audreyt - $jobs?
audreyt day job 15:57
obscurite print Dumper \$jobs
audreyt pugs is my 2nd haskell project; $job was the first
svn.openfoundry.org/openafp/
obscurite Thanks. :D 15:58
audreyt np :)
15:59 neoesque joined
TimToady audreyt: on the return capture business, I guess it really needs to be a capture in any case, so you can say my \$cap := foo() 16:01
so that a call() can deal with the return value as a unit. 16:02
audreyt yes. that's why we specced return() as such in tokyo
PerlJam er, "my \$cap"? that's strange.
audreyt the question is whether it applies to fallthru return too
or if
sub f { x=>3 }
TimToady I believe so. 16:03
audreyt is always just a pair
instead of potentially named
TimToady I think it has to be consistent on the return end
audreyt good. then I can commit my Syn diff :)
TimToady but we still need to think about how a Capture interpolates into a Capture...
s/we/I/ :)
audreyt sub f { (1,2,3) } g(f(), f(), f()) 16:04
this ought to flatten
if g takes *@_
TimToady Yes, people shouldn't have to think about Captures all the time. 16:05
audreyt so, you ok with the parens as general-context-specified?
sub f { :x<1> } # possibly named-argument binding
sub f { (:x<1>) } # always just one positional Pair object
seems to me that this is consistent with the lhs use
as well as the general named-disambiguating use
TimToady but sub f { 1,2,3 } doesn't necessarily supply positionals, so why is named different? 16:06
16:06 Arathorn is now known as Aragone
audreyt oh, but I was thinking that f{1,2,3} supplies positionals, and f{(1,2,3)} not. 16:06
TimToady unless we say that f() always implies * 16:07
audreyt the latter is just a List in invocant position, which is flattenable
but that may be too bizzare to explain
PerlJam soon I will echo merlyn's lament that perl6 may be too bizarre to explain ;) 16:08
audreyt it's probably better for sub {1,2,3} and sub {(1,2,3)} to mean the same thing :)
TimToady I think a returned capture is treated almost identically to @foo
that is, scalar in (eventual) scalar context, flattening in list context. 16:09
audreyt and like @foo, you can explode it explicitly with *@foo
as well as *f()
TimToady and you still have to say *foo() to get positionals.
that implies probably *foo() to get named as well. 16:10
audreyt yup
TimToady I think I'm happy with that explanation. People will grok it.
audreyt yay
16:10 q[uri]_ joined 16:11 stevan_ joined
audreyt it's past midnight so I'll not trust myself with ghostwriting :) 16:13
TimToady it's still before midnight, so I'm not sure I trust my writing either. :)
audreyt rofl
TimToady well, one or the other of us will wake up eventually. 16:14
audreyt hopefully both. 16:16
16:17 amnesiac joined
svnbot6 r10218 | fglock++ | Pugs-Compiler-Rule/RuleInline.pl - added 'optional'; benchmarks against 16:24
r10218 | fglock++ | p5-regex (PCR is 100x slower)
16:30 shachaf joined 16:31 hexmode joined 16:34 Limbic_Region joined
svnbot6 r10219 | fglock++ | RuleInline.pl - better output formatting 16:36
16:44 xerox joined 16:54 nbd joined 16:57 Aankh|Clone joined 17:30 KingDiamond joined 17:33 ghenry joined 17:35 DaGo joined 17:38 bernhard joined 17:44 m_ joined 17:46 larsen joined 17:55 vel joined 17:57 szbalint_ joined 17:59 davidfetter joined 18:01 szbalint_ is now known as szbalint
svnbot6 r10220 | fglock++ | RuleInline.pl - implemented token captures 18:18
18:19 DaGo joined 18:26 elmex joined 18:29 vel joined
ingy audreyt: CogBase-0.10 on cpan... 18:36
18:38 nbd left 18:39 TreyHarris joined, lichtkind joined
audreyt Schema has invalid YAML: Can't call method "value" on an undefined value at /home/autrijus/i/CogBase-0.10/blib/lib/CogBase/Factory.pm line 40. 18:40
but, sleep first. :) & 18:41
18:48 rashakil joined 19:00 DaGo joined
ingy audreyt: how did you get that error? 19:01
audreyt: I think you have a bogus YAML::Syck 19:02
audreyt: I have 0.43
19:11 penk joined 19:15 swarm joined 19:25 xerox joined
spinclad ?eval my $foo = (1,2,3); $foo .= { .reverse }; $foo 19:29
evalbot_10184 Error: the right-hand-side of .= must be a function application
spinclad ?eval my $foo = (1,2,3); $foo .= sub { .reverse }; $foo
evalbot_10184 Error: unexpected "{" expecting comment, operator, ">>=><<", "\187=>\171", "=>", ".=", "&&=", "**=", "+&=", "+<=", "+>=", "+^=", "+|=", "//=", "::=", "?^=", "?|=", "^^=", "xx=", "||=", "~&=", "~<=", "~>=", "~^=", "~|=", "%=", "&=", "*=", "+=", "-=", "/=", ":=", "Y=", "^=", "x=", "|=", "~=", "\165=", "=", postfix conditional, postfix loop, postfix iteration, ";" or end of input
theorbtwo ?eval my $foo = (1,2,3); $foo .= { .reverse }.(); $foo 19:30
evalbot_10184 Error: cannot cast from VList [VUndef] to Pugs.AST.Internals.VCode (VCode)
theorbtwo ?eval { say "Foo!" }.();
evalbot_10184 OUTPUT[Foo! ] bool::true
19:30 marmic joined
spinclad ?eval my $foo = (1,2,3); $foo .= { $^a.reverse }; $foo 19:30
evalbot_10184 Error: the right-hand-side of .= must be a function application
lichtkind ?eval grep {$_*2}, (0,1,2); 19:32
evalbot_10184 (1, 2)
lichtkind sorry
?eval grep {$_*2}, (0,1,2);
evalbot_10184 (1, 2)
lichtkind ?eval grep {$_+2}, (0,1,2);
evalbot_10184 (0, 1, 2)
spinclad those look right 19:33
lichtkind i ment map
?eval grep {$_ > 1}, (0,1,2);
evalbot_10184 (2,)
lichtkind ?eval grep {$^a > 1}, (0,1,2);
evalbot_10184 (2,)
lichtkind ahh thants i wanted know 19:34
19:35 arcady joined
spinclad ?eval my $foo = (1,2,3); $foo .= method { .reverse }; $foo 19:35
evalbot_10184 Error: unexpected "{" expecting comment, operator, ">>=><<", "\187=>\171", "=>", ".=", "&&=", "**=", "+&=", "+<=", "+>=", "+^=", "+|=", "//=", "::=", "?^=", "?|=", "^^=", "xx=", "||=", "~&=", "~<=", "~>=", "~^=", "~|=", "%=", "&=", "*=", "+=", "-=", "/=", ":=", "Y=", "^=", "x=", "|=", "~=", "\165=", "=", postfix conditional, postfix loop, postfix iteration, ";" or end of input
rashakil that's just sick 19:36
spinclad evalbot thought so too
lichtkind ?eval multi qsort ( [ ] ) { return ( ) }; multi qsort ( [ ] ) { return ( ) } 19:37
evalbot_10184 Error: unexpected "[" expecting comment, formal parameter, ":" or ")"
lichtkind ?eval multi qsort ( [ ] ) { return ( ) };
evalbot_10184 Error: unexpected "[" expecting comment, formal parameter, ":" or ")"
lichtkind ?eval multi qsort () { return ( ) };
evalbot_10184 undef
lichtkind ?eval multi qsort () { return ( ) }; multi qsort () { return ( ) };
evalbot_10184 undef
lichtkind no conflict?
hm
spinclad C< my $foo = (1,2,3); $foo .= { .reverse }; $foo >: 19:38
i think something like that ought to work, though; just unsure how i would mention an immediate anonymous function for it.
lichtkind: looks like [] as a pattern-like parameter isn't implemented (is it specced?) 19:40
lichtkind iv seen it somewhere in syn
spinclad call it a bug, then 19:41
PerlJam [] is an array slot where you can specify the pieces of the array individually
it should be in the syn
spinclad pugs doesn't have 'where' constraints either, or Signature or Capture types 19:43
ENOTYET
19:43 q[uri] joined
PerlJam Hmm. I can't find [] used in signatures in the Synopses at all. 19:43
19:46 borkened joined
lichtkind it was an code sample i took out a synopsys or some docs in pugs svn 19:47
PerlJam yeah, I thought that qsort example was in S06 even 19:52
TimToady see "Unpacking array parameters" in S06
PerlJam ah, there it is 19:53
Though I realize now that I was conflating the Haskell example and the perl example in my head.
lichtkind so its valid perl6? 19:56
TimToady I often show the qsort example in my stump speech, so maybe you saw it there.
is what valid Perl 6?
PerlJam TimToady: probably.
lichtkind: sub foo ([$thing1,$thing2,*@other_stuff]) { ... } will let you pass an array to foo() and it will put the first element of the array in $thing1 and the second element of the array in $thing2 and the rest of the array will go into @other_stuff. 19:58
TimToady A Capture argument would also work. 19:59
PerlJam TimToady: I assume that you can have defaults in there too: sub foo ([$alpha,$beta=5,$gamma=10]) { ... } n'est pas?
lichtkind TimToady yeah i think i copied your slide :) so it has to be valid becaus larry never fails :) 20:00
20:00 lisppaste3 joined
TimToady PerlJam: yes, it's just an ordinary signature applied to a sub-Mumble. 20:03
where the square brackets indicate that an Array is ordinarily expected. 20:04
PerlJam I can imagine some obfuscation there or at least some easy errors. Those square brackets suddenly look quite small :) 20:05
20:05 DaGo joined
wolverian you know, I don't really like constructors with positional args, but haskell's data constructors are _really_ short.. :) 20:06
hrm, if I call foo({ one => { bar => 42 }, two => { bar => 13 } }), is it possible to unpack the 'bars' into an array in the signature of &foo? 20:11
PerlJam wolverian: let's make up a syntax and shoot at it: sub foo ( { @keys => @values } ) # ouch :) 20:13
wolverian :)
aufrank wolverian: I think the :p tag might do what you want 20:14
wolverian sub foo ({ bar Ā»=> @values }) # it's an arrow
PerlJam wolverian: personally, that's one area of the waterbed I don't want to push down upon. Leave such work to the programmer.
wolverian PerlJam, but Data.Generics does it so well! I want that for perl6 too.. :)
aufrank sub foo (%hash:p) { for @_ -> { say } }
wolverian aufrank, whoa. that's bizarro. 20:15
aufrank I think that passes the hash in as positional pairs
wolverian how about if I don't have a hash but an object with 'has @.bar;'?
PerlJam aufrank: except that :p doesn't work in the sig does it?
:p is a call-time thing, not a compile-time thing 20:16
aufrank it does
see S06
PerlJam now I *know* I'm going to have to re-read the Synopses
aufrank is about to attempt a grammar for Signatures
so I just reread S06
I'm pulling out the :p stuff for you now 20:17
go grep go!
To pass both key and value out of hash as a positional pair, use ":p".
doit %hash<a>:p,1,2,3;
doit %hash{'b'}:p,1,2,3;
PerlJam yeah, but that's just the call, not the sig. he's have to specify a slurpy in the sig to get at the pairs. 20:18
(or some other suitable construct)
aufrank yeah, I just say that
my bad
s/say/saw/ 20:19
wolverian I guess what I really want is Data::Generics
wolverian ports
(I'm not very serious about porting it)
PerlJam pmichaud++ /me just read p6c 20:30
wolverian link? :) 20:31
PerlJam um ... ask google because I don't know how to give you a link to my mailbox :)
bernhard www.nntp.perl.org/group/perl.perl6....nals/33588
PerlJam bernhard++
wolverian thanks 20:32
?eval say: 1,2,3 20:33
evalbot_10184 Error: unexpected ":" expecting "::", dot, "!", word character, "(", "{", comment, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
lichtkind cool bernhard++
wolverian hm. can subroutines have the :? kind of clashes with labels 20:34
PerlJam wolverian: what do you mean? were you trying to make a label "say:"? 20:38
wolverian PerlJam, no.
I was trying to do 'say(1,2,3)'
PerlJam What does it mean for "subroutines to have the :" ?
wolverian ?eval (1,2,3).map: {$_*2} # similar to this
evalbot_10184 (2, 4, 6)
PerlJam wolverian: er, that's (1,2,3).map :{$_*2} isn't it? 20:39
wolverian no.
you need to reread the Synopses.
;)
(particularly "Methods" in S12) 20:40
merlyn they change hourly. :)
PerlJam indeed. This channel just confuses me lately.
wolverian hey, haskellish:
sub infix:Ā«->Ā» ($t, &r) { when $t { &r($_) } } # given $foo { Bar -> { say hi }; Baz -> { say hello } }
merlyn revision 9112. for *specifications*
that's making government work look simple. :)
wolverian too bad -> is kind of taken already.. 'Bar -> -> $x { ... }' looks just weird
merlyn, hm. what are the commits for that aren't shown on p6l? 20:42
PerlJam wolverian: "say: 1,2,3" still makes no sense. 20:45
wolverian PerlJam, I guess. it's the default anyway.
theorbtwo PJ: It makes more sense on a method, where the parens aren't optional unless you use the colon. 20:50
20:51 vel joined
wolverian right. 20:51
PerlJam theorbtwo: right, and methods won't clash with labels at that point. 20:52
theorbtwo Indeed, since . isn't a valid char in a label. 20:55
wolverian I like how it makes 'new Foo:' and 'Foo.new:' the same thing. 21:04
21:26 DaGo joined 21:35 FurnaceBoy_ joined 21:45 nirgle joined 21:55 jsiracusa joined 21:56 coumbes joined 21:57 hexmode joined 22:07 ruoso joined 22:16 xerox joined 22:18 nirgle joined
nothingmuch is pugscode.org down? 22:25
22:27 nirgle left 22:29 Limbic_Region joined 22:40 nirgle joined 22:41 nirgle joined, nirgle left 22:44 nirgle joined
nirgle sorry, going for good 22:44
22:44 nirgle left
xerox Did 01:02:03 04/05/06 pass in your timezone yet? 22:53
xinming nothingmuch: I think so, I can't access it here either...
ruoso xerox, not mine... 22:54
xinming xerox: neither mine...
22:55 KingDillyDilly joined
xerox 7 mins here :-9 22:55
KingDillyDilly It loads for me.
In NY
HaHa. And I don't even need it. 22:56
22:56 _SamB_ joined 22:57 _SamB_ is now known as SamB
Limbic_Region audreyt backlog - you probably already knew this but Pugs is building on Win32 again quite nicely (and is much faster too) 22:59
azuroth it did 8 hours ago here :-(
Limbic_Region did or didn't?
23:05 pjcj joined 23:06 KingDillyDilly left
svnbot6 r10221 | lwall++ | Tests of supplying closures as invocant on list functions. 23:07
23:08 pjcj joined 23:10 xerox joined 23:15 borkened joined 23:30 Khisanth joined
meppl gute nacht 23:34
23:42 kanru joined
clkao audreyt: can we have svnbot6 run on #svk as well? 23:46
Toaster whatever happened to the metaobject model stuff? 23:48
23:49 froh-doh joined 23:52 cognominal joined
TimToady Toaster: mostly it's been poking its head up in P5 space via Moose, I think. 23:53
23:53 cognominal joined
TimToady As a language Perl 6 is completely agnostic about metamodels, and sweeps the whole thing behind the .meta curtain. 23:54
Other than that, you'd probably have to poke stevan. 23:55
cognominal sounds like a meta cop out 23:57