Pugs 6.2.6 uploaded by cpan-upload.p6! | pugscode.org/ <Overview Journal Logs> | pugs.kwiki.org | paste at sial.org/pbot/perl6 Set by integral on 2 June 2005. |
|||
kelan | stevan: do me a favor and type some unicode characters like hypers or any of the set operators | 00:03 | |
i've been battling my terminal all afternoon trying to get utf8 setup | |||
stevan | kelan: I have no idea how to :) | ||
kelan | oh heh ok:) | ||
stevan | actually, wait a second | ||
kelan | maybe i'll try copy and paste from somewhere | 00:04 | |
stevan | I will copy paste from some Pugs stuff | ||
kelan: ??? | |||
hows that? | |||
kelan | hmm. three question marks | 00:05 | |
« | 00:07 | ||
yay that worked | |||
?eval (1,2,3) »+« (4,5,6) | 00:08 | ||
evalbot6 | Error: unexpected "\\" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
kelan | hmm | ||
?eval (1,2,3) »+« (4,5,6); | |||
evalbot6 | Error: unexpected "\\" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
kelan | ?eval my @a = (1,2,3); @a »++; @a | ||
evalbot6 | Error: unexpected "\\" expecting operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | 00:09 | |
kelan | ?eval 1+2 | ||
evalbot6 | 3 | ||
kelan | ?eval my @a = (1,2,3); @a >>++; @a | ||
evalbot6 | Error: Can't modify constant item: VInt 1 | ||
kelan | ?eval (1,2,3) >>+<< (4,5,6); | ||
evalbot6 | (5, 7, 9) | ||
kelan | it looks right to me, but maybe its sending the wrong thing | ||
jql | ?eval my @a = map { 0+$_} 1,2,3; @a >>++; @a | 00:11 | |
evalbot6 | Error: Can't modify constant item: VInt 1 | ||
jql | ?eval my @a = map { 0+$_} 1,2,3; @a | ||
evalbot6 | [1, 2, 3] | ||
theorbtwo | It's probably an evalbit problem. Lots of back and forth between perl6, perl5, and perl6. | 00:13 | |
(no, that wasn't a thinko.) | |||
kelan | theorbtwo: did those hyperops come across okay, then? | 00:14 | |
theorbtwo | They looked OK to me. | 00:15 | |
kelan | ok good | ||
theorbtwo | ?eval length "«", ord "«" | 00:19 | |
evalbot6 | *** unexpected ( or "(" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input at -e line 4, column 4 | ||
theorbtwo | Right. Evalbot looks broken. | ||
theorbtwo wonders if there's anybody about who feels like helping what is likely a stupid user error with parsec. | 00:21 | ||
kelan | i don't know anything about parsec, or i would | 00:22 | |
crysflame | huh. evalbot groks UTF-8? | 00:34 | |
heh! woo re: topic | |||
theorbtwo | crysflame: Looks like it doesn't, but it certianly should. | 00:37 | |
autrijus | the quotemeta() thing is broken | 00:47 | |
in evalbot | 00:48 | ||
it should probably only quote a few things like " and \ and \n | |||
robkinyon | stevan: ping | 00:49 | |
ingy | hola | 00:50 | |
autrijus | yo | ||
ingy | autrijus: I am ready to submit my new ingyism to pugs for review | 00:51 | |
autrijus | ingy: do so! | 00:53 | |
ingy | autrijus: doing so! | 00:54 | |
autrijus waits for "done so!" | 00:56 | ||
theorbtwo | AUTRIJUS! | ||
ingy | done | ||
theorbtwo | I'm having parsec woes. | ||
ingy | hi theorbtwo | ||
theorbtwo | INGY! | 00:57 | |
WHOEVERELSEISHERE! | |||
ingy does the loud people dance | |||
theorbtwo | I'm trying to get %MY:: to parse. | ||
So I added in an endbit <- option "" (string "::") to Pugs.Parser.ruleVarNameString, right after names, and added a ++ endbit to the return. | 00:58 | ||
That gives me nothing when there's not a :: and an error when there is, which isn't what I was going for. | 00:59 | ||
Changing the "" to "x" gives me an x on the end of things without a trailing ::, and an erro on things with one. | |||
Adding a try in like the line above doesn't help. | |||
svnbot6 | r4416, ingy++ | Test-Less comes to Pugs | 01:02 | |
r4416, ingy++ | Test::Less helps speed up development testing by allowing people to categorize | |||
r4416, ingy++ | tests with various keywords, and then prove subsets of those tests. | |||
r4416, ingy++ | It keeps all its info in t/Test-Less/index.txt. You don't have to use it if | |||
r4416, ingy++ | you don't want to. It is an author-side tool, so support does not need to be | |||
r4416, ingy++ | distributed. But the index should be distributed... | |||
ingy | ouch. grrr | ||
autrijus | theorbtwo: so, well, er. | ||
change "sepBy1" to "sepEndBy1" is the answer to all problems. | 01:03 | ||
because it means it can be separated by, as well as ended by, ::. | |||
theorbtwo | That makes the end bit optional, and tells me if it's there? | ||
The problem is that %MY and %MY:: are distinct hashes, AFAIK. | |||
autrijus | true. | 01:04 | |
ok then. change many1 wordAny | |||
to many wordAny | |||
will fix that. | |||
clkao | autrijus: hola. | ||
ingy | clkao: hola | ||
clkao | hi ingy | ||
autrijus | (then you'd not need sepEndBy1; sepBy1 would do) | 01:05 | |
yo clkao. | |||
clkao | autrijus: throw random hackathon productivity tool thoughts at me | ||
svl is very cool | |||
autrijus | clkao: telepathy matrix | ||
biofeedback on commits | |||
ingy | clkao: are you going to Toronto? | ||
clkao | bah, something that simple software can solve | 01:06 | |
ingy: no | |||
theorbtwo | clkao: lots of mics, live transcription to #perl6. | ||
Speech synth of lines on #perl6? | |||
autrijus | speech reco and synth | ||
theorbtwo | Hm, no connection, so those are out. | ||
autrijus | there is connection | ||
theorbtwo | Oh. I thought it was "steal the nebihor's phone at night". | ||
autrijus | s/phone/adsl/ | 01:07 | |
not sure about the 'at night' bit | |||
clkao | so, svl will allow you the publish your local repository for people around to mirror / branch from | ||
autrijus | john also mentioned possible cell phone based bandwidth | 01:08 | |
clkao | so you both will be able to commit very fast | ||
and merge from one another | |||
theorbtwo | Oh, sounds much better then what I was thinking, then. | 01:09 | |
01:13
theorbtw1 is now known as theorbtwo
|
|||
theorbtwo | Hm, that works, and feels somewhat clener. | 01:18 | |
However, it now thinks "%" (in term position, of course) is a varable name. | |||
I'm going to call that "OK", at least for now. | 01:23 | ||
autrijus | er | 01:24 | |
when (null names) $ fail "" | |||
theorbtwo | No effect. | 01:26 | |
autrijus | case names of | 01:27 | |
[""] -> fail "" | |||
_ -> return $ (sigil:twigil) ++ ... | 01:28 | ||
theorbtwo | OK | ||
autrijus | btw, during hw2005 writing I noticed that the envStash is used to recalculate operator table | ||
theorbtwo | Ah, I see the difference. | ||
autrijus | for each OP | 01:29 | |
I think a new RuleState record to cache the op table will work much better. | |||
and speed up parsing | |||
but I need to finish the paper today as the first priority :-/ | |||
theorbtwo | When's the deadline on it? | 01:30 | |
autrijus | 10th | ||
theorbtwo | That'd be good; there's quite noticable delays. | ||
autrijus | but realistically I won't get any time when I'm in Vienna | ||
theorbtwo | Right. | ||
You can write on the plane, but that's cutting it rather close. | |||
autrijus | so it needs to be today. | ||
no | |||
the plane time is reserved for the talk! | |||
two talks, in fact. | 01:31 | ||
meppl | gute nacht | ||
theorbtwo | Ah. | ||
G'night, meppl. | |||
meppl | ;) | ||
ingy | autrijus: ping | 02:33 | |
autrijus | ingy: pong | 03:30 | |
nothingmuch: autrijus.org/tmp/readerT-spoiler2.txt | |||
Eval is made completely polymorphic; with that definition we're ready to: | |||
* embed Harrorth into Pugs with zero lines to change in harrorth and only two short instances to write | 03:31 | ||
* change Harrorth into a compiler targetting Parrot without touching Eval.hs | |||
(and reuse all the code in eval.hs) | |||
crysflame | neat | 03:36 | |
autrijus praises merciless abstraction | 03:38 | ||
obra | Harrorth? | 03:43 | |
autrijus | obra: nothingmuch's forth implementation -- he chronicled all the details of how he learned haskell by coding this from scratch | 03:45 | |
fascinating read. the repo is at perlcabal.org/~nothingmuch/harrorth | |||
check the doc/ for journal | 03:46 | ||
obra | ah. cool. | 03:48 | |
ingy | autrijus: I just wanted to show that you can do this | ||
test-less -prove -v failing | |||
... | 03:49 | ||
Failed 9/9 test scripts, 0.00% okay. 45/82 subtests failed, 45.12% okay. | |||
All the current (as of yesterday) tests that are failing | |||
If you make a test pass... | |||
test-less -untag failing t/oo/destruction.t | 03:50 | ||
gaal | hey autrijus, i was having some problems figuring out signal hadnlers the other night. | ||
autrijus | ingy: granularity is at testfile level? | ||
ingy: I wonder how it plays with our current unit level markers | |||
ingy: but very cool | |||
ingy | read the doc | 03:51 | |
but... | |||
gaal | in System.Posix.Signals, installHandler :: Signal -> Handler -> Maybe SignalSet -> IO Handler | ||
autrijus | gaal: win32 has S.P.Sig? | ||
gaal | what the hell is SignalSet for? :) | ||
ingy | you can mark any test file with any keyword | ||
gaal | no, it doesn't... | ||
ingy | so yes, it is at the file level | ||
gaal | i also have (slowish) linux boxen to test on. | ||
ingy | hopefully people will categorize the tests and commit the index.txt changes | 03:52 | |
autrijus | gaal: www.delorie.com/gnu/docs/glibc/libc_506.html | ||
ingy: I'd like to derive index.txt from :todo markers. | |||
ingy | the nice thing is that it is orthoganal to other testing mechanisms | ||
autrijus: please | |||
autrijus | so I can run all bugs, all features | 03:53 | |
ingy | there is no limit on categorization | ||
autrijus | or all unspecceds | ||
wouldn't that be nice. | |||
gaal | autrijus, thanks (i was thinking it was a haskell thing) | ||
autrijus | gaal: System.* are very thin disguses of FFI wrappers | ||
gaal | why are some of the builtin SSs functions though? | ||
autrijus | disguises, even | 03:54 | |
gaal | oh, because so are the c versions. hmmm! | ||
autrijus | in fact, most of times there's no disguises. | ||
ingy | autrijus: grep -r some_pattern t | test-less -tag some-tag - | ||
:) | |||
gaal | okay, cool. if i have time i'll be adding %*SIG later on then. (only to unix) | ||
autrijus | gaal++ | 03:55 | |
ingy | autrijus: the index entries are one per line so that conflicts should resolve easy with svn | ||
gaal | couple of questions: how can i call into Prelude from Haskell? | ||
and: is there a way to run something in the context of the main thread, that sees the call stack of every worker thread? | 03:56 | ||
ingy | er | ||
autrijus: grep -lr some_pattern t | test-less -tag some-tag - | |||
but ykwim | 03:57 | ||
autrijus | gaal: evalExp (App (Var "&File::open") (Just (Val $ VStr "file.txt")) [] | ||
gaal | so cool! thanks. | ||
autrijus | or, if you want to be very lazy! | ||
op1 "eval" (VStr "File::open('file.txt')") | |||
;) | |||
gaal | :) | ||
autrijus | but then you get no compile time typechecks. | 03:58 | |
gaal: yes you can do that by using either TChan or thread signaling | |||
ingy | autrijus: also thanks to you I have filters for Test::Chunks like eval_stdout and eval_stderr (which open big testing doors to me) | ||
autrijus | gaal: but you need to be more specific to what kind of stack and what kind of inspection you want | ||
gaal | autrijus, look eg at the box here: www.unixville.com/~moazam/stories/2...heJvm.html | 03:59 | |
ingy | at YAPC I'd like some help porting Test::Chunks to 6 | ||
gaal | java responds to SIGQUIT and prints stacktrace for all threads | ||
a nice feature to steal | |||
autrijus | gaal: oh. trivial | 04:00 | |
gaal: sending signal to each working thread; the runloop intercepts it and dumps the Env (escalating up envCaller) | |||
gaal | trivial to write something over caller, *if* i know how to iterate over threads. | ||
autrijus | gaal: you can factor our Prim line 447 | 04:01 | |
gaal: and store it into a global @*CHILD_THREADS | |||
or something like that | |||
gaal | okay, thanks! | 04:03 | |
autrijus | gaal++ | 04:04 | |
gaal | i think i'll go rowing now, though. see you later! | ||
autrijus | see ya! | ||
chromatic | Howdy. | 04:47 | |
autrijus | greetings chromatic. | ||
chromatic | autrijus, I had a thought. | ||
autrijus | yes? | ||
(I'm just about to go offline to hack hw2005, but I'd like to read your thought first :)) | 04:48 | ||
chromatic | Is the attribute-binding code we wrote yesterday consuming everything in bound before processing non-attribute default values in applyThunk | ||
? | |||
autrijus | you know what, you're right | ||
it passes the "bound" unaltered to applyThunk | 04:49 | ||
method foo ($.z) {} | |||
will create a _lexical_ binding to "$.z" | |||
chromatic | Options then may be to 1) copy bound 2) some sort or grep in the list comprehension | ||
autrijus | chromatic: the grep is implicit in <- | ||
and in , (twigil ==) `any` ".:" | 04:50 | ||
chromatic | Right, with the condition in the comprehension. | ||
autrijus | so only those will be processed | ||
but I worry about passing bound thru | |||
a lexical binding of $.z sounds strange. | |||
maybe we should delete the attribute args. | 04:51 | ||
chromatic | Keeping the binding of attributes in applyExp seems right to me. | ||
autrijus | i.e. use "partition" | ||
in applyExp | |||
chromatic | Oh, I see what you mean. | ||
autrijus | so we don't introduce a garbage | ||
"my $.z" | |||
symbol in the lexical scope | |||
chromatic | <- partition ___ bound something something? | ||
autrijus | (attrib, normal) <- partition isAttrib bound | 04:52 | |
er no | |||
let (attrib, normal) = partition isAttrib bound | |||
since partition is pure | |||
chromatic | I think I know where and how; I'll take a shot now. | ||
autrijus | isAttrib ApplyArg{ argName = (_:':':_) } True | ||
isAttrib ApplyArg{ argName = (_:'.':_) } True | |||
isAttrib _ = False | |||
er, change the "True" above to "= True" | 04:53 | ||
chromatic | Right. | ||
autrijus | that should be all there is. | ||
cool. I'll go offline to write paper, then. | |||
bbiab. | |||
chromatic++ # rapidly accumulating haskell-fu | |||
chromatic | It's experience I lack. | ||
autrijus | It's for experience we hack. | 04:54 | |
autrijus waves & | |||
chromatic | Ahh, I see the problem. | 05:12 | |
We're approaching this backwardsly. | |||
We shouldn't be checking the passed-in arguments for attribute twigils (which works, if you say Foo.new( 'bar'=> 10 )). | |||
We should be checking the *code's signature* for twigils and pulling out arguments based on that. | 05:13 | ||
crysflame | done | ||
chromatic | autrijus, catch the previous couple of lines in scrollback when you have the chance. :) | 05:18 | |
crysflame | chromatic! | ||
crysflame bows. | |||
nothingmuch | good morning everyone | ||
chromatic | crysflame! | ||
Sorry, that's all I have at this hour. | 05:20 | ||
autrijus | chromatic: hm? the arguments in ApplyArg _are_ the signatures | 05:39 | |
chromatic | Are they? | 05:40 | |
autrijus | I think so. | ||
{ argName :: String -- ^ Name of the param that this arg is for | |||
, argValue :: Val -- ^ Actual argument value, which may still be | |||
chromatic | I don't see anything referring to subParams, which is what I expect at the moment. | ||
autrijus | the argName is directly copied from subParams. | ||
chromatic | Does it still have the sigil in subParams? | 05:41 | |
Sorry, twigil. | |||
autrijus | it represents a binding | ||
I think so. | |||
gaal | oh, btw, that reminds me if anyone wants to spec caller() a little bit better, currently it has a "params" member that's just a hacky show VStr subParams | ||
autrijus | you can trace() for it. | ||
oh btw. I hacked in the op parser table cache. | |||
about to commit. to wit: | |||
$ time ./pugs.old -c examples/games/wizard.p6 | |||
real 0m4.690s | |||
gaal | ooh, that should greatly speed things up! | ||
autrijus | $ time ./pugs -c examples/games/wizard.p6 | ||
real 0m2.292s | 05:42 | ||
autrijus bows | |||
gaal | woot! | ||
chromatic | Nice. | ||
autrijus, when the argument comes in from the caller, it won't have a twigil. | |||
When I add the twigil, the code works. | |||
autrijus | chromatic: you mean the name will just be "foo" ? | 05:43 | |
gaal | i thought the days of 100% speedups were gone ;-) | ||
autrijus | gaal: you'd be surprised. | ||
chromatic | Yep, some_sub( foo => 10 ); | ||
gaal | aiming for 200% speedups now? :)) | ||
autrijus | chromatic: maybe I'm dense. but | 05:44 | |
some_sub(10); | |||
will yield an ApplyArg that pairs the first param name | |||
say "$foo" | |||
with 10 | |||
gaal | real -0m2.292s | ||
$ time ./pugs.fast -c examples/games/wizard.p6 | |||
autrijus | that is the only way we can introduce a lexical binding | ||
under the "$foo" name | |||
so I'm surprised that you say the applyArg has no twigil. | |||
chromatic | some_method (?$.z = 10 ); | ||
autrijus | maybe we lost the twigil some time. | 05:45 | |
chromatic | $obj.some_method( z => 20 ); | ||
autrijus | wait. I know why. | ||
gaal | $work & | ||
autrijus | chromatic: Bin.hs | 05:46 | |
Bind.hs | |||
line 41 | |||
has a blind "tail". | |||
so $.z would expect a ".z" as name | |||
not "z". | |||
chromatic | Exactly. | ||
autrijus | chromatic: there may be other such assumption in Bind.hs as well. | ||
chromatic | What's the easiest way to strip off the first to heads? | 05:47 | |
autrijus | the first to heads? | ||
chromatic | two | ||
autrijus | dropWhile (not isAlpha) | 05:48 | |
dropWhile (not isAlphaNum) | |||
dropWhile isPunct | |||
or something like that | |||
if you know you want to drop 2 | |||
then | |||
drop 2 | |||
;) | |||
chromatic | In place of tail... trying. | ||
autrijus | drop :: Int -> [a] -> [a] | ||
dropWhile :: (a -> Bool) -> [a] -> [a] | |||
chromatic | dropWhile *almost* needs a body! | 05:49 | |
autrijus | hm? | 05:50 | |
svnbot6 | r4417, autrijus++ | * Speed up parsing for 2x by caching the dynamically-constructed | ||
r4417, autrijus++ | operator precedence tables, instead of relying on envStash to | |||
r4417, autrijus++ | rebuild them in each token. | |||
r4417, autrijus++ | <gaal> i thought the days of 100% speedups were gone ;-) | |||
chromatic | I'm trying to write this off of the top of my head. | ||
autrijus | dropWhile f (x:xs) | f x = xs; dropWhile _ xs = xs | 05:52 | |
chromatic | Yep, pretty close to what I had. | ||
autrijus praises recursion | |||
chromatic | Hm, there's a dropWhile in Prelude already. | 05:53 | |
autrijus, replacing tail with (dropWhile isPunctuation) didn't do it. | 05:56 | ||
autrijus | chromatic: time for your to learn trace() calls? | 05:58 | |
chromatic | Sounds painful. | ||
Can't we reason this out a bit first? | |||
autrijus | nah. it's actually easy :) | ||
trace :: String -> a -> a | |||
show :: (Show a) => a -> String | |||
so whenever you want to trace something | |||
chromatic | Does the (name ==) happen before or after the dropWhile? | ||
autrijus | say "x y z" | 05:59 | |
you can simply slap (trace (show foo)) in front of it | |||
trace (show foo) x y z | |||
chromatic | ah, easy. | ||
autrijus | simple as pie :) | ||
(name ==) occurs after dropwhile | 06:00 | ||
chromatic | Won't that cause problems? | 06:01 | |
autrijus | why would it? | ||
find ((name ==) . tail . paramName) prms | |||
chromatic | dropWhile takes off two characters, in the case of an attribute. | ||
autrijus | find ((name ==) . (dropWhile isPunctuation) . paramName) prms | ||
this means, in perl6 | |||
svnbot6 | r4418, autrijus++ | * Revise hw2005 to agree with the now-optimised reality. | 06:02 | |
autrijus | for @prms -> $prm { | ||
if ($name eq $prm.paramName.dropWhile(&isPunctuation)) | |||
{ return $prm } | |||
} | |||
chromatic | Where does name come from? | 06:03 | |
autrijus | it's the name part of the pair | 06:05 | |
returned by unPair | |||
unPair unpacks Exp into (String, Exp) | 06:06 | ||
the String part is the name. | |||
this is occuring inside a foldr. | |||
it's an accumulating fold | |||
see the haddock of bindNames for explanation. | |||
chromatic | Signature or parameter? | ||
autrijus | name is parameter like "z" | ||
paramName is "$.z". | 06:07 | ||
$obj.foo(z => 2) | |||
chromatic | Okay, so paramName should ignore any twigil when it does the matching. | ||
autrijus | right. | ||
but I really, really need to run :) | |||
may the trace be with you... | |||
chromatic | Thanks! | 06:08 | |
autrijus | thanks too :) | ||
chromatic++ # & | |||
07:02
Aankh|Clone is now known as Aankhen``
|
|||
svnbot6 | r4419, autrijus++ | * hw2005.txt - leading paragraph for experimental features and | 07:55 | |
r4419, autrijus++ | embedded languages. | |||
08:01
batdog is now known as batdog|gone
08:36
osfa is now known as osfameron
|
|||
Nattfodd | Is there a parrot channel somewhere or am I already in the right place ? | 08:50 | |
cognominal | Nattfodd: the #parrot channel is on the irc.perl.org server | 08:51 | |
... not on the current freenode server | 08:52 | ||
Nattfodd didn't know there was a irc.perl.org server... | 08:53 | ||
thanks | |||
cognominal | this perl6 channel is also an attempt to break out of this incestuous world :) | 08:54 | |
pasteling | "chromatic" at 63.105.17.30 pasted "Fix for *some* parameter bindings, but still not quite right" (27 lines, 1.2K) at sial.org/pbot/10771 | 09:04 | |
autrijus notes we are 3 people away from 100 committers. | 09:19 | ||
svnbot6 | r4420, autrijus++ | * Leading paragraph on compilation and acknowledgements. | 09:55 |