-Ofun: xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6 Set by apple-gunkies on 11 November 2005. |
|||
cognominal_ | ?eval "" ~~ rx ( qw( a b ) ) | 04:49 | |
svnbot6 | r8015 | Darren_Duncan++ | r977@Darren-Duncans-Computer: darrenduncan | 2005-11-28 22:01:50 -0800 | 06:03 | |
r8015 | Darren_Duncan++ | /ext/Rosetta-Incubator : added new file /docs/Plan which gives a roadmap for when different pieces will be made, and implementation detail for some | |||
dduncan | Now committed /docs/Plan to both Rosetta repositories; as with /docs/Overview, any feedback is appreciated. | 06:13 | |
06:42
autrijus_ is now known as autrijus
|
|||
autrijus | ?eval "vanilla for now until someone revives version-specif one" | 06:44 | |
evalbot6 | "vanilla for now until someone revives version-specif one" | ||
gaal meows | 06:52 | ||
what had happened to it? | |||
dduncan | I like cats myself | 06:53 | |
svnbot6 | r8016 | luqui++ | r1098@jabberwock: luqui | 2005-11-29 01:14:48 +0000 | 08:15 | |
r8016 | luqui++ | Did a little editing on A20. | |||
r8017 | luqui++ | Editing on S28. | 08:33 | ||
gaal | luqui: ping | 09:12 | |
luqui | pong | 09:17 | |
gaal, pong. | |||
gaal | hey. evelbot was borked | 09:18 | |
luqui | ?eval foo | ||
evalbot6 | Error: No compatible subroutine found: "&foo" | ||
gaal | autrijus fixed it temporarily, but this is a non-versioned version. | ||
luqui | hmm | ||
looking into it | 09:19 | ||
gaal | cheers | ||
luqui | ?eval say "hi" | 09:21 | |
evalbot6 | OUTPUT[hi ] bool::true | ||
evalbot_8017 | OUTPUT[hi ] bool::true | ||
luqui | don't know what the problem was. It started up smoothly. | ||
?quit | |||
evalbot_8017 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot_8017 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot_8017 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot_8017 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
luqui | woah | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot_8017 | ?quit only available per private message so other bots don't quit as well. | ||
luqui | oh shit | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot_8017 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | 09:22 | |
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot6 | ?quit only available per private message so other bots don't quit as well. | ||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
luqui | whew | ||
that was, um... interesting | |||
let's fix that. | 09:23 | ||
nothingmuch would like to see the URL shortening bots recursively shortening each other's shorts | 09:25 | ||
luqui | Except, they only shorten when the url is above a certain length, right? | 09:26 | |
svnbot6 | r8018 | luqui++ | When evalbot tells you that you shouldn't ?quit in public channels, | ||
r8018 | luqui++ | the first word is "?quit", causing other bots to respond with the same | |||
r8018 | luqui++ | message and causing an infinite loop. Changed the message not to do that. | |||
luqui crosses fingers | 09:27 | ||
?quit | |||
svnbot6 | ?quit only available per private message so other bots don't quit as well. | ||
evalbot_8018 | you should only do ?quit in a private message so other bots don't quit as well. | ||
Khisanth | it shouldn't be so noisy | 09:30 | |
luqui | hmm? | ||
Khisanth | how about no response instead of that message? | ||
luqui | then people might wonder why it's not quitting | 09:31 | |
obra | luqui: what about putting that reply in a private message? | ||
luqui | that's a pretty good idea | ||
obra | :) | ||
luqui | hmm, but then if an infinite loop accidentally happens, we can't see why | 09:34 | |
it would be a privmsg infinite loop | |||
I think it's best to keep it noisy. We can deal with it. | 09:35 | ||
Khisanth | how about ignoring *bot*? | 09:36 | |
or a more specific pattern | 09:37 | ||
luqui | Does it annoy you that much? | ||
For example, purl is a bot, and there's certainly no way to tell that from the name. (In one of my first IRC experiences, I tried to start a conversation with purl after he replied to one of my comments :-) | 09:38 | ||
Khisanth | well there is always /ignore :) | ||
devin | purl is a she, not a he | 09:39 | |
luqui | oh, sorry | ||
devin | (see pound.perl.org/ ) | ||
Khisanth | luqui: my next suggestion was having the bots communicate with each other so they can better ignore each other :) | 09:41 | |
luqui | heh | ||
gaal | evalbot was just making up for the time he was away. | 10:06 | |
luqui | ?eval "hi" | 11:34 | |
evalbot_8018 | "hi" | ||
luqui | ?eval "hello" | 11:42 | |
evalbot_8018 | "hello" | ||
luqui | ugh, what I would give for real IPC | 11:43 | |
I mean, without actually putting it in pugs myself :-) | 11:44 | ||
?eval "yo" | 11:49 | ||
evalbot_8018 | "yo" | ||
luqui | ?eval "mornin'" | 12:37 | |
evalbot_8018 | "mornin\'" | ||
svnbot6 | r8019 | luqui++ | Added my evalbot looper. | 12:40 | |
luqui | ?eval "whatup" | 12:49 | |
12:50
evalbot_8018 is now known as evalbot_8019
|
|||
evalbot_8019 | "whatup" | 12:50 | |
r0nny | yo | 13:08 | |
got some problems with a complex multifile thing and inheritance | |||
luqui | mkay, splain | 13:10 | |
r0nny | DARN | ||
such a stupid error | |||
forget to check if a member var is defined, but called a method of its object | 13:11 | ||
so it compleined about being unable to modify Vundef | |||
luqui | hmm.. it'd be nice to have a better error message for that | ||
did it give you a line number at least? | |||
r0nny | yeah | ||
luqui | that's good | 13:12 | |
r0nny | but still i had no idea | ||
method call on undef isnt a valid action would be much nicer | |||
luqui | I'll see if I can do that | ||
r0nny | nice | 13:13 | |
luqui | hmm, I get the error "no compatible subroutine found" | ||
do you think you can reduce your code to a simple test case? | |||
r0nny | im going to try | 13:14 | |
i got something seems to create a endless loop | 13:23 | ||
luqui: may i dcc it to u - atm im in no position for a propper nopaste | |||
luqui | uh, can you email? | ||
I don't know how dcc works in irc... | 13:24 | ||
r0nny | atm im also in no position to mail | 13:25 | |
luqui | so, how do I do this? | 13:26 | |
r0nny | well - your client is cappable | ||
im going to send it now | |||
luqui | okay cool | 13:27 | |
r0nny | in my machine it seemed to loop endless | ||
luqui | yeah, here too | 13:28 | |
r0nny | hmm | ||
odd | |||
luqui | It might be a scoping issue | ||
let me diag it a bit | |||
yeah, it does the same thing if you say doit($.bar) instead of $.bar.doit($.bar) | 13:29 | ||
r0nny | still i wasnt cappable of reprotoducing the other problem | ||
luqui | it's okay, I'm working on good error messages for those kinds of errors in general | 13:30 | |
r0nny | hmm | ||
well - im going to continue on my normal project | |||
want to get it build simple apps | 13:31 | ||
luqui | okay. that problem is an infinite recursion (it calls doit() again and again) | ||
if you can write a test for it, that'd be great | |||
(to keep it from looping forever, keep a counter and abort if the counter gets too high) | |||
r0nny | hmm | 13:32 | |
a test helping class only counts up till a special value, and then exits might be nice | |||
luqui | but the definition of "exits" is going to depend on the problem at hand | 13:34 | |
really a lexical variable should do. | |||
r0nny | hmm | ||
Juerd_ | HELLO | ||
:) | |||
Eh | |||
But without caps | |||
luqui | my $counter = 0; if $counter++ < 10 { recursive test case } | ||
r0nny | i wonder how it could possibly be stuck at this loop | ||
luqui | oh, it's quite simple | 13:35 | |
it thinks that doit() is a regular sub, so $.bar.doit looks like doit($.bar) to it | |||
and it just calls itself over and over | |||
the fix is to keep doit() from entering the regular sub symbol table... but that probably has ramifications. | |||
r0nny | but there is no doit() sub matches | ||
luqui | yeah, uh, that's another problem | 13:36 | |
r0nny | but still it calls | ||
luqui | yep. it's obviously not doing multi dispatch on it. | ||
r0nny | odd | ||
hmm | 13:37 | ||
time to read the docs about the testing modules | |||
luqui | or just look at examples. not like there's a shortage. | 13:39 | |
r0nny | luqui: got a problem with the recursion - dont know what it calls, but my exit-condition it complete ignored | 13:52 | |
luqui | what does it look like? | 13:53 | |
just sketch | |||
r0nny | hmm | 13:55 | |
luqui | I was saying: my $counter = 0; class foo { has $.baz; method doit() { if $counter++ < 10 { $.baz.doit } } } | 13:57 | |
I have a hard time believe that it could ignore that counter... | |||
r0nny | this way it told undefined var | ||
luqui | what?! | 13:58 | |
something very screwy is going on... | |||
works for me | 13:59 | ||
r0nny | Undeclared variable: "$counter" | 14:00 | |
at t.p6 line 8, column 43-59 | |||
t.p6 line 12, column 1-9 | |||
luqui | did you declare it above where you used it? | 14:01 | |
r0nny | yeah | ||
luqui | send | ||
r0nny | its in the 2nd line | ||
luqui | send the code. this must be fixed. | ||
r0nny | DARN | 14:02 | |
luqui | (if it is, in fact, broken) | ||
r0nny | use Test # then no semicolon, and my $counter=0; | ||
luqui | d'oh! | ||
r0nny | not it works like expected | 14:03 | |
eh now | |||
luqui | woah, so it must have been interpreting that variable declaration as an argument to "use Test" | ||
r0nny | yeah | ||
scarry | |||
luqui | which means... inline declarations are working???!!! | ||
luqui goes and tries | |||
nope | |||
:-) | |||
r0nny | i hate these kinds of bugs | 14:04 | |
luqui | annoying, aren't they... | ||
r0nny | yeah | 14:05 | |
luqui | but they are quickly reducing in number | ||
r0nny | wich is generally a good sign | ||
luqui | five months ago I couldn't code anything because there were so many weird bugs | ||
now I can predict what's going to happen most of the time | |||
r0nny | well - now im going to try continuing my build system | 14:06 | |
luqui | good luck | 14:07 | |
r0nny | yeah | ||
with the actual state of tools i might need more then just luck | |||
luqui | :-) anyway, thanks for being ambitious | 14:08 | |
you're finding lots of bugs for us | |||
r0nny | i only helped to find about 4 or 5 - isnt this much | 14:09 | |
well - need to go for some time | 14:10 | ||
later | |||
nothingmuch | morning | 14:12 | |
luqui | morning | 14:14 | |
svnbot6 | r8020 | luqui++ | Well, maybe the error messages haven't improved, but at least the | 15:08 | |
r8020 | luqui++ | architecture for better error messages when subs are not found is there. | |||
fglock | is it ok for Prelude.pm to include other files? (src/perl6/Prelude/*.pm) | 15:41 | |
or is it intentionally one big file | |||
luqui | I'm pretty sure that it's okay to include other files | 15:44 | |
fglock | luqui: I'm thinking about moving some things that are under ext/Perl6-* into Prelude | 15:48 | |
luqui | hmmm.. like what? | 15:50 | |
(we must be careful so that we don't use up *all* the computer's memory and swap compiling the precompiled prelude) | 15:51 | ||
fglock | like Range, List, and maybe Array (later) - it would be nice to make a separate compilation and link later | 15:54 | |
does Prelude compile to Haskell? | 16:03 | ||
luqui | fglock, yes, Prelude is compiled to Haskell so we don't have to parse it every time. | 16:09 | |
I do wonder if it is possible to separate out the precompilations using hs-plugins. | 16:10 | ||
then we could precompile eg. Test, which would speed up make test quite a lot | |||
r0nny | re | 16:27 | |
pmurias | a python-like duality (py and pyo in python) system for perl6 modules would be handy | 16:35 | |
gaal | luqui: vi config.yml, you can already precompile Test. | ||
albeit not separately. | |||
there was a reason why Prelude could not be broken up easily, but I don't remember what it was :/ | 16:37 | ||
maybe just @INC matters. | |||
luqui | oh, yeah, I know | 16:47 | |
I tried that once, left to go get food, came back and it was still compiling | |||
so I decided not to do that again | |||
integral | pmurias: perl5 supports .pm and .pmc files | ||
r0nny | how to compile perl5 module ? | 16:48 | |
luqui | .pmc? really? | ||
using ByteLoader? | |||
integral | luqui: yep; it wastes masses of stat calls on it | ||
luqui | Perl 6 better change the extension; .pmc means something else now :-) | 16:49 | |
r0nny | what does it mean ? | ||
luqui | Parrot Magic Cookie | ||
r0nny | and wich tool generates the compiled perl5 modules ? | ||
luqui | We could follow python and make it .pmo, or follow Haskell and make it .pmi | 16:50 | |
I think it's ByteLoader | |||
Ahh, B::Bytecode | |||
but it doesn't buy you anything | 16:51 | ||
it takes about as much time to parse a perl 5 source file as to read in a bytecode file | |||
and you can deparse a bytecode file to see approximate source | |||
that's why nobody uses it | |||
pmurias | it would propably make more sense to precompile perl6 to backend specific stuff then | 16:54 | |
luqui | um, yes | ||
oh, so the extension would be .pbc then, I guess | |||
integral | hmm, since pugs' parser is so slow, serialised PIL2 might be useful though, like for the Prelude :) | ||
luqui | (or whatever other extension that is commonly used with whatever other backend we might target) | ||
integral | but then we'd use .pil2 I suppose | 16:55 | |
(and it'd be compiled in) | |||
luqui | see, that's what makes me worry about compiling perl 6 with perl 6 rules | ||
perl 6 rules are top down... | |||
and top down parsers are slow | |||
not only that, they're really stupid about being top down. they're always backtracking, never predictive. | 16:56 | ||
unless we can optimize to predictive without breaking any of the overdefined semantics | 16:57 | ||
integral | umm, isn't this a pretty big flaw in the whole perl6 plan? | ||
luqui | yes! | ||
integral | luqui: actually how much backtracking is really going to happen? | ||
Isn't the bulk of the time spent in the operator parser? | |||
luqui | ahh, yes, right. | ||
that's why we introduced the OP parser | |||
however, it seems that Pugs's parser uses one of those, too | 16:58 | ||
but I really don't know enough about Parsec to know if that's its problem or the approach's problem | |||
integral | hmm, I've been assuming that Strings have been Pugs' bottleneck | ||
hmm, I wonder if parsec can be instrumented to measure backtracking | |||
luqui | you mean simply the fact that strings are lists? | ||
well, sure, just define your own "try" | 16:59 | ||
integral | and wedge in a little unsafePerformIO or use the builtin state, hmm | ||
luqui | stick a trace in there, and then you can see how much each try backtracks | ||
gaal | luqui: yes it takes ages and there's a long way to go, but if you intend on running make smoke it pays off. | 17:02 | |
r0nny | btw -will there be something to compile perl6 modules to native code ? | ||
integral stares at try's code and wishes he'd payed more attention to the paper | 17:03 | ||
luqui | r0nny, yes | ||
well | |||
if the backend supports it | |||
integral | r0nny: several ways probably | ||
r0nny | hmm | ||
luqui | we intend on targeting parrot at least, which can compile to native cod | ||
e | |||
r0nny | nice | ||
gaal | parrot can do that? cool! | ||
luqui | integral, implement your own try in terms of Parsec's try | ||
r0nny | hmm | ||
gaal | how, actually, can it? | ||
integral | luqui: hmm | 17:04 | |
luqui | gaal, it could at some point, I don't know if it still can | ||
integral | actually I'm ok, I remember enough of the Consumed -> Empty thingie | ||
luqui | gaal, using the "exec" runcore, IIRC | ||
integral | it used the JIT for that I think | ||
luqui | yeps | ||
integral | actually in Jonathan's LPW talk he suggested it didn't work | ||
(and that the JIT was unloved :-() | |||
luqui | awww :-( | ||
the JIT is parrot's pride | |||
r0nny | jit is great! | 17:05 | |
luqui | we can't abandon it | ||
it produced faster benchmarks than any other VM out there | |||
admittedly, for very specialized code :-/ | |||
integral | and compilers need to not use PMCs... | ||
luqui | well, Perl 6 provides the lowercase types for optimized code when you need it | 17:06 | |
but the potential is dubious | |||
pmurias | PMC could be unboxed by the optimizer in theory | ||
at least... | |||
r0nny | limimiting the posibilities allways gives more room for special optimizing | ||
luqui | er... I don't think the PIR level has enough information to do that well | ||
integral | I hope there's not going to be a need to type infer PIR, ie if you know what type of PMC is in a P register you can skip it's vtable :-/ | 17:07 | |
luqui | you really need that kind of optimization to happen on a very high level | ||
integral | (and then you get a uncomputed jump if you're generated TIL) | ||
luqui | If Perl 6 targets C (which isn't such a crazy idea if we use boehm), then your optimized code could be generated as native object code and linked in to parrot | 17:08 | |
<leo> [exec is] untested and probably not working much | 17:09 | ||
darn | |||
r0nny | bte - how long might it take, till perl6 is finally ready | ||
leo | well, we do more optimizations - later | ||
integral | ugh | 17:10 | |
luqui | why does everybody ask that | ||
gaal | if someone ever does consider a c backend, please depend on glib instead of reinventing it :) | ||
luqui | r0nny, the more people who work on it the faster it becomes ready | ||
leo | but jit/x86 runs md5.pir at half of the speed of perl5/XS already now | ||
luqui | gaal, what is glib? | 17:11 | |
r0nny | i think a c++ backend might be fine ;P | ||
pmurias | luqui: The general part of GTK | ||
gaal | luqui: gtk.org's underlying make-c-sane library. | ||
integral | leo: but how fast does jit/x86 run md5.pl compiled from perl5 to PIR by a compiler? that seems more relevant | ||
PerlJam | r0nny: perl6 will be ready by christmas | ||
r0nny | YAY | ||
;P | |||
leo | that just depends on the compiler :-) | ||
luqui | r0nny, we don't need anything from c++ since we already have all the information that it provides as "convenience" | ||
gaal | it has objects, closures, reasonable data structures | 17:12 | |
luqui | we get type information from Perl programs ourselves | ||
gaal | and very high-quality code. | ||
pmurias | c++ has clousures? | ||
r0nny | neet to go - back when im back at home | ||
integral | pmurias: c++ has objects. | ||
luqui | r0nny, we just don't tell you which christmas | ||
gaal | pmurias: glib does them in straight c; but they're tricky to use. | ||
luqui | pmurias, no. c++ has as much support for closures as c does, which was my point | 17:13 | |
PerlJam | r0nny: seriously though, I understand that pmichaud is working on a perl6 interpreter and we've already got pugs and the myriad ways to get from source to source, so it shouldn't be too long now. I'm still betting on a "release" within 2 years. | ||
luqui | oh | ||
you were responding to gaal | |||
PerlJam | But even if perl6 hits the street within 2 years, it'll take another 5 or so for it to mature. | 17:14 | |
integral | PerlJam: but will it be usable? especially if "we"'ll do optimisation "later" | ||
luqui | hahaha pmichaud's interpreter | ||
(I'm not laughing at him) | |||
(I'm laughing at the idea of Perl 6 implemented in PIR) | |||
(and I've been laughing at that for a long time, but the rest of @Larry doesn't seem to agree) | |||
integral | the rest of @Larry isn't writing code. | 17:15 | |
PerlJam | luqui: Indeed. I thought him insane at first, but then I got a look at all of the things pm has done with PGE and suddenly is seems sane. :) | ||
integral | I'd have loved a "bootstrap perl6" something stripped down, simple grammar that could be written in PIR in an obvious way | ||
luqui | well, we can still create that | 17:16 | |
PerlJam | Not sure if that's a dangerous kind of sanity though :) | ||
luqui | well, I fear that writing the compiler in PIR has all the disadvantages of writing it in Haskell | ||
and none of the advantages | |||
integral | luqui: hmm, disadvantages? non-portability away from parrot, and too small a pool of developers who can cope with its code? | ||
pmurias | is pmichaud creating a full perl6 implementation or a proof-of-concept | 17:17 | |
luqui | the precise disadvantage I was thinking of was the low accessibility of the code | ||
proof-of-concept... for now | |||
integral | luqui: I think a lot of pugs' problem there is that the code isn't written as cleanly as it could | ||
Juerd_ | Aren't PoC's always "for now"? | 17:18 | |
pmurias | what are PoC? | ||
luqui | most notably because *all* of the contributors (including the architect) have been *learning* Haskell while writing it | ||
Juerd_ | Proof of Concept | ||
luqui | rather than already being familiar | ||
well, except maybe integral | |||
Juerd_ | integral: Is that a *problem*? | ||
integral | hmm? I did learn haskell while writing it | ||
Juerd_ | integral: Or an inconvenience? | ||
geoffb | OOC, why has noone tried to write a Perl 6 -> (something) compiler in Perl 5? Everyone got discouraged by Damian's Perl6::Rules problems? | 17:19 | |
luqui | oh, I thought you were already a haskeller, integral | ||
PerlJam | geoffb: someone did. | ||
geoffb | PerlJam, ...? | ||
integral | Juerd_: I think it is. The precise problem I'm thinking of is that the code is way to interconnected so that you need to understand lots of stuff over lots of files to see what's happening | ||
luqui | Juerd_, well, PoCs are supposed to be thrown away. However, most of the time (as Larry points out), they end up evolving into the real thing instead. | ||
integral, yeah, but I'm in a refactoring phase | 17:20 | ||
so maybe after school settles down I'll clean stuff up | |||
Juerd_ | luqui: Sure, but I don't see that as a problem. The classical problem, as I see it happen, is that there are no tests, and once something is used in production, everyone's afraid to touch it to clean things up. | ||
luqui | I've been wanting to clean up findSub for a long time now | ||
integral is going to try to hack parrot these holidays | 17:21 | ||
PerlJam | geoffb: I'm fairly sure there were the beginnings of a perl6 compiler (implemented in perl5) in languages/perl6 at one time. | ||
Juerd_ | It's no problem, imo, to put a PoC into production, iff you clean it up later. | ||
geoffb | PerlJam, hmmm. | ||
integral nods at PJ | |||
luqui | Juerd_, I like the emphasis on tests in that interpretation | ||
PerlJam, yes | |||
and it was designed terribly | |||
so it failed | |||
Juerd_ | integral: I've yet to see a big project without much interconnection. I don't know too many ways to avoid it. | ||
pmurias | a bit of source code documentation would help a lot for grasping the pugs source code (not voluntiring for anything) | ||
luqui | (it didn't use *any* compiler hourglasses) | 17:22 | |
PerlJam | luqui: were you the author? I seem to remember that too. | ||
luqui | no, I wanted to work on it | ||
but never got into it | |||
I think it was mostly Allison's project. | |||
PerlJam | sean burke perhaps? | ||
luqui | and sburke | ||
PerlJam | ETOOMANYNAMES ;-) | ||
integral | Juerd_: well I'm thinking of stuff like the runtime and the compiler both needing to manage pads, but doing different things with them, but it's been coded to use the same data structure for both, so they're got a big connection that shouldn't be there | ||
geoffb | luqui, no hourglasses == no intermediate rep? | ||
luqui | right. | 17:23 | |
it just went straight from syntax to generated code | |||
Juerd_ | luqui: The emphasis is on tests because I think tests, not no-longer-using-PoCs-in-production, is the solution. | ||
geoffb | ah. Oops. | ||
luqui | now we know that compilers are easy if you use *lots* of intermediate representations | ||
squeeze the information into fundamental forms often | |||
geoffb | Still, now that PIL2 exists, there's nothing to stop someone writing a Perl 5 frontend to it . . . | ||
integral | "exists"? | 17:24 | |
geoffb | integral, for some definition thereof. | ||
Yes, I know it's not fully there, but I would think enough of it is, to get started on the frontend. | 17:25 | ||
integral | well that's the problem... how do you write a perl 5 frontend for it when it's not actually compiling? | ||
oh, I'm out-of-date then | |||
geoffb shrugs . . . but then, I'm currently writing an interpreter for a different language so I can learn how to write that sort of thing. | |||
luqui recently wrote a toy language to experiment with type inference | 17:26 | ||
luqui loves the three-node lambda calculus tree :-) | |||
geoffb had a philosophical disagreement with his compilers prof in college, and thereby completely failed to learn anything about them. | |||
luqui | what was the disagreement | ||
PerlJam | geoffb: I had a disagreement with my compilers prof too ... but since I clearly knew more than he did, I too failed to learn anything. | 17:27 | |
geoffb | He argued that the compilers class should be done entirely in Common Lisp, not because of any advantage of CL per se, but because *he didn't want to write a list-handling library for C*. I told him that's what grad students were for. | ||
luqui | and libraries also | 17:28 | |
geoffb | I wouldn't have minded if he'd given me a real reason, but that was clearly bull. | ||
PerlJam | (well, I didn't learn anything *from the class*. I had my own outside reading and what not that I learned from) | ||
geoffb | So my "suspicion wall" went up like lightning. | ||
luqui | anyway, I think C is a pretty bad language for a compiler | ||
geoffb | I eventually dropped the course. | ||
luqui | as it is for anything | ||
since you get too caught up in the bullshit details | |||
and miss the big picture | 17:29 | ||
When I first saw the Haskell representation of PIL, that's when I decided I needed to learn Haskell | |||
that was it, the big picture, right there in 12 lines of haskell source | |||
PerlJam | haskell++ | ||
luqui | and then I encoded it in Perl 6 for fun | ||
and it was 30 lines of bullshit details | 17:30 | ||
thus, I decided that Perl 6 must have tagged union types | |||
geoffb | luqui, :-) | 17:31 | |
integral | tagged unions are a big thing that OO can't model :-( | 17:32 | |
well, unless you switch it all around to methods, but sometimes it's easier to work with data than methods; especially without multiple-dispatch | |||
luqui | well, you *can* model it using CPS style | ||
and then you get *polymorphic* tagged unions, which are totally sweet | |||
integral | ugh, yes, but manual CPS is a big warning sign that you're using the wrong language | 17:33 | |
luqui | yeah | ||
gaal | luqui: what are the current coordinates of those 12 lines? | ||
luqui | well, it's not that bad if you have a clean closure support | ||
integral | and in an OO language without closures, you end up passing the "continuation" as some kind of visitor-pattern thing | ||
luqui /me looks | 17:34 | ||
r0nny | re | ||
svnbot6 | r8021 | bsmith++ | Silenced a unused variable warning in Pugs.Eval.Var by changing x to _. | ||
luqui | gaal, good question. | 17:35 | |
maybe they were factored away | |||
(which is a good thing, because 11 node types is way out of the ball park) | |||
(you need more like... 4) | |||
geoffb sighs . . . I should have written this thing to be more debug-friendly | |||
integral | in Pugs.PIL1? but that's been moved from GADTs to sane, simple stuff | ||
luqui | ahh. it was the GADT | 17:36 | |
autrijus showed it to me at the hackathon | |||
integral | the problem there is that it was indexed with the wrong type | ||
luqui | sure. it didn't make a lot of sense in terms of a compiler | 17:37 | |
integral | it could have been fixed imho just by using phantom types to index it | ||
luqui | but it definitely showed me the data structure in the essential detail and nothing more | ||
phantom types? | |||
integral | I mean a type without any constructors | ||
so it's just there at type-checking time | |||
luqui | ahh | 17:38 | |
how do you define such a type? | |||
just, data Foo? | |||
integral | data Foo; IIRC | ||
gaal | I wish I could see that version, this is side^H^H^H^Hheart of pugs I'm not familiar with | ||
integral | hmm, it was in another file originally | 17:39 | |
gaal | another from ...? :) | ||
luqui | I think it was in Compile.hs | ||
in July? | |||
integral | hmm, probably | ||
gaal | PIL.Compile or Pugs.Compile? | 17:40 | |
luqui | probably Pugs.Compile | ||
integral mutters about compilation times | 17:42 | ||
luqui | there it is | ||
svn cat -r "{2005-07-17}" svn.openfoundry.org/pugs/src/Pugs/Compile.hs | |||
(on my birthday :-) | 17:43 | ||
yikes, 17 nodes | 17:44 | ||
that seemed small to me at the time | |||
gaal | sleep $then-$now ; happy birthday | ||
luqui | :-) | ||
Juerd_ | Hmmm... units :) | 17:45 | |
luqui | mmmmh? | 17:46 | |
Juerd_ | I keep hoping we'll have omni-compatible everything :) | ||
Using unittabs and stuff like that :) | |||
$then a date, $now a date, sleep knows durations in any unit... | |||
s/date/datetime/g | |||
gaal | actually in DateTime.pm you can do that, but it doesn't produce a duration IIRC | 17:47 | |
Juerd_ | Well, the point I'm hoping for is that sleep somehow can handle every kind of duration | 17:48 | |
Not just seconds. | |||
gaal | including negative ones, yeah :) | ||
I gotta go, see you :-) | |||
luqui | well, using user-defined isomorphism in the new type calculus for Perl that I'm working on, that may be possible | ||
I just need to make sure that the idea makes sense... | |||
Juerd_ | Either by having a type Time::Seconds for its argument, which other stuff coerces to, or by requiring specific unit specification :) | ||
luqui | (unlike theory.pod v1 ;-) | 17:49 | |
Juerd_ | sleep 5`s; | ||
sleep 5; # warning | |||
integral | umm, isn't it basically exponential time to find a route from type A to type B given a bunch of isomorphisms? :-/ | ||
luqui | you mean dijkstra's algorithm? | 17:50 | |
cubic. | |||
IIRC | |||
integral | ah | ||
well that's still pretty darn long :) | |||
luqui | only if you have large sets of isomorphisms | ||
Juerd_ | use units qw(time); | ||
Eh, <time> :) | |||
r0nny | btw - how is the claa tells me the mtime of a file ?? | 17:51 | |
Juerd_ | Many can just be hard coded, pre-calced. | ||
luqui | r0nny, claa? | ||
if it's going in the type calculus, it would all be done at compile time | 17:52 | ||
and sure, you could give it hints | |||
r0nny | ops call | ||
integral | ugh, and so even longer compilers. Please, please, please remember that perl is a dynamic language | ||
luqui | yeah, I know | ||
integral | for little scripts that open a text file, then run through a while(<>){} building some objects for each line, then frobbing the objects, and then dumping them. that's how simple lots of stuff is :) | 17:53 | |
I'd love to see some features design to make perl really fast to compile | |||
luqui | and you're not using a set of 100 units to do that | ||
don't worry, I at least have that in mind. Pretty sure that's high on Larry's list too. | |||
integral | but the module I loaded does | ||
luqui | but modules are precompiled :-) | ||
integral | but then installing modules takes ages :-( | 17:54 | |
r0nny | binary dist | ||
luqui | for some definition of ages, yes. | ||
integral | oh well, better trade off :) | ||
r0nny | rafl and kane are allways working on a binary distribution system | ||
luqui | I think the thing we really need to keep in mind is that it should always be possible to trade compile time for runtime | ||
perhaps trading type safety also in the process | |||
because Pugs is really annoying to work on because it takes so long to compile | 17:55 | ||
r0nny | yeah | ||
luqui | fast compile cycle is one of the anchors of XP | ||
r0nny | i got just a few simple modules | ||
integral | but type safety is really handy when hacking | ||
luqui | well, you can speed it up by putting in explicit annotations | ||
r0nny | type-savety is important | 17:56 | |
integral | (like I'm trying to build an email message, so I set the email address to $domain accidentally rather than the address object) | ||
r0nny | u can use it to optimize more for the speial cases | ||
luqui | yeah, but type inference is slow, we know that | ||
Juerd_ | integral: No, installing a module would be much faster than we're used to. | ||
luqui | so we have to trade :-) | ||
Juerd_, why? | |||
Juerd_ | The module is compiled once, in total, instead of once, per test script. | 17:57 | |
integral | ooh, that's a good one | ||
Juerd_ | It's compiled anyway. It takes very little extra to save it. | ||
luqui | I guess if you consider asymptotic bounds | ||
integral | but maybe we'll also have a sane way to not run billions of tests | ||
luqui | but also remember that perl 5's parser/compiler is extremely fast | ||
and we probably can't get perl 6's that fast | 17:58 | ||
Juerd_ | luqui: And so will Perl 6's *have to be* | ||
Or it will not find acceptance. | |||
Except amongst python and java coders, perhaps. | |||
luqui | no, we're making other trades to compensate | ||
like precompiled modules | |||
Juerd_ | Having a slower compiler is THE way to loose all ground on the web side of things. | ||
luqui | okay. well, like I said, there need to be trade-offs available to the user | 17:59 | |
Juerd_ | I think there should be a fast immediate-run compiler. A compiler that stores things for later can be slower. | ||
integral has had the case of the CGI script that took *seconds* to start up | |||
Juerd_ | The web thing is different because the web user typically has no write access anywhere, to store the compiled versions, and compiling manually SUCKS. | ||
integral | ok, "say 'hello'" to the pugs prompt prints about two pages of "backtracking" assuming I stuck the trace in the right place :) | 18:00 | |
s/pages/screenfuls/ | |||
luqui | hmm | ||
integral | oops, dinner, see you all later | ||
luqui | but I'm convinced that perl 6's compiler can't be as fast as perl 5's, even in the no-static-analysis case | 18:01 | |
Juerd_ | It'll still have to be very, very fast | ||
r0nny | but the overall time might be shorter, since all the precompiled modules save time | 18:02 | |
Juerd_ | Maybe not exactly as fast, but the average user mustn't notice a difference in compile+execution speed | ||
luqui | Well, I think the bound is a little more lenient than that | ||
geoffb | And the fact that Perl 6 source can be considerably shorter may help the overall experience v. P5 | ||
luqui | that is, you have to be able to compile 5,000 lines in about a second. | 18:03 | |
Juerd_ | Of course, if execution is so much faster that it compensates for slower compilation, that's okay too. | ||
luqui | you have to be able to compile 1 line in a quarter of a second | ||
because those are bounds that the average user can handle | 18:04 | ||
once you go over 5,000 lines then people will start precompiling | |||
Juerd_ | geoffb: Don't forget that numerous people choose Perl not for its expressibility and conciseness, but because it's the only dynamic language that has good enough speed for today's demanding computer use. | ||
luqui | er. | 18:05 | |
geoffb | Juerd_, no argument at all with that. I simply meant, if the P6 compiler chews source half as fast as P5, but the source is only half as long . . . | ||
Juerd_ | luqui: A second for 4 lines is totally unacceptable, even in the slowest of cases. We have to be at least 20 times as fast as tcl to be taken seriously :) | ||
geoffb | of course, that depends on skilled use of P6 | ||
xinming | Juerd_: No, Why I choose perl is because of its expressibility. :-) | ||
luqui | Juerd_, I was assuming an approximately linear interpolation between the two bounds :-) | ||
geoffb | xinming, "numerous people", not all | 18:06 | |
xinming | and have a c-like style grammar. :-) | ||
luqui | basically, a small script: 1/4 second. A medium program: 1 second. A large program: people are precompiling. | ||
r0nny | hmm | ||
Juerd_ | xinming: So do I. Many do not. | 18:07 | |
r0nny | my small stuff allready needs about 3 seconds :/ | ||
and it does allmost mothing | |||
luqui | pugs is no example :-) | 18:08 | |
as far as speed goes | |||
which I think is completely fine | |||
it wasn't written to be fast | |||
r0nny | still its paine | ||
luqui | well, you can make it faster if you like | 18:09 | |
Juerd_ | luqui: It's an example of bad speed ;) | ||
luqui | heh | ||
r0nny | btw - can pugs compile perl modulse tho hakell modules, and later use them ? | ||
Juerd_ | A very good example, even. It outperforms tcl in slowness! ;) | ||
luqui | r0nny, do you mean, can you use perl 6 modules from haskell? | ||
or can you use haskell modules from perl 6? | 18:10 | ||
Juerd_ | I think he means: precompile Perl 6 modules, for Perl 6 re-use. | ||
r0nny | luqui: i want to precompile modules are loaded depending on a variable | ||
Juerd_ | But with some vague notion of how things happen :) | ||
luqui isn't sure, to be honest | |||
r0nny | else i need to hack it, to use all modules are there | 18:11 | |
luqui | r0nny, oh wait... | 18:12 | |
you want to control whether or not to use a module based on some flag? | |||
r0nny | i want to compile tha app, but depending on a varialbe it uses different modules | ||
the variable isnt known at compile time | |||
but it resolves to a class name | 18:13 | ||
luqui | oh, well I know that's impossible | ||
in fact, it's really impossible, not just unimplemented | |||
r0nny | well | ||
it would be possilbe, if i had all the modules put in at compile-time | |||
luqui | but you may want to look at "require" | ||
r0nny, of course | |||
r0nny | is there a way to check if i compile, or not ? | 18:14 | |
luqui | but then you're not really "selectively using" them, are you? | ||
r0nny, I don't quite know what you mean | |||
r0nny | i am | ||
i read what class is needed, then i use the moduile for it, and create a instance | 18:15 | ||
luqui | okay, you want "require" | ||
r0nny | maybe | ||
luqui | ./pugs -e 'if 0 { require Test } ok(1)' | 18:16 | |
*** No such method: "&ok" | |||
./pugs -e 'if 1 { require Test } ok(1)' | |||
ok 1 | |||
?eval require Test; ok(1) | 18:17 | ||
18:17
evalbot_8019 is now known as evalbot_8021
|
|||
evalbot_8021 | Error: No such method: "&require" | 18:17 | |
luqui | okay, fine | ||
r0nny | takes some time | ||
luqui | of course. you're compiling a module. | 18:18 | |
and no, I don't know of a way to precompile | |||
r0nny | btw why not use ? | ||
luqui | use runs at compile time | ||
require runs at runtime | |||
r0nny | hmm | 18:19 | |
eval "use foo" was my actual doing | |||
luqui | it's basically the same thing. | 18:20 | |
r0nny | now the prog is broken | ||
it just wont find the file any more | 18:22 | ||
all i di was changing from eval use to require | |||
luqui | just a sec | 18:23 | |
just like in perl 5, require needs a full path | |||
if you don't hard-code the name | |||
require "blib6/lib/Test.pm" | |||
is equivalent to | 18:24 | ||
require Test | |||
but not to | |||
require "Test" | |||
r0nny | is there a way to supply class names the eval use way ? | ||
luqui | what do you mean "supply class names"? | ||
r0nny | the pkg name is created by prepending a namespace prefix to the variable wich is only allowed to contain [a-zA-Z:] | 18:25 | |
luqui | oh, you're asking if you can make "require" behave like "eval use" | 18:26 | |
r0nny | yeah | ||
luqui | the answer is no. use "eval use". | ||
but it's probably better to supply explicit paths anyway | 18:27 | ||
so that you don't get people including standard modules | |||
xinming | is there a way to dynamically generate a class which class is the same as file name exclude the extension? ;-) | ||
luqui | which may have insecurities | ||
xinming | the class name is the same as file name exclude the extension. | ||
luqui | xinming, I'm not sure how the answer could possibly be "no" | 18:28 | |
maybe you need to clarify the question a bit | |||
r0nny | luqui: i have allways a special prefix, and the module name isnt allowed to contain suspicious stuff | ||
hmm | |||
luqui | r0nny, would Test::More be considered suspicious? | ||
because it could introduce an insecurity for sure. | |||
r0nny | im speaking of stuff might change the module path | 18:30 | |
darn need to go again | |||
xinming | hmm, for example, I have role defined. and we wish to write class. But we make a file contain a class. So, It's a bit like template. and we only need to make a file which only contains `class $file_name does role;` | ||
and a new class is generated. :-/ | 18:31 | ||
luqui | xinming, well, perl has file I/O. | ||
my $fh = open "$file_name", :w; $fh.print("class $file_name does role \{\}\n") | 18:32 | ||
oh, and $fh.close, of course, since we don't have GC of those things yet | 18:33 | ||
xinming | hmm, I think we can find the files, and eval this string in that to dynamically generate the class. But we might wish to get a file list, and use require to load them. | ||
luqui | I don't understand | ||
xinming | we might prefer use require instead of eval "class $class_name does Role;" | 18:34 | |
luqui | well, that preference is keeping you from getting your job done then | ||
eval is more powerful than require. if you can't do it with require, you should be using eval. | 18:35 | ||
maybe I'm still misunderstanding | 18:36 | ||
if my answer doesn't make any sense, then I probably am | |||
xinming | hmm I have 2 solutions, my @files = get_pm_list; for @files -> $f { eval "require $f" } | 18:37 | |
another is, my @files = ("A", "B", "C"); for @files -> $f { eval "class $f does Role;" } | 18:39 | ||
luqui | if the only thing you're using the files for is to create the classes | ||
then I don't see any reason that the first one is better | 18:40 | ||
you have to create files only to immediately read them and evaluate the code | |||
xinming | I prefer the previous. | ||
luqui | but why? | ||
xinming | as we can extend the class by your preference. | 18:41 | |
luqui | hmm, I see | ||
so you want to generate the file only if it doesn't already exist? | |||
?paste | 18:42 | ||
@pate | |||
@paste | |||
hmm.. | |||
geoffb | lisppaste3, url? | ||
lisppaste3 | To use the lisppaste bot, visit paste.lisp.org/new/perl6 and enter your paste. | ||
luqui | thanks | ||
geoffb | np | ||
geoffb wonders | |||
pasteling, url? | |||
perlbot nopaste | |||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
xinming | luqui: hmm, IMHO, This is good for you to do a program which can specify module by a config file. If the module doesn't exist, then you can still get the default behaviour. | 18:43 | |
luqui | okay, I see where you're going | ||
one sec | |||
xinming | So, What I exactly want is... If there is a better way instead of using eval. :-) | 18:44 | |
luqui | what's wrong with eval? | ||
PerlJam | eval has a negative stigma attached to it. It's like using goto ;-) | 18:45 | |
luqui | but require doesn't? | ||
require just reads in a file and then evals it | |||
(I guess while just generates a few gotos in the same respect) | |||
PerlJam | If you hide the thing that makes people cringe, then , well ... they don't cringe. | 18:46 | |
xinming | how about when $f = "A {}; qx:rm ~ -rf:; class B" ? | 18:47 | |
SamB comes up with a scheme to coat monads in chocolate | |||
lisppaste3 | luqui pasted "Possible solutions" at paste.lisp.org/display/14117 | ||
luqui | xinming, that's why you have to filter your input | ||
you always have to filter your input | |||
xinming | why I don't like eval is because of these, eval has too much power. | 18:48 | |
luqui | make sure it matches rx:P5/^[A-Za-z_:]+$/ and you don't have that problem | ||
xinming, so does require | |||
require My::Cpan::Module::That::Deletes::Your::Hard::Disk | |||
xinming | ... | 18:49 | |
thanks for your solution. :-) | |||
luqui | In fact, here's the implementation of require: | ||
sub require($file) { eval(slurp $file) } | |||
now is require better than eval? | |||
xinming thinks so. | 18:50 | ||
oops. the same as eval. :-/ | 18:51 | ||
luqui | when $file = "/tmp/rmrf"; /tmp/rmrf is qx:rm -rf /: | ||
xinming thinks perl 6 is much easier to learn than haskell. | 18:52 | ||
luqui thinks so too | |||
r0nny | re | ||
luqui | haskell is about the most difficult language to learn on the planet | ||
luqui has to go to school | |||
xinming | I still didn't catch the many ideas in haskell. | 18:53 | |
luqui: good good study. day day up. :-P | |||
luqui | it took me two months to learn, and another two months to get comfortable with | ||
luqui & | |||
r0nny | re | ||
xinming | I just started. that's the pain. | ||
r0nny | found a nice solution | 18:54 | |
Juerd_ | 19:54 < luqui> haskell is about the most difficult language to learn on the | ||
planet | |||
I think Russian is. | |||
luqui | heh. | ||
r0nny | are there any modules dealing with other modules ? | ||
xinming | Juerd_: why not say Chinese. :-/ | ||
luqui | programming language. :-p | ||
yeah, Chinese beats Russian by a long shot. | |||
oh wait, I'm supposed to be gone | |||
r0nny | i think im going to write a module creates insstances of special classes in special namespaces | ||
luqui & | |||
Juerd_ | No, Russian wins. | 18:55 | |
It looks easier, by looking logical | |||
But underneath, it is not. | |||
It's a hell of a lot easier to learn lots and lots of unrelated things | |||
Than to learn lots and lots of rules, with many exceptions each. | |||
PHP is Chinese, Perl is Russian :) | 18:56 | ||
PHP's easier. | |||
Amnesiac | hey Juerd_ | ||
Juerd_ | It has more stuff to learn, but you know beforehand there's no logic to it :) | ||
luqui | then what's Haskell? | ||
Juerd_ | Perl has less to learn, but what's there is harder to grok, because it looks logical, and then an irregularity will painfully bite. :) | ||
luqui | I'd say Japanese, but Haskell is harder conceptually than Japanese. | ||
Juerd_ | luqui: Esperanto, perhaps. | ||
luqui doesn't know much about Esperanto... so, it's possible | 18:57 | ||
xinming | Juerd_: well, PHP has so many functions which are not uniformed. But Chinese not. :-/ | ||
luqui | Chinese has so many characters!! | ||
I don't expect the grammar is all that difficult | |||
Juerd_ | luqui: I've compared Esperanto to almost every programming language in existence, and funnily, it's always true in some way :) | ||
r0nny | are there modules help with dealing with dynamic loading of other modules ?? | ||
luqui | in perl 6? | 18:58 | |
because there are plenty in perl 5 | |||
r0nny | in perl6 | ||
luqui | I don't think so | ||
r0nny | then im going to hack one | 18:59 | |
xinming | luqui: But every characters has it's own meaning. And most used characters are only about 3000, which will composed with related base things. ;-) well, maybe I am a Chinese for I say this. :-/ | ||
luqui | cool | ||
only about 3000 huh? | |||
gee, that's not that many | |||
I mean, I know 26 | |||
3000 isn't that much more than 26 | |||
xinming | r0nny: just specify a dir, and then paste the code luqui show. :-P | ||
Juerd_ | luqui: You very probably already know many more than 3000 symbols | 19:00 | |
r0nny | xinming: im going to write a submodule loader | ||
Juerd_ | Think about traffic signs, warning signs, icons, all the character sets you know | ||
luqui | sure, but I'd have to know 3000-26 more of them to learn chinese | ||
xinming | luqui: But for express the meanings. Chinese is shorter. :-P | ||
luqui | more concise. Like perl :-) | ||
r0nny | is the namespace Loader::Submodule ok ? | ||
xinming | though Chinese sucks in Computing world. :-/ | ||
r0nny | or should i use something else | 19:01 | |
luqui | r0nny, maybe you should take the perl 5 module as a template? | ||
I think it's called DynLoader or something | |||
xinming goes to sleep | |||
bye all for now. | |||
luqui | r0nny, search.cpan.org/~vipul/Class-Loader.../Loader.pm | 19:02 | |
is that what you're trying to make? | |||
r0nny | luqui: yeah | ||
kinda | 19:03 | ||
luqui | then Class::Loader seems like a good name ;-) | ||
r0nny | mm | ||
luqui & | 19:04 | ||
r0nny | it should load subclasses of different kinds | ||
i think i can do | 19:05 | ||
but it might be a bit special from the beginning | |||
Class::Loader is using cpan to install missing stuff | 19:10 | ||
i can do it- there is no sixpan | |||
ingy_ | seen autrijus | 19:13 | |
jabbot | ingy_: autrijus was seen 3 days 10 hours 10 minutes 34 seconds ago | ||
ingy_ | hmm | ||
anyone know autrijus home address? | |||
obra | ingy_: do you have the email they sent us about where we were staying for yapc? | 19:14 | |
Jooon | ingy_: a_coach@somewhere_in_the_world | 19:16 | |
or maybe not yet :) | |||
Aankhen`` goes to sleep. | 19:21 | ||
G'night. | |||
ingy_ | obra: looking | 19:22 | |
Juerd_ | ingy_: If he has one, I doubt you'll be able to reach him there often ;) | 19:25 | |
ingy_ | I need it for visa application Juerd_ | ||
Juerd_ | Ah | ||
leo | ingy_: autrijus is currently heading towards .au AFAIK (osdc::au that is) | 19:26 | |
ingy_ | I really need gugod | ||
oooo whois! | 19:28 | ||
Registrant Name:Autrijus Tang | 19:30 | ||
Registrant Street1:4f #8 way 1 lane 24 section 3 djr-nan road | |||
Registrant Street2: | |||
Registrant Street3: | |||
Registrant City:Taipei City | |||
Registrant State/Province: | |||
Registrant Postal Code:116 | |||
Registrant Country:TW | |||
Registrant Phone:+886.222345961 | |||
:p | |||
ingy_ rocks | |||
Amnesiac | ingy brianson | 19:33 | |
r0nny | darn | 19:34 | |
doesnt a class usually have a default new func ? | 19:36 | ||
Juerd_ | r0nny: Method, and yes. | 19:39 | |
DesreveR | re | 19:46 | |
anything after the "any idea ..." | |||
? | |||
Juerd_ | What "any idea ..."? | 19:47 | |
DesreveR | *** cannot cast from VType (mkType "Class::Loader::new") to Pugs.AST.Internals.VCode (VCode) <- i get this, if i call NAMESPACE::new(:attr<val>) | 19:48 | |
darn - everything is just broken | 19:54 | ||
some time ago it still worked fine :/ | |||
RangerNS | Hi all.. If I wanted to develop a compiler/interperter/somethingorother for an existing language, eventualy with parrot as its vm, what would be a reasonable route? P6 on pugs? | 19:55 | |
robkinyon | RangerNS: You'll need the parser/lexer for that language | 19:56 | |
Then, you'll need to learn either PIL or PIR | 19:57 | ||
RangerNS | well, thats what Im thinking of writing in P6.. Its now implemented in S/SL, so conversion from one recdescent to another should be more timeconsuming then hard. | 19:58 | |
robkinyon | AFAIK, Allison is developing a set of compiler tools for use with Parrot | 19:59 | |
Allison Randal, that is | |||
Autrijus developed PIL, but it's really for Perl6 -> other language (like JS) | |||
RangerNS | When I was previously inspired, I was thinking of more or less cloning languages/perl6 - at least the structure - but thats gone now. | 20:00 | |
robkinyon | though, there is a PIL <-> PIR converter already written, so you can go Your language -> PIL -> PIR | ||
if PIL is easier for you to work towards | |||
RangerNS | I think parsing would be first on the list :) | ||
leo | RangerNS: have a look at compilers/{pge,tge} inside the parrot tree | 20:02 | |
especially the grammar parser, also used by tge | 20:03 | ||
RangerNS | the language is zmsh (part of ZMailer), which started as a clone of sh, but with lispy things and perly things too | 20:04 | |
chip | seen autrijus | 20:11 | |
jabbot | chip: autrijus was seen 3 days 11 hours 8 minutes 43 seconds ago | ||
chip | that can't be right | ||
he was here yesterday | |||
PerlJam | seen autrijus_ | 20:14 | |
jabbot | PerlJam: autrijus_ was seen 96 days 41 minutes 10 seconds ago | ||
PerlJam | the bot is clearly broken | 20:15 | |
Limbic_Region | seen autrijus | 20:26 | |
jabbot | Limbic_Region: autrijus was seen 3 days 11 hours 23 minutes 55 seconds ago | ||
Limbic_Region | depends on how you spell the name I guess | ||
oh, nevermind me I see chip already did that | |||
pmurias | RangerNSL: Alternativly you could try to do it using Parsec, PIL, and something else for Tre Transformation (maybe Atribiute Grammars see UUAG) | 20:30 | |
RangerNSL: You would learn haskell that way | |||
At least that's what I'm trying to do... | 20:32 | ||
i'am at the parsec^Hr Stage | 20:34 | ||
gaal | DesreveR: .new, not ::new | 20:38 | |
DesreveR bangs his head on the table | 20:42 | ||
*multiple times* | 20:43 | ||
am i correct with the folowing : asigment of objects just copyes their "pointer", pushing/poping them, from a array, too | 20:46 | ||
darn | 20:50 | ||
i got a problem with some inheritance | |||
i got a class got a special new submethod, but for some reason it wont call -_- | 20:55 | ||
pmurias | ?eval class A {};A.new(); | 20:57 | |
evalbot_8021 | A.new(); | ||
pmurias | ?eval class A {method h {"hello world"};A.new().h; | ||
evalbot_8021 | Error: unexpected end of input expecting end of input, ";", statements or "}" | ||
pmurias | ?eval class A {method h {"hello world"}};A.new().h; | 20:58 | |
evalbot_8021 | "hello world" | ||
pmurias | ?eval class A {my $.a;method h {"hello world"}};A.new().a; | ||
evalbot_8021 | Error: No such method: "&a" | ||
pmurias | ?eval class A {has $.a;method h {"hello world"}};A.new().a; | ||
evalbot_8021 | \undef | ||
pmurias | ?eval class A {has $.a;method h {"hello world"}};A.new(a=>1).a; | ||
evalbot_8021 | \1 | ||
DesreveR | um | 20:59 | |
my problem is, that a custom new isnt executed like it should | |||
wolverian | DesreveR, you don't generally define a custom new, but a custom BUILD. I don't know if pugs implements this. | 21:12 | |
DesreveR | hmm | 21:13 | |
darn - all i want, is that this damn class sets a object to one of its attributes at startup | 21:23 | ||
anyone got a hint, where changing the default ctors is described ? | 21:28 | ||
wolverian | S12 | 21:34 | |
dev.perl.org/perl6/doc/design/syn/S12.html | 21:35 | ||
DesreveR | found it | 21:36 | |
wolverian | DesreveR, note that if you need it to be initialised at class construction time, you can just write 'has $.foo = "bar";' if you need it initialised at _object_ creation time, you can just say 'has $.foo = { bar() };' | 21:37 | |
DesreveR | does this work, if the atribute is inherited ? | 21:41 | |
wolverian | it certainly should. I don't know if Pugs implements it. | ||
DesreveR | well - atm i got another problem - File::Find wont work like described | 21:42 | |
wolverian | well, fix it. :) | 21:43 | |
DesreveR | in my actual state im not cappable of such thing | ||
wolverian | well, pugs is certainly not ready for production yet. | 21:44 | |
DesreveR | why does $foo=`prog`; not work ? | 21:48 | |
and is there a alternative ? | 21:49 | ||
wolverian: found the error - it uses the module keyword, where it should use the class keyword | 21:55 | ||
wolverian | qx(prog) works, I think.l | 21:56 | |
s,\.l,., | |||
DesreveR | can someone fix the error in File::Find | 21:58 | |
its just making a class of the module, so it works like expected again | |||
Khisanth | ?eval if(1){ my $foo = 1 } say $foo | 22:13 | |
evalbot_8021 | Error: Undeclared variable: "$foo" | ||
Khisanth | phew | ||
luqui | stevan, ping | 23:13 | |
buu | hrm | 23:20 | |
Does the p6evalbot respond to join commands? | |||
luqui | I think so | 23:21 | |
buu | er, how? | 23:22 | |
evalbot_8021: join | |||
luqui | ?join #channel | ||
buu | evalbot_8021: join #buubot | ||
?join #buubot | |||
Er | |||
luqui | I don't think it responds to name, and it might only respond to privmsg | ||
buu | No that worked | ||
But I got the svnbot as well | |||
luqui | heh | ||
wolverian | heh | ||
luqui | so privmsg is a good idea | ||
buu | Not quite what I had in mind | ||
oh | |||
heh | |||
Ah right. | 23:23 | ||
Khisanth | luqui: what happened to the message spamming? :) | ||
luqui | I don't think it spams for ?join, just for ?quit | 23:24 | |
buu | Heh, now how do you make them leave? | ||
luqui look | |||
s | |||
integral | do you want it out of #perl, buu? | ||
Khisanth | ?part ? | ||
luqui | heh... you don't | ||
Khisanth | leave? reconnect? | ||
SamB | luqui: maybe you kick them | 23:25 | |
luqui | that would work | ||
... if you can | |||
integral | if it's #perl, buu, I can kick easily | ||
luqui | ?eval "someone is committing" | 23:27 | |
23:27
evalbot_8021 is now known as evalbot_8023
|
|||
evalbot_8023 | "someone is committing" | 23:27 | |
SamB | ?eval "hello" | ||
evalbot_8023 | "hello" | ||
SamB | ?eval "hello" "hello" | ||
evalbot_8023 | Error: unexpected "\"" expecting operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
SamB | ?eval "hello"("hello") | ||
evalbot_8023 | Error: cannot cast from VStr "hello" to Pugs.AST.Internals.VCode (VCode) | ||
luqui | ?eval ::("say")("hello") | 23:28 | |
evalbot_8023 | Error: cannot cast from VType (mkType "say") to Pugs.AST.Internals.VCode (VCode) | ||
SamB | hmm, I guess that is something like a type error | ||
luqui | ?eval &::("say")("hello") | ||
evalbot_8023 | OUTPUT[hello ] bool::true |