Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net Set by stevan on 15 August 2005. |
|||
rjbs | Does Perl 6 have a hashy hash slice notation? That is, return a list of pairs for the given keys? | 01:17 | |
svnbot6 | r6528 | fglock++ | * perl5/ Array | 02:33 | |
r6528 | fglock++ | - Fixed fetch/store single elements from a lazy slice | |||
r6528 | fglock++ | - Fixed fetch/store of whole lazy slice - | |||
r6528 | fglock++ | supports syntax: | |||
r6528 | fglock++ | @a = (0..Inf); @a[1,10,100..10000] = @a[500..30000] | |||
r6528 | fglock++ | (needs optimization) | |||
r6528 | fglock++ | - New method tied() | |||
r6528 | fglock++ | - Fixed binding of fetched result | |||
r6528 | fglock++ | - Fixed stringification of unboxed values | |||
r6528 | fglock++ | - New parameter 'max' in perl() and str() methods - | |||
r6528 | fglock++ | controls how many elements of the lazy array are | |||
r6528 | fglock++ | stringified. | |||
r6528 | fglock++ | - Array is stringified using parenthesis. | |||
r6528 | fglock++ | * perl5/ List | |||
r6528 | fglock++ | - new methods start() end() | |||
luqui | ?eval (a => 1).keys | 05:30 | |
evalbot_6528 | ('a') | ||
luqui | ?eval (a => 1)<a> | ||
evalbot_6528 | \1 | ||
luqui | ?eval (a => 1)<a> = 2 | ||
evalbot_6528 | Error: Can't modify constant item: VUndef | ||
luqui | ?eval my $x = 1; (a => $x)<a> | ||
evalbot_6528 | \\1 | ||
luqui | ?eval my $x = 1; (a => $x)<a> = 4 | ||
evalbot_6528 | Error: Can't modify constant item: VUndef | ||
ods15 | odd | 05:48 | |
whats with the <>, why the change | 05:49 | ||
revdiablo | {} subscripts don't auto-quote | 05:51 | |
? eval (a => 1){'a'} | 05:52 | ||
?eval (a => 1){'a'} | |||
evalbot_6528 | \1 | ||
revdiablo | without those quotes, it would take it as code. | ||
?eval (a => 1){a} | |||
evalbot_6528 | Error: No compatible subroutine found: "&a" | ||
revdiablo | so there's <> that does quoting | 05:53 | |
ods15 | yeah that was a bit inconsistent in perl5 | ||
like, if '{a}' work, and '{$bla}', what does '{func()}' do... | |||
or '{$a b}' | 05:54 | ||
revdiablo | so yeah, perl6 disambiguates the situation | ||
luqui | Ods, {$bla} does not autoquote | 05:55 | |
the only thing that autoquotes in p5 is /[\w-]+/ | |||
but perl6 autoquotes nothing, which is nice in a way | |||
(though it's a situation that I resisted for a while) | |||
ods15 | heh | 05:56 | |
luqui | does anybody here know anything about PIL2 | ||
? | |||
revdiablo | ?eval (a => 1)Ā«aĀ» | 05:57 | |
evalbot_6528 | Error: unexpected "\a" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
revdiablo | hmm, I dunno if the utf8 went through right | 05:58 | |
luqui | ?eval (a => 1)<<a>> | 06:07 | |
evalbot_6528 | \1 | ||
luqui | I'm guessing it's a utf8 problem | ||
svnbot6 | r6529 | putter++ | lib6/Prelude/JS/Rules.pm: unfinished sketch of :perl5 regex support for PIL2JS. | 06:10 | |
luqui | nothingmuch, do you know anything about PIL2? | 06:25 | |
nothingmuch | no | 06:26 | |
luqui | darn | ||
nothingmuch | sorry | ||
luqui | what are you working on these days? | ||
nothingmuch | work and rennovating the house | ||
luqui | ahh, so not perl 6 | ||
:-) | |||
nothingmuch | no =( | 06:27 | |
luqui | too bad. well, I hope you're having fun betraying us... | ||
luqui should talk, having the longest absences of anyone :-) | |||
anyway, I do hope you're having fun | |||
you're working with stevan right? | 06:28 | ||
nothingmuch | huh? | 06:33 | |
on what? | |||
and no, i'm not having fun... Dust and insanity mostly | |||
then it's also summer vacation, so the car is tied up | |||
and I have to rely on rides to work | |||
luqui | eep | 06:34 | |
nothingmuch | which sometimes don't get there | ||
luqui | why is the car tied up during summer? | ||
nothingmuch | sister needs enterntainment (summer camps all over) | ||
luqui | oh. I'm glad I have no siblings... | ||
nothingmuch | since parents don't have to teach in the summer, they can work from home | 06:35 | |
luqui | that sucks though | ||
nothingmuch | so one works, while the other entertains sister | ||
in normal times parents and I share the car to work | |||
work needs to lease me a small car | 06:36 | ||
luqui | who are you working for then? | ||
luqui guesses it's not stevan | |||
nothingmuch | www.hyperroll.com/ | ||
luqui | for some reason I thought thtat it was | ||
nothingmuch | well i did do one project for stevan, that's what got me to YAPC (monetarily) | ||
luqui | ahh, that was it. it was a one-shot thing. that's what confused me | 06:37 | |
hyperroll.com looks like a nice weasel-wordy site | |||
nothingmuch | yup | ||
weasel-wordy? | 06:38 | ||
it's the "new website", since ca last year or so | |||
some company does it for us, I think | |||
luqui | "HyperRoll delivers previously unattainable levels of speed, data volume, and *business dimensions*" | ||
nothingmuch | ah yes | ||
luqui | wtf does that mean? :-) | 06:39 | |
nothingmuch | but then againa all of OLAP is weasel wordy | ||
luqui | OLAP? | ||
nothingmuch | speed means we're faster than the competition | ||
data volume means we handle more data and take less space than the competition | |||
and business dimensions are OLAP nonsense made possible by efficient speed and data volume | |||
luqui | heh | 06:40 | |
what is OLAP? | |||
nothingmuch | dimentionality in OLAP determines a certain slice by which you query your tables | ||
luqui learns to google | |||
nothingmuch | i must admit i don't really know | 06:41 | |
anyway, ride issue fixed, must get ready for it | |||
luqui | good | ||
adionara | |||
nothingmuch | morning | 07:52 | |
luqui | quiet in here | 07:57 | |
nothingmuch | indeed | ||
ods15 | hya nothingmuch | 08:06 | |
nothingmuch | hi hop | 08:07 | |
s/p$/; | |||
grr | |||
ods15 | yawn | ||
nothingmuch | ods15: just getting up, or got up too early? | 08:08 | |
heh, someone at work just told me that his computer now says: | 08:12 | ||
"CPU not workable, press F1 to continue" during boot | |||
when he presses F1 the machine resumes normally | |||
nothingmuch kind of knew intel was scamming us with the gigahertz myth and all that, but I never thought you don't actually need a CPU to run windows | 08:13 | ||
ods15 | nothingmuch: hmm, niether really.. | 08:20 | |
i woke up at about 6pm yesterday after about 3 hours of sleep | |||
nothingmuch | odd | 08:23 | |
nothingmuch has a new idea | |||
($by_name{$action->name} ||= Set::Object->new)->insert($action); | |||
user defined autovivification would be nice here | |||
my %by_name is autovivifying(sub { Set::Object->new }); | 08:24 | ||
uh, perl6ify that | |||
luqui | class Foo will autovivify { Foo.new } {...} | ||
nothingmuch | uh, what does that mean? that I can say my %hash is shape (... contains a Foo ...) "? | 08:25 | |
luqui | probably | ||
nothingmuch | which syn is that? | ||
luqui | how do you know what to vivify otherwise? | ||
nothingmuch | the hash has a subroutine | ||
like in my example | 08:26 | ||
or a trait saying which class to use | |||
my %by_name will autovify(Foo); | |||
luqui | Yeah, I think my Foo %hash is the way to go there | 08:27 | |
nothingmuch | i agree | ||
what syn is that? | |||
luqui | uh | ||
S06? | |||
nothingmuch | that's subs, doesn't make sense | ||
luqui | or S09 | 08:28 | |
nothingmuch | nope | ||
luqui | what are you looking for? | ||
nothingmuch | /autov/ | ||
luqui | oh, autovivi | ||
do the syns mention that even? | |||
nothingmuch | i don't find 'autov' so autovivi woon't turn up either | 08:29 | |
s 06 mentions it WRT to parameters and 'is ref' | |||
luqui | A06 is the only place that autovivi is mentioned too | 08:30 | |
maybe it hasn't been covered | |||
ods15 | nothingmuch: whats odd? my sleeping pattern? | ||
nothingmuch | ods15: yes | ||
ods15 | army guarding isn't very permissive regarding sleeping :/ | ||
nothingmuch | i thought the army makes your sleeping pattern more rigid | ||
oh, i see... =) | 08:31 | ||
ods15 | usualy yes, except when you guard | ||
nothingmuch | right | ||
what is the effect of : sub foo (*@args) { ... }; foo(gather { ... }); | |||
does it delazify? | |||
luqui | certainly not | 08:32 | |
nothingmuch | good | ||
luqui | *@ is allowed to be lazy | ||
nothingmuch | **@ flattens? | ||
luqui | er, eagerifies, yes | ||
nothingmuch | what about foo($scalar, @array)? do you get [ $scalar, [ @array ] ] or [ $scalar, @array ] | ||
luqui | I expect you get the latter, but a lazy proxy so @array can stay lazy | 08:33 | |
nothingmuch | yeahg | ||
luqui loves monads much now, and is entertaining the idea of making the hyper operators into monadic binding | 08:35 | ||
-<< @foo # @foo.bind(&prefix:<->) | |||
ods15 | nothingmuch: wtf is lazy | ||
nothingmuch | ods15: you have 30 seconds to make a guess | 08:36 | |
ods15 | not a clue | ||
don't read/do anything until actually called? | |||
luqui | s/called/used/ yep | ||
ods15 | as opposed to non lazy?!?!? | ||
nothingmuch | "strict" or "eager" | 08:37 | |
ods15 | wtf kind of thing does something without being used | ||
luqui | for instance: @foo = <>; print @foo; # input is read on "print", not the assignment | ||
ods15 | the whole beauty of doing 'if (NULL && *(int*)NULL) {}' is that it can be done and it's safe... | ||
luqui: that's lazy? | 08:38 | ||
luqui | not in perl 5... I don't think it is in perl 6 either | ||
but: @foo = lazy { <> }; print @foo; # is | |||
nothingmuch | ods15: explain why that is beautiful | ||
luqui | and what it has to do with laziness... | ||
ods15 | nothingmuch: if (ptr && ptr->value) { do something } | 08:39 | |
luqui: i mis understood laziness | |||
nothingmuch | uh, not all of the language is lazy | ||
just certain things | |||
my @array = 1 .. 1000000000000000; # doesn't explode your computer; | |||
ods15 | i thought you meant, since 'ptr->value' is not used, it's not evaluated.. | ||
nothingmuch | more interestingly: 'my @array = 1 ...'; # to infinity | ||
ods15 | "not lazy" in that definition would be insane | ||
coral | (x|y) appears to be lazy | ||
nothingmuch | ods15: go learn haskell | ||
coral | but i think i'm just misunderstanding | ||
nothingmuch | ods15: you'll hate it. | ||
coral | also, must learn haskell :) | ||
luqui | coral, how is x|y lazy? | 08:40 | |
I'm just asking, not making a point | |||
nothingmuch | coral: 'x || y' maybe? WRT the y? | ||
coral | well, in my experiments with evalbot and (x|y) i've noticed that it tends to avoid picking one of the choices until the very last moment possible, if at all | ||
ods15 | anyway... that's pretty insane then? you can't keep track of when things are actually DONE, you can end up with crazy race conditions and deadlocks and not understand where/why | ||
coral | which seems to fit the definitionish of lazy | ||
luqui | coral, evalbot and junctions don't mix | ||
coral | ok | 08:41 | |
luqui | ?eval 1|2|3|4 | ||
evalbot_6528 | 1 | ||
luqui | ?eval 1|2|3|4 | ||
evalbot_6528 | 1 | ||
luqui | ?eval 1|2|3|4 | ||
evalbot_6528 | 1 | ||
luqui | ?eval (1|2|3|4).perl | ||
evalbot_6528 | '(1 | 2 | 3 | 4)' | ||
luqui | that's more like it :-) | ||
ods15 | whats |, not or i'm guessing | ||
luqui | it's a special kind of "value or" | ||
?eval my $x = 3; if $x == 1|2|3|4 { "yes" } else { "no" } | 08:42 | ||
evalbot_6528 | 'yes' | ||
nothingmuch | ods15: junctive or | ||
?eval my $x = 2|5; ($x * 2).perl | |||
evalbot_6528 | '(4 | 10)' | ||
ods15 | then, it's not a value of any kind | ||
nothingmuch | it is | ||
ods15 | as in, 1|2|3|4 doesn't really have a value | ||
it's more a list | |||
nothingmuch | it does | ||
no it isn't | 08:43 | ||
revdiablo | 1|2|3|4 creates a junction | ||
nothingmuch | it's a junction =) | ||
revdiablo | which is decidedly a value | ||
ods15 | what it's value? | ||
luqui | ods15, it multiple values masquerading as a single one | ||
nothingmuch | ods15: (1|2|3|4) | ||
coral | ods15: have you seen the perl6 module Quantum::Superposition? | ||
ods15 | nothingmuch: that's "kind of" a list | ||
nothingmuch | ods15: you can passs that around, apply arithmetic to it, and so forth | ||
coral | or thereabouts.. it's a dconway thing, in any case. | ||
nothingmuch | coral: that is perl 5 | ||
coral | er perl6 | ||
nothingmuch | ods15: no it isn't, it's a scalar | ||
coral | ARGH | ||
ods15 | coral: a better question would be, "have you seen perl6?" | ||
luqui wants to make junctions simply syntactic shorthand though | |||
nothingmuch | a list is a list of values with order | ||
coral tries for the 5 twice and misses. | |||
luqui | because they so horribly defy the laws of logic | ||
ods15 | nothingmuch: ok, i get it | 08:44 | |
nothingmuch | a junction is a nested collection of values with logical combinators | ||
luqui--; # NONONONO | |||
luqui | nothingmuch, why | ||
nothingmuch | i've used junctions as values several times, I haven't gotten burned, and it was very nice | ||
ods15 | ?eval my $x = 5|2; ($x * 2).perl | ||
evalbot_6528 | '(4 | 10)' | ||
nothingmuch | this is the "i'm not an idiot" issue all over again | ||
ods15 | ?eval my $x = 5|2|2; ($x * 2).perl | ||
evalbot_6528 | '(4 | 10)' | ||
ods15 | ?eval my $x = 5|2|2.5; ($x * 2).perl | 08:45 | |
evalbot_6528 | '(4 | 10 | 5)' | ||
coral | is there a way to turn a list into a junction? | ||
luqui | nothingmuch, okay, I understand that angle | ||
ods15 | ?eval my $x = 5|2|2.53; ($x * 2).perl | ||
evalbot_6528 | '(4 | 10 | 5.06)' | ||
nothingmuch | coral: any(@list) | ||
luqui: another thing I don't like about perl 6 is the "this is not for the children... let's make it a pragma" approach | |||
coral | ?eval my $x = 1...; any($x).perl | ||
evalbot_6528 | pugs: out of memory (requested 1048576 bytes) | ||
revdiablo | ?eval any(1,2,3).perl | ||
evalbot_6528 | '(1 | 2 | 3)' | ||
nothingmuch | there are already enough daqngerous features to make the children scream and have nightmares | ||
autothreading, off the top of my head, is one that is on by defau.t | |||
ods15 | ?eval my $x = 5; $x|=2; ($x * 2).perl | 08:46 | |
evalbot_6528 | '(4 | 10)' | ||
ods15 | ?eval my $x = 5; $x|=2; $x&=3; ($x * 2).perl | ||
evalbot_6528 | '(6 & (4 | 10))' | ||
nothingmuch | and the way to make it safe is not to make it harder to give it a proper value | ||
ods15 | wtf is that | ||
nothingmuch | s/proper/; improper | ||
ods15 | ?eval my $x = 5; $x|=2; $x^=3; ($x * 2).perl | ||
evalbot_6528 | '(6 ^ (4 | 10))' | ||
revdiablo | ods15: & means all, | means any | ||
nothingmuch | ods15: that means it's 6 and (4 or 10) | ||
coral | hmmm. is there a way to take an infinite iterator like 1... and turn it into a junction without evaluating it for 1..inf first? | ||
ods15 | nothingmuch: what do you compare it with, another junction? | ||
nothingmuch | so if you say (6 & (4 | 10)) < 8 | ||
it's ture | 08:47 | ||
luqui | nothingmuch, autothreading is one of those features that enforces "this is not for children" | ||
ods15 | ay | ||
thats scary | |||
nothingmuch | luqui: but it's on by default | ||
luqui | it enforces that you don't give junctions to functions that aren't expecting them | ||
ods15 | bbl hungry | ||
nothingmuch | ods15: i find it bleasant | ||
pleasant | |||
luqui | yeah, and if it were off, then all subs would have to worry about junctions | ||
nothingmuch | luqui: if junctions were treated normally unless autothreading, things would not be so clumsy wrt to this safety issue | ||
'sub foo is autothreading' # enough | |||
or 'use autothreading'; # global for this scope | 08:48 | ||
luqui | so you want to be able to say foo(1|2) and let foo assume that its argument behaves normally when it doesn't? | ||
nothingmuch | or 'sub foo is pure' # maybe autothreading, maybe not - depends on runtime, #cpus, available memory, and so forth | ||
luqui: i want (1|2) to propagate downwards | |||
luqui | oh, autothreading btw has no tie to cpu threads | ||
nothingmuch | and let the junction be resolved at the lowest level, by the builtin operators | ||
pure operators will take junctions and return junctions | 08:49 | ||
luqui | that's a bad approach. it's the same reason that we had to kill junctive types and replace them with union/intersection types | ||
nothingmuch | things like $fh.seek(1|2); # death | ||
luqui | junctions do not obey the laws of logic | ||
so you can't metaprogram if they're around | |||
nothingmuch | i argue that you can: | ||
junctions are dealt with at the lowest level in the call stack | |||
and created at the highest level | |||
and anything in the middle doesn't have to care | 08:50 | ||
luqui | but it does | ||
nothingmuch | why does it? | ||
luqui | if $x == 1 { say "foo" } if $x != 1 { say "bar" } | ||
if $x is a junction, both clauses may be executed | |||
nothingmuch | okay | ||
luqui | which is contrary to an assumption that the programmer may have made | ||
nothingmuch | so what about: | ||
sub foo ($place) { $fh.seek($place) }; | 08:51 | ||
luqui | the writer of this module may not even know that junctions exist (this is that thing -- you don't have to know the whole language to write good code) | ||
nothingmuch | foo(1|2); # silently seeks to either 1 or 2? | ||
luqui: yeah, i agree it's dangerous, but IMHO autothreading is still more dangerous | |||
luqui | depending on evaluation order :-) | ||
nothingmuch, they're both dangerous | |||
that's why I want to demote junctions | 08:52 | ||
nothingmuch | what I want junctions for is things like: | ||
coral | having unlink() or an equivalent in the core function set of any language by default is incredibly dangerous | ||
and yet | |||
nothingmuch | is($got, 1|2, "foo"); | ||
luqui | the same way I want to demote pairs: to make it very visible exactly where you are using them | ||
nothingmuch, hmmm | |||
hmmmmmmmmmmmm | |||
nothingmuch | this is where junctions shine | ||
they are sooooo good when you know what the thing you call is doing | |||
they are not useful for big nested calls | 08:53 | ||
but lots of time control flow is encapsulated behind polymorphism | |||
luqui | and that wouldn't work if is were autothreaded | ||
nothingmuch | ?eval use Test; is(1, 1|2); | ||
evalbot_6528 | pugs: *** No compatible subroutine found: "&use" at tmp-Prelude.pm line 38, column 30-59 | ||
nothingmuch | uh, crap | ||
anyway it says "ok 1\nnot ok 2\n" | |||
unless we made Test explicitly accept junctions | |||
luqui | right | ||
nothingmuch | but since it didn't work to start with, no one touched it with a ten foot pole ever since | 08:54 | |
i really really really like encapsulating logic | |||
especially when the input is similar, the output is the same, but the path is different | |||
i like to ask my objects 'are you happy? can you do this?' and not deal with it myself at the top level | 08:55 | ||
this sometimes leads me to overly abusing multiple inheritence in perl 5 | |||
but roles and delegation should help me solve that in perl 6 | |||
so i don't want to retrain myself just yet | |||
luqui | oh, example: | 08:56 | |
sub is ($test, $output, $name) { if $test == $output { say "ok 1 # $name" } say "Debug 1"; if $test != $output { say "not ok 1 # $name" } } | 08:57 | ||
unfolded from if {} else {} | |||
for debugging, and suddenly you're debugging a problem that wasn't there to begin with | |||
nothingmuch | luqui: is there any middle grounds? | 08:58 | |
luqui | So I think junctions are wrong, however I think locally encapsulated junctions (because of your examples) are also probably wrong | ||
how can we fix that | |||
nothingmuch | i think that i'd rather just poke and see if something works | ||
and then use it | |||
instead of not being able to use it at all, just because the author didn't think of it at the time | 08:59 | ||
luqui | I'm not sure what you mean by that | ||
nothingmuch | well, if i'm not allowed or can't use junctions, then i'm screwed either way | ||
if i can use them, but sometimes i'll cry because of it, i can use them in one liners | 09:00 | ||
or with code that I wrote | |||
and I won't have to say in advance that I did | |||
or more significantly, i won't have to patch other code to make sure it does | |||
as I see it both autothreading and passed junctions are useful | |||
perhaps this makes sense: | 09:01 | ||
if there is a branch in control flow due to an external junction, it's a fatal error unless explicitly asked for by the caller | |||
luqui | well I'm trying to push autothreading into the list monad for my new proposal | ||
nothingmuch | aside from that the user can choose to pass the junction, or to autothread on a lexical pragma basis, with the now safer option (passing) being the default | 09:02 | |
luqui: please explain | |||
luqui | I'm going to try to steal << >> from qww and turn it into an argument hyper | ||
(the arrows are pointing to the parentheses) | |||
so you can do foo(1, 2, <<3,4>>,5) | 09:03 | ||
and it will return (foo(1,2,3,5),foo(1,2,4,5)) | |||
nothingmuch | yeah, i liked that | ||
nothingmuch thinks he brought that up with >><< | |||
but I don't remember now | |||
luqui | I think you did | ||
I'm just generalizing it more | 09:04 | ||
nothingmuch | why can't it use foo(1, 2, >>3, 4<<, 5), btw? | ||
luqui | well, it *could* | ||
but I think << and >> make more sense, because the arrows always point to the *operator* that is being hypered | |||
and I think qww is not common enough to deserve these very useful brackets | |||
nothingmuch | oh, i see | 09:05 | |
luqui | so that covers autothreading when you want it (plus predictable unpacking, which junctions don't give you) | ||
nothingmuch | qww is something I write all the time in perl 5 | ||
or wait, qww vs qw? | 09:06 | ||
luqui | qww interpolates and shell splits | ||
nothingmuch | ah | ||
right, I agree | |||
i like that a lot | |||
it also has the property, much like hyper, to be so obvious and so noticable, that once a newbie knows what it's doing, they never forget | 09:07 | ||
luqui | hooray | ||
so back to junctions | |||
nothingmuch | luqui++; # good proposal | ||
luqui | I would like junctions in their current state if we could massage them to obeying logic | 09:09 | |
for instance, flipping their junctitude on negation operators and whatnot | |||
or maybe they are just a smartmatch pattern? | 09:10 | ||
nothingmuch | lunch time | ||
luqui | happy lunching | ||
luqui gets some food too | |||
nothingmuch | how do you make them obey logic? | ||
luqui | actually, I don't think you can | 09:11 | |
not without implementing Quantum::Entanglement | |||
but we can formalize the notion of "pattern" | |||
against which smartmatch works | |||
and then junctions are just patterns, and there's nothing mathematically evil with them | 09:12 | ||
nothingmuch | hmm | 09:13 | |
what's bad about Q::E? | |||
luqui | nothing, it's just, um... | ||
not for children :-) | 09:14 | ||
nothingmuch | okay | ||
so again to my "safe" junctions proposal: | |||
boolean logic that involves non uniform control flow is a fatal error | |||
luqui | example? | ||
nothingmuch | your example for is() | ||
it wouls say 'junctive parameter caused inconsistent program flow at line xxx file x, from line zzz file z' | 09:15 | ||
with zzz being the first place where the junction was passed | |||
luqui | so once you tested it against one thing | ||
er, that sentince won't finish | 09:16 | ||
nothingmuch | heh | ||
luqui | so: my $j = 1|2; if $j == 1 { say "foo" } if $j == 2 { say "bar" } # dies | ||
nothingmuch | luqui: user def autovivification on p6l | ||
yes | |||
at $j == 1 | |||
luqui | my $j = 1|2; if $j == 1 { say "foo" } if $j == 1 { say "bar" } # doesn't die | ||
nothingmuch | because it's both true, and false, one flow does execute { say "foo" } and the other doesn't | ||
wait, no | 09:17 | ||
hmm | |||
doesn't make sense | |||
luqui | you just make sure that the value the junction represents is always the same | ||
nothingmuch | this isn't good enough because sometimes you would like the code you call to "foo\nbar\n" and sometimes you don't | ||
i think you don' | |||
t is the default | |||
so it dies if there is any altered control flow whatsoever | |||
if ($x == 1) { } ... | |||
luqui | hmmm | ||
nothingmuch | that is death | 09:18 | |
unless the code takes that explicitly | |||
luqui | then the usual implementation of is() breaks with junctions | ||
nothingmuch | right, unless the caller says "that's OK" | ||
but anyway, nevermind, i'm hungry | |||
luqui | ahh, the call*er*? | ||
yeah, me too | |||
bbiab | |||
nothingmuch | errrr yes, the person who apssed the junction decides under these semantics | ||
unless the calleeeeeeeeee (no Rs) says explicitly that it allows, doesn't allow, and/or autothreads | 09:19 | ||
*poof* | |||
oh boy! | 10:20 | ||
nothingmuch is writing a query planner | |||
with Class::Multimethods. | |||
this should be really fun | |||
ofcourse, I don't need it to be efficient yet, but how can I pass on something this fun | 10:21 | ||
luqui | you could use Class::Multimethods::Pure, which is even slower! | ||
nothingmuch | yarr | 10:22 | |
nothingmuch isn't going to use MMs just yet... | |||
in several minutes | |||
luqui has been using MMs all over the place. They really make programming wonderful | 10:35 | ||
And they make my programs slow... but I'm not the kinda guy that cares about that | |||
luqui sleep & | 10:36 | ||
nothingmuch | i like the potential of MMD to actually make things fast | ||
wilx | MM? | ||
nothingmuch | lots of the logic becomes declarative | ||
wilx | Is that something like C++ function overloading? | ||
nothingmuch | and this can be resolved by a type inferrencing compiler | ||
wilx: yes, multimethods | |||
they're more than overloading though | |||
scook0 | and it's based on runtime-type rather than static-type | 10:37 | |
nothingmuch | scook0: not necessarily | ||
scook0 | well, no | ||
nothingmuch | it's based also on runtime type | ||
scook0 | bah, pedant :) | 10:38 | |
nothingmuch | =) | ||
static typing is very important to make MMD practical | |||
look at my thread on the runtime linker | |||
scook0 | the scary long antihistamine-induced one? | 10:39 | |
nothingmuch | i don't think antihistamine caused that | ||
it may have degraded it =) | |||
but yes, the long one | |||
it briefly touches on how I see MMDs, the linker, static typing and the optimization pipeline getting along | |||
scook0 | but logically speaking, most MMD takes place on dynamic-type, right? | 10:41 | |
(even if in practice it might get optimised away) | |||
nothingmuch | yes | ||
scook0 claims victory! :) | 10:42 | ||
nothingmuch | but it doesn't seem so close to the truth with this: | ||
my Dog $foo; | |||
my Cat $bar; | |||
fight($foo, $bar); | |||
scook0 | huh? (I don't see your point...) | 10:43 | |
nothingmuch | scook0: the "feeling" of dynamicity is lost here | ||
luqui: how stable is C::M::P? | 10:44 | ||
wilx | What if you have multiple inheritance and more than one instance of one class in the inheritance graph? How does the multimethod pick one? Does that signal compile time/run time error? | ||
nothingmuch | wilx: in my opinion yes | 10:45 | |
in Damien's opinion manhatten distance wins | |||
we don't3 know yet | |||
scook0 | nothingmuch: but if you were to say `$foo = new Poodle`, then it would "feel" dynamic? | 10:46 | |
nothingmuch | scook0: yes =) | ||
or my $foo = shift; | |||
or my $foo = get_poodle; | |||
then type inferrence can make it really be my Poodle $foo = get_poodle; | |||
scook0 | I think we may be violently agreeing -- just a mismatch of personal terminology | ||
nothingmuch | oh, i knew we were all along =) | 10:47 | |
Can't locate Class/ultimethods/Pure.pm | |||
wow... ultimethods | |||
those must rock | |||
scook0 wants an ultimethod | |||
nothingmuch | i wonder what they do | ||
scook0 | (or what about penultimethods?) | 10:48 | |
nothingmuch | i don't even have a guess as to what that would mean | ||
scook0 | don't mention them on p6l, or somebody will try to figure it out! | ||
nothingmuch | heh | ||
wolverian | can we call methods by regex? $obj.*/foo/() # call all methods matching /foo/? | 11:30 | |
maybe that's a bad idea... | |||
scook0 | wolverian: probably a bad idea to make it that easy | 11:38 | |
but with the metamodel, it should at least be /possible/ | |||
wolverian | ObjectSpace>>.*/.*/; # hm... | ||
scook0 | wolverian: the question is, how long until it finds the permutation `0.exit()`? :) | 11:39 | |
wolverian | heh. that looks totally weird, by the way. 1.kill | 11:40 | |
scook0 | $?SYSTEM.halt_and_catch_fire | 11:41 | |
"~/important_document.txt".unlink | 11:42 | ||
lots of potential for catastrophe | 11:43 | ||
?eval 42 | 11:45 | ||
evalbot_6528 | 42 | ||
wolverian | I think the integers are more confusing | ||
0.exit, 1.kill, etc. | |||
scook0 | ?eval use Test | ||
evalbot_6528 | pugs: *** No compatible subroutine found: "&use" at tmp-Prelude.pm line 38, column 30-59 | ||
scook0 | hmm, does someone test something on a recent build for me? | 11:46 | |
(I'm getting weirdness on my local copy, and I want to know if it's my patch) | |||
sorry, thinko -- can someone test something for me? | |||
svnbot6 | r6530 | scook0++ | * Merge some more code in Parser.hs | 12:00 | |
ycheng | I found it's interesting that in perl, access non-exist elements of an array will not stop the program. | 13:08 | |
nothingmuch | ycheng: search for autovivification | 13:15 | |
nothingmuch wants to burn something | 13:16 | ||
i've had it with character encodings! | |||
wolverian | ?eval "foo " ~ ("a" & "c") ~ " bar" | 13:17 | |
evalbot_6528 | 'foo a bar' | ||
nothingmuch | i'm so fucking sick and tired of endlessly dealing with this pointless nonsense! | ||
wolverian | hm. that doesn't look right, but I don't know what it should be. | ||
nothingmuch | ?eval "foo " ~ ("a" & "c") | ||
evalbot_6528 | 'foo a' | ||
nothingmuch | ?eval ("a" & "c") ~ " bar" | ||
evalbot_6528 | 'a bar' | 13:18 | |
nothingmuch | hmm | ||
?eval ("a" | "c") ~ " bar" | |||
evalbot_6528 | 'a bar' | ||
nothingmuch | odd | ||
wolverian | I was just wondering whether '"<element>" ~ all(open("foo.txt").lines) ~ "</element>" would autothread the concatenation and create <element>..</element> for each line | ||
nothingmuch | ?eval ("a" | "c") | ||
evalbot_6528 | 'a' | ||
nothingmuch | wolverian: it should | ||
wolverian | that is brilliant. | ||
nothingmuch | ?eval ("a" | "c").perl | ||
evalbot_6528 | '(\'a\' | \'c\')' | ||
nothingmuch | ?eval (("a" | "c") ~ " bar").perl | ||
evalbot_6528 | '(\'a bar\' | \'c bar\')' | ||
nothingmuch | okay, eval bot is just drunk | ||
it actually works | |||
?eval 1|2 | 13:19 | ||
wolverian | yeah, I think he doesn't like outputting junctions | ||
evalbot_6528 | 1 | ||
nothingmuch | does anybody know of any cache profiling tools? | ||
(l2 cache, that is) | |||
ycheng | nothingmuch: thanks very much for that keyword ! | 13:20 | |
nothingmuch | you're welcome | ||
stevan | hola nothingmuch | 13:21 | |
how is live in the construction zone | |||
nothingmuch | hi ho | 13:23 | |
stevan: yucky | 13:24 | ||
FUCKING CGI! FUCK YOU FUCK YUOU FUCK YOU!!!!! | |||
elmex | nothingmuch: please | ||
nothingmuch | sorry | ||
stevan | your not using CGI.pm are you? | ||
nothingmuch | Kwiki is | ||
=( | |||
elmex | nothingmuch: i love fsck-speak :) | ||
nothingmuch | kwiki uses a CGI function called query_string | 13:25 | |
stevan | ah,.. my sympathies | ||
nothingmuch | which rejoines the parsed query string | ||
stevan | yes | ||
nothingmuch | somewhere in the way UTF8 is smashed to bits | ||
stevan has had many text-encoding nightmares lately | |||
nothingmuch | it needs to be unicode all the time | 13:26 | |
stevan | nothingmuch: look... you so offended elmex,.. he quit | ||
nothingmuch | that's the only way to deal with it | ||
stevan | nothingmuch: I tend to agree | ||
nothingmuch | i'm truely sorry, but i'm on the verge of kicking my table | ||
stevan | we had to deal with french text,.. which is fine in Latin-1,.. but all the data files were set to us as utf-8 | ||
and they were to big to convert | |||
so we ended up with all this mixed up encodings | 13:27 | ||
nothingmuch | why not stick to utf-8? | ||
stevan | because the people who were doing the HTML were using Latin-1 | ||
nothingmuch | then those people should be spanked | ||
stevan | and when I said utf-8,.. they said "what is that?" | ||
stevan considered that | 13:28 | ||
nothingmuch | isn't Latin-1 isa utf-8? | ||
stevan | I have no idea,.. they did not seem to get along well | ||
nothingmuch | =( | ||
wolverian | no | ||
nothingmuch | ascii isa utf-8? | ||
stevan | it is almost over though,.. just one more week | ||
then I can get back to the metamodel :) | |||
wolverian | nothingmuch, 0-127 ascii corresponds to utf8, yes | 13:29 | |
stevan has been reading papers on sub-typing and generics to help ease the pain | |||
wolverian | but latin-1, also called iso 8859-1 has 128-255, which do not correspond to utf-8 | ||
nothingmuch | to top it off i'm wroking through SSH and vim on the other end is so drunk i can't work | ||
stevan | wolverian: I suspect the 128-255 is where all the funny french characters are then | ||
wolverian | stevan, yes. | ||
same with finnish. | |||
it is annoying on IRC, since most people use mirc and it doesn't do utf8. | 13:30 | ||
stevan | those were the ones which never seemed to mix properly | ||
wolverian | stevan, they don't. you have to recode. | ||
(irssi supports it natively with /recode in 0.8.10 release candidates) | |||
stevan | wolverian: yes,.. Encode was my friend :) | ||
wolverian | right. :) | ||
nothingmuch | why is CGI.pm so big? | ||
stevan | that and gaal's DBD::Mysql patch | 13:31 | |
wolverian | nothingmuch, because it is horrible. | ||
nothingmuch | why is it both OO and imperative? | ||
stevan | nothingmuch: you should write your own version | ||
then patch Kwiki :) | |||
wolverian | if you're on apache, use the apache libs. if not, use CGI::Lite | ||
nothingmuch | stevan: there are a ton of CGI things | ||
i don't want to do that | |||
i don't want to patch kwiki too, it takes too long to read ingy code | 13:32 | ||
stevan was very much kidding :) | |||
wolverian | or if you can't help it, use CGI::Simple as a drop-in replacement for CGI.pom | ||
er, s/pom/pm/ | |||
nothingmuch | too much inheritence | ||
wolverian: does it pollute the CGI namespace? | |||
because kwiki calls to CGI::query_string directly | |||
stevan | nothingmuch: I think SocialText is hiring (Ingy's kwiki company) | ||
wolverian | nothingmuch, augh. | ||
nothingmuch, no, it doesn't. | |||
it's also strictly OO only, I think. | |||
nothingmuch | stevan: i don't want to hack kwiki for a living | ||
stevan | nothingmuch: that is easily hacked around | 13:33 | |
nothingmuch | wolverian: then i'm screwed... I need to rewrite Kwiki:CGI | ||
stevan | *CGI::query_string = sub { CGI::Special->querystring(@_) { | ||
nothingmuch: but you would work with ingy ;) | |||
nothingmuch | stevan: ugh.... | 13:34 | |
stevan | :D | ||
nothingmuch | (wrt to the hack with the sub) | ||
Juerd | CGI as a namespace doesn't make sense for things concerning URIs. | 13:36 | |
Query strings are not a CGI thing, they're a URI thing. | |||
wolverian | can you reimplement junctions in perl6 trivially yourself? | 13:37 | |
Juerd | wolverian: Depends mostly on your definition of "trivial". | ||
wolverian | Juerd, right. I'm wondering how to easily redispatch everything to the elements | ||
in the object | |||
Juerd | I don't understand that sentence | 13:38 | |
Or sentance. I never know. | |||
wolverian | sentence. :) | ||
I mean: how does the junction object I construct easily run any operation performed on it on each of the elements it has instead? | 13:39 | ||
method override_all { ... } # :) | |||
Juerd | I don't think that'll be easy | 13:40 | |
wolverian | hmm. new Proxy: FETCH => { for @element { ... } } ? | 13:41 | |
nothingmuch | oh god.... CGI::init could be fixed | 13:43 | |
but it's soooo big and ugly | |||
someone please put a bullet in my head | |||
nothingmuch gives up | 13:45 | ||
wolverian | I just don't know how to do foo(1 & 2) => foo(1), foo(2) | 13:47 | |
nothingmuch | ? | 13:50 | |
wolverian | isn't that what the junction does? | 13:51 | |
Juerd | nothingmuch: What are you doing with CGI stuff? | 13:52 | |
nothingmuch | Juerd: Kwiki is not supported hebrew usernames | ||
Juerd | nothingmuch: So it's not Perl 6 related? | ||
nothingmuch | the encodings get screwed | ||
no | |||
Juerd | Okay | ||
I was very afraid you were porting CGI.pm literally. | 13:53 | ||
(Which is okay, but not using that name...) | |||
nothingmuch | hell no, aankhen was doing a good job with all the good modules | ||
i think CGI.pm should be left to rot in perl 5 land | |||
nothingmuch should have installed mediawiki instead | 13:54 | ||
but i was like "hmm... if I have to change something I prefer working with perl" | |||
which sucks, because all of the features I needed so far are supported by mediawiki | |||
nothingmuch goes back to writing fun code3 | 14:10 | ||
sest driven development saved whatever sanity i had left today... | 14:23 | ||
ciao, i'm going home! | |||
svnbot6 | r6531 | iblech++ | * Usual svn props. | 14:28 | |
r6531 | iblech++ | * New util/smokeserv/: Pugs Smoke Reports Server | |||
r6531 | iblech++ | * smokeserv-client.pl: Submits smokes to a smokeserv | |||
r6531 | iblech++ | * smokeserv-server.pl: The smokeserv (HTML template included) | |||
r6531 | iblech++ | * README | |||
r6531 | iblech++ | * util/yaml_harness.pl: Include the path to pugs used in the smoke so the | |||
r6531 | iblech++ | smokeserv can easily differentiate between normal runcore/PIL-Run/PIL2JS. | |||
r6531 | iblech++ | * pugs::hack: Add info how to submit a smoke to a smokeserv. | |||
iblech | putter: smokeserver is up! :) | 14:29 | |
m19s28.vlinux.de/cgi-bin/pugs-smokeserv.pl | |||
Submitting your own smoke is easy, a "$ ./util/smokeserv/smokeserv-client.pl ./smoke.html" should suffice. | |||
(Help on the design is very much appreciated, BTW :)) | 14:34 | ||
stevan | iblech++ | 14:48 | |
iblech | putter++ # his idea | ||
svnbot6 | r6532 | iblech++ | util/smokeserv/smokeserv-server.pl: | 15:31 | |
r6532 | iblech++ | * Very minor typo and XHTML validity fixes. | |||
r6532 | iblech++ | * Obsolete smokes are now removed. The algorithm differentiates between | |||
r6532 | iblech++ | pugs_version, osname, and runcore, so it won't blindly delete smokes older | |||
r6532 | iblech++ | than n days. | |||
r6533 | iblech++ | PIL2JS: PIL::Params: Fix invocant parameters wrongly being moved to the end of | 15:49 | ||
r6533 | iblech++ | the fixed parameter list. reverse.t has a chance of passing now again. | |||
putter | hey folks. | 16:04 | |
iblech++ | |||
putter running smokes | |||
iblech | Hi putter :) | 16:05 | |
xinming | iblech: you there please? | ||
oops. | 16:06 | ||
iblech: hmm, Did @Larry confirmed about the 'named parameters' passing? | |||
iblech: for my test | |||
wish I can do something before I go to BeiJing. :-P | |||
iblech | xinming: Yes: You are not allowed to pass slurpies by name. I.e. sub foo (*@args) {}; foo(args => [...]) is bogus | ||
putter | I wonder if it's time to give ext/ an explicit test/smoke inclusion flag. MIME-Base64/t/Base64.t has been running for 15+ minutes, and actually am only interested in the core test suite at the moment. (sometimes I just find ext/|grep '\.t$'|xargs rm ;) | 16:07 | |
xinming | iblech: and slurpy hash won't slurp the named params, right? | ||
iblech | xinming: Right. | 16:08 | |
putter: You can use the PUGS_RUNTIME hack | |||
xinming | sub foo ( $a, *%h ) { }; foo( a=> 'v', a=> 'u' ); will cause an error; and foo( a=>'v' ); works, but %h get nothing, | 16:09 | |
iblech | putter: See util/yaml_harness.pl:41 | ||
xinming: Right. | |||
xinming bbl | |||
QtPlatypus | putter: It shouldn't be taking that long. | ||
putter | iblech: which reminds me, it might also be worth distinguishing (avoiding gc) on the summary line. So if someone does an ext/-free smoke, like I am now, it doesnt smash one with. or parrot-working vs not. | 16:10 | |
QtPlatypus will have to look at it tommrow morning to see if there is some bug in the code that is screwing it up, and I'll see if I can oplimise it. | |||
putter | QtPlatypus: k. it did seem odd. thanks :) | 16:11 | |
iblech: looking... | |||
TheOddity | Hi, is this the right place to talk about perl threads? | 16:12 | |
5.8.x | |||
xinming | TheOddity: try #perl instead. :-) | ||
TheOddity: that might be better for you. | 16:13 | ||
iblech | putter: Yep. Will only need an addition to yaml_harness, testgraph.pl or run-smoke -- one of these scripts have to record the setting. | ||
TheOddity | sorry to be such a pain, but I could not find #perl ? #perl-es #perl.ch #perl.de #perl6 #perlcafe #perlchina #perlfr but not #perl. do i need to connect to a separate server for that? | 16:17 | |
svnbot6 | r6534 | iblech++ | * t/rules/: Some more guards to skip the test if rules support is missing and | ||
r6534 | iblech++ | unCOMMENTED a previously hardfailing test. | |||
r6534 | iblech++ | * PIL2JS: | |||
r6534 | iblech++ | * PIL::Params: Invocant parameters shouldn't be allowed to be passed by name. | |||
r6534 | iblech++ | * Prelude::JS::*: Extremenly minor misc. fixes. | |||
iblech | TheOddity: Huh? on irc.freenode.net/#perl are 323 people currently | ||
TheOddity | i'm using gaim, probably something wrong with the list-rooms function, will try to join room by specifying the room manually. | 16:19 | |
it works!! | |||
thanks .. | |||
iblech | food & | 16:30 | |
xinming | hmm, anyone here can tell me if there is way to ban the private message on advertisement? | 16:31 | |
putter | strawman proposal: create a "runpugs" wrapper script, in p5, which handles command line analysis, and knows where the various backends and repls are. We could add it to pugs (which currently only knows about PIR, which it actually compiles), but perl seems preferable to haskell for this kind of hackery. Thoughts? | 16:38 | |
Aankhen`` | Hola! | 16:40 | |
xinming | iblech: hmm, sub func ( $n, *%h ) { }; func( 100, n => 100 ) | 16:43 | |
iblech: what the result will be in this example? | |||
iblech: hmm, sub func ( $n, *%h ) { }; func( 100, n => 200 ) | |||
an error or 200? | 16:44 | ||
iblech | Aankhen``: Welcome back! :) | 16:47 | |
putter: re. Yep, I think Perl is more suited for that job, too | 16:48 | ||
xinming: Your subbodies were both empty | |||
Aankhen`` | Thanks! | ||
How's things? | |||
iblech | xinming: But anyway, $n will 200, and the dangling 100 will throw an error ("too any arguments passed to...") | 16:49 | |
xinming | :-) | ||
iblech | Aankhen``: PIL2JS passes 74%, and PIL-Run is actively developed again | 16:50 | |
Aankhen`` | Nice! | ||
Any progress on the Haskell backend? :-D | |||
autrijus | no, because I was away with $work and moving to another house | 16:51 | |
Aankhen`` | Ah, okay. | 16:52 | |
And hi. :-D | |||
autrijus | plus a bruising finger jammed by a random door, today | ||
Aankhen`` | Ow. | ||
Sounds painful. | |||
autrijus | feels rather weird typing with nine fingers | ||
yeah. will heal tomorrow likely | |||
putter | iblech: btw, re 74%, nothingmuch's smoke _is_ passing the :perl5 tests (just not the p6 rules tests). so there is perhaps an extra ~10% when you want it. basically just requires ~~ recognize whatever Prelude/JS/Rules.pm creates. | ||
Aankhen`` | My condolences. :-( | ||
autrijus | thanks. :) | 16:53 | |
iblech | putter: ooh +10% :) I'll look into your Rules.pm today or tomorrow | ||
autrijus | rehi all, btw. I'm delighted to have plenty of things to catch up every couple hours :) | 16:54 | |
oh, and good news: my Perl-I18N talk in Euro OSCON is cancelled | |||
replaced by "Introduction to Pugs":) | |||
Aankhen`` applauds! | 16:55 | ||
putter | iblech: one ./util/smokeserv/smokeserv-client.pl ./smoke.html coming up... | 16:56 | |
iblech | putter, autrijus: ooh :) | ||
autrijus | hm, I probably need a small project to acquaint myself with the p5 works | 16:58 | |
say, what would take it to plug Inline::Pugs into the pilrun framework? | 16:59 | ||
or has it already been thought of? | |||
pasteling | "Aankhen``" at 203.101.5.144 pasted "Build fails on Win32" (17 lines, 750B) at sial.org/pbot/12780 | 17:00 | |
putter | iblech: is there a delay before an upload smoke shows up? | 17:01 | |
iblech | putter: No, shouldn't be. Did smokeserv-client.pl say something other than "success"? And was your util/yaml_harness.pl synced up? | 17:02 | |
putter | I synced up util (though I've been editing yaml_harness). the client dumped html text at me. looks vaguely like the text of your page. | 17:03 | |
iblech | putter: Checking | ||
putter: I had this problem during debugging, but it magically disappeared | |||
putter | autrijus: all the progress on pilrun has been fglock's. I've just tried to keep the rest of it out of his way. smoke coming up (in a while). | 17:05 | |
autrijus | understood | ||
putter | re Inline::Pugs, do you mean p5 user code use Inline::Pugs; and get the metamodel, etc? | ||
autrijus | yes. | ||
iblech | putter: Problem (hopefully) fixed, try again please? :) (It was discarding your POST because the smoke was too big) | 17:06 | |
putter | Only two issues come to mind. err, 3. We kind of stomp on the p5 namespace (defining Int, Str, etc). I don't think we have quite gotten to the bottom of what's a p5 method, is it a Method, etc. So users should expect instability, and I'd hate to put any kind of crimp on stevan/flgock/etal making major changes. And there is a GB-eating (deep recursion?) in pilrun or the mm which shows up on some test files. | 17:10 | |
iblech: trying... | |||
autrijus | okay. I'll do the wrapper thing first | 17:12 | |
iblech | putter: worked :) | ||
autrijus | Fyi: require(P5Runtime/PrimP6.pm) - file not found at lib/Inline/../../perl5/PIL-Run/lib/PIL/Run/PrimP5.pm line 187. | ||
hm, what does this signify? something akin to :precomp needs to be done? | |||
putter | hmm, you may be the windows sacrificial guinne pig. | 17:13 | |
putter will be intermittantly non-responsive over the coming minutes as memory hungry tests run... | 17:14 | ||
perl5.t giving PIL2JS indigestion... | 17:18 | ||
svnbot6 | r6535 | autrijus++ | * port Inline::Pugs to use the PIL-Run runtime. So far this works: | 17:23 | |
r6535 | autrijus++ | use Inline Pugs => q{ | |||
r6535 | autrijus++ | sub intone { say "Hello, $_!" } | |||
r6535 | autrijus++ | }; | |||
r6535 | autrijus++ | intone('World'); | |||
autrijus | seen fglock | 17:39 | |
hm. I'll check back when I wake up. | |||
autrijus sleeps & | |||
putter | good night autrijus... | 17:40 | |
ibech++! :) looks great. more smokes coming... | |||
err, iblech++ ;) | |||
iblech | Night autrijus :) | 17:42 | |
Thanks, putter++, for the idea :) | |||
putter | iblech: does a single js get used for multiple tests? I have a js, now running for 12+ minutes, which has been slowly growing, now almost up to 1/2 GB. | 17:53 | |
svnbot6 | r6536 | yiyihu++ | Change the test according to www.nntp.perl.org/group/perl.perl6....uage/22883 | ||
iblech | putter: No | 17:54 | |
putter: 12+ min -- if you set PIL2JS_RESOURCE_GUARD=1, then all js's taking longer than 35s are killed by the kernel | |||
putter | I may have broke something by ^Z'ing the test to get some swapping-free breathing room. | 17:55 | |
iblech | no, that shouldn't have changed anything | ||
putter | do many tests exceed 35s? | ||
xinming | ?eval [+][1,3,5] | 17:57 | |
evalbot_6528 | (1, 3, 5) | ||
iblech | putter: At least on my machine (1.667 GHz, 512 MiB RAM) probably only the rules/ tests | 17:58 | |
putter | ok. tnx. | 17:59 | |
iblech | xinming: "dies_ok { position_with_slurpy_hash1 n => 100, test => 40, 1, 3, 5, 7 }," -- why? | ||
xinming | iblech: hold on please | 18:01 | |
iblech | xinming: Finished reading the rest -- looks correct :) | 18:02 | |
xinming | iblech: :-P forget to add 100 before (n => 100) pair. T_T | ||
iblech: help me fix it please. :-) | 18:03 | ||
iblech | xinming: Ah, ok, then it's correct :) | ||
xinming: err, you mean forgot to add (n => 100) before the pair (n => 100), right? | 18:04 | ||
xinming | dies_ok { position_with_slurpy_hash1 100, n => 100, test => 40, 1, 3, 5, 7 } | ||
iblech: the comment above the test shows what I wisht o do. :-) | 18:05 | ||
iblech | xinming: You've to add another n => "does not matter" to the arglist, or you've to s/dies_ok/lives_ok/ | 18:06 | |
xinming | iblech: ... | 18:07 | |
bbl | |||
## `sub func ( $a, *%h ) { }; func 100, a => 200` should be an error | 18:09 | ||
dies_ok { position_with_slurpy_hash1 n => 100, test => 40, 1, 3, 5, 7 }, | |||
'Testing: passing positional parameter with pair which has the same key name.'; | |||
I mean, change this dies_ok { .. }... | 18:10 | ||
to dies_ok { position_with_slurpy_hash1 100, n => 100, test => 40, 1, 3, 5, 7 }, ' ... '; | |||
because you ever said that might raise an error. | |||
ods15 | evalbot_6528: say "a" for (1...); | 18:11 | |
err | |||
?eval say "a" for (1...); | |||
evalbot_6528 | pugs: out of memory (requested 1048576 bytes) | ||
ods15 | ?eval $a = 1+2 for (1...); | ||
evalbot_6528 | pugs: out of memory (requested 1048576 bytes) | ||
ods15 | ?eval $a = 1+2 while (1); | ||
evalbot_6528 | Error: Undeclared variable: "$a" | ||
ods15 | ?eval my $a; $a = 1+2 while (1); | ||
evalbot_6528 | (no output) | 18:12 | |
ods15 | did i break it? | ||
ah, damn, smart :P | |||
iblech | xinming: Right, "sub func ( $a, *%h ) { }; func 100, a => 200" should be an error, but &position_with_slurpy_hash1 has got an additional *@slurpy_array which accepts the additional "100" | ||
ods15: evalbot is unbreakable :D | |||
ods15 | i've gotta find something :P | ||
xinming | iblech: hmm, | ||
ods15 | ?eval say "hello\nworld" | 18:13 | |
evalbot_6528 | hello world bool::true | ||
ods15 | ?eval say "hello\nworld"; | ||
evalbot_6528 | hello world bool::true | ||
iblech | ods15: It s:g/\n/ / :) | ||
?eval "\n" x 100 # would be many lines | 18:14 | ||
evalbot_6528 | ' ' | ||
xinming | iblech: Oh, Ok, thanks for reminding me this. | ||
ods15 | iblech: ya otherwise i could send irc commands | ||
iblech | xinming: Sure. Thanks for fixing the rest of the test :) | ||
ods15 | say "bla\nquit" | ||
iblech | ods15: And you could flood the channel | ||
ods15 | only if i did 'privmsg #perl6 :' after each \n .... | 18:15 | |
iblech | ods15: But no, that wouldn't be possibly, because Net::IRC is smarty enough and appends PRIVMSG #perl6 to each line | ||
ods15 | ay | ||
xinming | iblech: by the way. | 18:19 | |
putter | ok, while that runs... | 18:20 | |
svnbot6 | r6537 | putter++ | Consolidated ENV{PUGS_RUNTIME} hackery in run-smoke. yaml_harness is now backend-clean. | ||
r6537 | putter++ | yaml_harness.pl: --exclude now takes a regex pattern rather than a string, and it is applied to the path, not just the bare filename. | |||
putter | iblech: is there a ~~ in piljs? | ||
xinming | sub func ( $a, *%h ) { }; func( 100, x => 1, y => 2, 11, 12, 13 ); will this be an error? | ||
I think so. :-) | 18:21 | ||
iblech | xinming: Right, as there's no place where the 11,12,13 could go. It would work if you added a *@slurpy_array, though. | ||
putter | ah well. I tried smokeserv-client'ing a copy of Johnathan's smoke, so we would have something windows up, but got a error: The submitted smoke has an invalid format! | 18:26 | |
iblech | Right, as it doesn't contain a pugs-path-info | 18:27 | |
Only new copies of yaml_harness.pl include that field | 18:28 | ||
(It is needed to associate a smoke with normal/PIL2JS/PIL-Run) | |||
putter | Ok. So in future we'll be able to use them. good. | ||
iblech | Right. | ||
xinming | ?eval { sub foo { $_.say } }; foo( "haha" ); | 18:29 | |
evalbot_6528 | haha bool::true | ||
xinming | Is this a bug? | ||
sub is defined in a closure, how can it be "package" scoped? | |||
putter | perhaps you meant my sub ... | 18:30 | |
iblech | xinming: Pugs' behaviour is correct: sub foo {...} is really BEGIN { our &foo ::= sub {...} } | ||
xinming: Thus all sub declarations are automatically package-scoped, unless you prefix them with "my" | |||
?eval { my sub foo { $_.say } }; foo( "haha" ); | 18:31 | ||
evalbot_6528 | Error: No compatible subroutine found: "&foo" | ||
svnbot6 | r6538 | putter++ | crude_repl.pl: added -w command line argument (ignored). make smoke-perl5 again works. | 18:38 | |
putter | iblech: can spidermonkey do a system() call? (google is proving unhelpful...) | 18:42 | |
iblech | putter: Not that I know of... | ||
putter: At least the standard bin/js does not. I tried embedding spidermonkey in a P5 script (to provide printWithoutNewLine, sleep, etc.), but I got many segfaults | 18:43 | ||
Aankh|Clone goes to sleep. | 18:44 | ||
See y'all in the morning. | |||
G'night. | |||
iblech | Night Aankhen`` :) | 18:45 | |
putter | yeah, I dont see it in the source. ah well, no parrot pge for p6 rules. | 18:46 | |
g'night Aankhen``. welcome back. | 18:47 | ||
iblech: you've seen the p5 cpan module to use spidermonkey? | |||
iblech | putter: Right, I've used that | ||
putter | wow. dont think I've ever seen a 3GB perl process before. | 18:49 | |
iblech | I have seen some of them since PIL2JS was able to make smoke :) | 18:52 | |
putter | hmm, there seem to be two of them search.cpan.org/~claesjac/JavaScript-0.55/ search.cpan.org/~mschilli/JavaScrip...nkey-0.11/ | ||
the first seems under active development. | 18:53 | ||
iblech | I took the first | ||
putter | mmm... Inline::Pugs::JS ... ;) | 18:54 | |
iblech | :) | ||
putter | autrijus: btw, re one of your soft typing posts, one option I didnt see mention is the compiler emitting both simple and optimized code, and using observer hooks to invalidate the optimized version. | 19:02 | |
JavaScripdt::SpiderMonkey make test works at least. | 19:07 | ||
iblech | JavaScript.pm worked fine for small scripts -- but with the embedded Prelude (at that time ~~5000 lines), it segfaulted all the time... | 19:09 | |
putter | ;) pugs, its not just perl6, it's a stress test. | 19:11 | |
fglock | hi all | 19:17 | |
iblech | Hi fglock | 19:19 | |
putter | woot. JavaScripdt::SpiderMonkey handles a "commented out a couple of problematic lines" version of PIL2JS.js ! :) | 19:27 | |
pasteling | "puttern" at 66.30.119.55 pasted "non-functional diff to PIL2JS.js to run under JavaScripdt::SpiderMonkey" (76 lines, 2.1K) at sial.org/pbot/12782 | 19:31 | |
putter | hi fglock. | 19:32 | |
fglock | hi putter | ||
putter | "handles" as in "survives well enough to run trivial p5 callback at end". none/little of the code was actually run. | 19:36 | |
svnbot6 | r6539 | fglock++ | * PIL-Run - fixed lazy slices - @a[1..1000]=@a[1001..2000] | 19:38 | |
putter | fglock: have you seen iblech's new smoke server? m19s28.vlinux.de/cgi-bin/pugs-smokeserv.pl | 19:39 | |
iblech: I added a link from pugs.kwiki.org/?SmokedPugs | 19:40 | ||
fglock | nice - are you placing PIL-Run there too? | 19:41 | |
putter | ha. couldn't ask for a better straight-line. smoke done. uploading... | ||
iblech | putter: Thanks :) | 19:42 | |
:D | |||
putter | :( error: The submitted smoke has an invalid format! | ||
Hmm, no pugs-path-info field... | 19:43 | ||
iblech | old yaml_harness.pl? | ||
putter | nope, brand new recently edited and commited yaml_harness. maybe I broke something? | 19:44 | |
iblech | checking... | 19:45 | |
hm, your commit seems sane | 19:47 | ||
manually add "pugs-path: something/PIL-Run/something" so you can upload it? | 19:48 | ||
but yaml_harness should add pugs-path, hm | 19:49 | ||
putter | I see a $Config{"pugs-path"}, is that what should be doing it? | ||
iblech | Right. | ||
putter | $Config{"pugs-path"} = $ENV{HARNESS_PERL}; | ||
hmm, no other action required...? | |||
iblech | I think so. At least, it worked when you and I tested it | 19:50 | |
putter | I see pugs-path in the config: in the smoke file. where does the -info come in? | ||
iblech | ERR! I misread your "Hmm, no pugs-path-info field..." as no pugs-path (without -info) | 19:51 | |
-info is not necessary | |||
Could you nopaste the header section from the smoke.html please? | 19:52 | ||
putter | pasting... | ||
xinming | ?eval { my foo { 'a'.say } foo;} { my foo { 'b'.say } foo;}] | ||
evalbot_6528 | Error: unexpected "{" expecting variable name or "(" | ||
xinming | ?eval { my foo { 'a'.say } foo;} { my foo { 'b'.say } foo;} | ||
evalbot_6528 | Error: unexpected "{" expecting variable name or "(" | ||
xinming | ?eval { my foo { 'a'.say } foo;}; { my foo { 'b'.say } foo;} | ||
evalbot_6528 | Error: unexpected "{" expecting variable name or "(" | ||
iblech | xinming: You need the "sub" keyword -- my *sub* foo {... | ||
xinming | ?eval { my sub foo { 'a'.say } foo;}; { my sub foo { 'b'.say } foo;} | 19:53 | |
evalbot_6528 | a b bool::true | ||
wolverian | er, should that output anything actually? I thought bare { }s are closures now | ||
pasteling | "putter" at 66.30.119.55 pasted "requested smoke-perl5 header section" (27 lines, 697B) at sial.org/pbot/12783 | ||
wolverian | or are they called automatically in void context? | ||
iblech | wolverian: Right, they're called automatically | 19:54 | |
wolverian | I don't know if I like that. | ||
sub foo { { ... } } foo; # calls the inner closure? | |||
iblech | wolverian: Right, you need "return {...}" if you want to return the closure | ||
wolverian | ew. | 19:55 | |
that feels exceedingly ugly. | |||
iblech | putter: I changed smokeserv-server.pl to be a bit more verbose -- could you try uploading it again? | ||
putter | uploading... | 19:56 | |
xinming | ?eval sub foo(+$n, *%h, *@a){ @a.sum }; foo 1, x => 20, y => 300, 4000; | ||
evalbot_6528 | 4000 | ||
xinming | is it a bug? | ||
iblech | wolverian: If you want blocks, there's no way around it -- or do you want to type "{ my $a... }()" (with the ()) all the time? | ||
xinming | named param act the same as positional | ||
putter | error: The submitted smoke has an invalid format![[summary!runcore!duration!pugs_revision!]] | ||
iblech | xinming: It is | ||
wolverian | iblech, do { } | ||
iblech | putter: Aha! It lacks the osname! | 19:57 | |
xinming | iblech: oh, I ever thought there might be something wrong with my test. | ||
iblech | putter: Should I $osname ||= "(unknown)"? | ||
xinming | and even think that the bug is about function scope | ||
wolverian | iblech, I don't like that I have to remember that closures are a special case when you return them from a function | 19:58 | |
iblech, it feels like perl5 | |||
putter | hmm. smoke complains each time I run it that I should do something with a configure file, or give it an --anonymous option. neither of which are easy enough to have been pursued. could that be part of the problem? | ||
iblech | putter: That should only be relevant if you want your name to be included in the smoke.html | 19:59 | |
fglock | PIL-Run thinks (1..2,5) is ((1,2),5) | ||
svnbot6 | r6540 | fglock++ | * perl5/Array - fixed "@a[4..5]=6" | ||
iblech | putter: I've fixed smokeserv, try again please? :) | ||
fglock: Probably because * in subroutine signatures isn't implement correctly (as &infix:<,> has a signature of (*@things)) | 20:00 | ||
putter | iblech: "unknown" isnt a fix... something about smoke is broken... | ||
iblech | fglock: * has to flatten arrays | ||
putter | its a workaround... | ||
iblech | putter: right... | ||
putter | uploading anyway... | ||
error: The submitted smoke has an invalid format![[summary!runcore!duration!pugs_revision!]] | 20:01 | ||
why dont I paste the entire beginning of the file, so you can easily test? | |||
iblech | You're definitely right, it's something weird with the smoke system | 20:02 | |
pugs_version wasn't set | |||
oooh! | |||
I know why! | |||
build_info: "--version unimplemented\n" | 20:03 | ||
It's crude_repl | |||
putter | ? | ||
iblech | the run-smoke calls $pugs --version to get the build info | ||
osname, version number, etc. | |||
putter | ahhhhhh. | ||
fixing... | |||
iblech | :) | ||
putter++ | |||
putter | err, but pugs --version doesnt have osname...?? | 20:04 | |
does say Version: 6.2.9 (r6531) | 20:05 | ||
iblech | hrm | ||
right. | |||
looking... | |||
ah, it calls -V | 20:06 | ||
see yaml_harness.pl:121 | |||
$self->{_build_info} = join '', qx{$executable -V}; | |||
putter | ahh, not --version, but -V | ||
ok, I'll fudge that. use pugs's -V. what does js smoke do? | 20:07 | ||
iblech | pugs-smokejs.pl proxies most calls to the real pugs | 20:08 | |
putter | ok | ||
iblech | only pugs-smokejs.pl pugs -w t/foo/bla.t is handed over to PIL2JS | ||
svnbot6 | r6541 | fglock++ | * PIL-Run - p6_from_a has a signature of *@a | 20:11 | |
r6541 | fglock++ | - this fixes <,> - @a[1..2,5]=@b works now | |||
fglock | bbiab | 20:12 | |
putter | I fixed crude_repl, and hand patched smoke-perl5.html with the output. uploaded.... | 20:16 | |
works! :) | |||
Duration a bit arbitrary. Took me a while to notice one of the tests is currently non-terminating. | 20:17 | ||
svnbot6 | r6542 | putter++ | crude_repl.pm: -V passed on to pugs. The version information is used by smoke. | ||
iblech | :) | ||
Great! | 20:18 | ||
putter | smoke-pir in progress... ;) | ||
iblech: spiffy site. | 20:20 | ||
iblech | Hm, problem: pugs-path is "./pugs" with make smoke-pir | ||
Fixed, testing | 20:21 | ||
svnbot6 | r6543 | yiyihu++ | Correct some mistake I made. Rewrite Part of test, which makes it clear... (to me at least) | 20:23 | |
iblech | fix doesn't work... | 20:25 | |
putter | the smoke is running far too well... I suspect its not -BPIR. | ||
looks like Makefile passes -BPIR to run_smoke.pl. exploring... | 20:26 | ||
iblech | Hm, it seems $optional_args doesn't get used | ||
Probably changing line 17 of run-smoke.pl to include $optional_args suffices | 20:27 | ||
xinming | iblech: which line please? :-) | ||
iblech | xinming: Hm? I meant line 17 of run-smoke.pl (not your test) | ||
xinming | I am watching for your feedback. ;-) | ||
iblech: oh,Ok, hmm, Need to take a shower. bbl. | 20:28 | ||
putter | yes, fix in. | ||
svnbot6 | r6544 | putter++ | run_smoke.pl: was ignoring optional command line arguments. so make smoke-pir wasnt -BPIR. Fixed. | ||
iblech | xinming: Ah :) | ||
putter | or not fixed... | 20:29 | |
ah, Null PMC access. fixed! :) | 20:30 | ||
iblech | :) | 20:32 | |
putter | So, iblech. (putter briefly dons "interviewer" hat), what are your plans for PIL2JS? | ||
;) | 20:33 | ||
iblech | My goal for the very near feature is to make .pairs work again. | ||
putter | lol | ||
iblech | Really, PIL2JS is still a fun-only project, I don't have any real plans :) | 20:34 | |
putter | Quite a remarkable fun-only project. Did you think it would get as far as it has when you started? | 20:36 | |
putter notes that if not for rules support, with its unusual number of tests, PIL2JS would be neck and neck with the pugs backend... | 20:37 | ||
iblech | Thanks :) No, absolutely not. The prototype was a 400 line long script, and it worked, then I wanted to pass 01-sanity, then mandel.p6, then Test.pm, and suddely PIL2JS passed 74% :) | 20:38 | |
putter | And that's doing things well enough to make up for not receiving any oo data from pugs via pil. | ||
:) | 20:39 | ||
obra | how fast is PIL2JS running these days? | 20:40 | |
putter | So perl6 may someday be a JSAN module? ;) | ||
iblech | obra: A complete smoke (without ext/), with a guard so no test may take longer than 35s, takes ~~44min. | 20:41 | |
obra: I.e., it's probably half as fast as normal Pugs | |||
obra | nod | 20:42 | |
iblech | obra: It used to be much faster (before the CPS change), but without CPS, PIL2JS couldn't have continuations (and thus proper &return, coroutines, gather/take, &sleep, etc.) | 20:43 | |
obra | *nod* | ||
iblech | obra: If JavaScript had goto, PIL2JS would be at least twice as fast as it is now. | ||
obra | does the next rev of js? | 20:44 | |
iblech | Not that I know of. | ||
obra | 16:41 <iblech> obra: I.e., it's probably half as fast as normal Pugs | ||
16:43 <iblech> obra: If JavaScript had goto, PIL2JS would be at least twice as fast as it is now. | |||
Those statements taken together scare me ;) | |||
iblech | ;) | ||
clkao | mad iblech | 20:47 | |
iblech | putter: I wonder if PIL-Run passes more tests than PIR :D | 20:50 | |
xinming | back | 20:52 | |
iblech: do you think test is much bettter? :-P | 20:53 | ||
iblech | xinming: Sorry, haven't looked | ||
xinming: (Making .pairs in PIL2JS work again :)) | |||
xinming | iblech: hmm, well, It's Ok, Just wish to make my test better. | 20:54 | |
I need to sleep now, If you think there is any place which can be improved, please let me know. | 20:55 | ||
:-) | |||
bye all | |||
putter | iblech: almost certainly. smoke in progress... ;) | ||
bye xinming | 20:56 | ||
iblech | Night xinming :) | ||
putter: :) | |||
Yay! .pairs fixed! :) (PIL2JS have had this bug for three weeks) | 21:03 | ||
putter | oh my. like wow. hey iblech. working pairs++. how would you like to run them linked with perl5? | 21:04 | |
say "Hello, world" just ran in a test-jig... | 21:06 | ||
!!! | |||
Sorry. Got distracted. Yay! .pairs fixed! :-) | 21:07 | ||
./runjs.pl -e 'say "hi from linked monkey"' | 21:09 | ||
# Number of lexical scopes: 1 | |||
Skipping &*END. | |||
hi from linked monkey | |||
#IGNORE NEXT LINEFEED# | |||
1..0 | |||
#IGNORE NEXT LINEFEED# | |||
iblech | ooooh! :) | ||
No segfaults! :) | |||
pasteling | "putter" at 66.30.119.55 pasted "run_js_on_jssm" (13 lines, 368B) at sial.org/pbot/12784 | 21:11 | |
putter | oops, left the "write to file" debugging line in. | ||
leo_ | [ot] PyPy runs on its own! Hurray!. - PyPy release 0.7.0 | 21:12 | |
putter | JavaScripdt::SpiderMonkey rather than JavaScript.pm. There are two reasons for a module... | ||
leo_ | - but a bit related ;-) | ||
putter | leo_: !! huzzah! :) | ||
iblech | putter: Can you try running a bigger script (say, t/builtins/lists/elems.t)? If it doesn't segfault, check it in please :) | 21:14 | |
putter | iblech: testing... | 21:15 | |
a moment of paranoia... are Test runs now independent? (I'd hate to stomp on the takes-a-long-time PIR smoke...) | 21:17 | ||
iblech | I think they are. And I think that all tests which do IO (= which could interfer) won't run under -BPIR | 21:18 | |
putter | ah, what the hell... array/elems.t 12 for 12! :) | ||
what's a harder one...? | 21:20 | ||
;) | |||
iblech | Wow! | 21:21 | |
arith.t | |||
putter | testing... | ||
iblech | this one should take relatively much memory | ||
I.e. it's a good stress test | 21:22 | ||
putter | ReferenceError: _26main_3a_3atryeq is not defined ? | 21:24 | |
iblech | Works fine here... | 21:28 | |
svnbot6 | r6545 | iblech++ | Pairs should stringify to "$key\t$value", per the | ||
r6545 | iblech++ | pairs-behave-like-one-elem-hashes. Modified | |||
r6545 | iblech++ | t/builtins/arrays_and_hashes/pairs.t and t/data_types/pair.t accordingly. | |||
r6546 | iblech++ | PIL2JS: Fix the long-standing bug of .pairs not working. | |||
r6546 | iblech++ | * PIL2JS.js: Repair %hash = @array | |||
r6546 | iblech++ | * PIL2JS.js: Croak on unknown container combinations | |||
r6546 | iblech++ | * PIL2JS.js: Make $foo := $bar call $foo's .STORE **with an invocant**. | |||
putter | I get the same error, modulo the extra #IGNORE NEXT LINEFEED#s, with normal run_js(). | ||
js gets over 1GB big doing arith.t! | 21:29 | ||
putter svn up's | |||
iblech | Hm, weird. Do you get the error at the very beginning or later on? | 21:30 | |
putter | very later on. | ||
has actually printed the 1..183. error is the next line show. | 21:31 | ||
iblech | Very weird. &tryeq is used at the very beginning, so it should not die later on | 21:32 | |
("_26main_3a_3atryeq is not defined" == "&tryeq not declared") | 21:33 | ||
d'oh, misread you. | 21:34 | ||
pasteling | "putter" at 66.30.119.55 pasted "runjs arith.t error message" (15 lines, 1.2K) at sial.org/pbot/12786 | ||
iblech | It has to have do to something with your modifications, as arith.t runs fine here (I ^Ced after ok 117) | 21:35 | |
Hm, I don't have any local modifications ATM either... | 21:36 | ||
BTW, the huge memory usage of pil2js.pl may be because of a bug in perl5 -- I've found at least one bug (lib/PIL/PApp.pm:146 -- a lone "$self;" changes things), so it's possibly that some internal state is b0rked | 21:39 | ||
svnbot6 | r6547 | putter++ | PIL2JS - JavaScripdt::SpiderMonkey support | 21:40 | |
iblech | oooh /me goes to look | ||
putter | I svn up -r6546 . Same error. Could it be a PATH problem? Ie, a file not loaded? Do you normally invoke runjs elsewhere? Puzzled... | 21:42 | |
well, smoke-pir is quite boring. :/ | 21:44 | ||
wilx | How do you run the JS tests? | 21:46 | |
Just with Firefox? | |||
iblech | putter: I normally run runjs.pl from perl5/PIL2JS/, but that shouldn't be a problem. | ||
putter: Want to send me the .js runjs would execute? | |||
putter | uploaded. those %ok are very misleading. PIR choked on almost every test. but of those few it didnt, it got some oks. just not the right thing... | ||
iblech | wilx: make smoke-js | ||
putter | does make test-js work now? | 21:47 | |
iblech: all 1.6MB of it? | 21:48 | ||
ok, make test-js isnt working yet. t/01-sanity/01-tap.................................pugs: user error (Cannot generate code for Js). so just make smoke-js. or running the tests individually. | 21:49 | ||
iblech: there is a | 21:51 | ||
var _26Test_3a_3atryeq but no var _26main_3a_3atryeq. | 21:52 | ||
iblech | 23:48 < iblech> putter: WRT PIR -- the two tests which work are both run at compile-time, | ||
the runtime doesn't have anything to do... | |||
23:48 < iblech> putter: Haven't tested | |||
23:48 < iblech> putter: No, it doesn't know about -BJS | 21:53 | ||
putter tries to decode iblech's post... | 21:54 | ||
iblech | I mean, the only test PIR passes are exit_in_check.t and exit_in_begin.t | ||
putter | got it. | ||
;) | 21:55 | ||
so, _26Test_3a_3atryeq is defined, and used once or twice. _26main_3a_3atryeq isnt defined, but is used a lot. | |||
iblech | That's weird. But I do have an assumption: | 21:56 | |
Try ./pugs-smokejs.pl pugs -w ../../t/operators/arith.t | |||
This is the same as runjs, but uses the precompiled Test.pm | |||
(And I tested arith.t using pugs-smokejs.pl) | 21:57 | ||
It's possible that somehow, PIL gives PIL2JS wrong sub names -- it prefixes the "tryeq" with "Test::", probably because it doesn't get that it has left Test.pm's namespace | 21:58 | ||
I.e. it thinks the declaration of tryeq is still in the "Test" namespace | 21:59 | ||
putter | ok, ./pugs-smokejs.pl pugs -w ../../t/operators/arith.t worked. | ||
?? | |||
iblech | ok, assumption confirmed :) | 22:00 | |
putter | :) | ||
iblech | To summarize: Pugs thinks "module Test {...}; sub tryeq {...}" really means "module Test { ...; sub tryeq {...} }" | ||
(but Pugs is wrong.) | |||
putter | And in answer to your long-ago question... JS::SM does arith.t! :) | 22:02 | |
iblech | :)) | ||
putter++ | |||
putter | use Inline::Pugs is definitely going to need some options now... ;) | 22:03 | |
iblech | :D | 22:04 | |
putter | I suppose the right thing is runjs or something taking a --compile-to-js -o - and then doing the rest in some p5 module? | 22:05 | |
oh, no. there isnt any reason to have a separate process. a PIL2JS module? | 22:06 | ||
iblech | There's jsbin_hack(compile_perl6_to_standalone_js("-e", $code)) | 22:07 | |
putter | use PIL2JS; PIL2JS::compile_p6_to_js() ? | ||
ah. | |||
perl -Ilib -we 'use PIL2JS; PIL2JS::eval_p6(q/say "hi"/);' | 22:14 | ||
iblech | Hm, but I don't see a possibility of "PIL2JS::eval_p6(q/sub foo {...}/); foo(...)" working | 22:16 | |
Unless we use IPC, similar to how Pugs communicates with an external Parrot | |||
putter | is there a mechanism for js to wait on/watch an object? the JSSM api lets one modify objects in the (I assume) running runtime. | 22:20 | |
iblech | Err. Ignore what I said. I forgot JS can run in the same process as the main P5 program now. | 22:21 | |
In this case, I see the possibililty of it working :) | |||
putter | ;) | ||
iblech | ok, clearly I need to sleep now ;) | 22:22 | |
Night all! :) | |||
putter | though perhaps PIL2JS should just provide code, rather than eval and such. else you have to worry about multiple $js instances, throwaway vs persistant, etc. | ||
ok, | |||
good night iblech! | |||
Fun day. Thanks! | 22:23 | ||
fglock | putter: ping | 23:04 | |
putter | pong | 23:08 | |
fglock: pong | |||
fglock | hi putter | 23:09 | |
how are the tests going? | |||
putter | hi | ||
tests? | |||
There is now a smoke-all on iblech's server...? | 23:10 | ||
fglock | you were trying to make Test work on PIR-Run? | ||
putter | briefly. ;) PIL-Run currently uses its own Test.pm in its lib6. | 23:12 | |
basically, | 23:13 | ||
fglock | maybe I'll write some tests with lazy arrays - but I'll need some way to time-out the failing tests | ||
putter | ok, that should be easy to add... working.. | 23:15 | |
fglock | I'll take a look on making hashes work | 23:19 | |
putter | fglock: 6548 has a --timeout argument. it may even work. hmm, perhaps an ENV variable would be easier to use with make smoke, etc? | 23:28 | |
fglock | thanks - I'll check it | 23:29 | |
putter | 6549 has a PUGS_HACK_TIMEOUT env var. | 23:30 | |
svnbot6 | r6548 | putter++ | crude_repl.pl: new --timeout Nsec argument. | ||
r6549 | putter++ | crude_repl.pl: can also set timeout with an environment variable. | |||
r6550 | fglock++ | * perl5/Value - Pair stringifies | |||
fglock | should I use the t/ directory? | 23:35 | |
PIL-Run/t | |||
putter | err... | 23:40 | |
whatever is easiest. the perl5/ slushpile needs to go away, but for now, I guess, whereever. | 23:41 | ||
fglock | maybe pugs/t ? the problem is that pugs doesn't implement lazy lists, and will loop forever | 23:42 | |
putter | ahh. | ||
hmm, maybe crude_repl should define a "you are running on X backend" variable? | |||
then the test can be if X'ed. | 23:43 | ||
fglock | $?BACKEND ? | 23:44 | |
putter | eh, howabout pilrun t/ for now, and then we'll deal with the integration as part of perl5/ going away...? | ||
(the "eh" was for the concept - you subsequent suggestion, $?BACKEND, is plausible) | |||
does JS do lazy, or only P5? | 23:45 | ||
fglock | don't know | 23:47 | |
I'm trying to implement postfix:<...> - Inf works, but 1..Inf gives an empty list | 23:49 | ||
putter | err, whats the name of some $?FOO variable? (putter has to leave rsn and is drawing a blank) | ||
fglock | ? | 23:50 | |
putter | got it. Run.hs. tnx | ||
fglock | bbiab & | 23:57 | |
putter | fglock: 6552. | 23:58 | |
good night & | 23:59 |