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 stevan on 23 December 2005.
00:00 avarab is now known as avar
luqui stevan, oh, don't worry, I'm highly inconsiderate as far as keeping what is already there 00:24
:-)
svnbot6 r8464 | luqui++ | Brand spankin' new, spectacularly extensible, extremely role-based, marvelously broken architecture for Parse::Rule. 00:49
r8465 | luqui++ | Added my architecture design doc.
clkao wonders why ` in pil ;) 00:51
luqui they need a character other than .
and ` kinda looks like a dot on the top of the screen 00:52
er, line
clkao i thought audreyt will use funky things like ☞ 00:53
luqui heh... other people have to type it too, you know
clkao luqui: what happened to svk today? 00:54
luqui I don't know 00:55
I pushed and it tried to merge a bunch of stuff that I had already pushed
giving me conflicts, since I had changed it since then
luqui supposed he should have saved the dialog 00:56
clkao eek. 00:58
svnbot6 r8466 | luqui++ | It seems that the array context fix broke multiple 01:37
r8466 | luqui++ | inheritance. (Didn't seem like those would be related,
r8466 | luqui++ | but you never know) Fixed.
r8467 | luqui++ | All tests again pass. The architecture move is complete! 02:07
r8468 | luqui++ | Medium- and strategy-independent interface. 02:37
clkao audreyt: do i still need this: 02:43
+ let caller = maybe "main" envPackage (envCaller env)
in Parser.hs ?
luqui that actually looks a little dangerous 02:48
clkao it's a bandaid for export bug 02:49
luqui If you're trying to export but you don't have a caller, it should probably blow up 02:50
asavige anyone there to help haskell beginner? 02:56
i'm trying to write my first haskell program for cheap thrills
luqui I can. Just a sec though
svnbot6 r8469 | Darren_Duncan++ | r1634@Darren-Duncans-Computer: darrenduncan | 2005-12-26 18:57:21 -0800 02:59
r8469 | Darren_Duncan++ | /ext/Rosetta-Incubator : added new files lib/Locale/KeyedText/L/en.pm (start of LKT itself using Message exceptions) and lib/SQL/Routine/Migration.pod (start of a guide to translate between languages); small KeyedText.pm update
luqui asavige, mmkay 03:00
asavige i'm in ghci, loaded my little function and can evaluate it ok .. but I want to trace it
when i try putting trace before the function i get Not in scope: trace
luqui import Debug.Trace
oh, in ghci 03:01
:module +Debug.Trace
(add Debug.Trace to the list of "search paths" for functions)
asavige, don't be afraid to ask over at #haskell too, but the answers get very detailed and stylistic 03:04
like asking a beginner perl question at #perl
nobody knows how to talk to beginners
phredmoyer except other beginners :) 03:09
luqui :-)
I always think that pedagogy is more an art than a science. One teacher can usually explain things really well.
Ten give away too much and too little information at the same time.
asavige ok, finally got it to work after grepping for trace in Pugs code 03:26
it seems trace is very, er, manual, you insert the statements ok for monads 03:27
but can you use trace for non monads?
(i haven't got up to monads yet)
is there a more generic less intrusive trace facility so i can just see what is going on when i evaluate a function
just a couple more general haskell questions, then I'll leave you in peace 03:29
is there a standard stack class in haskell std library? 03:30
what about hashes?
luqui sorry, was afk
asavige, no, trace works even outside of monads
asavige finally does haskell support exceptions try/catch? if so, what are they called? (i know about "error" function)
luqui asavige, there's not much reason for a stack class, since a cons list works well for that as it is 03:31
asavige, haskell has exceptions within monads
(Control.Exception) 03:32
asavige, trace works like so 03:33
trace "message" (foo bar) -- prints message to the screen, then returns whatever foo bar returned
there's no such thing as a statement boundary, so you have to "pass values through" trace
asavige, oh yeah, and there is a hash. It's called Data.Map 03:34
(well, it's not technically a hash, but it does the same thing)
asavige ahhh beauty! got it now. with this new trace-foo I'll be unstoppable ;)
thanks luqui!
luqui sure
oh, and when using trace, remember that haskell is lazy so it doesn't surprise you 03:35
that is: let foo = trace 42 in bar -- where bar doesn't depend on foo
will not print anything to the screen
oh, s/trace/trace "baz"/ 03:36
asavige, one more thing 03:38
do you know about "show"?
asavige luqui: no 03:39
luqui ahh, that can be helpful with trace
show turns various values into strings
so you can say: trace ("got here with " ++ show myvalue ++ "fine") etc
but it won't do it with any value (functions for example don't work), so be prepared for it to whine at you 03:40
asavige thanks, i remember now, i lied, I read about show and its opposite read (but no practical experience yet) 03:41
luqui okay cool
asavige thanks luqui++ 03:42
svnbot6 r8470 | luqui++ | Changed $/.start and $/.end to $/.from and $/.to, as per spec. 03:59
phredmoyer hey is there some conduit to donate to the pugs project? There's perl development on TPF but they have about $90k and I am interested in giving to the PUGs dev 04:25
Alias_ Just write a cheque for My C. Ash and send it to my address 04:26
Mr
phredmoyer lol 04:27
luqui phredmoyer, are you serious? 04:28
phredmoyer seriously though, I am interested in donating. Would do so through TPF but I want to know that it's going to to pugs...
luqui phredmoyer, you should tell TPF that you want it to go to pugs 04:29
I don't know much about TPF, but you can probably talk to obra and he'll get you on the right track
phredmoyer who's obra? (on cli irc client) 04:30
luqui jesse fsck com
Jesse Vincent
phredmoyer ok
gotta go, will email him. 04:31
luqui thanks!
aww I missed him
svnbot6 r8471 | Darren_Duncan++ | r1634@Darren-Duncans-Computer: darrenduncan | 2005-12-26 18:57:21 -0800 04:44
r8471 | Darren_Duncan++ | /ext/Rosetta-Incubator : added new files lib/Locale/KeyedText/L/en.pm (start of LKT itself using Message exceptions) and lib/SQL/Routine/Migration.pod (start of a guide to translate between languages); small KeyedText.pm update
obra donating to pugs is still not trivial. 05:05
luqui how nontrivial? 05:06
obra Well, first someone would need to apply for a grant for something pugs related 05:07
luqui ah, that's how that works 05:08
maybe phredmoyer should apply
Alias_ Like a "keep audreyt now having to work" grant?
s/now/not/
luqui oh yeah, audreyt has been caught up in $work, hasn't he. But I thought he didn't want grants. 05:09
Alias_ she, and not sure... would have to ask
luqui damnit
:-)
Alias_ It will be a confusing month or two
luqui that was the first time I used a pronoun for her, and I swore that I would get it right!
obra She's getting there. She's hacking Jifty apps for customers ;) 05:10
Alias_ oh?
Open Source ones presumably... unless they are paying that crazy $600 an hour proprietary rate... 05:11
obra I don't believe they're open source, but I'll leave it to her
Alias_ nods
spinclad it took me a while to figure out autrijus was from taiwan; the name sounded baltic to me... 05:21
now i want to call her autrija ... must ask if ok first.
obra spinclad: "Audrey" also works now
araujo mm.. is autrijus == audreyt ? 05:22
obra yes
spinclad right, i've gathered... just wanting a least bend on 'autrijus'.
obra &
spinclad so... audreyt, question above? 05:24
qwr iirc audreyt = audrey tang 05:25
Alias_ formerly Autrijus Tang
spinclad she's blogged about this lately; see pugs.blogs.com/audrey/2005/12/runti...pecas.html 05:29
araujo mm.. she? :-/
spinclad with full respect for her preference and self-understanding, yes. 05:31
araujo oh, ok. 05:32
spinclad a change like this takes some getting used to, but i know others (transgender/transsexual/whatever-term-applies) and i know it's important. 05:34
i was away (sort of) for much of november and came back to a new name (and person, in a way) to make sense of, along with the rest of the community. 05:39
anyway, i was most happy to see her blog lately. audreyt, may this change find you safe, happy, and well! 05:41
</OT> 05:42
audreyt rehi 06:43
spinclad: thanks! *smile*
luqui audreyt, I can't figure out the best interface for the subrule combinators 06:44
s/s$//
audreyt luqui: mmm?
I see you are using (sort of) multiparameter roles
luqui I am? 06:45
audreyt yeah, except you call an instance "class"
svnbot6 r8472 | audreyt++ | * As lexical import is implemented correctly by gaal++,
r8472 | audreyt++ | we no longer need the withInlinedIncludes hack to get
r8472 | audreyt++ | "use" statements working with PIL-based compilation.
r8472 | audreyt++ | Thanks to clkao++ for prompting this fix.
audreyt and encode the strategy part and media part as separate role mixins
luqui oh yeah, it's a level of indirection to get around the absence of such roles 06:46
audreyt luqui: but anyway. elaborate on the subrule combinator problem?
*nod*
luqui we're not lazy, so we can't just build recursive combinators like you do in haskell 06:47
and in any case, I'd like to be able to compile subrules
so "execute a closure that returns a Parser" doesn't work
and I'd also like subrules to take arguments
audreyt you can make a strict language lazy by creating a closure that takes nil 06:48
oh wait, arg-taking subrules
luqui (as I've done many times ;-)
audreyt hmm, that's hard
you can still build recursive combinators
using a level of reference
luqui well, the recursive combinators isn't really what I'm concerned about 06:49
compilation is the bigger problem
audreyt compile in two passes?
or keep a .id-based cache
and inject previously compiled results in
memoize on arguments
luqui hmm... 06:50
that's almost like packrat
audreyt I think it's a cheap and cheerful fix
luqui except not... nevermind
it seems like that would be extremely memory hungry
what I'm doing right now is having a Parser and a Rule, where Rule is a compiled form of Parser 06:51
and then the subrule combinator calls a closure which returns a *Rule*
supporting precompiled results
audreyt I don't see the memory hungry part. are you concerned that memoize will not be GC'ed away in time?
luqui oh... right... memoization gets GC'd
audreyt yup
and we are _not_ refcounting
so selfref is just fine 06:52
luqui can I make a memoization in pugs now?
(except... I don't really care, because I don't have a compiling runtime yet)
audreyt nod
just fake it as a per-sub-attached hash for now
luqui hang on--- 06:53
what if arguments are passed through the match object..
clkao iblechbot!
audreyt iblechbot: PIL2JS fails on @array.shift in shift.t (same for pop)
luqui that doesn't seem to buy me anything... nevermind
audreyt iblechbot: it seems that @array.shift is turned into shift(*@array) -- clkao and I suspect autoderef semantics in the dispatcher to Root::shift 06:54
iblech: but I'm not sure if that's the correct reading
gaal heya! 06:56
luqui audreyt, so can the subrule(&code:(Match --> Rule)) interface support such memoization...
(I'm still not clear how that would work)
gaal audreyt: can you suggest a next move on the import game? fold reduceSy{m/n} into ruleVarDeclaration? 06:57
audreyt gaal: PIL2JS now supports lexical imports!
gaal !
audreyt <- hackathon'ing with clkao
gaal for vars as well?
audreyt all it takes is just _removing_ the withInlinedIncludes paragraph in Pugs.hs
gaal Carter's Compass, isn't that's what it's called? 06:58
audreyt mmm?
gaal "I know I'm in the right direction when by removing code I'm adding functionality"
audreyt right
gaal or something to that effect.
audreyt gaal: is lexical varimport working in vanilla runcore? 06:59
gaal no, that doesn't even parse. 07:00
I left it off last week when there was a shortage of tuits and an unexpected comlication:
if you recall, allocating space happens in eval (reduceSym) 07:01
audreyt yes
gaal and chaining got in the way too. So chaining will have to move away for a bit :-)
but should I just inline the reduceSym code into ruleVarDeclaration and use its temporary values in the exportation? 07:02
audreyt I think that's sane
as we already agreed exporting lexical reentrant "my" vars is insane
gaal okay. brb w/coffee. 07:03
svnbot6 r8473 | luqui++ | Subrule support. 07:04
audreyt I'll brb as well 07:06
dduncan hidee-ho 07:07
audreyt Alias_: re open sourcesness of my Jifty app -- $company agreed to make all reusable part free software, and I can refactor any production code out freely
dduncan: yo
Alias_ audreyt: neato... and I would too if it saved me $400-500 an hour :) 07:08
audreyt yeah :)
Alias_ I'm surprised clients are commisioning Jifty apps when it's only been out for 1 day though
You must know clients that live more on the edge :)
audreyt er, actually, it's been around a while before that
dduncan since there doesn't seem to be any movement that I'm aware of about scoping $! as an env, any time soon, I will incorporate workarounds into my code, so it doesn't suffer from untimely wipeouts
audreyt dduncan: nod, I think that's prudent. sorry about that 07:09
luqui all-rightythen... it seems I am ready to start on OPP
dduncan not your fault per se ... p6l has to change the spec first, don't they? 07:10
audreyt dduncan: yup
I'm just this... coding monkey
dduncan separately, whether due to something specced or not, I discovered how to determine if a package is loaded or not
incorporation of that was checked in yesterday 07:11
audreyt cool! how?
luqui oh audreyt, do you think you could make it so that pugs-interactive doesn't care about trailing semicolons?
dduncan test the value of ::($foo).ref
it is 'Type' if the package isn't loaded
Alias_ takes notes for P6 Class::Inspector
dduncan if the package is loaded, it is 'Module' or 'Class' or whatever
audreyt dduncan: cool
dduncan package named in $foo that is 07:12
I don't know why that works, but it does the job
see, for example: 07:13
?eval ::('Foo').ref
07:13 evalbot_8444 is now known as evalbot_8473
evalbot_8473 ::Type 07:13
audreyt luqui: sure, implemented, committing
luqui audreyt, thanks :-)
audreyt :)
dduncan ?eval module Foo {} ::('Foo').ref
evalbot_8473 ::Module
dduncan ?eval class Bar {} ::('Bar').ref 07:14
evalbot_8473 ::Class
GeJ greetings all
audreyt it's nice seeing #perl6 back to constant activity/hacking :)
dduncan ?eval package Baz {} ::('Baz').ref
evalbot_8473 ::Package
audreyt GeJ: greetings
GeJ audreyt & stevan: congrats for PIL^N
dduncan this is predictable, but in the longer term something more self-documenting should be available
some meta-module function 07:15
audreyt dduncan: yup
dduncan on other notes, I discovered your moved journal and read the latest 07:16
so I see your intentions for release dates
audreyt yup 07:17
svnbot6 r8474 | audreyt++ | * In Pugs shell, drop all trailing whitespace and comma in
r8474 | audreyt++ | interactive evaluated code. Suggested by luqui++.
audreyt GeJ: thanks! :) 07:18
svnbot6 r8475 | audreyt++ | * Data.FastPackedString: a specialized fast packChar. 07:20
gaal ?eval ::('NoSuch').ref 07:25
07:25 evalbot_8473 is now known as evalbot_8475
evalbot_8475 ::Type 07:25
gaal say, is reverse . <filter> . reverse fast in haskell, when the data is strictly a String? 07:29
gaal wants to see a discussion of how lists are implemented for special cases 07:30
or is that e.g. precisely why there's Data.FastPackedString etc?
audreyt gaal: it's very space-inefficient 07:32
and yes, that's why the PIL^N runcore switched to FPS
and why Text.Parser.OpTable parses against FPS
a linked list of UTF32 code points is simply too inefficient.
(it's very convenient though.) 07:33
gaal sure
audreyt gaal: also, for randomly accessible growable arrays, instead of [a] we now use "Seq a"
gaal Theoretically GHC could optimize in some cases, no?
audreyt yes, GHC optimizes whenever "fusion" occurs
gaal "could have optimized"
audreyt and I think double reverse counts as fusion 07:34
but not 100% sure
gaal fusion == ?
audreyt fusion is that a list producer and a list consumer can both handle things lazily
svnbot6 r8476 | Darren_Duncan++ | r1641@Darren-Duncans-Computer: darrenduncan | 2005-12-26 23:33:48 -0800
r8476 | Darren_Duncan++ | /ext/Rosetta-Incubator : updated translate_message() of Locale::KeyedText to make a copy of $message arg, working around crashes caused by being scoped globally
gaal interesting: and there I was imagining that strictness would help things 07:35
but I can see why laziness if better in this case
audreyt cf. www.haskell.org/ghc/docs/latest/htm...#id3153312
dduncan er, s//$!/ 07:36
I keep forgetting to escape some $ in the shell
audreyt gaal: hm, there's no fusion rule for "reverse" 07:37
gaal "forestation"... /me has some more to read up on :)
in the code generated for a list, are there sometimes backwards pointers + a size field? 07:39
this is interesting but distracting stuff :)
audreyt and the short answer is no :)
gaal sometimes a list doesn't even have next pointers per se, right? just a next thunk 07:40
...lazy
audreyt s/sometimes/always/
gaal so reverse 1 .. 100 is very costly 07:41
well, I bet it's at least memoized
but still.
audreyt yeah 07:42
[100,99..1]
is much better
gaal I will resist reading more about this now. :)
audreyt :) 07:43
gaal in Eval, there's a special case I don't understand for reduceSym: 07:44
"Special case: my (undef) is no-op"
when does that happen?
reduceSym _ "" exp
probably some artifact of one of the parser rules needing to change their minds about a symbol? 07:45
audreyt my (undef, undef, $x) = (1,2,3);
gaal ah! 07:46
right. I like that syntax.
audreyt DWIM kicks! DWIM bites! DWIM casts a spell! You feel dizzy... --More--
gaal :) 07:47
my undef is export; # sounds like a Wallace Stevens poem
audreyt my () is export; 07:48
gaal my $bonnie is over_the(:ocean);
audreyt Poetry Elucidation and Resonance Language 07:49
luqui read Elucidation as Eucliedean 07:50
that's how you know you've been a math major too long
s/lied/lid/ :-)
gaal www.cs.rice.edu/~ssiyer/minstrels/poems/604.html 07:51
luqui gaal, :-) 07:52
too bad I'm so terrible at interpreting poetry. It had beautiful rhythm and rhyme though... 07:53
nothingmuch got his lost roll of 120 slide film developed 07:55
got the pictures from canada
gaal luqui: it's a purer version of "C-beams glitter in the dark near the Tannhauser Gate".
nothingmuch well, one picture from canada
a siluhette of $Larry hand-waving
well, no, more pictures from canada were also taken 07:56
gaal nothingmuch: any moose?
nothingmuch but none of you guys, except castaway and theorbtwo and John actually came out of the building =)
gaal: nope, didn't see any
i have a shirt with a camel-moose though
gaal Toronto used to have plenty of moose-statues on the streets 07:57
this is now mimiced by so many cities 07:58
Tel-Aviv now has a silly bull stint. I hate it.
luqui audreyt, what is DynTerm/DynStr?
haha: instance Ord DynStr where compare _ _ = LT 07:59
every DynStr is less than every other
gaal luqui: it's a lesson in modesty. 08:00
luqui "all dynstrs are less, but some are more less than others" 08:01
gaal eeeep! $Larry mentions this in his latest post: my *@s := @a[0,2,4]; 08:02
that would be interesting to implement.
luqui why?
you have to do it anyway for argument binding, don't you?
gaal hmm, I suppose so, yes. 08:03
luqui (that's how he came up with it, after all)
?eval 3/4 08:07
08:07 evalbot_8475 is now known as evalbot_8476
evalbot_8476 3/4 08:07
luqui when did that happen
?eval 3.4/8.2
evalbot_8476 17/41
luqui how do I get floats? 08:08
?eval 1/2**100 08:09
evalbot_8476 1/1267650600228229401496703205376
scook0 ?eval sqrt( (3/4) ** 2 ) 08:11
evalbot_8476 0.75
gaal ?eval 3.4/8.2+0
evalbot_8476 17/41
scook0 ducks
gaal ?eval (3.4/8.2)+0
evalbot_8476 17/41
gaal ?eval +(3.4/8.2)
evalbot_8476 17/41
luqui ?eval 3.4/8.2 + pi/pi 08:12
evalbot_8476 1.4146341463414633
gaal contagious rats.
luqui I think that things with decimal points should be doubles
gaal ha, pi/pi's a nice idiom for the transcendental.
luqui I'm actually overjoyed that rationals are so prevelant 08:13
but they can quickly eat up all your memory if you're doing something like, oh, say, computing mandelbrot
probably processor first, actually
audreyt luqui: pong 08:14
I changed DynStr
luqui what do you mean you changed it? 08:15
audreyt I mean it works
svk up
svnbot6 r8477 | audreyt++ | * Text.Parser.OpTable: Implement DynStr correctly and removed
r8477 | audreyt++ | the horrible emptyTerm/emptyOper hack in original PGE.
r8476 | Darren_Duncan++ | r1641@Darren-Duncans-Computer: darrenduncan | 2005-12-26 23:33:48 -0800
r8476 | Darren_Duncan++ | /ext/Rosetta-Incubator : updated translate_message() of Locale::KeyedText to make a copy of $message arg, working around crashes caused by being scoped globally
audreyt pull, Imean
luqui I did that right as you said you changed it and saw nothing ;-)
audreyt look at r327
luqui but then I did it again 08:16
audreyt yeah, commit takes ~3 secs :)
see line 327
, mk Term (span isDigit)
the idea of dynterm is that it parses a term first
and then calls a sub to attempt parse more
only if that sub succeeds, the match is considered complete 08:17
luqui I don't quite understand. Kind of like "ask if this is a listop"?
audreyt no...
for example, if you want to parse $1, $5, $945 as a term
then you create a DynTerm
with str as '$'
luqui ahh 08:18
audreyt and dynStr as (makeMaybe $ span isDigit)
where makeMaybe rejects empty span
useful stuff
luqui well, I suppose
seems like a speed hack to me 08:19
(a very good and honest hack)
audreyt also the dyn part is expected to be able to change opTable
luqui can't opTable just call back into the rule parser? 08:20
(hmm, but I wonder if it should be able to call back into a *different* parser)
audreyt yes.
luqui (for pre-tokenized stuffs)
audreyt so needs an generic interface
yup
luqui no, not really 08:21
pre tokenized stuffs would use a tokenlist medium
why does DynStr return (Str,Str)? 08:22
why two of them? 08:23
cm ola
luqui (initial,remainder)?
audreyt yeah 08:24
matched,remainer
luqui that's what I meant
okay
audreyt a lookafter will return initial
but preserve remainder
so can't just return a splitAt pos
s/lookafter/lookahead/
luqui ahh 08:25
gaal urp. folding in reduceSym isn't enough, duh; I'd need to replace two unsafeEvalXXX functions.
cm *folds audreyt*
luqui okay, I think I can do the OPP parser now
still using this as a reference 08:26
gaal argh! it's not even possible to refactor unsafeEvalEtc. funcs to accept a callback, because it needs to go all the way down to reduce. :-(
luqui gaal, what are you trying to do?
audreyt, one more thing... what is Close? 08:28
gaal luqui: export variables. the difficulty is that their memory is allocated in Eval, not the parser. 08:29
as opposed to Subs, where the mkCode was in Parser, making export much easier.
luqui sub foo () { my $x is export; ... } 08:30
audreyt luqui: Close is the closing part of a circum
luqui you add that automatically when someone declares a circumfix? 08:31
audreyt in circumfix:<[ ]>, the close:<]> token is manufactured
yeah, and postcircum
luqui okay, fair enough
audreyt luqui: OpTable-mutator is in
luqui oh, and rationals get rid of the whole string-compare trick
I was rather pleased to see that
svnbot6 r8478 | audreyt++ | * Text.Parser.OpTable - DynStr can now return a function that
r8478 | audreyt++ | modifies the operator table for the remainer of parse.
audreyt luqui: I think the string compare trick is _broken_ in PGE 08:32
from what I see, a trailing ">" will continue be a trailing ">"
even if it's specified twice
gaal luqui: that line you just said would probably not be allowed
audreyt since it's using substr($level, -1) to substitute
luqui knows
audreyt but of course I may've read the assembly wrong
luqui (re: gaal)
audreyt in any case I much prefer rationals.
luqui does the math you're doing work? 08:33
audreyt you mean multiplying by 1.5 and 0.5 respectively?
luqui yeah
oh, ternary
gaal
.oO( not that I see why we need to allow sub foo { our $x is export } )
luqui base 3, no?
audreyt yeah 08:34
luqui that makes sense
audreyt cool
wlel, it's actually still binary
because for "=" equiv you don't touch the number
for ">" you add a trailing 0
for "<" you dec by 1 and add trailing 1
if the match doesn't work, feel free to fix it :) 08:35
s/match/math/
luqui I'll attempt to prove that it works before using it
audreyt cool
luqui got to put my school skills to work somehow
audreyt I hope my use of implicit params is grokkable to you
it's just writing Reader monad code in direct style 08:36
luqui implicit params?
audreyt ?tbl
?termStack
they are like $+tbl
glasgow haskell has native support for "env" vars
and let-binding introduces new env
luqui oh cool 08:37
wow perl is so original :-p
audreyt let ?tbl = (transform ?tbl)
heh :)
nothingmuch where are env vars described?
luqui I'll figure it out
S02
nothingmuch s06 only mentions them
ah
audreyt the GHC implementation is haskell.org/ghc/docs/latest/html/us...parameters
note that in GHC, whether you accept env or not must be marked in type signature 08:38
if you don't declare you want caller's env, you don't get them
for speed reasons and type soundness
nothingmuch ++
luqui thus type Parse a?
audreyt in p6 I imagine we always get the whole env stack? or do we hoist $+foo like $^foo?
luqui: yup
luqui ? 08:39
audreyt Parse a is something that receives the env vars and has type a
luqui you can return it?
that is, the function depends on ?tbl
audreyt sure
luqui do you return something that depends on ?tbl and it works?
audreyt yup
luqui okay
oh yeah, because return is covariant
nothingmuch audreyt: what about '$( '+foo' ) ?
luqui feels stuff starting to make sense 08:40
nothingmuch or do we need $+( 'foo' )?
audreyt nothingmuch: I have no idea
I imagine we just pass the whole frame around
very slowly but surely
nothingmuch continuations would be ouch wouchy
audreyt yeah 08:41
nothingmuch env lexicals are just regular lexicals that arrange in a graph though, right?
i mean, if you look at 'sub { ... { } ... }'
the pads are chained
audreyt env lexicals are things you pass implicitly to every function you call in your scope.
nothingmuch env just means that you can chain pads dynamically instead of lexically
right
no need to pass the whole frame around
just a pointer
to the most recently declared env 08:42
linked list of pads for in->out lookup
luqui that puts the cost on lookup
which seems better than putting the cost on closure
nothingmuch luqui: $+foo could be statically resolved into a hidden parameter 08:43
while $( "+foo" ) would have expensive lookup
luqui yes, if we can do such static binding
nothingmuch we can
luqui hmm... when you don't know, you just fill it in on demand
okay, I see that
nothingmuch just add a $plus_foo_for_this_func to every caller of this_func that
that has $+foo somewhere in it's env
statically resolved env 08:44
luqui I'm just thinking about function pointers
nothingmuch it's just a matter of callgraph walking
i don't understand the connection
one sec, need chocolate
luqui you can't statically bind $foo() without adding envs to the type system like Haskell did
nothingmuch you can statically bind by compiling static envs into parameters 08:45
function parameters
luqui not when you don't know what you're calling
as in my $foo = get_random_coderef(); $foo()
audreyt 09:45 < nothingmuch> you can statically bind by compiling static envs into parameters 08:46
nothingmuch oh, right
audreyt # which is exactly what GHC does at runtime
because $foo in that case stilll has static type informatino
nothingmuch i thought thep problem was '$+foo.()'
audreyt as of what env they want
luqui here's another question:
sub foo() { return { $+bar } }
$+bar comes from the caller of the returned closure?
audreyt obviously, yeah
nothingmuch i'd want it to be a closure closure, i think 08:47
luqui I suppose you would do: sub foo() { my $bar = $+bar; return { $bar } }
audreyt yup
nothingmuch unless we explicitly mark it
this is only because i tried to put $_ in closures too many times
e.g. 'my @adder_subs = map { sub { $_ + shift } } 1 .. 10'
but then again, i could say this now:
luqui the idea that envs are part of the signature is nice, but it's probably too picky for perl users 08:48
nothingmuch my @adder_subs = map -> $x { sub { $x + shift } } 1 .. 10'
audreyt luqui: not if we hoist it like $^x
luqui nothingmuch, yep. perl 5 was crappy...
nothingmuch hehe
audreyt i.e. collect static info
if you mention $+x in your code, you want $+x
luqui audreyt, wouldn't you still get bogus type errors
audreyt I don't see why. 08:49
luqui yeah sure, they wouldn't write the type information
but it would still be that
*there
audreyt no, because subsumption always happens
luqui hmm
audreyt there's no failure case
so you never see an errmsg
not in comp time anyway
luqui okay... I can see that... 08:50
my only other fear is that the lists of implicit parameters would get huge
in top-level functions
I suppose you can remove them from the list upon binding...
audreyt yeah
same for any other tunrime type passing
luqui interesting
audreyt s/tunrime/runtime/ 08:51
luqui heh tunrime
audreyt which we'd need for runtime resolution of objtype polymorphism anyway. S12:
luqui which runtime type passing are you referring to?
audreyt All public method calls are "virtual" in the C++ sense. More surpris?
ingly, any class name mentioned in a method is also considered virtual,
that is, polymorphic on the actual type of the object.
nothingmuch gah 08:52
audreyt so at runtime, the actual type of object subsumes the (potentially superclass's) class name
nothingmuch is getting a pugs craving again
i will be back very very soon
luqui hooray!
audreyt nothingmuch: I look forward to it :)
luqui audreyt, must the derived class be a subtype of the original?
nothingmuch but now i need to work ;-)
i need a sabbatical from work
luqui (hmm... unless it is used in contravariant position, in which case it must be a supertype) 08:53
(and you don't get any virtual anything if you use it in both positions; it must be precisely equivalent)
(I guess you can override behaviors)
audreyt luqui: I thought that's the denotational definition of "derived" 08:54
operationally what "deriving" means is what "subtyping" means on the type level
luqui did S12 ever say derived? 08:55
oh, I did
s/derived/overrided/
audreyt and S12 does too.
luqui where? 08:56
I'm referring to the virtual class, not the class that contains the virtual class
audreyt oh, sorry
hm 08:57
class Foo { method (Foo $self: Foo $other) { ... } }
er
s/method/method m/
class Bar is Foo {}
Bar.new.m(Bar.new)
luqui is that what it's talking about?
audreyt then the "Foo" in the method type becomes Bar automagically 08:58
yes.
luqui it says "any" class name
audreyt sure
same
luqui i.e. Bar.new.m(Foo.new) # illegal?
audreyt it is legal 08:59
first Foo becomes Bar
luqui well of course...
audreyt second Foo untouched
luqui I don't see what's virtual here... 09:00
audreyt all it's saying is that there's no static precalculation of binding to Foo:methname
luqui example if there were?
(sorry I'm being rather dense)
audreyt class Foo { method m1 (Foo $other) { $other.m2 }; method m2 { 'z' } } 09:02
class Bar is Foo { method m2 { 'zz' } }
Bar.new.m1(Bar.new)
# zz
but if prebinding happens it would be 'z'
luqui that's not what it's saying
audreyt because it's dispatched to Foo::m2 on $other.2
.m2
luqui that's just "all methods are virtual"
audreyt no, it's on "$other" 09:03
luqui S12 says class *names* are virtual
audreyt if it's on "$self", it'd be "all methods are virtual"
oh wait, I see what you're talking about
I think it's calking about this
luqui s/c/t/?
audreyt class Foo { method m1 { Foo.new } }
luqui you're having phoenetically appealing butterfingers today 09:04
audreyt class Bar is Foo {}
Bar.m1(); # returns a Bar obj?
luqui yeah, that's on the right track, but I think that would be wrong
GammaRay can anyone point to a real example of := ?
luqui examples/advocacy/motd-i.p6 09:05
nothingmuch my $short_name := $very_long.{expression}{with}[$subscripts]; $short_name = "foo";
$short_name++;
luqui GammaRay, know C++? 09:06
audreyt GammaRay: know perl5? :) 09:07
GammaRay depends... I'm more versed w/ C
audreyt $foo = 1; *foo = *bar; $bar++; print $foo; # 2
GammaRay and yes I "know" perl5.. though it's kinda hard to say that definitively
luqui GammaRay, := is just like references in C++. int& foo = bar; # they're not exact aliases 09:08
s/not/now
audreyt er, I mean *bar = *foo
in perl6, you can say $bar := $foo to do that
without getting %bar and @bar into the game
and also works on lexical vars
luqui which is important, because in perl5 you just do *foo = \$bar
for the former
but the latter doens't work without XS hackery
audreyt and you just use Devel::LexAlias for the latter 09:09
it's just the ergonomics sucks
for both
luqui or you use Perl6::Binding
luqui thinks that's the name of that module
nothingmuch btw, Array::RefElem is the most wonderfully wonderful aliasing module
audreyt looketh 09:10
nothingmuch it allows you to glue the data of different data structures 09:11
on numerous occasions i used it to make views of structures
audreyt wow, very syck
nothingmuch that can be updated and queried from two different lookup structures
one was good for updating, the other for lookup
audreyt mm it's almost like zipper 09:12
except rather destructively
nothingmuch yeah =)
luqui zipper? 09:13
nothingmuch haskell.org/hawiki/TheZipper
luqui ahh yes, that
I used that when we were brainstorming about the tree transformation language 09:16
it went over everybody's head (including mine, partially)
nothingmuch btw, what's the status of that thing?
will perl 6 have zippers and AGs?
audreyt prefers case classes over explict AGs, btw.
luqui is brainstorming about language-level constructs like that
under the name "data comprehensions"
but i haven't come up with much
and neither has anyone else
audreyt, what's a case class?
audreyt luqui: so case classes (tagged unions, or what have you) is not yet designed? 09:17
luqui oh
audreyt case class is what Scala calls OO-happy tagged unions
their implementation is wonderful.
nothingmuch btw, if we do get AGs, please make them be inheritence friendly
cm in which way?
(wonderful)
audreyt "classes that have enumerated subclasses that you can case from"
luqui nothingmuch, of course
nothingmuch and have support for N-ary children
luqui nothingmuch, L::AG 0.07 has both of those
audreyt cm: because the usual OO interospection and machinary are all available
nothingmuch (@ and % variants)
audreyt cm: it's just they get an extra constructor form ClassName(...) 09:18
luqui albeit the latter is a little awkward
nothingmuch ooh
i ought to update blondie to it
audreyt and extra deconstruction form in case
cm audreyt, what does the case-syntax look like?
luqui audreyt, yeah, that pretty much sums up my union type proposal
:-)
you can derive from the individual cases
and you can "derive" from the case type as a whole, but it makes it bigger, not smaller 09:19
audreyt cm: scala.epfl.ch/intro/caseclasses.html 09:20
luqui: look at that link and see if we can get them into Synopses?
luqui: I _really_ want that in p6, as you know :)
cm *links*
luqui too 09:21
don't worry
Larry has already designed half of it
nothingmuch audreyt: please say "case classes are to AGs what x are to y"
i need to learn scalar, dylan, ruby and python in that order 09:22
luqui audreyt, is the set of cases closed?
cm doesn't appear so 09:23
luqui that's a problem for static typing
nothingmuch luqui: we have 'is closed' etc 09:24
static typing where we can get it
not everywhere
audreyt luqui: yes, in scala they are closed
because you can't construct new classes at runtime
luqui I've already addressed this in theory.pod. If you don't close the cases, then covariant typing breaks, and you have to do that nasty trick in the expression problem paper
audreyt nothingmuch: case classes are just haskell "data" types.
luqui: yes and yes.
nothingmuch audreyt: so what has that got to do with AGs? 09:25
and why are they cooler?
luqui AFAICT, they are related, but one is not a substitute for the other
nothingmuch isn't AGs a control flow paradgim on top of the data types?
audreyt nothingmuch: AGs are just ways to write "fold" functions over tagged unions
nothingmuch right
cm audreyt, and you can't add a new case in a different module?
audreyt nothingmuch: if you have tagged unions but not AG, it's trivial to add an AG system
nothingmuch i'll have to see exactly how, without lazy evaluation
luqui with naming convenience built in 09:26
nothingmuch oh
audreyt cm: I don't think you could
nothingmuch thinks about an AG module that fudges the grammar, and creates a AG meta class
audreyt nothingmuch: and you can also write your own folds by hand
nothingmuch audreyt: without lazy evaluation? 09:27
luqui is thinking about reviving theory.pod from a not-so-haskellish perspective
I think a lot of it is redeemable
just not the strong typing, undecidable stuff
audreyt nothingmuch: sure, I don't see why not...
s/strong/static/
will perl6 have weak typing? ;)
nothingmuch audreyt: well, with the fact that data comes from two "directions" in theory
luqui and you could also write an attribute grammar module 09:28
audreyt aka unsafeCoerce
nothingmuch i mean you could, but the way you pass params would be ugly
luqui which was so extremely hard that it took almost three days of work!
:-)
nothingmuch luqui: i'm just wondering on how well integrated perl 6 will make an ag module feel
luqui audreyt, sorry, my tongue keeps slipping there
audreyt nothingmuch: yes, but the ugliness is well understood and can be hidden under eg. luqui's L::AG treatment
nothingmuch L::AG is not well integrated (syntax or otherwise) - it simply can't be
audreyt: oh
in that sense, err, yeah
=)
luqui nothingmuch, it's very hard to make AG's integrated 09:29
nothingmuch i have to go to univ now
luqui because of memory issues
you have to be sure that you'll never access an attribute again so you can clean it up
audreyt in any case... AG-based multipass compiler writing is fun
luqui if you have ideas, I'd be delighted to hear them, though
audreyt hopefully punie will move again
luqui I hear it almost has conditionals 09:30
nothingmuch luqui: compile time integration can mean we can use graph reduction
potentially directly
luqui nothingmuch, you have to be careful how much you assume about compile time knowledge
we're still talking about perl
nothingmuch right
luqui I find it easy to forget that
except for when I start writing in perl
audreyt luqui: excellent, then you just need loops, assignments and all the Structured Programming is yours!
luqui then I remember why I like dynamic typing
nothingmuch if i were going to write an AG module i'd make it kinda compile-time-ish
luqui basically L::AG, but without having to create a string... 09:31
the hardest part is coming up with syntax...
nothingmuch i wonder if allison should be spending more time on punie
luqui that's not already taken
nothingmuch i think it's more important than some people think 09:32
luqui more important to what?
nothingmuch to getting her tools pushed out the door
luqui oh yeah, I guess so
nothingmuch the tools she said she wanted
luqui I just think it's important to demonstrating that PIR is not a viable compiler-writing language
audreyt indeed, a working minilanguage is probably the best way to get there
nothingmuch luqui: i envision compile time AGs as more of a DSL inside perl
that compiles to PIL 09:33
audreyt luqui: heh ;)
nothingmuch and has embedded perl
luqui: yeah, that too
it sounds like she spends ~2hrs a week on it
luqui so basically L::AG but at compile time
audreyt luqui: I think I can parse P6 rules in haskell within today
nothingmuch luqui: yes
audreyt luqui: then I'll compile it to Parsek
nothingmuch luqui: but with the benefit of saying "no, this is not runtime"
luqui audreyt, make sure you can output to my combinators, too 09:34
nothingmuch anyway, i'm off
luqui nothingmuch, yeah :-)
nothingmuch ciao
luqui bye
audreyt luqui: Parsek's combinators is I think isomorphic to yours
nothingmuch Parsek?
luqui what's with the k?
nothingmuch we need a purl on the channel
cm Parsec without try
(or rather, parallel parsing, to avoid the need for try)
audreyt cvs.coverproject.org/marcin/cgi/vie...cvs-markup
cm (afaik..)
nothingmuch btw, oh
oh 09:35
audreyt what cm said.
because p6 rules default to try
and PGE doesn't have "commit" yet anyway
nothingmuch btw, how do p6 rules relate to parrow?
audreyt so it makes sense to use a try-based thing
luqui can Parsek do sane error messages?
I find that backtracking parsers have a hard time with that
audreyt luqui: sure, same as parsec
nothingmuch is it viable to eval p6 rules using parrow techniques?
audreyt parsek doesn't backtrack
luqui er, yeah 09:36
cm what's parrow? :-)
nothingmuch www.cs.helsinki.fi/u/ekarttun/PArro...nator.html
luqui audreyt, my PGE does
nothingmuch shit, i should just shutup
audreyt luqui: I know
nothingmuch afk
luqui :-)
audreyt luqui: it's still possible
and remember, whatever you do, you are better than p5's regex ;) 09:37
(which offers no errmsg whatsoever)
except for the position information in //gc
luqui heh
okay, time to start on OPP
after three hours of saying that i will 09:38
audreyt what is OPP anyway?
luqui ...
operator-precedence parser?
audreyt oh ok
yeah, I hope OpTable.hs is of use to you
should be a very straightforward port
luqui I don't really do straightforward ports though...
Instead I try to understand the problem really well and come up with my own design 09:39
audreyt oh, you'd like to work out the dispatch from shift/reduce rules yourself
luqui makes for frustrating modularity
audreyt cool... have fun then :)
luqui but I'll use OpTable.hs for ideas certainly
audreyt, oh, one thing 09:40
instance Eq DynStr where _ == _ = False
instance Ord DynStr where compare _ _ = EQ
those two lines seem to contradict each other
audreyt lol
fixed.
thanks!
svnbot6 r8479 | audreyt++ | * Text.Parser.OpTable: a DynStr is "eq" not "ne" to any other DynStr. 09:41
r8479 | audreyt++ | Spotted by luqui++.
audreyt dinner, bbl &
Alias_ It's oh so quiet... 11:08
nnunley shhhhh shhhh 11:10
svnbot6 r8480 | audreyt++ | * Text.Parser.OpTable: Allow returning of arbitrary data types 11:11
r8480 | audreyt++ | as parser results instead of fix it on "Match" type.
Alias_ Ah, she is around 11:12
svnbot6 r8481 | audreyt++ | * Text.Parser.PArrow, modified to work on FastPackedString 11:13
r8481 | audreyt++ | and return location info on error.
Alias_ audreyt: ok, so I've finished SMS::Send and my person driver for it, going to pick off some more doc stuff in M:I for a bit
audreyt: You aren't doing anything with it atm are you?
s/person/personal/
asavige i have a couple of simple haskell questions. anyone want them or should i go to #haskell? 11:36
gaal asavige: still need a hand? 11:53
asavige hi gaal! isDigit applies to chars but what if you want to that each char in a String is a digit? 11:54
I tried isSDigit xs = and (map isDigit xs)
seemed to work ok but what is recommended way to do it?
gaal that looks reasonable to me 11:56
asavige k. thanks. i search the haskell libraries and it seems there is not much String libs 11:57
i guess the haskell way is just to use generic list functions for Strings?
svnbot6 r8482 | luqui++ | Subrule support.
nnunley asavige: Could change it to pointless style
asavige is there a haskell regex library?
nnunley asavige: ie, you could drop xs completely.
asavige k
gaal asavige: yes, there is, haskell.org/ghc/docs/latest/html/li...#t%3ARegex 11:58
svnbot6 r8483 | luqui++ | The (* 1%2) (* 3%2) precedence relation was broken. Fixed it.
luqui I know I already committed that (Subrule support). It's still in my IRC log.
gaal I don't know how nice these regexes are compared to perl's.
afk & 11:59
nnunley More complicated things should probably done with something like Parsec.
asavige hmmm looks like they are not using PCRE, they talk of posix regexes :-( 12:00
integral hmm, aren't we already embedding PCRE?
luqui there is a pcre for haskell
integral see RRegex.PCRE and RRegex 12:01
svnbot6 r8484 | luqui++ | "Ratio Int" is dangerous; you can only raise the precedence 31 times. 12:10
r8484 | luqui++ | Changed to "Ratio Integer".
Alias_ Any particular reason they roll the R?
nnunley Alias_: Looks like the first R is for Reusable. 12:25
Alias_ is reaching his daily limit of Module::Install doc boredom 12:34
Juerd rafl_: pong 13:08
Alias_ audreyt: OK, more docs committed, managed to get through the _from series, and finished at no_index 13:11
Debolaz Good morning Vietnam. 13:34
Has anybody in here been able to compile pugs on FreeBSD? I'm getting "ghc-6.4.1: unrecognised flags: -Wl,-R/usr/pkg/lib" errors. While it's obvious to me why it isn't working, it's not quite obvious how to fix it. I'm using ghc 6.4.1 trying to compile pugs 6.2.10. 13:43
rafl_ Juerd: Already at 22c3? 13:57
Juerd: I'm near the kitchen currently. 14:03
Juerd: Oh, you don't know me. I'm sitting next to Timo, which you should know. 14:04
lisppaste3 avar pasted "overloading" at paste.lisp.org/display/15056 15:21
avar operator overloading of doom! 15:22
svnbot6 r8485 | audreyt++ | * Tweaks to OpTable.hs and PArrow to support proper choice 15:26
r8485 | audreyt++ | combinator and empty strings.
audreyt dances a little victory dance 15:29
svnbot6: ?check
svnbot6 r8486 | audreyt++ | * Ladies and gentlemen, I present you... Text.Parser.Rule!
r8486 | audreyt++ | Fast, pure Haskell Perl6 Rules implementation, based on PArrows.
r8486 | audreyt++ | Currently only handles quantification, alternation and concat,
r8486 | audreyt++ | but it's just a 20mins hack -- much more support planned soon.
clkao yikes
gaal 3wow. 15:30
audreyt and it's easy to hack as well :)
avar what was that thing that was changed in p6 so that if look mommy, no paranthesis { ... wouldn't be ambiguous?
audreyt in 33 lines of code :D
avar: this is made illegal 15:31
$ENV {PATH}
now you have to write
%ENV .{PATH} 15:32
to get whitespace
that's it
I doubt many people use that form in perl5 anyway.
Odin-LAP Have you ever seen it?
audreyt nope
avar %ENV<PATH> or %ENV{"PATH"} though?
audreyt sure
both works 15:33
avar since PATH would be a bareword
audreyt yeah
and <PATH> is so that it looks more distinct than the now-always-a-closure {}
so... I wonder if we should ship a 6.28.0 _without_ requiring PGE :)
I don't see why not. 15:34
Odin-LAP Might be neat.
audreyt and that will finally allow callbacks from rules to code
hm, PGE doesn't handle listfix and chainfix. 15:35
we need that to support fast alternation (a|b|c|d)
audreyt goes adding it to OpTable 15:36
and the neat thing is PArrow provides common head optimization for free
gaal I just noticed that a smoke I'd left running has plenty of memory problems at runtime
pugs: internal error: evacuate: strange closure type 11432
etc.
Odin-LAP Riddle me this, though. Once you get rules support in pugs, wouldn't it be possible to write the Perl6 implementation of Perl6?
audreyt (add|ant) becomes (a(dd|nt))
Odin-LAP: yes.
and once luqui finishes his Rules port in Perl6, that bootstrap can parse itself with itself. 15:37
and there will be much joy, etc.
avar \o/
Odin-LAP But that's a couple of decades away, by any reasonable estimate? >:p
audreyt if your year is my month, then sure :)
Odin-LAP I'm just sayin'... 15:38
gaal I hate it when this happens: 15:43
gaal> ghc errors
* time passes
BSOD
nnunley Mmm. Windows heap corruption. 15:44
gaal last time I had to have my CPU replaced :/
GHC is my canary
that was just a few months ago, and I don't overclock. wtf? 15:46
nnunley Did you check your system memory?
gaal I'm sure the shop did when they replaced the CPU...
say, what's involved in emitting yaml via syck? 15:50
audreyt gaal: see YAML::Syck
avar a ha! 15:52
gaal audreyt: is it on svn somewhere too?
audreyt there's a syck_emit_* sequence -- also see ext/ directory in syck's source tree -- the latest svn has Lua examples; also Ruby ones is worth taking a look at 15:53
svn.kwiki.org/audreyt/YAML-Syck/
also, code.whytheluckystiff.net/svn/syck/
gaal cheers 15:54
audreyt in particular, code.whytheluckystiff.net/svn/syck/...README.EXT
if you'd like to learn Haskell FFI, coding up emitter support for Data.Yaml.Syck might be just the ticket :) 15:55
ingy audreyt: how is Y::S coming?
audreyt ingy: I ported Perl6 Rules to Haskell
so nothing on Y::S front yet
someone sent me a patch, I released it as 0.03
so it can build in a perl built with debug flag on 15:56
gaal audreyt: and just what I had in mind, seeing as all that variable stuff is giving me the brain-jello-syndrome.
audreyt gaal: cool!
it should be pretty straightforward.
ingy okie, I'll keep my eyes on it. maybe we can get a pair of YAML releases by the end of the year
audreyt since you already have the parser part as demos
gaal audreyt: in your p5 module, it's the c Dump() I should be looking at? 15:57
audreyt aye
and for the first pass, you can ignore the mark_ part
just assume nonrecursion
consult haskell.org/ghc/docs/latest/html/us...sc2hs.html for enlightenment 15:58
ingy: sounds good
Odin-LAP points out that the "end of the year" is a handful of days off... 16:00
audreyt ingy works in nanosecond units anyway
gaal good thing ghc is pico-ready 16:01
audreyt :)
ingy audreyt: read this and thought of you ;) www.paulgraham.com/paulgraham/procr...ation.html 16:02
Juerd rafl_: I'm at 22c3, yes, but only very ^H^H^H^H^H^H^Hrafl: Im
gaal is stunned by how short Pugs.Prim.Yaml is 16:03
rafl_ Juerd: I'm in room 2 now.
Juerd: And there's a free place to my right. ;-)
Juerd rafl_: I have approx 1 minute per bootup 16:05
rafl_: So not online much. Will come to s2
audreyt gaal: why should it be any longer? this is not XS you know... :)
Juerd Where in s2 are you?
rafl_ Juerd: Quite on the left side in the back. 16:06
Juerd rafl_: ok; leaving s1 now.
rafl_ Juerd: Two empty chairs right to me.
gaal audreyt: :-)
wheee TDD in syck's c code :-) 16:08
audreyt :D 16:09
allow me to quote Why in syck/ext/ruby/ext/syck/rubyext.c 16:10
* Emitter callback: assembles YAML document events from
* Ruby symbols. This is a brilliant way to do it.
* No one could possibly object.
end of quote.
it's very... poignant. 16:11
gaal suitable adjective for Why 16:12
but... how's it brilliant? isn't that exactly what it's there for?
audreyt luqui: hi. interested in hacking Text.Parser.Rule? :)
luqui uh, not terribly much so. I'd like to get the Perl6 version nice and pretty 16:13
audreyt that's going to be more important in the long run anyway :)
svnbot6 r8487 | luqui++ | Capture with no capture targets no longer dies, but introduces
r8487 | luqui++ | a new scope and discards the match object.
audreyt but just thought you might be interested in taking a look
luqui I'll have a look at least
audreyt I'm very happy with how it's done :)
33 lines, with 2 more lines for each new construct
luqui nice 16:14
Juerd re :)
svnbot6 r8488 | luqui++ | Implemented "numerator" and "denominator" for Rats.
r8489 | luqui++ | Hacked in some dumb support for "our class".
r8490 | luqui++ | Switched over to using "our class" in PGE. That would have felt good on the fingers.
r8490 | luqui++ | Still craving some kind of proper lexical exportation of class names.
Juerd rafl_: Is this the NX bit talk? 16:15
luqui audreyt, does it use list monad?
or no... what does it use?
audreyt it justs PArrows
gaal what's this "bonus" stuff in Syck?
luqui ahh... arrows
those things that I still don't grok 16:16
... at all
audreyt I think I grok now
it's really extremely simple
a >>> b -- do a, then do b
a >>^ b -- do a, then lift pure function b and do it to the result
a *** b -- do a and b in parallel
luqui a >>> b <=> a >> b ; a >>^ b <=> fmap b a ? 16:17
audreyt yup
luqui is there a >>= ?
I heard that all monads were arrows... 16:18
audreyt yup
so no
a &&& b -- do a and b in parallel with the same input (*** would split the input in two)
luqui oh.. right. I'm thinking backwards
integral the monad itself isn't the arrow though
audreyt yeah, you need to apply Kleisli to it
anyway... PArrows has a quite similar interface to Parsec 16:19
and unlike Parsec, I tweaked it to work on FastPackedStrings easily
luqui hmm... what does "split the input in two" mean?
audreyt it means that the input source has to provide a pair as input 16:20
luqui ahh
audreyt and then each side of *** processes one
and then it's recombined
(***) :: a b c -> a b' c' -> a (b, b') (c, c')
luqui pair meaning tuple?
yep 16:21
audreyt yeah
note that a function is an arrow, so that type can read
(***) :: (b -> c) -> (b' -> c') -> ((b, b') -> (c, c'))
which is straightforward as of what it does.
luqui yeah, that part I did actually get when I first read about the
m
audreyt and &&& is even easier
(&&&) :: a b c -> a b c' -> a b (c, c')
luqui why isn't that nice haskell syntax supported at the type level?
(***) :: b `a` c -> b' `a` c' -> (b,b') `a` (c,c') 16:22
audreyt yup
Juerd audreyt: Three character operators? Are they as desperately looking for free glyphs as we are? :)
audreyt so *** implements alternation
Juerd: yup :)
luqui what is the input to a parser?
audreyt and they don't even have unicode.
Juerd Neither do we
luqui Juerd, ?
audreyt luqui: a list of anything
luqui oh
Juerd is still in denial
luqui but PArrow is a library :-) 16:23
audreyt luqui: which I had hacked to be FastPackedString, pretending it's a [Char]
luqui *** is alternation? Wouldn't that be &&& ?
oh, and on a related topic, Juerd, how do you pronounce your name? 16:24
audreyt &&& is simultaneous parse on the same position
hm, actually no 16:25
luqui sounds the same as <|> to me...
audreyt &&& in PArrow is "followed by"
many1 x = (x &&& MStar x) >>> pure (\(b,bs) -> (b:bs))
so, parse "x" first, then parse "x*", get each's result as (b,bs)
then cons them
I think it makes perfect sense
luqui hmm... okay, that makes sense 16:26
how can *** afford to take two different input types?
audreyt between open close real = open >>> (real &&& close) >>^ fst
again, very cute 16:27
oh, you can't use *** as a normal combinator
it's only used internally
Juerd luqui: Much like as if it were German
luqui what's alternation then?
luqui isn't familiar with German's phonology wrt the "J" 16:28
audreyt alternation is implemented as a node
MChoice :: [MD i o] -> MD i o
see pugs/src/Text/Parser/PArrow/MD.hs
(and yes, it depends on GADT to function well)
luqui how uncool 16:29
you mean the arrow formalism doesn't map 1-1 onto the parser combinator formalism?
what good is it then?
:-)
Juerd luqui: Like english y.
audreyt luqui: er, that's why Arrow is a class 16:30
it's impossible to write parsers using >>= and >> alone, you know :)
s/>>/return/
luqui what's return= ? ;-)
okay, enough silliness 16:31
audreyt arr
luqui do you mean "pure"?
audreyt synonym
luqui knows...
luqui will have to play with arrows sometime
Juerd knows nothing about assembler and hardly understands German, and is listening to a German talk about assembly... 16:32
My luck :)
luqui Juerd, are you at a conference?
Juerd luqui: Yep
rafl_ Juerd: Timo told me you obligated yourself to hack on sixpan?
Juerd rafl_: Oh?
luqui there's a conference going on?
which?
rafl_ Juerd: He told me.
Juerd rafl_: He knows more than I do then :)
rafl_: He asked me if I had anything to do with sixpan, and through feather, yes I did :) 16:33
luqui: 22C3, in Berlin
rafl_ Juerd: Does feather have anything to do with sixpan (yet?)?
Juerd rafl_: Just hosting.
; 16:34
s/;//
luqui cool. /me likes cryptography
.. at least
Juerd luqui: Why aren't you at CCC then?
luqui <luqui> there's a conference going on?
(not to mention, I don't really have the $$ to fly to berlin)
(and I'm not gonna drive) 16:35
Juerd I'm here, without flying. So why couldn't you? :)
Oh. I didn't mind driving
Though it was very tiresome
luqui yeah. might be a bit wet for me, too.
Juerd luqui: Woher kommst du? :)
Someone wants to know :) 16:36
luqui Colorado
Juerd That's not quite drivable anyway...
luqui thus a bit wet...
Juerd Yea
luqui German is the most Englishish foreign language I've heard
Alias_ Which would make sense, since English started as a dialect of German 16:37
luqui heh yeah... that happens
Alias_ Then had a bunch of other people's words dumped on it
Juerd It's frozen-wet outside here. Quite white.
luqui like Perl as a dialect of C
Alias_ Then had an ever larger bunch of French words dumped on it
Juerd And the DHCP for wifi sucks.
I think there may be extra access points out there. Fake ones, perhaps. 16:38
Alias_ Perl is English, the second language of the computer world
luqui it's like 65 degrees outside here. Amazing weather for the middle of december.
Juerd luqui: English is Germanic, German isn't Englishish
rafl_ Juerd: It's even harder for me as I smoke.. :-(
Alias_ Juerd: Thank god
luqui But Englishish is a way cooler word than Germanic
Juerd luqui: But Deutsch-achtig beats Englishish. 16:39
luqui point
Juerd luqui: 65 Fahrenheit, I hope for you.
luqui heh yeah
we don't go by reasonable scales
Juerd I have no idea how cold Berlin is on any scale, but it's COLD. 16:40
luqui as cold as canada was at yapc? 16:41
Juerd I have no idea.
Wasn't there
luqui well, it was beautiful there
if there's one month I would live in canada, it would be july
Juerd will go to Saal 3 after this hourslot; There's a talk titled "Writing better code".
I wonder what the angle is. 16:42
And I hope my DECT is safe in Saal 1, where it's charging :)
rafl_ Juerd: The full title is "Writing better code (in Dylan)". WTF is Dylan?
Juerd rafl_: What or who? :)
luqui rafl_, Dylan is a language
Juerd luqui: Worth an hour? 16:43
luqui it's a hybrid language like Perl
Juerd Sounds good enough
luqui but it uses the opposite concepts
Juerd Opposite?
One way to do it, no modularity, strict OO?
audreyt Dylan is a wonderful "dynamic when needed, static when possible" language
Juerd Hmm
rafl_ "combines the best aspects of smalltalk and lisp" Urgh..
luqui apparently it's cool
audreyt starts as fully dynamic like smalltalk, but as you add type annotations, it can eventually produce very efficient code.
luqui I was put off by it's linguistic unappeal
audreyt sounds familiar? :)
Alias_ Is there a DPAN? :) 16:44
Juerd Alias_: Sounds almost like a C++PAN
audreyt sadly no, but they reliably win 2nd place at ICFP contests
Juerd Alias_: And what's Dentral? :)
luqui the Dylprehensive Pointy Archive Network?
Alias_ Juerd: Good Question!
Juerd Alias_: Thought so :) 16:45
Alias_ Do you know the answer?
Juerd No 16:47
rafl_: I want an 8 cell battery too.
And something that finds out what's in the air here that slurps my battery empty.
rafl_ Juerd: Buy one?
Juerd Less than an hour it lasts :(
rafl_ Juerd: And no: I wont sell mine. 16:48
Juerd rafl_: Had ordered one, but it'd be delivered to Sven's two days after the event, so I cancelled it.
Hehe
rafl_ Juerd: jacks are everywhere.. 16:49
Juerd Oh, really? Not in this saal
rafl_ Juerd: They were just behind us. 17:06
audreyt journal up... sleep :) 17:14
*wave* &
generalhan whats going on everyone ? 17:28
Alias_ world domination... slowly
generalhan ... but surely !
give it some time ! lol
Odin-LAP World domination has already been achieved. The controllers are just very, very careful not to let you see it. 17:29
Alias_ _my_ world domination
generalhan haha
anyone in here really good with Perl scripts ? i have a pretty newbish question 17:30
Odin-LAP Alias_: Good luck with that. Last time I tried, they had assassins all over the place. Had to be on the run for a number of years.
Alias_ yes, and you have one minute before we send you to #perl
generalhan lol
k
i need to "find" any file in a directory that starts with an alpha char. can i do that ?
Alias_ search.cpan.org/perldoc?File::Find::Rule 17:31
NEXT!
generalhan sweet thanks !
integral man 1 find # uses less RAM and CPU
Alias_ and it forks
which does use ram and CPU 17:32
svnbot6 r8491 | audreyt++ | * Support for "./pugs -B JS-Perl5 -e ...". 17:42
Alias_ audreyt: Sleep my ass
Juerd rafl_: Oh, heh. 17:44
BTW, how do you think this was meant: "That's not standard Dylan, but something that works."
petdance generalhan: See also File::Find::Wanted. 17:45
Juerd The examples used in this talk are quite contrived :| 17:46
rafl_ Juerd: Where are you? 17:49
Juerd Sitting onthe ground, close by the door that is closest to the screen.
rafl_ Juerd: I think dylan doesn't have an interface for calling c stuff defined.
Juerd: But the compiler that he's talking about can do it in its own way. 17:50
Juerd It has "for" (foreach) implemented as a macro. Heavy desugaring.
rafl_ Juerd: Why? There are lots of free chairs.
Indeed.
Juerd rafl_: No specific reason.
rafl_: I just entered this room a few minutes ago.
rafl_: When I left room 2, I almost fainted, so I decided to eat and drink first.
There's not enough oxygen in the talk rooms 17:51
(unrelated)
rafl_ Juerd: There's not enough caffeine inside you.
Juerd: You missed something. Dylan is pretty cool. 17:52
Juerd I've already got a headache because of the low oxygen (open a window, !@#@#%!), cafeine would make it worse.
rafl_: I see
Now there's a complex description of the old "Abort, Retry, Ignore?" 17:53
rafl_ Juerd: Over here there's fresh air. It's even windy a bit.
Juerd Where's "here"?
rafl_ Juerd: Near the camera.
Juerd Hi 17:54
Dylan has lots of parens :( 17:57
Bracketing operators suck when overused
rafl_ Well, much less than usual lisp languages..
Juerd Sure, but that's natural :)
Only a paren based brainfuckish language could ever have more parens than the usual lisp-alike 17:58
:P
rafl_ :-)
sili hooray lisp
Juerd afk # saal1 17:59
rafl_ Juerd: ping 19:19
Juerd: In mood for some pugs hacking? I'm in the hack centre and want to hack on XML-SAX.. 19:21
kane-xs: ping 19:26
Juerd: Or maybe SmokeServ v2? 19:27
Alias_ Might want to wait a bit on the smoke stuff 19:34
I have a basic version of the PITA::Report XML stuff almost done
Once it's rolling you'd have something new to target :)
s/new/new and interesting/ 19:35
rafl_ Alias_: What's PITA::Report? 19:36
Alias_ Where's purl when you need her... 19:37
Go read ali.as/pita/
After talking to audreyt, it's going to be Perl 6 compatible too
rafl_ What's the perl 6 way of doing require "/path/to/Foo.pm"? 20:00
nothingmuch audreyt++ 20:18
luqui++
svnbot6 r8492 | iblech++ | * Usual svn props. 20:40
r8492 | iblech++ | * Parse-Rule: Architecture.pod: Typo fix.
gaal rafl_: I should think temping @INC and requiring Foo. 20:54
you also have evalfile, if you don't need load-once.
rafl_ gaal: Well, I want to load parser modules at runtime. 21:03
nothingmuch out of curiousity - why was the pugs blog moved? 21:09
gaal rafl_: parser modules? 21:26
dduncan not sure exactly ...
but I would guess that the new host offers a better experience 21:27
rafl_ gaal: Something needs a parser and those are implemented in modules. I want to load such modules on demand. 21:29
gaal how is this distinct from wanting a random other module of functionality? 21:30
I'm off to bed. later & 21:31
svnbot6 r8493 | Darren_Duncan++ | r1666@Darren-Duncans-Computer: darrenduncan | 2005-12-27 15:39:54 -0800 23:44
r8493 | Darren_Duncan++ | /ext/Rosetta-Incubator : in KeyedText.pm, changed all non-BUILD submethods to methods; in multiple files, removed any 'submethod' refs in documentation, changed any 'hash()' to '{}' in code