The Return of the Journal : | | | paste: or
Set by GammaRay on 31 December 2005.
metaperl is Sam Vilain here? what handle does he go by? 00:33
dduncan he goes by 'mugwump' 00:37
02:05 avar\afk\woo is now known as avar
audreyt rehi lambdacamels. 05:05
svnbot6 r8526 | audreyt++ | * It's 2006 now, so update copyright notice in README and Perl6::Pugs.
r8526 | audreyt++ | * Also add PArrows's copyright (BSD3) notice.
avar oh shit 05:08
I'm going to have to start updating my copyrightnotices too
tewk audreyt: I've got a start to wsEnum, getting rid of typing errors
audreyt tewk: ooh, cool 05:11
eta of a commit? I'll do container types first then
tewk 2-3 minutes 05:12
audreyt woot 05:13
audreyt goes find some breakfast... be back in 2-3
minutes, that is
tewk Ok one type error left, how do I write an empty FastString ie "" 05:14
avar mm 05:15
do you know any tool that'll show you the main authors of code based on its CVS history?
tewk Couldn't match `[Char]' against `Char'
Expected type: [[Char]]
Inferred type: [Char]
When checking the pattern: ""
In the definition of `scan': scan "" _ = error "No closing ']>' for charlist"
wsEnum is going to have a scheme feel to it, I'm sure there is a better haskellized version. 05:19
Aw, FastPackedString "" ie empty 05:20
stevan Happy New Year! 05:22
tewk stevan: Happy New Year, are you on the east coast ? two hours to go here. 05:23
stevan tewk: yes I am :)
tewk cureses [Char] vs FastPackedString type errors :)
gaal morning! 05:39
stevan morning gaal 05:41
gaal avar: maybe not quite what you want, but see "svn praise" - shows you for each line as it is in a revision who made it. 05:44
tewk: still not working? "empty" it is 05:45
audreyt rehi 05:47
tewk: still blocking on something? :) 05:48
tewk Well here it comes, I'm learning Haskell. I've gotten to the point where it is starting to be fun and enjoyable, instead of painful.
audreyt excellent
I think the boxed ::Str type is going to be (Seq Char) for the time being
svnbot6 r8527 | tewk++ | src/Text/Parser/Rule.hs - First attempt at wsEnum 05:51
audreyt (until someone hacks in a self-upgrading implementation for (Seq Word8) vs (Seq Char))
ooh, tewk++
audreyt goes look
stevan hey audreyt
audreyt stevan: hey. I've just reread S12
looks like we are on solid grounds
stevan audreyt: yes, i think so 05:52
leo's stuff makes sense too
audreyt I plan to hack in ::Args and ::Sigs
so we can do
$x := $y
stevan cool
I have some questions re: ::Array
got a sec?
audreyt ::Sigs`create($x).BIND(::Args`create($y)) 05:53
sure, go ahead
tewk Took me a while to figure out that "]>":xs should be ']':'>':xs. Looking for constructive criticism. I'm learning.
audreyt ok.
scan empty _ = error "No closing ']>' for charlist"
you are really operating on [Char] ehre 05:54
and "empty"will just bind anything to the lex var "empty"
instead of pattern pathing on the "empty" function
tewk yeah, that was a left over from debugging type errors, I had "" to start with 05:55
stevan audreyt: this is what I have for ::Array.shift
$elem := self`fetch_elem(0);
gaal tewk: I think instead of ++ [ '\n' ] etc., you can say ++ "\n" instead
stevan the first time I call it,.. i get back what I expect,.. the second time I call it I get a list of the remaining items
gaal s,\S+$,, 05:56
stevan it seems like store_list is not expecting a native list (i.e. - [ 1, 2, 3 ])
tewk Because of "]>":xs, I got led astray debugging [[Char]] verses [Char] type errors.
gaal since [ '\n' ] is a list of one char, that is, a string.
tewk gaal: point well taken. 05:57
audreyt stevan: store_list is expecting vararg... that's probably wrong
stevan audreyt: and it seems create expects this too,.. which is problematic when creating a new array like in map & grep 05:58
audreyt aye, fixing both
stevan audreyt: thanks :)
audreyt hm
tewk What is "\e" ? is that a valid escape in haskell? Vim didn't syntax highlight it. 05:59
audreyt ok, I'll make both array`create and hash`create expect a nativeseq.
stevan shouldnt hash`create expect a native hash?
audreyt but what about objects as keys? 06:00
or do you think we special case them?
by using subsequent .store calls?
`store_elem, even
gaal tewk: probably an "ESC" char
that's what it means in p5
stevan hmm, I haven't gotten that far yet,.. I suppose native seq is okay for now
audreyt otoh, we can make native seqs and maps autobox. 06:01
stevan maybe
gaal tewk: sorry to come out of context, but are you hiding Prelude.scan on purpose? 06:02
audreyt gaal: "span"
stevan unless that will affect the class/obj bootstrap code
audreyt it would not
gaal audreyt: says "scan" in the code
audreyt import Prelude hiding (lookup, null, drop, span, break, head, tail, splitAt)
oh, you mean he redefined "scan" 06:03
tewk scan is my little utility function.
gaal audreyt: also the code has the sig for a scan func
stevan audreyt: lets keep it simple for now, and not autobox
audreyt stevan: ok
gaal tewk: sure, there's a Prelude function of that name though
tewk gaal: so should I rename mine or hid it in Prelude.
audreyt stevan: so, I need some sanity checking on the vararg thing
stevan ok 06:04
audreyt stevan: two choices: either all objprims take fixed number of args
or we introduce slurpy forms to PILN
so you can say $obj.method(*@foo)
stevan I think a fix num is probably better
gaal tewk: I suppose the compiler doesn't give a warning cause this isn't a top-level func
stevan at this level that is
audreyt ok
gaal oh actually it isn't the same sig as the prelude scan 06:05
@typeof scan
grrrr, the prelude has "scanl" etc., not scan
and we don't have lambdabot here
scanl :: (a -> b -> a) -> a -> [b] -> [a]
gaal makes a note to put a lambdabot in the channel 06:06
scan is like a fold with yields sprinkled in it.
tewk On another import issue: I added qualified Prelude imports of head, init, tail, last should I remove. Should I remove head and tail from the prelude hiding clause on the line above?
gaal one thing you can do is "import qualified" 06:07
why are you hiding the prelude though? because of faststring?
then import faststring qualified :-)
tewk would love and abuse a lambdabot, especially if it knew about pugs types also :)
gaal note there are two "import Data.FastPackedString"
lines in that file
-- This module is intended to be imported @qualified@, to avoid name 06:08
-- clashes with Prelude functions. eg.
-- > import qualified Data.FastPackedString as P
audreyt tewk: it works! 06:09
tewk I gently massaged the imports for Prelude GHC.List functions, the rest is pre-tewk
gaal then unqualified access resolves to prelude, and P.concat etc. gives you the FastString version.
tewk: right (but there should still only be one import declaration for that module :-)
tewk audreyt: quick bug fix/cleanup checkin comming
audreyt tewk: we are likely to conflict
please sync r8528 first
tewk I will update first and resolve
audreyt ghci -isrc src/Text/Parser/Parser.hs src/cbits/*o
tewk audreyt: Cool :) 06:10
audreyt *Text.Parser.Parser> parseRule "<-[abc]>"
RTerm (TermEnum (EnumComplement (EnumChars "abc")))
svnbot6 r8528 | audreyt++ | * enum parsing -- we need to change "scan" to something 06:12
r8528 | audreyt++ | more FastPackedString-ish instead of doing the heavy pack/unpack,
r8528 | audreyt++ | but this works for now.
tewk audreyt: I just kinda figured out the FastPackedString-ish vs String. I can convert it. 06:13
gaal tewk: sorry to bug you about this, but the high-level signature and the type of scan don't agree 06:14
-- scan :: Input -> enumList -> enumList
audreyt cool! just make use of FPS functions, like "span"
gaal -- scan :: Str -> [Char] -> ( [Char], Str )
tewk gaal: fix coming
gaal audreyt: that there are "error"s and not "fail"s in the code means it dies on errors uncachably, no? 06:15
stevan has to go to sleep before he falls over 06:18
audreyt: I will work on Roles more tomorrow (~10 hours from now)
gaal outrageously has to go to $work
stevan or rather Array and Hash roles
nite all, and happy new year 06:19
stevan &
tewk gaal: Is it possible to combine lines 6 & 7 into one line without qualifing all of Prelude, I'm not in the mood to go through the entire file and find every unqualified use of Prelude :) 06:20
gaal tewk: qualify FastPackedString :) 06:21
leave prelude unqualified
audreyt stevan: fixed 06:22
gaal: no, you can catch them in the IO monad... but it should be converted to "fail" in the Maybe monad
tewk: I've already qualified FPS as "Str" 06:23
svnbot6 r8529 | audreyt++ | * Instead of variadic arguments, ::Array`create and ::Hash`create
r8529 | audreyt++ | now accepts a single argument (either a NativeSeq, or a NativeMap
r8529 | audreyt++ | that will be flattened into a NativeSeq).
r8529 | audreyt++ | * Same goes for store_list.
tewk audreyt: there are two import of FastPackedString, I'll try commenting out the unqualified one and see what happens. 06:24
06:25 waltz is now known as walterbrunswick
audreyt tewk: the reason why I hid most of prelude list functions 06:25
gaal urp, an efficient FPS version of this isn't trivial at all
audreyt is becase in Text.Parser.Rule it makes sense to only use FPS functions for tokenizing
give me 5 minutes... I'll demo what I mean :) 06:26
tewk Yep about 60 Not in scope errors.
06:27 walterbrunswick is now known as waltz
tewk audreyt: Is it ok if I try to qualify them ( the 60 not in scope errors) That was gaal's idea, or should I convert wsEnum to FPS tokenizing first ? 06:27
gaal has bad ideas sometimes :)
audreyt tewk: I've almost finished FPSizing wsEnum 06:28
give me a few mins
tewk Sorry I probably didn't make it clear. I Could see that either way there was going to be a lot of qualifing to do.
It is so nice to have an audreyt around to fix everything, she probably could have written wsEnum in 1/100th of the time it took me. But it was a good learning exercise. 06:29
Mostly in learning haskell. The version I came up with was elegant, I thought. Much more simpler and easier to understand than PIR. I'm sure FPSizing will make it not only elegant but performant. 06:30
Gotta love functional programming. Once you get it, things (such as tokenizing and parsing) become so much more consice. 06:31
avar gaal: I found a tool..;) 06:32
gaal avar: cool!
audreyt tewk: no, I couldn't have written in 1/100th of time, because 99% of it will be spent on reading PIR :)
tewk I spent a lot of time reading pir too. I've dabbled with a python compiler for PIR, so the PIR made some sense. 06:33
avar now I just have to battle with sourceforge cvs ...
gaal wonders if the next version of the haskell spec will allow ("hello ":xs) patterns 06:35
avar make is such a drag
avar just wrote a makefile in bashscript
tewk gaal: the current version does it just types it as [[Char]] instead of [Char]. That confused me quite a bit. 06:36
gaal "hello":xs doesn't make sense as syntax. but maybe "hello"++xs ? 06:37
tewk can you use "hello"++xs in matching? that was what I was trying to do.
That what they should add ++ in matching, I got it. 06:38
gaal tewk: I don't think so. I realize why "str":xs won't work. I think I learned the hard way, like you :)
shower &
audreyt ..done
gaal ooh 06:39
tewk gaal: Nice to know other like to learn the hard way. 06:40
gaal not sure about the "like"... wait till you get to monads :) 06:41
tewk I'm in the middle of "getting" Monads (the hard way), Which is the only way you "get" monads I believe. 06:42
:) 06:43
My thesis takes advantage of looking at list comprehensions as monads, but when it comes to using/understanding them in Haskell, I have a long ways to go. 06:45
audreyt r8530 :) 06:46
svnbot6 r8530 | audreyt++ | * Convert tewk++'s wsEnum scanning routine to FPS. 06:47
r8530 | audreyt++ | Note that we'll need a postprocessing step in _Enum this way.
audreyt the \w etc in Enum needs to be converted to EnumShortcut 06:48
so we need a postprocessor in _Enum anyway
but it doesn't belong (yet) in scanning 06:49
which is just charged to return Maybe (Str, Str) -- i.e. the matched and remaining parts
so doScan should do one thing, and _Enum takes over the rest
also note the "do" notation for Maybe monads^Wactions 06:50
in line 439, if doScan returns Nothing (i.e. if it "fail"s)
then wsEnum will just return Nothing
in line 444, the "return" is converted into a Just.
tewk looking 06:52
Aankh|Clone A (belated|early) Happy New Year, #perl6. :-)
06:52 Aankh|Clone is now known as Aankhen``
audreyt Aankhen``: you too :) 06:54
Aankhen`` Hmm, come to think of it, "early" is probably no longer necessary.
svnbot6 r8531 | audreyt++ | * remove of hardcoded "empty" cases in FPS because it 06:59
r8531 | audreyt++ | throws off our positional-based scanning.
r8531 | audreyt++ | * tidying up T.P.Rule's imports.
gaal what's idx? 07:02
ah ok it's a FPS thing 07:03
where does metachar expansion happen? 07:04
the _Term stuff?
gaal feels a great kinsmanship with asavige, Alias_ etc. 07:06
It is 1 January and I am wearing a t-shirt 07:07
$work &
audreyt :p 07:08
gaal: _Enum will handle expansion
doesn't now, but should do
tewk So idx is the position of a "substring" FPS in its parent string? 07:09
audreyt yup
same as SvIVX inperl5
svnbot6 r8532 | audreyt++ | * minor adjustments to miniLang grammar -- it compiles!
audreyt are you up to handle the _Enum expansion? 07:10
mostly converting "ab]-[a" into EnumMinus (EnumChars "ab") (EnumChars "a") 07:12
which makes "]-[" almost like an infix operator -- so maybe define another opTable to parse that. hmm. or just use traditional scanning
I'll brb
tewk So what does wsEnum do? 07:13
audreyt it takes an input string 07:15
and maybe returns a pair of strings 07:16
the one consumed (And to be post processed by _Enum)
and the one to continue parsing
tewk I got that.
Are you just throwing away escapes \n right now?
audreyt _Enum in turn takes the FPS that's consumed
not throwing away... putting them into consumed list
because \n handling is going to be different from \w 07:17
avar ;)
I wonder how hard it is to obtain OSI certification
audreyt and wsEnum is not the place to do that
tewk so all wsEnum does is get the substring that represents the Enum
audreyt yup
tewk Ok, head str == '\\' = doScan (drop 2 str) consumes escapes so that \] doesn't terminate the Enum 07:19
audreyt yup
svnbot6 r8533 | audreyt++ | * compilation for TermEnum. 07:30
r8534 | audreyt++ | * better error message prettyprinting for negative assertions. 07:36
tewk audreyt: Sorry wife got home from work in the ER. so what does ws in wsEnum mean? whitespace? 07:38
audreyt yeah, PIR legacy 07:41
feel free to rename it
gaal audreyt: so, re .yaml emitting. how much sense does it make to acummulate the emitted string with a FPS? 07:45
and, how do you suggest getting over the circular dependency of Prim.Yaml and Data.Yaml.Syck? 07:51
tewk: must have been a busy shift! 07:52
Alias_ gaal: "Kinsmanship?" 07:54
gaal it's like summer
Alias_ You mean in that I have NFI what is going on?
audreyt gaal: it may make some sense, but a dedicated self-extending buffer may be more eficient
gaal: what circular dep? 07:55
Alias_ ugh
I just got to my office and it's 35-40 degrees in here
Nobody has been here all day, and the air-con hasn't kicked in yet
gaal audreyt: the emitter callback gets some sort of Val node and recurses into it, but how does it know about Val? You suggested a Val->SyckNode (or YamlNode) function, but how to import it? 07:56
audreyt gaal: Val->SyckNode is defined in D.Y.S 07:57
er I mean
in P.P.Y
and P.P.Y hands off the finished SyckNode to DYS
gaal Alias_: you count in Celsius! yay
audreyt which doesn't have to know PPY
gaal audreyt: but does that map a whole tree or just this one node?
Alias_ gaal: hmm? of course. Only the US counts in crazy numbers any more
gaal audreyt: mapping a tree would mean two recursions. maybe that's okay... 07:59
but doesn't that imply making a copy of the data? 08:00
audreyt gaal: we need to make copies anyway 08:01
gaal: the whole tree, when mapped lazily, only copies once 08:02
so there's no loss
gaal okay. so..
toYaml :: Val -> Eval YamlNode
can I get rid of the Eval there? 08:03
audreyt prolly not if you are to follow VRef 08:04
gaal how do I hand that to D.Y.S then?
well, I do have 08:05
dumpYaml v = do { obj <- toYaml =<< fromVal v ; rv <- liftIO (emitYaml obj) ; {- error handling -} }
so maybe that's okay?
audreyt yup 08:06
gaal YamlNode needs an Undef (or is that subsumed under Scalar?)
err, Str
(Str!?) 08:07
audreyt hmm? 08:08
YamlNode is currently using a [Char]
that may need to change in the future
gaal undef.yaml => "~"
"~".yaml => "'~'"
how does YamlNode represent undef? 08:09
audreyt YamlUndef would do 08:10
a new node
or YamlNil
gaal also, eval<yaml> is buggy in deserializing ~ :-) 08:11
yeah, adding that.
gee, I make dyslectic abbreviations 08:13
eval ... :lang<yaml>
svnbot6 r8535 | asavige++ | Haskell versus madgolfer, round one to Haskell overwhelming madgolfer's pea brain with a withering barrage of PhD-powered Greek letters and arcane-in-the-extreme terminology (damn you audrey;-) 08:18
Alias_ heh 08:19
audreyt asavige: hey! 08:21
gaal yeah, well sometime this year I will have to grok the overly implicit fix, "y f = f (y f)"
Alias_ asavige: You know of course have to explain that checkin comment :) 08:22
asavige hi audrey, I'm exhausted from 40 degree heat and learning haskell
Alias_: The Haskell community seems full of academics and they love to invent arcane
Alias_ "full of" 08:23
asavige terminology that I find exhausting to grok
Alias_ I'd say, "consists only of"
asavige oh and they love to use greek letters
Alias_ Haskell is indeed mind-twisting
asavige anyway it's been fun, for some definition of fun actually it's become a vendetta
Alias_ I tried for 3 hours then realised it was making my head hurt so much I'd put it aside until I had something useful to do with it 08:24
gaal Alias_: I'd say "consists in", because that's a very academic golfage.
Alias_ And audreyt's Haskell talk is WAY more understandable than most of the online things
gaal: Fair enough
asavige despite that, my examples/rpn/hask program seems to now be working just like the Perl versions ^.^ 08:25
though the style is probably all wrong and I have something I don't understand, might goto #haskell
gaal goto #haskell? I think they use cps when they want to do that... 08:26
gaal stops being silly for a moment
(maybe that's how I should have spent my leap second) 08:27
azuroth ?eval {"a" => b. 08:33
?eval {"a" => "b"}.yaml
pasteling "gaal" at pasted "src/Pugs/Prim/Yaml.hs:49:23: C" (13 lines, 424B) at 08:34
gaal oops, sorry, forgot a --message. why does it infer [[b]] ?
azuroth: not yet, working on it. 08:35
azuroth bah, it should be finished. you've had how many public holidays lately to work on it? :-) 08:36
gaal not I 08:37
no holiday here unless you go to school
Alias_ where's here? 08:38
gaal yeah
Alias_ They don't give you the day off for Christmas? </american> 08:39
Although do you have colliding holdays in there anywhere?
gaal tends not to notice holidays until someone greets him with a blessing, anyway 08:40
audreyt: what's wrong with this? 08:43
and: I don't need to do TVar stuff when emitting, do I? 08:44
audreyt gaal: fmap YamlSeq (mapM toYAML items)
you are using mapM as a pure value, that doesn't work 08:45
look at .perl implementation for some guidance
gaal oooh a cargo cultist like myself should benefit from anthropology!
audreyt hm, in "" chromatic claims: 08:50
As of the last report, Patrick's code can parse Perl 6 expressions.
I can't find that in the parrot tree.
maybe I should go asking in #parrot. 08:51
gaal argh. undefined errors on DataziFastPackedString_PS_con_info etc. audreyt, what's the right place to add deps+libss in the makefile now? it's gotten a little confusing. 08:59
audreyt tewk: your grammar worked beautifully :) 09:29
* Text.Parser.PArrow: Finish negated charset support. 09:30
* PIL.Native.Parser: the main "<expression>" rule in miniLang grammar now works correctly, after removing some left recursions. Now we just need to translate them back...
tewk audreyt: Good 09:31
Can you explain ++ noWs (op (_Enum EnumChars) Term "<[" wsEnum) , I'm trying to understand the sturcture.
What is Term, where is it defined? is it a type constructor? 09:32
audreyt yes
ok, you are going to see some magic. 09:33
line 66 in src/Text/Parser/OpTable.hs
that line simply means
--- parse the Term "<[", if it matches, hand the rest to wsEnum to see if it actually matches
if wsEnum rejects it, pretend we've never seen "<["
it's all controlled by the "op"function 09:34
which takes an variadic number of arguments
and depends on their type, combine them in interesting