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