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.
putter new Perl/Compiler/PIL.hs 00:00
should just be even simpler than the data section of src/Pugs/PIL1.hs.
but with only macros, you have to pack and unpack everything (fields, their types, any comments). 00:01
it becomes easier just to emit raw code, and force hand global editing of the file every time someone makes a change. blech.
what would be utterly trivial for a source filter, and result in clean, very readable code, is just too painful with only macros. :/ 00:02
err/emit raw/write raw/ 00:04
putter 's #1 reason for using source filters - so the spec is the program. 00:06
geoffb That's one of my reasons for doing so . . . another is that I can cut all of the boilerplate out and write only "interesting" bytes, and let the source filter fill in all the crap 00:08
And then of course there's so I can do s/method\s+(\w+)\s*{/sub $1 { my \$self = shift;/g . . . . 00:09
(in my poor Perl 5 code)
putter hmm... macros vs filters, macros require the arguments to parsable, whereas filters can use free regexs to snarf them. for templates, what do filters get you that macros dont? <putter frowns in thought> 00:10
NightShadow hey
Khisanth mmm action at a distance?
NightShadow anyone here ever use the Number::Phone mod?
Khisanth why are you taking surveys all over the place?
putter NightShadow: I dont think perl6 has one yet. Perhaps you're looking for #perl ? ;) 00:11
NightShadow ah
sry
putter np
NightShadow so hard to find a example of it
putter oh, I should have suggested the cpan rating system be checked. oh well.
geoffb putter, Khisanth: for example, I have a source filter that allows me to write a pretty-printed call graph, and have that turned into a deeply nested stack of method definitions. Filters are necessary to allow the call graph pretty printing and indentation to define things. The call graph spec also has macros layered on top, so I get macros implemented by the filter. :-) 00:13
putter the other approach to all this being "make everything an s-expression, and define macros/functions" to make it executable. hmm...
yeah, indentation-based semantics implies source filter. 00:14
or a new macro whitespace:< > ;)
geoffb When I'm looking for visual clarity, the mere overhead of parens is more than I want, even if I was making something that is semantically s-expressions
putter, but outdenting means as much as indenting. :-) 00:15
putter macro foo() foo( use YAML; .... )
geoffb Actually, I think this is something the LISP bigots just don't get: Yes, being able to wrangle the AST is great. What if I don't actually want to write an AST as input? (Sure, this is doable -- I meant, why isn't this *easy*?) 00:17
putter so, there are string macros, pil macros, and source filters. it could also be nice to have a lispy get tree-but-not-pil macro. with s-exp and yaml being candidate trees.
geoffb putter, nodnod 00:18
putter which I guess is just a string macro foo called as foo(q:yaml/..../) ... no then you need to run yaml twice, once to parse out the argument, and once in the macro to get a tree from it. 00:20
so a normal data macro foo(), with q:yaml/.../ returning the data tree form. 00:21
Khisanth hmm so when has been said and done nobody will be able to read perl6 in a reasonable amount of time? :)
putter I think perl coding standards are going to be a really big thing. 00:22
In the extreme, some companies may say, "yes, you can use p6, and all your files must begin with use Python; ". :) 00:23
geoffb Personally, I think cool technology just sets a high bar for the user of said tech -- if you want to use something really cool and unusual, you better do something cool with it
heh
putter There are costs to features and design flexibility. I'd be quite happy if some of the cpan code I've seen were written in a use Python. Just to shrink potential design space to something the author can wield more skillfully. 00:26
Khisanth I am all for being able to do those things :)
geoffb ?eval my $foo = '+bar'; $foo ~~ rx:perl5/^\+/ ?? "plus" :: "other"
evalbot6 'plus'
geoffb ?eval $?VERSION
evalbot6 Error: Undeclared variable: "$?VERSION"
00:26 skylan_ is now known as skylan
Khisanth I am just against people casually using that particular feature :) 00:26
putter which feature...?
geoffb ?eval $?PUGS_VERSION 00:27
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005 (r6378)'
geoffb Who is hosting evalbot6 these days?
putter ?eval $?PUGS_HACK_BACKEND
evalbot6 Error: Undeclared variable: "$?PUGS_HACK_BACKEND"
putter dont know 00:28
geoffb Do either of you have a recent pugs build? Can you test the rx eval I did above?
Khisanth well judging from the earlier statements, probably luqui 00:29
geoffb luqui, ping
putter testing...
Khisanth my version is older than the bot 00:30
putter 'plus' ... were you expecting something else?
geoffb I get: *** No compatible subroutine found: "&rx_"
at <interactive> line 1, column 19-61
putter that sounds like you're missing Prelude.pm.
geoffb I've got P5 embedding on, and all other build opts off
interesting! So lack of PCP is killing me?
putter yes. 00:31
geoffb BAH
BAH BAH BAH BAH BAH
putter :(
geoffb OK, time to actually start specing components for a replacement dev box
One that I can add RAM to . . .
.oO( Should I spec 2 GB or 4 GB ? )
00:32
putter hmm... putter can think of workarounds, but....
geoffb Can't wait to explain to $spouse that we will have yet *another* month with a major cash outlay. :-/ 00:33
putter geoffb: if you take src/perl6/Prelude.pm, copy out &rx_ and friends, change &rx_ &m_ and &barerx_ to from macros to subs, then you should be able to load the resulting file at runtime and get rx support that way.
geoffb goes to look at above file 00:34
putter hey, how about a macro macro_or_sub () { ...err... $am_at_compiletime ?? "macro" :: "sub" } 00:35
geoffb Sounds vaguely Forthish
putter ;) 00:36
macro_or_sub rx_ ...
I'm pretty sure a $am_at_compiletime predicate exists, or at least is specced, but I cant think of it at the moment. 00:37
geoffb What are 'is safe' and 'is unsafe'? Tainting? Or something about having side effects? Or ... ? 00:38
putter evalbot
geoffb oh, gotcha
Should say that in the header./
Right, I have the commiter bit.
putter lol :)
geoffb going to edit Prelude while in there.
putter my fuzzy recollection is unsafe things dont make it into the symbol table when... mumble safe. 00:39
comments in the evalbot source maybe. 00:40
00:41 jiing_2 is now known as jiing_
geoffb putter, OK, I've read through Prelude.pm (interesting stuff there) . . . which begs the question, where is /.../ turned into rx_, m_, and rxbare_? 01:04
And is there any reason other than efficiency that you declared them as macros instead of subs? 01:05
putter ahh... 01:07
re why, because p6 cant yet parse foo:bar/hee/ so the parser has to do it. it parses, runs possiblyApplyMacro (or somesuch) of &rx_ etal, which then reach back in with pugs_internals_rx (or somesuch). It would be native p6 is you could do it. 01:10
re macros, ...
oh, variables and such. 01:11
geoffb Speaking of parsers, I didn't grok much of that -- and I think it's because I parsefailed. 01:12
putter its not going to work quite correctly as a sub. actually, in addidtion to any macro_or_sub hack, inside you'd have to eval() the code string.
which would obviously be in your env, rather than your callers.
geoffb (Sounds like a second (100th?) call for eval_in_caller_context) 01:13
putter ;)
geoffb OK, so let me try to understand you: 01:14
putter I've always liked tcl's ability to reach up the stack and inject things. well, almost always.
svnbot6 r6599 | geoffb++ | Clarify and clean up comments at top of Prelude.pm
geoffb Since we have no Parser written in Perl 6, pugs is parsing foo:bar/hee/ in Haskell code and turning it into things that look like function calls. 01:15
putter pugs_internals_rx is the "real" rx. parser, when it sees rx//, calls rx in an odd mode - if it's a macro, run it now, else treat it as a normal sub call.
err, calls &rx_
geoffb But really they are macro calls, because we want lexical caller context to be correct.
putter yes 01:16
geoffb right, OK, I think I'm with you.
Is this magic happening in src/Pugs/Parser.hs? 01:17
putter geoffb: "Since we have no Parser"... almost, but not quite. foo:bar /hee/ currently can be written in p6. just foo:bar/hee/ , no space, cant. :( if not for that space, the parser hook out to &rx_ would go away, and macro &rx_ would be renamed macro rx. 01:18
geoffb blinks
More detail, please 01:19
putter (though it would still be a bit of a kludge. the parser would still parse the / / as a regex, and macro rx would ask it for its pattern, and then throw it away and just use the pattern as currently)
there currently being no way to write quoting constructs. macro quote:<z> or whatever it is. 01:20
geoffb gotcha
OK, must AFK, toddler awakes
putter foo:bar /hee/ gets parsed as a call to (macro or sub) foo, with adverb :bar, and one positional argument, a regex /hee/. foo could then ask /hee/.pattern, getting "hee", throw away the object, and proceed. 01:21
ok. &
some issues with syntax errors on //. eg, foo:perl5 /hee/ where hee is something legal in p5 regexs, but not in p6. sigh. thus the current hack. 01:23
but the error problem could be dealt with. next step down this path would be getting foo:bar/hee/ to work. 01:24
but as you say, it would still need to be a macro.
brentdax ?eval hash {} 01:32
evalbot6 Error: cannot cast from VUndef to Handle (VHandle)
autrijus ?eval hash () 01:33
evalbot6 Error: cannot cast from VUndef to Handle (VHandle)
autrijus ?eval (hash ())
evalbot6 Error: cannot cast from VUndef to Handle (VHandle)
autrijus ?eval hash 1,2
evalbot6 {('1' => 2)}
autrijus ?eval hash()
evalbot6 {}
putter sigh. this parsefails: 01:40
sub f () { my $s = "class { "; my @a=(); for @a -> $n { say $n; }
# $code ~= "}\n";
} f;
autrijus { inside double quote is interpolated 01:41
putter but remove the comment, and it's fine. sigh.
oy. bitten by that one again. :/ thanks autrijus.
autrijus np. :)
putter tries to think of some way a warning could be generated... 01:42
revdiablo putter: almost makes you want a use warnings 'p5transition'; 01:48
putter ;) 01:54
I'm being repeatedly caught by it. Though I guest the average user is less likely to be using strings with {. 01:55
s/guest/guess/ irc reveals so many things about how ones mind works.
Is there anyway to have barewords without predeclaring them or using pairs? 01:57
autrijus don't think so 01:58
buu ?eval "{{1}}"
evalbot6 '{1}'
putter ah well. thanks! Tufte would not be happy with me. (lots of wasted ink) 01:59
buu So is that a literal string containing {1} ?
autrijus ?eval "{ {1} }" 02:00
evalbot6 '1'
autrijus I think it's two bugs :)
?eval "{ {want} }"
evalbot6 'Scalar (Any), LValue'
autrijus ?eval "{ {say want} }"
evalbot6 Scalar (Any), LValue '1'
buu Fascinating. 02:06
Anyone know what happens with, {say $^bbb; say eval '$^'.chr(rand(255)) } ? 02:15
putter ?eval macro f($x) { "class $x \{};" } f("C"); C.new 02:16
evalbot6 Error: No compatible subroutine found: "&C"
putter :(
?eval say ({say $^bbb; say eval '$^'.chr(rand(255)) })("hi") 02:22
evalbot6 hi Error: No compatible subroutine found: "&chr"
putter chr is being called with two arguments.
geoffb buu, did you mean to do '$^' ~ chr(rand(255)) ? 02:26
buu geoffb: Yes. 02:41
?eval say ({say $^bbb; say eval '$^'~chr(rand(255)) })("hi") 02:42
evalbot6 hi 1 bool::true
buu ?eval say ({say $^bbb; say eval '$^'~chr(rand(255)) })("foo","bar")
evalbot6 foo 1 bool::true
buu Color me confused.
brentdax ?eval my $x = 'foobar'; my $s = $x.substr(0,3); $x.ref 02:43
evalbot6 ::Str
brentdax ?eval my $x = 'foobar'; my $s = $x.substr(0,3); $x.perl
evalbot6 '\\\'foobar\''
brentdax Hmm. 02:44
Does substr() return a string or a reference to a string?
Because somehow I think I'm getting a reference to a string, and it's not working out very well. 02:45
buu Why are you calling $x.ref ? 02:47
brentdax Because I don't know what else to call.
...wait, good point. 02:48
?eval my $x = 'foobar'; my $s = $x.substr(0,3); $s.ref
evalbot6 ::Str
brentdax ?eval my $x = 'foobar'; my $s = $x.substr(0,3); $s.perl
evalbot6 '\\\\\'foo\''
brentdax Ah, there.
?eval my $x = 'foobar'; my $s = $x.substr(0,3); $$s.perl
evalbot6 '\\\\\'foo\''
buu I think it needs a few more slashes 02:49
\\\\\\\\\\\\\\\\\\\\\'foo'
brentdax ?eval my $x = 'foobar'; my $s = $x.substr(0,3); ${$s}.perl
evalbot6 '\\\\\'foo\''
brentdax Heh.
?eval my $x = 'foobar'; my $s = ~$x.substr(0,3); $s.perl
evalbot6 '\\\'foo\''
brentdax Not gonna ask... 02:50
svnbot6 r6600 | putter++ | Perl/Compiler/PIL/Node_pm_gen.pl: Beginning of a full set of PIL notes for p6. Hopefully it will eventually obsolete the current Perl/Compiler/PIL.pm. 03:26
putter sigh. s/notes/nodes/ 03:30
Node_pm_gen.pl is still rough. I didnt get to the point of eating -CPerl5. I'll likely be offline Wed and Thurs, but hope to get back to it on Friday. 03:34
Actually, reality check. Bad time of day to ask, but... 03:49
Is pushing on a p6-based PIL infrastructure the wrong thing at this point? Ie, would p5-based be better? p5 would run faster, and development would be much faster. a p6-based emitter would be a nontrivial oo p6 program. thus something it might be best to wait on. any comments, thoughts? 03:52
Using one of the Class::MultiMethod packages, one could probably even write the p5 version in the architectural style of a p6 one. thus serving as a prototype. 03:54
then again, we already have PIL2JS as a prototype.
luqui thinks he has the perl 6 way of solving the expression problem 07:09
autrijus MMD?
that's well worth a docs/notes/ writeup :)
luqui eh, it relates to something like that
autrijus do tell more 07:10
luqui it's basically Scala's way, but it gives names to the concepts (taken from model theory)
those concepts turn out to be widely applicable
basically "multi roles" (not in their parameterizations, but in their methods)
a model is data+implementation (like a multi class) 07:11
a theory (which needs a better name) is interface (like a multi role)
theories can be composed; models can be extended 07:12
but I'd like to write it up first to get my terminology and thinking clear and consistent
autrijus cool 07:17
that may lead to more visiolization and t-shirts :)
luqui er, how do you write comments in Scala? 07:36
ahh, looks like C++ 07:37
nothingmuch had mango for breakfast 07:47
i like having good fruits and veggies at work
Aankhen`` Build is still broken on Windows? 07:50
autrijus I wasn't aware that it is 07:52
how is it broken?
hm, that one-line change of yesterday caused 200+ subtests to unexpectedly pass
pasteling "Aankhen``" at 61.246.21.131 pasted "Build fails on Win32" (16 lines, 689B) at sial.org/pbot/12838 07:53
autrijus weird. it's a recent failure? 07:55
I'll boot to win32 to take a look in a bit
Aankhen`` I dunno; I was out of town for 9 days, came back and found that.
(i.e. I discovered it on the 28th)
autrijus ok. 07:56
svnbot6 r6604 | autrijus++ | * lots of unTODOs thanks to nested structures finally working fully 07:58
brentdax "nested structures finally working fully" means what? Arrays of hashes of arrays (and such) will have sane behavior? 07:59
autrijus yeah. 08:02
it used to be that [[0]] will cause the inner [0] to have const sclar container
so
[[0]][0] = 1
will fail
brentdax That sounds like very familiar behavior... 08:03
nothingmuch % perl -e '[[0]]->[0] = 1'; echo $? 08:06
0
i wouldn't expect it, actually
[] creates an array reference
an anonymous array 08:07
autrijus it is nevertheless the case.
nothingmuch it's like saying '${ do { my $x; \$x} } = 10'
autrijus ?eval [[0]][0][0] = 10
evalbot_6589 Error: Can't modify constant item: VInt 0
nothingmuch it's an anonymous scalar since it ceases to exist by the time it's used
i don't see why that should happen
autrijus that's before the bugfix.
nothingmuch oh 08:08
autrijus ?eval [[0]][0][0] = 10
evalbot_6589 Error: Can't modify constant item: VInt 0
evalbot6 Error: Can't modify constant item: VInt 0
autrijus hrm
feather's autobuild isn't up to date?
nothingmuch maybe it's lagging
autrijus as of r6604:
pugs> [[0]][0][0] = 10
10
nothingmuch =) 08:10
woo! our company wiki is picking up
luqui updated evalbot_xxxx 08:14
svnbot6 r6605 | autrijus++ | * more nested data structure unTODOing.
luqui s/updated/updates/
svnbot6 r6606 | autrijus++ | * num.t fixes. I'm not sure `0101` is to be parsed as `101` -- 08:20
r6606 | autrijus++ | $Larry ruled that it should raise exception saying that `0o101`
r6606 | autrijus++ | is the correct way now.
r6607 | autrijus++ | * stub implementation of builtin infix:eqv 08:26
landover hello all 08:41
autrijus landover: greetings. 08:45
landover ah 08:46
autrijus Aankhen``: I'm building on win32... so far so good
landover good good
i saw your video
that was very entertaining
autrijus the oscon05 one? I'm glad you like it :)
landover yes i was extremely amused
so how are things over there?
im in washington DC 08:47
autrijus a large typhoon is approaching right now; crazy sound FX effects
landover hah
so how did you manage to get into writing compilers i believe your a year younger than me
broquaint Where might the OSCON '05 video be found?
autrijus broquaint: pugscode.org/ 08:52
"oscon movies" to the left
?eval [[0]][0][0] = 1
evalbot_6600 \1
evalbot6 Error: Can't modify constant item: VInt 0
broquaint Aha, thanks, autrijus :)
luqui oops 08:53
are evalbot and svnbot the same thing?
hmm.. I doubt it
autrijus nope
luqui is it just a coincidince that I told evalbot6 to quit and then svnbot6 did too
landover duh 08:54
autrijus I think I ^C'ed the wrong thing
landover obviously at 4:53 am i am worthless
autrijus landover: a certain book called TaPL will make a compiler write out of anyone :)
luqui landover: I do not like green eggs and am
autrijus www.cis.upenn.edu/~bcpierce/tapl/
s/write/writer/ 08:55
landover reading...thinking of buying etc
GeJ landover: autrijus' age has nothing to do with anything. The guy sleeps 12seconds per day, and even then, his brain is talking Haskell... that makes him around... hum... 63 years old (on a normal earthling scale) 08:57
autrijus landover: additional list of books may be found at svn.openfoundry.org/pugs/READTHEM
nothingmuch agrees with GeJ
autrijus oh, and an upcoming oreillynet interview -- the second half may be more interesting:
autrijus.org/tmp/edd_interview.html
the first half is done when edd and I still thought I'm going to talk about PerlI18N
Aankhen``: sadly win32 builds just fine here. 08:58
Aankhen``: is it possible that your PATH has strange things like cygwin stuff in it? 08:59
landover is there anything you need autrijus outside of the computer?
autrijus landover: network
electricity
that's about it
landover well im in here often if you need anything or even donations for money let me know
out of my pocket of course 09:00
autrijus if you feel like donating, the T-shirts in www.cafepress.com/pugscode may be of interest :)
landover one quick question
i wont waste any more of your time
and i know i am going to get reamed by everyone here
but
have you ever played with smalltalk?
autrijus yes, I played with Squeak for Seaside 09:01
by no means proficient though
landover when you have a minute some day book mark this www.opencroquet.org 09:02
ok i need to go read pugs... let me know if you need anything 09:03
autrijus I think I've seen the demo of it in LinuxTag
landover well when 2 people can code in realtime....and literally build a house
anyways 09:04
autrijus like Kay's other works it looks amazingly cool and approchable
landover well he wont be able to do it though...its smalltalk....
autrijus mm?
landover but the concept is what i wanted to embed deep in the back of your brain
autrijus oh. sure. it's already there :)
but thanks for the link.
landover np
obra scratch looks very pretty. 09:05
it's derived from opencroquet, no?
autrijus er, scratch the weblog system?
autrijus is having context mismatch 09:06
oh, obra, sorry I misremembered the time and didn't attend parrotsketch on Tuesday. how did it go?
obra autrijus: I was packing for braga. chromatic reported that it was productive 09:07
no, scratch the programming environment for kids
part of the $100 media lab pc
s/pc/laptop/
looks like logo, with more drag and drop lego-programming.
turns out it's smalltalk, not scheme
luqui my model theory model is working out so well!
better than Scala :-) 09:08
autrijus obra: oh. 3d?
luqui: good! time to submit paper to OOPSLA! :)
luqui: better how, though?
luqui do you have that paper you showed me about scala's technique for solving the exp problem? 09:09
autrijus sure
luqui look on the right column of page 5
autrijus trait DblePlusNeg ? 09:10
luqui you have to respecify all constructors in the tree
because they might not return something that is the new exp anymore
since the new exp is a subtype of the exp they used to refer to 09:11
autrijus yes.
luqui well, trees like this belong in data construtors
autrijus it's a variant of the variance problem
luqui so when you extend a model, you "Extend" the union type
that is, you make the set *bigger*, not smaller
so you have to specify more variants on your processing methods (as we expect) 09:12
but it follows that whatever your old processors returned will be okay in the new model
autrijus hm, it reminds me of ocaml variant types
please go on
luqui well, that's about it. you don't retype anything existent 09:13
autrijus variant types: caml.inria.fr/pub/docs/u3-ocaml/ocaml051.html
luqui I'm filling in all the details in my writeup
okay, I'll look at those
autrijus cool. looking forward to it
09:23 nBakedBeas is now known as BakedB
nothingmuch ... "power adapter is a beautifully designed product featuring the latest technologies in charging" 09:41
$49.99
i wonder if people are really that guillible
broquaint $49.99 for a power adapter? What a bargain!
nothingmuch at least it's got a plug adapter set
no wait! buy now and get $5 off! 09:42
and it's got an "Inbuilt cable with USB connector"
broquaint I'm saving money buy spending money!
nothingmuch i bought my friend an ipod shuffle for his birthday, and his computer had low power ports 09:43
then we bought an el-cheapo USB card
it didn't work either...
broquaint The harroth docs are interesting, nothingmuch. 09:46
landover where can i ask some pugs questions?
nothingmuch broquaint: it's slowed down a lot 09:47
now i'm working on harrorth about 2 hours a month
i'm rewriting most of the forth stuff in forth at the moment
the dictionary handling code
the word definition words
then the runtime will simply by an intmap
and two stacks of integers 09:48
broquaint Sweet. It'll be cool to have a forth implementation for parrot.
nothingmuch there is one, actually
broquaint This is the best place to ask about pugs, landover.
nothingmuch harrorth is nowhere near parrot yet
broquaint Isn't that one a bit broken? 09:49
nothingmuch but the parrot forth project does exist
i think it is, but at least it's something =)
do you know parrot?
because leo was looking for a maintainer
broquaint Well he's ok I guess, but we've never really spoken to one another.
So, no, I don't really know parrot all that well.
landover always good time to learn 09:50
nothingmuch well, if you do, and you're still interested in forth, don't forget to ping leo =)
landover pugs types ? optional
broquaint Will do :) And I should probably remember how to program forth too ...
nothingmuch landover: huh?
broquaint: feather.perl6.nl/~nothingmuch/harro.../Interp.pm 09:51
there is a 3 stage bootstrap
landover sub add (Str $a, Str $b) { } are the type declarations optional?
nothingmuch first the primitives are defined... these are implemented in perl
then the bootstrap forth code is parsed by perl
and dependencies are resolved
this is compiled using perl code
and then the buffer is set to the "soft" prelude, which is just executed 09:52
the test suite is lots of fun: feather.perl6.nl/~nothingmuch/harro...c/Forth/t/
since I run it against gforth when I'm writing tests, and then I run the passing tests on my forth when I'm writing my forth impl: feather.perl6.nl/~nothingmuch/harro..._forths.sh
feather.perl6.nl/~nothingmuch/harro...rp/Test.pm 09:53
(based off ingy's Test::Base)
clkao gah! 09:55
is currying for classes implmemented? 09:56
nothingmuch currying for classes?
clkao larry aws talking about it just now
nothingmuch $obj.can("method").assuming($obj) ?
nothingmuch reads mail
nothingmuch sees no new mail
clkao in yapceurope
he is giving keynotes
broquaint That's some nice work there, nothingmuch :) 09:57
nothingmuch oh
broquaint: what I really hope will be interesting is writing a generic stack->register optimizer in haskell 09:58
by mapping TOS into the register window, you can eliminate most simple stack operations
if you simply inline your called code so that it's compiled such that the stack positions it expects are mapped to the registers the data is already in
for example, you see ': , here swap ! ;' 09:59
'10 ,'
this should be load 10 into register, load here pointer into other register, and then compile a version of ! that writes the data from one register into the address in another register 10:00
this is instead of: push 10, bsr ',', bsr here, push here addr, bsr read, pop address, push value, return, return, bsr swap, pop into reg a, pop into reg b, push reg a, push reg b, return, bsr '!', pop reg a, pop reg b, write value from reg into address in other reg 10:02
return return
broquaint Sounds interesting and mind-warping. 10:03
nothingmuch all i need is to get a round tuit 10:04
www.myrtlewoodgallery.com/get_a_round_tuit.htm (not as nice as the perl foundation's ones) 10:05
broquaint Delegate to an eager PhD student or something. 10:06
nothingmuch nono, this is mine!
nothingmuch *wants* to be an eager phd student ;-)
broquaint What's stopping you? 10:07
landover is it possible to save the state of all objects in the haskell runtime?
nothingmuch broquaint: job, rennovation, social life, fatigue, hobbies
WRT to fatigue i'm improving my sleep cycle 10:08
broquaint Which will no longer be problems if you become a PhD student!
Except the fatigue, that'll get worse.
nothingmuch job won't be ;-)
broquaint 'xactly!
nothingmuch rennovation is temporary, but demanding
both psychologically, and time wise
vkon Juerd: regarding your question about what people are doing at feather; I use it mostly to get current snapshot, and for IRC from work, because our IP at work is filtered; this makes obtaining shapshot much easier; also, sometimes I do tests with pugs via ssh. Hope my isage is okay... 10:29
Juerd: ... so it is helping me very much. I almost do not use it from home, btw... 10:30
?eval $?PUGS_VERSION
evalbot_6600 \'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005'
vkon ?eval 'a' ~~ /a/ 10:31
evalbot_6600 Error: cannot cast from VUndef to Pugs.AST.Internals.VCode (VCode)
Juerd vkon: Sure, it's okay 10:39
vkon: I'm just asking around to get a better view
vkon: In fact, I wish it were used a little more, as it's mostly idling
nothingmuch forgot to read mail for 2 days 10:44
work mail, that is
=/
luqui Juerd: thanks a lot for feather 10:58
at home I don't have a stable ghc, and the server I normally use is down too much 10:59
I use it for all pugs development these days
autrijus iblechbot: I submitted m19s28.vlinux.de/iblech/stuff/pugs-...d8aa0.html but it's marked as "r0" 11:30
Aankhen``: rehi. I can't duplicate the build problem here on win32. :-/ 11:31
Aankhen`` Hi. 11:33
What's your build systeml?L
s/L$//
s/l\?/?/ too, come to think of it. 11:34
Juerd luqui: You're welcome
autrijus Aankhen``: WinXP, nmake
Aankhen`` autrijus: What compiler? MSVC? MinGW?
Er.
MSVC6 or 7? 11:35
autrijus activeperl
no MSVC involved -- nmake.exe straight off free download
Aankhen`` Ah, okay.
What version of nmake, then?
autrijus nmake15.exe
Aankhen`` That might be it...
That's version 1.5, IIRC, and my version is 7.
autrijus try nmake15 then? move nmake.exe off our path 11:36
and run makefile.pl again
Aankhen`` I don't think I have 1.5... 11:42
autrijus MAkefile.PL will download it for you 11:44
Aankhen`` Ah.
One sec.
autrijus download.microsoft.com/download/vc1...make15.exe
Juerd What is it with Windows people wanting to be elite enough to compile their own shit, but just not elite enough to actually run a good OS? :)
Aankhen`` Juerd: Practicality. :-)
Juerd Aankhen``: You've been struggling for how long now? How practical is that?
Aankhen`` Very practical, since my life is not solely about Pugs.
Juerd Heretic 11:45
Aankhen`` MWAHAHAHAHAHAHA
Aankhen`` chokes.
When was the last time you played Splinter Cell: Chaos Theory on Linux? :-P
Juerd Ever heard about dual booting? The possibility of running Linux under Windows? 11:46
Aankhen`` Yes.
Juerd Or an extra box? Or an account on feather?
Aankhen`` Extra box requires money. Feather requires giving out my real name, last time I checked. 11:47
Juerd That is true
Aankhen`` Dual booting is a pain in the neck.
.
Juerd Then there is still the running Linux under Windows thing
Which can be free
Aankhen`` It sorta misses the whole point.
But yeah, I guess it would solve the current problem.
Juerd Aankhen``: www.colinux.org 11:48
Aankhen`` This is extremely ironic. 11:49
That page has those little text ads which appear when you hover over the link.
"operating system" in "why should another..." was linked. 11:50
The ad is from Microsoft, about how Windows outperforms Linux.
Hmmm... this coLinux thing looks neat. 11:51
Juerd It's your key to leetness.
Aankhen`` AHH! THE HORROR! NOT LEETNESS!
Aankhen`` wonders how many $#@!ing copies of nmake.exe are installed by VS. 11:52
nothingmuch Aankhen``: we use colinux at work, it's been pretty good
it compiles and runs our binaries pretty fast, and pretty stably 11:53
Aankhen`` Ah, two are installed by VS.NET and one by the SDK.
nothingmuch: So the performance hit isn't too bad?
nothingmuch not at all... I'd estimate no more than %15-20
Aankhen`` Kewl.
nothingmuch for the overall "feel"
we also run the cygwin X server to access it 11:54
Aankhen`` autrijus: 1.5 bombs too.
autrijus weird. :-/ 11:55
got a telnet or rdesktop login?
Aankhen`` No...
autrijus grab CPAN's release version?
I need to run + dinner in a bit. bbiab 11:56
Aankhen`` I have to go too.
Gonna watch Sky High.
Will try later.
autrijus k. 11:57
Aankhen`` Gah... where is nmake downloaded to? 11:58
autrijus perl/bin/ 11:59
same path as perl.exe
Aankhen`` Ah, okay. Thanks.
Juerd 13:56 < nothingmuch> not at all... I'd estimate no more than %15-20
20% performace?
20% performance?
Aankhen`` Performance hit.
Juerd Oh :)
Then it's pretty good 12:00
Aankhen`` Yep.
Gotta try it out later.
Anyway.
See y'all.
&
Juerd Bye
Have fun &ing
ycheng why ((11, 12), 2, 3) is designed to be (11, 12, 2, 3) in perl ? 12:11
QtPlatypus ycheng: Because perl flattens lists. 12:12
Are you asking about perl6 or perl5?
ycheng so it's on purpose not to fallten array ? why we chose to design this way ?
I test this in both perl6 and perl5
the same result 12:13
QtPlatypus ?eval ((11,13), 2, 3)
evalbot_6600 (11, 13, 2, 3)
broquaint Because lists are ethereal things in perl, ycheng.
QtPlatypus It tends to be handy
broquaint Parentheses in a list context merely delimit precedence.
ycheng QtPlatypus: got it, thanks. 12:14
?eval ([1, 2], 33, 44)
evalbot_6600 ([1, 2], 33, 44)
ycheng ^^
broquaint That's a list with an array in it ... 12:15
Maybe someone should write pdecl ...
ycheng ya, I know.
QtPlatypus pdecl?
ycheng what that ?
broquaint Like cdecl but for perl.
ycheng s/what/what's/
broquaint linuxcommand.org/man_pages/cdecl1.html 12:16
broquaint & # Lunch.
nothingmuch is anybody here a (gulp) tcsh user? 12:17
ycheng broquaint: I think perl6 should give warning if someone write "@a = ((1,2),3 ,4)", but no warning as "@a = (1, 2); @b = (@a, 3, 4)" 12:21
my @a, @b; / my $a, $b; / my %a, %b; all fail (Internal error while running expression: unexpected ",") (an known bug ?) 12:38
Juerd ycheng: my (@a, @b) 12:47
ycheng: In Perl 5 terms, my has ($) like precedence
ycheng: So that you can do: foo(my $bar, $quux), where $quux is already in scope
(Mostly handy for: bless \my $dummy, $class) 12:48
ycheng you mean; in "my (@a, @b)", my like a function which got "@a" and " 12:51
@b"
good point that this make foo(my $a, $b) work. 12:52
iblech autrijus: re smokeserv: Fixed. 13:04
putter: pong
putter iblech: ping? 13:45
iblech putter: pong
putter hey.
I was wondering how smoke when (putter hasnt upgraded perl yet)... 13:46
s/when/went/
clkao autrijus: your svk diagram is gone again?
iblech putter: Haven't upgraded perl either, yet, and I had to ^C the smoke yesterday (I increased the max time a test may take ==> it ate my RAM and swap...) 13:48
putter :(
perl5.t is by far the largest test file... while having it as a stress test is nice, one could rationalize breaking it in half or so... 13:49
iblech Yes...
putter so the perl alligator thing isnt something which can be worked around? (I'm unclear on exactly what it is) 13:50
hmmm... perhaps pugs needs a bundle... grep all the use XXX; from pugs... rather than an incremental "oops, that didnt work" process... 13:52
iblech Currently, we do work around it ("$self;" does the trick), but I wasn't able to work around it in my attempt of substituting $possibly_ccify_many and $step by real subs and using pass-by-ref instead of copying 13:53
fglock hi all 13:54
will it be possible to clone closures in Perl 6? 13:55
iblech hi fglock :)
Yes, definitely
And serializing closures and continuations should work, too
fglock cool - this makes much easier to clone lazy lists
iblech putter: BTW, I implemented autovivication and fixed another small bug, should cause additional ~~150 tests to pass :) 13:56
putter :) ! 13:58
Is there enough class stuff in pil to start hacking classes? 13:59
iblech Looked into it, found at least one problem: 14:01
class Pair is reopened { method postcirumfix:<{}> {...} } # does not emit the decl of &Pair::postcirumfix:<{}> 14:02
svnbot6 r6608 | fglock++ | * perl5/List - clone 14:05
r6609 | iblech++ | * util/smokeserv/smokeserv-server.pl: Increase maximum upload size, autrijus++
r6609 | iblech++ | for noticing the bug.
r6609 | iblech++ | * t/data_types/num.t, t/syntax/parsing_numbers.t: Fixed a test, added more
r6609 | iblech++ | tests to t/syntax/parsing_numbers.t.
r6609 | iblech++ | * t/data_types/mixed_multi_dimensional.t: Fixed a test (and pinged p6l).
r6609 | iblech++ | * PIL2JS:
r6609 | iblech++ | * PIL2JS.js: (Hack) $^thing.isa(Code) ==> $^thing.isa(Sub), $^thing.isa(Block)
r6609 | iblech++ | * Prelude::JS::Array: Stubbed &pair, needed to make { pair 1,2,3,4 } work.
r6609 | iblech++ | * Prelude::JS::Hash: Hash autovification!
r6609 | iblech++ | * Prelude::JS::Pair: $pair.value = ... works again, added $pair<key>.
iblech restarting smoke...
errands & 14:06
putter oh, & I likely wont be around later.
fglock re p5 runtime: does it make sense for p6 to have it's own namespace system (pads)
putter fglock: And perhaps some use() hack could suck them in to simpler names on a package by package basis... 14:07
oh, that was a question... 14:08
fglock Lazy lists need clonable closures - is there some hack to make this in p5? 14:11
broquaint Sorta. 14:22
Data::Dump::Streamer can do closures.
svnbot6 r6610 | Stevan++ | Perl6::MetaModel 2.0 -
r6610 | Stevan++ | * changed SELF() and CLASS() to be $::SELF and $::CLASS
r6610 | Stevan++ | - $::CLASS is now bound within the closure form of 'class'
r6610 | Stevan++ | * added lots of error checking to chaos.pl
putter fglock: sorry, 4GB perl swapping. 14:26
fglock putter: ?
putter delay in response 14:27
do you mean "p5 and p6 have distinct namespaces, where the same names can be used for different things", or
"would a metamodel of the namespace be useful", or 14:28
should "p6 package names not have a trivial map to p5 package names implementing them", or 14:29
...?
;)
currently there is a 1-1 map between p6 packages and p5 packages, with lookup done in a package-local sub "p6_lookup", and all under PIL::Run::Root or somesuch. 14:31
fglock I mean, when you instantiate a 'Code', it would be nice if the closure variables were somehow part of the object
putter ahh...
yes.
create mm Pad? 14:32
fglock a Pad structure would make things much slower? we already have a lot of indirection 14:38
putter brain slowly grinds into motion... 14:40
what's the objective again in having a Pad to capture lexically scoped variables?
fglock we will end up needing a garbage collector
the objective is to allow closures to be cloned 14:41
14:43 lhooq is now known as ARRAY, ARRAY is now known as lhooq
putter if sub{}s are used to do the capture, could one use a magic argument to call the sub and get back another with the same capture? 14:43
at worst, one should be able to do sub { if ($magic_eval_in_context_request) { return eval($request) } ...} 14:44
or just sub { if <mumble> { return sub { eval(@_) } ... } 14:46
which you could actually wrap in a Pad object ;)
does this make sense? 14:47
fglock how about $sub->eval( \@args, \@context ) and later $sub->clone() 14:48
putter get_eval_in_closure($old_sub)->('sub { new code in same closure }') 14:49
hmm...
what does eval() do?
and what is @context?
fglock actually: $sub->new( $code, \@arglist, \@context ) and later $sub->clone() 14:50
@context would be the lexical variables the sub can see
@context would be cloned when you clone the sub
putter $sub is Sub yes? 14:51
fglock yes
$sub = Sub->new( ...
putter Can Sub->new capture caller lexical variables? 14:52
eg, using a sub{} trick, perhaps wrapped in a source filter?
fglock it could use p5 PadWalker.pm 14:53
putter goes to look at PadWalker...
fglock but it would be nicer if we captured only the variables we actually use 14:54
putter PadWalker has a number of fails on cpan testers. but neat. the SEE ALSO section has some perhaps alternatives. 14:55
re, capture only what used, SHARING($x,$y) -> ['$x','$y'], sub { return \$x,\$y; } Sub->new(... SHARING...) 14:56
sub { return '$x' => \$x, '$y' => \$y } 14:57
sub { '$x' => \$x, '$y' => \$y } 14:58
fglock PIL can tell you what lexical variables are being used, I think
putter yes 14:59
CURRENT_ENV -> sub { eval(@_) } ;) 15:01
fglock $sub->fetch( $var_name ) would tell you the variable contents from the closure standpoint 15:03
putter one worry is that p5 seems to have some landmines around this neighborhood. vague recollection of having to use non-named subs to get proper closure behavior(?)(fuzzy recollection)
fglock no problem - we don't use named subs
putter sounds good
coke seen pmichaud? 15:04
jabbot coke: pmichaud was seen 62 days 19 hours 46 minutes 13 seconds ago
putter !
coke woof. anyone talked to patrick lately? I was expecting an email from him a few days ago, and just sent another email to him & p6i that I'm surprised he hasn't pounced on.
putter not I 15:05
obra He's been working 15:07
Earning a living and all that ;)
broquaint Slacker.
putter fglock: the eval stuff may not work. 15:09
perl -e '$s = (sub{my $x =4; sub{eval('$x')} })->(); print $s->('$x'),"\n";' #=> undef
oops, shell quoting bits again.
iblech fglock: Problem: You can't trust PIL what vars are used, think sub { my $varname = get_random_varname(); $::($varname) } or even sub { eval '$stuff' } 15:10
putter perl -e '$s = (sub{my $x =4; sub{eval(q/$x/)} })->(); print $s->(q/$x/),"\n";' still not...
coke thanks, folks.
broquaint That won't close over $x, putter. 15:11
iblech There was a thread about that on p6l once, with the general concensus being (IIRC), that we have to close over all variables unless we can prove that some variables can't be used. 15:12
broquaint That shouldn't work either. It'd be icky.
fglock iblech: these are not a problem, because the var will take a execution time value, instead of sub-creation time
putter broquaint: are there workarounds, or is it a lost cause (to attept to close over things I dont know the name of) 15:13
iblech fglock: Ah, that would indeed be a very simple solution :)
broquaint There are work arounds, putter, but they ain't pretty e.g perl -e '$s = (sub{my $x =4; sub{$x;eval(q[$x])} })->(); print $s->(),"\n";'
The problem being that the eval in the inner sub doesn't know about $x at compile-time so won't close over it. 15:14
putter right. but there the environment capturing code, CURRENT_ENV, is sub{$x;eval(q[$x])}. which knows all the lexically scoped variables of interest. 15:15
so the only way to close over something is to name it?
s/name/mention/
fglock perl -e '$s = (sub{my $x =4; eval"sub{$x}" })->(); print $s->(q/$x/),"\n";'
putter (sub{my $x =4; CURRENT_ENV })->() is there any definition of CURRENT_ENV which will continue working when I rename $x to $y? 15:17
broquaint How would you rename $x to $y within a closure? 15:18
putter err, everything but CURRENT_ENV is client code. they can call it anything they like. ;) my $a,$b; ... my $x;... $env = CURRENT_ENV; ... print $env->($ARGV[0]); 15:20
broquaint Aha. Yes, in perl5, that magic isn't available. 15:21
putter the recent suggestions have all been of a SHARING($x) --filter expand to--> sub { \$x } variety.
sniff. oh well.
broquaint: is it just a matter of preventing the variable from being inlined? ie, if its capture is forced _somewhere_ on the lexical stack, then will eval work? 15:26
broquaint That's about the size of it, putter.
If perl doesn't see that variable then it's not captured. 15:27
fglock putter: this is the call/fetch idea in a nutshell:
perl -e '%s=sub{my $x=4;(call=>sub{++$x},fetch=>sub{$x})}->(); print $s{fetch}(),$s{call}(),"\n";'
in other words, sub-execute and sub-clone should share a context. I think it is possible to implement this in a simple way 15:30
putter broquaint: ah, but that means, at least with subs created by the system, that one can force the variables to exist by including a throwaway sub which mentions everything. and have it work for sublevels too. though I havent tested that. one could imagine the child closures being pruned. 15:31
fglock:
fglock although I almost sure this will leak memory 15:32
because closures are being created inside closures
putter so the motivation for having call and fetch, rather than just returning \$x is...?
fglock fetch() is just an example - I actually need sub_clone() - but it was more difficult to write 15:34
I'll try 15:35
putter sounds good. 15:36
broquaint Are you generating the code, putter?
putter I tried $s = (sub{my $w=3; $s1=sub{\$w}; sub{my $x =4; sub{eval('$w')}};})->()(); print $s->(q/$w/),"\n"; but no joy. mixing eval() and lexical variables may have only limited utility. 15:37
broquaint: err, an interesting question in a code generation context. but I think the answer is "no, fglock" 15:38
;) 15:39
broquaint It'd be dead easy if you're generating the code. But it'd still be a filthy hack ;) 15:43
putter fglock: let's not worry at all about efficiency now. working and correct. sorry for the distraction.
putter breaks out in "but it would be faster if" hives... 15:44
fglock :) btw - my 'clone' idea didn't work
putter on to plan B? 15:45
fglock create a pad structure? 15:46
what does PIL2JS do? 15:47
iblech PIL2JS can't clone anything currently, and uses JS's variables. There is a "pad" structure and a global PIL2JS.subpads array containing the current subpads in scope, but these are only used for $CALLER:: 15:48
svnbot6 r6611 | iblech++ | * t/var/var.t: unHACKify 15:51
r6611 | iblech++ | * PIL2JS: PIL::PPad, PIL::PVar: Unbroke $OUTER::.
putter I'm off. back day after tomorrow. bye & 15:55
chumphries pugs looks interesting, have to try to remember haskell
svnbot6 r6612 | fglock++ | * perl5/Code - added 'Pad' to TODO list 15:57
kolibrie stevan_: I'm looking at ::bind_SELF_and_CLASS, and am wondering how $::SELF is available outside of chaos.pl 16:37
svnbot6 r6613 | iblech++ | * t/statements/return_from_inner_block.t: Added a guard against inflooping. 16:44
r6613 | iblech++ | * PIL2JS: PIL::PVar: Unbreak &infix:<**>, &sin, &cos, etc.
iblech stevan_: Hm, to call a class method in MM2.0 you have to $Foo->class::bar, right? But what if you can't know in advance if you're calling a class method or a instance method (sub foo ($obj) { $obj.some_method() }; foo(FooClass); foo(FooClass.new))? 16:46
stevan_ kolibrie: $::SELF means it is bound to $main::SELF 16:51
$:: is an alias for $main::
in p5
that is "fixed" in p6 ;)
kolibrie ahh
stevan_ iblech: re: class methods
good point 16:52
iblech: I will have to review A12 again 16:53
but I think class methods are methods which have an explicit Class invocant
Juerd [bondage freaks]-- 16:56
svnbot6 r6614 | fglock++ | * perl5/Array - more tests (2 fail)
Juerd [heuristics maniacs]--
iblech stevan_: That's true, I think -- FooClass.new.class_method should, of course, not work 16:59
But $x.class_method should, assuming that $x =:= FooClass, work
stevan_ iblech: yes 17:00
17:00 stevan_ is now known as stevan
stevan iblech: wait,.. does =:= mean "is exactly"? 17:01
svnbot6 r6615 | dakkar++ | corrected a bug: C<< for @a -> {...} >> is different from C<< for @a {...} >>
r6615 | dakkar++ | of course, now the t-shirts are wrong. Will say as much at the YAPC::Europe 2005 auction ;-)
iblech =:= means the container on the LHS is the same as the container on the RHS
Thus I should have better written $x eqv FooClass
stevan iblech: I almost feel as if class methods should be explicitly MM 17:03
svnbot6 r6616 | iblech++ | PIL2JS: PIL2JS.js: Fixed the booleanification of one() junctions.
stevan rather implicitly
fglock stevan: we were discussing about using a Pad structure in the p5 runtime (vs hacking the p5 pads) - do you have an opinion on this? 17:04
stevan fglock: not really, I am not that familiar with the internals of p5 pads, and I would expect that p6 pads would need more functionality then p5 pads can supply, but I dont know for sure 17:06
iblech: from a12 -> "Class methods are called on the class as a whole rather than on any particular instance object of the class. They are distinguished from ordinary methods only by the declared type of the invocant. Since an implicit invocant would be typed as an object of the class and not as the class itself, the invocant declaration is not optional in a class method declaration if you wish to specify the type of the invocant. (Un 17:12
typed explicit invocants are allowed to "squint", however.)"
fglock how about moving Perl6-Value/lib/Perl6/Code.pm to the MetaModel2.0 directory, in order to have Subs and Methods being developed in the same place? 17:13
stevan fglock: I am worried about circularity issues with Code.pm
since it uses the metamodel
the metamodel need some kind of primative sub 17:14
fglock "moving" can be: delete the current one, create another one that works right 17:16
stevan fglock: I dont think we should delete the current one 17:18
Aankhen`` G'night. 17:20
fglock have a meeting in 10min 17:22
stevan fglock: I was going to try and hook up Class::Multimethods::Pure to the MM2.0 today, and see if that will work 17:23
if it does, I think we might want to approach Code.pm the same way 17:24
as an outside module
basically sub's and multi-subs should be outside of the metamodel
fglock how about the parameter type-checking in multi methods? 17:25
stevan at least in the primative level
fglock: C::MM::Pure handles that
stevan still think's nothingmuch's idea of "everything is MMD" is not a bad one 17:26
then we get parameter checking for free (sort of)
fglock so it would be easy to use C::MM::Pure everywhere?
stevan I think
I have to do some source diving into C::MM::Pure first
fglock I need to go now 17:27
stevan luqui wrote it as a proof of concept IIRC, so it may need some work to be useful to us
fglock: enjoy the meeting :)
fglock bye
kolibrie stevan: thanks for that $:: tutorial (saved my neck, actually) 17:31
svnbot6 r6617 | iblech++ | * t/operators/precedence.t: unEVAL 17:44
r6617 | iblech++ | * PIL2JS: PIL2JS.js:
r6617 | iblech++ | * Classes stringify to their name now.
r6617 | iblech++ | * $obj.isa(SomeClass) works now. (Previously, only $obj.isa("SomeClass")
r6617 | iblech++ | worked.)
stevan luqui: ping 17:48
18:13 typester is now known as sleepster
svnbot6 r6618 | iblech++ | PIL2JS: Prelude::JS: Implemented 18:17
r6618 | iblech++ | my $x = $foo but {
r6618 | iblech++ | $foo.bar = $baz;
r6618 | iblech++ | ...;
r6618 | iblech++ | };
dduncan it appears that Haskell is choking on something 18:21
'make' on r6618 dies at the start with 'ghc-6.4: internal error: evacuate: strange closure type 16408 18:23
Please report this as a bug to [email@hidden.address] ...'
I'll try a realclean now just to be safe
iblech dduncan: Right, realclean will probably solve the problem
dduncan I did that, and then the subsequent 'perl Makefile.PL' spat the same error but otherwise completed; still ... 18:24
... and make dies as before 18:25
iblech :(
I can't check whether it works here, as I've got a smoke running... 18:26
dduncan I don't know if the problem is transient and specific to my system or not ... will see what smoke etc says
hmm ... I seem to have other issues at present which aren't specific to Pugs ... back in a bit 18:29
svnbot6 r6619 | Stevan++ | Perl6::MetaModel 2.0 - 18:41
r6619 | Stevan++ | * experimental support for multi-methods using
r6619 | Stevan++ | Class::Multimethods::Pure to provide the needed
r6619 | Stevan++ | functionality
r6619 | Stevan++ | - added tests for this
dduncan in *this* case, the problem in question was resolved by restarting the computer ... make realclean etc did not do it 18:44
sometimes my machine has OS-level instability following a wake from sleep ... a program crashed prior to this Pugs discussion ... and one during ... for the same cited reason in the console (a certain low level toolbox routine) 18:45
anyway, following this, 'make' et al now work normally
svnbot6 r6620 | fglock++ | * perl5/Array - more tests 18:48
r6621 | fglock++ | * perl5/Array - more tests; now all tests pass 19:24
iblech m19s28.vlinux.de/iblech/stuff/pugs-...4b52b.html # new PIL2JS smoke, 79.21% passes :) 19:27
fglock does @a[undef] =:= @a[0] ? 19:28
or is it an error?
iblech former, probably with a warning "uninitialized warning used in numeric contect" 19:30
fglock ok thanks :) 19:31
iblech (Same for hashes: %h{undef} =:= %h{""})
np :)
fglock what happens if @a is tied, and you do @a=@b - is the tie undone? 19:52
btw - what if @b is tied? 19:53
PerlJam I wouldn't think the tie would be undone 19:56
and if @b were tied, it wouldn't matter. @a would become a copy of @b at that time.
fglock so with tied arrays, you have to copy elements one by one (non lazily) 19:57
PerlJam well, I wouldn't think you'd have to copy them all at once. Each element of @a would be sort of a lazy proxy for each element in the tied array @b 19:58
fglock ok, added to TODO list - thanks 20:00
autrijus journal up 20:11
fglock :)
autrijus took 4+ hours and still just went thru about 40% of changes.
i.e. only the changes from <fglock iblech putter> that are marked with "PIL-Run" and "PIL2JS" 20:12
but finally I no longer feel so overwhelmed :) 20:13
still, that was amazingly productive.
I need to crash now... will catch up the rest of backlogging tomorrow
happy hacking :) 20:14
&
(also corrections etc welcome as comments)
S833 hello all 20:15
i am trying to rename some ms excel files in a directory
here's paste of my code 20:16
sial.org/pbot/12853
original file 100-abc-filename.xls i want it to be renamed to filename 100.xls
can some one help
Khisanth wrong channel 20:18
S833 what's wrong tell me 20:23
i am just asking for help man
Khisanth WHAT do you need help with? what do you need the script to do that it isn't currently doing? 20:25
S833 yes 20:26
the line my ($first, undef, $third) = split (/-/, $old);
and my $new = $third . " " . $first;
need help
besides that everything is fine 20:27
Khisanth twitches 20:28
I already know that, but what the heck do you want it to do? 20:29
S833 read ms excel files from currenct directory 20:30
that has the original filename as 100-abc-filename.xls and change it to
filename 100.xls if
that's it 20:31
buu THIS IS TEAM SIMPLE. 20:33
S833: Break it in to steps. Code the steps. Profit! 20:34
Khisanth give me the name of your English teacher so I may murder him/her
Supaplex my xboss *chough* 20:35
noo that'd be to kind. keep him alive. :-)
S833 Khisnath: was that comment about me for buu: 20:36
Khisanth for you
buu YES 20:38
fglock is (undef=>undef) a valid Pair? 20:44
buu ?eval (undef=>undef) 20:45
evalbot_6600 ('undef' => undef)
buu Who knows!
fglock I mean, in the Perl 6 spec :)
S833 Khisnath: you know what
python guys are much better than you guys are! 20:46
atleast they help newbies
and people you are having problems
Supaplex that's just too bad now isn't it?
fglock S833: try #perl instead
buu fglock: He's *in* perl 20:47
We keep trying to help him.
He ignores all replies and then reasks the question an hour later.
Khisanth if you think writing the script for you is help 20:48
buu Picky.
S833 i am not asking you to write for me 20:49
all i am asking is guide me
give suggestion or example
buu Why are you asking *here* ? 20:51
iblech fglock: It is. 20:55
fglock: and the key should probably not be coerced into a string 20:56
?eval (undef => undef).key 20:57
evalbot_6600 'undef'
iblech ?eval (undef => undef).value
evalbot_6600 \undef
fglock this means { undef=>undef } is not an error? In the current implementation, a hash can have 'undef' as key 20:58
buu fglock: Er, shouldn't that be "undef" the string? 21:00
?eval {undef,undef}
evalbot_6600 (undef, undef)
buu ?eval {undef,undef}.key
evalbot_6600 Error: cannot cast from VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubBlock, subEnv = Just (MkEnv {envContext = CxtItem (mkType "Any"), envLValue = True, envLexical = MkPad (padToList [("$?1",[(<ref>,<ref>)]),("$_",[(<ref>,<ref>)]),("$code",[(<ref>,<ref>)]),("$lang",[(<ref>,<ref>)]),("&?BLOCK_EXIT",[(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>),(<ref>,<ref>)]),("&break",[(<ref>,<ref>),(<ref>,<ref>)])
buu hahhahaha
I broke you!
fglock PIL-Run currently prints {('undef', undef)}
buu fglock: For which? 21:01
iblech fglock: Right, I'd think so (and this is how I've implemented it in PIL2JS). But: By default, hash can autoconvert their keys to Strs, so {undef()=>undef} would have the same effect as {""=>undef}. But if a hash is declared with shape(Any), {undef()=>undef} should create a hash with .pairs[0].key being undef
fglock for { undef=>undef }
buu fglock: Are you differentiating between undef=>undef and undef,undef ?
fglock: Dude, that's a string!
At least, I think it is.
iblech => autoquotes its LHS... 21:02
buu beats fglock with a bat.
iblech: So what happened to evalbot just now?
iblech buu: It printed an error message, which was truncated after 500 (or so) chars
?eval "but evalbot still works"
evalbot_6600 'but evalbot still works'
buu iblech: Er, let me rephrase. Why did it print an error message? 21:03
iblech buu: Because {undef,undef} is not a hash, but a Code, and Pugs tried to coerce the Code into a Hash, but failed
buu Er, so how do you create a hash ref? 21:04
iblech buu: \hash(undef,undef), {undef() => undef}, {pair undef, undef}, etc.
buu You wacky perl6ers 21:05
svnbot6 r6622 | fglock++ | * perl5/Container - { 1=>2 }.buckets and .elems work in PIL-Run 21:12
r6622 | fglock++ | - TODO update
r6623 | iblech++ | * New t/var/autovivification.t: Tests for autovivification (passes 20/20 in 21:17
r6623 | iblech++ | Pugs, 7/20 in PIL2JS)
r6623 | iblech++ | * PIL2JS:
r6623 | iblech++ | * PIL: Fixed overwriting of unexported subs, this should unbreak some tests.
r6623 | iblech++ | * Prelude::JS::Array: Array autovivification, but doesn't work yet because of
r6623 | iblech++ | mysterious bug (probably a typo), will investigate tomorrow.
fglock what is 1..Inf.pick supposed to do - int(rand( what? )) 21:18
Khisanth ?eval 1..10:by(3) 21:19
evalbot_6600 Error: unexpected ":" expecting digit, "_", fraction, exponent, term postfix, operator, "does", "but", "is", "^..^", "cmp", "<=>", "^..", "..^", "..", postfix conditional, postfix loop, postfix iteration, ";" or end of input
iblech fglock: There was a thread on p6l about this, but unfortunately I neither remember subject nor concensus... 21:21
Need to sleep now, night all! :) 21:23
fglock good night iblech 21:24
stevan luqui: ping 21:40
luqui stevan, pong 22:01
buu TEH PONGITY 22:06
luqui jeez, it's only been 20 minutes 22:07
donde fue stevan?
23:41 skylan_ is now known as skylan