Run Perl6 Now! & pugscode.org ('Overview', 'Journal') & pugs.kwiki.org & channel log: xrl.us/e98m & < autrijus> damn, my journal keeps getting obsoleted by #perl6. Set by Juerd_ on 12 March 2005. |
|||
nothingmuch | new file::Spec fixed it | 00:03 | |
GRR! | 00:09 | ||
r955 | |||
966 | |||
jabbot | pugs - 966 - Create backlinks in synopses | 00:17 | |
pugs - 969 - refactor | 00:47 | ||
pugs - 968 - Kwidi (2html) handles paragraphs, header | |||
pugs - 967 - Document the backlink index | |||
stevan | hey nothingmuch, theorbtwo | 01:07 | |
theorbtwo is not-so-much here. | |||
stevan | theorbtwo: before you fade away,.. is there a pugs equivalent to C<perl -I lib/> | 01:09 | |
theorbtwo | PERL6LIB=lib pugs ... | 01:16 | |
stevan | hmm | ||
ok | |||
that should work | |||
thanks :) | 01:17 | ||
ingy | hi stevan | 01:20 | |
stevan | hey ingy | ||
ingy | it is insanely windy here | 01:21 | |
stevan | no rain? | ||
oh wait | |||
you are in Taiwan? | |||
ingy | Seattle | 01:22 | |
stevan | ah,.. no rain? | ||
ingy | not right now | ||
stevan | when are you going to Taiwan? | ||
any regexp people out there? | 02:09 | ||
Alias_ | "regexp people"? | 02:10 | |
stevan | people good at regular expressions | ||
Alias_ | I'll do as a start | ||
stevan | what does this mean \Z(?!\n) | 02:11 | |
I read it as: | |||
match the end of a string which is not followed by a newline | |||
is that right? | |||
Alias_ | yes | ||
Although it seems a little nonsensical | |||
stevan | yeah it does | ||
its from File::Spec :) | 02:12 | ||
Alias_ | then it's probably "smarter than you" | ||
:) | |||
stevan | ? | ||
Alias_ | It might mean something in a multistring context | ||
as in not //s | |||
"The end (in multi mode), but not because we hit a newline | 02:13 | ||
stevan | this is the whole one | ||
!/^\.{1,2}\Z(?!\n)/s | |||
Alias_ | unusual.. | ||
It's just a "ignore the . and .. files" | 02:14 | ||
stevan | yeah from no_upwards | ||
I am thinking of refactoring it into a junction | |||
Alias_ | I think it's a very-safe format... | ||
stevan | $file ne ('.' & '..') | ||
Alias_ | that would probably be fine | ||
stevan | cool | ||
Alias_ | assuming it isn't slower | ||
stevan | we shall see | 02:15 | |
:) | |||
Junctions are actually a very cool feature | 02:16 | ||
Alias_ | I'll be much happier when someone demonstrates auto-multi-threading is viable | 02:17 | |
stevan | I agree, but they are still a nice feature | ||
Alias_ | I was relatively anti-perl6 until Damian mentioned that junctions will be parralelisable | ||
It's possibly the first thing in Perl6 that is truly shiny | |||
stevan | things like ($file ne '' && $dir ne '') into ('' ne ($file & $dir)) | 02:18 | |
Alias_ | purl, cpan scoreboard | 02:21 | |
ack | |||
chip | \z is the real EOS. \Z may match before a newline. So \Z(?!\n) is a synonym for \z | ||
stevan | chip, one more question if you have a second | 02:27 | |
chip | sure | ||
stevan | would this regexp !/^\.{1,2}\Z(?!\n)/s | ||
chip | that's equivalent to $_ ne '.' && $_ ne '..' | ||
stevan | yes | ||
thanks | |||
so refactoring it into a junction would work then | 02:28 | ||
Alias_ | yes | ||
stevan | excellent, 2 'yes's is all I need :) | ||
chip | $_ ne ('.'&'..') ? | ||
stevan | @filenames.grep:{ $_ ne ('.' & '..') } | 02:29 | |
Alias_ | steven | ||
stevan | Alias_ | ||
Alias_ | steven: You can junction that too... | ||
if ( any( @filesnames ) eq ('.' & '..') ) { | 02:30 | ||
stevan | Alias_: very cool | ||
Alias_ | actually... | ||
ingy | stevan: in 32 hours | ||
Alias_ | I wonder if lists have an .any method that creates a junction for them | ||
if ( @list.any eq (' | 02:31 | ||
etc. | |||
stevan | Alias_: however that doesnt return the ones which didnt match | ||
ingy: cool | |||
Alias_ | do you care? | ||
stevan | Alias_: yes, that is what the function does | ||
Alias_ | oh | ||
stevan | File::Spec::no_upwards | ||
it removed the . and .. | |||
Alias_ | So it's a filter and not a test... right | ||
stevan | yes | ||
Alias_ | then grep is indeed what you want | 02:32 | |
stevan | but that junction would work | ||
although I dont think that lists have .any, .all, etc | |||
at least I have not seen it in my Synopsis reading | |||
jabbot | pugs - 970 - begun a perl6 File::Spec hack, it is slo | 02:47 | |
ayrnieu | Perl6 will still have HERE docs, yes? | 02:57 | |
Alias_ | yes, but better | 03:01 | |
tabbing ignored, from memory | |||
so you can indent them properly | |||
ayrnieu | yay! | 03:03 | |
ingy | which is problematic with tabs | 03:06 | |
jabbot | pugs - 971 - Split Kwid test data from test code. | 03:07 | |
ingy | unless tabs are preconverted to 8 byte boundaries, which is also slightly problematic | ||
because what if some of the leading tabs are content and some are indentation | 03:08 | ||
bd_ | IIRC, it senses the indentation of the ending delimiter and strips that off the preceding lines | ||
ingy | bd_: which is about the worst way to do it | 03:09 | |
because that makes it very fragile and hard to debug | |||
I think it would need to be smarter heuristic than that | 03:10 | ||
bd_ | like what? | ||
ingy | I've dealt with this heavily in the YAML spec | ||
which is similar | |||
well you need to detect the end marker, and then expand the tabs in the indentation and then expand just enough tabs in the body lines and then strip off that many spaces from each | 03:12 | ||
and then what do you do if one of the lines is less indented | 03:13 | ||
warn, error, or look for another less indented end marker | |||
? | 03:14 | ||
bd_ | There's also the problem of inconsistent usage of spaces and tabs, and differing tab width settings | ||
ingy | bd_: that's what I'm talking about | ||
bd_ | presumably if it doesn't find enough indentation it should either warn and treat it as an empty line or error | ||
looking for another end marker would be confusing | |||
ingy | tabs need to be always considered 8byte expanding | ||
and a lot of M$ tools default to 4 | 03:15 | ||
so there is really no win here | |||
bd_ | warn if tabs are used at all? :) | ||
ingy | YAML wins by outlawing tabs altogether | ||
bd_: that is by far the best choice | |||
YAML wins by outlawing tabs altogether (for indentation) | 03:16 | ||
tabs are truly evil in this regard | |||
I spent 3 months discussing these issues | |||
I would simply not allow tabs for indented heredocs | 03:17 | ||
but many will cry foul | |||
oh well | |||
bd_ | maybe warn unless a use tabs width => 8; or similar is present? | ||
ingy | damian uses more tabs than the devil herself | ||
bd_ | additionally, if the heredoc always uses tabs consistently, there's no need to warn | 03:18 | |
it's only if it mixes tabs and spaces in the prefix it needs to warn | |||
ingy | yep | ||
jabbot | pugs - 972 - A failing test for lists | 03:47 | |
autrijus | stevan++ | 03:50 | |
nothingmuch++ | |||
ingy++ | |||
gaal++ | 03:51 | ||
ingy | :P | 03:52 | |
autrijus | more than a dozen commits whilst I was asleep :) | ||
28 more to go till r1000 | 03:53 | ||
ingy | pushing for 1000 | ||
jinx | |||
autrijus | jinx | ||
ingy | autrijus: it's harder now that MANIFEST isn't in there ;) | ||
MANIFEST was probably 10% of checkins :D | 03:54 | ||
autrijus | actually less than 50 | 03:56 | |
so 5% is more like it | |||
(but if you count the checkins that contains MANIFEST with other real changes too, then it's 92) | 03:57 | ||
lucs | Does 'perl6doc' or 'pugsdoc' exist yet? | 05:23 | |
ayrnieu | lucs - no, but see 'perldoc Perl6::Pugs' in the latest release. | 05:27 | |
s/no/NAFAIK/ | |||
lucs | , thanks. | ||
Er, OK, thanks. | |||
ayrnieu: Er, what am I supposed to see in Perl6::Pugs related to the doc format? | 05:30 | ||
mugwump | I'm sitting in the POD café, working on that right now in fact :) | 05:31 | |
ayrnieu | ... that I didn't realise that you wanted to know about a perldoc for kwid. | ||
lucs | Ah :) | ||
cafAc? | 05:32 | ||
mugwump | cafe, encoding problems I guess | ||
lucs | Oh, makes sense. | ||
revdiablo | I remember seeing someone in here paste the url to a list of perl6 operators generated by a script a week or so ago. anyone know what I'm talking about? | 05:33 | |
mugwump | the periodic table of perl 6 operators, perhaps? that was a lot older though | 05:34 | |
revdiablo | no, it was an HTML table | ||
it's driving me crazy, because I remember looking at it, but not much else about it. :-/ | 05:35 | ||
lucs | revdiablo: I remember that too. Maybe you can check the channel logs? | ||
(See topic) | |||
revdiablo | I looked through the logs... couldn't think of what to search for | ||
found it: desert-island.dynodns.net/perl/prims.html | 05:39 | ||
06:06
hoowa2 is now known as hoowa
|
|||
nothingmuch | work & | 06:23 | |
dvergin | 'Nite all. See you again soon. | 06:34 | |
nothingmuch | morning | 06:54 | |
lightstep | so partialApply or curry? | 08:59 | |
nothingmuch | ... continued discussion in public chat, so it'd be logged | ||
about the implementation of currying | |||
curry's [VAL] | |||
lightstep | it's the partial parameter list | ||
but the return value should be a Val, not a VSub | 09:00 | ||
so it'd be a thunk | |||
nothingmuch | where does the parameter list get into doApply? brb, going to read this a second | ||
because doApply already has it's args split up | 09:01 | ||
to invocants and args | |||
line 449 of Eval.hs | |||
lightstep | i think we should use apply, not doApply | 09:03 | |
nothingmuch | sorry, keep getting distracted | 09:04 | |
let [subExp, Syn "invs" invs, Syn "args" args] = exp | |||
how does this know to split it up? | |||
lightstep | magically | ||
it sees that the list is of length 2, and that the 2nd and 3rd elements have the required form, and vinds | 09:05 | ||
nothingmuch | hah | ||
lightstep | if exp isn't perfect, the program crashes | ||
i don't know how to create a "wildcard" sub, that would catch everything | |||
nothingmuch | ok, i think we don't want that anyway | 09:06 | |
because that would make curries of curries unverified | |||
at .assuming time | |||
i think we construct a new VSub whose params are those that have not yet been bound | |||
lightstep | oh | ||
nothingmuch | that way implementation is more, err, "correct" | 09:07 | |
i think | |||
perhaps more work, but i'm not sure if harder | |||
lightstep | yeah | ||
we'lll take out those the sindSomeParams took? | |||
nothingmuch | uhuh | ||
i think we might want to make the state a bit smarter | |||
make it a pair | |||
([ <binding> ], [remaining]]) | 09:08 | ||
wow, i'm so consistent ;-) | |||
lightstep | it doesn't have to | ||
nothingmuch | ([(Param, Exp)],[Param]) | ||
im an oop head, so that seems simple to me =) | |||
lightstep | we can make pugs ineffcient but working, without touching bindSomeParams | ||
nothingmuch | i think that it doesn' | 09:09 | |
lightstep | filtering them out ourselves | ||
nothingmuch | t really matter | ||
bindSomeParams is very sterile | |||
it's new, and it's not used yet | |||
ca. svn up an hour ago | |||
lightstep | ok | 09:10 | |
nothingmuch | so i think it's better we get it right | ||
because we can't be cheapish either, with takeWhile etc | |||
the process needs to be more like a merge sort, since optional params may be litterred in there | |||
one minute, test run at work needs prodding | 09:11 | ||
lightstep | lists are not a good data structure for this | ||
nothingmuch | actually, why not? | 09:13 | |
they are parted in O(N) time | |||
lightstep | yes | ||
Control.Monad.Writer seems cool | 09:14 | ||
but i din't know if it would be the mose useful here | |||
nothingmuch | it looks scary for me | 09:15 | |
i think O(N) shouldn't worry us now | |||
but now anything but slurpy should be OK | |||
since lists are lists | |||
in the past passing sub(@biglist) would have been heavy in this case | |||
perhaps the bindThing functions should be made more closed boxy | |||
and they take a Binding type, whatever that is | 09:16 | ||
and create the bindings themselves | |||
but i think this optimisation is a bit big for now ;-) | |||
so anyway =) | |||
lightstep | since bindArray and bindHash don't return the non-bound parameters, i don't see how bindSomeParams can do it prettily | 09:17 | |
btw, x <- return y is the same as let x = y | 09:18 | ||
nothingmuch | i think for now we just shove a filter into bindSomeParams | 09:21 | |
and take care of it later | |||
lightstep | brb | ||
nothingmuch | but we shove the complexity down one layer | ||
arguably a good thing, since it is not our concern | |||
elmex | hi | 09:22 | |
nothingmuch | hi! | ||
lambdaheads: are there any set operations in haskell, somewhere, like prelude? | 09:24 | ||
i'd like to intersect two lists | |||
malaire | have you checked Data.List ? | 09:26 | |
there's also Data.Set (in GHC 6.4 at least) | 09:27 | ||
nothingmuch | i'll look at those | 09:28 | |
malaire | there is Data.Set.intersection, and Data.Set.fromList to create Sets from lists | 09:29 | |
nothingmuch | yeah, it looks good | 09:30 | |
malaire++ | |||
malaire | toList $ intersection (fromList [1,2,3]) (fromList [2,3,4]) -- and finally toList to get list back | 09:32 | |
lightstep | ack | ||
also List.intersect | |||
nothingmuch | Data.List intersect seems good | 09:33 | |
let binding = concat [prebound, boundInv, boundNamed, boundReq, boundOpt, boundHash, boundArray, boundScalar] | |||
let remaining = (map fst inding) `intersect` params | |||
does that look sane? | |||
return $ (binding, remaining) | |||
s/inding/binding/; | 09:34 | ||
malaire | Haskell has far too many libraries... - One needs to learn quite many of them to use Haskell efficiently (Quite like Java :) | ||
lightstep | no sane | 09:35 | |
you want map fst binding \\ params | |||
nothingmuch | malaire: it's nicer than having a set of square wheels which you wrote yourself, handy for every situation ;-) | ||
lightstep | difference, not intersection | ||
err, the other way around | |||
params \\ map fst binding | |||
nothingmuch | oh, right | 09:36 | |
what we already have is the intersection | |||
*blush* | |||
lightstep | so SubRoutine or SubBlock? | 09:37 | |
nothingmuch | the curried return? | ||
i think it's a subRoutine | |||
lightstep | and the name? "<anon>"? "oldSubName-curried"? | 09:38 | |
nothingmuch | anon | ||
you can have a bajillion curries of curries of the same sub | 09:39 | ||
or maybe oldSubName, period | |||
lightstep | ick, multisubs | 09:40 | |
nothingmuch | indeed ick | ||
i don't think we want to deal with type disambiguation yet | |||
lightstep | howcome they have a parameter list? | ||
nothingmuch | what do you mean? | 09:41 | |
lightstep | do all have the same number of parameters? | ||
nothingmuch | all multisub? | ||
s | |||
they have several invocants, and n parameters | |||
lightstep | do all multisubs with the same name have the same number of parameters and the same return context? | ||
nothingmuch | no | ||
all multisubs have a distinct signature | 09:42 | ||
which is arguably the name | |||
lightstep | so Sub is not good | ||
nothingmuch | and is the parameters, the invocants (with type constraints), the parameters, and the return context | ||
isn't Sub capable of that? | |||
or do you mean not good in the 'is wrong' sense, instead of the 'won't work here' sense | 09:43 | ||
lightstep | or do we have separate Sub objects for the different subs in a multisub? | ||
nothingmuch | i have no clue | ||
lightstep | perlbot: nopaste | 09:44 | |
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "lightstep" at 212.235.51.245 pasted "some code to facilitate the discussion" (12 lines, 288B) at sial.org/pbot/8432 | ||
nothingmuch | i think it would look like, err | 09:45 | |
copying isMulti, and copying subAssoc, and subReturns | |||
etc etc | 09:46 | ||
maybe even subName | |||
lightstep | ok, cool | ||
nothingmuch | override only subType, perhaps, i don't know what it means, but that's where we're sticking things into, right? | ||
and override subParams with the snd (bindSomeParams ....) | |||
pasteling | "lightstep" at 212.235.51.245 pasted "some code to facilitate the discussion" (7 lines, 153B) at sial.org/pbot/8433 | ||
nothingmuch | and make it's subFun a (\x -> bindSomeParams ... ) | 09:47 | |
with the original params and the partial binding | |||
lightstep | oh, yes, i forgot the subFun | ||
nothingmuch | isn't it supposed to return a Val? | ||
which is actually, err, just VSub in another type? | 09:48 | ||
lightstep | i thought about it | ||
and i was mistaken: we create a new sub from an old sub, in a pure operation | |||
nothingmuch | i'd like an explanation of each one's pro/con, i don't think i understand them yet | 09:49 | |
lightstep | the thunk is in subFun, not the result of currySub | ||
nothingmuch | what is a thunk? | ||
lightstep | we get a sub | ||
a thunk is a value that holds a computation to be run later | |||
(the computation is only thunk when creating the value, not performed) | 09:50 | ||
nothingmuch | ah | ||
a sort of self-evaluating expr? | |||
ah | |||
hehe | |||
lightstep | almost. more like an expr-containing value | ||
nothingmuch | this is to facilitate the concept of imperative execution in a lazy language? | ||
lightstep | yes | 09:51 | |
nothingmuch | ok, | ||
so why is our currying not a sub? | |||
lightstep | and also useful for p6 infinite lists | ||
nothingmuch | thunk | ||
lightstep | the result of currySub is a regular sub. being a sub delays computation by itself (like \x -> sib 6 + 8) delays the computation | 09:52 | |
nothingmuch | so if we make it a thunk it will delay the ... | ||
no op that would be returning the sub? | |||
lightstep | returning a thunk will cause the delay of the (pure) creation of the Sub object | 09:53 | |
yes | |||
nothingmuch | ok | ||
lightstep | VThunk (MkThunk (return x)) == x | ||
nothingmuch | what exactly is subType? | 09:55 | |
lightstep | SubBlock or SubRoutine (also 2 more, in AST.hs) | ||
nothingmuch | what's the difference in meaning? | 09:56 | |
lightstep | dunno yet | ||
nothingmuch | bbiab | ||
food for thought: | 09:57 | ||
doApply :: Env -> VSub -> [Exp] -> [Exp] -> Eval Val | |||
apply :: VSub -> [Exp] -> [Exp] -> Eval Val | |||
how do these types related to currySub? | |||
obviously env is delayed | |||
but invs, and args should be split up | |||
*poof* | |||
ok, back | 10:04 | ||
lightstep | so how is the splitting done? | 10:05 | |
nothingmuch | i have no clue | ||
but it's done somewhere in reduce | |||
line 449 of Eval.hs | 10:06 | ||
i have a speculation | |||
that they are already split before that line | |||
brb, someone needs help compiling | 10:07 | ||
lightstep | Parser.hs must be it. it's the one that creates Exps | ||
processFormaps, line 714 of Parser.hs | 10:09 | ||
pasteling | "lightstep" at 212.235.51.245 pasted "another version" (39 lines, 1.5K) at sial.org/pbot/8434 | 10:25 | |
nothingmuch | by haking doApply, you mean breaking it to two pieces? | 10:30 | |
i'll do that if you want | |||
damn, brb agian | |||
lightstep | yes | 10:33 | |
but in the paste, there is already the change to doApply | |||
except my signature of doApplyBinding is broken (it should be [(Param, Exp)] -> Env -> VSub -> Eval Val | 10:34 | ||
and probably there's an unuse parameter there too | |||
but currySub needs the new, improved, futuristic bindSomeParams | 10:35 | ||
in addition to a name change | |||
and splitParams should be done too, ut this is a change in Parse.hs | 10:38 | ||
Parser.hs, rather | |||
nothingmuch | ug | 10:41 | |
i have the new improved bindSomeParams implementeds | |||
what is splitParams? | |||
the invs<->args partition? | |||
lightstep | yes | 10:44 | |
it's really funny, Parser.hs works with 2-element lists instead of pair | |||
bad, bad autrijus | |||
so you'll commint, and i'll do the Parser.hs change? | 10:47 | ||
nothingmuch | i think | 10:50 | |
i've just become busy | |||
the story: | |||
so i'll do it when i'm done | |||
our OSF box died several months ago | |||
now i have to port all the changes to the product from the last 3 months | |||
and I just hit a big change | |||
lightstep | ok | ||
should all the test pass? | 11:01 | ||
elmex | yaho | 11:47 | |
elmex dances a little bit | |||
jabbot | pugs - 975 - r1424@speights: samv | 2005-03-21 22:4 | 11:49 | |
pugs - 974 - * Refresh AUTHORS and META.yml; bump ver | |||
pugs - 973 - * Module::Install now groks vstrings, so | |||
elmex begins to cry and hit his head agains the table | |||
jabbot++ | 11:50 | ||
nothingmuch | you seem err, a bit, bipolar | ||
elmex? | |||
elmex | !? | ||
i love pugs | 11:51 | ||
i wonder when the string semantics will be discussed and finished | 11:56 | ||
jabbot | pugs - 976 - fix 2-element lists to pairs | 12:09 | |
nothingmuch | lightstep: i'm having some issues | 12:10 | |
perlbot nopaste | 12:11 | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "nothingmuch" at 212.143.92.226 pasted "currySub" (63 lines, 2.7K) at sial.org/pbot/8437 | ||
nothingmuch | this is as far as I got | ||
binding' <- verifyBindings was done | |||
but it needs to use the params of the original underlying sub | |||
that is, perhaps we need a curriedSub value type, that contains the subParams of the bottomest one | 12:12 | ||
alternatively, we can do, as you proposed, the list difference at the curry level | |||
always keep the subParams list as the original | |||
and then bindSomeParams binding (params // (map fst binding)) | 12:13 | ||
in the closure itself | |||
as for splitParams params - i don't know what it does | |||
i think it's not our responsibility | |||
we should delegate to whoever does it for apply | 12:14 | ||
lightstep | yeah | 12:15 | |
i don't think we need a curried sub type | |||
after all, it's indistinguishable from a block | |||
nothingmuch | ok, so i'm moving the param difference into the curry apply | ||
lightstep | the distinguishing is based on "appearence" | 12:17 | |
the line 711 in Parser.hs | |||
there, it parses a list of lists of names | |||
like a1, a2, a3 : b1, b2, b3 : c1, c2, c3 | 12:18 | ||
processFormals ensures there are only 2 | 12:19 | ||
nothingmuch | that's for separating invs from args, yes? | ||
lightstep | yes | 12:20 | |
nothingmuch | btw, why not currySub :: VSub -> [Exp] -> [Exp] -> MaybeError VSub, but [Val] -> [Val]? | 12:22 | |
shyte | |||
when currying curried subs we need access either to the already bound list | 12:23 | ||
theorbtwo | Mornin, all. | ||
nothingmuch | or to the remaining params | ||
hola theorbtwo | |||
currySub sub invs args = do | |||
binding <- bindSomeParams [] (subParams sub) (map Val invs) (map Val args) | |||
lightstep | nothingmuch, not really | ||
nothingmuch | this needs to keep binding on top of the partial binding | ||
if wrapping a wrapped sub | |||
if currying a curried sub | 12:24 | ||
because there's the default value issue | |||
lightstep | you don't care how the sub you're currying was constructed | ||
you only need its signature | |||
doesn't bindSomeParams handle default values? | 12:26 | ||
nothingmuch | err, wait | 12:27 | |
i mean things like foo($x, +$y = $x) | |||
this becomes very tricky | |||
lightstep | why? | ||
jabbot | lightstep: why is the make command 'ghc --make -o pugs src/Main.hs pcre.o' | ||
nothingmuch | tricksy nasssty larry | ||
lightstep: err | 12:28 | ||
lightstep | jabbot: forget why | ||
jabbot | lightstep: ok | ||
nothingmuch | lightstep: /ignore jabbot | ||
=) | |||
lightstep | i though that calling bindSomeParams with few exprs, then with some more, then some more, etc, is equivalent to calling it with the concatenated list | 12:29 | |
in which case, the doubly-curried sub can be calledwith the first assumed arg list, then the second, then the real one that the user specified | 12:32 | ||
nothingmuch | err, i'mnot sure | 12:36 | |
let me think about it a while | |||
nothingmuch is hating work today | 12:41 | ||
lightstep: can you figure out where ($x, +$y = $x) is done? | 12:48 | ||
lightstep | can you clarify? | 12:50 | |
is it a parameter list? | |||
nothingmuch | yes | ||
sub foo ($x, +$y = $x) | |||
means that $x is mandatory | 12:51 | ||
and $y is optional | |||
and it's default value is $x | |||
autrijus | yo! | ||
I just experimented with unoptimized and optimized compiler backends | |||
nothingmuch | autrijus, you can answer this | ||
autrijus | with mandel.p6 | ||
nothingmuch | sounds interesting | 12:52 | |
lightstep | ruleSubParam (Parser.hs, line 193) calls ruleFormalParam, in which `+' is parsed | ||
is mandel.p6 fast? | |||
nothingmuch | i don't mean the parsing, i mean the binding | ||
autrijus | Eval.hs line 677 | 12:53 | |
Parens exp -> local fixEnv $ enterLex pad $ expToVal prm exp | |||
that does the defaulting. | |||
ok. some numbers (identical output) | |||
[not|autrijus]~/work/pugs/out$ time ./interpreted.out | |||
69.928u 0.233s 1:17.29 90.7% 2370+477k 0+0io 0pf+0w | |||
[not|autrijus]~/work/pugs/out$ time ./unoptimized.out | |||
0.685u 0.007s 0:01.35 50.3% 2392+476k 0+0io 0pf+0w | |||
[not|autrijus]~/work/pugs/out$ time ./optimized.out | |||
0.170u 0.008s 0:00.39 43.5% 2339+455k 0+0io 0pf+0w | |||
nothingmuch | ah | ||
so that's done by apply, and we don't care | |||
autrijus | yup. | 12:54 | |
I'm pretty psyched by the numbers. | |||
nothingmuch | lightstep++ # was right | ||
my god | |||
lightstep | autrijus++ | ||
lumi | Hi | 12:55 | |
nothingmuch | hola lumi | ||
lumi | And wow | ||
nothingmuch | this is the haskell backend? | ||
autrijus | yes. | ||
I can't do parrot backend without help. | 12:56 | ||
nothingmuch | could you explain how it stores the AST? | ||
autrijus | and it's all still in the Eval monad. | ||
nothingmuch | lightstep: why env <- get in the currySub's returned closure? | 12:57 | |
autrijus | (meaning, could be faster) | ||
nothingmuch | how does this compare to p5? | ||
autrijus | anyone want to do mandel.p5? | 12:58 | |
ozone | autrijus: pwhoar | ||
autrijus | nvm I'll do it | ||
ozone | autrijus: you're outputting haskell, and compiling with GHC? | ||
masak | what do the numbers mean? | ||
something unoptimized is 1000x faster than something interpreted | |||
autrijus | ozone: yeah | 12:59 | |
masak | but what? | ||
jabbot | masak: but what is replacing it is really just Pod ;) | ||
lightstep | nothingmuch, 'caue doApplyBinding has an Env as a parameter. we can't call apply which'll do it for us, since is always applies everything | ||
nothingmuch | masak: pugscc outputs | ||
autrijus | [not|autrijus]~/work/pugs/examples$ time perl p5 | ||
0.061u 0.000s 0:00.14 42.8% 9+362k 0+0io 0pf+0w | |||
nothingmuch | ah, ok | ||
autrijus | so, 3x slower than p5. | ||
lightstep | nothingmuch, i thought that this was the best point to break the sequence (since apply and doApply are already used) | ||
autrijus | (but that's because we're still in the slowish Eval monad) | ||
ozone | autrijus: are you using any GHC exts, like unboxed ints etc? | 13:00 | |
autrijus | (and still using Val) | ||
ozone: no, not at all, and all the vals are still dynamically casted | |||
ozone | that's mighty impressive, even though it's sort of expected :) | ||
autrijus | i.e. no type annotations | ||
nothingmuch | that's pretty good | ||
autrijus | autrijus.org/mandel.ast | ||
ozone | autrijus: sheesh | 13:01 | |
autrijus: you might have a very good parrot vs ghc fight on your hands later :) | |||
autrijus | heh heh :) | ||
I'm not really using primitive haskell :) | |||
I'm still using the "op2" etc in Prim.hs | |||
which means the semantics are guaranteed to be right | 13:02 | ||
but also means it's slow. | |||
also newsym generation needs work | |||
can't just replace sigils with _ | |||
ozone | autrijus: right | 13:03 | |
if you want speed, talk to dons | |||
he'll be very happy to help | |||
autrijus | ok. | ||
ozone | he's done far too much evil stuff in GHC with unboxed types and unsafeCoerce# | ||
autrijus | but considering this is a two-hour hack or so | ||
I'm pretty happy already | |||
ozone | autrijus: very impressive | 13:04 | |
then again, it is in haskell i suppose :) | 13:05 | ||
(not to take away any credit from you; you know what i mean) | |||
autrijus | yup :) | ||
autrijus hugs [| |] | 13:06 | ||
ozone | what are you using QQs for? | ||
autrijus | TH is really da bomb. | ||
uh, code generation. | |||
ozone | ah! | ||
autrijus | haskell code generation. | ||
ozone | ah ah | ||
of course | |||
autrijus | of course! | ||
ozone | it all makes sense now | ||
autrijus | compile (Val (VRat v)) = [| VRat $v |] | ||
autrijus grins | |||
ozone | autrijus: you really should submit a paper to haskell workshop | ||
if they don't accept it, i'll beat them personally | 13:07 | ||
autrijus | ok. I will learn how to write ACM format papers :) | ||
lightstep | to TMR | 13:08 | |
ozone | autrijus: eh, if you can write a perl 6 compiler, you can write an ACM format paper ;) | ||
autrijus | those require different capabilities :) | 13:09 | |
but this is not really a perl 6 compiler. it's more of a static perl 6 compiler. | |||
we don't do BEGIN{} or parser reshaping yet. | |||
that will be terribly difficult. | |||
would need more caffeine. | |||
ozone suspects autrijus is dons's long lost twin | |||
autrijus | heh heh :) | 13:10 | |
autrijus reads backlogs | 13:12 | ||
nothingmuch | bah | 13:14 | |
shapr | I feel a disturbance in the force... | 13:15 | |
what happened? | |||
nothingmuch | hello shapr | ||
i think i have a solution | |||
shapr | hiya nothingmuch | ||
nothingmuch | pugscc haskell output is nearly as fast as p5 | ||
when optimized | |||
shapr | I have a problem, you have a solution, let's have lunch! | ||
nothingmuch | i have a solution to many of my own problems ;-) | ||
err, that didn't come out right | 13:16 | ||
i have one solution, many problems | |||
anyway, lightstep, autrijus | |||
lightstep | yep? | ||
nothingmuch | currySub returns a sub { subType = subCurried, subFun = Curry fun | ||
applyExp bound (Curry f) = f bound | 13:17 | ||
then we don't have to resplit bound params | |||
it becomes a simple iteration | |||
now, even funnier is to do it at apply on a curried sub | 13:18 | ||
lightstep | but then you lose all parameter-checking | ||
nothingmuch | and let there be curry folding without creating new pads | ||
no i don't | |||
f bound does that | |||
and eventually it calls doApply with the real sub | |||
and just before it calls verifyBindings | |||
i'll try to draft this up | 13:19 | ||
lightstep | bbiab | ||
nothingmuch | how do i do type matching on a sub's subType at the function level? | 13:20 | |
ciao | |||
anyone? | 13:22 | ||
shapr | alexe: are you really irc'ing as root? | 13:23 | |
alexe | ? | 13:25 | |
autrijus | 21:22 -!- alexe [~root@221.0.31.74] has joined #perl6 | ||
shapr | It's safer to irc as a plain old user. | 13:26 | |
alexe | thanks | ||
but which irc client has security problem? | 13:27 | ||
nothingmuch | alexe: it's conceivable, and even more probable | 13:28 | |
since people won't bother securing IRC clients as much as servers | |||
Limbic_Region | autrijus - www.perlmonks.org/index.pl?node_id=441199 # just a press release from me on your press release | 13:32 | |
autrijus | thank you. | 13:33 | |
stevan | morning all | ||
nothingmuch | hola stevan | ||
stevan | hey nadda-mucho | ||
autrijus | stevan: check out the numbers! :) | 13:34 | |
stevan | the speed? | ||
I just saw that | |||
stevan reads the backlogs with coffee every morning :) | |||
autrijus | =) | ||
stevan | very very very vool | ||
autrijus++ # as if you need any more :P | |||
gaal | i get a 25% speed improvement on 'make test' after 'make optimized'. | 13:35 | |
autrijus | that actually means pugs is ok for production use, speed-wise, for my clients :) | ||
shapr | w00 | ||
shapr waves the lambda and camel pom-poms | |||
nothingmuch ponders a camel posing as a lambda as the p6 logo | |||
castaway lurks | |||
theorbtwo | Allo, love. | ||
stevan | autrijus: all I need now is mod_pugs and I will be happy to use it in prod too :) | 13:36 | |
nothingmuch | it could put it's head in a funny way | ||
shapr shapes | |||
castaway hugs theorbtwo. | |||
Just wondering where you're active :) | |||
autrijus | stevan: there is a mod_haskell :) | ||
so... there ya go :) | |||
stevan | autrijus: yummy | ||
theorbtwo | Head looking up, leaning on it's front legs, with rear legs placed inline with the body. | ||
...would look like a lambda with a hump. | 13:37 | ||
theorbtwo is active nowhere at present. | |||
shapr | theorbtwo: can you sketch that? | ||
oh, I think I get it. | |||
nothingmuch | theorbtwo: uhuh, sort of | ||
theorbtwo | Think of a human leaning on their arms and stretching their back, then translate. | ||
nothingmuch | or nicer | ||
shapr | yeah, I think I got it now. | ||
Not sure I can draw it though. | 13:38 | ||
theorbtwo can't draw. | |||
shapr | I've always been able to draw, dunno why. I've always been able to sing too. Programming has always been hard for me, that's why it's more fun. | ||
stevan | autrijus: I started working on oo tests *hint* *hint* | 13:39 | |
jabbot | pugs - 978 - * convert more things from Prim to from | ||
pugs - 977 - goto tests parsefail again | |||
castaway | different brain, shapr | ||
autrijus | stevan: sure :) | ||
theorbtwo | Oh, whoever was looking at the prims.html on d-i, it's produced with utils/grokprims.pl | ||
shapr | castaway: yeah, probably has something to do with the ritalin prescription as well :-) | 13:40 | |
Programming is the best of everything, it's like executable poetry. | |||
stevan | autrijus: I am also talking/working with Darren Duncan to write more | ||
autrijus | eggcelent! | 13:41 | |
on 23th mugwump and ingy will arrive | |||
shapr | Programming is the magic executable fridge poetry, it is machines made of thought, fueled by ideas. | ||
stevan | my plan is to have a fully loaded OO test suite before you even begin work on that part | ||
autrijus | and we'll work on pugs object metamodel :) | ||
shapr | Or maybe made of ideas, fueled by thought? whatever... fueled by hard work, which I should start doing now. | 13:42 | |
kungfuftr | mugwump's going to tapei... yeah? | ||
hcchien | yes | ||
autrijus | yup | 13:43 | |
kungfuftr | ah, give him a nice big slap from me... the goit | ||
stevan | autrijus: on a totally different note, I have found an issue while port/hacking the FileSpec stuff | 13:44 | |
pugs -e 'sub foo (*@f) { return pop(@f) }; say foo(1, 2, 3);' | |||
gives me this error: Fail: cannot modify a constant item: VArray (MkArray [VInt 1,VInt 2,VInt 3]) | |||
autrijus | yup | ||
I really need to get IType done. | |||
stevan | ok | 13:45 | |
also, should I un-TODO the tests again? | |||
I have some time to kill before $work actually starts | |||
autrijus | yup, please do so | ||
stevan | ok | ||
autrijus | and audit todo_s that you feel are 1)wrong 2)important a bit | ||
stevan | ok | 13:46 | |
lightstep | wtf? SubType's order really matters? | 13:47 | |
does it mean anything? | |||
autrijus | lightstep: well, yeah | 13:48 | |
lightstep | "more named"? | ||
autrijus | there's bares, pointys, subs | ||
and each has different semantics | |||
the first two doesn't even havescope | |||
13:54
boch\off is now known as boch
|
|||
nothingmuch | perlbot nopaste | 13:58 | |
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
lightstep | yay, code from nothingmuch! | ||
pasteling | "nothingmuch" at 212.143.92.226 pasted "hypothetical curry unwrapping" (67 lines, 2.8K) at sial.org/pbot/8439 | ||
nothingmuch | is doApplyBindings sane? | 13:59 | |
stevan | autrijus: since I am going through each test anyway I am building you a nice TODO list as well | ||
autrijus | danke! | ||
stevan | yah wilkommen | 14:00 | |
nothingmuch | i'm concerned about this: | subType = SubCurried = (subFun sub) env bindings | ||
autrijus | er | ||
| subType == SubCurried | |||
my typo. sorry. | |||
nothingmuch | ok | ||
autrijus | otherwise sane. | ||
nothingmuch tries to compile | 14:01 | ||
lightstep | it looks like a type error: fun has 2 params and should have only one | 14:04 | |
nothingmuch | where do i defines subCurried? | ||
lightstep | but perhaps the definition of Exp is not cached right in my head | ||
nothingmuch | errm | ||
so how do i get env <- ask to happen at the right time? | |||
autrijus | line 381 ASt.hs | ||
lightstep | line 381 in AST.hs | ||
autrijus | is how you define subcurried | ||
er. | |||
brb :) | |||
lightstep | i'm always the second | ||
nothingmuch | well, i've got to go | 14:07 | |
i'll try to make progress at home | |||
actually, why is env <- ask done out of doApply? | |||
shouldn't our new doApplyBindings take care of it? | |||
lightstep | it should | 14:08 | |
but as it goes, doApply is called by itself in some smelly, complicated piece of code | |||
and doApply and doApplyBinding have almost the same code | 14:09 | ||
nothingmuch | so how do i pass env through the curry closures? | ||
lightstep | so it made sense to split like that | ||
you can extract the env before creating the new sub, and enclose it in fun | |||
nothingmuch | ride is here, ciao! | 14:10 | |
evening | 15:05 | ||
lightstep | hi | 15:06 | |
nothingmuch | compiling is sooo sloooow | 15:16 | |
castaway | get a faster machine! | 15:17 | |
nothingmuch | i'm etherwaking one up just now | ||
masak | good thing at least that computers are becoming faster to accomodate for our increasingly complex programming languages :) | 15:18 | |
castaway | :) | ||
hmm, could set one up that does nothing but compile the thing | 15:19 | ||
masak | all the time? :) | ||
castaway | yup | ||
masak | wouldn't once be enough? | 15:20 | |
castaway | no cos it keeps changing | ||
masak | faster than it can compile? oh my | ||
castaway | loop { grab newest from cvs; compile; save somewhere; redo } | ||
(or some such) | |||
nothingmuch | i had a box at work do that | 15:21 | |
castaway | why past tense? | ||
nothingmuch | while true; do if [ `svn up | wc -l` -gt 1 ]; then perl Makefile.PL && make && make test; fi ; sleep 600; done | 15:22 | |
because it's at wor, | |||
gaal | nm: better throw in a make clean too | ||
nothingmuch | i have to ssh 3 times just to bypass the fw | ||
it's not fun | |||
castaway | I see | ||
nothingmuch | err, make that make optimized | ||
gaal: why make clean? | |||
gaal | paranoia? | ||
PerlJam waits for someone to setup a pugs smoke-testing sever | |||
nothingmuch | heh | ||
PerlJam: i can set a box up, if you like | 15:23 | ||
we are thinking of synching it with the backlink format | |||
i think i'll try to use vimcolors for the output | |||
and color each line red or green as reported by fail or ok | |||
for the most recent rev | |||
gaal | fibonaci.babylonia.flatirons.org/perl6.vim ? | 15:24 | |
ah | |||
nothingmuch | gaal: exactly | ||
gaal | nm: i hope to have time tomorrow for some hacking. is the yaml ouput format still in vogue? | 15:25 | |
nothingmuch | i think so | ||
i can just hook up with Test::Harness::Straps directly for that, methinks | |||
it'll update the index and the test status for each revision | 15:26 | ||
gaal | feel free to beat me to it :) | ||
nothingmuch | ok =) | 15:28 | |
first i want to get currying done | |||
the haskell type system is, err, teaching me itself | |||
read: giving me a hard time | |||
gaal | look on the bright side, you'll find OCaml easy. | 15:30 | |
nothingmuch | hah | 15:32 | |
wooow | |||
the tests pass! | |||
tres cool | 15:33 | ||
autrijus: how do i implement .assuming? | |||
autrijus | just look at "goto" | ||
&goto | |||
in Eval.hs | |||
and go from there | |||
I'll abstract away these two Bloody Hacks | 15:34 | ||
nothingmuch | ok | ||
gaal | um, i broke the goto test again earlier | ||
i mean i didn't break it, but added some tests that parsefail. | |||
nothingmuch | what is subExp? | ||
an Exp that will result in a VSub? | 15:35 | ||
what is shiftT? | 15:36 | ||
lightstep | subExp is the expression that evaluates to the sub | 15:37 | |
(the sub which is gone to) | 15:38 | ||
nothingmuch | in my case the sum that will be assumed | ||
perlbot nopaste | |||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "nothingmuch" at 212.143.91.217 pasted "attempt at .assuming" (5 lines, 171B) at sial.org/pbot/8444 | ||
nothingmuch | sub <- fromVal vsub is causing type errors | 15:39 | |
lightstep | fromVar is a pure function | ||
nothingmuch | oh shit, i mixed tabs & spaces | ||
lightstep | so in a monad, you use it as let sub = fromVal vsub | 15:40 | |
nothingmuch | the goto hack does <- | ||
the first two lines are unchanged | |||
lightstep | but you really want fromVal' | ||
nothingmuch | what's that? | ||
lightstep | oh, i was mistaken | ||
they are the same, except fromVal is better | 15:41 | ||
nothingmuch | what do i do with retVal VSub? | 15:43 | |
do i make a Val out of the VSub? you said no, because it's pointless | |||
so just return VSub? | |||
because reduce :: ... -> Eval Val | 15:44 | ||
lightstep | actually, i wanted currySub to do as least as possible | ||
i didn't want it to bother with casting the VSub into Val, or Exp, or Symbol, or whatever | 15:45 | ||
castV is your friend | |||
nothingmuch | hah, it seems to actually compile | 15:46 | |
ok, now i have to fix stuff | |||
camn | 15:49 | ||
damn | |||
what's wrong with this: data SubFun = Exp | (Env -> [(Param, Exp)] -> Eval Val) | 15:53 | ||
lumi | Don't you need constructors? | 15:59 | |
nothingmuch | oh, right | ||
*blush* | |||
damnit | 16:01 | ||
damnit damnit damnit | 16:02 | ||
i'm just not capable enough | |||
castaway | then learn :) | 16:03 | |
nothingmuch | trying | ||
chip | but are you fully functional? | ||
chip wonders whether that joke is as old on #haskell as it probably is | |||
nothingmuch | =) | ||
autrijus | hi chip! | 16:04 | |
chip: have you seen the pugscc numbers? :) | |||
chip | autrijus: jeepers, no | ||
autrijus | mandelbrot: | ||
Pugs Interpreted: 77.29 seconds 477k memory | 16:05 | ||
PugsCC Unoptimized: 01.35 seconds 476k memory | |||
PugsCC Optimized: 00.39 seconds 455k memory | |||
Perl 5: 00.14 seconds 362k memory | |||
and it's still doubly boxed and with slow op. | |||
nothingmuch | autrijus.... help... me... *cough& | ||
autrijus | ok. ok. | 16:06 | |
chip | Yowie. | ||
"doubly boxed" - Perl 6 box inside Haskell object box? | |||
autrijus | chip: so. got any time for parrot things? I'd like to talk a bit about parrot ast | ||
yeah. | |||
exactly. | |||
slow op means it's using the same op as evaluator | |||
(so, guarantees the same behaviour, but not fast) | 16:07 | ||
nothingmuch: do you want to SEE? | |||
nothingmuch | in theory isn't p6 supposed to "compile" operators even when it's just "interpreting" | ||
chip | Surely I would like to help you, but at the moment I suspect I will be learning from your questions | ||
Please ask away in either case | |||
nothingmuch | that is, dispatch should be precalculated if possible? | ||
autrijus: sure | |||
autrijus | chip: ok. as I gathered, Leo did a bit work on parrot/ast/ | 16:08 | |
but nothing is really using it | |||
what is sam ruby using then? | |||
nothingmuch | autrijus: would you like to ssh into pasta? | ||
that would let you access the code | |||
chip | See, I told you I'd be learning. What's Sam Ruby doing? | ||
autrijus | nothingmuch: but SEE won't? | 16:09 | |
chip: pirate, that's python on parrot | |||
nothingmuch | see will | ||
but it's several files | |||
chip | Ah. | ||
autrijus | sure. | ||
see://woobling.org/? | |||
nothingmuch | yes, one second | 16:10 | |
i have to close all the gvims and open instead | |||
autrijus | chip: anyway. I have this idea of modelling Parrot AST with haskell | ||
because haskell is great for modelling trees | |||
nothingmuch | ok, see is open | ||
autrijus | and then write the parrot ast -> pasm emitter in haskell too | 16:11 | |
then I switch Pugs to use that AST | |||
then port pugs to perl 6. voila | |||
clkao | hiya autrijus | ||
autrijus | hi clkao . | ||
chip | OK, if you're emitting pasm anyway, is a conversion to the Perl 6 AST necessary? What would pugs gain by it? | 16:12 | |
autrijus | the ability to implement macros | ||
because the perl6 src -> perl6 ast -> parrot ast -> pasm picture is Wrong | 16:13 | ||
it assumes that perl6 is a static language | |||
nothingmuch | autrijus: is that you who joined? | ||
autrijus | yes | ||
that view presume that perl that has separate parsing, compiling and runtime | |||
which perl does not. | |||
chip | Ooh, this is true. | ||
autrijus | see BEGIN{} and eval"" and "is parsed". | ||
nothingmuch | anyone else is also free to join, ofcourse | 16:14 | |
chip | Pirate is generating pasm directly | ||
self.append("typeof $S0, %(what)s" % locals()) | |||
#self.append("print $S0") | |||
self.append("unless $S0 == 'PerlUndef' goto %(endCheck)s" % locals()) | |||
autrijus | ok. aww. | ||
that is so not reusable | |||
chip | sadly | ||
nothingmuch | autrijus: basically my problem right now is fitting both the curry unwinder and the Exp that is the sub into subFun | ||
autrijus | my problem here is I don't know any parrot at all. | 16:15 | |
let alone parrot ast. | |||
so I'd like to sync up with someone that does | |||
preferably with IRC or SEE or videoconf | |||
and take a real pugs ast | |||
and try to work with that person on converting it to parrot | |||
nothingmuch | parrot ast is going to be a bit more difficult though, no? | 16:16 | |
since it's register based and all | |||
autrijus | uh no. | ||
ast abstracts that away. | |||
that's the whole point of ast. | |||
chip | Now I see | ||
nothingmuch | ah | ||
so ast is a layer over parrot asm? | 16:17 | ||
autrijus | over parrot pir :) | ||
but yes. | |||
chip | Ever work with gcc? | ||
autrijus | parrot pir is a layer over parrot asm that let you pretent you have infinite registers. | ||
chip: no. :( | |||
chip | the gcc TREE is the source representation, or at least models the source language's concepts. The RTL (register transfer language) models the machine execution, albeit with infinite psedo-registers in the early stages | 16:18 | |
TREE=AST RTL=PIR approx. from the sound of it | |||
autrijus | yes. I grok the theory | ||
chip | ok | ||
autrijus | so is parrot AST going to be very closely based on gcc TREE? | 16:19 | |
chip | I have a bit of a learning motorcycle jump ramp starting at me :-, | ||
jabbot | pugs - 979 - fixed bug where undefined values in $got | ||
autrijus | does parrot has a eval_bytecode? | ||
I see load_bytecode | |||
chip | autrijus: I doubt it. For all my background & interests, I'm just learning many vital basics about Parrot | ||
That was my attempt to verify my understanding | 16:20 | ||
(active listening by analogy) | |||
autrijus | k. | ||
so I think a static compiler | |||
for the mandel.p6 | |||
is a good start. | |||
chip | "static compiler", i.e. no ability to do macros? | 16:21 | |
autrijus | no ability to do BEGIN. | 16:22 | |
and eval"" | |||
please don't think about macros just now | |||
chip | heh | ||
autrijus | so, the thing I have here is a perl6 parser that can parser to some sort of ast | 16:30 | |
and a compile that can transform that ast into some other sort of ast. | |||
is there a pasm madelbrot? | 16:31 | ||
ah yes. ./examples/assembly/mandel.pasm | |||
ouch. | |||
that hurts | |||
jabbot | pugs - 980 - more Test.pm error reporting improvement | 16:49 | |
obra | so. could it parse perl6 and spit out perl5? | 16:51 | |
pretend I didn't ask ;) | 16:52 | ||
autrijus | ok. that is interesting. | 16:53 | |
it means we can write perl6 and have it work with RT ;) | |||
nothingmuch | autrijus: all of Bind.hs is filled with [(Param, Exp)] | 17:11 | |
should i just s/that/Bindings? | |||
autrijus | uh. | 17:12 | |
we actually want Exp | |||
nothingmuch | hah | ||
autrijus | because it's prebound | ||
maybe we can stuff them with thunks. | |||
nothingmuch | so i am replacing that | ||
autrijus | that may work. | ||
so becomes Val. | |||
nothingmuch | and changing type Bindings = [(Param, Exp)] for now | ||
someone smarter will sanity check it | 17:13 | ||
maybe i'll bug lightstep a bit, he knows a lot | |||
stevan | autrijus: I have un-TODO-ed all the tests, and built a TODO list for you | ||
where would you like the TODO list? perl6-compiler? | |||
nothingmuch | too bad ghc doesn't do -jx | 17:14 | |
autrijus | stevan: yes! | ||
stevan | ok | ||
nothingmuch | autrijus: what's this? subs slurpLen subSyms = | 17:17 | |
i don't know which line anymore | |||
i think 596 | |||
oh wait, i don't think it matters | 17:19 | ||
autrijus | it does not. | ||
nothingmuch make test | |||
wow! stuff seems to work! | |||
ok, we have refactored vsub with embedded bindings | |||
who has latest test failure report? | 17:20 | ||
i want to compare | |||
stevan | nothingmuch: wait a second | ||
i am commiting all the un-TODO-ed failing tests | |||
ok r981 has about 78 broken tests in it | |||
nothingmuch | why are we untodoing, btw? | ||
stevan | 78/2444 subtests failed, | 17:21 | |
nothingmuch | or are we un un todoing from .12? | ||
stevan | it should only be TODOed if its an unimplemented feature | ||
but for releases autrijus likes to TODO everything for clean make test runs | |||
lumi | Can't there be some more exact datum than TODO? | 17:22 | |
nothingmuch | lumi - TAP says "# TODO why todo" | ||
stevan | I also built a TODO list of all the un-TODO-ed things as well | ||
nothingmuch | but we don't implement it in Test.pm | ||
it's mostly useless | |||
lumi | More sort of "#TODO - milestone" | ||
stevan | see perl6-compiler for that list | ||
nothingmuch | ok | ||
shyte | 17:23 | ||
stevan | lumi: thats an idea, but I am not sure the milestones are that "set in stone" | ||
nothingmuch | t/magicals/block........................ | ||
hangs | |||
hehe | |||
stevan | nothingmuch: what did you break now ;) | ||
PerlJam | stevan: seems like there should be some programmatic way to say "this is a release, so execute a todo test here" | ||
nothingmuch | subroutine bindings | ||
=) | |||
stevan | PerlJam: hmmm, I will look into Test.pm, we might be able to do that with an %ENV variable | ||
lumi | Milestone is a bit harsh maybe | 17:24 | |
nothingmuch | if you laugh at me i'll commit it =D | ||
stevan | PerlJam: that would make my life much easier :) | ||
autrijus | stevan: nothingmuch is working on .assuming() | ||
stevan | nothingmuch: *cough* svn revert *cough* | ||
autrijus | which is very important :) | ||
stevan | yum, curry :) | ||
nothingmuch | durnit | ||
autrijus | (because that let us use VThunk instead of Exp for bound vars) | ||
nothingmuch | now my linux box has a too old Test::Harness | 17:25 | |
autrijus | (so one more step closer to serializable continuations and other good ideas) | ||
lumi | But if you tag it "#TODO - r999" then it automagically can be TODO/unTODOed | ||
stevan | autrijus: what does VThunk do that Exp doesnt? | ||
lumi | I mean scriptfully TODOed and makefilefully unTODOed | ||
nothingmuch | lighstep explained it nicely today, stevan | ||
lumi | Or so | ||
nothingmuch | VThunk is something you thunk of doing, but didn't actually do | ||
lumi | Anyway off or sth | ||
Heh | |||
autrijus | stevan: VThunk captures the original context; Exp is just some code to be run in any context. | 17:26 | |
stevan | autrijus: ahhh, very nice | ||
autrijus | VThunk is an ordinary value that can be passed around for lazy evaluation, too. | ||
nothingmuch: but come to think about it, I think | 17:27 | ||
&foo.assuming($blah) | |||
should eval $blah strictly | |||
stevan really needs to learn haskell | |||
autrijus | that is, reduce it to real Val instead ofVThunk | ||
instead of going back to eval it when the curried thing is called | |||
i.e. unlike what haskell do | |||
nothingmuch | ah | ||
good point | |||
well, we'll get to that at some point | 17:28 | ||
it's still Exp now | |||
anyway, i've got to go pick up my mom from the train station | |||
autrijus | cool | ||
stevan | nothingmuch: NO, you must VThunk!!!! | ||
nothingmuch++ | 17:29 | ||
autrijus++ | |||
jabbot | pugs - 981 - un-TODO-ed all the tests and went throug | ||
nothingmuch | stevan: soon, soon... | ||
autrijus | =) | ||
elmex | stevan++ | ||
nothingmuch | i've been working on it since yday | ||
and today i've had a waiting-for-things-to-go-bad day at work | |||
everyone++ | |||
ciao! | |||
autrijus | nothingmuch++ | ||
ciao! | |||
elmex | this is... well err.. | ||
stevan has to do some $work work now | |||
nothingmuch: tell mom we said 'hi' | 17:30 | ||
autrijus | yeah :) | ||
stevan | nothingmuch's mom++ # for giving birth to nothingmuch :) | 17:31 | |
autrijus | :D | 17:32 | |
stevan | autrijus: did I hear you say you were going to YAPC::MA | ||
s/MA/NA/ | |||
autrijus | yes and do a pugs hackathon there | 17:33 | |
stevan | nice | ||
I am planning on going too | |||
what does the pugs hackathon entail? | 17:34 | ||
autrijus | woot! | ||
it means that I'll be staying around for 2~3 more days | |||
and find a place with good network | |||
and hack. | |||
stevan | hmmm | ||
autrijus | it's in June | ||
stevan | yes | ||
autrijus | so by that time we'll probably be hacking the bootstrap. | ||
or macros. | |||
stevan | you mean it wont be finshed by then? ;) | 17:36 | |
autrijus | perl is never finished :) | 17:37 | |
stevan | so true :) | ||
we should start a fund to buy nothingmuch a plane ticket to YAPC::NA | 17:38 | ||
rjbs | nothingmuch's location? | ||
theorbtwo | Wow! | 17:39 | |
stevan | Isreal | ||
Khisanth | autrijus: "feature complete"? :) | ||
theorbtwo | That sounds great; I want to go to YAPC::NA now. | ||
stevan | theorbtwo as well | ||
theorbtwo | Nonono; I'm useless. | ||
autrijus | Khisanth: it's not specced :) | ||
stevan | theorbtwo++ # for humility | 17:40 | |
autrijus | I should also push for cabal to show up there :) | ||
as well as more parrot people. | |||
stevan | and get merlyn to throw a really really big party :P | ||
stevan _really_ has to do $work now | 17:41 | ||
autrijus | have fun :) | ||
Khisanth | stevan: wouldn't that require merlyn to be at YAPC::NA? | 17:42 | |
theorbtwo | Canada won't let Merlyn in, apparently. | ||
chip | Hm. I wonder what the default prototype of C< method foo > is. (MyClass $_, *@_)? (MyClass $_)? | 17:45 | |
stevan | Khisanth: not nessecarily :) | ||
Khisanth | telepartying... | 17:46 | |
Khisanth invents some words :P | |||
chip | Perl6::Subs is getting better. | 17:53 | |
C< method foo { print $self } > becomes C< sub foo : method { my ($self) = @_; print $self } > | |||
oh, and C< die if @_ != 1 > also (but with message) | 17:54 | ||
autrijus | have a guessimate at when we can use the code? :) | ||
chip | This week, I suspect. I think this is far enough from $dayjob interests they'll let me share it | ||
autrijus | guesstimate, even | ||
woooooot. | |||
chip++ | |||
PerlJam | chip: $self magically appears in methods? | ||
autrijus | I'll not write it on my journal yet :) | ||
but, wow. | 17:55 | ||
chip | PerlJam: that's a $dayjob standard for referent, so yes. But you can override with C< method foo ( $me: ) > which uses $me instead of $self | ||
autrijus | clever. | ||
PerlJam | bueno | ||
chip | You can have optional parameters, named parameters, *or* slurpy parameters. Perl 5 doesn't really let you mix them | ||
autrijus | unless you also source filter the caller. | 17:56 | |
which you probably don't want to go. | |||
chip | autrijus: .... ooh. | ||
rgs | that's spiffy. | ||
autrijus gives chip bad ideas. | |||
that's Spiffy. | |||
rgs | :) | ||
chip | Y'know, if the source filter's output is itself a source filter.. | 17:57 | |
autrijus | so, my talk is on 27th March. | ||
chip | No, it's just too evil. | ||
autrijus | so if Perl6::Subs appears on CPAN before that, I will definitely use it in my demos :) | ||
chip | Given a call like C< $x->foo >, how am I supposed to know the type of $x in a source filter? | ||
autrijus | you pass the source to PPI | ||
chip | autrijus: Excellent | ||
autrijus | you alteratively rewrite it in a wrapped form. | 17:58 | |
chip | autrijus: hm, wait. If the syntax of the call is somehow distinct I can translate it without knowing the target. | ||
autrijus | yes. | ||
that also works. | |||
chip | Well, even PPI can't help me if the previous statement is C< $x = foo() > and foo() has no declared return type. Halting problem, etc. | 17:59 | |
autrijus | you need runtime recompilation for that. | 18:00 | |
definetely not going to go there. :) | |||
chip | 'fraid so | 18:02 | |
er, not. whatever | |||
:) | |||
autrijus | o/~ yeah / whatever / nevermind o/~ | 18:04 | |
journal up. | 18:08 | ||
will sleep soon. thanks for all the fish! | |||
chip wonders about the engraved writing on his fishbowl | 18:11 | ||
Hm. | 18:34 | ||
And given C< sub foo (Array $a) >, is foo(undef) legal? | |||
grr | 18:35 | ||
This is ... disturbing | |||
theorbtwo | I thought the plan was that undef is a member of all types, except the lowercase ones. | 18:36 | |
chip | Well, that's what I thought. I imagine, though, that it'd be nice to be able to make sure the values weren't undef in a less verbose way than C<where {$_}> | 18:38 | |
though that's not really _too_ verbose, now that I look at it | |||
18:43
metaperl_ is now known as metaperl
|
|||
nothingmuch | damnit | 18:56 | |
stevan | hola naddamucho | ||
nothingmuch | hola, señor | ||
load load load! | |||
nothingmuch sighs loudly | 18:57 | ||
stevan | whats the problem? | ||
nothingmuch | gentoo insists on Test-Harness-30, which doesn't have HARNESS_PERL honoring | 18:58 | |
stevan | gentoo-- | ||
nothingmuch | hah! that'll show you | ||
gentoo++ most of the time, actually | |||
i've been very happy with it so far | |||
i just typically rely on installing myself | |||
(perl modules) | |||
but this is the first time i needed something odd on gentoo | 18:59 | ||
i should learn to use their little tool to make packages | |||
but then again, i do most of my devel on my laptop with is OSX | |||
stevan | so I was discussing with autrijus about starting a nothingmuch-to-YAPC::NA fundraiser | ||
nothingmuch | oooh | ||
that would be nice | |||
stevan | we just need something to sell :P | 19:00 | |
nothingmuch | hehe | ||
i am willing to sell my body | |||
but in parts | |||
castaway | g-cpan, nm? | ||
nothingmuch | toe nail clippings, hair, etc | ||
stevan | how much for the brain? | ||
or rather, just the part with the Haskell fu :P | |||
nothingmuch | err, that's too difficult to package | 19:01 | |
haskell fu? | |||
i'm asking sarcasticly-seriously | |||
i really have no fu at all | |||
castaway | nm has haskell fu? | ||
nothingmuch | maybe foo | ||
or something equally lame | |||
but i'm really having trouble | |||
stevan | nothingmuch: you have more than me :) | ||
nothingmuch | what i need, IMHO is practice more than anything | 19:02 | |
i can figure out a good deal on my own | |||
but slooowly | |||
and sometimes wrongly | |||
and i am having trouble thinking ahead | |||
ingy | hola | ||
castaway | thinking-- | ||
nothingmuch | hola ingy | 19:03 | |
ingy | dreaming++ | ||
nothingmuch | castaway? | ||
jabbot | nothingmuch: castaway is my girlfriend. | ||
nothingmuch | damnit, jabbot! | ||
stevan | hey ingy | ||
castaway | yes, nm? | ||
nothingmuch | castaway is theorbtwo's girlfriend | ||
why is thinking--? | |||
castaway | cos its hard | 19:04 | |
ingy | stevan: aye | ||
nothingmuch | =P | ||
jabbot stupidity: | |||
why? | |||
castaway | thinking ahead is even worse.. | ||
nothingmuch | it's supposed to say 'why is the blah blah blah?' | ||
hola gaal | |||
gaal | heya | ||
stevan | ingy: nothingmuch is auctioning off his body to pay for a trip to YAPC::NA, you need anything? | ||
nothingmuch | parts of my body | 19:05 | |
castaway slaps jabbot | |||
stevan | yes,.. only in peices | ||
theorbtwo | nm, got a couple of spare thumbs? | ||
castaway | good idea | 19:06 | |
gaal 's $work occasionally sends people to TO. man, hacking their schedule would be great. | |||
castaway | thumbs would be useful | ||
nothingmuch | TO? | ||
my thumbs are necessary | |||
for the bass | |||
gaal | Toronto. | ||
nothingmuch | i don't type with them too much, except for the right hand thumb, for the space bar | ||
ah, toronto is cute | |||
stevan | nothingmuch: slap & pop funk bass? | ||
nothingmuch | very calm | ||
err, no, double bass | |||
you need for the arco | 19:07 | ||
gaal | it also hosts yapc, no? | ||
nothingmuch | and the left hand side feels around the neck | ||
stevan was just picturing nothingmuch ala Bootsy Collins | |||
nothingmuch | otherwise you lose the sense of where you are | ||
i can probably give up a pinky or something from my feet | |||
that would be worth a YAPC | |||
stevan | gaal: yes YAPC::NA this year is in Toronto | ||
gaal | gotta assign myself back on that project then :) | 19:08 | |
nothinmuch, i can see if they are hiring. you wouln't mind, oh, coding java for a while? :-p | |||
castaway | nm, but I have no thumbs.. :( | ||
stevan | gaal: your in israel too right? you could bring nothingmuch in your carry-on luggage? | ||
nothingmuch | castaway: phsically? | 19:09 | |
gaal | hmm, he might in fact fit | ||
castaway | correct | 19:10 | |
stevan | gaal: especially after we sell all his extra parts | ||
gaal | and if he gives away his fingernails then the security folks won't take issue with his being there | ||
nothingmuch wonders how you get along without reversable thumbs | |||
gaal | so, nm, shall i hack at test::harness? | 19:12 | |
castaway | my right index finger has kinda evolved to be a thumb | ||
theorbtwo | Most people's thumbs aren't reversable -- just opposeable. | 19:13 | |
castaway | good point | ||
nothingmuch | that's what i meant | ||
=) | |||
gaal: yes, today is all haskell | |||
theorbtwo | The answer to how she gets along without thumbs is "remarkably well". | 19:14 | |
castaway types faster than lotsa people | |||
stevan | darwinism++ | 19:15 | |
nothingmuch | ook, i've ruined $?BLOCK and $?SUB | ||
gaal | "ah, yes, today is finishing the specs, adding all the leftover bits of the language, changing over the ast to ponie, speeding up the code 2^10 times. no time for *perl*" | ||
nothingmuch | heh | 19:16 | |
i meant for me =) | |||
ook | 19:22 | ||
nothingmuch should add autocmd for *pugs*.hs to set expandtab | |||
keeps pissing off ghc | 19:23 | ||
and i never understand why | |||
stevan; can i have the faillist again? | 19:25 | ||
78, right? | 19:26 | ||
yay! 982 | 19:36 | ||
19:38
metaperl_ is now known as metaperl
|
|||
nothingmuch | everyone please svn up and test, this change could give us trouble and I want to find out sooner rather than later | 19:39 | |
jabbot | pugs - 982 - VSub now encapsulates it's own bindings | ||
gaal | my msys environment b0rk. anyone ever see this error? fork_copy: user/cygwin data pass 3 failed | 19:40 | |
google mentions it, btu i'm not yet sure if it's a system thing or a make thing -- it happens on perl Makefile.PL | |||
nothingmuch | how deep is fork emulated on windows? | 19:41 | |
could it be a resource problem? | |||
gaal | unlikely as i have 450MB RAM free. | 19:42 | |
then again, this is windows and it must have been a month since i last rebooted. what was i thinking? | 19:43 | ||
how do i even check my uptime in windows? | 19:45 | ||
nothingmuch | cygwin should probably have uptime, no? | 19:46 | |
gaal | not on my box. and i seem to recall that it gave wrong results when i tried once on a machine at work. | ||
darn, a reboot didn't help. testing if an older revision also has this problem. | 19:53 | ||
pasteling | "gaal" at 192.115.25.249 pasted "make test summary on the linux box" (25 lines, 1.7K) at sial.org/pbot/8455 | 19:54 | |
gaal | what should i prove -v? | 19:55 | |
nothinmuch, on win32 mingw, r970 builds. tracking down exact breakage location... | 20:00 | ||
nothingmuch | 78 tests are expected to fail | 20:01 | |
stevan untodoed them earlier | |||
oh, but way after 970 | 20:02 | ||
979, i think | |||
gaal | are you talking about the win32 *build* fail, or my linux *test* fails? | ||
nothingmuch | i thought test fail at first | 20:03 | |
but then i understood that you meant build failed | |||
gaal | i have reason to believe my earlier fork-related build fail was not a system problem, or at least not only. -- it isn't triggered on a slightly older r | ||
nothingmuch | do you have strace? | 20:04 | |
gaal | no.. brb, phone | 20:05 | |
mj | hello, can somebody add 'next unless $dir;' before line 19 to Modules\Install\Can.pm. It will fix win32 configure error which occurs if PATH contain two semicolons subsequently. | 20:07 | |
set PATH=C:\perl\bin;;c:\ghc\ghc-6.4\bin | |||
perl Makefile.PL | |||
\ghc not found | |||
*** Cannot find a runnable 'ghc' from path. | |||
Thanks. | |||
nothingmuch | mj: do you want to do it yourself? | ||
mj | I can try. TortoiseSVN - SVN Commit... ? | 20:09 | |
nothingmuch | something like that | 20:10 | |
i'll need an email address to grant commit access | |||
mj | [email@hidden.address] | 20:11 | |
gaal | beh, now r982 builds fine all of a sudden. so maybe it was a transient mingw thing after all :( | 20:12 | |
nothingmuch | =P | ||
mj: invitation sent | 20:14 | ||
welcome aboard, mj | 20:23 | ||
mj | done, thanks | ||
stevan | Darren_Duncan: are you around? | 20:27 | |
Darren_Duncan | stevan, right here | ||
stepped away for a few minutes | |||
jabbot | pugs - 983 - fix win32 configure error which occurs i | 20:29 | |
mj | jabbot: something wrong about my first commit? | 20:31 | |
jabbot | mj: Does that suggest anything else which belongs to you? | ||
qmole | :) | 20:34 | |
nothingmuch | mj: jabbot is a bot, and a stupid one at that | 20:41 | |
jabbot? | |||
jabbot | nothingmuch: jabbot is a bot, and a stupid one at that | ||
nothingmuch | haha! | ||
ook | |||
stevan | nice :P | ||
jabbot__ | |||
jabbot++ | 20:42 | ||
(damn off by one) | |||
nothingmuch | in two senses ;-) | ||
well, now, off by one and off by two | |||
oh my | |||
this is harder than I thought | |||
binding is a bit overzealous | 20:43 | ||
mj | :-) muhehe | ||
nothingmuch | oh my, i feel so... dirty | 20:46 | |
well, i've had enough | 20:59 | ||
but we may have &foo.assuming tomorrow | |||
it currently sort of works but in a bad way | |||
but the commit to parse it does not yet work | 21:00 | ||
sorry, was not yet made | |||
i'll leave the files open in see://woobling.org if anybody wants to play with them while I'm asleep | 21:01 | ||
with some todo | |||
ciao! | |||
stevan | adios nothingmuch | 21:03 | |
mj | 983: nmake test failed ... still "cmd too long" (2268 characters :) | 21:23 | |
MSYS-MinGW-MSYS-DTK build: 79/2446 subtests failed, 96.77% okay | |||
good night | |||
stevan | good night mj | 21:24 | |
elmex | autrijus++ | 22:20 | |
22:28
metaperl_ is now known as metaperl
22:34
wilx` is now known as wilx
|
|||
metaperl | wilx. wow a real Haskell expert in our midst | 22:54 | |
wilx | lol | 22:55 | |
Am I? | |||
metaperl | well, better than most of us Perl hackers | ||
we need to get all the procedural cruft out of minds | |||
it takes some time to trust the Haskell way of just being definitional about things | 22:56 | ||
wilx | I assure you think to highly about me :) | ||
too* | |||
metaperl | no, I saw your code the other day | ||
wilx | Hm. | ||
metaperl | remember when I asked you for an English version of your website | ||
wilx | Oh. | 22:57 | |
Right. | |||
23:18
constant is now known as integral
|
|||
elmex | perl 6! | 23:28 | |
ayrnieu | elmex - where?! | 23:29 | |
elmex | i have no clue | ||
theorbtwo | pugscode.org/ | 23:32 | |
elmex | ? | ||
⌫ | |||
chip | Good news, boss thinks I'll be able to CPAN Perl6::Subs | 23:51 | |
About a week, so don't start polling the CHIPS directory just yet | |||
ninereasons | autrijus, I can't get your mandel.hs to compile with ghc | 23:58 |