Pugs 6.2.8 released! | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by autrijus on 13 July 2005.
stevan jdv79: re: leo's comment. 00:01
he is wrong
or rather his MRO is wrong
I think
but even still it does not matter if we match him or not
parrot should not dictate things like method resolution order 00:02
that should be a language level descision
not a VM level
Khisanth so you can do OOP in PASM? 00:06
sili ugh 00:07
stevan Khisanth: yes, but why would you want to :P
ok, responded to Leo 00:12
I think Parrot might have it wrong
jdv79 from what i remember parrot can but you can easily top out with little to no performance issue 00:17
opt rather
i think the point of doing in the VM was cross lang integration or something 00:18
stevan jdv79: but perl5 uses preorder dispatch 00:21
python uses pre-order with a little breadth first mixed in to handle odd MI cases
Perl 6 will use C3, and Python 2.3 new style classes use C3
There are subtle differences and wide open differences between all those, not to mention whatever Ruby/TCL/etc will do 00:22
in the end, it probably wont be useful for anything other then Parrot
putter sigh. we need to find a way to do bulk testing of p6. my latest "well, there's the bug, now what?" is a trivial method calling another trivial method... which returns up the stack. the recent dramatic progress has all been p5 based... and there's a reason for that. ug. 00:23
jdv79 i think .NET dictates the OO system...
i'm by no means studied on the subject though
stevan jdv79: in a way yes, if you compile your code into the .NET ILASM objects 00:24
but you dont have to do that
putter "returns up the stack" as in doesn't return to it's caller, but skips further up.
stevan you can use those to implement languages primatives instead
and build your OO on top of it
jdv79 ah
stevan putter: do you mean "next METHOD"?
jdv79 no performance penalty?
stevan jdv79: of course there is 00:25
but if you want a really fast runtime, you dont use a VM
:)
jdv79: my point is only that the behvaior of the metamodel is a language specific concept, and should not be dictated to by the VM 00:26
jdv79 i got you on that
putter no. method re($s){$.rexp ~= $s} method do_subrule($n,$cap) { push(@$.names,$n); say "zog2"; ./re("((?P>$name))"); say "zog3"; $.cap_cnt++; }
jdv79 but the closer that can be approximated in the VM the more performant it will be, no?
stevan besides, Perl 6 is supposed to support at least 4 different dispatch orders; pre-order, breadth-first, ascendant and descendant 00:27
putter zog2 but no zog3. do_subrule calls re, which never comes back. control reapears further up the stack.
stevan jdv79: yes, that is true, but then your VM becomes either language specific, or language limiting
putter: that looks broken to me 00:28
putter code or behavior?
stevan or rather, your code looks sane, but the behvaior you describe is not 00:29
00:29 joepurl_ is now known as joepuel
putter no. it's like this every time I try to do something largish (order 1k lines). has been for months, though the details vary. sigh. 00:31
ok, any ideas on how to do bulk testing?
jdv79 so why not make it lang specific to give p6 an advantage then?
stevan putter: the OO model is broken right now relaly
jdv79 might as well let one lang use it than none, right:) 00:32
stevan jdv79: if we can convince Leo, then sure, why not
jdv79 could be cool
stevan jdv79: unfortunatly parrot only has one test for this kind of stuff, and it is the reverse ordering too 00:33
so it is hard to say if the algorithm is right or not
putter yes. I probably should have stuck to subs in package. it's just such a pain though for this particular app. ah well.
stevan putter: its the price of living on the cutting edge :) 00:34
putter ok, re bulk testing, abstract specification seems... non-trivial. so perhaps transliterate some language into p6. compare behavior, and variation is bug in transliterator or p6. some language with a large test suite or lots of code. 00:35
jdv79 stevan, if i understood it a bit more and had some more time...:(
putter re, cutting edge, true. 00:36
stevan putter: you mean like QuickCheck or LectroTest?
jdv79: to be honest, I have little interest in Parrot. It's not my end of things :) 00:37
and my time is limited as it is, damn $work is always getting the way
jdv79 yeah
stevan putter: the problem with specification testing is that you need a spec ;) 00:38
at least a fairly static one :)
putter my guess is an invariant-based approach to difficult for the volume of testing I have in mind. re spec, that too.
jdv79 but parrot is still the best shot at the most efficient backend, right? 00:39
stevan jdv79: not nessecarily 00:40
p5, JS, etc. they will surely be slow
putter so either, transliteration, ruby or p5 or scheme -> p6, or parallel generation (make program describing tree, emit p6 and something else (rb? p5?), run both, and if they differ, either your emitter code or p6 is busted).
stevan however, Pugs -> PIL -> Haskell -> JHC might be pretty nice
jdv79 oh 00:41
stevan and compiling PIL to something like C-- would probably be really fast
putter can automagically randomly generate tree, and just leave it running.
stevan putter: so you mean bulk testing ASTs?? 00:42
putter basically.
stevan putter: I am confused, you seem to do that to me often :)
so you want to verify that the basic AST and code structure has not changed from day to day 00:43
putter no... hmm, good exercise, I'll attempt to take it from the top.
stevan ok 00:44
stevan gets mentally prepared
putter I had to backspace over half a line of text, just to say, lol :) 00:45
stevan :D
putter p6 is buggy. this has two flavors. the many non-light-green areas of smoke. and stuff which people think is working but isnt quite. 00:46
stevan stuff not quite tested enough basically 00:47
putter whether the latter is "intersting" in light of the former is an open question. especially where the former basically means things need a rewrite.
yes.
stevan tests are no fun when they dont work
and even less fun if they dont parse
putter but if one does want to pursue the latter, the question is how.
re fun, maybe we need to create a social dynamic which better encourages the contribution of failing tests. perhaps make a point in the journal of mentioning the topmost contributors of faiing tests for the day? 00:49
stevan putter: well I think one problem is that we have a lot of tests 00:50
and it is hard to see what is testing and whay is not
I used to spend whole days just weeding out duplicate tests
putter re how, you need to get two things, some p6 code, and knowledge of what it _should_ do.
stevan but this was back when only had like 1000
putter good point. how might that be improved? 00:51
stevan ahh, but what knowledge of what it __should__ do is not always available
putter: to be honest, I think right now the best tests are modules, and modules with big test suites
these exercise corner cases which are much too difficult to come up with in a plain old unit tests 00:52
but once you discover these errors in your module, it is possible to ferret out the test into a single unit test
putter re test, I've wondered whether, if tests had uids, we could build a secondary structure "mumble is believed to work if tests xxx" are working. but it's not clear it would be worth the hassle.
re modules, good point. 00:53
stevan putter: I know nothingmuch is working on a test run comparison tool
so you can compare two runs of the test suite and see what happened
I think he is going to be working on it this weekend at Gaal's hackathon
at least I hope he is 00:54
putter: the thing about pugs is that it is optimized for fun
and the whole reason we have as many people as we do hacking away
is that it is fun
you can write a module, you can write a game, you can learn haskell
etc
putter re bulk testing, what _should_ do, that's the challenge. one approach is to have code in both p6 and some other language, where you have some reason to believe the codes should be equivalent, run them both, and compare behavior. 00:55
stevan its like one of those "interactive"science museums but for grownup programmers
putter: that is a good idea. P5 would be a good first start
jdv79 the franklin institute is cool like that
stevan I did that with the File::Spec test suite, I had a p6 version and a p5 version 00:56
jdv79: exactly...
some see the Haskell,.. go ahead you can touch it...
putter was larry working on a p5 to p6 transliterator at the last hackathon...?? (a fuzzy memory)
stevan look over there, it is Type Theory!,... look how it sparkles when you talk about it
justatheory types
stevan putter: he was working on some crazy tool which took the un-optimized P5 opcode tree and serialized it to XML 00:57
putter ok, on that thread, how could pugs be better optimized for fun?
stevan at least I think that was what it did
putter: it is not fun now :)
mugwump sighs at lwall's insistence on a distinction between "internal" and "external" attributes
stevan thinks mugwump's sea-cucumber OO is kinda interesting :) 00:58
mugwump sea cucumber? I mean, I know what it is - I've seen the Jackass movie 00:59
stevan a sea cucumber turns itself inside out when it is poked at 01:00
it is a defense mechanism
your objects seems to turn inside out (at least as I understood you)
mugwump It just seems to me to be the "right" way to do object attributes. I can't see what good it does defining $.foo to be the normal form, other than simplifying compilation perhaps 01:02
it just seems overly imperative
stevan putter: I think your idea is good, but I think it will make much more sense when we move to PIL 01:08
then we will have a consistent form which things will be compiled too
and we can test against that
but it is time for me to get off the computer, my eyes are starting to blur and burn :) 01:09
&
putter night stevan & 01:17
Khisanth err "*** Undeclared variable: "$^a""? aren't you suppose to be able to just use those? 01:22
mugwump ?eval $^a 01:29
evalbot6 Error: Undeclared variable: "$^a"
mugwump ?eval { $^a }(1) 01:30
evalbot6 \1
mugwump ?eval { $^a }.arity
evalbot6 1
mugwump ?eval { $^a, $^b }.arity
evalbot6 2
mugwump ?eval { $^a, $^b, $^a }.arity
evalbot6 2
Khisanth hmm strange it stopped complaining all of a sudden 01:31
sub infix:<+> { $^a - $^b } 1+2; gives that error but if I do sub infix:<+>($a,$b) { $a - $b } 1+2; and THEN use that it doesn't give an error 01:32
mugwump ooo, that would be a nice bug to test for 01:34
Khisanth this is with r5671
dudley stevan++ # Pugs-as-interactive-science-museum, heh 01:49
dudley is being brutally educated by Pugs every day 01:51
coral ?eval sub infix:<+>($a,$b) { $a + ($b * one(-1,1)) } 1+2 02:10
evalbot6 (no output)
coral woo
Darren_Duncan question on lightning talks ... 02:11
are they usually supposed to be a surprise to listeners, or is it okay to map them out in detail in a public discussion? 02:12
for example, if I do a writeup and nopaste it here in advance for feedback?
coral that would not deviate from what happens in #perl frequently before yapc
Darren_Duncan so they hash out lightning talks there? 02:13
coral not necessarily
some people use their entire 30 minute talk as a surprise though
in the interests of privacy
Darren_Duncan in my case, I want to propose a lightning talk for OSCON this august, and thought I should get some advance feedback ... 02:14
obra Both are fine
coral sure
bonus points for thinking about it
Darren_Duncan I was going to practice it tomorrow evening in front of my local Perl Mongers, but thought I should get feedback here prior to that
it it is okay, then I plan to start here within the next few hours
coral the only person it could not be okay with would be you, unless you're contractually committed to secrecy 02:15
Darren_Duncan for topic, as a brief summary, I was going to introduce my database-using modules, 'Rosetta' et al
no problem there
coral i think discussing your talk ahead of time is super-keen and should be done more often
Darren_Duncan now since people like entertainment ...
I thought up for a gimick to perhaps give the talk backwards
as in, read each sentence forwards, but the sentences are in the reverse order, so there is a semblence of understanding 02:16
coral reverse the sentences two words at a time
Darren_Duncan for example, my very first statement, followed by just a few seconds pause, is "any questions?"
coral ok, that might be a bit weird
Darren_Duncan it saves me having to come up with an opener
I don't consider myself to be that much of a creative type, more of a just the facts, so that's the best I've come up with that I haven't known anyone else to do before 02:17
coral for your second slide, put a picture of a sardine can key and a partially opened can of sardines, replace each fish's head with a perl head
draw a big red arrow to the key
"what is this, you ask? it's my opener!" 02:18
i would love to be there for that moment :)
Darren_Duncan that's a thought, though I expect to do this entirely without slides or props
as those can be a lot of work
but if I change my mind, I'll consider that idea 02:19
it also occurs to me that the talk actually wouldn't be too difficult to understand ...
because a lot of the details aren't too order dependent 02:20
coral heh!
Darren_Duncan but I can play with it a bit by first speaking generic sentences that would be fully understood if spoken later but can be ambiguous if spoken earlier
eg, after "any questions", I can say "available natively for both perl 5 and perl 6" 02:21
coral lightning talks: got a social experiment? here's a captive audience for 300 seconds.
cwest seen autrijus
jabbot cwest: autrijus was seen 8 hours 26 minutes 17 seconds ago
cwest bummer
coral Darren: people will start yelling guesses after three sentences like that
maybe 1
Darren_Duncan that says its a program or service, but not which one ... people expect a lot of lightning talks to be about what they're working on
that is, unless someone in the audience recognizes me from the online world 02:22
we will be intro'd by the host by name, I assume
coral who is the host?
Darren_Duncan question: do lightning talk hosts introduce the topic, or just the person?
coral that could easily change.
i suspect you could have them introduce you with 'any questions?' 02:23
Darren_Duncan you mean, as in saying that's my name?
coral yes. then end with your name, followed by the talk name.
Darren_Duncan it could work out, actually; the host participates in the gimmick
coral or set the talk name to 'any questions?'
if they won't go willingly lead them forced down the path
Darren_Duncan my name won't be spoken until I've finished, and it will be by the host, saying "next up, we have Darren Duncan" or some such 02:24
mugwump he might even read the title of your lightning talk :)
Darren_Duncan so I'll have to call it "any questions?"
coral which conference?
Darren_Duncan OSCON 2005 02:25
Aug 1-5
coral gnat running it?
Darren_Duncan don't know
coral hope not, he seemed tired
Darren_Duncan I just assumed it made little difference who was running it; the audience would be about the same
coral oh, ha, it's mjd doing lightning talks
Darren_Duncan which means I should expect what? 02:26
coral let him know what you're up to and invite his participation. he's friendly, and on #perl elsewhere.
Darren_Duncan I should email him privately
coral www.plover.com
Darren_Duncan that web site features something on "gay skating" 02:27
but there's Perl stuff too 02:28
coral yep 02:33
Darren_Duncan fyi, when I originally wrote [email@hidden.address] about the possibility of doing a lightning talk at my very first conference, it was a guy named Geoff who replied. 02:36
coral geoff g.? 02:37
Darren_Duncan the reply was just from 'Geoff', no further footer; from email same as quoted 02:38
coral weird, ok
Darren_Duncan He said he'll be the one notifying speakers etc ... all this took place on May 9th of this year ... things may have changed since then 02:39
coral hmm
well, start with him
search.cpan.org/~rgeoffrey/
coral & sleep 02:40
Darren_Duncan I'm thinking I will send a combined talk proposal plus request for host participation to all 3 addresses, that one, MJD, and the other you mentioned, [email@hidden.address]
it seems that some details changed; previously the deadline was the 26th, and now its the 22nd; the submission email address is now also [email@hidden.address] 02:43
back in a bit ... 02:49
Daniel_Nee Dear Autrijus: As we planned, if Tai-Fong hits here on Monday, then we'll go to nanshan on the following day, so could you meet me at the office around 1:00 PM, thanks a lot. 02:51
Darren_Duncan 'zat a hurricane? 02:52
mja typhoon in taiwan 02:53
Khisanth Daniel_Nee: no email? O_o 03:01
mja hi all, i'm looking at a relatively recent smoke test output ... most of the tests that are todo seem to be waiting on pugs support ... are there any tests that have yet to be written entirely? 03:23
mugwump plenty
mja any suggestions? I'm awash in parrot/pugs information, and attempting to swim for a place where i can hopefully make a reasonable contribution 03:24
i'm a p5 guy mainly ... though i'll try anything 03:25
mugwump ok, well normally the thing to do is to start porting a module, then when you find something that doesn't work as you'd expect, write a test case for it based on the best information you can find in the synopses
mja that sounds reasonable
thanks. :) 03:26
cwest seen autrijus 03:41
jabbot cwest: autrijus was seen 9 hours 46 minutes 43 seconds ago
brentdax Any idea why DBI::st::fetch would stop working (can't find the method) but DBI::st::fetchrow_arrayref would be just dandy? 03:49
coral ew, fetch 03:50
hmm
is fetch a method of DBI or of DBI::st ? 03:51
brentdax I believe st, but I could be wrong.
mugwump oh no! Hualien devastated by the 颱é¢Ø... eye of storm passing just over Taipei... (xrl.us/gsnb) 03:52
brentdax Looks lke DBI::st.
coral ugh
mugwump sorry, just over south of taipei 03:54
autrijus hey cwest 04:28
cwest: I'm about to run for $work -- but please typeahead :) 04:29
cwest autrijus: jsansvn6 bot needs to lookup the svn.openjsan.org hostname now, not openjsan.org 04:32
autrijus ok. still :81?
cm autrijus-san. 04:33
autrijus greetings cm-san. 04:34
cwest still, yes
cm how are the lambdas flowing?
autrijus cwest: there you go.
cwest č¬č¬ -- my irc client sucks 04:35
Those probably did not come out. Thanks though. :-)
autrijus cwest: it does :)
cwest ah, excellent
can write them, just not read
autrijus cm: it's flowing well from all directions of iso, poly, apo, hylo, para, cata, ana 04:37
cm :)
autrijus cwest: most welcome :)
cm very morphistic :]
autrijus now I gotta run... bbiab. &
ezra_ is that in reference to "Programming with bananas, lenses and barbed wire"? 04:39
autrijus yes, and to origami programming in general 04:40
ezra_ is "origami programming" just the use of higher-order functions? 04:48
cm i think it's specifically about folds & unfolds and variants 04:50
ezra_ dig it. 04:51
svnbot6 r5688, masak++ | perl5/PIL2JS/README: minor grammar fix 05:36
NitishP Hi all 07:20
masak NitishP: hi there 07:40
Aankhen`` stevan, you around? 07:44
masak likes luke palmers mail about metrics 09:54
it makes sense to me thinking of classes as sets of their possible instances 09:56
and of derived classes as subsets 10:05
ingy: ping 10:56
svnbot6 r5689, autrijus++ | * Fix the subroutine-defaulting bug reported by philcrow: 11:15
r5689, autrijus++ | the default expression for parameters should be evaluate
r5689, autrijus++ | inside the subroutine's package and lexical pads.
Arathorn is there any way to call class (rather than instance) methods in pugs yet? 12:00
or in perl6, for that matter :/
Arathorn gets lost in A12
QtPlatypus Classname.method 12:02
Just like perl5
well not just like perl5. 12:03
Arathorn oops - i mean, declare them rather than call them
sorry
Arathorn is looking for something like class Foo { state method staticmethod() { ... } } 12:04
but can't find any non-instance methods anywhere in examples/, or referred to in the AESes
or perhaps my brain has been permenantly addled by java 12:05
QtPlatypus I beleave its just.
class Foo { method bar(Str $classname:) { ...}} 12:06
Arathorn ah, ok
thank you :)
right, of course 12:07
the word 'class' had triggered my java response and made me forget that it was still perl after all :) 12:08
QtPlatypus perl will still be perl.
Arathorn finds the Class Methods chapter in A12 and all is well in the world 12:12
QtPlatypus Was I correct? 12:13
castaway_ predicts that perl will not still be perl :) 12:19
Arathorn well, as i understand it you get class-methods by forcing the declared type of the invocant to be a Class object (or derived from the Class object)
svnbot6 r5690, iblech++ | PIL2JS: Prelude::JS, pil2js -- (Hopefully) made it work with IE (can't check, though).
Arathorn so it's actually class Foo { method bar(Class $classname:) { ... } } 12:20
s/\$classname/\$class/
QtPlatypus Arh. 12:21
Arathorn ?eval class Foo { method bar(Class $classname:) { say "baaa!"; } } Foo.bar();
evalbot6 baaa! bool::true
Arathorn a bit like that, i guess
stevan morning all 12:22
Aankhen``: you rang?
Arathorn stevan: should class-methods work in the absence of the metamodel stuff being 'live' in pugs yet?
stevan Arathorn: actually I think the sig is more like method bar ($?CLASS $class:) 12:23
Arathorn: class methods and instances methods are probably the same thing (like in P5)
and MMD is just used to tell the diff
Arathorn right 12:25
I was trying to quote from A12 under Class Methods, tho', where lwall sez: 12:26
To declare an ordinary class method, such as a constructor, you say something like:
method new (Class $class: *@args) { ... }
Such a method may only be called with an invocant that "isa" "Class", that is, an object of type "Class", or derived from type "Class".
which made me think that 'Class' was indeed a special pre-defined, uh, object-definition
stevan ah, yes I see now. I suppose that should work too :)
Arathorn as per all the metalmodel fun & games
gah, meta-model
stevan $?CLASS will be the current class object for the lexical class, so it just more specific I think 12:27
Arathorn: yes, there will be a Class class :)
Arathorn okay
how do class fields/members/variables work, then? do we use state to declare them rather than has? 12:28
stevan Arathorn: the Class class is just the "bridge" between the meta-world and the user-world
Arathorn nods.
stevan Arathorn: currently the MetaClass holds all methods
and each class has a single metaclass instance 12:29
the Class has-a metaclass and sort of proxies all calls from the user-world to the meta-world
class variables are just stored in the metaclass for right now
which works since there is one metaclass for every class, it seemed a logical place to put them 12:30
Arathorn okay
stevan Arathorn: as for how to declare the class variables, I think it is using either my or our within the class definition 12:33
so class Foo { my $.class_foo; has $.instance_foo; } 12:34
Arathorn right
stevan "my" being private
and "our" being public
Arathorn is wading through the "Use of Attributes" bit of A12, which is about to come to it, i think
stevan yup
Arathorn It does however also say:
It is, however, illegal to
refer to an instance attribute variable (that is, a ""has"" variable) from within a class method. Class methods may only access class attributes, not instance attributes.
stevan Arathorn: some of A12 is wrong though, for instances the submethod stuff is a little wonky
so always check on p6l to be sure 12:35
Aankhen`` Hi stevan.
Arathorn which presumably means you need to know when you're in the class-method rather than just falling into it through MMD
stevan Arathorn: yes, I agree, the MMD part is just how it is in Pugs currently (and I am just guessing on that myself)
Aankhen`` stevan: I had a request: could you please trim down the messages you quote? As in, snip off everything except the relevant part? :-D 12:36
stevan the metamodel has a different dispatch table for the class methods and instance methods
Aankhen``: sure, in where?
Aankhen`` Er... JSAN and P6 mailing lists? 12:37
stevan Aankhen``: sure, no problem. 12:38
Aankhen`` Thanks. ^_^
stevan anyone know where the parrot SVN is?
Aankhen`` One sec. 12:39
Arathorn svn.perl.org/parrot surely?
Aankhen`` svn.perl.org/parrot/trunk
stevan ah, thank you
Aankhen`` It would be a bad idea to check out the entire thing. I suggest only checking out trunk/. 12:40
Arathorn stevan: reason for asking about the details of the OO stuff is in wondering if there's a hope in hell of calling/instantiating JS objects from iblech's PIL2JS stuff
in its current form
stevan Arathorn: regular JS objects? or Perl 6 objects? 12:42
Arathorn regular JS objects
stevan Arathorn: you will have to ask iblech that, I am not sure
Arathorn fair enough
Arathorn has a play anyway, now he knows how to create class methods/attributes(!)
stevan Arathorn: I am getting a nice book on metamodel stuff (hopefully) today, which has a detailed chapter on bootstrapping. Once I have the metamodel bootstrapped, then porting it to the various PIL backends will be much easier 12:43
Arathorn cool :) 12:44
stevan Aankhen``: I just need one test file in parrot actually :)
Arathorn stevan: just use http then: svn.perl.org/parrot/trunk/ 12:45
stevan yup
horray, Parrot now uses C3 and our MROs match :) 12:46
Arathorn woo :) 12:47
stevan anyone with PMC-fu is encouraged to convert any of the metamodel MRO and class-precendence-list tests to PMC
kungfuftr stevan++ # insane 12:49
Arathorn stevan: is there a way with the current metamodel stuff to dynamically add instance attributes to an object? 12:56
iblech Arathorn: "reason for asking about the details of the OO stuff is in wondering if there's a hope in hell of calling/instantiating JS objects from iblech's PIL2JS stuff"
Arathorn: You can already call native JS functions: JS::alert "hi" 12:57
And $JS::document.write("hi") works, too
I'm currently refactoring the JS part of the JS prelude out of pil2js.pl, and will then try to make "use jsan:Foo" work :) 12:58
Arathorn iblech: cool - I'd seen the binding to native functions; I was wondering specifically about something like my $image = new JS::Image(); 13:00
castaway_ ooh, jsan :)
Arathorn and critically how one would define one's own ECMAScript 2.0-style class 13:03
13:03 khisanth_ is now known as Khisanth
stevan Arathorn: currently no, because we do not track instances 13:04
there is an issue with GC and that
Arathorn okay
stevan although it is possible it would work through autovivification right now
but thats not a planned thing
but eventually I would like to support that feature 13:05
nothingmuch moose! 13:12
svnbot6 r5693, fglock++ | Span.pm - fixed all warnings in tests
nothingmuch gets some sanity by hacking forht
forth
castaway_ grins
svnbot6 r5694, rkhill++ | Added Win32 section to the install file 13:27
r5694, rkhill++ | Added check for Win32, vb7.0 bypass perl5 embed
Arathorn hm, is there any special twigil meaning for variables whose names begin with a _? (i.e. $_foo )? 13:32
iblech No, $_foo is just a normal user variable
svnbot6 r5695, rkhill++ | Fixed error in checking PUGS_EMB
Arathorn ?eval our $foo = "Foo"; class Bar { method baz() { say $foo; } }; my $bar = new Bar; $bar.baz(); 13:33
evalbot6 Error: Undeclared variable: "$foo"
Arathorn right
do I have to use $*foo for a truly global global foo, in that instance, then? 13:34
?eval our $*foo = "Foo"; class Bar { method baz() { say $*foo; } }; my $bar = new Bar; $bar.baz(); 13:35
evalbot6 Foo bool::true
Arathorn does that, then
iblech If you use $*foo, $*foo will be visible in *all* namespaces. If you want a global $foo restricted to your own namespace (and subnamespaces), our $foo (without a special twigil) is fine 13:36
svnbot6 r5696, autrijus++ | * Various, cosmetic, accessory file cleanup. 13:41
autrijus rehi \camels 13:42
iblech: tested with IE? 13:43
if not I can reboot to win32 and test
iblech autrijus: No, please reboot if it doesn't interrupt you too much :) 13:44
autrijus sure. give me a url? 13:45
iblech Oh, yes, sec
castaway_ has an IE lurking if testing is needed (without rebooting) 13:47
autrijus oh good :)
iblech castaway_: m19s28.vlinux.de/iblech/stuff/not_p...l2js-demo/
castaway_: And then 01-tap.t.html or even mandel.p6.html
castaway_ also various Operas.. what am I testing anyway? :) 13:48
iblech 01-tap.t.html should print some "ok 1", "ok 2", etc.
mandel.p6.html should give you the Mandelbrot fractal :) 13:49
stevan autrijus: the metamodel and Parrot's MROs now match :)
iblech Oh, and you test the PIL -> JavaScript compiler
castaway_ I get:
1..10
ok 1
ok 2
ok
# comment
ok 4
ok 5
ok 6 foo
ok 7 # skip
ok 8 # skip bar 13:50
not ok 9 # TODO
not ok 10 # TODO baz
(oh, odd.. it pastes with newlines, but doesnt shows as such..)
iblech So it shows "1..10ok 1ok 2" etc?
autrijus stevan: wow :)
castaway_ with spaces: 1..10 ok 1 ok 2 ok # ..
autrijus stevan: you went to irc.perl.org #parrot?
stevan: or leo just fixed it magically?
stevan autrijus: no, on your journal
iblech castaway_: Ok, thanks much, fixing :) 13:51
stevan leo fixed it magically
leo++
autrijus stevan++ leo++
castaway_ tries mandel ..
A script on this page is causing IE to run slowly .. 13:52
castaway_ says no to abort and waits..
now the CPU is getting warm.. 13:54
how long is it supposed to take? 13:55
iblech It takes approx. 60s here with Firefox 1.0.5
(And 0.076s with perl5 :))
castaway_ Ah, finished.. but also all in one long line, so not all that pretty ,)
iblech Ok :) 13:56
castaway_ and about 2-3 mins if the channels timestamps are to be believed..
06-use.t.html doesnt produce any output at all 13:59
ditto 07, the rest are all ok
iblech Yep, PIL2JS can't compile these two to JS yet 14:01
castaway_ Ok then
castaway_ tries mandel with opera 14:02
heh, Opera has a timer: 3min40sec 14:06
(and very pretty)
iblech :)
castaway_ also, 71 degC CPU ,)
autrijus iblech: Alias says openjsan.org/doc/t/th/theory/Test/S...ilder.html 14:07
if you click on "Source" 14:08
there is a Test.Builder.prototype.beginAsync
that can workaround the "script taking too long" bug
iblech How so? 14:09
autrijus 21:59 < Alias_> The method used in asyncronous unit testing is to spam off a thread using onTimeout, and then rather have print modify the DOM directly 14:10
22:00 < Alias_> So instead of document.write, you let the document.close first, and then inject bits of content at the end of $something
iblech Ah! I'll try that, thanks :) 14:11
autrijus np :)) 14:12
iblech castaway_: Please reload 01-tap.t.html and see if the linebreaks are correct now :) 14:18
castaway_: (m19s28.vlinux.de/iblech/stuff/not_p...ap.t.html)
Arathorn under IE, there are no linebreaks
iblech Arathorn: Probably the preludepc.js wasn't refetched from the server (cache) 14:19
Arathorn no, i decached (and i hadn't tried it before under IE)
iblech :(
Arathorn the problem is surely that you're terminating with \x0a 14:20
iblech Oooh! I see the problem
.replace doesn't mutate the string inplace
Arathorn heh, that catches me out on java far too often :)
oh, you're using print rather than say 14:21
or even, say uses print.
(weirdly enough)
yay, that's fixed now 14:23
oh, no it isn't
<-- muppet
iblech Reload please :) 14:24
Arathorn there we go :)
beautiful
iblech :)
svnbot6 r5697, iblech++ | * Pugs.Compile -- Added a comment explaining why the raw Exp of a PPos isn't showed. 14:29
r5697, iblech++ | * PIL2JS: Moved the JS part of the Prelude to libjs/PIL2JS.js.
r5697, iblech++ | * PIL2JS: pil2js.pl, jspugs.pl -- Sanitized options.
r5697, iblech++ | * PIL2JS: PIL2JS.js, Prelude::JS -- Fixed linefeeds not working correctly undef
r5697, iblech++ | IE, thanks to Arathorn++ and castaway++.
iblech Ok, I'll try to make use jsan:Foo work now
Arathorn ?eval class Foo { has $.i; method init(Class $class:) { $.i="i" } method show(Class $class:) { say $.i } } Foo.init(); Foo.show(); 14:30
evalbot6 i bool::true
Arathorn surely you shouldn't be able to write/read instance attributes from class methods...
elmex ?eval print "!\n" 14:33
evalbot6 Error: No compatible subroutine found: "&print"
elmex ?eval say "!\n"
evalbot6 ! bool::true
iblech elmex: print isn't available in evalbot
elmex hmm
iblech elmex: Fixing
svnbot6 r5698, iblech++ | evalbot/evalhelper.p5 -- Added &print. 14:35
elmex ?eval "!\n"
evalbot6 '! '
iblech elmex: evalbot s:g/\n/ / the output first 14:36
elmex is evalbot loop-safe?
iblech elmex: Else somebody would ?eval "\n" x 1000
?eval while 1 {}
evalbot6 (no output)
elmex how does it work?
iblech ?eval my $fh = open "hi"
evalbot6 Error: No compatible subroutine found: "&Pugs::Internals::openFile"
QtPlatypus elmex: Most likely some sort of timeout. 14:37
elmex QtPlatypus: obvious
iblech elmex: Look at examples/network/evalbot/evalhelper.p5 -- RAM, CPU time, etc. are all limited
elmex ah, ok
thx
cventers_ heh... evalbot is cool :) 14:38
iblech ?eval my $str = " " x 100000000000; $str ~= ""
evalbot6 \pugs: out of memory (requested 1048576 bytes)
iblech see :)
cventers_ does evalbot automatically run the latest pugs
or does someone have to manually upgrade him
QtPlatypus ?eval my $str = " " x 100000000000; ""
evalbot6 ''
QtPlatypus I still can't work out how eval bot pulls that off.
castaway_ iblech: no line breaks now :)
(sorry, $work was distracting) 14:39
iblech castaway_: Yep :)
QtPlatypus: See examples/network/evalbot/evalhelper.p5 lines 16-18 14:40
QtPlatypus Ok
Arathorn also: shouldn't 'our'-scoped variables be accessible in methods of a class defined in the same scope? 14:41
iblech Arathorn: Yes
Arathorn ?eval our $foo="foo"; class Widget { method init() { say $foo } }; Widget.init();
evalbot6 Error: Undeclared variable: "$foo"
Arathorn :/ 14:42
would it be helpful for me to go through and write tests for Apoc 12 cases? or would it be stepping on someone's toes? 14:43
castaway_ tests++
no reason not to have them IMO
iblech Arathorn: Please do so :) But check t/oo and t/packages for prior work 14:45
Arathorn has just gone through t/oo, and nobody seems to have got their knickers in a twist over instance/class attributes/methods yet
Arathorn looks at t/packages
should this sort of thing go in t/[oo|packages] or t/pugsbugs? 14:47
cventers_ ?eval $?PUGS_VERSION
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.8, July 13, 2005 (r5697)'
cventers_ whats up with the quoting on that string
iblech Arathorn: t/packages, I think
cventers_: evalbot .perl()s all return values 14:48
?eval say $?PUGS_VERSION; 42
evalbot6 Perl6 User's Golfing System, version 6.2.8, July 13, 2005 (r5697) 42
cventers_ yeah.. but it starts with an escaped quote and ends with an unescaped one 14:49
just seemed a little odd
it would make sense if it didn't start with \
well, except for strings in single quotes won't process escapes 14:50
perhaps i'm just rambling; i'm new here
iblech Ah, that's because the first \ is not an escape-\, but a take-a-reference-\
cventers_ ah ha
i've read most syn/apoc/exeges... ' isn't changing to mean " is it 14:51
because in p5, 'User\'s' == "User\\'s" 14:52
iblech No, '\n' will still be a literal \ followed by a n
cventers_ or rather eq
iblech ?say 'User\'s'; ?1 14:53
?eval say 'User\'s'; ?1
evalbot6 User's bool::true
iblech Right...
That might be a bug in Pugs. Not sure though 14:54
cventers_ tazcyclone evalbot # perl
print 'User\'s';
User's
wow
i never knew that was valid
ive been doing perl since the 4 days
i guess you learn something every day
iblech :)
Limbic_Region cventers_ I prefer to call it "making Love" and not "doing it" 14:55
cventers_ hahahahahaha
the sex is always fresh with perl
aite, work calls
Limbic_Region me too - just thought I would add a little levity 14:56
Limbic_Region afk &
Arathorn ?eval $::foo="foo"; class Widget { method init() { say $::foo } }; Widget.init(); 14:59
evalbot6 Error: Undeclared variable: "$foo"
autrijus write a test please :) 15:00
Arathorn is doing just so 15:01
in t/packages/scope.t
autrijus I also suspect $::foo would need to be spelled $*foo or $main::foo now 15:02
Arathorn ?eval $main::foo="foo"; class Widget { method init() { say $main::foo } }; Widget.init();
evalbot6 foo bool::true
autrijus I have no idea what $::foo would mean
Arathorn ooh
in the context of evalbot or just in general?
(it works fine with $*foo, fwiw)
autrijus in general.
look it up in AES04 and 03? 15:03
I can't seem to find a definition.
(or p6l it)
Arathorn should that work with plain ol' $foo, in your opinion, though?
(if $foo is our'd)
autrijus ?eval our $foo; class Widget { method init() { say $foo } }; Widget.init();
evalbot6 Error: Undeclared variable: "$foo"
autrijus this should have worked 15:04
yes
Arathorn right - that was the test I was writing anyway
autrijus cool.
although I believe we had one for that
in t/pugsbugs/namespaces.t
feel free to merge or move it to packages/
Khisanth ack! the class declaration requires a ; at the end? 15:05
Arathorn wheeee... /me heads back into t/pugsbugs :D
autrijus ?eval our $foo; class Widget { method init() { say $foo D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D} } Widget.init();
evalbot6 Error: unexpected "{" expecting trait, ";" or end of input
autrijus ?eval our $foo; class Widget { method init() { say $foo } } Widget.init();
evalbot6 Error: Undeclared variable: "$foo" 15:06
autrijus Khisanth: no it does not
that's just cosmetic
Khisanth: oh btw, $^x is usable only in bare
see 6.2.8 changelog
* Implicit variables like `$^a` now only work in bare blocks
Khisanth ok
autrijus that's always the case according to AES
and the misfeature was ruled incorrect in hackathon
Arathorn autrijus: there's no test in t/pugsbugs 15:07
autrijus (pugs misfeature, that is)
Khisanth btw, where does that our $foo; end up? is it suppose to be part of Widget or just accessible?
Arathorn i have to admit that this feels like it should be going in t/oo/class/ somewhere, though :/
autrijus Arathorn: there's not test in t/pugsbugs?
Arathorn nope :/ 15:08
autrijus what is svn.openfoundry.org/pugs/t/pugsbugs/namespaces.t then.
Test::lives_ok({ $GLOBAL = 1 }, "'our' is lexically scoped, even across namespaces", :todo<feature>);
Arathorn: er, this is not a class problem; if you replace class with package or module the problem persists
so has nothing to do with oo
Arathorn ah - sorry, i misunderstood the lack of significance of the class { method {} }, then 15:09
and if our is currently lexical rather than a package-style var, that explains all
autrijus our is currently package-style but _not_ lexical 15:10
our is currently a shorthand for writing qualified variables, and carries no scope in it
I do admit this is really broken :)
Arathorn (not as broken as my understanding of the problem, tbf ;) 15:11
autrijus Arathorn++ # nah :)
Arathorn so 'our' should behave by introducing the name into the current lexical scope - but then that name is just an alias for the package variable of the same name? 15:17
autrijus yup. 15:18
perldoc -f our
Arathorn tries to look as if he doesn't have one foot still firmly stuck in 'use vars' 15:19
Khisanth but use vars is global ... 15:20
stevan is very excited, Amazon says "The Art of the MetaObject Protocol" is "out for delivery" 15:21
soon it will be mine,.. allll mine .... muhhahahahaha
Arathorn Khisanth: i know - unfortunately, i seem to have thought of p5's 'our' a bit too similarly to 'use vars'..
more fool I.
autrijus stevan: ooh congrats 15:24
osfameron I've never had to use our
autrijus bites the bullet and starts working on PIL dumping
Arathorn use vars is dead in p6, though, right? 15:25
stevan autrijus: good luck, may your work be fruitful and your PIL easy to swallow :)
autrijus aye.
autrijus takes the Red PIL
Arathorn heh 15:26
stevan looks up the rabbit hole and waits for autrijus to drop in
you know, getting this book today means $work productivity is totally shot
autrijus it's nice to go back to books a short while during your extended vacation anyway :) 15:27
autrijus refers to $work as "vacation", curiously
stevan :D
maybe I will use it as the "carrot on the stick", for every bug I fix, I can read a few pages 15:28
Arathorn shouldn't 'our' in perl5 (and possibly perl6) treat namespaces a bit like lexical pads? 15:30
PerlJam Arathorn: no?
Arathorn perl -e 'package Foo; our $z = 10; package Bar; our $z = 20; print "$z\n"; package Foo; print "$z\n";' # so that you'd get 20,10
seems very strange to let you re-our a variable in a new package, only to overwrite the old one, then
autrijus well, see lwall's post for some historical context: 15:31
www.perlmonks.org/?node_id=393672
PerlJam that post was the one that finally answered my "what was larry thinking?" question wrt our 15:33
cognominal this is a minor nitpick, but is there a reason why in pugs my is not a regular function? 15:34
?eval say(my $a = 5)
evalbot6 Error: No compatible subroutine found: "&my"
PerlJam Until then I only saw how people were confused by "our" and that it really seemed to hinder rather than help.
autrijus cognominal: it is actually a major design deficiency in pre-hackathon pugs 15:35
QtPlatypus My can't be a regular function because it does stuff at compile time.
autrijus fortunately we figured out how "my" should work in PIL.
so this will get fixed for free
QtPlatypus: cognominal meant "inline"
QtPlatypus nods.
cognominal I am not sure it is good style, quite the opposite, but I use that sometimes 15:36
autrijus it has its uses. 15:37
QtPlatypus Will given be treated like that as well?
autrijus no, given is &statement:<given>
QtPlatypus my $a=given { ... };
autrijus you can however demote any statement into an expression.
my $a = do given {};
it works now in pugs
lwall++ # braceless do 15:38
?eval say do if 1 { 2 } else { 3 }
evalbot6 2 bool::true
autrijus :))
QtPlatypus Is that anouther change from the Bible, or just how pugs is handeling it?
autrijus this is part of the hackathon notes
which is still waiting for @Larry to merge to synopses.
* The `do` form is now taking a single statement instead of a block; what it does is turning the statement into an expression form, immediately evaluating it when the left hand side demands a value. 15:39
QtPlatypus I ment stament given.
autrijus er, it was always like that. 15:40
see S04.
cognominal ?eval sub bop {} ; our &be = &bop; do do be bop do bop 15:42
evalbot6 Error: unexpected "b" expecting "(", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
QtPlatypus Sorry mus thave miss read. 15:43
Arathorn so, has the stuff in S02 about $:: being the default namespace which is "searched from inner lexical scopes to outer, then from inner packages to outer" all dead now? 15:47
Arathorn tries to xref with p6l 15:48
autrijus Arathorn: er. 15:50
that para is talking about $::()
not $::
dig bifference
Arathorn i thought $::() was just a way of interpolating vars to get at the namespace
and that $foo="foo"; $::($foo) # would then be the same as $::foo 15:51
autrijus $::() is a special syntax
it does not overlap with $::foo
$::($foo) means $$foo in p5. 15:52
(symbolically
)
Arathorn oh.
autrijus very confusing, but as we know, perl is all about the shift key :)
Arathorn so the only way you can get at your current symbol table then in p6 is by $?CURRENTSYMBOLTABLE::foo or some other twigilled special case? 15:53
autrijus huh?
Arathorn i'm trying to work out where package variables went, if you don't fully qualify their names
autrijus %OUR:: and %MY:: are symtable hashes still 15:54
as is %PACKAGENAME::
Arathorn right
autrijus so to get package vars, use
$OUR::foo
Khisanth and %PACKAGENAME:: would have everything that is in UR::?
autrijus Khisanth: that's the idea 15:55
Khisanth err %OUR :)
Arathorn that makes sense
ah, i see %PACKAGENAME in S10 now
Arathorn hopes that someone other that him will come up against these same problems & be enlightened by the logs of this one day... 15:56
autrijus: thanks for handholding through it... 15:57
autrijus no prob, that's my (self-inflicted) job :) 16:01
Arathorn ?eval my $foo=42; say %MY::<$foo> 16:04
evalbot6 bool::true
Arathorn hm
autrijus currently only OUTER works iirc. 16:06
Arathorn ok. 16:07
Khisanth hehe 16:09
btw, is there going to be a JS>P6 thing?
autrijus not my end of things, but cwest mentioned he'd like to work on it 16:10
JS->PIL will be indeed very cool 16:11
Khisanth wouldn't that basically get you JS on Parrot? :)
autrijus yes.
wouldn't that be nice? yes :)
PerlJam parrot everywhere would be nice if it happens. 16:12
Khisanth so pugs will become the mother of all source filters?! :P
autrijus the term is "compiler", sir
:)
Arathorn P6->PIL->JS is more fun in the short term though, as JS/ECMA engines have slightly better penetration (and stability) than parrot currently... 16:13
Khisanth actually I want C -> P6 :)
autrijus Arathorn: but otoh JS->PIL->P5 is highly exciting
more so than JS->PIL->Parrot currently
kolibrie until PGE is stabilized, is there an older PGE I should use, or a grammar2parsec utility? 16:14
not that I know parsec yet
autrijus kolibrie: parrot 0.2.2 pge? 16:15
Arathorn continues to naively obsess over replacing actionscript with p6 and never having to worry about its comically broken typing again
autrijus leo-ctx5 pge should work as well
kolibrie I'm having problems with unicode - matches string, but returns wrong characters
autrijus oh, unicode. The Bad News Is Parrot Has No Unicode Support :-/ 16:16
cognominal ouch
kolibrie never?
autrijus it's stubbed in
but currently you can't work with utf8 strings
so it's as good as nothing... I started working on it a while ago 16:17
kolibrie so, transcode to ascii before processing?
autrijus got as far as correcting the latin1 bias, but then I depleted my C-fu
kolibrie: er I don't think that'd work
kolibrie :(
autrijus the correct way is to fix parrot.
(or, to carry on putter's work, write an alternate rule runtime)
cognominal parrot was linked to that ibm unicode library so I thought it was worked out :( 16:18
autrijus cognominal: it was linked to the ibm unicode library and did not make any nontrivial use of it.
cognominal: it's there just to make things inconvenient ;)
anyway. parrot strings can be unicode and utf8 currently 16:19
just need to fill in the various
src/string_primitives.c: internal_exception(UNIMPLEMENTED, "Can't do unicode yet");
places
grep for UNIMPLEMENTED in src/string*
kolibrie so, what's the best solution for extracting content from unicode document, for now? 16:20
since I have no c-fu
autrijus pcre?
rx:P5//
kolibrie hmm, not nearly as pretty 16:21
autrijus write a pcre-based parser for Rules syntax
and then compile it to perl6
and eval"" it? :)
or compile it to higher order functions
you can do a Perl6::Rules::Runtime in perl5 first and port that to p6
jeff pinyan started on it a while ago... ping him for progress? 16:22
kolibrie pcre is similar to perl5 regexes? 16:23
autrijus it's almost the same.
...only somewhat more flexible and more robust
Arathorn is there a reason (other than legacy) why pugs appears to support $main::foo for the default namespace but not $*Main::foo ?
autrijus but you don't get to use embedded code aka (?{})
Arathorn: what is $*Main::foo?
Arathorn uh, me mistyping $::*Main::foo seemingly 16:24
'The default namespace for the main program is "::*Main"' from S10 16:25
autrijus oh wow. I totally completely missed that.
so it's Main not main? 16:26
Arathorn and prefixed with * to make it toplevel, seemingly 16:27
Khisanth maybe it's a typo in S10 :)
autrijus Khisanth: there are no other evidences
Arathorn to quote the whole line: 'The "::*" namespace is not "main". The default namespace for the main program is "::*Main".'
autrijus but I tend to think it as not a typo
feel free to doublecheck it by mailing p6l though 16:28
Arathorn: write tests for it and I'll see that it's fixed
autrijus mumbles something about the Synopses having a fractal structure
Arathorn yeah :/ 16:29
autrijus the more you read into it the more there is to read
Arathorn is still trying to work out whether you're meant to access it as $*Main::foo or $::*Main::foo or $Main::foo, tbh
autrijus ::*Main is the package object 16:30
Khisanth $::*::foo? :)
Arathorn but I thought that $::anything had been deemed meaningless...
autrijus I don't see it mentioned anywhere
so I think p6l is the right way to go 16:31
MrX- changes away reason from "I'm away" to "I'm away"
Arathorn also: 'As with an initial "::", the presence of a "::" within the name does not imply globalness (unlike in Perl 5).' seems pretty random
autrijus looks at MrX- strangely
Arathorn: this is about inner packages.
grep for "inner" in A12 16:32
Arathorn so use Random::CP6AN::Module; say $Random::CP6AN::Module::foo is bogus - but $::*Random::CP6AN::Module::foo is okay, then
Arathorn does so
autrijus Arathorn: er, you are confusing the :: sigil (or dwigil) with the :: separator 16:33
ingy hola
autrijus yo ingy! ltns 16:34
ingy has been on the lamb 16:35
autrijus lamb?
ingy running from the law
incognito
autrijus wow. what did you do?
ingy under the radar
cventers_ ?eval say "perhaps you should speak through a proxy"
evalbot6 perhaps you should speak through a proxy bool::true
autrijus madly hacking on something?
?eval "/nick evalbot7" 16:36
evalbot6 '/nick evalbot7'
autrijus ?eval say "/nick evalbot7"
evalbot6 /nick evalbot7 bool::true
autrijus sigh, iblech is too smart
Khisanth heh
?eval say "ACTION hops around" 16:37
evalbot6 ACTION hops around bool::true
autrijus ooh!
Khisanth hmm
ingy autrijus: I need to have a sitdown with you soon
autrijus ingy: sure. about what?
Khisanth can't get around that bool::true 16:38
ingy perl6
Arathorn that bit of A12 can't seem to decide whether $::*MyClass::foo or $::*::MyClass::foo would be the right syntax
ingy I need to give this little talk at oscon...
autrijus iblech: vulnerability discovered in evalbot6 :)
Arathorn: when you see $Foo::bar, it means looking up the ::Foo object, then fetch $bar from it 16:39
and ::Foo, just like %Foo, can be lexical or package scoped or global (%*Foo)
to restrict the lookup to ::*Foo you can't use the ordinary qualifying syntax, I think. 16:40
but I may be completely wrong 16:41
Arathorn so it sounds as if to get the variable $bar from the global packagename ::*Foo (or just *Foo if disambiguation is not necessary), you'd use $*Foo::bar then. 16:42
clkao autrijus: check mail about book link
autrijus that may be the case, yes.
$?Foo::bar means $?bar in Foo:: 16:43
but $*Foo::bar can't mean $*bar in Foo::
because Foo:: will never contain a $*bar.
Arathorn nods
autrijus so it muts mean $bar in *Foo::
this is very weird.
can you summarize and p6l it?
Arathorn in which case, I shall try to summarise and moot that to p6l, then write some tests for $*Main::foo rather than $main::foo, and then beg for a commit bit ;)
autrijus if it is the case I'd like it to be noted as such in S10
right. thanks!
heh, no need for begging. your email? 16:44
Arathorn [email@hidden.address] is prolly best :)
autrijus clkao: huh?
Arathorn (thanks :)
autrijus welcome aboard, son of Arassuil :) 16:46
(or was it Arador?)
Arathorn Arador ;)
clkao autrijus: rumour has it that there's rt/win32 download url in the book which is no longer alive
Arathorn for Arathorn II, at any rate, iirc
autrijus ah. so you're Arathorn II.
Arathorn hehe
only infamous for his progeny and rather unfortunately getting shot through the eye by an orc... 16:48
autrijus clkao: rumour has it that I replied the mail, thanks 16:49
kolibrie how do I specify a long hex character: \x00a0 ? 16:51
autrijus theoretically, \x{00a0} 16:52
kolibrie ah, thanks
autrijus practically, it's not yet parsed. grep/write a test?
kolibrie ooo
ok
autrijus ingy: ok... for this little oscon talk, do we arrange a SEE+Skype session or something? 16:55
Limbic_Region autrijus - I am officially back to being a lurker until further notice but wanted to mention something that you might want to consider
a newbie was in the other day asking if there was a pugs specific mailing list - the usual response being to ask here, post to your journal, or p6.l or p6.c as appropriate
autrijus Limbic_Region: p6c is canonical 16:56
svnbot6 r5699, Stevan++ | Perl6::MetaModel - adding the Parrot MRO tests
Limbic_Region but when asking pugs internals related questions - it isn't likely appropriate for p6.c is it?
autrijus as mentioned in README and other places
it is p6c.
it's compiler internals
Limbic_Region ok - well then - /me is back to lurking
autrijus happy lurking :) 16:57
ingy autrijus: can we do it this weekend?
autrijus ingy: likely yes
ingy: or you can just interview me here
clkao hello ingy-san 16:58
ingy hi clkao
clkao does kwiki have a proper revisions plugin that works with svk?
ingy clkao: I don't know 17:00
svnbot6 r5700, iblech++ | * PIL2JS: We can't simply use a = b for binding, but have to use a.BINDTO(b), 17:02
r5700, iblech++ | because a might really be the result of a function (i.e. &postcircumfix:<[
r5700, iblech++ | ]>(@array, $idx) := $foo). Fixed.
r5700, iblech++ | * PIL2JS: Implemented &postcircumfix:<[ ]>, with correct binding semantics,
r5700, iblech++ | both as rvalue (my $a := @a[$idx]) as well as lvalue (@a[$idx] := $a).
r5700, iblech++ | * PIL2JS: pil2js.pl properly detects whether PIL2JS.js was loaded or not now.
autrijus iblech: I will go about doing PIL-YAML dumping using a separate PIL module that represents revised... Emit.PIL will probably be the place for that (I think) 17:04
iblech: all others being equal, will you prefer YAML dump or Perl5 dump?
i.e. YAML::LoadFile or do""
iblech autrijus: YAML
autrijus because YAML is lovely? 17:05
however I'm thinking about the use of taguri
iblech Yep, and everything can parse YAML, while Perl 5 can only be parsed by perl5 17:06
autrijus currently it requires a !perl/@Foo for the loader to work 17:07
but !perl/ is probably not very welcomed in other languages
and YAML.pm does not support hooks into laternate taguri spaces
iblech Ah...
autrijus I _think_ I'll go with !perl/ for now on the ground of practicalness
and other language would just need to deal ;) 17:08
iblech Or pugs -PYAML --yaml-taguri=...?
autrijus yeah, maybe that. we'll do that when there's a demanc. 17:09
otoh you can also preproc the .yml
and expand the taguris.
but then, everybody else can do that too
so why not bias toward iblech :)
let's go with the most straightforward way then
iblech :)
autrijus iblech: is m19s28.vlinux.de/iblech/stuff/not_p...el.p6.html updated for IE? 17:21
svnbot6 r5701, Stevan++ | Perl6::MetaModel - begining the bootstrapping process, moving some methods from Perl6::Object::* into the Perl6::Object metaclass;
iblech autrijus: Yep 17:22
autrijus stevan: "bootstrapping"?
stevan yup 17:24
Gruber ?eval my @b = "foo".reverse; 17:25
autrijus as in representing Perl6::Object as a Perl6::Object?
evalbot6 ['foo']
stevan autrijus: not quite that far
autrijus oh. what, then?
stevan one sec $client is on the phone
autrijus sure. :) 17:26
rafl Hello 17:27
svnbot6 r5702, tobez++ | Add tests for reverse applied to a literal string.
autrijus greetings rafl
rafl I'm not sure if I already said this: The Debian package needs to wait for ghc6 to use libgmp3c2 instead of libgmp3 because of the C++ ABI transition that currently happens in unstable. 17:29
autrijus is that going to need ghc team's help on ghc 6.4.1, or is it strictly a ghc maintainer's issue in the debian side? 17:30
hm, we need a Emit.YAML. 17:45
fortunately syck has emitting support.
autrijus praises libsyck
cventers_ ?eval time 17:59
evalbot6 175111156.337077
autrijus cventers_: lwall is very firm on this. 18:01
(y2k being the epoch)
I forsee a great deal of confusion over it.
Arathorn right 18:02
Arathorn escapes from $work long enough to spam p6l with inane ramblings about namespacen
stevan escapes the deadly clutches of the $conference_call 18:03
autrijus: ping (re: bootstrapping)
autrijus stevan: pong
so, there are lots of boots 18:04
and I'd like to understand which one are you strapping at :)
stevan bascially defining the metamodel with the metamodel
autrijus can you define "define"? 18:05
i.e., elaborate on the "defining the metamodel" bit
stevan Perl6::Object is itself a Perl6::Object
autrijus right.
stevan and Perl6::Class is one too
as is Perl6::MetaClass 18:06
autrijus 01:25 < autrijus> as in representing Perl6::Object as a Perl6::Object?
stevan etc etc
autrijus 01:25 < stevan> autrijus: not quite that far
01:25 < autrijus> oh. what, then?
stevan but I am not there yet
autrijus I know
but you did mean that :)
stevan the first step is to move all the methods from Perl6::Object::* into the Perl6::Object metaclass
cventers_ autrijus: is there some way to tell time to give you the damn system epoch
short of manipulating the number 18:07
stevan and cut Perl6::Object down to it's most minimal Perl5-ness
cventers_ with the number of seconds from 1970 to 2000
:)
autrijus cventers_: I understand your frustration, and maybe time should take :epoch.
cventers_: necromancing this on p6l seems inevitable 18:08
so please still do it :-/
stevan autrijus: because on some level Perl6::Object is actually a Perl6::Object already, just not totally
autrijus sadly, we still have plenty of undead horses to beat around.
stevan: nodnod. so it's all about minimizing Prim that needs to support P6::Obj for a host env. 18:09
svnbot6 r5703, iblech++ | * PIL2JS: PIL2JS.js -- Added some comments.
r5703, iblech++ | * PIL2JS: PIL2JS.js, PIL::Nodes -- Named arguments!
r5703, iblech++ | * PIL2JS: pil2js.pl -- Unbreak --yaml-dump.
autrijus that will likely simplify a lot of my effort of porting it to Hs.
stevan autrijus: yes :)
autrijus named arguments!?
wow. nice 18:10
stevan the less we need to translate to Hs/JS/etc the better
autrijus yes, verily.
and the prim would be then burned into the Parrot ROM
I mean the VM
;)
stevan autrijus: it is all about making your life easier :)
iblech cventers_: localtime(time) - Time::Epoch::UNIX?
autrijus and iblech's
stevan yes
autrijus putter's life is already maximally easy because you're doing it in p5 :)
stevan exactly 18:11
autrijus likes the metaphor of burning MRO and other stuff into Parrot ROM
stevan I am hoping that by the time you have the PIL work done, I will have determined the smallest set of things needed for the metamodel 18:12
autrijus woot.
stevan and then you/iblech/* can put that minimal set into Hs/JS/* and I can port the metamodel to P6 :)
autrijus and we can _finally_ release 6.28.0 :) 18:13
stevan yes
stevan needs TPF grant to hire programmers to do my $work, so I can finish the metamodel 18:14
autrijus rofl
svnbot6 r5704, fglock++ | Prelude.pm - fixed ceil/floor - "Implicit variables like $^a now only work in bare blocks"
autrijus surely you can submit a grant for metamodel 18:15
and then use that money to hire another programmer to do $work
fglock++ # indeed
autrijus ponders "make jssmoke" 18:23
using Javascript.pm or Javascript::SpiderMonkey as the harness 18:25
Arathorn right - $*Main::foo shenanigans summarised & posted 18:27
Arathorn scoots for frisbee
18:27 Arathorn is now known as Aragone
autrijus ooh. lovely 18:27
Aragone++
iblech autrijus: Would be really great, as I'm getting tired of manually compiling and running the sanity tests in $browser after every change :)
autrijus iblech: I wonder if we can just run things with external spidermonkey 18:28
you know, the bin/js 18:29
it has the "print" prim
so obviously we can output something that can be run with it
and then
pugs -BJS
will just invoke the whole chain 18:30
what do you think?
(I think bin/js is the way to go)
stevan autrijus: quick sanity check if you please
autrijus stevan: you are insane, no need to check 18:31
stevan good
I am removing the set_value and get_value from Perl6::Object and replacing it with _()
sub _ {} having that fun global scope thing
autrijus yes.
stevan it is insane :)
autrijus are you abusing it? 18:32
*_ is always global
stevan define "abusing"
autrijus just like any other registers
abusing, as in using _() in a way that depends on it being always global
stevan yes, but I can always just export it with the other stuff I export form Perl6::MetaModel 18:33
I am basically trying to move things which should be in the language, out of the metamodel
and keep it all in one place
things like SELF() and CLASS() and next_METHOD() 18:34
that should really be language level things
autrijus yes. 18:35
so what is _() ?
stevan ok, so it is sane, just within the context of instanity 18:36
_() will access instance variables
_('$.foo')
autrijus ok. I think it's sane. I think.
stevan _('$.foo' => "BAR")
autrijus within the context of insanity.
right
stevan cool
iblech autrijus: re. [bin/js] Yep, idea sane :) And seems to be easy to implement, too :) 18:39
autrijus nice :)
I'd suggest njs but njs seems unmaintained and dead
spidermonkey however is hot and moving.
kolibrie anyone know where the \x{00a0} syntax is specified? 18:40
autrijus grep the bible? I thought it's one of the "carry over from p5"
kolibrie not in the bible
so perhaps a carryover 18:41
autrijus hm. patch the bible on p6l?
kolibrie which perldoc in perl5? anyone? 18:42
autrijus perlop
of all places!
grep for SMILEY 18:43
kolibrie found it at the exact same time!
autrijus :)
kolibrie so, those things should parse in perl6 in "", bare, and in rx? 18:44
autrijus bare?
kolibrie plain \x....
autrijus it should parse whereever \xFF parses.
not plain \x 18:45
kolibrie I mean, not in a string
my $x = \xff;
autrijus that did not work in p5, so I don't think it works in p6.
kolibrie oh, ok. 18:46
autrijus Aragone: <lwall> "We somehow seem to have the situation where :: is simultaneously 19:05
trying to be a leading sigil, a trailing sigil, and a separator.
"
mmm "somehow".
Darren_Duncan Following the suggestion of otherwise here yesterday, I've changed my mind and decided to do my proposed Lightning Talk straight since the content itself should be important/interesting. 19:10
svnbot6 r5705, kolibrie++ | tests for various hexadecimal notations
r5706, autrijus++ | * wizards.p6 repaired by kluging global subroutines as, well, global subroutines.
Darren_Duncan suggestion made by me that is, and discussed here
this refers to log time 2005.07.19, 2:12h 19:11
that is all 19:12
autrijus a wise choice I'd say. 19:15
hm, it's past 3am 19:16
I think I should sleep.
I can't believe it took me 2hr to finish journaling ;)
have fun... see you tomorrow! 19:17
autrijus waves &
iblech Night :) 19:18
jdv79 stevan, ah, C3 does seem less insane - nice. just read something on it. 19:25
dudley iblech: fyi, mandel.p6 runs in Safari 19:38
iblech dudley: Great :) 19:39
Aankhen`` G'night. 20:01
stevan jdv79: yes, it is soooo much less insane :) 20:24
svnbot6 r5707, iblech++ | * Usual svn props. 20:39
r5707, iblech++ | * Added a new test: t/pugsbugs/hash_access_interpolation.t -- "<$hash<key>>"
r5707, iblech++ | doesn't work correctly.
iblech I vaguely remember that my %hash = (a => 1, b => 2, a => 3) sets %hash<a> to *1*, not 3. 21:01
svnbot6 r5708, Stevan++ | Perl6::MetaModel -
r5708, Stevan++ | * more refactoring/bootstrapping of Perl6::Object
r5708, Stevan++ | - all methods except isa(), can(), meta() and AUTOLOAD() are now defined
r5708, Stevan++ | in the metaclass (and isa() and can() just dispatch to AUTOLOAD)
r5708, Stevan++ | - $?SELF and $?CLASS contexts are managed by ::Method now (this is
r5708, Stevan++ | the beginging of param handling since ::Method now sets up the
r5708, Stevan++ | execution context of the method it is envoking)
r5708, Stevan++ | - all instance variable access is now done like this: _('$.foo')
r5708, Stevan++ | - all class variable access is now done like this: __('$.bar') 21:02
iblech Can somebody confirm this?
stevan iblech: I would think it was the other way around 21:03
iblech stevan: I.e. like Perl 5? %hash<a> == 3? 21:04
nothingmuch is so burned out
mugwump unless the %hash does Bag; then %hash<a> is a Junction 21:05
stevan iblech: yes, like perl5 21:06
breaking that would break a lot of stuff
iblech mugwump: Huh, is that official? That seems to me that's too easy to accidentally create a junction
svnbot6 r5709, iblech++ | t/builtins/sprintf_and_as.t -- Added tests for @array.as("format", "delim") and 21:07
r5709, iblech++ | %hash.as("key_format: value_format", "delim").
mugwump iblech: no, it was a joke ;)
iblech stevan: I thought so, too. But then I remembered someone highlighting that that's a constrast to Perl 5 and that people should know that etc
mugwump: Good :D
svnbot6 r5710, iblech++ | * PIL2JS: pil2js.pl -- Minor cosmetic fixes and repaired support to generate a 21:20
r5710, iblech++ | big .js file with all necessary libs (PIL2JS.js and Prelude::JS) inlined
r5710, iblech++ | (instead of linking to them via <script src=).
r5710, iblech++ | * PIL2JS: libjs/PIL2JS.js -- "\n" works correctly in Konqueror now, too.
r5710, iblech++ | * PIL2JS: Prelude::JS -- Support for hash creation (using &circumfix:<{ }> and
r5710, iblech++ | &hash). Binding works too (both as rvalue and lvalue).
r5710, iblech++ | * PIL2JS: Prelude::JS -- "my @a = (1,2,3); @a[0] = 4" was not working (cannot
r5710, iblech++ | modify constant). Fixed and added an appropriate test.
r5711, Stevan++ | Perl6::MetaModel - 21:36
r5711, Stevan++ | * more metamodel refactoring
r5711, Stevan++ | - can() is now implemented with WALKMETH and the :canonical order
r5711, Stevan++ | - several methods removed from ::MetaClass which the .dispatcher rendered unnessecary
r5711, Stevan++ | - attributes are no longer wrapped scalar refs (that was dumb anyway)
r5711, Stevan++ | - other misc. housecleaning
stevan I dont know who is the bigger kharma whore today, me or iblech ;) 21:37
iblech :D 21:39
mugwump jabbot: karma Stevan 21:41
jabbot mugwump: Stevan has karma of 46
mugwump jabbot: karma iblech
jabbot mugwump: iblech has karma of 337
stevan karma Stevan 21:42
jabbot stevan: Stevan has karma of 46
stevan perlbot: karma Stevan
perlbot Karma for Stevan: 4
jabbot stevan: Stevan has karma of 46
stevan perlbot: karma iblech
perlbot Karma for iblech: 12
jabbot stevan: iblech has karma of 337
stevan oh well, its just silliness anyway :P
iblech :P
stevan we all Javascript isn't a *real* language anyway ;) 21:44
iblech But we can make it one by compiling Perl 6 to it :) 21:45
stevan amen!!!
mugwump perhaps prelude should be called "pwned" when compiled to languages like JS
stevan in the begining Perl just borrowed from other languages, now is hijacks them completely :) 21:46
iblech: JS::Root::last & JS::Root::next... very very nice :) 21:48
iblech stevan: Thanks :) autrijus++ # showed me that trick :)
!!!! 22:11
Test.pm
on JS
:))
wolverian hmm. I'm a bit lost as to how to subclass Str 22:12
(or use the role)
mugwump wolverian: have you found sub-classing brokenness that is specific to the "Str" class? 22:13
wolverian no. I just don't know how to set the identity. 22:14
(this is probably related to my extremely hazy understanding of the referential semantics of perl altogether :)
mugwump I'm guessing you want to do $self = "foo" 22:15
but of course that doesn't work
wolverian this is (yet) in perl6, not in pugs. I'll have to hack around all of this if I backport :) 22:16
it feels _extremely_ strange to assign anything to $self in a BUILD
mugwump iblech started a "How do I... create a value type?" thread on p6l recently 22:18
wolverian right. let me take a look at it
stevan iblech++ # Test.pm in JS very very nice 22:19
mugwump which clearly I only skimmed. I thought that was asking what you're asking
wolverian it's close. :)
mugwump In theory, the Str class should have a method that returns its value, that its coerce:as(Str, str) method uses 22:20
wolverian is coerce documented in AES? 22:22
iblech wolverian: A12
wolverian thanks. somehow my search missed it :) 22:23
svnbot6 r5712, iblech++ | PIL2JS: Test.pm runs. 07-test.t passes. Actually all sanity tests pass now. 22:26
r5712, iblech++ | * Undeclared variables ($a::b = 3, $a::b := 3) are now JavaScript-declared
r5712, iblech++ | (else the script dies).
r5712, iblech++ | * Run the __init_ subs to correctly initialize global vars set at compile-time
r5712, iblech++ | (e.g. BEGIN { $a::b = 3 }).
r5712, iblech++ | * Do the same with __export_ subs.
r5712, iblech++ | * Fixed 06-use.t: The TAP header should be outputted at runtime (as the say "ok
r5712, iblech++ | 1"). See comment in 06-use.t for detailled explanation.
iblech Ok, work done, need to sleep now :)
Night all :) 22:27
coral PIL2JS! hee 22:29
osfameron coral: you say "hee". I run screaming for the woods... 22:30
nothingmuch hoooleee sheet 23:29
nothingmuch 's brain is about to explode
jdv79 unplug! 23:30