6.2.7 released! | pugscode.org/ <Overview Journal Logs> | pugs.kwiki.org | paste: sial.org/pbot/perl6
Set by autrijus on 13 June 2005.
Limbic_Region looks at the output of pugs -CPIR <some example> and has no idea how to determine what exactly it is suggesting is missing 00:03
svnbot6 r4772, putter++ | Added not() and defined() to Emit/PIR.hs.
sri_ whats the new %INC? 00:09
or how do i at least check if a module is loaded? 00:11
putter sri_: It doesnt look like %*INC exists yet... 00:20
sri_ :(
that leaves lots of todos in the Module::Pluggable port... 00:21
putter Limbic_Region: for whatever its worth, I plan to look at it shortly... finishing up a split() implementation... 00:22
sri_: hmm, I wonder how difficult it would be to add...
kungfuftr @*INC/@INC not enough? 00:23
sri_ no, i need to be able to check for blib 00:27
putter Limbic_Region: I hope the error wasnt error:imcc:op not found 'lt' (lt<3>)...
Limbic_Region no putter 00:31
putter good. afraid for a moment I broke the build. 00:32
sri_: looks like adding %*INC as a variable would be easy. Run.hs. I haven't looked at populating it yet. 00:33
sri_ don't look at me, my haskell is very bad ;)
putter sri_: ok, I'll try... 00:35
sri_ thx :)
Darren_Duncan result of running 'make test' on 4770 is ... 00:47
(5 subtests UNEXPECTEDLY SUCCEEDED) (858 subtests TODO), 715 subtests skipped.
Failed 16/350 test scripts, 95.43% okay. 57/6445 subtests failed, 99.12% okay.
crysflame woo, yay success 00:49
Limbic_Region ok - I am off having not been able to decipher what exactly it thinks is missing 01:04
TTFN all
putter bye 01:08
sri_: ok, what exactly is %*INC supposed to contain? 01:14
sri_ pathes to loaded modules 01:17
in the unixish / notation 01:18
putter sri_: wooh! working. cleaning up... 01:21
sri_ yay! :)
putter++
putter sri_: r4774 01:35
svnbot6 r4773, chromatic++ | s/Perl6/Perl 6/ for all non-filepath and module name uses.
r4774, putter++ | Added intial support for %*INC.
putter It's almost certainly not spec with regard to the keys, but perhaps its enough to get started.
svnbot6 r4775, putter++ | Modified src/Pugs/Prim/Eval.hs to leave %*INC support commented out by default. Its too late at night to make security judgements. 02:12
r4776, putter++ | Emit/PIR.hs split() can now split on "\n". Needed to get Test.pm working. Actually, any fixed string should work, but only "\n" is enabled.
r4777, putter++ | Call parrot without -j. It is fatal on systems where parrot does not support jit. 02:35
r4778, sri++ | Ported Module::Pluggable::Fast 02:59
r4779, sri++ | Added HTTP::Server::Lite 03:19
obra sri_: What does HTTP::Server::Lite look like apiwise? 03:28
svnbot6 r4780, putter++ | Bugfix to r4771.
sri_ like you simple server, just a bit... simpler 03:30
+r
i don't need all the hooks
feel free to extend and rename it 03:31
obra No worries. FWIW, I'm totally fine with you calling it HTTP::Server::Simple without the hooks being there yet 03:32
My initial release didn't have most of the hooks :) 03:33
sri_ fine, then i'll rename it with the next commit :)
obra woot 03:34
sri_++
Once I start hacking in perl6, I'll get around to adding the hooks I need 03:35
sri_ wonder if it's possible to use method traits
the real Cat6 porting begins now...
obra Neat 03:36
sri_ can't help but traits seem a bit ugly compared to perl5 attributes 03:37
method foo is Regex('^bar$') vs. sub foo : Regex('^bar$')
are lower case traits reserved? 03:39
cause all the built in ones are lower case (rw, export...)
hmm...someone could port Text::MicroMason...it has no prereqs :) 03:48
obra Heh. 03:50
sri_ but for the time being i could also live with Text::PSP 03:51
really wish i could spend more time on this :/ 03:53
Khisanth sri_: well you could just use the p5 version right now :) 03:57
putter autrijus: Here are issues I encountered trying to get parrot to do Test.pm... 04:04
svnbot6 r4781, putter++ | Added a varText for code vars in Compile/Parrot.hs. 04:05
putter [lit curPad] in Compile/PIR.hs is generating "-1" (with quotes) rather than -1. Affects new_pad and store_lex. 04:06
module, %ENV<>, :=, unless, END{}, _auto (eg, "&ok_auto" vs "&ok"), $*ERR. 04:08
Those done, one can run t/01-sanity/* embedded in Test.pm. Modulo #use and a couple of output differences. 04:10
Good night. 04:11
sri_ Khisanth: but i'd have to use perl5 in templates! 04:17
Khisanth hmm :)
sri_ the point is to use perl6 in mason, which would be damn cool ;) 04:18
Khisanth wonders if TT is still using _ for concat 04:19
sri_ it is 04:20
Khisanth well there goes my plan for playing with it, my hypen key is broken 04:21
well not exactly broken but pressing it seems to send no signal
sri_ lol
Khisanth and not constant either 04:22
it periodically drops off
know anything about fixing laptop keyboards? :) 04:23
sri_ call service number? ;)
Khisanth oi ... the left shift too 04:25
sri_ keyboards are cheap on ebay 04:26
Khisanth laptop? 04:27
sri_ sure 04:28
Khisanth ack! I just realized I can't really write Perl without the hypen key
sri_ then better stick to haskell and fix caller for me ;) 04:29
Khisanth doesn't really know Haskell 04:30
it looks interesting enough though
ok must be something else that is wrong 04:31
the entire rows of keys with the numbers seem to be acting up 04:32
I wonder who actually buys these store.yahoo.com/pfuca-store/haphackeyser.html 04:37
Khisanth curses at the cost of laptop parts 05:23
gaal sri_: ping 05:28
sri_ gaal: pong 05:30
gaal good morning! you were looking for caller? 05:31
sri_ yea!
gaal it works, but you need the parens: caller().subname.say
sri_ and morning!
gaal see Prelude.pm for the grit, and Carp::longmess there for example usage. 05:32
sri_ has it changed recently?
my pugs is 2 days old
gaal i don't think so, but i haven't used it in two days :) let me 'svn praise' :)
sri_ and it returns undef
:) 05:33
gaal is your caller the top level?
?eval sub x { caller().subname } x 05:34
sri_ that may be
gaal this will be undef because x is called on top level
anyway make sure you use the parens.
sri_ it should at least have package
and line
gaal hmm, arguably you're right. does p5 work that way? 05:35
sri_ mhm
gaal hey, it does! 05:36
Khisanth never realized how important the - was 05:37
gaal perl -le 'sub x {print for caller} x'
what - ?
Khisanth the key
gaal ?
Khisanth gaal: broken keyboard 05:38
gaal aaaahhhh :)
i believe the shift becomes the most important key with perl.
sri_ stop crying and remap!
Khisanth and a replacement seems to cost around $100USD
sri_ :)
gaal sri_: how bad do you need this fixed?
sri_ have to check... 05:39
Khisanth sri_: I was trying to type perldoc -f :/
sri_ i really need it... 05:40
not that important for development, can use constants, but once other people start hacking on it too... 05:41
gaal oh of course it'll be fixed :) i'm just asking how urgent it is
can you please add tests to t/builtins/caller.t ? 05:42
i'll work on it
sri_ will do 05:44
gaal sri_++ 05:45
sri_ gaal++
gaal sri_: after looking into the p5 caller some more, i'm not sure it does work there. 05:55
when you use caller(EXPR) in this case you get undef: 05:56
perl -le 'sub x{print for caller(1)}x'
it's only when you call the EXPRless caller that you get that info, and EXPRless caller isn't quite specced in p6 05:57
rather, it means "caller(Any, :skip<0>)"
which would not do what you want.
sri_ hmm...i just need the package somehow :) 05:58
gaal what's your use case?
i can imagine p5ish "import" wanting to respond to its "use" caller. 05:59
hmmm, that's certainly a legitimate wish :)
((how does importing work in p6? apart from 'is export' which is kinda blunt?)) 06:00
sri_ ;)
it seems like perl5 import... 06:01
gaal i'm beginning to think maybe Any here is a special case which in fact includes 'not defined'.. but this looks like it needs p6-lification.
sri_ i better wait with tests till you've decided 06:03
gaal i'm writing up a query.
sri_ need sleep now...nite 06:04
gaal night!
any lambdafolk about? 06:39
autrijus gaal: yes? 07:38
gaal thanks, #haskell helped me with my problem :) 07:43
autrijus cool 07:49
if your maybe type is monadic
pugs has maybeM 07:50
gaal it was a Maybe VCode
autrijus (in Pugs.Internals)
maybeM f m = fmapM m =<< f 07:51
surprisingly there's haddock around it.
gaal cool!
scook0++ # svn praise 07:53
autrijus scook0++ 07:54
autrijus praises gnoming in general and scook0 in particular
but now... breakfast
and then some serious alligator hunting fun
gaal hmm, i wonder where eyespoplikeamosquito is? might come in handy where alligators are concerned. 07:55
autrijus he's an alligator expert? 07:57
gaal well, he's australian, so he must be! 07:58
autrijus ah right!
svnbot6 r4782, autrijus++ | * use CGP core by default for external parrot. 08:01
r4782, autrijus++ | * test and use CGP core for embedded parrot too.
autrijus Siracusa++ # lol! "thread necromancy" 08:02
that's a wonderful meme
p6l is so full of necromancers
xerox `meme' ? 08:03
autrijus meme is a memetic concept that says memes, like genes of organisms, dictates and manifests our thoughtst, and so are suspect to memetic engineering 08:04
mugwump sounds like psychohistory
autrijus or, in words of J. Joyce, that dead people rushes to capture my tongue 08:06
which ironically is just what happens with Joyce and me.
# en.wikipedia.org/wiki/Meme
gaal autrijus, speaking of Joyce, do you know the Litter? 08:10
mugwump was referring to en.wikipedia.org/wiki/Psychohistory...ctional%29 :)
gaal www.livejournal.com/users/antinous/19017.html
btw the translation is brilliant, as good imo as the origina. 08:11
historical context: while Joyce was publishing _Work in Progress_ (previews of _Finnegans Wake_), he got this "Litter" from one Vladimir Dixon. He liked it so much that he published it in the next issue 08:15
and his readers didn't believe that it was authentic, claiming he had made it up himself.
but in fact he had not: there was a Vladimir Dixon. 08:17
autrijus that letter doesn't read like joyce at all :) 08:18
gaal it does't read like "The Dead", but hey, it fooled his contemporaries who were reading FW sneak previews :) 08:20
in any case, i don't recognize your original reference (not that i'm very well read in joyce!) -- where's it from? 08:22
autrijus geez, I forgot. it's somewhere in the FW. 08:23
(but that's not saying much if at all.)
(everything is in FW.) 08:24
gaal well, at least now i understand something you told me
you said haskell is easy :)
xerox You do have such a big love for acronyms.
gaal FW == _Finnegans Wake_
autrijus gaal: hm? it _is_ easy :)
xerox falls
autrijus only problem is it must be learned and can't be taught 08:25
and the only way of learning is by coding it into your brain :)
(since it, unlike perl, has absolutely no root in everyday linguistics and metaphors)
s/unlike/in direct contrast to/
gaal here's another conjecture: anyone who completes FW can pick up Haskell, easy! 08:26
autrijus right!
although I can't claim "complete"... far from it
I'm not even sure I have read every word. probably.
gaal well, you know what Joyce said about it... 08:27
...it took him ten years to write, and he expected his readers to spend as much on it too.
autrijus nod
incidentally the only way of reading FW is by coding it into your brain, too, afaic
I've translated the first page, then gave up 08:28
took me ~3 days to arrive to a moderately acceptable translation.
(to trad. chinese)
gaal i never even tried. i read the first chapter of _Ulysses_ with great difficulty - it was very beautiful, but i guess i ran out of tuits. 08:29
xerox What is Finnegans Wake?
autrijus oh well. maybe some day I'll write some program to translate it for me, based on fuzzy matching with huge corpuses and opencyc etc.
gaal xerox: a novel by James Joyce 08:30
autrijus xerox: www.finnegansweb.com/wiki/index.php/Main_Page
gaal autrijus, how did you manage The fall (<insert a hundred characters>)?
xerox I found this www.trentu.ca/jjoyce/fw-3.htm 08:31
autrijus gaal: right... because of the ideographical nature it's actually easy
gaal not that i'd be able to understand your result, not knowing chinese
autrijus because the sound and meaning are separate
to a degree
and for each syllable there are dozens of characters that sound the same to choose from
gaal nods 08:32
is it immediately clear to a reader that that paranthetical clause is nonsense? 08:33
autrijus sure... it's very easy to make immediately clearly nonsensical chinese sentences :)
gaal that must be a useful trait for the purpose of translating Joyce :) 08:34
autrijus :) 08:35
right. for a few months my poems were quite joycean
that is, until my readers complained in pain ;)
xerox never wrote poems. 08:37
gaal is saddened by the thought that he will likely never appreciate a poem in chinese.
autrijus notes the abundance of truth-speaking lions in this world 08:38
gaal "wipe your glosses with what you know" -- Joyce
xerox It's so sad I always have to ask you what does it mean what you said :) 08:39
But maybe this time I got the metaphore right.
gaal presents autrijus with a volume of works by Borges 08:41
xerox b0rgs? 08:43
autrijus reads all the forking volumes at once
gaal ./pugs -e 'my %x;my $a=4; %x<<$a>>=1; say %x.perl;' 09:20
=> {('1' => 1)}
pug-p?
bug-p, that is?
mugwump ok, so I've almost got stevan's Pod-Event-Parser and Kwid-Event-Parser plugged into a Perl5 Perldoc.pm... 09:26
should I include Perldoc.pm in lib/ perhaps? Or just make it a dependancy in their Makefiles? 09:27
stevan: about? 09:31
svnbot6 r4783, iblech++ | Usual svn props (including appropriate svn:ignore) added to sri++'s 09:45
r4783, iblech++ | Module-Pluggable-Fast and HTTP-Server-Lite.
gaal i've encountered a weird bug with %:privhash = () 09:57
unfortunately it's difficult to isolate.
i can't even describe what it's doing, i think it's a delayed crash. 09:58
anyone got a linux box and a few minutes to see if this segfaults for them?
gaal suddenly remembers feather 09:59
misc gaal: yes ?
gaal misc: please svn up 10:01
then ./pugs examples/obfu/l33t.p6 10:02
you enter the interactive debugger
hit "C" (clear all breakpoints)
svnbot6 r4784, gaal++ | debugger for l33t interpreter
gaal then hit "r" (run)
this should just trace the program and exit
misc gaal: i do not have the svn version of pugs 10:03
gaal after you confirm this works, please go to line 195 of l33t.p6
oh, you don't need a very new pugs
just the new l33t.p6
hold on
misc ok
gaal svn.openfoundry.org/pugs/examples/obfu/l33t.p6
svn.openfoundry.org/pugs/examples/obfu/l33t.p6 sorry 10:04
misc no problem, works fine
wget is able to add http:// :)
gaal :)
k see what happens when you run that
misc a error 10:05
gaal actually - with the code i ci'ed if you C then r, you'll exit soon.
all right, now edit l33t.p6, and comment out line 195
then try again.
misc gaal: pastebin.com/301314 10:06
gaal (the line saying %:breakpoints = () )
misc same error with the comment
gaal oh, err hmm.
misc with pugs 6.2.7
gaal you need a newer pugs :( 10:07
autrijus fixed ^^= last night
sorry, forgot
misc i can try to compile it somewhere, i guess
gaal don't bother, i have a (slow) linux box, and there's also feather.
thanks :)
misc well, if this is just a simple program, i have a fast linux box somewhere dedicated to building 10:08
gaal okay! :) 10:09
pageant++ # ssh-agent by PuTTY author
crysflame pageant++ # integrates with winscp 10:10
misc gaal: ok, so i have finished, i see no error when using C and r 10:23
svnbot6 r4785, iblech++ | Pugs.Prim -- Fixed "a b c".split(" ").
r4786, iblech++ | t/ -- Various unTODOs, unEVALs, and eval "..." -> eval("...") transition.
gaal i think it may be "simply a bug" but having no *pugs* debugger investigating this is... fun :)
thanks then!
misc gaal: i removed the comment, i have seen no crash 10:25
gaal: i just stopped 2 minutes later instead of 2 secondes
gaal but the program terminates much sooner
when that statement is executed
"C" merely removes breakpoints -- that ought not make a debugged program terminate any faster ;-) 10:26
svnbot6 r4787, iblech++ | * Benchmark.pm -- Worked around a Pugs bug and made benchmark results displayed 10:36
r4787, iblech++ | as whole numbers.
r4787, iblech++ | * kv.t -- Added a test for the bug which caused Benchmark.pm to stop working.
r4788, iblech++ | * Pugs.Embed.Parrot -- Pass contents of %*ENV<PUGS_PARROT_OPTS> as option to parrot. 11:09
r4788, iblech++ | * pugs::run -- Document this new environment variable.
r4788, iblech++ | * util/livecd/linuxrc -- Set PUGS_PARROT_OPTS to "-jO" for maximum speed.
r4789, iblech++ | * evalbot.p6 -- Unbroke evalbot. 11:13
r4789, iblech++ | * evalhelper.p5 -- Added a safe &say.
r4790, iblech++ | Pugs.Prim.Eval -- Made putter+'s (first part of a) %*INC patch safe. 11:35
r4791, iblech++ | mklivecd.pl -- Increase default initrd size and create /tmp on the initrd so 12:04
r4791, iblech++ | eval("...", :lang<PIR>) works.
gaal "5" ~~ rx:perl5/(([-+])?\d+)/ => what should $0 and $1 be? 12:18
$2 is undef; currently $0 strigifies to 5 and $1 to "" 12:19
which i can't make any sense of. 12:20
iblech I think that's correct... $0 is the outer group ("([-+])?\d+" -> "5"), and $1 is the inner group ("[-+]?" -> "") 12:22
gaal oh! yes of course 12:23
thanks
okay i still have a weird crash. isloating.
hmm. somehow this has to do with an our $VAR being poisonous, triggering an exit when read. 12:26
oh! no, i mistyped the variable. but then how did my program parse? 12:27
and why is there no error message?
iblech Currently, there're no compile-time checks for non-existing variables 12:28
So "my $z; $fooo" will always parse
gaal but at least die usefully at runtime?
iblech Yep, it should die with an appropriate message at runtime 12:29
pugs> my $x; $y
*** Undeclared variable: "$y"
pasteling "gaal" at 192.115.25.249 pasted "please help roo debug the debugger!" (355 lines, 11.1K) at sial.org/pbot/11188
gaal okay, please run the nopasted file and at the prompt type "ip 5" 12:30
or any other integer
then see line 223, where i made a typo:
i used $MAXMEM instead of $MEMSIZE
(silly me)
but the program terminates immediately when that happens. 12:31
aaaah no no no!
sillier me
i have a try!
beh, sorry about that :)
hmmm, how do i rethrow uncaught exceptions?
iblech Hmm... die $!?
gaal where, in a separate CATCH block? 12:32
malaire hello all. I'm having problems with rules. "Hello" ~~ rx/../ gives error: *** Cannot parse PGE: .. / *** Error: end of file
iblech Eventually, yes, I think. For now: try {...} die $!
gaal try { code code code CATCH Interesting { } CATCH { die $! } } ?
ok 12:33
malaire: you need parrot for p6 rules
malaire I have parrot
gaal either compile against that or use perl5 regexps
iblech malaire: Known. This is because currently, some major Parrot internals change (the calling conventions)
malaire ok
nothingmuch_ wonders how his friends can survive with so little sunlight
12:34 nothingmuch_ is now known as nothingmuch
gaal okay, how do i rethrow an exception from the context of the original throw? :) (can i?) 12:34
iblech Not sure if this is want you want: 12:35
pugs> try { die "Hi" }; if $! eq "Hi" { die $! } else {...}
*** Hi
gaal iblech, no, i got the selective die working all right - what i want is for the rethrow to give the stack trace as if no try {} was there. 12:37
that is,
i don't want to intercept ALL exceptions.
iblech Ah
Don't think you can do that yet
gaal k
aha! 12:50
./pugs.exe -e 'class C;has Bool %:x; method x{%:x=();%:x<a>; say "alive"}C.new.x'
*** Cannot cast into Hash: VRef <Array>
%:privhash = () screws it up.
this doesn't happen to normal hashes. 12:51
it DOES happen to public member hashes.
svnbot6 r4792, iblech++ | Main, Pugs.Run -- Display a "Loading Prelude... [some seconds] done." message 12:55
r4792, iblech++ | while loading the Prelude in interactive Pugs. Please bikeshed at will
r4792, iblech++ | (add/remove newlines/dots, etc.).
gaal lol
svnbot6 r4793, gaal++ | add test for %:hash=() messing up the member 13:03
gaal hmmm, now i think i understand: this bug happens because of what autrijus said the other day, that attributres are not locked but are rather simply hash elements. 13:10
sounds like a good idea. 13:45
iblech k, will do it then
gaal why did the &say trap break evalbot? 13:46
oh, shouldn't it have been a "~" there?
instead of a "+"
13:47 sbkhh is now known as Odin-
iblech Exactly, before my fix there was a "+", causing evalbot to not be able to evaluate anything 13:47
gaal .....but it looks like the fix is to remove everthing instead of to change it to ~. why?
iblech Look at evalhelper.p5 :) 13:48
I added a &say to evalhelper.p5, which safe_print's its arguments
gaal ah :)
xerox st 13:49
Oops, sorry.
putter PGE is currently broken?!? 13:50
svnbot6 r4797, iblech++ | Moved t/rules/from_perl6_rules temporarily to t_disabled, as a) PGE is
r4797, iblech++ | currently broken, so the tests are not of much use and b) if one has embedded
r4797, iblech++ | Parrot, it seems, even the guard to see if rules are available at the top of
r4797, iblech++ | each from_perl6_rules/*.t will cause the entire pugs process to die, causing
r4797, iblech++ | 400+ test failures.
iblech putter: Yep. Because of the calling conventions change 13:51
putter Ahhh. tnx.
integral why not just fix PGE?
putter moves rx on p6 emitter up his todo list.
autrijus rehi \camels! 13:56
putter is trying to figure out how modify Emit/PIR.hs to include keyed expressions... 14:01
autrijus putter: first compile it? :) 14:02
preferably as calls to &circumpostfix:{}
putter Yes... I've been working in the other direction, write &circumpostfix:{} first, then (hypothetically;) edit compiler... 14:03
autrijus nice :D 14:07
putter can one have "flattened" recursive "data"s? data A = B | C | D (AbutnotD) 14:08
I'm trying to avoid adding a constructor level to distinguish primitive from keyed lvalues. 14:09
autrijus a constructor level is probably best if you are aiming for general purpose emitters :) 14:11
to answer your question, yes, you can do that with GADTs with existential quantification
I did it with IVar in pugs; PAST uses GADT too although not yet existentially quantified
data A a where
B :: A Foo 14:12
C :: A foo
D :: A Foo -> A Bar
s/foo/Foo/
svnbot6 r4798, autrijus++ | * oops, typo in short circuit logicals
r4799, iblech++ | util/livecd/linux -- Don't pass "-O" to parrot, as currently, it'll segfault
r4799, iblech++ | instantly.
r4800, iblech++ | util/svnlog2graph.pl -- Adjust scaling again, as we're approaching r5000. :)
autrijus you can pick any value of foo and bar
they doesn't matter :)
but normally you pick a type so you can write something like
reduceA :: A a -> a
also you can do 14:13
E :: (FooBarClass b) => A b -> A Baz
and then instantiate Foo/Bar into FooBarClass
to get selective memberships
autrijus praises GADT for putting the "funk" in "funktional programming"
putter oy. ;) 14:14
ok, constructor level. :) Thanks.
autrijus np :)
autrijus focuses on Syn := and other syns
baxteras hi, when i try to call $agent->click() through www::mechanize i get this error : "Unexpected field value www.mysite.com/ at (eval 5) line 1" , what can be wrong? 14:33
autrijus kindly refers baxteras to #perl :) 14:34
because, although I'd greatly desire that, WWW::Mechanize has not yet been ported to perl6
baxteras well i asked there too , thanx anyway:)
autrijus looks like you have an old version of HTTP::Headers. 14:36
upgrading it from CPAN should fix this problem.
baxteras hmm i ll try that 14:40
stevan autrijus: any releases planned for this weekend? 14:58
mugwump: I think we should port Perldoc to perl6 15:01
it should be pretty simple to get the DOM part working
we can use Tree instead of Tree::DAG_Node 15:02
ok, off to run errands &
pasteling "putter" at 66.30.119.55 pasted "fishing for haskell feedback" (42 lines, 971B) at sial.org/pbot/11191 15:05
putter autrijus: As I get a bit bogged down in Compile/PIR.hs, I though I should sanity check / look for feedback on the core change. 15:06
autrijus stevan: I think the plan is to changelogging and releng etc during today and tomorrow
stevan: and I'll releease on monday
the night before I fly to .ca
putter iblech: any comments welcome. and anyone else.
autrijus putter: I already got lvalue functions 15:07
so it may be better to treat them as such 15:08
I'll check in my code
putter ok. no hurry.
autrijus putter: they're in. 15:20
let me check in %ENV support 15:21
sec
putter 'k. (I was just wondering where %*ENV initialization would go...:) 15:24
svnbot6 r4801, autrijus++ | * postcircumfix as lvalues 15:26
Khisanth autrijus: wouldn't porting WWW::Mechanize require porting LWP::UserAgent first? 15:31
autrijus right 15:36
yay, worked on first try! 15:37
*Main> runPIR "say %ENV<USER>" 15:38
autrijus
autrijus praises formalism
svnbot6 r4802, autrijus++ | * Keyed access: `say %ENV<USER>` now works. 15:43
putter for anyone backreading, fyi, the key (no pun intended) flaw in the recent paste sial.org/pbot/11191 was attempting to have keyed literals... which is silly, when you're not confusing symbols with literals, as I was. 15:49
autrijus :)
putter Postmortem lesson - if your code size is exploding, reexamine your assumptions to make sure your not doing something silly. 15:50
autrijus however. my emitter is currently wrong 15:51
because the type system allows for nested keyed
for the idx part
eg. $P0[$S1[$S2]] 15:52
er
eg. $P0[$P1[$P2]]
which is patently unsound. the emitter should use the temp* for each intermediate level, but the margin of my screen is too narrow for me to finish it completely, or something :)
putter Sigh. Oh, yeah, _that_ was what motivated 11191. No keyed literals involved. Postmortem lesson... have lunch before doing further postmortems. 15:55
autrijus however I believe it is indeed a sound Expression type :) 15:56
it's just the emitter needs work.
putter Ha. I was thinking of it as they types the emitter uses to constrain the problem to correctness, rather than as an api for the emitter. neat. 16:02
autrijus tries making all pugs types typeable.
ah. no.
PIR is an "idealised" PIR. 16:03
we are free to work around all the messes in PIR
as long as the translation does not involve lose of information either way
(which this nested key satisfies)
putter feels warm fuzziness towards design described. 16:04
autrijus has always wanted a typed assembly language with first class full continuations 16:07
...and now we have one!
Juerd autrijus: I don't think your web scripting idea with continuations will work well :) 16:17
svnbot6 r4803, autrijus++ | * make all our monomorphic function types explicitly Show'able,
r4803, autrijus++ | to ease debugging and enforce thorough Typeableness..
autrijus Juerd: you mean Seaside sucks, or something else? :)
nothingmuch damnit!
autrijus and/or Cocoon
Juerd autrijus: I don't know. What is Seaside?
nothingmuch can anyone figure out where malev flight ma0094 will land and when?
autrijus Juerd: Seaside and Cocoon are two successful applications of web continuations. 16:18
Juerd I see a problem with web shops where you open category pages in different tabs
autrijus they represent the state of art today
Juerd And then you end up with $x different shopping carts :)
autrijus look at Seaside (and Halo) especially; it's lots of fun.
Juerd I'll have a look
autrijus Juerd: er, no, it's just like threading; shared resources are still shared.
think of it as ithreads for web.
whereas the current "sessions" are 5005 threads. 16:19
Juerd But shared resources outside process boundaries is exactly the same as sessions, are they not? :)
Juerd probably misses an important difference
putter So, the reason [lit curPad] in Compile/PIR is returning "-1" rather than -1, thus breaking new_pad and store_lex, seems to be
autrijus Juerd: the difference is page to page is no longer GOTOs.
Juerd: you are allowed to pass a coroutine to your user's browser
which will yield back to you
Juerd is online with his EDGE card now btw - fully mobile, and reaching up to 20 kB/s
autrijus in the standard coroutine fashion. 16:20
putter instance LiteralClass Doc Expression where lit = ExpLit . LitStr . render
LitInt should work... but I'm still not sure if it will break something else.
Juerd autrijus: Yes, but there is other syntactic sugar for this too -- how it works internally isn't too relevant for programming
I think this idea works best for wizards
autrijus Juerd: I think once you think the web application as CPS, it will make more sense to you. 16:21
Juerd Which is nice, except that wizards suck on the web, because a webpage naturally scrolls :)
autrijus where the user is just another coroutine thing.
so it's also for portlets
Juerd What does CPS stand for?
autrijus continuation-passing style
Juerd I look forward to actually trying this out with Perl 6 :) 16:22
autrijus meanwhile you can try it out with Smalltalk/Seaside, JavaScript/Cocoon, Ruby/Borges etc first :)
putter Juerd: RubyOnRails aswell
Juerd RoR uses this? 16:23
Juerd has used it, but never got the impression it had anything to do with continuations
autrijus no, RoR does not... RoR only uses continuations within a single request
it does not marshall it
putter ah, ok.
autrijus but it is useful for intra-request things
Juerd I'm particularly interested in persistent continuations, yes 16:24
That is: the ability to continue after a reboot :)
(That'll be more important for me than web programming)
autrijus Juerd: anyway, omniprecient debugging is likely as hot, if not hotter, as an application
Juerd Yeah - writing a program will be much more like editing a file: undo and redo. 16:25
autrijus yup.
Juerd In fact, I really wonder if writing during execution would work well.
Or the other way around
autrijus DrScheme has the UI for this
like, completely
showing reduction for each step
and let you interactively navigate the entire module tree and their deps
and refactor easily
Juerd External editors probably work better
autrijus I have since seen the light :) 16:26
Juerd But it'll be interesting to see different uis
My main problem is that I only know Perl well :)
autrijus that's fine. we'll have that reflection in perl6 :)
putter notes the store_lex "-1" problem is fixed. 16:30
svnbot6 r4804, putter++ | In Emit/PIR.hs, changed curPad from Doc to Int, so store_lex/new_pad are not given a stringified "-1". 16:31
autrijus nice! 16:33
autrijus notes that Test.pm is now compiled.
nothingmuch GAH! this is so annoying 16:34
putter hypothesizes autrijus has already implemented PBind... 16:36
autrijus putter: that's just a straight copy and past from PAssign
changing <== to <:=
'tsall
Juerd autrijus: Compiled as in all PIR?
autrijus Juerd: right.
svnbot6 r4805, autrijus++ | * Emit binding; handle tCxt; Test.pm is now compiled...
Juerd auThat's really neat 16:37
autrijus seven days :)
Juerd Oh, lovely - I type faster than the connection can handle :)
So irssi thinks I'm pasting
putter ahhh. :)
autrijus now I need to add optional params
and then... profit!
Juerd autrijus: Congratulation. This is a huge mile stone, for outsiders to see. 16:38
putter nothingmuch: smoked parrot?
Juerd s/ion/ions/
putter realizes nothingmuch has made several exclamations of annoyance... oh, did you find your flight info yet? 16:41
nothingmuch no, i am so frustrated
i can find the same flight for today 16:42
or search by date, which doesn't work
or search for flights departing tomorrow
autrijus oh wow.
phone them?
nothingmuch that means getting up
Juerd Hm, a google hit for "dead perl people" on my site, juerd.nl
Why would anyone search for that? 16:43
rindolf autrijus: here?
Juerd Look who's there.
Hello, mr. fish.
autrijus rindolf: yo 16:44
rindolf Hi Juerd
autrijus: can XML::RSS::Aggregate handle RSS 2.0?
autrijus rindolf: it can handle whatever XML::RSS can handle, I think?
rindolf autrijus: well, it seems that it does not grok pubDate at all.
autrijus however XML::Feeds (or is it XML::Feed?) is nowadays hipper. 16:45
and TorgoX (i.e. SBURKE) has a never aggregator
rindolf autrijus: OK, thanks.
autrijus not sure if he uses X::F there, but you may want to take a look
np :)
s/never/newer/; # heh jungian slip
Juerd What is 'jungian'?
autrijus er, just random variation. Carl Jung 16:46
Juerd can't stop playing with the external antenna of this EDGE card 16:47
I should investigate if I can stock spares :)
nothingmuch damnit! how can an airline not be open 24/7?! 16:49
UGH! UGH! UGH!
putter Call an office in a different timezone...? (modulo $$) 16:51
autrijus: are you writing an @ENV walker, or should I?
err, @END walker.
autrijus please do! 16:52
putter k
autrijus I'm working on callconv.
with both fixed, we have a realistic chance of getting Test.pm supported
rest of work is just filling in prims.
nothingmuch putter: it's weekend, they're open mondays through fridays, 9-17:00 or something useless like that
"all our lines are busy. You can buy your ticken on www.malev.com" 16:55
but you can't find out what time it gets there, can you?! 16:56
17 16:57
wow
Juerd life without icmp sucks. 16:59
nothingmuch icmp is like introspection support for network equip
Juerd nothingmuch: botsnack
:) 17:00
nothingmuch botsnack?
Juerd Never mind :)
nothingmuch please explain
Juerd I doubt I can
Forth ping......the ping(isReachable()) comes with J2SE 1.5 doesn't work properly 17:03
nothingmuch huraah 17:04
was that out loud?
Juerd nothingmuch: What? 17:08
nothingmuch Never mind :)
putter nothingmuch: but they have offices all over the world. perhaps, say, JFK will be open. 17:11
nothingmuch putter - i got the info 17:12
terminal 3, 17:50
i had to wait a few minutes, in which I was told a few more times that the lines are busy and that they have a website
21st
putter autrijus: is there a vision for backend-specific code in prelude, postlude? It took a while to sink in, but its silly for me to be writing PIR for a simple perl expression to be used by something which already knows how to convert one to the other.;) 17:16
Vision as in "common file, flagged" or "separate files" or ... 17:17
nothingmuch what's the name of gƶdel numbering of programs? 17:21
autrijus putter: let me take the Vision Drug... 17:28
...yes, I see visions!
I see each Emit layer providing the lowest level primitives
crysflame autrijus: have you read the parrot/javascript discussion at use.perl.org/comments.pl?sid=22069&cid=33574 17:29
autrijus I see them all implementing the same Pugs::Internals::*
in native code or in perl 6, doesn't matter
I see a shared Prelude.pm making use of those ::Internals functions.
crysflame puts on sunglasses
autrijus I see the descendent of silicon based life forms and carbon based life forms join hands; where a lifeform is not judged by its chemical composition, but by its character. 17:30
er, sorry, too far.
autrijus ends tripping
crysflame blinded by the awesome view
e l 17:31
autrijus nice stereograph
crysflame :)
putter lol 17:33
autrijus crysflame++ # lxr.mozilla.org/mozilla/source/js/narcissus/ -- JavaScript in JavaScript 17:34
with this, Emit.JS may not be difficult at all :)
autrijus praises narcissism 17:35
otoh, it actually makes JS->PAST easier, not PAST->JS.
crysflame blast.
crysflame scores a point on the wrong field. 17:36
autrijus nah, it's useful bothways :)
crysflame mental image of playing soccer on an N-dimensional soccer field with a goal on every slice
"oops, i scored one three degrees kata"
i was out really late last night, so i'm going to rest for a while longer. will think about this and let you know if i run into something,. 17:37
svnbot6 r4806, sri++ | Renamed HTTP::Server::Lite to HTTP::Server::Simple 17:40
crysflame pre.plt-scheme.org/plt/collects/alg...compile.ss # AST to Scheme compiler written in .. something lisp 17:50
www.gnu.org/software/kawa/ # Scheme to Java
www.livejournal.com/community/lj_dev/600713.html 17:51
# compiling S2 to Javascript; resembles a Class:: module from CPAN written in JS 17:52
autrijus: which part are you looking for? emit, parse, ...? 17:53
autrijus crysflame: all... but just emit for now 17:59
crysflame there are several emit variations across platforms - does having it in multiple source languages help? haven't found any js emit paired with PAST.. 18:04
autrijus don't need PAST 18:05
just bare js emission and ast
i.e. some kind of a js ast with js prettyprinting
putter autrijus: any quick suggestions on getting @END, populated by the parser, into the compiler. (putter's mental model of the connection is... cloudy, like concrete). 18:07
autrijus putter: hm? you should have @*END as part of the globals, no? 18:08
putter: so in line 105ish define it as canCompile
then reduce it to a Decl
i.e. a sub
that when called, yields the PerlArray that represents @*END
then finally call that in the init
putter Parser.hs sticks END{} clauses into @END at compiletime... have @*END yes... will look... thnx 18:09
ahhhhhh. 18:11
svnbot6 r4807, putter++ | In PIR, run elements of @*END. But @END isnt populated by END{} yet. And this PIR implementation should be replaced by something like a PostludePIR.pm.
putter svnbot6-- # high latency 18:12
crysflame laszlo implemented lzx dtd which is then translated into a subset of ecmascript 18:15
the LZX DTD, and a schema which "defines the LZX tag set"
i'm not sure that's AST though. 18:16
autrijus it is. 18:21
crysflame it uses embedded javscript and thus might not cover much. erhg. 18:28
sri_ has perl6 a built in Class::Data::Inheritable alternative?
autrijus sri_: hrm, I'm not familiar with CDI -- look at S12? 18:29
sri_ *looking* 18:30
otherwise i'll just port the perl5 thing 18:31
autrijus that sounds fruitful too
sri_ shouldn't be that hard 18:32
whats the new way to do *{"foo"} = sub {} ? 18:46
autrijus our &foo := sub {...}; 18:48
Darren_Duncan good ... noon
autrijus yo darren-san!
Darren_Duncan currently I have 4807 all 'made' 18:49
sri_ our &{$name} := sub {} ?
iblech our &::($name) := sub {...}
sri_ aah, sweet 18:50
thx
svnbot6 r4808, iblech++ | * Emit.PIR, Pugs.Compile.PIR -- Added %*ENV and @*END. Eventually, we'll have
r4808, iblech++ | to write our own find_name wrapper (or fix Parrot's find_name appropriately).
r4808, iblech++ | * Usual svn props added to ext/HTTP-Server-Simple/.
Darren_Duncan question ...
autrijus iblech: fix parrot's find_name is the Right Thing :) 18:52
"all languages are equal on parrot..."
"...but perl6 is more equal than others"
Darren_Duncan unless it already exists, I was going to add a test for that Array/Hash/etc that are anonymously declared as sub/method arguments are preserved as those container types through the passing, and not turned into List types 18:53
so where in the test tree should I put it?
autrijus Darren_Duncan: t/pugsbugs/ or t/subroutines
Darren_Duncan also; add a new file or expand an existing one?
putter Thanks, iblech. I was just about to write "uncle".
autrijus a new one makes sense
putter (Re END{}) 18:54
iblech There are some tests for that in builtins/arrays_and_hashes/{kv,pairs}.t
Darren_Duncan btw, why is there a 'pugsbugs' directory? shouldn't any failing test represent a pugs bug?
putter putter happily turns to the back of the book to see the answer... 18:55
autrijus Darren_Duncan: the idea is they represent failing tests that the writer knows not the cause
and is not sure where to categorise
so will be categorised upon fixing
Darren_Duncan okay
now, if I put this under subroutines because it manifests there, but the cause is actually broader, will someone move the test on fixing it? 18:56
autrijus sure!
none of the directories are immobile
in fact, the only thing immobile in the pugs tree is the "." directory. 18:57
;)
nothingmuch theages.superman.ws/Encyclopaedia/i...ainiac.jpg 18:58
putter Oh, END{} still isnt done. 19:01
ok, I'm going to timeout on attempting to get END{} compiled into PIR. I'm wheel spinning, so I leave it to someone else. 19:02
autrijus, iblech: Is that really a find_name problem? Having find_name understand multiple component names, that's a find_name problem. But, 19:05
the idea that %*ENV, or rather %::*::ENV means a variable %ENV in the global namespace, that seems a compiler issue. %*foo should emit as find_global "%foo". 19:06
no?
autrijus that is correct.
find_name has another issue, namely dealing with :: vars
autrijus is still killing the callconv alligator 19:07
almost done
putter autrijus: re, find_name has another issue, namely dealing with :: vars, do your mean $a::b vars? if so, thats the same multi-part name problem... where $a::b should emit as find_name ["a";"$b"], but find_name doesnt support it yet... 19:24
putter is cleaning up a regexp grammar... 19:25
autrijus right
iblech Hm... and what about &infix:<+> returning &infix:+? 19:28
autrijus proceeds to add core ops into parrot
iblech: I think it should be normalised by the compiler... 19:29
iblech But what about $var = "infix:<+>"; &::($var)?
autrijus the &::() emitter should be a func call.
iblech And (say) &Pugs::Internals::symbolic_deref will do the normalisation then? Sounds ok 19:30
autrijus right. 19:31
svnbot6 r4809, iblech++ | Emit.PIR, Pugs.Compile.PIR -- Implemented $::(...) (symbolic dereferentiation). 19:33
autrijus ok, we'll soon need trunk parrot
sri_ hah, Class::Data::Inheritable is quite pointless...there are class attributes now :) 19:38
autrijus okay, parrot #8416. 19:39
svnbot6 r4810, iblech++ | Pugs.Compile.PIR -- Normalise "&infix:<+>" to "&infix:+" etc. at compile-time,
r4810, iblech++ | if possible.
autrijus my next commit (optional args) will depend on that.
iblech sri_: There are? Give an example please :)
autrijus our $foo and my $bar
sri_ just use my or our instead of has
our $.foo is rw; 19:40
wonder if it's values are supposed to be inheritable too? :)
iblech our/my + $.vars is allowed? Didn't know that, cool :) 19:41
sri_ pugs -e 'class Foo { our $.foo = "bar" } say Foo.foo' 19:44
parses but doesn't work :/
svnbot6 r4811, iblech++ | Added PIR to the list of valid backends to Pugs.Help and pugs::run. 19:46
r4812, Darren_Duncan++ | added new test set t/subroutines/arg_ref_type_preservation.t which validates that array and hash refs passed as sub/method args remain as 'Array' or 'Hash' and are not turned into 'List'
Darren_Duncan that's that then 19:47
putter Darren_Duncan: and not a little bit of pain that has caused... :) 19:52
Darren_Duncan indeed
it's the result of my trying to figure out why my LKT methods were returning the wrong output 19:53
took many hours to isolate this cause 19:54
autrijus huzzah! 20:00
*Main> runPIR "sub foo ($x, ?$y=$x ) {say qq[$x, $y]} foo(1,2)"
1, 1
that's of course wrong ;) 20:01
Darren_Duncan indeed
putter Darren_Duncan: Perhaps we need something like a bulletin board. Perhaps a page on the wiki. Where things like this can be posted. When I found the problem, weeks ago, I created failing tests, now dark green. Which by your own experience wont help the next person... 20:02
autrijus: huzzah!
:)
Darren_Duncan there are so many tests that it's sometimes hard to know if one checks for the issue or not 20:03
autrijus it's a parrot bug ;)
putter ha
Darren_Duncan a web thingy could be useful where people sort of describe bugs, and then separately a note could be attached that says it is tested for in test foo.t and/or fixed in revision N 20:04
putter Darren_Duncan: if only tests had uids, the obvious thing to do would be to have an "advice" overlay, which presented its advice until the associated tests started passing.
;) 20:05
Darren_Duncan whatever works
anyway, I'm off to do some Perl 5 now ... ping if you want my attention 20:06
svnbot6 r4813, sri++ | Added tests for class attributes
putter & 20:07
autrijus ok, optionals landed
iblech: the plan is to discard Parrot.hs entirely soon
and alias it to PIR in run etc 20:08
svnbot6 r4814, autrijus++ | * Optional parameter support:
r4814, autrijus++ | sub foo ($x, ?$y=$x) {say qq[$x, $y]}
r4814, autrijus++ | foo(1,2);
r4814, autrijus++ | (currently optional args always discard their args --
r4814, autrijus++ | but it's a parrot bug ;))
iblech autrijus: So we should remove all pointers to -[BC]Parrot in documentation? 20:09
Darren_Duncan why?
autrijus iblech: I don't care really... I think keep the current Parrot name is fine
Darren_Duncan more like, add a pointer that says a certain bug is on the Parrot side
autrijus if only as alises internally
sri_ someone pls implement t/oo/class/attributes.t
=) 20:10
autrijus sri_: that someone would be me, but please wait a bit :)
(other \folks can take a stab too)
Darren_Duncan: er, we're talking about the new PIR backend and the old Parrot backend
Darren_Duncan okay 20:11
sri_ autrijus: mkay... :)
Darren_Duncan on that note, 6.2.8 was mainly about getting this new backend made ... about how far along would you say you are between 0 and 100? 20:12
putter Darren_Duncan: its not a euclidean space. 20:13
svnbot6 r4815, sri++ | Added some more class attribute tests
Darren_Duncan so it's just ready when its ready, eh?
that's life 20:14
autrijus Darren_Duncan: I think I'm 15% there. 20:17
soon we'll hit a step where all missing are primitives and PMCs.
svnbot6 r4816, iblech++ | * Added the usual svn props to new arg_ref_type_preservation.t and
r4816, iblech++ | oo/class/attributes.t.
r4816, iblech++ | * Fixed oo/class/attributes.t (eval_ok -> ok eval(...)) and backlinked to S12.
autrijus which I hope the gnomes in hackathon will takeover. 20:18
Darren_Duncan iblech, what is involved in 'adding svn props' so I can do this myself with the files I create? 20:20
iblech Darren_Duncan: ./util/add-svn-props.sh file
Darren_Duncan okay; will try to remember to use in future 20:22
svnbot6 r4817, putter++ | The world needs a Perl6 regex pattern reference grammar. Here is a place to accumulate one. 20:24
autrijus hm, END is not part of the final globals? wtf? 20:26
Shillo autrijus: Er, END? Never heard of it. Oposite of BEGIN is CHECK, I think? 20:27
autrijus @*END
iblech Shillo: And there is END... The order is: BEGIN (compile-time, ASAP), CHECK (compile-time, ALAP), INIT (runtime, ASAP), END (runtime, ALAP) 20:28
Shillo iblech: Oh.
autrijus bbiab 20:29
svnbot6 r4818, autrijus++ | * prettyprint things a bit.
nothingmuch anyone got a script to make images smaller? 20:42
iblech convert -geometry 50% in.png out.png? 20:43
nothingmuch i mean like pallette indexing 20:44
svnbot6 r4819, putter++ | module/Grammars/rx_grammar.pl: added a few rules. You can too! :)
iblech convert -geometry 50% in.png out.png? 20:47
Err, wrong key
svnbot6 r4820, putter++ | module/Grammars/rx_grammar.pl: added pointers toresources.
r4821, iblech++ | Moved t/oo/attributes.t to t/oo/attributes/instance.t and 21:05
r4821, iblech++ | t/oo/class/attributes.t to t/oo/attributes/class.t.
r4822, iblech++ | Emit.PIR -- Added missing type signatures and &undefine. 21:25
r4823, iblech++ | Emit.PIR -- Added &exists and &delete. 21:39
iblech Gonna sleep, night :)
putter autrijus: how goes @END? 21:49
And large reptiles? 21:50
autrijus leo's asleep so reptiles needs to wait 21:51
I got @*END done
committing
putter no hurry, just curious. 21:52
autrijus commits, this time for real 21:59
svnbot6 r4824, putter++ | modules/Grammars/rx_emit_examples.pl: some examples of doing regexp engine generation from rx grammar :parsetrees.
autrijus $ ./pugs -BPIR -e 'END{say"Fin. Again!"} END{say"A way a long a last 22:00
Fin. Again!
A way a long a last
er, missing the trailing "}' 22:01
putter :)
autrijus but it works
:)
putter Yay!. Hmm, I have lost track, is that the end of the Test.pm todo? 22:02
autrijus no... there's a small matter of module lexicals 22:03
fixing
putter realizes that was... inconsiderate? Time for celebration. Next tasks... next.
svnbot6 r4825, autrijus++ | * @*END support! 22:05
autrijus it's about static lexical level 22:08
putter oops, it looks like HTTP-Server-Lite broke make test?
autrijus decides to punt, esp. because the lexical pad thing is largely fuzzy 22:09
so will ask leo tomorrow
putter sounds like a plan. 22:10
autrijus meanwhile... let me declare every lexical variable is global.
;)
putter :)
autrijus emit (InsPrim Nothing "store_lex" (_:args)) =
-- XXX - horrible hack! perl 4!
emit (InsPrim Nothing "store_global" args)
putter how very 1970's BASIC.
autrijus and... lo and behold!
$ ./pugs -BPIR s -BPIR ext/Test/lib/Test.pm
1..0
putter wooooooottt!
autrijus high-fives putter 22:11
putter indeed
autrijus er it's actually
$ ./pugs -BPIR ext/Test/lib/Test.pm
1..0
wonder what happened to my terminal
putter pictures trying to explain to someone, yes, it said "1..0", so we were quite happy...
autrijus perlcabal.org/~autrijus/test_pm.pir # generated code 22:14
putter re, HTTP-Server-Lite, just detrice in my build... 22:16
svnbot6 r4826, autrijus++ | * hack to make lexicals globals, until leo wakes up and we
r4826, autrijus++ | figure out how to statically analyze lexical pad levels...
r4826, autrijus++ | $ ./pugs -B PIR ext/Test/lib/Test.pm
r4826, autrijus++ | 1..0
autrijus Test.pm is 127k when compiled to pbc 22:17
162k with primitives
a bit heavy
but still in the acceptable range
autrijus implements mandel.p6 just for fun 22:18
putter The test_pm.pir online is 231k? 22:19
autrijus putter: sure 22:20
large number of comments (entire AST recursively) too
down to token level
putter It compresses very nicely though. 27k. Computes and disk being what they are, perhaps parrot should load compressed.
Ah, right.
autrijus well, .pbc files are like .class, no? 22:21
so the zip format should be called something like .jar
...perhaps .par ;)
putter :)
putter is trying to remember if any of gzip bzip etc have concatenation of files is a valid file property. 22:22
autrijus zip is close but not quite 22:23
it's probably easy enough now to just use zip though.
not to mention builtin jar:// support in gecko :)
putter autorecognition of file compression has the nice property that it doesnt introduce a new concept. 22:24
creating sets of files, with assorted semantics, could then be orthogonal.
grep -v '#' test_pm.pir | wc 6374 20237 178344 22:26
178 != 162... soo doesnt matter. old habits of double checking numbers simply die hard.
without comments, is 14k (bzip2) to 22k(zip). 22:31
np.
autrijus the src is 13k 22:33
autrijus decides to test op dispatch 22:34
let's run "$x=1" 10000 times!
putter ./pugs -B PIR -Iblib6/lib t/01-sanity/* work! except for 07, which is a imcc error... exploring...
autrijus putter: it's because 'use' didn't really pull Test.pm in 22:35
it only evaluates it with pugs itself
need to make compile time use respect the current compilation backend
putter ah, ok. 22:36
clkao win21 22:39
svnbot6 r4827, autrijus++ | * first step in getting mandel back to normal
autrijus ok... for 1000 "1+1" calls 22:42
putter ... yes? 22:46
autrijus ...pbc segfaults ;) 22:47
so it's fast.
like, in constant time
putter sigh.
autrijus ;) 22:48
autrijus grabs parrot 0.2.1
putter /usr/bin/time ./pugs -B PIR -Iblib6/lib -we 'sub f($n){if $n-- {f($n)}}f(980);' > /dev/null 3.23user 22:56
half a ms/call. 22:58
autrijus actually it's mostly compile time. 22:59
if you -CPIR
then it's considerably faster. 23:00
putter oh, I subtracted out the &f(1) case... but -C PIR woudl be better. adding a say($n) to the inner loop only cost a tenth of a ms.
autrijus mm 23:04
let me implement the tail call optimiser.
putter same numbers with -C. long case takes 0.9 s, base case 0.3 s. 980 reps was chosen as just under recursion limit;)
x86_64, so no jit.
autrijus when tail call is there, there will be no recusion limit. 23:05
a sec.
putter folks wont see jit unless they set some runtime flag... PUGS_PARROT_OPTS 23:07
hey, implementing tail call just means I have to find another loop construct to do testing with... ;) 23:09
autrijus ...done, testing 23:10
putter that has to be quote: [19:02] mm let me implement the tail call optimiser. [19:18] ...done, testing ;) 23:12
or not... almost dinner time. 23:13
crysflame grins
autrijus ...works. 23:18
putter 19:02, 19:08, 19:16 (I mistyped 19:18 earlier) 23:19
checked in?
autrijus yeah 23:20
$ ./pugs -CPIR -e 'sub f($n){f(($n-1) || exit)}; f(100000)' 23:22
svnbot6 r4828, autrijus++ | * tail call optimisation.
crysflame 16:02 -> 16:21 23:23
autrijus++ # we hold stopwatches in your honor
putter hmm, I believe I'm still seeing max recursion limit. or rather, I know I'm seeing it, I'm just not sure I havent done something silly. 23:24
autrijus you havn't. tail call optimisation only kicks in when your sub has only one instruction. 23:25
I'll fix :)
$ time ./pugs -CPIR -e 'sub f($n){f(($n-1) || exit)}; f(3000)'
real 0m1.363s
putter ah. 23:26
autrijus $ time parrot -G dump.ast
real 0m1.243s
$ time perl -e 'sub f{$n=shift;f(($n-1) || exit)}; f(300000)'
real 0m1.444s
100x slowdown. 23:27
;)
putter curious, this works...
./pugs -B PIR -we 'my @a;sub f($n){say($n);if $n-- {f($n)}}f(2000);' 23:28
autrijus sure, because the f() is a single instruction.
i.e. not preceded by a semicolon
$ time ./pugs -e 'sub f($n){f(($n-1) || exit)}; f(3000)' 23:29
real 0m7.082s
otoh, it's already much faster than the evaluator.
I think I know why the short circuitting || is slow
because parrot is still using the old callconv's way to clone interpreter context. 23:30
putter oh, I misread your 300000 case/comment. nevermind.
clkao gah parrot is that slow? 23:32
putter hmm, push(@a,$n);pop(@a); x 1000 takes under a second, x10000... well, I give up after 30 s. 23:34
autrijus clkao: parrot is atrociously slow when doing CPS.
clkao: because it's walking O(n^2)
to snapshot a continuation
leo already had a O(1) algorithm around 23:35
which should considerably speed things up ;)
ok, tail call optimisation is now automagic. 23:36
i.e. it analyses all statement boundaries, not only single-instruction ones.
r4829
putter When today get's written up, lets just not make the once common parrot mistake of saying we have foo, without the clarification of we _dont_ have bar. 23:37
autrijus hrm?
putter Parrot, at least at one time, would mark every first draft at foo with a "we have foo!" announcement. But being the first draft, unsurprisingly, much of foo was unimplemented, and the rest was very buggy. 23:39
svnbot6 r4829, autrijus++ | * tail call optimisation for multiple statement blocks.
putter So lots of folks would come try foo, and lose.
autrijus oh. I don't think I was guilty of that :)
putter No. I'm just being cautious. Proximity to parrot and all. 23:40
autrijus ahh. well, I don't know about others, but I'm keen on this underpromising thing :)
i.e. it's fine to spew random ideas around but not fine to promise delivering them -- unless of course it's already done in full 23:41
putter weary "yeah!". ;)
"yay"?
putter goes off to get sugar fix.
autrijus :p
putter agreed. 23:45
how much difference does jit make? 23:46
autrijus not at all.
-G is even faster for me.
putter -G is goto core? 23:47
autrijus and I can't build parrot optimised
putter ouch.
autrijus because GCC whines about insufficient registers inthe switch core
crysflame hahaha
autrijus -G is CGP core
crysflame GCC's internals have a cap on the number of registers? 23:48
autrijus no, x86 does
putter thinks crysflame has a PPC. or an alpha.
autrijus putter: so, journal up 23:54
putter: check for bluffing? 23:55
# use.perl.org/~autrijus/journal/
putter :), checking... 23:56
hmm... just for context, one might mention that _none_ of the other test files pass... (well, I can't say that, I gave up after a while). 23:58
basically, the effort was on Test.pm and sanity. So thats what works. Any code with say, a comma, wont. 23:59
autrijus hrm? sanity passes
putter sorry, yes, but I didnt see anything beyond sanity.