Camelia, the Perl 6 bug

IRC log for #perl6, 2006-05-09

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:12 Quell joined perl6
00:14 neoesque joined perl6
00:19 audreyt rehi
00:19 * audreyt sees a _why in the house :)
00:19 stevan__ hallo
00:20 audreyt hi moosecamel :)
00:20 stevan hola lambacamel :)
00:27 audreyt what's up? :)
00:27 stevan not much, looking at Path::Class right now to see if we can use it to replace all our File::Spec stuff
00:27 stevan boring I know
00:27 stevan and watching Star Trek with my daughter :)
00:27 stevan and you? how is $work?
00:29 audreyt seeing the end of the quantum tunnel
00:29 aufrank stevan: long time no see!
00:29 buu Yay startrek!
00:29 audreyt ghc ported to aix43; jifty ported to win32; the rest is just dressing
00:29 TimToady Ooh.  Let's party!
00:30 * aufrank parties
00:30 * stevan grabs some ice cold Junctions from the fridge as passes them around
00:30 audreyt so the $job coding should be all done by tomorrow's Meeting
00:30 audreyt ooh the subtle taste of junctions
00:31 TimToady I think I'll steer clear of the rum barrel though...
00:31 audreyt right, you have you blue sugar cubes already...
00:32 TimToady We were just talking about red sugar cubes earlier today.
00:32 * audreyt backlogeth
00:32 TimToady Though in this case the discussion was polio vaccines.
00:32 TimToady All my responses are in p6l...
00:32 aufrank there's a strange cat in my apartment!
00:32 audreyt yay S02+S12 bonus updates
00:33 TimToady well, how yay depends on what they say, presumably...
00:35 TimToady Actually, didn't need either rum nor sugar cubes this morning--was spray painting the family heirloom crib for the soon-to-be grandson, and got plenty high from the enamel fumes...
00:36 TimToady due in less than a week now, so I'll be disappearing to drive to Seattle any moment now...
00:37 TimToady plus or minus two weeks...
00:37 TimToady Hmm, we need fuzzy junctions...
00:37 * stevan bushes the fuzz off his junction, tickles my nose when I drink it
00:38 buu Yay fuzzy junctions!
00:39 TimToady say $time < 1`week
00:39 TimToady Bool::Maybe
00:39 * mugwump offers aroung the room the fresh meat of the giant aquatic brazilian centipede
00:41 TimToady Go not to the elves for advice, for they will say Bool::Maybe...
00:48 audreyt TimToady: congrats :)
00:49 audreyt mmm grandpa larry
00:49 buu What on earth is 1`week
00:51 aufrank week as a unit
00:52 buu Horrifying.
00:53 aufrank 60`seconds == 1`minute
00:53 aufrank maybe === , I don't know for sure
00:54 lumi joined perl6
00:56 wolverian my $date_range = now - 1`week .. now + 2`month; # hm
01:00 penk joined perl6
01:08 kanru joined perl6
01:17 justatheory joined perl6
01:19 * audreyt goes to pre-meeting meeting &
01:31 drbean_ is now known as drbean
01:34 flounder99 joined perl6
01:34 flounder99 joined perl6
01:43 mako132_ joined perl6
01:50 jserv-- joined perl6
02:14 neoesque joined perl6
02:27 bsb joined perl6
02:55 arcady joined perl6
03:05 flounder99 left perl6
03:16 qu1j0t3 joined perl6
03:46 mako132_ joined perl6
03:50 multic joined perl6
04:15 shachaf joined perl6
04:51 jserv-- joined perl6
04:58 aufrank audreyt: let me know if you're back after the meeting
04:58 kanru joined perl6
05:02 kanru2 joined perl6
05:13 KingDiamond joined perl6
05:23 hikozaemon joined perl6
05:37 kanru2 is now known as kanru
05:43 svnbot6 r10243 | scw++ | Pugs::Grammar::MiniPerl6
05:43 svnbot6 r10243 | scw++ |  * list constructor accepted
05:43 svnbot6 r10243 | scw++ |  * more careful escaped charactor in string
05:49 iblechbot joined perl6
06:17 marmic joined perl6
06:28 neoesque joined perl6
06:33 ghenry joined perl6
06:36 drbean_ joined perl6
06:53 _seaker_ joined perl6
06:55 renormalist joined perl6
06:58 aufrank joined perl6
07:06 neoesque joined perl6
07:09 _seaker_ is now known as k00k
07:09 k00k is now known as c00k
07:20 drbean joined perl6
07:32 gaal re: <20060508230235.GB2668@wall.org>: !!!! (!)
07:32 gaal # reduce in list context == scan
07:32 wolverian scanl or scanl1? (or r?)
07:33 gaal well, foldl or foldr has already been addressed
07:33 wolverian ah, I've missed that
07:33 gaal so presumably the same direction
07:33 wolverian how was it addressed
07:33 gaal wolverian: is [-] @l r or l? depending on &infix:<->
07:33 wolverian s/$/?/
07:34 wolverian mm, okay. thanks
07:34 wolverian how about the foldl/foldl1 distinction?
07:35 gaal I mean for reductions in general -- including scans, there's a default direction
07:35 gaal now let me remember where it's controlled
07:37 gaal L<S03/Reduction operators>
07:38 gaal errr, I can't find discussion of fold direction there. hmm?
07:39 elmex joined perl6
07:39 gaal "it must associate the same way as the operator used". but how do you control that?
07:41 gaal oh, okay: it's in the prototype (S06)
07:41 gaal (is assoc)
07:41 bsb gaal!
07:42 bsb I thought: @b <== map { ... } <== @a
07:42 bsb was like a scan
07:43 bsb but haven't considered it in detail
07:43 gaal bsb: Hi! got your moosage. The postmark said May 3, so you do the math
07:45 gaal um, isn't @b <== map {} <== @a... like a map? :)
07:46 bsb but lazy
07:46 aufrank that's how I parsed it when I read it
07:46 bsb or maybe not
07:46 gaal the thing with scans is the accumulator
07:46 bsb ah I remember now,
07:46 bsb maybe map { state }, that's gross though
07:47 gaal reduce (+) [1..10]  -- 10th triangular number
07:47 gaal scan (+) [1...10]   -- 10 first traingular numbers
07:48 bsb My original plan was @a <== { $^a + $^b } <== @b being scanish
07:48 gaal (I've simplified because it's fold with identity and direction blah blah, but that's the idea)
07:48 bsb see http://www.nntp.perl.org/gro​up/perl.perl6.language/20905
07:48 bsb but that was canned.  Sensibly too
07:50 gaal cute idea though!
08:20 ingy obra: ping
08:35 aufrank soliciting comments: http://aufrank.net/notebook/development/SoCapp.txt
08:38 gaal furthering .. Further - consider furthering .. Moreover
08:38 gaal will be useful to the community even aspects - "even *if* aspects"
08:40 gaal the list in the deliverables looks like requirements for something else, the thing built on top of your API
08:41 gaal so maybe make more concrete what will be in the API itself
08:43 aufrank good point
08:43 aufrank thanks
08:46 OutThere joined perl6
08:46 gaal sure! good luck with the application
08:46 aufrank thanks :)
08:47 aufrank are you in a position to apply?  are you applying?
08:47 gaal not a student :)
08:47 aufrank that's why I didn't just ask what your project was :)
08:47 aufrank it's too easy to assume the rest of the world is in school when you are yourself
08:47 aufrank been bit by that one
08:48 gaal it's easy to wish more of the world was!
08:48 aufrank heh
08:50 spinclad audreyt: i've got updated JudyHS docs locally.  next step: check in fresh 1.0.3 sources to thirdparty/, and apply my patch.
08:50 iblechbot joined perl6
08:53 aufrank spinclad++
08:56 Aragone aufrank: s/Grammars/Grammar/ in the first line of the summary there?
08:57 aufrank took out the 'a', but yeah.  good catch, thanks.
08:59 Arathorn looks good to me, otherwise :)
08:59 Arathorn (both in content and grammar, so to speak :)
08:59 aufrank =\
09:28 OutThere joined perl6
09:29 audreyt rehi
09:29 audreyt spinclad: cool!
09:30 * audreyt praises hot spring pools with wireless support
09:31 * gaal thinks audreyt confused those with hot *spots*
09:33 audreyt no, I'm actually in a large container of sulphuric hydrogen oxide liquid...
09:37 audreyt scw: how did you test the MiniPerl6 grammar?
09:37 audreyt scw: can you check in a simple Makefile.PL or t/ to MiniPerl6 so that the process of .grammar->.pm is automated?
09:39 webmind hot springs with wireless?
09:39 webmind awww :(
09:40 audreyt cf. http://redhanded.hobix.com/c​ult/rubyspameeting2006.html
09:41 webmind nice....
09:41 wolverian "incremental tri-color write barrier GC" heh
09:42 * audreyt looks forward to the Data.Rope library
09:42 audreyt based on boehm's http://www.cs.ubc.ca/local/reading/proceed​ings/spe91-95/spe/vol25/issue12/spe986.pdf
09:42 aufrank as in "enough to hang yourself with"?
09:42 aufrank ;)
09:42 audreyt the unicode_string draft I did with Kogai already requires this kind of data structure
09:43 audreyt so it's nice to see something reusable :)
09:43 audreyt aufrank: also, it may be cyclic to tie knots, or something
09:43 aufrank =P
09:44 gaal I'm implementing TimToady++'s excellent scan idea
09:45 audreyt list-context fold?
09:45 gaal yes
09:45 audreyt cool
09:45 aufrank ok, updated: http://aufrank.net/notebook/development/SoCapp.txt
09:46 aufrank gaal++
09:46 aufrank Arathorn++
09:47 audreyt aufrank: looks great!
09:47 gaal we don't have a good way to flip the assocativity of an operator, right? so controlling foldr and foldl is always by finding out the assoc of the present op and possibly running the list through reverse, right?
09:48 aufrank gaal had the magic suggestion
09:48 Arathorn gaal: is that scan being a reduce operator in a list context? or did it get refined further?
09:49 gaal well, I just asked about folds, even before the scan the question was pertinent
09:50 gaal [] is our reduce metaop, with list context it encapsulates both scan vs. fold and r vs. l
09:50 gaal (with "[] reverse") being the r<->l control :-)
09:50 Arathorn heh, nice
09:50 * audreyt ponders &infix:<+> but assoc('right');
09:50 gaal yeah, that's what I was wondering about
09:51 Arathorn still seems slightly weird that say [+] (1,2,3) will presumably generate "136" rather than "6"
09:51 gaal but is our rec{ override }
09:51 audreyt can certainly be made to work
09:52 audreyt ([+] 1,2,3).say
09:52 gaal haskell has visual rtl folds, our are logical
09:53 gaal arrrr beh, I can't higher-order scanM and foldM because they have different sigs. Darn.
09:54 gaal I don't think I can sweep this into Val being a list, either :(
09:54 aufrank submitted :)
09:54 gaal aufrank++
09:54 gaal good luck again :)
09:55 aufrank thanks again
09:56 gaal actually, I *have* to sweep this list into a Val, come to think of it. good.
09:57 * aufrank ponders submitting another one, GData client library in Perl 6
09:57 Arathorn what's gdata? the google xml format?
09:58 aufrank yeah, atom + namespace extensions to integrate events, contacts, and "messages"
09:58 aufrank where a message is any text sent over the wire that wasn't a person or an event
09:59 aufrank http://code.google.com/apis/gdata/index.html
09:59 chris2 joined perl6
09:59 * Arathorn nods
09:59 aufrank I actually think it's a pretty well thought-out extension to atom, which I think is a pretty well thought-out spec
10:00 Arathorn wonder if they'll submit it to ietf
10:02 aufrank I don't know if namespace extensions usually go that route
10:02 aufrank but the lockin isn't too bad, since the document will still parse as valid atom even if google takes there ball and goes home
10:02 aufrank s/there/their
10:02 * Arathorn nods
10:03 aufrank wow, /me is fading.
10:04 spinclad yeah, /me too.  no checkin tonight...
10:04 spinclad and aufrank: bon chance
10:06 audreyt spinclad: as soon as JudyHS iterating hits the repo, I think I'm going to switch Pugs internals to use that :)
10:08 audreyt aufrank: so, no PDL for lambdafolks? :)
10:09 spinclad question for the assorted svn-aware: judy has an svn repo on sourceforge.  i think for third-party/ i should unpack their 1.0.3 tarball and check all that in, just as baseline for our project-local changes.  sound sane?
10:09 audreyt well, not sure about "all that in"
10:10 audreyt maybe we just need src/.
10:11 spinclad src/ and doc/
10:12 audreyt yes to doc/ext/{COPYRIGHT,LICENSE}
10:12 audreyt not sure about the others
10:13 audreyt your call really :)
10:13 aufrank audreyt: yeah, I just don't have those chops and didn't even really know how to write the proposal.
10:13 spinclad i need doc/ext/JudyHS_*, as that's my doc changes
10:13 nnunley joined perl6
10:14 spinclad that's good enough to take patches against, which to send upstream
10:14 audreyt oh, sure then
10:14 audreyt so yes, check in pristine, then check in your mods
10:15 spinclad ok, thanks, will do.
10:15 spinclad to bad &
10:16 spinclad /bad/bed/  grr!
10:16 audreyt may be worthwhile to check the project svn vs the 1.0.3 tarball to see if anything noncompat has happened
10:16 audreyt g'nite :)
10:17 aufrank audreyt: did the update to PIL that was going to follow PILN ever happen?
10:17 spinclad last change mentioned in svn was about when 1.0.3 came out.. will fit a quick double check in before too long.
10:20 spinclad r48 came out later.  will look.
10:22 spinclad & for reals
10:29 aufrank audreyt: was $meeting for $job, $cabal, or $parrot?
10:39 audreyt aufrank: $job
10:40 audreyt aufrank: the update to PIL is the same thing as Capturizing pugs
10:40 aufrank that is one connection I most certainly had not made
10:41 audreyt ok. pugs internals currently has various Syn nodes
10:41 audreyt to compensate for the fact that we didn't have macros that manipulate ASTs
10:41 aufrank ok
10:42 audreyt but now they can all be desugared at parser level
10:42 audreyt presumably
10:42 audreyt right?
10:42 aufrank that's what I'm working on!
10:42 svnbot6 r10244 | clkao++ | Make this like a real module.
10:42 audreyt exactly.
10:42 * aufrank has the beginnings of Capture.pg sitting open in his editor
10:43 audreyt woot
10:43 audreyt so yes. instead of the "App" taking arbitrary Exps
10:43 nnunley pg for Perl Grammar?
10:43 audreyt nnunley: yeah.
10:44 aufrank yup
10:44 aufrank those postgres guys don't really need file extensions
10:44 aufrank so we called dibs
10:44 clkao ;)
10:44 audreyt instead of the App taking arbitrary Exps, the parser needs to emit PIL constructs
10:44 audreyt that is, explicit Call/Apply nodes taking Captures as arglists
10:45 svnbot6 r10245 | clkao++ | Correct & todo tests, retire parser.pl.
10:45 audreyt and this structure needs to be reflected back to p6 space as well
10:45 clkao scw: ;)
10:45 nnunley clkao++
10:45 aufrank ok
10:45 clkao it's now a real module
10:45 aufrank audreyt: that makes sense.  and call/apply are 2 of the nodes in PILN?
10:45 audreyt right.
10:46 audreyt Call is anything that has a name
10:46 audreyt $foo.moose(3); blah(4)
10:46 audreyt Apply is one that has not
10:46 audreyt $foo(3); &blah(4)
10:46 audreyt in the current Exp/App node we confuse the two
10:46 audreyt resulting in various bad dispatch bugs
10:46 audreyt (for hopefully obvious reasons)
10:47 aufrank yeah, got that
10:47 audreyt so Capturizing involves 4 steps
10:48 audreyt first is to rework the Val type so that it agrees with PIL^N's object layout
10:48 audreyt (without this we can't easily reflect structures into Val space (aka object literals))
10:48 audreyt next is to rework Exp so it reflect the new calling conventions
10:49 audreyt next is to convert Pugs.Eval to rid of reduceSyn
10:49 audreyt moving them into macro space
10:49 audreyt and retain only the "dynamic" part in evaluator
10:49 audreyt all static parts are none of its business
10:50 audreyt finally, update the codegens to deal with serialized object space, instead of raw haskell yaml dumps
10:50 audreyt where "serialized object space" starts with ::Main
10:50 audreyt normally
10:50 audreyt and contains &Main::MAIN (main program)
10:50 audreyt et cetera.
10:50 audreyt most of this is already done in the PIL^N prototype
10:51 audreyt just need to cannibalize them into the core runtime
10:51 audreyt end of explanation. am I making sense? :)
10:51 aufrank yes
10:51 aufrank lots of it
10:52 aufrank though I initially read Capturizing as a process that would be done during every parse, and thought "all of this reworking!  why not throw out the broken parts?"
10:53 aufrank then I realized you were describing a one-time throwing-out of the broken parts
10:53 audreyt yup :)
10:53 audreyt where "broken" means "fresh new calling convention as of December 2005"
10:53 audreyt but well, things change.
10:53 aufrank quicker around here than most places
10:54 audreyt indeed
10:54 aufrank got a minute to answer Signature.pg questions?
10:55 audreyt sure
10:56 aufrank can I get RETTYPE out of RETTYPE ROUTINE name (...) {...} without parsing ROUTINE and name?
10:56 aufrank (for the purpose of implicitly -->'ing it)
10:56 aufrank RETTYPE is properly part of the sig, but ther others aren't
10:57 audreyt RETTYPE can only be there if following declarator
10:57 audreyt properly speaking, it's the declarator's job to munge the Signature
10:57 audreyt not the Signature parser's
10:57 audreyt declarator means <my our> etc
10:58 aufrank so add <declarator>? <typeName>? to the beginning, or leave the munging out of Sig.pg?
10:58 kanru joined perl6
10:58 audreyt I think it belongs to Declaration.pg
10:58 audreyt not Sig.pg per se.
10:59 aufrank fine by me
10:59 audreyt or rather, Declarator.pg
10:59 aufrank are [_]**{2..*} names allowed for variables?
11:00 audreyt I don't see why not.
11:00 audreyt 1..* is sufficient.
11:00 aufrank is the ^ [s|tw]igil ever used in declaring types within a sig?
11:01 audreyt as a twigil, no
11:01 audreyt as a sigil... I don't think so. it's still the ::dwigil.
11:02 aufrank are :$^foo and :foo($^bar) allowed?
11:03 aufrank how about *@^baz ? ( a different question )
11:04 audreyt I think none of them are allowed.
11:04 audreyt arguably
11:04 audreyt { sub ($^x) { 3 } }
11:04 audreyt expands to
11:05 audreyt -> $x { sub ($x) { 3 } }
11:05 audreyt but it really does not make sense to construct a closure this way
11:05 audreyt so simply disallowing it makes more sense
11:05 pasteling "gaal" at 192.115.25.249 pasted "typing help needed" (33 lines, 1.3K) at http://sial.org/pbot/17116
11:06 aufrank and there's only ever one (non-unpacked) *@slurpy and one (non-unpacked) *%slurpy in a sig?  Can you have both of those in a single sig?
11:06 penk left perl6
11:06 * gaal expects forall voodoo is required to fix this?
11:08 gaal unrelatedly. couldn't haskell benefit from "mcase", where mcase aexp of ... is equivalent to do { exp <- aexp ; case exp of ... }
11:09 audreyt aexp >>= \exp -> case exp of
11:09 audreyt gaal: post a whole patch so I can build?
11:09 gaal sure, sec
11:09 audreyt aufrank: yes you can.
11:11 aufrank but just one of each, yes?
11:13 audreyt certainly
11:13 audreyt alternately, you can put multiple
11:13 gaal audreyt: http://perlcabal.org/~gaal/tmp/reduce.0.patch
11:13 audreyt but the ones after the first are all empty
11:14 audreyt I don't mind either interpretation; whatever is easier for you :)
11:14 aufrank k
11:14 audreyt the spec doesn't forbid multiples.
11:14 audreyt alternately, multiple ones _all_ receives the slurpy things.
11:14 aufrank it's really the difference between ? and *
11:14 audreyt that may not be too sane, though.
11:14 aufrank so not a big deal
11:17 aufrank and a final slurpy scalar treats everything it slurps as positional?
11:18 * aufrank checks syn
11:19 audreyt gaal: it has nothing to do with forall
11:19 * gaal braces for a silly error
11:22 aufrank biab        &
11:22 audreyt gaal: getReduceFuncs can't be pure
11:23 audreyt either asks for context outside
11:23 audreyt or make it monadic
11:23 gaal eep, indeed (I wonder how the compilation didn't mention that?)
11:24 audreyt because you can supply an instance and make it work...
11:24 gaal but yeah, s/let// and s/=/<-/
11:24 audreyt also,  (\a b -> f (a:b)) is somewhat bogus
11:24 audreyt because as specced, a and b are both Val
11:24 audreyt and you can't : them together
11:24 gaal I did have a hard time understanding how the foldMn version got away with that!
11:25 gaal (but it does)
11:25 gaal (also, isn't drop 1 list =:= tail list ?)
11:26 audreyt well because list2LoL gets [[V]]
11:26 audreyt I mean, it returns [[V]]
11:26 audreyt so the type "b" is [B]
11:26 audreyt not B
11:26 gaal uh huh. but scanM (sneakily) has the same signature as foldM; how come it doesn't work there then?
11:27 audreyt because you got the sig wrong
11:27 audreyt you had
11:27 audreyt    scanM :: (Val -> Val -> Eval Val) -> Val -> [Val] -> Eval Val
11:27 audreyt but it's (sneakily)
11:27 audreyt    scanM :: (Val -> [Val] -> Eval Val) -> Val -> [[Val]] -> Eval Val
11:27 audreyt er I mean
11:29 gaal (ah re: drop 1, no it isn't tail, because drop 1 [] is [], not an error)
11:29 audreyt    scanM :: (a -> b -> Eval a) -> a -> [b] -> Eval a
11:30 gaal it's scanM :: (Val -> VList  -> Eval Val) -> Val -> [VList] -> Eval Val
11:30 gaal except that that doesn't work :)
11:30 audreyt no, as it's poly morphic
11:30 audreyt you were indeed right
11:30 audreyt    scanM :: (Val -> b -> Eval Val) -> Val -> [b] -> Eval Val
11:30 audreyt works
11:30 * gaal tries...
11:30 audreyt s/b/a/
11:30 audreyt the rest is left as exercise :)
11:31 audreyt dinner, bbiab &
11:31 gaal :)
11:31 gaal bon mousse.
11:33 audreyt http://perlcabal.org/~audreyt/tmp/corrected.diff
11:33 gaal thanks, exercising
11:34 froh-doh joined perl6
11:39 penk joined perl6
11:41 gaal well, it complies and almost works, but the start and end values need to be kludged a bit. will do soon - thanks audreyt :)
11:41 gaal bbiab &
11:45 reZo joined perl6
11:47 reZo is now known as phpError
12:03 kolibrie joined perl6
12:08 kane_ joined perl6
12:09 trampel joined perl6
12:10 jsiracusa joined perl6
12:13 Eljin joined perl6
12:17 hcchien joined perl6
12:19 kane_ is now known as kane-xs
12:20 Eljin left perl6
12:21 Khisanth joined perl6
12:40 neoesque joined perl6
12:41 iblechbot joined perl6
12:59 Qiang joined perl6
13:08 cdpruden joined perl6
13:12 Juerd http://tnx.nl/php.jpg
13:19 Limbic_Region joined perl6
13:23 cdpruden Juerd++
13:29 hcchien joined perl6
13:32 FurnaceBoy joined perl6
13:37 scw clkao: :)
13:38 clkao scw: now get to work! ;)
13:38 scw clkao: I was thinking if I should use compile_p6grammar.pl or lreq
13:38 scw but lreq not yet support <-["]> :(
13:39 clkao make it so!
13:40 scw then what copy should I modify? misc/pX/Common/lreq or the one under Pugs-Compiler-Rule ?
13:43 chris2 joined perl6
14:02 particle_ joined perl6
14:05 hexmode joined perl6
14:06 fglock joined perl6
14:07 fglock scw: ping
14:11 lichtkind joined perl6
14:13 justatheory joined perl6
14:15 fglock scw: it's better to use compile_p6grammar.pl instead of lrep
14:18 lichtkind suddenly i installed pugs, font have to use evalbot :)
14:18 svnbot6 r10246 | gaal++ | * Reduce metaoperator in list context gives a scan. Tests included.
14:18 svnbot6 r10246 | gaal++ |   TimToady++. Chained ops scanning doesn't; consulting with p6-l.
14:45 jserv-- joined perl6
14:49 aufrank joined perl6
14:52 aufrank hey all
14:57 fglock left perl6
15:02 lichtkind hallo aufrank
15:06 vel joined perl6
15:16 svnbot6 r10247 | scw++ | Pugs::Compiler::Rule
15:16 svnbot6 r10247 | scw++ |  * character classes in Pugs::Emitter::Rule::Perl5
15:28 aufrank has TGE syntax solidified since http://www.parrotcode.org/docs/compiler_tools.html ?
15:31 audreyt more-or-less, yes
15:32 audreyt mostly it's just PIR.
15:32 audreyt see eg ./languages/pheme/lib/past2post.tg in the parrot tree
15:33 audreyt I'm trying to get the PIR part replaced with the MiniPerl6 scw's working on
15:33 audreyt in the interest of portable-productions-across-implementations
15:34 stevan heya audreyt
15:34 aufrank I get the feeling I should go scan through MiniPerl6
15:34 stevan audreyt: so do you think YAPC::NA will be an appropriate time to talk ObjectSpace stuff again?
15:35 audreyt surely
15:35 stevan cool
15:36 audreyt in particular the p5 objspace
15:36 stevan audreyt: I have been very out of the loop lately, what is the current state of p5 related stuff?
15:37 stevan Pugs::Compiler::Rule is still written in p5 I assume
15:38 stevan or rather p5 bootstrapping p6
15:38 audreyt take a look at misc/pX/Common/
15:39 audreyt the p5 stuff currently is centred around parsers
15:39 audreyt or rather, around the rule sublangauge
15:39 stevan yes
15:39 audreyt fglock has a SoC proposal to start working out the p5 objspace
15:39 stevan that is why I figured it was safe to drop back for a while :)
15:39 audreyt implementing primitive types in S06
15:40 audreyt but until that part of work starts, nothing much has happend in p5-as-a-target
15:41 audreyt <- just released Filter::Simple::Compile and Filter::Macro (C-style, not Perl6-style macros) to CPAN
15:41 scw new blog entry posted :)
15:41 audreyt dozens of .pmc modules lying around in $job code now ;)
15:41 stevan cool
15:41 audreyt scw++
15:41 nnunley Hrm.
15:42 stevan audreyt: so the .pmc thing is working really well then
15:42 stevan very nice
15:42 scw my connection to blogger is extremely slow now :(
15:42 audreyt stevan: right. in $job I used a locally hacked version of Perl6::Subs
15:42 stevan nothingmuch and I have been talking about Moose compiled to .pmc
15:42 audreyt based on Filter::Simple::Compile
15:42 neoesque joined perl6
15:42 stevan oh,.. very nice
15:42 audreyt so I get to write p6 method/subs and avoid startup overhead
15:42 stevan yeah
15:43 particle_ .pmc?
15:43 audreyt particle_: strange technology developed to allow mixing v6 code in v5 programs, among other uses
15:43 audreyt cf. http://search.cpan.org/dist/Module-Compile/
15:44 particle_ just happens to have the same extension as a parrot magic cracker...
15:44 audreyt slides: http://www.kwiki.org/Sporx/pmc.xul
15:44 audreyt yeah, but .pmc-for-perl5 was here first :)
15:44 audreyt (1999, as compared to parrot's 2001)
15:44 audreyt also, parrot doesn't install .pmc files, so it's probably safe.
15:45 particle_ just for a second thought you were using parrot for perl5 stuff
15:45 particle_ thx for the links
15:45 audreyt there is Inline::Parrot as well in the pugs tree... but not actively using it (yet)
15:46 audreyt scw: yeah, somehow blogger is really slow from hinet here as well
15:46 TimToady seems to me that patrick's P6 bootstrap might turn into MiniPerl6...
15:46 scw audreyt: I'm on TANet now...
15:46 audreyt TimToady: the goal is certainly to get pmichaud's minip6 to work as rule-production-language in parrot land...
15:47 TimToady nevermind, I'm inside out this morning...
15:48 audreyt mmm Klein Wall
15:50 TimToady It's that spot where the surface of my brain intersects itself that I'm having problems with...
15:55 audreyt TimToady: did you look at the Ropes structures? does it fit with your brain w.r.t Str?
15:55 svnbot6 r10248 | audreyt++ | * Pugs.Lexer: ruleWs -- proper dynamic <ws> support for
15:55 svnbot6 r10248 | audreyt++ |   cases where we can't infer what <ws> means statically
15:55 svnbot6 r10248 | audreyt++ |   from rules input.
15:56 TimToady link?
15:56 audreyt http://www.cs.ubc.ca/local/reading/proceed​ings/spe91-95/spe/vol25/issue12/spe986.pdf
15:57 audreyt basically, a Rope is a tree of concats of fragments
15:57 audreyt allowing sharing of fragments
15:57 TimToady sounds about right.
15:58 audreyt basically, O(1) concat with no memcpy.
15:58 audreyt (which is what we don't get currently in any of the 4 runtimes)
15:59 TimToady now just get the OS to mmap one.  :)
15:59 audreyt well, a one-fragment is just a degenerate case :)
15:59 PerlJam audreyt: Are you going to implement Str as Ropes?
15:59 TimToady nod
15:59 audreyt PerlJam: probably not me. probably some lambdafolk.
15:59 audreyt (as Data.Rope on top of Data.ByteString)
16:00 pmurias joined perl6
16:00 pmurias hi
16:00 audreyt just wondering if we can profitably reuse that work
16:00 audreyt seems to be yes to me, based on a cursory glance
16:00 audreyt pmurias: hi!
16:01 TimToady I'm wondering if @foo ~~ /.../ can view @foo as a funny kind of rope.
16:01 audreyt (or, more likely, Data.Rope on top of Data.EncodedString on top of Data.ByteString)
16:01 audreyt TimToady: well, it lacks position-index information
16:01 PerlJam interesting
16:01 audreyt so need to do a O(n) prescan
16:01 audreyt we'll call it study()! ;)
16:02 _why hey audrey
16:02 _why when you get a minute, i need to reconcile your syck stuff
16:02 TimToady seems like something would want to be done lazily in case it's never needed.
16:02 PerlJam audreyt: don't they keep the length information around?  you could get position from that when needed.
16:03 audreyt _why: here's a minute
16:03 _why is it not too late there?
16:03 audreyt it is, but a minute is not much
16:04 audreyt PerlJam: yeah, but @foo[1] may need to stringify
16:04 audreyt @foo itself is sparse; it may contain nonstrings
16:04 audreyt but as TimToady said, this can be done in an as-needed basis
16:04 _why your syck binding has two alterations (aside from some very common patches i've seen in other bindings)
16:04 _why both are to the emitter
16:05 audreyt right. one is for mark_node to distinguish seen from unseen
16:05 _why i'm looking a YAML::Syck code, so maybe these were done by gaal or someone else?
16:05 _why tell me more about that one
16:05 svnbot6 r10249 | pmurias++ | a regex-based parser for vtable.h
16:05 audreyt 0.44? it's all by me I think
16:05 audreyt the C part
16:05 _why yes yes that's the one
16:06 audreyt ok. in Perl5 we have this strange idea that an object containing another object doesn't really do that
16:06 _why bizzxare, go on
16:06 audreyt it contains a "reference" which points to the real object
16:07 audreyt the reference is like a typed tag (of the 6 or so builtin types) to indicate the target object layout
16:07 audreyt as well as (potentially) the class
16:08 audreyt so in mark_emitter, there is always a level of indirection
16:08 audreyt see perl_common.h line 54
16:08 audreyt if (SvROK(sv)) perl_syck_mark_emitter(e, SvRV(sv));
16:09 audreyt this says "if this value on hand is a reference, mark the referenced item"
16:09 _why mmmnn
16:09 audreyt however, a reference can refer to itself.
16:09 audreyt my $x; $x = \$x;
16:09 audreyt is the canonical example
16:09 _why i follow
16:09 audreyt so that naive logic loops
16:10 ludan joined perl6
16:10 audreyt to break the loop I need to know if it's previously marked somehow
16:10 audreyt I can use emitter_xtra and hold another map
16:10 ludan hi
16:10 audreyt or I can abuse the ->markers map.
16:10 audreyt I chose the abusive way. :)
16:10 audreyt end of explanation :)
16:10 _why ohhh
16:10 audreyt ludan: hi!
16:11 TimToady ludan: welcome, at least by default... :)
16:11 neoesque joined perl6
16:12 _why the other patch concerns using quote2 styling for literals
16:12 _why i guess this is for compat with YAML.pm?
16:12 audreyt yeah.
16:13 audreyt though I remember i overloaded the meaning of scalar_fold
16:13 audreyt because I don't use it myself
16:13 audreyt so I made it mean scalar_utf8
16:13 _why yeah :)
16:13 audreyt if there is a real scalar_utf8, well, I'll use that :)
16:13 audreyt also, the json pre/post processor may be of interest to you
16:14 _why it is
16:14 audreyt in perl_syck.h
16:14 audreyt though if you have a native impl, I can throw that away as well :)
16:14 _why and lib/JSON and all that
16:14 _why working on it
16:14 audreyt yay :)
16:15 _why if i can get a real resolution from oren and ingy, i'll use that
16:15 audreyt k
16:15 ingy hello
16:15 audreyt ingy is right here :)
16:15 _why but in the meantime i'll probably use what you've got
16:15 ingy :D
16:15 _why that scared me
16:15 _why don't do that
16:15 _why HI INGY
16:15 ingy I broke my right arm
16:15 _why holy shit
16:15 ingy al
16:15 ingy mo
16:15 ingy st
16:16 _why bravo!
16:16 ingy on some good drugs
16:16 ingy I can't really move the arm, but gugod gave me a nice external keyboard to use
16:17 audreyt ?eval [ [+] 1..10 ]
16:17 evalbot_10249 [55,]
16:17 _why wow this is almost like chatting with steven hawking
16:17 ingy what's up with yaml?
16:18 _why yeah that's a good question
16:19 audreyt ?eval [ [+] 1..10 ]
16:19 evalbot_10249 [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
16:19 audreyt that's more like it.
16:19 audreyt gaal++
16:19 xinming ?eval [ [+] 1..10 ]
16:19 evalbot_10249 [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
16:19 _why this is a magical place, for sure
16:20 audreyt ?eval [ [~] 'a'..'f' ]
16:20 evalbot_10249 ["a", "ab", "abc", "abcd", "abcde", "abcdef"]
16:20 audreyt TimToady++ # shiny new scanner
16:21 TimToady blush
16:21 audreyt TimToady: so, do we get that into S03? :)
16:21 aufrank gaal++ # show the r-l toggle with .reverse!
16:21 * gaal meows
16:22 audreyt ?eva [ [+] reverse 1..10 ]
16:22 audreyt ?eval [ [+] reverse 1..10 ]
16:22 evalbot_10249 [10, 19, 27, 34, 40, 45, 49, 52, 54, 55]
16:22 xinming ...
16:22 aufrank but that's doesn't show scanl vs scanr, does it?
16:23 particle_ so, S03 says, "[+&]()      # +^0   (-1 on 2's complement machine)"
16:23 gaal ?eval list [+] 1..10 # also works
16:23 evalbot_10249 (1, 3, 6, 10, 15, 21, 28, 36, 45, 55)
16:23 particle_ but afaik we're doing ieee, which is sign-magnitude, so will never be 2's complement
16:23 audreyt aufrank: it does.
16:24 audreyt aufrank: to get True scanr, use two reverses
16:24 audreyt ?eval [ [+] reverse 1..10 ].reverse
16:24 evalbot_10249 "55 45 25 94 54 04 43 72 91 01"
16:24 audreyt er, not _that_ reverse...
16:24 aufrank ?heh
16:24 audreyt ?eval list reverse [+] reverse 1..10
16:24 ingy haha
16:24 evalbot_10249 (55, 54, 52, 49, 45, 40, 34, 27, 19, 10)
16:24 audreyt better.
16:24 xinming joined perl6
16:25 gaal hmm, should there not be an 'is zero' trait for operators?
16:25 audreyt no, it's just MMD
16:25 audreyt or rather, zero-arg multi dispatch
16:25 * aufrank is impressed
16:25 gaal how do you do non-1 reduces with alternate zeros?
16:26 Juerd array.reverse stringifies the array?
16:26 audreyt no. it's a bug.
16:26 gaal fold (+) -42 ls
16:26 audreyt (due to confusion of Call vs Apply)
16:26 * xinming wonders what the differences between `my method` and `submethod` are...
16:27 xinming anyone here would clarify it for me please? :-/
16:27 audreyt xinming: submethods are visible to outside world
16:27 audreyt submethod means "noninherited methods"
16:27 gaal C<< &infix:<+> but is assoc >> possible, C<< &infix:<+> but is zero(-42) >> not
16:28 xinming hmm, so, for `my method`, It can only be invoked in self.meth form?
16:28 gaal so the Grand Reduction Unification (3d) isn't complete
16:28 audreyt self!meth.
16:28 audreyt gaal: say what?
16:29 audreyt my &infix:<moose> ::= &infix<+> but assoc('right');
16:29 audreyt my multi sub infix:<moose> () { -42 }
16:29 xinming hmm, Ok, thanks, sorry, I must go for learning driving for month... I'll read synopsis next month more carefully...
16:29 xinming bye all
16:29 audreyt have fun :)
16:29 audreyt gaal: I suppose this works... if it doesn't, it can be made to work
16:30 gaal audreyt: okat, the fist form would probably be ok for on-the-fly reduces with the spelled-out version, &reduce
16:30 gaal but the second won't, would it?
16:31 audreyt the second line adds a variant to infix moose
16:31 audreyt try again
16:31 gaal &foldr ::= -> &op, @l { reduce &op but assoc('right'), @l }
16:31 audreyt my multi sub infix:<moose> () { -42 }
16:31 TimToady MMD comprises much wonderfulness...
16:32 audreyt my multi sub infix:<moose> is assoc('right') ($, $) {...}
16:32 * particle_ croons, "i'll take manhattan..."
16:32 gaal ok, what I'm asking is how do you write a (non ugly) fold with an overriden zero?
16:33 TimToady MMD: "Maybe Manhattan Dwims"
16:33 particle_ :)
16:33 audreyt gaal: a generic foldr or just for [+]?
16:33 gaal generic
16:34 gaal no, ignore the r in foldr
16:34 audreyt so it takes $new_zero, &op, @l
16:34 audreyt like that?
16:34 gaal yes
16:34 audreyt well, trivially:
16:34 audreyt multi myfold ($v, &) { $v }
16:34 gaal Haskell has 3 dimensions: scan/fold, right/left, assumed nonzero/parameter zero
16:35 audreyt multi myfold ($, &o, *@l) { reduce &op, @l }
16:35 audreyt there you go
16:35 audreyt s/op/o/
16:35 gaal [] unifies them, and adds Logical Associativity<tm>
16:35 aufrank audreyt: what are bare sigils in Signatures?
16:35 audreyt aufrank: they have internal and external names as empty
16:36 audreyt aufrank: meaning, it is only checked for type and never really bound into variables
16:36 gaal but how do I say, I want to perform this fold on some arbitrary op, but with this arbitrary zero?
16:36 aufrank so a slightly picker *
16:36 audreyt yup
16:36 aufrank s/picker/pickier/
16:36 audreyt myfold 42, &infix:<+>, @list;
16:36 audreyt gaal: like that?
16:36 gaal yes but I said nonugly. :-)
16:37 aufrank how can I make a rule matchthe null string between $ and put it into $<external>?
16:37 gaal I guess "can't win 'em all"
16:37 aufrank s/$/$,/
16:37 audreyt [+] @list // 42;
16:37 audreyt [+] (@list // 42);
16:38 audreyt actually, that should be || here
16:39 PerlJam aufrank: Why do you want to match the null string and store it somewhere?
16:39 gaal looks pretty good, but would that work where @list = (undef) ?
16:39 audreyt but || would confer context
16:39 audreyt so
16:39 audreyt [+] *(@list || 42)
16:39 audreyt is the Really Works version
16:39 audreyt gaal: that's fine
16:40 aufrank oh, if I just don't match a name but the parse succeeds, the external name will be empty
16:40 audreyt ?eval my @list = 1..10; [+] *(@list || 42)
16:40 evalbot_10249 55
16:40 audreyt ?eval my @list = (undef); [+] *(@list || 42)
16:40 evalbot_10249 undef
16:40 audreyt ?eval my @list = (); [+] *(@list || 42)
16:40 evalbot_10249 42
16:40 gaal yay!
16:40 aufrank so it's { ... [<sigil> <name>?,]? ... } # or something like that
16:40 audreyt aufrank: I s'ppose so
16:41 TimToady where I presume "non-ugly" is everything but the variable must be punctuation.  :)
16:41 audreyt looks like that :)
16:41 audreyt [+](*(@_||42))
16:41 audreyt [+](*(@_||$_))
16:41 TimToady I know some people who would call that cork-brained...
16:41 aufrank are you so surprised?  there's been undisguised APL admiration on p6l today!
16:41 audreyt indeed
16:42 audreyt clearly it's Advanced PerL
16:42 TimToady yes, well, Mark's college honors project was to write an APL interpreter in PDP-11 assembly...
16:42 TimToady sufficiently advanced perl...
16:42 audreyt ...is indistinguishable from APL
16:42 TimToady now it's SAP as well...
16:43 gaal TimToady: well, seeing as Haskell has eight fold functions (and I haven't even gotten to monadic versions), I think we did pull a high order on them, even at the cost of a few punctuation chars :-)
16:43 TimToady I don't mind beating Haskell occasionally.  Perl has to be good for something...
16:43 audreyt TimToady++
16:44 ludan TimToady: hi :)
16:44 TimToady by now that should be a "rehi"  :)
16:44 ludan yep :P
16:45 TimToady what is your interest in P6?
16:46 ludan just lurking to undestand a bit more, and after i wanna start with a functional language like haskell
16:46 TimToady P6 is a functional language like haskell, sorta... :)
16:46 ludan TimToady: i'm not an active part of P6 :(
16:47 TimToady don't let audreyt hear you say that, or you'll have a commit bit before you know it...
16:47 ludan ok :)
16:48 aufrank sub foo (*@bar, *%baz, *@qux, *$qux) { ... } # how many slurpies can you have in a single sig, and what combinations are legal?
16:48 TimToady syntactically or semantically?
16:48 fglock joined perl6
16:48 aufrank syntactically
16:49 TimToady I suspect the syntax doesn't care how many you put.
16:49 TimToady If it chokes, it'd be in semantic analysis somewhere.
16:49 audreyt ludan: danieleludovici at email.it ?
16:49 ludan audreyt: nooooooooo :)
16:49 TimToady oops, too late...
16:49 TimToady now you're done for...
16:49 ludan audreyt: i'm not joking, is not my email :)
16:50 aufrank TimToady: ok, audreyt said something similar this morning.  I buy it.
16:50 TimToady so you only believe it if it comes from a guy, not a gal?  :P
16:51 aufrank I forget things after too many hours of being awake.  There's been sleep since then.
16:51 audreyt ludan: too bad :) not ludan at linux.it either?
16:51 ludan audreyt: no no no :
16:51 ludan :)
16:51 TimToady I believe ludan is coming in from .nl somewhere...
16:51 aufrank also, I only asked about *@foo combining with *%bar... putting all of them in there confused me again
16:51 ludan i'm just studying in the netherlands
16:52 TimToady It's certainly allowed to mix one *@foo with one *%bar.
16:53 aufrank yes
16:53 aufrank sub foo ($bar, *@) {...} # ignores everything after the first scalar?
16:54 aufrank (are there unnamed slurpies in general?)
16:54 TimToady oughta work.
16:54 audreyt foo(1, baz=>3) would die.
16:54 audreyt need to say
16:54 audreyt sub foo ($bar, *@, *%)
16:54 audreyt to catch that
16:54 aufrank man, whatever
16:54 aufrank sub foo ($bar, *) { ... }
16:54 audreyt I guess
16:54 audreyt sub foo ($bar, *)
16:55 audreyt yeah, whatever, never mind :)
16:56 audreyt hm.
16:56 TimToady hr.
16:56 aufrank sub foo (:$, :foo$, :($bar)) # all syntactically ok?)
16:56 audreyt sub foo (*, *)
16:56 audreyt wouldn't make sense then
16:57 audreyt sub foo ($, $)
16:57 audreyt need that to confer arity
16:57 TimToady yep
16:57 aufrank audreyt: any whatever automatically puts you into the Inf parse, but so does any arity > 1, right?
16:57 audreyt right, though I'm not talking about parse
16:58 TimToady aufrank: I don't think :foo$ works
16:58 audreyt aufrank: syntactically, I'm not sure about :foo$
16:58 audreyt the other two is fine, though maybe semantically questionable
16:58 aufrank something something great minds something something
16:58 TimToady same gutter, I believe...
16:59 audreyt . o O (redundant array of inexpensive designers)
16:59 TimToady I resemble that remark.
16:59 SamB hehe
16:59 audreyt @Larry is RAID;
16:59 TimToady I don't find them so R
17:00 audreyt maybe because we are still at level 1
17:00 particle_ perhaps level 0
17:00 TimToady you lose your R when one of them goes sour, and with designers that happens frequently...
17:00 audreyt 1+0 maybe.
17:01 TimToady though I haven't noticed that expensive designers are any more reliable...
17:02 aufrank mumble arc
17:02 SamB well, expensive designers don't conk out on you as much because they need food
17:03 TimToady you sure you don't mean expansive designers?
17:03 TimToady they have more reserves...
17:04 SamB no, I mean, expensive designers can afford to buy food
17:04 TimToady expansive designers could afford to have not bought food...
17:04 SamB true!
17:05 lichtkind TimToady  how did you knew that perl is the right name? (have to name my prject right now)
17:05 TimToady well, it wasn't the right name in Japan.  :)
17:06 szbalint Oh, care to tell a bit more about that? :)
17:06 TimToady but mostly I knew that people irrationally like a work with positive connotations.
17:06 aufrank and so the Revolution resulted in Wii
17:06 TimToady szbalint: r and l are difficult in Japanese...
17:07 TimToady s/work/word/
17:07 TimToady I have a bad name too...
17:07 particle_ levorution is still better than wii
17:07 szbalint I see.
17:08 TimToady I had to learn to answer to "Rally Woeru"
17:08 aufrank catchy
17:08 TimToady and Perl comes out "Paaru".
17:09 TimToady but that's okay.  I think the Japanese and English are about equal in mangling each other's phonological systems...
17:09 * SamB still wants to vandalize the boxes to say Revolution instead of Wii
17:10 TimToady English speakers can't tell the difference between dwarf trees and jumping out of airplanes...
17:10 aufrank phonologists love japanese vowels and prosody
17:10 TimToady especially pitch accent, yes.
17:11 TimToady 'course, there's about 26 different pitch accent systems in Japan...
17:11 TimToady but at least everyone recognizes Tokyo accent.
17:12 TimToady sorry, you pushed my phonology button...
17:12 szbalint My girlfriend always said that I should stay away from linguists. That might be a bit hard as she's slowly becoming one. :)
17:13 TimToady It used to be I couldn't spell lingrist, and now I are one...
17:13 fglock scw: lrep is under a rewrite - compile_p6grammar.pl has less features, but it is more up-to-date
17:13 lichtkind thanks TimToady but had you a moment where you did know thats it ore just you feel there is no better
17:14 TimToady ore wa, ringurisuto...
17:15 cratylus joined perl6
17:16 TimToady though, actually, they have their own word for linguist: 言語学者, gengogakusha.
17:16 TimToady which, oddly, I can never remember...
17:17 aufrank rule default { = $/<default> := <expression( terminates => ',' ) } # valid rule, even with in-place redefinition of $/<default> ?
17:18 gaal @facs := [*] 1..*; &fac = { @facs[$^n] }
17:18 gaal # I want memoization so that this works. :-)
17:19 gaal # stolen cold from a nice Haskell page
17:19 aufrank what's the trait that means is memoized?
17:19 gaal 'is memoized' :)
17:19 aufrank I thought there was a sexier name
17:19 TimToady is cached
17:19 aufrank that's the ticket
17:19 TimToady it has a certain cachet
17:20 aufrank re: previous q on rules, does Match object binding need to be set off in curlies or anything, or can it happen unmarked in a rule?
17:21 TimToady I don't see anything wrong with what you wrote, though $/<default> can be shortened to $<default>.
17:22 * gaal wonders if there'll be a programmatic extensible way of manipulating sub traits, so the memoization can get its many optional arguments set
17:22 TimToady I think, though, that the expression terminates on a precedence, not a token.
17:22 * aufrank points at audreyt
17:22 aufrank she did it!
17:22 gaal bbiab
17:23 audreyt what did I do?
17:23 aufrank TT:  (terminates => <some_level>)  #?
17:23 TimToady Gave aufrank a token of your appreciation.
17:23 aufrank audreyt: you clued me in to the terminates argument to <expression>, and suggested ',' as the way to end defaults
17:24 aufrank (which was very helpful and kind of you to do!)
17:24 audreyt oh. that. :)
17:24 audreyt if -e {...}
17:24 audreyt surely the { is a token not a prec?
17:24 TimToady in discussions with pmichaud we determined that in general you want to terminate on a set of possible tokens, where that in part be specified by precedence.
17:24 TimToady s/in part/can in part/
17:25 audreyt that works, but sometimes you still want specific tokens
17:25 TimToady yes, "set of possible tokens".
17:25 TimToady but sets can be specified either by enumeration or by rule.
17:25 audreyt that worksforme
17:26 TimToady or, in this case, perhaps both.
17:26 aufrank we actually can't have just ',' here, because the default could be the last thing in the sig so it would terminate on ')'
17:27 TimToady right.
17:27 TimToady though that would also fall under the precedence rule, if you consider ) to be infinitely loose.
17:28 TimToady that is, in terms of surreal precedence, the levels inside the parens are a different order of infinity...
17:29 TimToady but most other languages would just say "it's just a term, use parens if you want ($a + $b)..."
17:29 TimToady In fact, some languages would just use parens without the =.
17:30 aufrank hrm
17:30 audreyt good night. have fun :)
17:30 aufrank thanks audreyt.  sleep good.
17:30 * audreyt waves
17:30 TimToady thx!
17:30 audreyt np hth hand :)
17:32 aufrank sub foo (%hash = :a<b>, :c<d>) { ... }# or
17:33 aufrank sub foo (%hash = (:a<b>, :c<d>)) {...}
17:33 aufrank ?
17:33 aufrank (inclusive or)
17:33 * theorbtwo grumbles over Parse::Binary's lack of documentation.
17:36 aufrank ?eval \) ~~ / <[,)]> /
17:36 evalbot_10249 Error:  unexpected ")" expecting term
17:36 aufrank ?eval \) ~~ / <[,\)]> /
17:36 evalbot_10249 Error:  unexpected ")" expecting term
17:36 aufrank # what's wrong there?
17:36 aufrank nm, duh
17:37 _why does anyone know what's up with ghc on freebsd6?
17:37 aufrank s/)/')'/
17:37 audreyt theorbtwo: try http://search.cpan.org/~simon​/Parse-Binary-Iterative-1.00/
17:38 audreyt theorbtwo: lathos does a much better job than me; Parse::Binary is stagnated because $job now uses haskell
17:38 aufrank _why: off-topic:  do I remember that you were going to put the atom syndication format into YAML at one point?
17:38 audreyt _why: I'm on fbsd6 with a working ghc... do you need a binary package?
17:38 _why yeah, !okay/news
17:39 _why i'm getting a linker error with libm.so.3
17:39 _why the lists say use compat5x
17:39 _why uhhh no such thing
17:39 aufrank _why: if that was an asnswer to me, I didn't grok it =\
17:39 _why aufrank: http://redhanded.hobix.com/index.yaml
17:39 audreyt _why: /usr/ports/misc/compat5x
17:40 _why mmmnn okay i will try!
17:41 theorbtwo audreyt: You should put out a new version with POD that says that, probably.
17:42 theorbtwo Er, not that you don't already have enough to do...
17:42 aufrank _why: thx
17:42 audreyt theorbtwo: do that for me?
17:42 audreyt you are now comaint on Parse::Binary.
17:43 theorbtwo Blast, now I have another module I need to put out a new version of...
17:43 hexmode joined perl6
17:43 audreyt I still have... 30 or so
17:43 audreyt that I need to put out new versions of
17:44 audreyt so, load balancing :)
17:44 aufrank TimToady: are there named character classes in PGE that map to Ps and Pe?
17:44 audreyt theorbtwo++ # thanks in advance
17:44 DaGo joined perl6
17:44 _why aufrank: here ya go -> http://yaml.kwiki.org/index.cgi?OkayNews
17:45 aufrank excellent
17:47 particle_ aufrank: what are Ps and Pe?
17:47 aufrank unicode character classes corresponding to opening and closing punctuation
17:47 aufrank punctuation -start and -end, from my understanding
17:48 particle_ ah, gotcha
17:50 audreyt _why: if perchance after you installed compat5x it still buildfails, a bindist is at http://perlcabal.org/~audreyt/tmp/ghc-6.4.2.tbz
17:50 audreyt _why: you can pkg_add -f it
17:50 audreyt g'nite for real &
17:51 lichtkind night
17:52 _why thanks audreyt, it's movin along now
17:52 _why glad for yr patches as well!
17:53 bernhard joined perl6
17:54 TimToady aufrank: I don't know if PGE has that much Unicode support yet.  I would guess not, given parrot's overall Unicode squeamishness...
17:56 aufrank so <alpha> is probably just <[A..Za..z]> ?
17:57 TimToady dunno
17:58 particle_ aufrank, there are pge tests for character classes
17:59 aufrank in parrot/compilers/PGE/t ?
17:59 particle_ looking fro the right one
17:59 particle_ t/compilers/pge/p6regex/...
17:59 particle_ builtins.t
18:00 TimToady ?eval "Å" ~~ / <alpha> /
18:00 evalbot_10249 ***      unexpected "\\"     expecting comment or "."     at -e line 15, column 20
18:01 particle_ and they're defined in include/parrot/cclass.h
18:01 TimToady ?!!?!!
18:02 TimToady anyway, it doesn't match Latin-1 in my pugs.
18:02 aufrank yeah, I tried a couple of those and just put in a dumb character class for common delimiters
18:04 TimToady 'course, the real trick is to find the corresponding close delimiter.
18:04 aufrank a trick which I don't attempt =\
18:04 TimToady so you'll match (...] ?
18:05 aufrank unfortunately yes
18:06 * aufrank waves the work in progress flag
18:08 TimToady it's okay for a bootstrap.
18:09 TimToady must commute to work...
18:09 TimToady biab &
18:09 svnbot6 r10250 | aufrank++ | made token/rule names consistent
18:09 svnbot6 r10250 | aufrank++ | support for arity declarations using unnamed params
18:09 svnbot6 r10250 | aufrank++ | support for trailing : in MMD
18:09 svnbot6 r10250 | aufrank++ | update to invocant detection rule from audreyt++
18:09 svnbot6 r10250 | aufrank++ | removed lots of outstanding questions, TimToady++ audreyt++
18:09 svnbot6 r10250 | aufrank++ | tokenized some previously hard-coded symbols
18:18 svnbot6 r10251 | aufrank++ | more permissive slurpy parsing
18:23 clkao oh, scanning reduce
18:23 aufrank clkao: have you looked at Signature.pg?  I know you were one of the people considering starting in on it.  Extra eyes appreciated.
18:25 clkao slightly, but there were many changes and i didn't follow
18:29 aufrank clkao: would smaller more frequent commits be easier to follow?  I'm just getting used to working in a public repo.
18:45 trym joined perl6
18:45 fglock joined perl6
18:47 fglock aufrank: I did some experiments with Ps/Pe in perl5 - you can find (most) closing delimiters with
18:47 fglock perl -e 'use charnames ":full"; use Unicode::CharName 'uname'; $s="{"; $n = uname(ord($s)); $n =~ s/LEFT/RIGHT/; print $s,"...",chr(charnames::vianame($n)),"\n"; '
18:48 pmurias how can i addres files relative to the location of the source file
18:48 clkao aufrank: sure, but the problem is i've been busy
18:54 aufrank clkao: no problem at all :)
18:55 aufrank fglock++
18:58 aufrank very useful.  Thank you.
19:01 kanru joined perl6
19:03 fglock aufrank: np
19:08 TimToady note, however, that many of the ps/pe pairs are not described in terms of left/right
19:09 aufrank uh oh
19:09 TimToady see http://wall.org/~larry/pspe
19:12 TimToady you also want to look at lib/unicore/BidiMirroring.txt from a recent P5 distribution.
19:12 * aufrank sees
19:12 * aufrank looks
19:13 TimToady and as long as you're there, you could just extract the Ps/Pe from UnicodeData.txt
19:13 TimToady At least the BidiMirroring gives you the opposite character, unlike the Ps/Pe data.
19:14 aufrank ok, I guess I admit this is hard :)
19:14 TimToady I suspect for now we just hardwire it all...
19:16 pmichaud_ <TimToady> aufrank: I don't know if PGE has that much Unicode support yet.  I would guess not, given parrot's overall Unicode squeamishness...
19:16 aufrank hi patrick
19:16 pmichaud_ actually, PGE has as much Unicode support as Parrot does, which is a fair amount
19:16 pmichaud_ i.e., <alpha> really does match more than just A..Za..z
19:17 TimToady hmm, I wonder why my pugs case didn't work then...
19:17 TimToady I'm using pge embedded.
19:17 pmichaud_ but yes, for the time being I would just hardcode the open/close brackets
19:17 aufrank pmichaud_: nice to IRC-meet you :)
19:17 pmichaud_ TimToady: well, you have to compile parrot w/ICU, methinks
19:18 TimToady I just do whatever it does by default.
19:18 pmichaud_ linux?  what distro?
19:18 TimToady I still tend to think that depending on ICU is a mistake.
19:18 Shillo joined perl6
19:18 TimToady Fedora Core 5.
19:18 Shillo Woof!@
19:18 Shillo :)
19:18 TimToady but I build from repository every day
19:18 pmichaud_ you probably need to install the libicu and libicu-devel packages (or something like that)
19:18 pmichaud_ they aren't installed by default.  Then parrot will find them on the rebuild
19:19 particle_ icu is external for a reason... waiting replacment
19:19 pmichaud_ aufrank: very nice to meet you as well; are you the one working on Signature.pg and friends?
19:20 * aufrank notices that [particle_ and pmichaud_] and [_why and ingy] are just as confusable as aufrank and audreyt
19:20 aufrank yeah, I got started on that
19:20 pmichaud_ TimToady: I agree that depending on icu is likely a mistake; I think it's just waiting for someone with the tuits to replace it with something else
19:20 TimToady well, I already have those installed...
19:21 Shillo Hey, a fun question: Is it allowed to define both foo() and infix:<foo>() ?
19:21 Shillo And if yes, what does foo foo foo mean? :)
19:21 TimToady should myconfig mention icu anywhere?
19:22 pmichaud_ TimToady: checking
19:22 TimToady yes, and it means exactly what you think it should mean.
19:22 theorbtwo TimToady: Is that foo(foo(foo())), or foo() foo foo() ?
19:22 chip Debian calls the packages "libicu#" and "libicu#-dev", where # is "34" in unstable
19:22 pmichaud_ .oO( "foo foo foo" means we're short a few bars. )
19:23 * theorbtwo thinks we should all go down to the pub.
19:23 Shillo :) :) :)
19:23 TimToady theorbtwo has a good point
19:23 Shillo Yep, just what theorbtwo asked. I don't see which one should have the preference.
19:23 leo joined perl6
19:24 pmichaud_ myconfig does not appear to reflect the availability of icu
19:24 TimToady It would depend on whether you defined normal foo as () or not.
19:24 TimToady if sub foo () {...}, then foo() foo foo().
19:24 TimToady otherwise foo(foo(foo()))
19:25 TimToady I was thinking of the former when you said "both foo() and infix:<foo>()".
19:25 Shillo Uhhmmm...
19:25 Shillo Just used () to indicate that I meant the function.
19:25 TimToady but of course that'd have to be infix:<foo>($x,$y) if you're talking about the signature.
19:26 Shillo No, just about function-ness. :)
19:26 TimToady yes, I just misread.
19:26 pmichaud_ TimToady: when running "perl Configure.pl", there should be a line like Determining whether ICU is installed...................................yes.
19:26 TimToady but anything that is looking for an argument is just going to see the ordinary sub next as a term, not an infix foo.
19:27 pmichaud_ if so, then parrot gets built with ICU.  At any rate, PGE lets parrot handle any unicode-ness
19:27 TimToady have to prefer shift over reduce there.
19:27 Shillo Hmm, that seems kinda dangerous. Refactor the code so that foo stops expecting the argument, and everything still magically parses. Just bombs badly.
19:28 Shillo s/parses/parses and runs/
19:28 Shillo Of course, 'don't do that sort of overloading' applies. ;)
19:29 TimToady It says ICU is installed when I configure
19:29 theorbtwo Also, don't do that kind of refactoring, unless you're sure you've caught all the callers.
19:29 TimToady I wonder if pugs is forcing some patterns into pcre...
19:29 TimToady you'd think / <alpha> / would certainly go to pge.
19:29 pmichaud_ is pge failing to catch an <alpha>?
19:30 aufrank ?eval 'œ' ~~ / <alpha> /
19:30 evalbot_10251 Match.new(   ok => bool::true,    from => 0,    to => 1,    str => "S",    sub_pos => (),    sub_named =>     { "alpha" =>         Match.new(           ok => bool::true,            from => 0,            to => 1,            str => "S",            sub_pos => (),            sub_named => {}         )     } )
19:30 Shillo theorbtwo: Well, signatures should normally catch those. This just seems like a rather pathological exception.
19:30 aufrank huh.  TimToady, what was your char that didn't match?
19:30 TimToady pugs> "Å" ~~ / <alpha> /
19:30 TimToady Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {}
19:30 TimToady )
19:31 * theorbtwo wonders what tat str 'S' is.
19:31 pmichaud_ what character is the '?' I'm seeing?
19:31 aufrank mine or TT's ?
19:31 pmichaud_ (unicode codepoint)
19:31 TimToady The one that looks like Anstrom
19:31 pmichaud_ I saw aufrank's and saw that it worked
19:32 elmex joined perl6
19:32 pmichaud_ okay, lemme try on my sys
19:32 TimToady U+00C5
19:32 pmichaud_ ah, excellent.  that helps
19:33 TimToady Å       00C5            LATIN CAPITAL LETTER A WITH RING ABOVE
19:33 theorbtwo Possibly an issue because it's latin-1?  (oe isn't, apparently -- U+153)
19:33 aufrank pmichaud_: worked for some value of worked.  The str value of the match object didn't contain the correct character.
19:34 aufrank or is that right?
19:34 pmichaud_ aufrank: I'll try with your char also
19:34 pmichaud_ TimToady: 00c5 matches <alpha> on my system
19:34 TimToady also fails: ě       011B            LATIN SMALL LETTER E WITH CARON
19:35 pmichaud_ [pmichaud@orange trunk]$ ./parrot x.pir
19:35 pmichaud_ "VAR1" => PMC 'PGE::Match' => "\x{c5}" @ 0 { <alpha> => PMC 'PGE::Match' => "\x{c5}" @ 0
19:35 pmichaud_ }
19:35 pmichaud_ and so does U+153
19:35 pmichaud_ I suspect a translation problem between pugs and embedded parrot
19:35 * aufrank doesn't embed
19:36 TimToady hmm, could be.
19:36 aufrank but evalbot probably does?
19:36 TimToady I don't think evalbot embeds.
19:37 pmichaud_ if evalbot (or emb parrot) doesn't send the string to parrot as a unicode string, then it probably gets treated as ascii
19:37 TimToady ?eval "ě" ~~ / <alpha> /
19:37 evalbot_10251 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:37 pmichaud_ ?eval "\xc5" ~~ / <alpha> /
19:37 evalbot_10251 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:37 TimToady probably something along those lines.
19:39 TimToady given that audreyt was going to propose that Haskell treat unicode like Perl does, there could well be a weakness there.
19:39 fglock joined perl6
19:39 pmichaud_ maybe I'll do rules support in perl6.pbc before tackling subs
19:40 pmichaud_ or at least get some form of C<~~> to work
19:40 pmichaud_ that would make it easier to test such things :-)
19:40 TimToady yep.  and maybe you could even bootstrap a little...
19:41 TimToady so you don't have to write everything in pir...
19:41 pmichaud_ pir's not so bad, really.  :-)
19:41 TimToady given a choice between rules and pir, I think I know which I'd rather write in...
19:41 pmichaud_ well, notice that I don't use pir to actually write the grammar.  :-)
19:43 TimToady ?eval "ě" ~~ / . /
19:43 evalbot_10251 Match.new(   ok => bool::true,    from => 0,    to => 1,    str => "\ESC",    sub_pos => (),    sub_named => {} )
19:43 TimToady interesting, in my pugs it also works, but prints str => "\283"
19:44 pmichaud_ looks octal
19:44 TimToady Can't be.
19:44 pmichaud_ I guess not.
19:44 * pmichaud_ spies the '8'
19:44 pmichaud_ however
19:45 pmichaud_ 283 octal == 303 octal == c5 hex :-)
19:45 TimToady but it's the e-wedge, not the Anstrom.  I guess I picked badly...
19:46 pmichaud_ okay, I guess that decides it -- I need to implement ~~
19:46 pmichaud_ :-)
19:47 theorbtwo Theory: It's getting utf8 encoded, and maching <alpha> anyway, because the first byte of it is a latin-1 alpha char.
19:47 TimToady I wasn't using <alpha> the last one.
19:47 TimToady I was using .
19:48 TimToady ?eval "ě" ~~ / .. /
19:48 pmichaud_ oh, an even better theory.  What's the unicode point for e-wedge?  I bet its first byte ends up being 9b
19:48 evalbot_10251 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:48 pmichaud_ nope, can't be
19:48 pmichaud_ hmmmm
19:48 TimToady ?eval "ěě" ~~ / .. /
19:48 evalbot_10251 Match.new(   ok => bool::true,    from => 0,    to => 2,    str => "\ESC\ESC",    sub_pos => (),    sub_named => {} )
19:48 theorbtwo Yeah, that doesn't really make sense for the ESC thing...
19:48 pmichaud_ parrot strips high-bits when reading as ascii
19:48 theorbtwo ?eval "ěě".length
19:48 evalbot_10251 Error: No such method in class Str: "&length"
19:49 TimToady I suspect something between non-embedded pge and pugs there...
19:49 TimToady since my embedded works.
19:49 theorbtwo ?eval "ěě".graphemes
19:49 evalbot_10251 Error: No such method in class Str: "&graphemes"
19:49 theorbtwo ?eval "ěě".chars
19:49 evalbot_10251 2
19:49 theorbtwo Thank you.
19:50 theorbtwo ?eval "ě" ~~ /../
19:50 evalbot_10251 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:50 TimToady but this means we can pass unicode to pge and get it matched correctly.
19:50 theorbtwo Good.
19:51 TimToady so why doesn't this work
19:51 TimToady ?eval "ě" ~~ /<alpha>/
19:51 evalbot_10251 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:51 TimToady ?eval "ě" ~~ /<+alpha>/
19:51 evalbot_10251 *** Cannot parse PGE: <+alpha> *** Error: Null PMC access in invoke()  Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:51 pmichaud_ (sanity test)
19:51 pmichaud_ ?eval 'a' ~~ /<alpha>/
19:51 evalbot_10251 Match.new(   ok => bool::true,    from => 0,    to => 1,    str => "a",    sub_pos => (),    sub_named =>     { "alpha" =>         Match.new(           ok => bool::true,            from => 0,            to => 1,            str => "a",            sub_pos => (),            sub_named => {}         )     } )
19:52 pmichaud_ (pge doesn't understand <+rule> yet)
19:52 pmichaud_ ?eval "\x41" ~~ /<alpha>/
19:52 evalbot_10251 Match.new(   ok => bool::true,    from => 0,    to => 1,    str => "A",    sub_pos => (),    sub_named =>     { "alpha" =>         Match.new(           ok => bool::true,            from => 0,            to => 1,            str => "A",            sub_pos => (),            sub_named => {}         )     } )
19:52 pmichaud_ ?eval "\xc5" ~~ /<alpha>/
19:52 evalbot_10251 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:52 pmichaud_ aha
19:52 TimToady oho
19:53 pmichaud_ "\xc5" isn't unicode or utf8
19:53 TimToady ehe
19:53 pmichaud_ ?eval "\x00\xc5" ~~ /<alpha>/
19:53 evalbot_10251 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:53 TimToady ?eval "\xc5" ~~ /^ . $/
19:53 evalbot_10251 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
19:53 pmichaud_ ?eval "\xc5" ~~ / .. /
19:54 evalbot_10251 Match.new(   ok => bool::true,    from => 0,    to => 2,    str => "\197",    sub_pos => (),    sub_named => {} )
19:54 TimToady heh
19:54 particle_ hah
19:55 pmichaud_ ?eval "\x153" ~~ / .. /
19:56 evalbot_10251 Match.new(   ok => bool::true,    from => 0,    to => 2,    str => "\339",    sub_pos => (),    sub_named => {} )
19:56 pmichaud_ very bizarre
19:56 TimToady ?eval "\x153" ~~ / ^ .. $ /
19:56 evalbot_10251 Match.new(   ok => bool::true,    from => 0,    to => 2,    str => "\339",    sub_pos => (),    sub_named => {} )
19:56 pmichaud_ for some reason pge is getting the string as bytes or ascii instead of utf8 or unicode
19:57 pmichaud_ i.e., parrot is reporting the string as two characters
19:57 pmichaud_ then when it comes back, whatever translates back is treating it as unicode
19:57 TimToady the cathedral and the bizarre
19:58 TimToady the question is, which is which...
19:59 pmichaud_ well, lemme see if I can get ~~ into perl6.pbc
20:02 TimToady thanks, I'll glare at six impossible lines of Haskell after lunch.
20:09 fglock joined perl6
20:09 svnbot6 r10252 | fglock++ | RuleInline.pl - minor updates
20:13 Limbic_Region joined perl6
20:31 egesch joined perl6
20:45 svnbot6 r10253 | fglock++ | PCR - initial implementation of :ratchet, using inlined code
20:54 svnbot6 r10254 | pmurias++ | contains the special type PMC_T which i failed to get to work
21:00 pmurias good night
21:01 svnbot6 r10255 | fglock++ | PCR - t/09-ratchet.t - added failing tests
21:10 fglock left perl6
21:23 Keith joined perl6
21:30 larsen joined perl6
21:31 FurnaceBoy_ joined perl6
21:31 aeon_ joined perl6
21:44 Odin-LAP joined perl6
21:52 Shillo left perl6
22:31 cratylus exit
22:37 mako132_ joined perl6
22:52 mako132_ joined perl6
23:09 phpError joined perl6
23:12 sockstat joined perl6
23:17 Craftyone joined perl6
23:21 OutThere is now known as SubStack
23:22 weinig_ joined perl6
23:24 Odin-LAP joined perl6
23:25 AtomicStack joined perl6
23:27 Quell joined perl6
23:35 mako132_ joined perl6
23:36 Ymmv joined perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs