The Return of the Journal : pugs.blogs.com/ | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6
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
tewk++
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"
s/empty/""/
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
s/pathing/matching/
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);
self`store_list(self`fetch_list()`splice(1));
$elem;
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
fixing
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..;)
statcvs.sf.net 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
committing
gaal ooh 06:39
tewk gaal: Nice to know other like to learn the hard way. 06:40
s/other/others/
gaal not sure about the "like"... wait till you get to monads :) 06:41
bbiab(fab)
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 tools.wikimedia.de/~avar/COPYING ;)
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?
oooohhh
heh
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 192.115.25.249 pasted "src/Pugs/Prim/Yaml.hs:49:23: C" (13 lines, 424B) at sial.org/pbot/15197 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
Israel?
gaal yeah
Alias_ They don't give you the day off for Christmas? </american> 08:39
(heh)
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? sial.org/pbot/15197 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 "www.oreillynet.com/pub/wlg/8894" 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...
(r8536)
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 ways
and contrary to popular belief, haskell does have variadic functions
see line 413 and below of OpTable.hs for the implementation. 09:35
asavige: Rpn.hs is quite nice :)
asavige audreyt: thanks, next step is to learn about Parsec I guess 09:36
oh and grok monads (i've started on that)
audreyt cool... there is also this shiny new parser on the block :)
(Text.Parser.Rule and Text.Parser.OpTable)
hm, we need a p6rule.vim 09:47
tewk Thant all made sense, now I just want to find where the pieces come from. Term for example, Optable:117 ? if so why Term and not MkTerm? 09:49
audreyt Term is a pun 09:50
used as a function, it's a data constructor
Term :: Str -> Op
used as a type, it's a newtype that's isomorphic to a Str.
I think I should rename the latter to "Name" or "Lead" or something 09:51
tewk So which is it in Term "<[" wsEnum)
audreyt the function one 09:52
I'll commit the rename
tewk Thanks for answering the questions, I know it's impossible to keep naming clear, it just makes me feel better when the answers to my confusion are followed by, "That should be renamed" :) 09:53
audreyt :D
again, it's legacy from PIR
PGE/OpTable.pir uses the "term" name for 3 different things
so I was confused myself
committed 09:56
tewk Yeah, I've picked up that a lot of this comes from PIR, I have just been slow to inflict that pain on myself, especially since you have already paid the price 09:57
svnbot6 r8537 | audreyt++ | * Text.Parser.OpTable: rename the very confusing "Term"
r8537 | audreyt++ | type to the mor appropriate "TokenName". Reported by tewk++.
r8538 | audreyt++ | * OpTable: fix a couple minor warnings.
audreyt indeed... so refactoring much welcome 09:58
tewk Well, I think I'm a couple of days out, from really getting my head around this, but once I do I'll pitch in more. 09:59
audreyt that'd rock 10:01
I've moved the grammar to src/PIL/Native/Native.grammar
any .vim-proficient people around?
Alias_ audreyt: How do you currently deal with releasing 10:03
svnbot6 r8539 | audreyt++ | * factor our the PIL^N grammar into src/PIL/Native/Native.grammar.
audreyt Alias_: of pugs?
Alias_ audreyt: I imagine you must build packages where not all tests pass
of pugs will do
audreyt Alias_: I TODO the tests.
Alias_ So makedist requires that all tests pass?
wait, this isn't really a problem
never mind
audreyt :) 10:04
Alias_ It just occured to me that if you checkout a svn snapshot and it fails on YOUR computer, why would you send it to be mass tested on other environments
audreyt is written a grammar file to parse a grammar file... mmm bootstrapping
Alias_ Although maybe in your specific case you do want some idea about which tests fail on different platforms
audreyt s/written/writing/
Alias_: yes.
different GHC versions, perl versions, etc 10:05
Alias_ So is the TODO needed to make tardist, or just so that people don't think it's failing
audreyt the latter I think 10:06
svnbot6 r8540 | audreyt++ | * rename the grammar file to a more descriptive "Syntax.grammar"
r8541 | audreyt++ | * more tidying up of PIL.Native.Syntax
Alias_ hmm. OK, so in that case I imagine it wouldn't be too hard to write a SVN -> testing connector 10:07
audreyt *nod*
Alias_ ticks off that item and goes back to writing PITA::Scheme::Perl5::Make 10:08
tewk audreyt: Syntax.grammer -- very nice, I knew there was something like [ ]? , I should have gone and looked at S05 again, Looks nice. 10:10
audreyt :D 10:11
rule expressionList { <expression> [; <expressionList> | ;? ] }
also this handles trailing semicolons
hm, I guess we really want :ws. 10:12
:w, rather
Debolaz watches an MSN window using 3 minutes to open when burning someting with his crappy burner. 10:14
nothingmuch happy new year
audreyt happy new year, nothingmuch 10:15
Alias_ and to you my crazy israeli friend
nothingmuch makes releases of the new C::P::Session stuff
oh wait, wrong channel
Alias_ yes, much too boring and non-insane for this channel 10:16
nothingmuch audreyt or Alias_: since you have a billion modules, do you have a tool to diff a CPAN release with pwd?
Alias_ pwd?
nothingmuch present working directory
Alias_ I commit a copy of every tarball to my /releases directory before I upload 10:17
So I tend to just untar, and then diff to pwd
It's not automated, but it's like 3 commands 10:18
nothingmuch oh right, /branches
Alias_ Well, I keep the ACTUAL tarball, since I don't believe in SVN branches
nothingmuch since i have trunk in my pwd directly, and not root, i keep forgetting it
how come?
audreyt ...and I just use svk.
Alias_ It's just a copy
audreyt svk ci --import
nothingmuch audreyt: explain?
Alias_ svn implements branches partly in wetware 10:19
And I don't trust wetware
nothingmuch wetware?
audreyt Alias_: I talked with clkao and svk will get the ability of per-subdirectory properties that declares tagness, branchness, viewness, etc
Debolaz Alias_: Err... how is that? :)
audreyt Alias_: so the software will enforce wetwar econstraints
wetware, even
Alias_ nothingmuch: "wetware" is that stuff in your skull... that's wet
nothingmuch oh
Alias_ Debolaz: It's just a copy 10:20
Debolaz Alias_: I kinda figured... but how is this a bad thing I mean?
Alias_ If I give you a value, you cannot write a function that verifies what I give you as a branch
That it's a "branch" only exists in your head
As far as the computer is concerned, you just copied your project
Ditto tags 10:21
But even more so
Debolaz Again, why does the VCS need to keep track of what's a branch, what significant disadventage does it have to keep branches as directories?
Alias_ From the documentation... "A tag is also just a copy. Unless you change it, in which case it becomes a branch"
Debolaz: You can't verify them
Debolaz Looking for a VCS myself, I'm somewhat interested in this. :)
Alias_ If you can't identify something as a branch, is it a branc?
audreyt nothingmuch: svk ci --import --to-checkout //tmp/foo .
nothingmuch i actually like this flexibility
in darcs and svk 10:22
Alias_ Basically, SVN is a versioning remote filesystem
nothingmuch to-checkout is not documented in my svk help ci
Debolaz Alias_: But why is this neccesary to have in software? It could just be kept in document, or you could use naming conventions.
Alias_ SVK is a VCS implemented using the SVN versioning filesystem
Debolaz: Say I want to write a SVN client
And I want it to identify all the branches in your repository, so I can understand what work you are doing 10:23
Well you can't do that
Not robustly... you can guess and hope
Debolaz Alias_: I still don't see this as a significant problem, more a matter of project policy... but then again, I do not claim to be any expert on this so there may be something I'm not seeing. :) 10:24
Alias_ Policy is wetware
tewk Convention vs Configuration, Convention wins again.
Alias_ It relies on people to not be stupid
Debolaz I guess advisory metadata wouldn't hurt though.
Alias_ I'll give you a concrete example
My standard one
I used to work at Cisco in a development centre
Debolaz Alias_: I have never ever encountered such a problem myself anyway. In real life that is.
Alias_ As part of that work, we had some projects being done in India by outsourcers 10:25
Who we could pretty much rely on to do stupid things from time to time
As you can with any outsourcing company
The number one problem was related to releases
They would send us a release, we would release it, and then we'd send bug reports 10:26
They'd say "which version", and then a whole $thing would ensue whereby they could replicate the original version
Because they were either using no version control, or shit version control
So we instituted a policy after 3 or 4 projects had these problems...
You MUST use CVS, and all releases were to be in the form of a CVS tag 10:27
Don't send us the code, send us a repository tag
audreyt ...and to set up this constraint in SVN would require WebDAV-based control, or pre-commit hooks, which is a bit more complicated than in CVS.
Alias_ We'll export direct from your CVS at that tag, and deploy it
wait wait...
Complication isn't the problem
audreyt you can set up so they can only copy into a tag and never commit into tags. 10:28
nothingmuch Alias_: how does a VCS stop you from makking e.g. '@hourly cd $project; vcs commit -m "hourly commit"' in your crontab?
how does a vcs force you to write good code?
Alias_ What the policy we instituted did was it meant that EVEN THOUGH we didn't trust the outsourcers, we could trust the CVS software
nothingmuch split it into files
Debolaz But I don't see how naming conventions wouldn't solve this. For instance, having /branch/blah and /tag/blah. Or /blah-branch or /blah-tag. You could implement this with metadata to aid automated clients of course, but it doesn't seem neccesary when the functionality you'd get wouldn't be neccesary with naming.
nothingmuch at the very least
you need to rely on people at some point
Alias_ Debolaz: Those naming conventions only exist in wetware.
No you don't
audreyt Debolaz: Alias_ is relying on the constraint that you can't modify a tag in CVS once it's done. 10:29
nothingmuch and increasing software complexity because people are generally stupid is not a good strategy
Alias_ nothingmuch: The entire point was we didn't
Debolaz Alias_: But it would be the same concept as enforcing a certain use of CVS.
nothingmuch you just get complex software, that will still get abused =)
Alias_ With CVS, you have to be intentionally destructive to break the tagging
audreyt Alias_: if you've set up the WebDAV or pre-commit server yourself, you can too block inadvertant commits into tags/ space.
Alias_ That's fine, we can live with that. You can never stop that sort of thing
audreyt: So you are asking Cisco to give every single outsourcer access to the crown jewels 10:30
audreyt Alias_: I do not follow that
what has that to do with this?
Alias_ maybe I'm reading you wrong
audreyt you can limit their GET access to only /project/*
Alias_ The problem with conventions is they aren't envorcable
audreyt and COPY access to /project/tags/ 10:31
Alias_ audreyt: NOBODY outside the company gets access to the multi-gigabyte Cisco repositories
audreyt and disallow anything else in /project/tags/
Alias_ They won't even let you in the firewall
audreyt Alias_: that's fine, you can set up a small svn where your cvs currently is
Alias_ Imagine allowing 400 companies all around the world access to the internals
audreyt Alias_: basically I'm saying whatever you are using CVS currently for, you can use SVN with a bit more configuration.
Alias_ Every sane implementation of SVN I've heard of involves big doses of CYJ 10:32
But we didn't use CVS
audreyt CYJ?
Alias_ Can't You Just
ask purl
audreyt right. I do agree it's more complicated than it should.
Alias_ Again, we didn't use CVS
We just required the outsourcers did
And that was enough
They give us a tag, we check it out, we deploy, done 10:33
Debolaz It's a bit more complicated, but when you're doing more complex tasks, it's actually a lot easier than with other similar systems.
Alias_ We didn't need to send security experts for site audits to definitively prove that they had SVN set up correctly
How do you know if $outsourcer has set up SVN they way you dictate
You don't, unless you do expensive crazy things 10:34
You have to trust the people, and that's a bad thing
With "real" tags, you don't
You trust the VCS
nothingmuch so why did you guys not use a "real" VCS?
Alias_ CVS is a real VCS
nothingmuch i meant commercial that isn't source safe
ack 10:35
Alias_ Because everybody had CVS?
nothingmuch my gpg pubring file was corrupted
Alias_ We'd have to force all 400 contractors to use some particular VCS, and not their own
Debolaz Alias_: It seems to me that the original problem you described doesn't require that particular solutions (It's just one solution), however, the problem you describe now arrises from assuming this is the only solution... ?
Alias_ And make them pay for azillion licenses
Yes, it's just one solution 10:36
But it was cheap, and it worked
And you can't do anything with SVN to make a solution
Although this concept of pseudo-tags seems decent enough
path + repo version
ignore SVN's "tags" and apply your own version 10:37
hence, I consider SVN's tags not to be "tags"
And why I say they are implemented in wetware
Making your version control rely on people to not be stupid is a silly idea 10:38
Anyways, I'm babbling
SVK is something closer to the right approach
Using SVN as a "version control driver" and implement the actual VCS on top of it
Debolaz Well, you made me think about this. :)
Alias_ The basic summation is that Version Control is a protection against stupidity 10:39
And an anti-stupidity scheme that just says "don't be stupid" is no protection at all 10:40
Also, I'm something of a zealot on this idea, since I've hit problems with it in real life 10:41
Debolaz I see the problem, enforcing a certain development policy without a lot of hazzle. And CVS "just worked" for this task... but I think this is a special case, which doesn't make SVN any worse for general usage since you can enforce a policy with it, you just can't do it as easy as with CVS. Which usually doesn't create problems, except when you have a lot of small third parties with no access to your own system where you need to enforce a policy. But I realiz
Alias_ If you control the server, and you trust every person commiting to it to not be stupid, and you'll never expand beyond that situation, then SVN is fine (except for the whole every-tag is a copy and consumes a ton of disk space problem) 10:43
So a personal SVN server is just fine, and I'm switching over to it for my CPAN development
And I also use SVN for the OpenOpenOffice project and a few other things
Stuff that doesn't use tags heavily
nothingmuch Alias_: tag copies don't consume disk space
Alias_ nothingmuch: They do on the client
nothingmuch oh 10:44
hehe
nothingmuch only has trunk checked out
audreyt "ln"-based checkout may be cool
but maybe too cool ;)
Alias_ That's one minor other problem
You can't checkout the base of any sufficiently complex project
Debolaz I guess the problem arises from SVN not trying to do the task of 2 systems in one, revision control and development model. While those are handy for certain situations to have in one application, it can also be a problem when you need a different model/policy. So SVN chose a more laissez faire solution implementing the model in wetware, but having facilities to make it easy as long as people understood what they needed to do, while CVS makes the assumption t
I'm just babbeling btw, getting my thoughts in writing to remember it better. :) 10:45
Alias_ CVS implements an entire VCS, SVN implements a versioning remote filesystem
And as long as you don't treat SVN as a full VCS, it makes a really really awsome versioning remote filesystem
It's only when people with non-trivial needs try to do things on top of SVN that you hit problems 10:46
For ordinary work it's just fine
Debolaz Alias_: Imho, that's wrong. I don't think a VCS always needs to enforce a certain policy.
Alias_ sure
But it needs to enforce the things it says it does
If SVN didn't have tags, I'd be just fine
See, your hard drive implements branches and tags to! 10:47
Debolaz It's very handy for some situations, such as the one you described and I think it's a perfectly valid point you bring up. Just that it doesn't make it a non-VCS by not enforcing a model.
Alias_ In fact, your photocopier implements branches and tags as well
audreyt $ env LC_ALL=C svn help tag
"tag": unknown command.
Alias_ Put a sheet of paper in your photocopier, and write "tag" on the copy, and it's a tag
Unless you write something else on it, then it's a branch 10:48
Just because you CALL it a tag, doesn't make it a tag
nothingmuch tag isa copy, branch isa copy
the point is reducing software complexity
Alias_ points at audreyt 10:49
See, it doesn't implement tags
nothingmuch you can write a 15 line shell script that implements "real" tagging and copying
on top of SVN
Alias_ The only place the concept of tags exist is in the manual
nothingmuch thinks it's a good thing
Alias_ nothingmuch: ... and you have to repeat that on every single installation?
nothingmuch and likes SVN more than many systems because of that
since you can branch and tag arbitrary dirs
Alias_ You'd love VMS
nothingmuch i doubt it
Alias_ See, VMS has native versioning filesystems
nothingmuch from what I've heard
Alias_ It's like SVN, but locally! 10:50
10:50 Aankh|Clone is now known as Aankhen``
nothingmuch anyway, my point is - perforce is too complicated 10:50
because it tries to give SVN flexibility
with "real branches" and stuff
tags somehow survive this
Alias_ All I want is branches that you can see, and tags you can see... in code
nothingmuch but it's SSSSSSSOOOOOOOOOOOOOOOOOOOOOOO complicated to manage branching that you want to cry
Alias_ If I write a function that takes a "tag" as a pameter, I want to be able to write an is_tag() function 10:51
parameter
nothingmuch so write a wrapper
and make a pretty dist
and make them use that
or don't do it at all
and don't use SVN
Alias_ I don't :)
nothingmuch or don't use real tags and real branches
right
this discussion is looping =)
Alias_ See, the solution to SVN not having tags tends to come down to not using SVN
And yet the manual keeps insisting it has tags
nothingmuch heh
Alias_ It's just they are tags you can't use 10:52
nothingmuch is perfectly happy, as are many others
Alias_ Well, so am I
nothingmuch i don't like SVN for it's centralness
Alias_ Just only use it for the projects that need lots of tags
nothingmuch and i don't really like SVK because i think it's too complicated
Alias_ err don't need
If all you have are simple needs, SVN is probably fine
nothingmuch but then again i really like SVK because it gives me what I want from the defacto standard which is SVN
what I really like is darcs 10:53
Alias_ I have one system that needs in the order of 40-50 tags a day
That's a hell of a lot of copies
nothingmuch because in darcs every things are very very simpl
e
you don't need these checked out
Alias_ audreyt: darcs is a patch-based vcs right?
nothingmuch yes
Alias_ There's two types of VCS, repository and patch-based 10:54
nothingmuch it has only tags
Alias_ There's good reasons for both of those
nothingmuch and every branch is just it's own repo
or working copy
or whatever
Alias_ yep
It's a control thing though
Some situations dictate the need for control
It's a sliding scale
svk makes a nice half-way point 10:55
Because it's a repository-based VCS you can use in patch-mode (sort of)
nothingmuch svk is a powertool
Alias_ I like the idea of SVK, I just don't quite need it yet
nothingmuch with lots of bells and whistles
it should have a few more sirens though
Alias_ Again, like anything, it depends if you need them
Debolaz The main idea behind SVK is decentralized repositories though, that's the significant difference from SVN. 10:56
nothingmuch darcs is like SVK in terms of theoretical flexibility
but it's much more minimalistic
and not compatible with SVN
which is why I use both
Alias_ Debolaz: But that's the idea behind all those patch-based systems
nothingmuch if someone wants to buy me a present because I'm so cool: cgi.ebay.com/ws/eBayISAPI.dll?ViewI...T&rd=1 10:58
Alias_ Instead of being purely distributed though, SVK is still sort of star-patterned
Debolaz Personally, I'm looking at mercurial for my own use. It's probably between that and svk.
Alias_ When SVK gets a GUI client, I'll consider it 10:59
audreyt: Speaking of which, remind me to talk to clcao some time about reusing the gear we're making for the Perl editor to make a SVK gui
There's a few new components now that should make Perl desktop GUI software a bit easier to CPANify 11:00
nothingmuch clkao, not claco or clcao ;-)
Alias_ damn it
nothingmuch tab completion is your friend =) 11:01
Alias_ he's here?
ah
In fact, I should write an Acme:: module documenting photocopier version control 11:02
Acme::SVN::Photocopier
or just Acme::VCS::Photocopier
nothingmuch please don't, too much chaffe 11:03
Alias_ heh
nothingmuch CPAN's SNR ratio is pretty fucked up as it is ;-)
Alias_ Acme:: is there for a reason though :)
nothingmuch right, but for evangelism there are blogs
Alias_ Well, I've used Acme:: to make a point before 11:04
And it was very useful
Go see Acme::BadExample
Acme:: contains a lot of that sort of proof of concepts
audreyt: More M:I problems... the way Module::AutoInstall does it's auto-sudo'ing has issues 11:05
audreyt: It's leaving behind root-owned files that break the main install
audreyt hm 11:07
maybe we do without autosudoing altogether.
it was because CPAN.pm doesn't have proper sudo support
Alias_ And bailout instead?
The idea works, it's just you aren't cleaning up
audreyt but now CPAN.pm is probing for sudo
Alias_ Otherwise you have do sudo the entire 4 commands
or at least the last 3 11:08
audreyt since this October
Alias_ You'd have to sudo make
Which would mean you'd have to sudo make test
audreyt so both CPAN.pm and CPANPLUS now has sudo support
Alias_ Which could create spurious results for file tests
audreyt and they did it in the right place
namely "make install"
so I think we can retire our sudo support
Alias_ How do you install deps?
audreyt via CPAN.pm and CPANPLUS.pm 11:09
Alias_ They have to be installed before make test
audreyt which, again, both already have sudo support
Alias_ By hand? Or by calling to them...
audreyt by calling to sudo
Alias_ No, does M:I just say "Go install the deps yourself" or pass off to CPAN.pm which then magically does it... 11:10
audreyt CPANPLUS 0.05x and CPAN 1.8x
the latter
if you want you can add a warning if CPAN.pm is <1.80 or CPANPLUS < 0.050
saying they don't have sudo support and you will probably fail 11:11
Alias_ Which is a lot of systems
audreyt and recommend an upgrade
or something
yes, but it's not our layer
Alias_ I note that M:I is supposed to work with older things... it's a big selling point
audreyt it used to be, but is no longer
yes, so if you don't like the warning idea, do the proper cleaning by hand
works too
Alias_ I do
The install fails horribly with errors all over the place, I go WTF and sudo make realclean and then start it again, and then it works 11:12
But it's hella ugly, and I doubt the normals will enjoy it
I'm not entirely sure why it would need to leave root-owned files around at all
Whatever it's doing to do the sudo-ed installs, I wouldn't have thought it would leave files in the current install's directory 11:14
audreyt are you using CPAN.pm instead of CPANPLUS.pm?
Alias_ um... I'm not using either 11:15
I'm doing perl Makefile.PL; make; etc by hand
So it's using CPANPLUS itself I think
audreyt hm 11:18
Alias_ audreyt: If it's creating files, could we create a subdir, move into it do to the installs, then back up and remove it?
to do
audreyt yes, but CPANPLUS already do that
let's just disable sudo support when using CPANPLUS as backend.
Alias_ ok 11:19
audreyt ...implemented.
committing
Alias_ Don't release
I badly need to proof the docs
Will do shortly
audreyt ok 11:23
the fix is in as r74
Alias_ ok
I'm almost done with PITA::Scheme::Perl5::Make, then I'll deal with the docs. An hour at most
audreyt cool 11:24
audreyt thinks Alias_ is a relentless machine
Alias_ It's weird, it hasn't even been hard to write 11:25
Everyone else (CPAN, CPANPLUS, M:B, M:I) seems to have huge problems
I'm wondering if I just haven't hit the hard bits yet
PITA::Scheme::Perl5::Make is only 80 lines of code 11:26
and half of that is boilerplate and param checking
And the only reason I seem relentless is that I like to write things slowly and make sure the tests pass :) 11:27
Stemming from my absolute uselessness to work on anything that bores me, and thus to deal with bug reports :) 11:28
You certainly seem to work a lot faster than I do 11:29
obra Alias_: are you using 'make'? or implementing your own? 11:31
Alias_ obra: umm...
It just runs Makefile.PL; make; make test;
That's it
obra Or is ::Perl5::Make not actuall something that. oh.
Alias_ It's a mass testing thing, I am just running what a human would 11:32
obra Or presumably ./Build if it exists?
Alias_ Perl5::Build
obra ah. cool
Alias_ ::Perl5 will autosense Makefile.PL or Build.PL and rebless as needed
So for each new type of install, you write a new (smallish) ::Scheme:: class 11:33
And the schemes should roughly match those in the Perl 6 C<use> specification
or something :)
I'm feeling my way as I go a bit in regards to the schemes
obra (on the fly specification)++ 11:34
Alias_ sometimes :)
gaal audreyt: where's that variadic stuff again? 11:45
audreyt OpTable line 418
and below
gaal (,,) ?
audreyt er, sorry
look for
class OpClass a where op :: a
and below
gaal op :: a is.. interesting 11:46
audreyt it's still finite types
Text.Printf has infinite types :) 11:47
Debolaz wish SVK would have better support for mirroring a CVS repository. 11:48
audreyt thinks tailor.py support is long overdue 11:49
Alias_ tailer.py?
Debolaz Doesn't tailor use VCP as well? 11:50
audreyt nope
Debolaz VCP is badly badly broken. :/
Any attempt to mirror anything but small CVS repos will cause borking.
obra Debolaz: do you have time to help improve svk's CVS import support? 11:55
Debolaz obra: I should at least set aside time to learn tailor better. 11:57
obra *nod*
gaal audreyt: where's the right place to add cbits to include+link settings now for pugs? 12:09
audreyt gaal: what would you like to link/include in? 12:12
it's Pugs.cabal.in
gaal sorry, meeting ant $work, bbiab 12:16
audreyt: error: fpstring.h: No such file or directory / function ā€˜DataziFastPackedString_zdwccall_entry ... 12:22
joao happy new year!
gaal and then in linking (if I add -Idata/cbits manuall) there's an additional error
Alias_ hmmm
What is involved in "mirroring" CVS
I may be able to help 12:23
Could you just use the old CVS Monitor backend code to pull the entire metadata set for the repository, and then reconstruct it from that? 12:24
audreyt gaal: you want to link in FPS?
gaal audreyt: I just added '#include "../../fpstring.h"' in Data.Yaml.Syck, 12:25
audreyt gaal: then you need to tweak Makefile.PL as well
also add FPS to additional-modules
in cabal
gaal audreyt: yeah, I wasn't where what-where etc.
Debolaz reads some more about darcs and likes it untill the word "haskell" pops up. 12:26
Alias_ hmmm?
nothingmuch Debolaz: ? 12:27
Alias_ Haskell == good (+ braintwisty)
audreyt gaal: ok... I can give it a stab after dinner 12:28
but I need to run to dinner now
Debolaz goes back to making haskell behave properly on FreeBSD+pkgsrc. 12:32
How do I make ghc include /usr/pkg/lib/ghc-6.4.1/include when it compiles something so that it may suck in ghcconfig.h? (And why isn't this default behaviour?!) 12:43
I should ask that in another channel.. :)
Just pointing out why I don't like haskell. 12:44
gaal audreyt: thanks, I keep getting distracted by work and I don't want to break PIL^N etc. 13:36
13:57 DesreveR is now known as r0nny
svnbot6 r8542 | audreyt++ | * Full grammar support for Text.Parser.Rule. 14:03
r8542 | audreyt++ | parseGrammar :: String -> Grammar
r8542 | audreyt++ | * PIL.Native.Syntax: The .grammar file works!
r8542 | audreyt++ | * Text.Parser.Rule: Support for assertions ^ $ ^^ $$.
r8543 | audreyt++ | * remove the no longer used isPrefixOf'. 14:30
gaal what causes stuff to show up in ghc-options? I want to get -isrc/cbits there, but the .in file just has magicals like extra-libraries: __LIBS__ etc. 14:32
audreyt gaal: those magicals are in Makefile.PL 14:34
gaal audreyt: I don't see __LIBS__ in Makefile.PL? 14:41
audreyt it's @libs
I mean $libs
er, nvm
gaal :):
audreyt so, the magic is in utuils/build_pugs.pl 14:42
my @libs = map substr($_, 2), grep /^-l/, @_;
gaal aha
audreyt so if you put -lsomething in oneof( $profiled_flags $ccdlflags $ghc_output ) 14:43
in Makefile.PL
then it appears magically
it makes no sense... except it's a stopgap to preserve Makefile.PL semantics with cabalization
it's one of those stopgaps that lasts forever, though.
s/lasts/seems to last/
gaal as aristotle is fond of pointing out 14:44
so okay, if I get cbits into one of these, it oughta work. but which one is best for not breaking PIL? 14:45
audreyt gaal: you can't break PIL anyway. 14:46
it's not managed by cabal
gaal PIL is invincible!
audreyt heh
gaal what's the proper -l for cbits?
-lcbits? :)
audreyt there's no -l
just throw src/cbits/fpstring.o into the list 14:47
that's all
same as syck
look at inc/Module/Install/Pugs.pm
add -isrc/cbits/ to it
I think that's all it takes
gaal ETOOMANYLOCATIONS
rafl Juerd_: Aye. I think I'll send it tomorrow. 14:48
audreyt gaal: isn't it :/
I'd like to convert them all to cabal
rafl Juerd_: But can you please send me your address via mail again? Such things tend to get lost in my irc logs.
gaal (make unoptimized)++ 14:49
but no!
Compiling Data.FastPackedString ( src/Data/FastPackedString.hs, dist/build/src/Data/FastPackedString.o )
/tmp/ghc21322.hc:12:22: error: fpstring.h: No such file or directory
Juerd_ rafl: ok. And thanks in advance :)
gaal /tmp/ghc21322.hc: In function ā€˜r9CL_entryā€™:
beh, $work 14:50
bbiab &
audreyt gaal: oy... let me take a look
... it turns out we want -I not -i. 14:53
done.
gaal (I seem to recall some liner hint also being needed) &
audreyt r8544
stevan: I wonder if we should split the mutable interface and immutable interfaces of Hash and Array 14:54
that way Args and Sigs and even NativeSeq can implement the "fetch" part
svnbot6 r8544 | audreyt++ | * compile Data.FastPackedString as part of Pugs.
audreyt but not the "store" part
gaal (Another issue I have is one that luqui was faced with a while ago; you can't patmatch against VHash, so what to do for toYaml VHash?) 14:55
Debolaz Building Pugs-6.2.10... 14:56
ghc-6.4.1: unrecognised flags: -Wl,-R/usr/pkg/lib
This is fun. :/
audreyt gaal: you see a VRef, do a readRef, and go from there
gaal audreyt: ACK.
audreyt Debolaz: nopaste your Pugs.cabal? 14:57
gaal: see the "perl" prim
lisppaste3 Debolaz pasted "Pugs.cabal" at paste.lisp.org/display/15254 14:59
pasteling "gaal" at 192.115.25.249 pasted "link error" (12 lines, 1.3K) at sial.org/pbot/15199
audreyt me multiplexeth 15:00
Debolaz: aha, you are building with p5embed
naughty you
fixing 15:01
Debolaz *Removes* 15:02
Juerd_ rafl: Why do several German people write "n" as "u"? I just discovered this and managed to assure 2 more cacert applicants :) 15:04
audreyt gaal: hm, is the link error before or after r8545?
gaal audreyt: after. r8545 fixes the compilation error.
Juerd_ Or, well, it's more like |\|, which I interpreted as "u", but apparently is "n".
Ehm, no, |/| it is.
rafl Juerd_: No idea why. But it's only a "u" if there's a line above it. Otherwise it's "n". 15:05
Juerd_ A line above it?
(huh?)
rafl As "u" and "n" are written pretty similar you need to distinguish between them. 15:06
Juerd_ This is new to me :)
rafl So some people put a line above the u.
Juerd_ That they are similar, and that a line can help to disambiguate.
In Dutch, a line above a vowel is a lazy way of writing an umlaut...
webmind it is ?
Juerd_ (Well, trema, which is the same glyph as umlaut, but has a different function) 15:07
webmind: Yes.
webmind Juerd_, never seen or knew that
Juerd_ webmind: Especially ij is too often written as y with a line above it. *shivers*
rafl Juerd_: I also write umlauts that way. Other's don't.
Juerd_ I have several cacert forms with actual Us without lines above them.
And none with. 15:08
rafl Juerd_: So by removing one ambiguity another one is introduced.. :-)
audreyt gaal: ok... let me try to duplicate
Juerd_ Except one for Fuhrerschein, but I guess that it's an umlaut there :)
rafl Juerd_: It's not that common anymore. My grandparents are used to write that.
Debolaz contemplates stracing haskell in order to figure out what is causing the horrible bugs in pkgsrc automated builds.
The complete lack of documentation about this problem is getting frustrating.
Juerd_ rafl: I have 8 forms with Us without lines, so I don't think many people know about this disambiguation :) 15:09
However, all the Us are very clearly written, with the right side attached to the line, while almost no n is written with the left side attached to the vertical line.
Though there's also one Edmund, whose name I can interpret as Edmuud, Edmnnd, Edmnud or Edmund... 15:10
pasteling "gaal" at 192.115.25.249 pasted "syckemit patch wip" (158 lines, 5.1K) at sial.org/pbot/15200
rafl Juerd_: As I said. It's common for older people. I think my parents also do that.
Juerd_ The two characters are exactly equal :)
rafl: You're not older.
"das hier ist die Ziffer 'ueuu'" - Guess that's 'neun' then :)
gaal audreyt: please don't fix it now though because I have to work and I'm on a terribly low self-discipline day :) 15:11
Juerd_ Interesting.
rafl Juerd_: Did I write a "u" with a dash about it?
Juerd_ Actually, there's no "u" in your form
And TBH, I can't read much of what you wrote :)
rafl That's common as well. :-)
Juerd_ I know what it says because I know who you are... 15:12
Flo---__ Ronsthphnp or something like that, it looks like :)
audreyt gaal: okay :)
Juerd_ I like, by the way, how german 1s are tents. :)
rafl Juerd_: I surely don't have 'php' in my surname! 15:13
Juerd_: How do 1s look in the netherlands? 15:14
audreyt gaal: try r8545 and see if it links
svnbot6 r8545 | audreyt++ | * pure cargoculting to try to get syck linking back.
audreyt Debolaz: I've attempted a fix in r8546 on building with p5embed. 15:17
svnbot6 r8546 | audreyt++ | * Debolaz++ reports the perl5 embedding's -Wl options still
r8546 | audreyt++ | found there way into ghc-options field; remove them.
Debolaz audreyt: Still compiling this, I can check out a trunk and try it once I've gotten the pkgsrc version working. 15:18
audreyt ok
Debolaz Which may take a little while since haskell doesn't like being friendly.
audreyt I'm one of the AIX GHC porters; I know that feeling. 15:21
...though I tend to think AIX shares half of the blame.
Debolaz I need to figure out what environment variable makes haskell go ballistic. :/ 15:22
audreyt mmm you can do a binary search ;)
or write your own ~/bin/ghc wrapper and permute the env 15:23
pasteling "gaal" at 192.115.25.249 pasted "link still fails" (7 lines, 1K) at sial.org/pbot/15201 15:24
Debolaz It somehow doesn't feel like the "right" solution. :)
gaal (r8545)
audreyt so. you called syck_flush 15:25
are you sure it's not syck_emitter_flush ?
are you 100% sure? :)
Alias_ heh, he said syck_emitter_flush
gaal :) 15:27
gaal checks
pasteling "gaal" at 192.115.25.249 pasted "no end to fun" (9 lines, 1.3K) at sial.org/pbot/15202 15:28
gaal so, that helped, but there are still a few bumps.
Debolaz audreyt: It seems that pugs don't include the parrot library directory so the linking fails at the end. PARROT_PATH is set correctly. 15:29
audreyt Debolaz: is this a parrot build tree or installed parrot? 15:30
gaal: kill your dist/build/src/Data/Yaml and try again
rafl Juerd_: I still did not receive your snail mail address via email. 15:31
Debolaz audreyt: Installed parrot. PARROT_PATH is set to "/usr/pkg/parrot" and libparrot is in /usr/pkg/parrot/lib/blib/lib/
audreyt: It tries to use /usr/pkg/parrot/blib/lib instead. 15:32
audreyt Debolaz: ok. I think we don't yet have support for installed parrot.
I'll fix.
fixed.
committing
rafl audreyt: Actually it works with an installed, dynamically linked parrot using the Debian pakages. 15:33
audreyt committed.
rafl: oh, cool
didn't know that.
svnbot6 r8547 | audreyt++ | * accomodate for installed parrot in -L$base/blib/lib tree.
audreyt er, I meant lib/blib/lib/ in the commit log.
Juerd_ rafl: What address do you want me to use? 15:34
rafl Juerd_: [email@hidden.address] is fine.
audreyt: We should better fix parrots installation system.
Debolaz audreyt: Where do I patch this for the purpose of making it build with the currently released version?
Juerd_ rafl: ok
Debolaz should probably just check what was committed before asking dumb questions.. :/
audreyt Debolaz: you prod me for the next release.
Juerd_ rafl: Forwarded
audreyt rafl: I agree... 15:35
Debolaz: and yes, see the fix in r8547 for details
stevan audreyt: I think seperate mutable and imutable interfaces are not a problem 15:37
role ImutableArray {}; role MutableArray { does ImutableArray; } 15:38
audreyt stevan: right, although there's a deeper connection
stevan how so? 15:39
audreyt for example, if you have an Array, you can reverse it
there is immutable (functional) reverse which returns the reversed thing
and an mutable counterpart which does it inplace
same goes for updating an elemtn, etc
stevan is that speced? I thought p5 was always a functional reverse? 15:40
audreyt no, it's not part of spec
stevan ok
how does it tell the difference?
audreyt I'm merely thinking whether it makes sense for all destructive operations to have a functional counterpart that returns the same type
stevan yes
so store() returns a new list with eht new item? 15:41
uc(store)
audreyt and if so, a mutable container just returns itself
stevan ok
Alias_ pulls out a new low in his attempts to knock audreyt off the CPAN perch
audreyt whilst an immutable thing that does the interface returns an updated stuff
does this makes any sense?
Alias_ (have a read of PITA::Test::Dummy::Perl5::Make when it appears on recent uploads) :)
stevan so both intereface are the same, but the immutable one returns new copies?
audreyt stevan: that's what I've been thinking. I'm not sure if it's sane. 15:42
stevan ponders disagreeing with audreyt
gaal audreyt: it works now, thanks!
stevan what is your reasoning?
pure is easier to optimize?
Debolaz audreyt: Gives an error now which is probably related to parrot not being dynamic. A step forward. :) 15:43
stevan .../reason-about/write-a-thesis-on/etc
audreyt @foo := ::Array`create([]); @foo.push(3).push(4); @foo`fetch_list; # [3,4]
@foo.push(3).push(4)`fetch_list # also [3,4] 15:44
stevan hmm
the first line is mutable, the second is immutable
right?
audreyt no, both are mutable, as ::Array is mutable
stevan is confused then 15:45
audreyt it's a container
but the second line would also work if @foo is bound to something that is not an ::Array
stevan oh sorry ,.. didnt see the @foo in the second line
audreyt for example, a Match object.
so, my reasoning is twofold 15:46
1. it saves us some namespace -- instead of .unshift and .cons, there is just .unshift
15:47 nnunley_ is now known as nnunley
stevan .cons being the immutable interface? 15:47
gaal prettyVal is so pretty!
audreyt yeah
2. instead of have all destructive operation returning nil, we let them return the container itself, which makes chained assignments etc happier 15:49
and it generalizes the .push interface so instead of returning the number of elems, it returns the container (which numifies to the number of elems)
luqui audreyt, you know that larry is trying really hard to avoid returning self
putting in all sorts of language features to make that unneccesary 15:50
audreyt luqui: no. why?
luqui he says that "we don't want people to return self instead of returning something useful"
(or something like that)
audreyt not sure if it's relevant in the PILN level
luqui maybe not, but it's something to keep in mind
stevan things that returning self can be useful
luqui stevan, I think he means something with information in it
stevan thinks self contains plenty of information too 15:51
luqui not any *new* information
stevan luqui: of course it does,.. if you just changed self in some way
luqui thinks stevan knows what he means, and is just being troublesome
audreyt stevan: anyway. the only drawback I can see from this plan is that .shift becomes awkward
stevan audreyt: as does pop() 15:52
audreyt well, same issue
and .delete
that's the three
stevan luqui: I do understand, but I very much disagree
luqui stevan, even with facilities like monkey but?
audreyt and not surprisingly, in Haskell they only does the destruction, not return the original value
so you need an extra fetch call before the pop. 15:53
stevan audreyt: so we follow haskell then
luqui so stevan, how is returning self useful?
stevan luqui: method chaining
as the primary use 15:54
luqui $foo but { .bar; .baz; .quux }
beacause: $foo.bar.baz
stevan luqui: yes, in some cases
monkey but is not always the right way to do it
audreyt stevan: cool... user-space "pop" can be built using two explicit prim calls 15:55
but we don't do it at prim level
luqui *prevents* bar from ever deciding that it should return something
stevan, when is monkey but not the right way to do chaining? 15:56
or rather, why?
stevan luqui: not *always* the right way
luqui example?
luqui knows that stevan is busy, and will rest the argument until later if he likes
stevan $foo.bar.baz.quux
luqui stevan, why is that better? 15:57
stevan Foo::bar returns a ::Baz
Baz::Baz returns a ::Quux
etc
luqui oh...
Debolaz I think I noticed a problem with the parrot build... when you make world_shared, it will link the parrot executable to the dynamic libparrot, but it doesn't compile in where to find libparrot, assuming that it'll be found by the dynamic linker which won't find it because it installs it in /usr/pkg/parrot/.../
luqui that's not returning self though
stevan will monkey but handle that?
no, your right
luqui method chaining is definitely useful (except in pugs where it is broken :-( 15:58
stevan ponders
luqui but returning self so that you can conveniently do multiple method calls on the same object is broken thinking
Juerd_ IMO, method chaining is incredibly useful, just never with any .foo returning its invocant.
luqui imo
Juerd_ Unless the .foo is .self :)
luqui :-)
audreyt luqui: ($a = $b) += 4; 15:59
is it the kind of broken thinking p6 is going to avoid?
:)
luqui hopes so
audreyt (the .infix:<=> returns self)
luqui but probably not
Juerd_ audreyt: To that, I do not object.
luqui I hate code like that
gaal (my $me = $0) =~ s,^.*/,,; 16:00
Juerd_ Well, to this specific example, I do, because it should be $a = $b + 4
audreyt Juerd_: ah, but my proposal above was risen to do that easily in PILN
luqui gaal, yeah, exactly, that sucks
Juerd_ But with s///, it's definitely useful.
luqui Juerd_, but we're fixing that
gaal luqui: I agree. What's the platonically pure spelling though?
audreyt my $me = $0 but { s,^.*/,, }
Juerd_ I see. 16:01
luqui my $a = $b.subst(rx|^.*/|, "")
(or something like that)
we haven't really decided, but we have decided that there will be one
Juerd_ I still think (believe!) that all methods should be non-mutating by default, including sugared ones like s///.
And that ~~ s/// makes little sence, while .s/// would.
gaal my $me = $0 but i_told_you_i_dont_LIKE_pathnames;
Juerd_ Even though it's arcane and special syntax.
Alias_ Juerd_: Isn't that going to involve a hell of a lot of copying
luqui Juerd_, well, it's one style of coding 16:02
stevan luqui: I guess I can't think of a particularly useful situation at the moment, but I just dont like the idea that I wont be able to
luqui Alias_, not if we plan for it
stevan "broken thinking" or not
Juerd_ Alias_: Eh, no?
luqui stevan, you will be able to
Alias_ $one_meg_string =~ s/foo/bar/;
luqui we just don't like you to
gaal my $pizza = $yours but hold_the_pepperoni;
luqui but in Perl, as usual, style guidance is never gospel
gaal works for me
stevan luqui: ok, thats fine then :)
Juerd_ Alias_: .= can be an optimized thing. Only if the mutation-specific method is lacking, copying is used.
audreyt luqui: so, what about .pop, .shift and .infix:<=>? 16:03
oh and .postfix:<++> while you are at it.
luqui audreyt, .pop and .shift?
stevan goes back to PIL^N
gaal is it true that ruby doesn't have ++?
audreyt luqui: they are like s///
Juerd_ Alias_: For example, @foo.=sort better be optimized, while inline operation on $foo.=sqrt makes no sense at all.
audreyt luqui: do one destructive thing and return a side effect
luqui audreyt, are you arguing Juerd_'s comment? 16:04
that there shouldn't be any destructive methods?
audreyt 17:01 < luqui> my $a = $b.subst(rx|^.*/|, "")
Juerd_ Alias_: So Perl can simply see that there's no mutation specific sqrt method, and do $foo = $foo.sqrt instead.
audreyt I thought you are indicating that the p6 team is introducing nonmutating alternatives to mutating operations
luqui not for all of them it seems. We just want to get around operation(my $x = $y) 16:05
where it is common
audreyt ah. ok.
luqui and I don't fully agree with Juerd_ that there shouldn't be any mutating operations
It's a good principle, but it can be linguistically awkward
but maybe that means that we introduce linguistic facilities to enable that, too 16:06
audreyt I don't know, I've been brainwashed by cc2e that mutations that returns anything but nil (or the object itself) is error prone
Juerd_ luqui: Wait a sec; that's not what I said (at least not what I meant)
audreyt s/object itself/post-operation object/
Juerd_ luqui: I think there should be no mutating *methods*, where methods specifically mean \.\w+ :)
luqui audreyt, why?
Juerd_, that's what I meant
for example, .pop is linguistically awkward in that case 16:07
Juerd_ luqui: A postfix ++ should be mutating, of course!
audreyt luqui: same reason why ($a++ + $b++ ) is a bad idea
Juerd_ Even if written as .++
luqui audreyt, you mean $a++ + $a++ ?
audreyt yeah
luqui got CC2E, but hasn't started it yet
hmm, that's an interesting perspective 16:08
audreyt namely, programmers have an intuitional understanding of rvalues and lvalues
Juerd_ luqui: Hm, I hadn't exactly considered array size changes. It is a good point. Consider my remark limited to scalars :)
luqui Juerd_, your remark is getting kind of special-casey...
audreyt and "functions" that compute things, as well as "procedures" that do things
luqui audreyt, and they should be separate?
Juerd_ luqui: It seems so. 16:09
audreyt and there is a convention for procedure to return an error code, or the state-after-procedure, or nil
but some procedures masquerate as functions and return something entirely unrelated
for example, .chomp returns a newline.
(except when it does not.)
and .push returns a number.
luqui audreyt, getLine :: IO String
function or procedure?
audreyt luqui: "input". 16:10
Juerd_ audreyt: .chomp according to quickref/data returns the modified string, with a .newline property indicating what was removed (ugly, and probably unneeded)
audreyt it doesn't do anything to its argument :)
luqui audreyt, touche
Juerd_ But I do believe that .chomp should not mutate, while .=chomp obviously should
luqui Juerd_, woah...
audreyt Juerd_: yeah, and what I'm saying is that, now we have .= form and monkey but
luqui that's right, I remember that
Juerd_ "and monkey but" doesn't parse 16:11
luqui but I just now realized that it's a really bad solution
audreyt monkey-but
Juerd_ What does that mean?
luqui $foo but {.bar}
gaal grrr, I have a CLong that's actually a void* to a frozen YamlNode. how do I get it back?
luqui equivalent to: $foo.bar; $foo
Juerd_ What's the monkey part?
luqui you're "monkeying around" with the argument
Juerd_ Ahh
gaal (syck trafficks longs instead of void*s) 16:12
Juerd_ Missed the introduction of that slang expression :)
audreyt it's a bad joke -- I learned it from luqui. he and nothingmuch showed monkey butt pictures around the hackathon.
luqui Juerd_, Damian's idea, of course
audreyt gaal: "cast".
Juerd_ luqui: Somehow I knew that already ;)
Debolaz How may I override a variable from Config.pm when running Makefile.PL?
audreyt gaal: in your FFI import, declare it as a Ptr 16:13
Juerd_ I haven't thought of this use of but, and can't say if I like it.
audreyt gaal: never mind the C side declaration.
Debolaz: the main Config.pm?
luqui Juerd_, you'll know when the time is right
gaal ooh!
luqui I've used it once or twice, and it really increases elegance in those one or two cases
Juerd_ It may be the fundamental mistake esperanto made (it's dynamic and polymorphic, but every word has a base form, and derivation depends on whether the base word was a noun, adjective, or verb...)
luqui it was introduced, as we've been saying, as an alternative to returning self for chained method calls 16:14
audreyt luqui: it's too bad that the .predicate?() and .mutation!() form from ruby is not adopted :)
Debolaz audreyt: I need to change "ccdlflags" un order to unbreak parrots dynamic build.
audreyt I kinda like effect sigiling :)
luqui audreyt, agreed
audreyt Debolaz: I already committed a fix
Juerd_ luqui: Does it turn a mutating method into a non-mutating one?
audreyt Debolaz: util/build_pugs.pl r8546
luqui Juerd_, no
Juerd_ Then I fear I don't grok it yet
luqui $foo but { .bar; .baz } is exactly equivaent to $foo.bar; $foo.baz; $foo 16:15
that's all you need to know
Juerd_ Ahh
audreyt luqui: actually... is there a specific reason why effect sigiling is not adopted?
Juerd_ Is that good for "but", though?
audreyt luqui: it doesn't conflict with any existing mechanisms
luqui audreyt, I'm not sure... we *do* have those useless .* and .+ forms
Juerd_ As "$foo but true" does not make $foo itself true.
Debolaz audreyt: Well, the problem isn't specific to pugs. Even if you make pugs work without a dynamic parrot, other applications might want it so I try to make the parrot build as all-pleasing as possible.
luqui we could kill those and use .? and .! instead 16:16
or something like that
audreyt luqui: .*? .+?
what are you talking about?
Juerd_ While .bar and .baz can be unpure (and probably are, if used like this), and thus change state
luqui (.! might be bad because of private attrs)
audreyt Debolaz: oh. I don't know, then.
luqui audreyt, you don't know about .+ and .*?
Juerd_ .+ and .* suck
luqui consider yourself lucky, audreyt
Debolaz audreyt: I could just run sed on root.in and hardwire in the proper directories, but it feels like an ugly hack.
luqui looks to see if they're in the synopsis
Juerd_ They MAY be useful, but I don't think the ugliness is warranted.
luqui if not, then I'm happy
Juerd_ luqui: They were last time I checked. 16:17
luqui just doesn't think that they deserve syntactic liberation
audreyt S06? S02?
luqui S12 I think
Juerd_ audreyt: 3
luqui Juerd_, really?
Juerd_ luqui: Yes
luqui ahh, also S12
audreyt ow
Juerd_ Well, quite briefly in S03
luqui also quite briefly in S12 16:18
audreyt yeah, I remember looking at it
Juerd_ But I always check S03 for the precedence table, and they're there.
audreyt and consciously decided to punt
luqui to be honest, I'm not totally sure what they do
Juerd_ audreyt++
gaal audreyt: is readNode the inverse of freezeNode? is this "SYMID" just the address?
luqui .? is pretty nice though
audreyt self!?method
that's very !?
luqui okay, it doesn't look nice
the functionality is nice
audreyt gaal: yes and yes, I think 16:19
Juerd_ What's better about $foo.?bar compared to try { $foo.bar }?
luqui oh wait
audreyt yeah, what Juerd_ said
luqui I thought that $foo.?bar meant $foo // $foo.bar
audreyt $foo.?bar is utterly weird
gaal audreyt: argh no, it isn't; syck_lookup_sym calls st_lookup... weird
Juerd_ $foo.?bar is, IIRC, more or less equal to $foo.bar if $foo.can<bar>
gaal ah i know why, it's a reentrancy guard
luqui right... which is less cool 16:20
Juerd_ Or is that still $foo.can('bar')?
luqui $foo.can<bar> means $foo.can(){'bar'}
Juerd_ Oh, right
But we have $foo.can:"bar" now, right?
:)
luqui yep
Juerd_ Okay
Don't like the colon, still, but it's better than parens.
audreyt we do?
luqui ?eval "foo".substr: 1,2
Juerd_ I don't get how the colon works together with indirect syntax 16:21
audreyt oh, adverbial suffix.
luqui where's evalbot?
Juerd_ luqui: It was gone when I left from .nl last Monday :)
luqui oh my
luqui starts him up again
stevan luqui: he was out on a bender last night,.. got really messed up,.. probably hung over
luqui I told him not to do that! 16:22
Juerd_ luqui: It's still software. Software can be quite disobedient
luqui no kidding
?eval "foo".substr: 1, 2
evalbot_8547 \"oo"
Juerd_ oo!
?eval substr "foo": 1, 2 16:23
evalbot_8547 \"oo"
Juerd_ ?eval substr "foo".substr: 1, 2: 1,1 # ehhm. right.
evalbot_8547 Error: unexpected "." expecting term postfix, operator, ":", ",", postfix conditional, postfix loop, postfix iteration, ";" or end of input Only one invocant allowed
Juerd_ So combining it doesn't quite work well :)
Probably a good thing, though
luqui yeah
It was specced which one got precedence
I don't remember though
Juerd_ ?eval substr ("foo".substr: 1, 2): 1,1 # ehhm. right.
evalbot_8547 \"o"
Juerd_ Wow, that actually even works. 16:24
luqui I think it's $foo.bar: gets precedence
Juerd_ Impressive :)
luqui i.e. what pugs currently does :-)
Juerd_ luqui: It should, as . is alwas communicated as having topmost precedence
audreyt luqui: oh, svn.openfoundry.org/pugs/src/PIL/Na...ax.grammar
nice test case for you :)
(it works in the Hs implementation now)
luqui cool
I don't have a rule parser though
audreyt that's okay, I do have one
just tell me what to emit :) 16:25
luqui where is it so I can tell it?
rather, where do I tell it?
audreyt it's in svn.openfoundry.org/pugs/src/Text/Parser/Rule.hs
Juerd_ Oh, are we at the point yet where we can try my XML grammar, that was written over 3 years ago?
audreyt see "data Rule"
Juerd_: I believe so
Juerd_ perlmonks.org/index.pl?node_id=179755 if you feel like it. I lack the guts.
audreyt where is it again?
mm, preempted 16:26
Juerd_ Also, groups.google.com/group/perl.perl6....55a5a65b9f
luqui audreyt, alright, looks straightforward enough
audreyt luqui: you can easily write a Pretty instance for it
luqui: yeah, I think it's kinda nice :)
Juerd_ read that as "write a pretty insane for it"
luqui :-)
audreyt Juerd_: which one? the latter (complex) one? 16:28
(in the perlmonk post) 16:29
Juerd_ audreyt: The google thing is a p6l post, which links to the perlmonks one
Oh, let's see
It's the long one alright, although it's truncated
gaal audreyt: how do I slurp in an enum definition from a .h with FFI?
Juerd_ You can run the Perl 5 script using the XML spec document as input to re-generate.
audreyt I also see # Large block manually removed.
Juerd_: heh... maybe tomorrow
Juerd_ Certainly some tweaks are needed, as this is 2002-age Perl 6 :) 16:30
audreyt I thought you did run it against pge at one point
and discovered impossible memory leaks
gaal: use #enum, perhaps
Juerd_ audreyt: Hm, interesting. All I got out of it when I wrote that p6l writeup was segfaults 16:31
audreyt gaal: see haskell.org/ghc/docs/latest/html/us...sc2hs.html
gaal audreyt: that means duplicating it yes? I don't mind (it's small) but I thought there was a better way
audreyt: that's one of the docs I'm looking at
Juerd_ How does one debug a grammar anyway, even if it does compile?
audreyt the better way involves c2hs
which I don't yet know
Juerd_: you can look at the excellent error mesg 16:32
Juerd_ Yeah, but if you haven't written the grammar yourself, and it's quite mechanical as this one is, I doubt that'll help much :)
audreyt then you'll need a tracer :)
gaal Yet Another Dependency, Don't Add
Juerd_ And - sometimes there is a match, but it's the wrong match. Then there's no error message 16:33
svnbot6 r8548 | audreyt++ | * a zero-length string is also a valid beginning of line. 16:36
audreyt $ ./pil -r 'c | a$' 'az' 16:37
Expecting: 'c' at line 1, column 1 Or: end of input at line 1, column 2
hm, the "Or" is actually a separate line.
audreyt very much likes this error reporting.
Alias_ weird casing
audreyt Expecting: 'c' at line 1, column 1 16:38
svnbot6 r8549 | audreyt++ | * err. never mind last commit. it should be fixed at FPS level...
audreyt Or: end of input at line 1, column 2
Alias_ Still weird casing
audreyt makes more sense when it's lined up
you think "or:" is better?
Alias_ or OR
reminds me of W3C specs
Juerd_ audreyt: expecting [ 'c' at line 1, column 1 | end of input at line 1, column 2 ] 16:39
audreyt Juerd_: maybe, but that gets long
Juerd_ I think that in general, "line 1, column 2" could use a much shorter form. I'd suggest ":1,2" 16:40
svnbot6 r8550 | audreyt++ | * Text.Parser.Rule: change "Or:" to "or:" in error message,
r8550 | audreyt++ | so Alias++ won't have W3C-related nightmares.
gaal :93
oops
Juerd_ Hm, not ",", because that's used in ed..vim for other ranges
audreyt also note it's the usual parsec format 16:41
Juerd_ audreyt: It wasn't a serious suggestion, the [ foo | bar ] one
audreyt because that lets us say "column 2-14"
to denote a range
Juerd_ audreyt: :1:2..14
audreyt ok :)
Juerd_: nah. :)
Juerd_ I am serious about wanting a short form. I just don't know yet what I like. 16:42
audreyt yeah, and it will in any case be an object you can query from
Juerd_ But "at foo.pl line 5" reads much better as "(foo.pl:5)"
audreyt and you can happily redefine its coercion however you want :)
Juerd_ Because it's shorter, and the position is relevant to the programmer onlyway.
s/onlyway/only anyway/ # what happened to my keystrokes?
audreyt stevan: hm, I wonder if we should go all the way with roles. 16:43
stevan audreyt: how so?
audreyt stevan: instead of having this very very adhoc list of methods and role groupings, actually make use of role hierarchy for all plurals
basically, just copy scala.epfl.ch/docu/files/api/index.html ;) 16:44
which is much better thought out that quickref and the current synopses
stevan audreyt: I am working on something similar already :) 16:45
audreyt ooh.
stevan I am basically just starting with the quickref as a guide for now,.. to make sure things work as we expect
audreyt cool... please do consider the scalar/collection/* traits 16:46
it's currently the one that makes most sense to me
gaal hmmm, I want to pass a string literal to a c function (CString). Can I convert it on the fly or do I need to alloca etc?
audreyt gaal: withCString
gaal ah, great. 16:47
thanks
audreyt np :)
and if you are in the FPS land, useAsCString
or if you are letting the C world modify the FPS, unsafeUseAsCString.
gaal nope, it's a constant (so in principle can be global) 16:48
audreyt k
gaal "string"
audreyt withCString "string" $ \cs -> ...
is the idiom
gaal yeppers 16:49
stevan audreyt: ok, r8551 is the first stab at all this 16:51
svnbot6 r8551 | stevan++ | PIL/Native/Bootstrap.pil
r8551 | stevan++ | - first stab at adding roles to "boxed" types, all seems
r8551 | stevan++ | to be going well, although we need several things which
r8551 | stevan++ | I have noted in the source. We need to write some tests
r8551 | stevan++ | for the ::rArray role as well. More planning as well.
stevan I realized I need Pair object
but I should be able to create that completely in PILN 16:52
audreyt Pair is going to be our first value composite 16:53
stevan and with .join, we need a notion of string context maybe
audreyt no contexts please
MMDs yes, but not contexts
stevan no your right 16:54
as_str should work
audreyt yup
context is just a way for the compiler to cheat with the runtime to insert cast calls, in a very unreliable way
stevan yes
audreyt it's totally not the runtime's duty to intuit them :)
stevan: though I think builtin ::Pair makes sense too 16:55
stevan why? speed?
audreyt no, constraints
not using p6opaque layout
stevan ?
audreyt is thinking
a Pair with two value objects should not be itself mutable, right? 16:56
stevan why not?
audreyt (1 => 2) = "3"; 16:57
it doesn't assign into the pair so it becomes (1 => 3)
that would be absurd
at least imvvho :)
stevan yes
audreyt but yet
stevan but $p := (1 => 2); $p.set_key(3); should work
audreyt ah, so your Pair is more like a size-bounded array 16:58
in that case, sure, just inherit from ::Array
stevan yeah basically
I could see a need for a immutable version too
audreyt although I'm not sure it's the perl6 ::Pair's behaviour
which are immutable
stevan hmm
audreyt and can be used in value positions 16:59
stevan but thats Perl 6,..
I can make them immutable I guess
audreyt nah, just use whatever fits. what's a few fetch/store calls among friends :) 17:00
stevan yes :)
if I dont need them mutable, then I will make them immutable 17:01
I was mostly thinking about partial construction
audreyt *nod*
stevan but I suppose I can avoid that easily enough
ok, I will work more on this tonight 17:03
lunch time now &
luqui Juerd_, have you ever used Parse::RecDescent? 17:04
luqui begins to wonder whether virtual classes are actually *better* than parameterized types 17:06
or whether they are exactly equivalent
(then it's only a cognitive issue)
Alias_ luqui: nerd :)
luqui ?
Alias_ oh wait... we're here. Everyone's that way 17:07
:)
luqui yeah...
luqui wonders why Alias_ chose to say that *now*
Alias_ flashbacks
never mind
Juerd_ luqui: Yes, once or twice 17:08
afk 3 food
luqui Juerd_, have you used the trace feature?
Juerd_ No
s/3/#/ 17:09
luqui oh
it is profoundly annoying
research in debugging grammars needs to happen
thanks for pointing that out, it's on my mind now :-)
audreyt luqui: huh? write a virtual class to represent [a]?
what's the type of the cons function (:) ? 17:10
hm, how do I attach POST blocks to rules? 17:13
luqui audreyt, what would they mean?
audreyt rule literal { undef | true | false } 17:14
now suppose I don't want a match obj
but actually want a literal object
I can write another AG outside to match stuff
but then that means I can't do the normal combinatorial parsing on something that calls <literal> and expect to get a Literl obj
luqui I'm thinking AG is how you do that kind of stuff. You always have to return a match object.
hmm 17:15
audreyt and as such can't do conditional parsing easily
always need to consume all
luqui well, grammar Foo is short for class Foo is Match
audreyt or rely on adhoc "fail" closures
yes, and at this point you'll tell me to write wrapper methods
luqui hmm?
audreyt rule _lteral { undef | true | false }
luqui I will?
oh, no, that's not what I was thinking 17:16
If you have information you want to return from the match, it is an instance of the grammar.
but that's broken
audreyt method literal { ... match self._literal and do things with it ... }
thanks, I too think it's broken :)
luqui I mean having instance data in the match object 17:17
(also wrapper methods are broken)
or kludgey at the least
audreyt yeah. there should be sugar to gen wrapper methods
luqui audreyt, do you have an idea of how it should look?
audreyt or better, attach AG-like things to rules
yes, I do
luqui do tell 17:18
I'm about to compose a message to p6l about rules
maybe you can delay it while I incorporate more stuff
audreyt rule literal :POST{Lit.new($/)} { undef | true | false } 17:19
it's even valid perl6.
(because POST blocks are just closure traits.)
luqui do POST blocks return, or just side-effect?
audreyt I don't know. if they are sideeffect only
rule literal :POST{$/ = Lit.new($/)} { undef | true | false } 17:20
luqui that's bad
audreyt I can live with that.
luqui Lit needs to obey the Match interface
audreyt does it? why?
that's the thing I don't grok about rules
luqui because rules use the match interface to figure out where to continue parsing, etc.
audreyt why do they have to --> Match ?
pasteling "gaal" at 192.115.25.249 pasted "marshalling woes" (41 lines, 1.5K) at sial.org/pbot/15203
audreyt luqui: but that's what they matched, not what they yielde 17:21
luqui audreyt, it's kind of like parsec. Rules have to -> RuleParser a
audreyt luqui: the engine of course knows what matched
luqui we just aren't that cool
gaal I'm freezing as a Sycknode, and thawing as a YamlNode, but I'm not sure that matters
audreyt luqui: ah, but there's "a"
luqui yep
gaal could I be missing an indirection?
audreyt what you are saying is Rules have to (IsMatch a) => RuleParser a
luqui audreyt, which is why we need to do something about it
audreyt which parsec does not impose, but rules do
and that sucks. 17:22
luqui audreyt, that's not true
I'm saying that the "a" in the Match object ends up being a member
gaal readNode fwiw does ptr <- peek . castPtr =<< peek nodePtr
which is *two* peeks more than I do.
luqui rather than a monadic bindable thingy
but all in all, I think we need AG-attachables 17:23
Debolaz Aight, pkgsrc now has dynamically built parrot. :)
audreyt luqui: oh, I missed the "member" bit
that does make it very hard to typecheck.
unless Match parameterizes on the ::a.
luqui not with parameterized classes..
but yes
audreyt the good thing about PArrows and Parsec is that if you don't consume things properly, your rule doesn't compose 17:24
it's almost like saying
our Lit rule foo { ... }
and the <foo> will operate with that knowledge
but then, without attachable consumers, it doesn't matter if the knowledge is there, as nobody will use it after parse completion 17:25
which means attachable consumers is a must
luqui attachable consumers?
audreyt and the current ways (bracket followed by a {...//fail}; wrapper methods; POST blocks that assigns $/) are kinda ugly
"functions consuming the match that you can attach to a rule" 17:26
luqui I don't really follow
audreyt 18:22 < luqui> but all in all, I think we need AG-attachables
luqui oh, yeah, I think I do
audreyt the same thing you are calling AG-attachables.
luqui uh, really?
I'm just talking about being able to define an AG inline with a grammar 17:27
audreyt yes, that's exactly what I'm talking about.
AGs are even nicer because they simplify traversal.
I'm using haskell Generics for the same purpose
but if AGs can be declared alongside rules -- and trigger at partial, not only complete match -- that'd rock 17:28
luqui there are of course problems with triggering at partial match
but those problems should only arise when you do something impossible
audreyt which is already broken anyway.
(note that in UUAG, they do trigger at partial match)
because of lazy evaluation and all that.
luqui yeah
luqui is convinced that lazy evaluation is better than compilation 17:29
audreyt so you can use partial results and pretend they happened
luqui because it is more flexible
audreyt you should see the mdo notation I've been raving about :)
luqui you mean the syntax around Monad.Fix?
luqui has seen that
audreyt just replace "do" with "mdo" and you can refer to anything in a block inside it regardless of sequence, just like let-block 17:30
yeah. PILN now uses it in class bootstrapping
luqui unfortuantely, there is no parsec Monad.Fix instance
audreyt fortunately, we can make PArrows an ArrowFix.
luqui really!?
I thought that there was no Monad.Fix for parsec for a reason 17:31
because it's impossible
audreyt yes
but PArrows is not a monad
and will never be
luqui hmm..
audreyt because it doesn't do monadic application
it's just glorified CPS :)
luqui I still wonder how that works
audreyt in which fixpoints are obvious.
luqui you can refer to information that you haven't parsed yet...
does it just diverge then? 17:32
audreyt ...as long as you can obtain it without strictly depending on information you are computing toward
otherwise it diverges, yes
luqui it would be nice if perl 6 were lazier
audreyt it's already quite lazy :) 17:33
luqui audreyt, ?
it's call-by-value...
audreyt you can explicitly mark lazy streams producers and consumers
and closure creation is inexpensive 17:34
luqui but you would have no chance of writing fix the haskell way
audreyt heh... haskell can't write the untyped lambda-calculus fix either
luqui well, I guess you could do it with closures
audreyt win some lose some :)
oh wait, you can do that in haskell with unsafeCoerce# ;) 17:35
luqui :-p
okay, so inline AGs
the thing that makes them hard is that they really ought to be *inside* the rule definitions, which I find yucky 17:36
because the implementations differ based on which alternation you take
audreyt sure 17:38
but that's fine
luqui well, the thing I don't like about Parser.hs 17:39
audreyt /:proc{...} .../
luqui is that you can't see the grammar
audreyt also
luqui it's just code
you kind of lose that declarative flavor
audreyt /[:proc{...} alt1 ] | [:proc{...} alt2 ]/
and you can also lift the :proc to outside
rx:proc{...}//
wolverian not just :{}?
audreyt :{} worksforme too 17:40
luqui wolverian, yeah, we could make that a shorthand
audreyt and I'd really like it to return something
not just augmenting $/
luqui is there a way to pull the proc out further, but still depend on which alternation was taken
luqui can't think of anything offhand 17:41
audreyt, you would return something through the "ret" attribute or some such
wolverian (I don't even like $/)
luqui again, we could shorthand canonical returns if we like
wolverian, you mean you don't like how it looks? 17:42
audreyt rule value { \d+ }
rule leaf :{.min = $<value>} { <value> }
wolverian I don't like that it's a variable. just return the match object
luqui wolverian, how do you refer to the match object you're currently constructing 17:43
audreyt, that has its own problems
wolverian luqui, maybe I like it inside rules, then, but not outside.
luqui rule leaf :{.pos = $<value>.from} { <value> }
wolverian, then do you dislike $1, $2, ... too?
wolverian luqui, yes. vehemently
audreyt luqui: what's wrong with that?
luqui audreyt, nothing, unless we go with what you suggest 17:44
oh wait
no, yours is fine too
because of how match objects numify
audreyt yeah.
me and pmichaud argued for that.
luqui okay, I thought you were arguing for return value stuff
wolverian, you like $1, $2, but you don't like $/... 17:45
even though $1 is shorthand for $/[1]
wolverian luqui, I _don't_ like them, sorry.
luqui oh
audreyt if I have access to bothway propagation, I'm fine with having to pull it out from $/
luqui well in that case your argument is solid 17:46
and I simply disagree
by bothway propagation, you mean inh and syn?
audreyt yup
rule literal :{Lit.new($/)} { a | b | c }
now, I do like that a lot
and it'd be wonderful if we can have it
wolverian luqui, that's fine, I trust others to make this decision. it's just a pet peeve from perl5, where I always my ($foo, $bar) = ... =~ ...; probably because I'm not sure if the $n variables reset or not. :) 17:47
luqui so you would like the return value of :{} to go into a canonical attr?
audreyt as it saves a lot of unneccessary shipping around of match data
luqui wolverian, ahh, but in perl 6 they're lexical
so you don't have to worry anymore
audreyt I thought they are environmental.
luqui: yes. and maybe pull it out as $$/. or maybe that's too gonzo.
luqui $/ is env?
luqui is tempted to introduce another punctuation var 17:48
luqui slaps himself
audreyt luqui: S02
larry conjectured that $! and $/ are made env
which will make dduncan and I very very happy
luqui why? 17:49
audreyt we tried to lobby him to drop the "Conjectural:" bit
hadn't yet happened
$! is obvious because it was a global
which just doesn't make sense
luqui thought it was lexical
audreyt and complicates error handling
no. S02:
Certain of these global values may retain punctuational
shortcuts, such as $! for $*ERROR.
luqui yuck
okay, so env is the next best option 17:50
audreyt can we please make it die?
luqui so why do you want them to be env instead of lex?
audreyt because otherwise you can't write your own &catch? 17:51
luqui audreyt, why not?
audreyt catch($!); # right, that works
but it's kinda convenient to have them as $+!
luqui you can also do it: catch {...}
well, kinda annoying too
because you need to test $! immediately after you try, lest some other function mess with it 17:52
audreyt also, in the CATCH blocks
luqui what about them? 17:53
audreyt they get bound to $_ also
which is lexical
so there's no reason to make $! global, even if you want to let CATCH modify it. 17:54
luqui is convinced that $! shouldn't be global
i'm trying to figure out whether it should be env or lex
audreyt so, if it's lex. how is it declared?
luqui what do you mean declared? 17:55
it's declared the same way $_ is
i.e. implicitly (I know, it'd be nicer to have them more like "regular" variables than special implicit ones)
(but I think that the env/lex distinction outweighs that aesthetic argument) 17:56
audreyt so, each scope has an implicit $!.
luqui each try {} introduces a $!
audreyt in its caller's scope.
luqui yeah
audreyt so it needs to be environmental. qed :) 17:57
luqui very nice, but:
Debolaz audreyt: Hmm, I've got a shared parrot library in the right location now, but pugs seems to prefer trying to use the static library?
audreyt Debolaz: oh? hm. how about you removing the .a? 17:58
luqui sub trace($msg) { try {...}; $*ERR.say: $msg } CATCH { trace "Got here"; when X::Foo {...} }
er
wait
wrap a try {...} around that CATCH
audreyt $*ERROR and $*ERR conflicts 17:59
luqui huh?
audreyt another ergonomic reason among the 1,048,576 ones that $! shoudl not be global
luqui I meant STDERR
audreyt (nvm, I'm ranting some other point)
so, what is it trying to do? 18:00
thr try{} inside trace won't modify anything that CATCH does
luqui why?
audreyt because the $! is environment al at &trace level
and $+! stops at first frame
not two frams back
need $CALLER::CALLER::! to get to the CATCH frame 18:01
luqui oh... so I was misunderstanding env vars
audreyt yeah. they are just like haskell implicit vars with proper shadowing.
luqui okay good
audreyt so can we please have $! and $/ environmental? :)
luqui env makes sense to eme then
s/eme/me
sure, got my vote 18:02
because the design process is oh so democratic
I feel uneasy about changing it in the syn if Larry was uneasy
audreyt hm, a Syn patch sent to p6l then?
(or to 6p, if it's warranted) 18:03
luqui (the thing I don't like is that I get much quicker responses on 6p)
(but I like to keep everything out in the open)
I'll p6l it
audreyt danke 18:04
luqui oh, I didn't realize that $_ was also env
hmm.. does that mean:
sub foo() { .say } given "quux" { foo(); } # says quux
I kinda like that and I kinda don't. 18:05
audreyt no, it doesn't say quux 18:08
because it's environmental, and you can't see your caller's $_ by writing $_.
you have to write $+_.
$_ only reaches to OUTER.
which is why there is no twigil for OUTER.
luqui aa soo 18:09
coolness
okay, then everything makes sense and feels warm and fuzzy to me
oh, btw, what was $/ before?
Juerd_ luqui: I've once used a regex demonstration tool that would show different parts of the regex, and the match, in different colours. This isn't feasible for entire grammars, but something like it would be great. 18:10
luqui: I think visual debugging may be the only way to debug a grammar without getting insane :)
luqui Juerd_, it's quite possible
two windows: one with the text with the part that has been matched by the rule highlighted 18:11
the other with the current rule...
Juerd_ I was thinking of a two-pane thing
Well, three. 18:12
audreyt luqui: $/ was "implicitly lexical"
luqui splain
Juerd_ I'll try to draw it tonight to show you
luqui audreyt, okay. I don't have such a strong argument for that one then
Juerd_, schweet
Juerd_ It's a very rough idea
audreyt luqui: among the three surviving punctuations, two are env and one is lex
Juerd_ But it's been in my mind for a few days, so it's a good thing to let it out and have others think of the details :)
audreyt luqui: also, it makes some sense to call into another_sub 18:13
and let it see your $1 and $2
without passing $/ around
as we currently do in p5 a _lot_
and $+1 is a good compromise.
luqui audreyt, what are these punctuations. Are you just talking about $_ $/ and $!? 18:14
audreyt yes.
there's only three, instead of 16,384.
luqui which one is lex?
audreyt $/, currently.
$_ is env, $! is global (and we better get that changed)
luqui ahh. so you meant to say one is env, one is lex, and one is global
which has a nice symmetry to it. Too bad it's so wrong. 18:15
audreyt yes, but after $! is renormalized to env, it makes sense to make $/ env too for consistency and convenience
luqui agreed
audreyt and larry put the "conjecture" in S02 that groups $/ and $! together
and as such he must've already thought about it
just need to take down the horrible "$! is alias to $*ERROR" line from S02 and remove the "conjecture" line
luqui audreyt, how do I find the IRC logs starting where we started this conversation? 18:16
should $! have a synonym?
sorry, a SYNONYM?
is it $+ERROR, or $?ERROR? 18:17
audreyt luqui: irc.pugscode.org
and click on the right pane
luqui knows about that
audreyt to obtain a "#name" 18:18
luqui ahh the right pane
my browser was hiding that
audreyt I'm fine with $+ERROR.
as is $+TOPIC and $+MATCH.
and the current-scope ones can be $?ERROR if you so prefer.
luqui it feels weird to have $TOPIC not refer to $_ 18:19
if $+TOPIC refers to $CALLER::_
audreyt otoh, the implicitness makes $?TOPIC attractice. 18:20
attractive, even.
$+?TOPIC # ugh.
nah. too silly. 18:21
I vote for no SYNONYM forms unless explicitly declared.
luqui I'll punt on defining those for now
audreyt yes.
Khisanth heh trying to make it look more like cartoon cursing? :P 18:23
luqui I found an argument for $/ to be env 18:29
besides aesthetic appeal:
$foo.subst(/(bar.*)/, { "foo$+1" }) 18:30
hmm
would $/ be bound there, or would it be bound in the body of subst()
or...
that's actually a really weird case
because the passed-in rule would be called as a subrule 18:32
so $/ would not be set
would subst bind $/ itself?
could subst bind $/ on behalf of its caller?
yeah, I think subst would bind $/ on behalf of its caller 18:33
stepping back to the AG discussion 18:35
I would be satisfied if you could define a rule more than once
Debolaz -rwxr-xr-x 1 root wheel 21916667 Jan 1 19:34 pugs
Yay. 18:36
theorbtwo And have them implicitly ored?
luqui yeah 18:37
well... except for the ordering thing
since or's are ordered in rules
but that relates to the post I'm composing now
of making rules independent of the evaluation strategy
where'd everybody go? 18:51
Debolaz luqui: Into hiding? 18:53
luqui audreyt, ping 21:06
nevermind 21:17
Juerd_ luqui: I can't draw it, because the gimp is terribly frustrating and being counter productive. 22:09
gaal weird. make works fine; make ghci gives a wrong(!) error about NoSuchMethod not accepting an argument in Pugs.Eval. Has anyone seen this? 22:19
yo anatolyv 22:39
anatolyv oh hey
luqui Juerd_, :-( 22:40
it does that
gaal, looks like a ghc bug 22:42
Juerd_ luqui: I've used good old ballpoint and paper :)
gaal luqui: yeah :/
Juerd_ luqui: juerd.nl/rule.jpg
luqui gaal, you can hack around it by changing NoSuchMethod cls to NoSuchMethod {} and removing the reference to cls 22:43
luqui examines Juerd_'s picture
gaal yeah, the weird {} hack was mentioned here just the other day, no? 22:44
anyway I found GHCi doesn't work on colinux where I wanted it so it don't matter.
luqui I don't think that {} is a hack
but I think that using it in this situation would be hacking around the problem
Juerd_, when you say "without alternations or subrule names" 22:45
how far down the chain do you go?
Juerd_ Just the raw things that actually matched.
gaal I meant Just {} and was it Nothing {} is.. interesting
Juerd_ So characters and quantifiers at most. 22:46
gaal is reading the fisrt SYB paper... wonderful!
luqui Juerd_, hmmm... it might be nice to see the abstraction too, though
I like the "without alternations" bit
flattening the rule, as it were
Juerd_ So that if "x" was matched by an "x", it's an "x", while if it were matched as a "\w", it'd be clearly "\w"
luqui: To know which rule it was, just click it to select that rule in the lower pane 22:47
luqui you might get more insight from seeing the rule name though. I.e. if "34too" matched <id>, you know something's wrong
luqui looks again
Juerd_ luqui: As rules may be nested n deep, I don't think it's doable to have the rule names in the match document view.
luqui so the Grammar pane would have a cursor wherever that rule was in the "call stack"?
you might be right 22:48
so where do you see the rule call stack?
Juerd_ The rule call stack is visualized by the nested coloured boxes
I had just one colour pen :) 22:49
luqui uh...
that stack can get really deepo
s/o$//
Juerd_ Then it can get really many boxes :)
luqui maybe you can prune those with the mouse 22:50
like you show a textual call stack, and then you select the ones you want to see boxes for
Juerd_ What's pruning?
I'm imagining useful KDE-like tooltip popups, by the way. 22:51
luqui oh, are you envisaging using this on a completed match or a in-progress match?
Juerd_ What's the difference?
I'm not familiar with the terminology 22:52
luqui no, but you have a cursor, so it must be in progress
well, I was asking if it showed you the string and how the rule *ended up* finding a way to match ir
it
Juerd_ The cursor does not indicate any kind of "current" position, in the matching engine, in my idea
luqui oh 22:53
or do you view the dynamic process of the computer trying to match the text
i.e. with "step" and whatnot from debuggers
Juerd_ No, the result of matching the entire thing
However, updated at real time
luqui updated wrt what?
what is changing?
gaal zzZ & 22:54
Juerd_ The rules, because the grammar pane is rw
It's just a text editor, tiny edition :)
luqui also perhaps the text?
Juerd_ That's a nice idea, but I hadn't thought of it yet.
luqui To me, the easiest way to debug a grammar would be to put in a bunch of sample strings
and see if they matched the way I wanted them to
but others might find tweaking the rules an easier way to debug 22:55
Juerd_ And the current cursor position in the grammar editor could just insert some kind of debugging thing into the rule temporarily, to collect a list of positions where it matches.
To visualize that in the match
luqui I don't quite follow that...
Juerd_ If you have "rule foo { \w+\d+ }" and the cursor is in between \w+ and \d+, 22:56
you could insert something like "{ push @POS, .pos }"
And use @POS after the match to indicate where these boundaries between \w+ and \d+ are. 22:57
luqui oh, you're just talking about implementation
Juerd_ aoeusnth234234
^
Like so :)
Yes, but only because I thought this would be the easiest way to explain it
luqui oh, you're explaining the cursor, I get it 22:58
Juerd_ Right
I think this mostly (if not completely) eliminates the need for stepping
luqui hmm... I can't see much use for that offhand
Juerd_ Hm, no, you need stepping because of backtracking. Ignore this.
The use is to link, visualy, the grammar to the document 22:59
luqui it would be nice to have a strategy-independent debugger
so far it looks like you're describing one
Juerd_ It's somewhat like a reversed breakpoint. It doesn't break, but it does show you where it is :)
Now this may not make sense. 23:00
It's hard to describe things that are vague in your own mind.
luqui I kind of like the "completed match" view of the debugger though
I was always thinking procedural 23:01
Juerd_ Procedural is nice, but as we have a match object with plenty of introspection, it may save a lot of time.
Both writing the debugger, and debugging.
luqui aye 23:02
luqui ponders a debugger for L::AG
that shouldn't be too hard. A trace log would give you plenty of information, I think... 23:03
anyway
that's cool. Grammar hacking is always difficult, especially with recursive descent systems
(because one little error somewhere can cause a backtrack and then a completely weird interpretation) 23:04
(ordering dependencies often make trouble too)
if Perl 6 is going to be the next-generation text processing language, it will be important to have one of these
Juerd_ I totally agree 23:06
Perl's most useful debugging feature is -Mre=debug
I use it much more often than the actual debugger
And I've often wanted for the introspection that $/ provides 23:07
luqui hasn't seen that module
Juerd_ The huge amounts of output you get from tracking what the regex engine does, really slows down the actual debugging. Most of the time, I just want to know what matched what.
Not? Oh, wow :)
Try it some time :) 23:08
luqui is trying it now
Juerd_ Like it? 23:10
luqui woah, this is really detailed aobut how it does it's magic 23:11
it works quite differently from how I expected
Juerd_ It shows the bare guts of some of the optimizations, that's what I like.
luqui could be useful for implementing a regex engine too
Juerd_ Certainly 23:12
luqui which someone like, oh, say, me, would be interested in
Juerd_ IIRC, mauke used this when writing his
luqui mauke?
Juerd_ Someone in efnet #perlhelp
Talented hacker.
luqui someone reimplemented a regex engine?
Juerd_ He wrote a toy language to teach himself how to write a compiler (or interpreter, I don't remember)
With very weird, but regular, syntax 23:13
And with regexes.
With again, very weird, but regular, syntax
luqui heh
was his syntax different from the weird regular syntax of regexes? 23:14
Juerd_ Very.
luqui ... weird :-p
Juerd_ 00:14 <@Juerd> mauke: What was your toy language again? Where are its files?
00:14 <@Juerd> mauke: Does it sport documentation?
Now to wait for a reply :)
Feel free to join efnet #perlhelp
00:15 <@mauke> home.cs.tum.edu/~mai/ploki/ 23:15
luqui -Mre=debugcolor # cool 23:23
Juerd_ Except there's very little color in there :) 23:27
Good night 23:36
luqui gute nacht 23:37
Juerd_ Warum auf Deutsch? 23:40
luqui nein 23:41
Odin-LAP O_o
Juerd_ Err :)
Odin-LAP "Why?" "No." :p
luqui case in point.
Juerd_ luqui: Ich hoffe, dass du weisst dass ich kein Deutsch sprechen kann 23:42
luqui: Also erwart keine Deutsche Antwort :) 23:43
IAL - MI NUN IRAS DORMI. GXIS MORGAUX! :) 23:44
luqui Ich weiƟ, daƟ Sie Deutsches sprechen kƶnnen, dumm.
Juerd_ Falsch! Ich kann 's nur tippen und verstehen ;)
Aber ich sagte auf Esperanto dass ich jetzt schlafen gehe; Bis morgen. 23:45
Odin-LAP Esperanto is intriguing.
luqui Ich Dose "Art" und verstehe sie, auch. Es gerades Nehmen ich holen zum google. 23:46
G'night Juerd_
Odin-LAP It's just too inflexive, dammit!
luqui Odin-LAP, phonologically? 23:47
Odin-LAP Haven't the foggiest. 23:49
Odin-LAP is thinking of noun declension, mostly.
(Yeah. English hates that, too.)
luqui oh, do you mean "inflective" then? Or is my terminology messed up?
Odin-LAP See above. 23:50
luqui hmm?
Odin-LAP I haven't studied linguistics at a level which makes me learn the English terminology. :/
luqui ahh, that's what you mean
I hadn't heard of "inflex", but I assumed it was something like "retroflex" 23:51
but instead, it's just lost in translation
buu ?join #buubot
luqui buu, who are you asking to do that?
buu luqui: The only thing in here that responds!
Except it used to get svnbot, but I see someone fixed it. 23:52
wtf? 23:54
luqui and now evalbot is fixed, too :-)
(but you can still private message him) 23:55
buu er
What do you mean?
luqui he won't respond to ?join in a public channel
buu oh
luqui for the same reason he doesn't respond to ?quit
buu Well bring him back
luqui he takes a minute or so to start up
ah, there he is
buu Hurrah! 23:56
hrm
eval: 1
Hurrah!
theorbtwo ?eval5 local $x=4; 4 23:58
evalbot_8551 Error: unexpected "l" expecting operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input