6.2.2 is airborne! | pugscode.org <Overview Journal Logs> | pugs.kwiki.org Set by autrijus on 1 May 2005. |
|||
stevan | mugwump: should I add visibility in MetaMethod as well? | 00:02 | |
mugwump | sure, if you like. I'm not sure what will be "private" on the Class model yet, but no doubt there will be something eventually | 00:03 | |
stevan | ok | ||
and you have it with Assoc in Pugs/Class.hs | 00:04 | ||
mugwump | yep. they're all things tacked onto the class, which can be for private or public use | 00:05 | |
stevan | should we default to Public? or is that not okay? | ||
mugwump | er, dunno. I'd say public by default | 00:08 | |
but that's a language design issue, we're writing a compiler not a language ;) | |||
stevan | ok | ||
I am still barely on the edge of "getting this" :) | 00:10 | ||
Odin- | mugwump: That depends on various things. Like, for instance, sunspot conditions. | 00:17 | |
mugwump | well, the position of the moon is more significant. but yes sunspots affect it. | 00:18 | |
it's the third of the month! still a good time to be planting new ideas | 00:19 | ||
stevan | mugwump: BTW - does it look like I got (? MetaClass A, B | A.clsSuper = B ? A ? B.clsSubClasses) right? | 00:21 | |
mugwump | ok, well that mutator can't remove the superclass entirely | 00:23 | |
stevan | mugwump: doh! i didnt even think about removing | 00:24 | |
mugwump | and neither can the subClasses one remove subclasses etc. | ||
stevan | so if I change the superclass i need to remove it from the list of subclasses | ||
mugwump | yes. In general, when you change the members in an association that has a "companion"... | 00:25 | |
you need to send a message to the objects removed to remove self, and a message to the new objects to add self | |||
stevan | ok, actually I think once I refactor subclasses to be a hash (and get our "set") that might not be too bad | ||
mugwump | Having a "Set" class as a primitive makes this a lot easier than doing set operations with hashes | 00:26 | |
stevan | true | ||
mugwump | I had a look at the hash tests, they don't seem to test hashes with object keys | ||
stevan | our objects are still strings | 00:27 | |
so we can get away with hash for now | |||
mugwump | a Set is just a Map with no values, whereas a Hash is a Map with string keys | ||
stevan | eventually when we have real object, then we can refactor into a proper set | ||
mugwump | oh true didn't consider that :) | ||
stevan | mugwump: ok, subclasses are now stored in hashes | 00:31 | |
%self<subclasses>{$subclass} = undef; | |||
at this point all it does is avoid duplicates | |||
mugwump | ok | 00:33 | |
stevan | should I be checking anything else when I add the subclass? I already check to make sure the superclass of the subclass is the class | 00:34 | |
putter | I'm trying to understand a regexp test case m:words/.../. Has anyone heard of a ! ("shriek") modifying the interpretation of adjacent whitespace? | 00:35 | |
stevan | let me commit so you can see it | ||
mugwump | perhaps check that it doesn't make a loop | ||
stevan | so that my subclass is no a superclass of my class | 00:36 | |
s/no/not/ | |||
putter | As in ok( "abc! def" !~ m/abc! def/, 'Literal post-shriek nonmatch' ); | ||
and ok( "abc!def" =~ m:words/abc! def/, 'Word nonspace post-shriek nonmatch' ); | 00:37 | ||
mugwump | putter: according to S05, ! negates the meaning of a <> section, and makes it zero width. maybe the person who wrote the test mis-read the synopsis, or was basing it on a mailing list post that hasn't been incorporated into the synopses. | 00:38 | |
putter | Both odd, and the last not even matching its own documentation. Perhaps its an historical artifact, but I havent turned up discussion. | 00:39 | |
mugwump | then remove it. It can lie forever in peace in the version control system :) | 00:40 | |
putter | mugwump: thanks. Ok, I think I'll just comment it out, rather than pursuing detective work into the Perl6::Rules implementation. | ||
stevan | mugwump: no loops (although that only applies to one level deep) | 00:45 | |
mugwump: commited and tested loop free (one level deep) | 01:02 | ||
mugwump: should I write something which can check more than one level deep? | 01:03 | ||
more like .isa() would behave? | |||
all this meta-logic is making me hungry, bbiab | 01:05 | ||
mugwump burps loudly | 02:02 | ||
stevan: if .isa() works, enforcing no circular inheritance should be easy | 02:03 | ||
or .clsIsa(), perhaps | 02:04 | ||
meppl | gute nacht | 02:10 | |
stevan | mugwump: ok I will do clsIsa() since we don't have a working .isa() | 02:12 | |
mugwump: BTW - changing superclasses now removes the inv from the old super classes subclasses | |||
try and say that 10 times fast :P | |||
mugwump | mmm. That one little axiom sure translates into a lot of code... | 02:13 | |
stevan | thats how these things always go | 02:14 | |
I thought Class::Trait would be simple | 02:15 | ||
but I ended up writing and re-writing it 3 times, and in the end it was almost 1K of code | |||
s/code/LOC/ | |||
mugwump | I've implemented this companion association thing before, in Class::Tangram | 02:16 | |
stevan | I will have to look at that when i get to that part | 02:17 | |
(or you can do it :) | |||
mugwump | That ended up being 1,000 LOC; mostly due to the lack of an inheritance relationship between the four different collection types C::T supports (ref, set, array, hash) | 02:19 | |
(er, C::T in this case meaning Class::Tangram :)) | 02:21 | ||
Class::Traits is like Luke Palmer's Class::Role, no? | |||
stevan | yes and no | 02:22 | |
it is based strictly on the Traits paper | |||
Class::roles was more like the perl6 roles | |||
Ovid actually start it | |||
then ran out of time | |||
and so I took it on | |||
then I found a paper on the formal defintion of traits | 02:23 | ||
mugwump | What do you see as being the fundamental difference between these Traits and Perl 6 Roles, then? | ||
stevan | Roles can have state | ||
Traits cannot | |||
although apparently the newer version of Traits will allow state (according to some of the guys who are working on it) | 02:24 | ||
other than that, most of the differences are minor (at least as far as I remember) | |||
mugwump | (from S12:) | ||
A role may not inherit from a class, but may be composed of other roles. A role doesn't know its own type until it is composed. Any mention of its main type (such as ::?CLASS) is generic, as is any reference to the type of the invocant. You can use a role name as a type, but only for constraints, not for declaring actual objects. | |||
stevan | that is very much like Traits | 02:26 | |
SUPER:: in Traits refers to the super class of the class which implements the trait | |||
mugwump | where "superclass" means "the roles that this thing belongs to" presumably | ||
stevan | no, the $class->SUPER:: | 02:27 | |
basically resolution of SUPER is deferred until the last possible moment | |||
mugwump | "Stevan Little implementated Traits in Perl 5. In his series about the unfolding of the Perl 6 design, Larry Wall, the creator of Perl, gives a description of Roles, the variation of Traits that is planned as a fundamental language element of Perl 6." | 02:31 | |
-- www.iam.unibe.ch/~scg/Research/Traits/, linked from your Class::Traits module :) | 02:32 | ||
stevan | yup :) | ||
i had some interesting talks with some of those guys | |||
they were very interested to know about Perl6 Roles | |||
mugwump | cool. the Object equivalent of lambda calculus is roles-based rather than inheritance-based, too | 02:34 | |
stevan | roles make so much more sense for code re-use too | 02:37 | |
although it is easy to get carried away with over-abstraction | |||
which is basically why I never /actually/ did anything with Class::Trait | 02:38 | ||
mugwump | heh | ||
stevan | mugwump: I have questions about .clsIsa() if you have a moment | 02:44 | |
mugwump | ok | ||
stevan | so if I check the .clsIsa() if a class, i should check it's super, and then the super-super and the super-super-super | 02:48 | |
until I find a match | |||
always checking against the .clsName() | |||
mugwump | may as well be recursive | ||
stevan | yes | ||
ok, so I thinking about this correctly then? | 02:50 | ||
and should it be | 02:51 | ||
$inv.clsIsa('Class Name') or $inv.clsIsa($class) | |||
mugwump | I think so, yes | 02:52 | |
stevan | or both? | ||
mugwump | either? :) | ||
stevan | LOL | ||
cognominal | $ pugs /tmp/roundtrip.p6 | 05:01 | |
No compatible subroutine found: &eval_parrot | |||
what I should do to get that to execute? | |||
mugwump | did you install libparrot? | 05:16 | |
f0rth | nmake win32 pugs failed for hours, src/Pugs/Types/Hash.hs:83:45: Couldn't match `Maybe' against `[]' | 05:25 | |
mugwump | have you run `make clean' recently? | ||
might be waving a dead chicken, but worth a try... | |||
f0rth | I've svn up a clean one | 05:26 | |
mugwump | I only say that because someone was mentioning build weirdness with that file earlier | 05:30 | |
cognominal | pugs -e 'my &say = sub { *say("toto") }; say "tutu"' | 05:39 | |
this loops... | |||
I thought that would call the lexical &say that would itself call the global &say | 05:40 | ||
mugwump | night all! | 05:42 | |
gaal_ | mugwump, oh, i just wanted to ask you a quick question :) | 05:43 | |
cognominal | more like the morning here :) | ||
gaal_ | in Hack::Instances, shouldn't there be a global counter for instance ids as well as some randomness? | ||
pasteling | "gaal" at 192.115.25.249 pasted "good morning, the build is broken" (7 lines, 283B) at sial.org/pbot/10032 | 05:44 | |
gaal_ | oh, it's been noticed, sorry. | 05:45 | |
just backlogging | |||
System.Posix.Env.getEnv and System.Environment.getEnv have different signatures. | 05:54 | ||
f0rth, what platform are you on, windows, right? | 05:55 | ||
f0rth | gaal_: windows 2000 | 05:57 | |
gaal_ | yeah. i'm attempting a fix. | ||
theorbtwo | Define a function in Pugs.Compat that always has the right signature. | 06:05 | |
gaal_ | yes, that's what i'm doing. | ||
Trying to figure out how to transform IO String to IO (Maybe String) | |||
clues welcome :) | 06:06 | ||
theorbtwo | do {foo <- thingReturningIOString; return Just foo} | ||
gaal_ | fixed in r2917. | 06:26 | |
06:38
castaway_ is now known as castaway
|
|||
hachi | I see that the syntax docs for p6 say : cannot be used as a quote delimiter "since it will always be taken to mean something else regardless of what's in front of it.", wouldn't q:::string: be a clear (to the interpreter anyways) way of delimiting 'string' ? | 07:11 | |
maybe there's some usage of : that I'm missing in that context, but as I'm reading all of this the third : has to be the delimiter, where am I going wrong? | 07:12 | ||
Juerd | hachi: It's technically possible, but requires huge workarounds and blurs a lot. Is being able to do this worth such a sacrifice? | 07:14 | |
hachi | no, but the language design docs say there is some reason to which it cannot be done | 07:15 | |
the most likely thing then is that I'm missing some usage of : in string quote context, and I would like to know what it is | |||
Juerd | It can't be done with a single : | 07:16 | |
hachi | of course, but that's not what it says | ||
Juerd | A single character is what works for all other characters. | 07:17 | |
(that are valid) | |||
And it's rather stupid to *assume* exceptions, IMO | |||
hachi | hey, all I'm looking for is either the docs to be wrong, or me to be missing something... personally I think the latter is far more likely. You are saying that it's the former though? | 07:18 | |
Juerd | You're missing that the documentation is the specification | 07:19 | |
If it says something cannot be done, and there is no technical reason for that, then it is *declaring* that it cannot be done. | |||
hachi | but if you read my quote, it says there is a reason... but it doesn't say what | 07:20 | |
Juerd | I think you can safely assume that the reason is keeping people from having to learn weird exceptions. | 07:21 | |
hachi | "it will always be taken to mean something else regardless of what's in front of it." -- Okay, assuming true, what does a third : mean in quoting syntax? | ||
syntax error? | |||
Juerd | I hope so! | ||
In fact, q:: is a namespace, so at that point it's already no longer q// | 07:22 | ||
hachi | ahh! | ||
see, that's what I was looking for | |||
not your opinion | |||
Juerd | I'm truly amazed. | ||
hachi | sorry, I need to not be an ass... bad start | 07:36 | |
07:44
chady_ is now known as chady
|
|||
gaal_ | what unicode terminal fonts are you folks using? I want one that has, for example, ?. (recently seen in MetaClass.pm) | 08:00 | |
Corion: ping | 08:22 | ||
11:53
chady is now known as chady_
|
|||
kolibrie | autrijus: I'm always getting true for rules when using embedded parrot, but they work correctly when not embedded | 12:22 | |
Limbic_Region | salutations all - anyone mind giving me an edumacation on binding := ? | 12:42 | |
I got a blast from the past email from someone who recognized my name on the p6.Language list | 12:43 | ||
they sent me an email as they didn't want to appear "stupid" on the list | |||
when taking a reference to a subroutine as in my $s_ref = \&foo; | |||
they wanted to know why wouldn't (or perhaps couldn't) that be my $sub := foo(); # or something like that with the binding operator | 12:44 | ||
oh good, perhaps gaal_ will have the answer | 12:45 | ||
stevan | Limbic_Region: $sub := foo() would bind to foo()'s return value | ||
Limbic_Region: you would want $sub := foo; | |||
Limbic_Region | nope | 12:46 | |
he wanted $sub := foo() | |||
gaal_ | the gaal that has an underscore tucked to his name is not the true gaal. | ||
Limbic_Region | at least I think he did | ||
stevan | gaal_: what have you dont with the real gaal | ||
Limbic_Region | let me expand the question a bit further | ||
stevan | Limbic_Region: the () implies execution though | ||
Limbic_Region | right | ||
12:46
gaal_ is now known as thetruegaal
12:47
thetruegaal is now known as gaal_
|
|||
Limbic_Region | foo returns a sub ref itself | 12:47 | |
which is a closure over a static variable | |||
stevan | ah | ||
then I would expect $sub := foo() to work then | |||
Limbic_Region | he want's $variable to always be the value of the static variable inside foo | ||
only it won't | |||
since the return value isn't actually the static variable | 12:48 | ||
stevan | hmm,.. it won't in pugs? or perl6? | ||
Limbic_Region | it is an anon sub that when executed returns the static variable | ||
stevan | ah | ||
Limbic_Region | so now that I understand - I can explain it to him (and encourage him again to ask on list since it is obviously a good question) | ||
stevan | sounds like insanity to me :) | ||
gaal_: ping | 12:49 | ||
integral | hmm, why are src/Pugs/Types/* not modules? | ||
stevan | integral: perl6 modules ? | 12:50 | |
integral | sorry, I mean Haskell modules. They're just #include'd into Pugs.AST | ||
stevan | integral: no idea, autrijus is best to answer that | 12:51 | |
integral | hmm | ||
autark-jp | module dependency maybe? | 12:52 | |
integral | maybe, I do know at one point there was a AST.hs-boot | ||
it's just that it makes Pugs.AST a right pain to compile optimized for me | |||
stevan | integral: yes there was an AST.hs-boot | ||
integral: what would be involved in doing that? | 12:54 | ||
integral | doing what? | ||
stevan | changing src/Pugs/Types/* to modules | ||
integral | hmm, depends how many circular dependencies there are :-) | ||
stevan | you can always try it, if you have some time | 12:55 | |
integral | *nod* | ||
gaal_ | stevan, pong, but i really have to go now for a few hours :( | ||
& | |||
stevan | gaal_: just wanted to say Hack::Instances/Perl::MetaClass is mugwump's model and my code,... so any questions you can refer to me | ||
gaal_: and the reason I dont use a global counter as well as the rand() is that rand() seemed to work fairly well | 12:56 | ||
I created a 10000 key hash and found no dups | 12:57 | ||
jabbot: seen mugwump | 13:46 | ||
jabbot | stevan: mugwump was seen 8 hours 3 minutes 34 seconds ago | ||
pmichaud | good morning (afternoon, evening) #perl6 | 14:33 | |
kolibrie | pmichaud: good morning | 14:34 | |
pmichaud | hey, can someone briefly tell me what format pugs generates that is executable by parrot -- i.e., does it output PAST or PIR or ...? | 14:35 | |
iblech | PIR | ||
pmichaud | is it easy to locate the PIR generator? | ||
iblech | src/Pugs/Compile/Parrot.hs | 14:36 | |
pmichaud | excellent | ||
many thanks | |||
PerlJam | greets pm | 14:37 | |
pmichaud | greets, pj | ||
PerlJam | Are you working on the first stab p5 RE parser or the glob parser that you mentioned in your email to p6[cl]? | 14:38 | |
pmichaud | pj: at the moment, no -- I'm working on a shift/reduce expression parser | ||
w/operator precedence :) | 14:39 | ||
PerlJam | pmichaud: geez ... next thing you know, you'll be working on a perl6 grammar ;) | ||
pmichaud | It's likely I'll be evaluating P6 expressions by the end of the week | ||
I already have the operator tables and precedence handling working | 14:40 | ||
autrijus | yo. | 14:41 | |
pmichaud | so, it's just a matter of generating the resulting executable code (thus my question about PIR vs. PAST) | ||
PerlJam | wow. Didn't you start just yesterday? | ||
autrijus | pmichaud: I'm not sure PAST is in anywhere near usable | ||
pmichaud | autrijus: I agree with you -- I just wanted to verify it | ||
autrijus | pmichaud: I think though, it may make sense to simply represent PIR idioms as objects | ||
pmichaud | autrijus: I remember you were targeting PAST (however briefly) at one point and so I was going to follow suit | ||
autrijus | and build a bottom-up ast out of it | 14:42 | |
at least that's what I'm trying to do with PugsAST->PIR | |||
by re-using the interpreter logic in a compiler setting | |||
pmichaud | well, I need to get just a bit farther on the expression parser and then I'll be looking at codegen in more detail :) | 14:43 | |
autrijus | sure :) | 14:44 | |
btw, parsec's behaviour of addming a <commit> by default has been useful | |||
i.e. it greatly speeds up parsing | |||
pmichaud | yup | ||
autrijus | however, there are some corner cases eg with | ||
(int => 3) | |||
where you need to basically lookahead to => as part of identifier/unary function token) | 14:45 | ||
I'm handling them with explicit lookAhead calls... not sure if there's a cleaner way out of this | |||
pmichaud | yeah, I'm not sure there's a clean way out either | ||
autoquoting is indeed a pain | |||
autrijus | yeah | 14:46 | |
pmichaud | however, in my case I have the text immediately available, so when I see a => I can probably easily manipulate the operand/operator stacks and fix them as if we knew it was a quoted term beforehand | ||
that shouldn't be too difficult | 14:47 | ||
autrijus | true, but you need to check that the left hand is an identifier-like too | ||
~ => 3 # syntax error | |||
if => 3 # works | |||
pmichaud | that actually makes it easier :-) | ||
autrijus | mm, nod | 14:48 | |
oh btw. any chance you know what should this print? | |||
say (split /(..)*/, 1234567890); | |||
sproingie | i havent kept up with apocalypses. is => still a stringifying comma or does it make pairs now? | ||
autrijus | sproingie: pair | ||
er, I mean | |||
PerlJam | sproingie: both | ||
autrijus | say (split /(..)*/, 1234567890).perl | ||
pmichaud | => is a pair constructor | ||
PerlJam | sproingie: => makes a pair with its LHS stringified | 14:49 | |
autrijus | i.e. quantified captures in split// | ||
pmichaud | autrijus: no, I don't know what it should do | ||
autrijus | ok. pugs currently flattens each nested match | ||
so '12', '34' etc | |||
I'll ask p6l | |||
pmichaud | that seems reasonable | ||
but yes, we need to re-examine split in light of the capture semantics | |||
sproingie | PerlJam: do those still automagically interpolate as lists? i still sometimes chain them, foo => bar => 123 | ||
autrijus | that is (foo => (bar => 123)) | 14:50 | |
i.e. think => as consing | |||
stevan | sproingie: nested pairs :) | ||
PerlJam doubts that nested pairs will flatten | 14:51 | ||
pmichaud | there's nothing to flatten there :-) | ||
PerlJam | pm: if you say @foo = a => b => 1, does @foo get ('a','b',1) or ('a', Pair('b',1)) | 14:52 | |
sproingie | hm. not quite what I was used to. then again i've largely stopped doing the chaining thing | ||
PerlJam | ? | ||
pmichaud | pj: neither | ||
@foo gets Pair('a', Pair('b', 1)) | 14:53 | ||
PerlJam | er, that's what I meant ... | ||
stevan | sproingie: we have all abused the "fat comma" to some degree, I am very guilty of it myself | ||
pmichaud never abused the fat comma :-) | |||
stevan | pmichaud: you can admit it, we are all friends here :) | 14:54 | |
sproingie liked the stringifying aspect. harkened back to barewords, but in a safe sort of way | |||
PerlJam | I think Abigail is one of the people who is going to jump ship rather than use perl6 He abuses all sorts of features :) | ||
autrijus finds stevan's metamodel work fascinating | |||
sproingie: use <> to stringify now :) | |||
stevan finds autrijus *work fascinating | |||
sproingie | oh i'm going to hate perl6. and love it. and oscillate madly between the two states. | ||
autrijus | PerlJam: Abigail will love [.] | ||
[.] is da bomb | |||
sproingie | i already have that relationship with perl5, just not quite as passionately | 14:55 | |
stevan | sproingie: passion is good :) | ||
pmichaud | perl 6 has lots more to love and hate, that's for sure :) | ||
stevan | autrijus: [.] is folding right? like foldl and foldr? | ||
sproingie | my swing with python is even flatter. it does what it does and nothing more or less | ||
occasionally it surprises me, but rarely | |||
autrijus | stevan: no, reduce() is folding | 14:56 | |
stevan: [.] is folded method call | |||
stevan | ooooh | ||
autrijus | [.] $a, $b, $c | ||
means | |||
($a.$b).$c | |||
PerlJam | sproingie: so ... what do you think about guido's desire to make The One True Way list comprehensions? | ||
sproingie wonders how far he can stretch the romantic metaphors. lisp: unrequited love, it just won't love him back | |||
stevan | autrijus: damn thats nice :) | ||
sproingie: Lisp just gives you lots of hugs (), but no real love | 14:57 | ||
sproingie | PerlJam: i think he has no understanding of higher order functions. of course, python's lambda made that obvious. doesn't he want to get rid of that too? | ||
PerlJam | I believe he does | ||
sproingie | list comprehensions are great. show me how to compose a list comprehension as a function | ||
they're a literal syntax. literals also need a functional equivalent | 14:58 | ||
osfameron_ | what's the difference between a comprehension and grep/map ? | ||
PerlJam | osfameron_: syntax :-) | ||
pmichaud | Is there an option to pugs to see the PIR it generates? | ||
sproingie | i would get that kind of prickly from lisp when i discovered my favorite feature was a macro | ||
stevan | aren't compressions usually lazy? | 14:59 | |
sproingie | so the only way to extend it was with another macro | ||
osfameron_ | PerlJam: cool, I was worried I'd missed something... | ||
sproingie | now python's generator comprehensions are something interesting | ||
autrijus | pmichaud: yes... | 15:00 | |
$ ./pugs -CParrot -e 'say 123'; cat dump.ast | |||
pmichaud | perfect, thanks | ||
(I know, I should probably rtfm, but...) | |||
autrijus | np :) | ||
PerlJam | I think guido is trying to take a page from perl by introducing any() and all() too (I believe he did that in the same message where he announced the demise of reduce/filter/etc) | ||
autrijus | yeah, there's this pugs -h :) | ||
sproingie | PerlJam: i'll give him credit for removing the rather broken reducee | ||
autrijus | pmichaud: the compiler backend is a mess, though. I eagerly awaits your codegen design :) | ||
sproingie -e | 15:01 | ||
pmichaud | autrijus: me too :-) | ||
PerlJam | pm: Around here, I think it's usually that you need to wtfm rather than rtfm ;) | ||
autrijus | isn't it good that tfm is rw :) | ||
PerlJam | autrijus: indeed | 15:02 | |
stevan | :D | ||
autrijus | pmichaud: want committer bit? :) | ||
(so that tfm can be rw) | |||
pmichaud | autrijus: thanks, but not yet | ||
PerlJam | autrijus: When this is all done, you should write a little paper about the experience of handing out committer status so liberally. | ||
pmichaud | right now I'm working more on wtfc than wtfm :-) | ||
integral wonders why AST.hs #includes Type/*.hs | |||
autrijus | integral: because .hs-boot is a greater evil than #include | 15:08 | |
integral | it is? Having to maintain it? | ||
autrijus | that, and it triggers all sort of weird ghc bugs. | ||
integral | ah. | ||
autrijus | lots of "impossible"s | ||
integral | I'm looking at splitting some of the bigger files up a bit so GHC doesn't eat quite so much of my swap | 15:09 | |
autrijus | so it ends up requiring razing src and rebuild | ||
integral: I'd very much appreciate AST.hs refactoring | |||
I've started by putting simple things to Types.hs | |||
integral | ok, cool :-) | ||
autrijus | but the codep is too strong :) | ||
you're welcome to put even more things into Types.hs or AST/* | |||
integral spots some easy targets like naturalOrRat | |||
autrijus | easy? :) | 15:10 | |
integral | no cyclic dependencies ;-) | ||
autrijus | true :) | ||
please be bold :) | |||
and refactor mercilessly | |||
integral switched to svk too | |||
autrijus is happy that s/// and // Just Works now | |||
integral | svk++ | ||
autrijus | it really feels like writing perl :) | ||
pmichaud++ | |||
pmichaud | I'm glad it actually works :-) | 15:12 | |
osfameron_ | it's always nice when that happens ;-) | ||
kolibrie | it works for me not embedded, but all matches evaluate to true with PUGS_EMBED=parrot | 15:15 | |
autrijus | kolibrie: really. | 15:16 | |
1 ~~ /2/ | |||
is true? | |||
kolibrie | yes | ||
autrijus | latest trunk? | ||
kolibrie | checked out latest parrot and pugs about six hours ago | ||
ingy | hola | ||
autrijus | kolibrie: oh. that's ancient! | ||
try pugs trunk again :) | |||
(parrot side doesn't matter) | |||
yo integral | |||
er | 15:17 | ||
yo ingy | |||
kolibrie | autrijus: ok, I'll try again | ||
ingy | hi autrijus, how are classes coming? | ||
autrijus | ingy: stevan is doing most of the work | ||
ingy | cool | ||
btw, I looked at LectroTest but couldn't get excited about it yet... | 15:18 | ||
autrijus | alright :) | ||
ingy | how is rules coming? | 15:19 | |
autrijus | ingy: completely supported. | 15:20 | |
kolibrie | autrijus: PARROT_PATH goes to parrot directory, or parrot/src? | ||
autrijus | well, as complete as PGE | ||
ingy | ! | ||
autrijus | which is quite complete. | ||
kolibrie: src | |||
ingy | are you doing native support? | ||
autrijus | yes. | ||
er, wrong window | |||
or external parrot | |||
that works too | 15:21 | ||
jhorwitz | autrijus: i'm working out a new parrot/embed.h for leo. for now i'll add prototypes used by mod_parrot and pugs, and add public APIs where necessary. did you have any other ideas before i start? | 15:22 | |
autrijus | no | ||
that's pretty good | |||
jhorwitz | okay then. | 15:23 | |
autrijus | kolibrie: I see what you mean. fixing | ||
kolibrie | autrijus: hovering mid air... | ||
Juerd | kolibrie: I'm guessing you're dutch | 15:24 | |
kolibrie | Juerd: ik kan wel nederlands, maar ik ben amerikaner | 15:25 | |
Juerd | kolibrie: Then why the dutch nickname? :) | ||
ingy | Juerd: I'm gueesing you're dutch | ||
Juerd | And "amerikaan" :) | ||
("amerikaner" I think is afrikaans for american) | |||
kolibrie | Juerd: it's been a while since I was there | ||
Juerd | ingy: I'm not from this planet | ||
ingy | Juerd: I lay corrected | 15:26 | |
kolibrie | Juerd: I wanted a nick I could probably get anywhere - and it seems to work -mostly | ||
Juerd | kolibrie: heh | ||
kolibrie | Juerd: if I go back six generations, I'm from Borssele, Zeeland | 15:27 | |
Juerd | Ah, nuclear powerplant city | 15:29 | |
kolibrie | lots of windmills, too | ||
and that's about it | 15:30 | ||
autrijus | kolibrie: fixed. enjoy! | 15:41 | |
lumi | Morning | 15:43 | |
autrijus | yo. | ||
kolibrie | autrijus: ok, pulling now | 15:44 | |
lumi | Should non-exhaustive patterns ever happen? | 15:45 | |
Juerd | lumi: Not with normal non-code syntax | ||
lumi: []* should be finite, even though there's a big bunch of nothingness matchable. | 15:46 | ||
(That's (?:)* in Perl 5) | |||
lumi | Hmmm | ||
Juerd | svnbot6++ | ||
lumi | Allow me to recontextualize, and berate myself for assuming waaay too many things | ||
Juerd | lumi: We couldn't forbid you even if we wanted. | 15:47 | |
lumi | Should pugs die with a "non-exhaustive patterns in lambda" ever? | ||
Specifically, '"foo" ~~ :foo' | 15:49 | ||
I'm not sure what it should be doing, but prolly not dying with that? | |||
theorbtw1 | lumi: No, it should never die like that. | 15:52 | |
15:55
theorbtw1 is now known as theorbtwo
|
|||
Corion | gaal: pong # heh | 15:55 | |
autrijus | lumi: write a test :) | 15:59 | |
PerlJam | Would the :foo in lumi's example be a modifier on ~~ or just an error or what? | 16:01 | |
PerlJam votes error | |||
autrijus | obvious an error | 16:02 | |
PerlJam | nothing is obvious to me anymore in perl6. | ||
;-) | 16:03 | ||
man ... my parrot compile is just zipping along while the pugs compile seems stalled. | |||
Corion notes that the build worksforhim | 16:04 | ||
lumi | Ehm, anyone have p6 syntax for vim? | 16:05 | |
autrijus | lumi: util/perl6.vim | 16:06 | |
Corion | Does anyone know who changed the signature of getEnv from getEnv :: String -> IO String to getEnv :: String -> IO (Maybe String) ? | 16:07 | |
iblech | lumi: There's util/perl6.vim, but I prefer the Perl 5 syntax highlighting over perl6.vim | ||
PerlJam | Corion: svn blame will tell you | ||
integral | hmm, I don't think it was me | ||
Juerd | For Perl 6, I don't use syntax highlighting | ||
Corion | PerlJam: I don't know which file to look at. Gaal fixed it in src/Pugs/Compat.hs, but I don't know what prompted that change. | ||
wolverian | Juerd: why not? | 16:08 | |
lumi | Ack, I'll write it later, gots go | ||
Juerd | They first need to figure out a way to make %foo{"bar%baz{"quux"}"} and /foo { /bar/ and fail }/ look good. | ||
kolibrie | autrijus++ embedded parrot evaluates matches nicely | ||
and s/// works awesome, too | 16:09 | ||
thank you | |||
autrijus | kolibrie: np | 16:11 | |
kolibrie: and it's actually not slow :) | |||
wolverian | Juerd: I think you'll need perl6 integration in vim for that. | 16:12 | |
kolibrie | autrijus: yep, seems pretty zippy | 16:13 | |
autrijus | hmm :p6do in vim | 16:14 | |
Corion | How do I convert IO String to String ? GHC complains that liftIO is not in scope - where would I find it or what should I use instead? | ||
autrijus | not hard really | ||
Corion: you do it by using <- | |||
liftIO can be imported with Control.Monad.Trans (liftIO) | 16:15 | ||
Corion | autrijus: D'oh ... I've done it so often, but still don't remember ;) | ||
Now it at least compiles :) | |||
kolibrie | could p6 grammars be used to define syntax highlighting - then highlighting could be perfect | 16:16 | |
autrijus | kolibrie: not sure vim likes that | ||
but sure, write a p6rules or parsec -> vimsyntax compiler! | 16:17 | ||
glory is yours! | |||
kolibrie | autrijus: it is a little different from the current .vim format | ||
ah, the challenge | |||
maybe | 16:18 | ||
meppl | guten abend | ||
Corion | autrijus: Should Compat.hs be split up into Compat.hs and Compat.Win32.hs ? I'm hacking in more and more Win32 specifics in the non-PUGS_HAVE_POSIX part ... On the other hand, nobody has complained yet ... | 16:19 | |
autrijus | Corion: I'm pretty sure the only nonposix is win32 ;) | ||
but if you want to refactor, that is fine by me too | 16:20 | ||
Corion | autrijus: Ah, wait until we need to port to Symbian, CE and V;S ;) | ||
err - VMS | |||
But I'll postpone refactoring until then | |||
;) | |||
putter | Status update: I'm currently banging on Perl6::Rules t/*.t. Early "post"mortem - blech. Substantial rewriting was needed, not just to convert p5 to p6 (expected), | 16:21 | |
but because the regexp dialect was very outdated (unexpected:). Perhaps t/rules/Disabled should have been done first. Or brand new tests written. | |||
autrijus | putter: btw, t/perl6.t is almost there now (from Disabled) | ||
been working at it | |||
Corion | Oooo - svnbot6++ # showing the comitter | ||
wolverian | svnbot6-- # said 2931 twice | 16:22 | |
putter | autrijus: good to know. sorry - I should have followed your suggestion and done that first. | ||
Corion | Oh. And BTW, GHC is _very_ picky when linking DLL symbols - the case must match exactly. | ||
wolverian: But two different lines from the comitt message, so that's OK | |||
BTW, any other Win32 users here with a specific feature they are missing? I'm mostly working on implementing the Win32 equivalents of what POSIX provides, but maybe somebody can tell me a better thing to focus on ;) | 16:23 | ||
wolverian | Corion: no, he said the same two lines at 19:05 | 16:24 | |
iblech | wolverian: That's because autrijus' commit log was a multi-line message (it'd be simple to display the author and revnum only in the first line of each commit, but then we'd lose horizontal alignment) | ||
wolverian | same to iblech. | ||
I can paste them if you want. :p | |||
Corion | wolverian: We trust you there ;) | ||
wolverian | that was.. 19 minutes ago. | ||
osfameron_ | Corion: would be great if threads/forking abstraction works well on Win32 | ||
integral believes wolverian ;-) | 16:25 | ||
wolverian | OH FOR THE LOVE OF GOD | ||
:( | |||
Corion | osfameron_: Ugh. That part is with GHC ;) | ||
iblech | wolverian: You're right... Shouldn't happen | ||
Corion | osfameron_: Threads work, and forking never will. | ||
osfameron_ | Corion: yeah, and it's a biggy... | ||
wolverian | iblech: yay! | ||
iblech | And svnbot6 showed the two commits in reverse, strange | 16:26 | |
Corion | And personally, I'll never touch fork emulation. It doesn't work with Perl5 and it won't with Perl6. | ||
iblech is investigating | |||
putter | Before I go back and build pugs embedded, does anyone recognize: pugs> "a" ~~ /a/ | ||
pugs: waitForProcess: interrupted (Interrupted system call) | |||
? | |||
integral | *blink* it did it again! | ||
Corion | putter: What platform? Sounds like your Pugs got sent a signal... | ||
Looks like weird polling logic to me - it seems to use a sliding window instead of checking off stuff as "seen" and not posting it again. | 16:27 | ||
putter | Corion: x86_64, parrot HEAD, nonembedded, | ||
autrijus | jhorwitz: I want warnings and error control | ||
jhorwitz: i.e. warnings.h should be exported | |||
Corion | putter: I don't recognize x86_64 as OS. | 16:28 | |
putter | Corion: ;), FC3 current | ||
Corion | putter: But it still sounds like Pugs (resp. Haskell) got sent a signal and didn't handle it | ||
putter | Corion: tnx. I'll add it to my stack of potential bugs to check later, and try embedded. | 16:29 | |
Corion | putter: Maybe because the interactive loop of readline/pugs waits for signals... | 16:30 | |
I don't have/use readline | |||
gaal: I've unified your patch with the main (Win32) version of getEnv | |||
iblech | [svnbot6] I understand. It seems svn.openfoundry.org sent the log messages in reverse (once). So, $cur_svnrev was set to the smaller one (r2931). Then, 300s later, svnbot6 looked for new commits, and treated r2932 as new, because $cur_svnref was, at that time, r2931. | 16:31 | |
wolverian | would it be smart to just refuse to decrease $cur_svnrev? | 16:33 | |
iblech | wolverian: I think so. Unfortunately, we can't test easily if this fix works, as svn.openfoundry.org "normally" sends the messages in the correct order | 16:34 | |
wolverian | spoof some packets? :) | 16:35 | |
iblech | Not so easy with TCP ;) -- Fix commited as r2934 | 16:36 | |
Limbic_Region | seen Jonathan | 16:45 | |
jabbot | Limbic_Region: Jonathan was seen 1 days 14 hours 51 minutes 47 seconds ago | ||
Limbic_Region | seen Jonathan_ | ||
jabbot | Limbic_Region: Jonathan_ was seen 6 days 23 hours 37 minutes 16 seconds ago | ||
Limbic_Region | hmmm - I wonder if he knows his nightly binary builds of Pugs for Win32 hasn't worked since the 7th | 16:46 | |
autrijus | _metaperl: | 16:52 | |
www.metaperl.com/talks/p6/hangman-e...lide2.html | |||
the any<> is unescaped | |||
you want < > | |||
_metaperl | oh thanks | 16:53 | |
autrijus | np. great slides btw. | ||
putter | autrijus: Damian's email "Perl 6 rules capturing semantics" which you linked from the Journal is quite useful, and (recently) wasn't in pugs. Should it be? | ||
autrijus | putter: what wasn't in pugs? | ||
putter | www.nntp.perl.org/group/perl.perl6....uage/20985 | 16:54 | |
pmichaud | Damian is working on adding the document to S05 | ||
autrijus | pmichaud: I added some error handling to pge | ||
so perl6.t is running... | |||
/a\N+?c/ | |||
segfaults badly | |||
pmichaud | ...that segfaults? | ||
(is there a "good" segfault? ) | 16:55 | ||
:-) | |||
autrijus | no :) | ||
try it with your demo.pir? | |||
it segfaults both here and there | |||
ajs | should "sub foo($a,$b){...} foo(1,2)" work? I keep getting an error invoking anything I define that takes more than one arg... | ||
pmichaud | indeed it does | ||
okay, working on it | |||
ajs | kill('SEGV',$$) would be a "good segfault" ;-) | ||
putter | ok. it's rather critical for understanding rules. | ||
16:56
Aankh|Clone is now known as Aankhen``
|
|||
pmichaud | if you think it's critical for understanding how to use rules, think of what it was like trying to write PGE w/o it :-) | 16:56 | |
Hmm, I wonder if it's the '?' that's doing it | 16:57 | ||
Corion | r2933 - datenzoo.de/pugs/win2k.html | ||
pmichaud runs a trace | 16:58 | ||
putter | sigh. When doing PUGS_EMBED=parrot, does anyone recognize this one... | ||
pugs> "a" ~~ /a/ | |||
pugs: internal error: adjustor creation not supported on this platform | 16:59 | ||
Please report this as a bug to [email@hidden.address] | |||
? | |||
autrijus | oh wow. | ||
x86 64? | |||
putter | t | ||
autrijus | 6.4.0? | ||
putter | t | ||
autrijus wonders if ghc-cvs helps | |||
but, well, try using external parrot :( | |||
obra | autrijus: broken links in your last journal post | ||
putter | autrijus: re ghc-cvs... could be. would save me always doing +RTS -A500M... | 17:00 | |
autrijus: re external... that was the previous "waitForProcess: interrupted (Interrupted system call)" failure case ;) | 17:01 | ||
autrijus | obra: fixed | ||
autrijus mumbles something about x8664. | |||
autrijus mumbles something about ghc as well | |||
try ghc cvs | |||
and if it fails too, tell them to fix it :) | 17:02 | ||
putter | autrijus: will do. thanks. | ||
putter remembers thinking "_64 porting problems aren't a _problem_, they're an _opportunity_ for writing more patches"... sigh. | 17:04 | ||
er, just before deciding to buy one. | |||
autrijus | /a\N*?c/ segfaults too, but that's the same cause I think | ||
pmichaud | autrijus: /a\N+c/ now fixed, r8046 | ||
autrijus | woot. | ||
pmichaud | oops, | ||
autrijus: /a\N+?c/ now fixed, r8046 | |||
autrijus | pmichaud++ fast | 17:05 | |
pmichaud | forgot a parameter in the minimal match for quantified character classes | ||
(try saying that quickly!) | |||
autrijus | I think I see an infinite loop... | 17:06 | |
pmichaud | in PGE? | ||
autrijus | "a--" ~~ /^[a?b?]*$/ | ||
pmichaud | yes | 17:07 | |
PGE doesn't handle repeats of zero-length subpatterns yet | |||
autrijus | k | ||
Limbic_Region | did anyone change any unlink() code recently? | ||
pmichaud | it's coming -- basically each group has to know to repeat only once if the position hasn't updated | ||
autrijus | but other than that, it's faring quite well :) | ||
(huge numbers of failures still, but hey) | 17:08 | ||
Corion | Limbic_Region: Not that I know of | ||
pmichaud | what sorts of failures? | ||
Limbic_Region | Corion - looking into why a couple io tests are failing (according to your last smoke) | ||
at least 1 I am responsible for | 17:09 | ||
and it worked fine on my box | |||
autrijus | hm | ||
Limbic_Region | does the smoke run in order? | ||
autrijus | this is abysmally slow | ||
"bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ~~ /\NX(\N+)+X/ | |||
PCRE finishes it in 3 seconds | |||
took PGE more than 1min and counting | |||
I breaked it | |||
Corion | Limbic_Region: Yes it runs in order, but unlink on Win32 doesn't want to remove files still held open by the process. | ||
Limbic_Region | Corion - I know | ||
pmichaud | PGE's running unoptimized at the moment. Purpose was to get something that works that we can evaluate :) | ||
Limbic_Region | there is an explicit close before the unlink | 17:10 | |
Corion | Hmmm... | ||
Limbic_Region | and it worked fine on my Win32 build | ||
Corion | Let's wait until the next smoke finishes :) | ||
Limbic_Region | ok | ||
autrijus | I keep seeing | 17:11 | |
SO=.. | |||
what is this? | |||
Limbic_Region | pasm | ||
;-) | |||
pmichaud | it's in quantified ranges code somewhere | ||
must be some debugging trace I put in | |||
autrijus | ok. | ||
theorbtw1 | It's letting you know that your significant other is one dot sort of a full ellipsis. | ||
autrijus | also try feeding this to pge: | ||
rule /^\N**{3..4}(\N+?)$1$/ | |||
it's segfault as well (I think) | 17:12 | ||
pmichaud | works for me | ||
at least as far as compiling the rule | |||
autrijus | try matching it with "foobarbar" | ||
pmichaud | yup, that segfaults | 17:13 | |
mauke | what's \N again? | ||
pmichaud | not a newline | ||
knewt reads the latest in the circular dereference thread and shakes his head | |||
mauke | ah, thanks | ||
_metaperl | let's really get English like: my @basket has <apples oranges bananas> ; | ||
autrijus | knewt: /ignore ;) | ||
_metaperl | my $age is 35; | 17:14 | |
knewt | autrijus: tried joining #perl6 on rhizo for a moment, and found it to exist but with a channel key | 17:15 | |
autrijus | not having anything to do with me | ||
theorbtw1 was wondering earlier... | |||
jhorwitz | autrijus: back from lunch. you need Parrot_warn, etc.? | ||
theorbtw1 wonders what it was that he was wondering earlier. | |||
knewt | yeah. when i saw the error i remembered the channel was actually over here | ||
pmichaud | autrijus: looks like it's a problem with the $ anchor | ||
theorbtw1 | Oh -- would it be possible to emulate the do { ... ; ... ; ... ; } form for non-IO monads in p6 / pugs? | 17:16 | |
; used to be an operator (and thus overloadable), but I think the recent [...] thing got rid of that. | |||
pmichaud | ^\N**{3..4}(\N+)$1 works | ||
autrijus | pmichaud: can you take the SO=.. away as well? | ||
pmichaud | done -- just haven't committed yet | 17:17 | |
autrijus | okie | ||
autrijus waits for pmichaud's commit for a rerun | |||
.pbc++ # cross-platform, requires no recompilation | |||
vm++ # damn good idea | |||
pmichaud | Committed w/o S0=, r8047 | ||
^\N**{3..4}(.+)$1$ works | 17:18 | ||
hmmmm | |||
and rule ^\N**{3..4}(\N+)$1$ works for me now for some reason | 17:19 | ||
Limbic_Region | autrijus - .pbc files work universally but depending on 32/64 bit may need to be re-aligned. The plan was to provide a utility so that you could convert 1 time instead of incurring the miniscule penalty each time it ran | ||
Corion | r2935 - datenzoo.de/pugs/win2k.html | 17:20 | |
Limbic_Region | regardless - transparent to end user | ||
pmichaud | oh, wait, minimal match | ||
Limbic_Region | Corion - still failing | ||
Corion | Limbic_Region: Which one is the test you're looking at? | 17:21 | |
Limbic_Region | t/pugsbugs/io_finalize_part2.t for instance | ||
and t/builtins/io/io.t # which it was modeled after | |||
pmichaud | hmm, another bug in lazy cclasses... | 17:22 | |
autrijus | pmichaud: can we backref to submatch? | ||
Limbic_Region | the weird thing is the test closing the file right before the unlink succedes | ||
pmichaud | autrijus: not yet in PGE | ||
autrijus | k | ||
pmichaud | autrijus: once I have it reasonably embedded with perl one will be able to do $1[0] for a backref to submatch | ||
Corion | Limbic_Region: Hmmm. Interesting ... | ||
pmichaud | (or any other variable name) | ||
Limbic_Region | It worked when I wrote/tested it | 17:23 | |
Corion | Limbic_Region: I guess I'll look if I can put a trace() call into Pugs at the "right" position so I can see if/when the Pugs FileHandle object gets destroyed and if it flushes its buffers... | ||
(although say() should never buffer) | |||
Limbic_Region | Corion - that's not the bug I am worried about right now | 17:24 | |
Corion | Limbic_Region: Which bug is it then? | ||
Limbic_Region | that bug is something I think needs to be fleshed out with Larry and Chip | ||
ok - let me start at the beginning | |||
pmichaud | I bet I'm going beyond the string boundary there | ||
Limbic_Region | I noticed that a filehandle wasn't flushed when the program ended (assuming no explicit close) | ||
autrijus | pmichaud: | 17:25 | |
/[:i a]b/ | |||
why is it bad? | |||
pmichaud | :i isn't implemented yet | ||
Limbic_Region | since I am not sure if p6 and/or parrot is guaranteeing timely destruction - going out of scope isn't necessarily enough to force the flush | ||
pmichaud | none of the case-insensitive things are implemented | ||
Limbic_Region | regardless - program ending should be | ||
so I wrote a test to show it as a bug | |||
pmichaud | because I didn't have anything in Parrot to be able to do case-insensitive matches until this morning :-) | ||
Limbic_Region | but now in addition to that bug, the file is no longer being removed | ||
pmichaud | (oh, I could do a bunch of tolowers, I suspect) | 17:26 | |
Limbic_Region | that is something that *was* working correctly | ||
autrijus | pmichaud: ok. parsefails: | ||
autrijus.org/pge_run.txt | |||
Limbic_Region | Corion - got it? | ||
pmichaud | I don' t have character classes yet either (same reason) | ||
or lookaround | |||
Corion | Limbic_Region: That still doesn't really tell me which test is now failing for you that previously did not. I assume that you are talking about test #4 in t/pugsbugs/io_finalize_part2.t, correct? | 17:27 | |
pmichaud | I can probably get it to parse (but not honor) :i | ||
Limbic_Region | Corion - only 1 of the tests in the file should have failed | ||
now 2 are | |||
the last one should pass but fails | 17:28 | ||
as does the last one in t/builtins/io/io.t | |||
which is also unlinking a file (that has been closed) | |||
wolverian | Limbic_Region: there's a parrot op to force a dod sweep, and you can (if not now, eventually) mark which objects you want to be timely destructed. there is no default timely destruction in parrot, and perl6 doesn't require it | 17:29 | |
Corion | Limbic_Region: Ah. So. I was correct in the presumption that you are talking about test #4 in t/pugsbugs/io_finalize_part2.t . This sounds to me as if Win32::API close() is not called/executed at the "right" time. | ||
wolverian: We are not on parrot. | |||
wolverian | that's a good point. | ||
:) | |||
Corion | wolverian: Of course does Perl6 require it, if you're trying to unlink a file on Win32. | ||
Limbic_Region | wolverian - besides, just because it is possible doesn't mean someone has spec'd what p6 will do | ||
Corion - yes, test4 - which should not be failing now and was not failing in the past | 17:30 | ||
wolverian | I distinctly remember seeing a p6i post with larry saying perl6 doesn't need timely destruction (by default) | ||
Limbic_Region | wolverian - so do I but that was some time ago - he changes his mind you know | ||
wolverian | or on some other mailing list, I guess. | ||
Limbic_Region: true enough. :) | |||
pmichaud | autrijus: what should PGE do when a parse fails? | 17:31 | |
right now it just kinda slops around :) | |||
Corion | wolverian: I don't care what Larry says the default is, but if close() and unlink(); is ever to work on Win32 it will either need special-casing magic or timely destruction/buffer-flushing. | ||
pmichaud | should it return an undef, or as larry puts it, an "interesting" undef? | ||
Limbic_Region | Corion - my mistake, your mind dump of what the problem might be sounded like you were attempting to solve the original problem I wrote the bug test for | ||
we are on the same sheet of music | |||
wolverian | Corion: yes, of course. the objects that need timely destruction should be marked as such. | ||
_metaperl | what does "PGE" mean? | ||
Limbic_Region | I am just wondering why it mysteriously stopped working | ||
pmichaud | PGE = Parrot Grammar Engine | ||
Limbic_Region | Grammar Engine | ||
pmichaud | it's the piece that implements perl 6 rules and string matching | ||
autrijus | pmichaud: I made it throw Exception | 17:32 | |
_metaperl | oh, so if ruby/python compile to parrot, they will be pcre... interesting | ||
Corion | Limbic_Region: Ah. Well, maybe "svn blame" on Prim.hs or src/Pugs/Types/Handle.hs can tell you something. | ||
Limbic_Region | Corion - I am out of the svn/svk game for sometime | ||
no net connection from the new house until at least this saturday and no-go from work | 17:33 | ||
Corion | Limbic_Region: Ow! Well, maybe I find something that either allows us to delete open files or maybe I even find the bug there. | ||
elmex | did someone test parrot/perl6 on HURD ? ;) | 17:34 | |
Corion | Hmmm. Pugs should get Win32::OLE and/or Win32::COM as soon as possible. Maybe GHC provides us with that already? | ||
autrijus | Corion: look at Win32.* | 17:35 | |
I think GHC gets us that already | |||
Corion | autrijus: So Just some glue magic is needed. Plus magic reflection, like $AUTOLOAD. | ||
pmichaud | autrijus: ^\N**{3..4}(\N+)$1$ now works | ||
er | 17:36 | ||
autrijus: ^\N**{3..4}(\N+?)$1$ now works | |||
(I keep forgetting those ?'s) | |||
autrijus | great | ||
pmichaud | now to :i | ||
Corion | Hmmm. Should I give Pugs CreateHardLink() ? That would make Pugs only work on Win2k upwards ... | 17:37 | |
Limbic_Region | Corion - well I am still trying to learn p6 so I can't be much help from the Haskell side | ||
Limbic_Region is just poking people when things don't look right | |||
and attempting to find bugs along the way of his self-edumacation | |||
autrijus | Corion: just go ahead :) let it fail on win9x | 17:38 | |
Corion: oh and it works with ntfs only | |||
Corion | autrijus: It would also fail on WinNT, which is what I have at work ;) | ||
autrijus | with ntfs you can do symlinks on dirs too | ||
I think it can be made to work on winnt | |||
see my cpan modules: | |||
Win32::Hardlink Win32::Symlink | |||
Corion | autrijus: True - I forgot about the non-NTFS part ... | ||
Oh. And Win32 has LZOpen(), LZClose() and LZRead() :)) | 17:39 | ||
autrijus wonders how long it will take to write another 100ish perl6 modules | |||
Corion | ... it's been a long time since I looked through the Win32 API ;) | 17:40 | |
Limbic_Region | autrijus - I was smart, I only wrote 1 public p5 module | ||
won't take me long at all to re-write mine | |||
Limbic_Region is waiting for proper OO though | 17:41 | ||
out of curiosity - are there any examples of doing tied variables? | 17:43 | ||
autrijus | no.. | ||
stevan_ | Limbic_Region: did you see Hack::Instances :) | ||
Limbic_Region | stevan_ (did you see "proper") :P | 17:44 | |
stevan_ | proper? | ||
Limbic_Region | IOW - I am being lazy and making excuses | ||
stevan_ | LOL | 17:45 | |
Hack::Instances is kinda fragile, but your external code should be able to stay (mostly) the same | |||
Limbic_Region | ok so in p6 tied variables will be done with traits right as in my $debbie does Dallas? | ||
stevan_ | the internals will only need re-writing | ||
pasteling | "iblech" at 80.81.4.211 pasted "Limbic_Region: tied scalars are simple" (8 lines, 168B) at sial.org/pbot/10051 | 17:46 | |
stevan_ | anyway, lunch time &' | ||
Limbic_Region | interesting | 17:47 | |
pmichaud | autrijus: [:i a]b now parses | ||
r 8049 | |||
iblech | the Proxy object is specced in S06, IIRC | 17:48 | |
pmichaud | it gets a one-line mention | 17:49 | |
oh, as "Proxy" it's one-line | |||
it's actually covered in more detail at Lvalue subs | |||
Limbic_Region | iblech - I am going to spend some time reading my Perl6::Bible | ||
Limbic_Region needs to spend some more time reading The Bible too | 17:50 | ||
iblech | (BTW, FYI, at freepan.org/repos/iblech/Perl6-Bible there's a fully working p6bible and perl6doc (both written in Perl 6, though perl6doc calls perldoc after having set some %*ENV vars) | 17:51 | |
Limbic_Region | iblech | ||
grrr | |||
iblech plus plus | |||
ninereasons | iblech++ # always making such useful things | ||
Corion | Heh. Looking at the length.t failure, it seems that PCRE doesn't cope well with unicode? | ||
pmichaud | pcre doesn't cope well with unicode in some respects, no | 17:52 | |
Corion | pmichaud: Ah, so then there is no sense in looking into that ;) | ||
iblech | Stevan++ # /me's waiting for a POD::Simple written in Perl 6 :) | ||
pmichaud | well, I've run into problems with pcre and unicode in the past | ||
integral | hmm, what's the word you put after `import` to not import something? | 17:53 | |
Corion | integral: You put "--" before "import" :) | ||
integral | heh. I mean just one function from the module | ||
pmichaud | import "something" but not really; | ||
Corion | integral: import qualified Module.Name | ||
pmichaud | :-) | ||
integral | hiding :-) | ||
Corion | And then you use Module.Name.Function | ||
(or, as I do, localFunction = Module.Name.function) | 17:54 | ||
autrijus | Corion: the fault is mine. sec | ||
Corion: basically the matchFrom and matchTo returned was bytes | 17:56 | ||
Corion: but I'm too tired to fix. maybe you can take a try | 17:57 | ||
it's in Prim.hs line 766 | |||
Corion | autrijus: I'll look at that ;) | ||
autrijus | the key is that the offsets as returned from rv | ||
are in bytes | |||
even though PCRE correctly matches against unicode | |||
i.e. the match is unicode | |||
but the offsets are in bytes | |||
p6 demands that we recalculate offsets in chars | |||
one way to do this is to do the genericDrop etc to cs' | 17:58 | ||
where cs' = encodeUTF8 cs | |||
then recalculate from and len with genericLength of the portion dropped | |||
pmichaud: btw, you were using latin1 << and >> in ascii encoding | 18:00 | ||
pmichaud: so I texanised them | |||
pmichaud | yeah, I noticed that -- no problem | 18:01 | |
autrijus | k :) | ||
pmichaud | I haven't got a good utf-8 editor here | ||
earlier this week I was wondering what encoding we would be using for perl programs | |||
theorbtw1 | At present, pugs /requires/ that the input be utf8. | 18:02 | |
I think that's a very good default. | |||
pmichaud | yes, but there may be a goodly number of editors that cannot edit/display utf8 | ||
we may discover that someone will read a file into an editor and have it become garbage upon save | |||
well, not garbage, but something that perl no longer understands | 18:03 | ||
Juerd must be careful to stay friendly | |||
integral | 7-bit ascii is still a subset of utf-8... | ||
ingy | autrijus: 11:03 < purl> couldn't get the headlines: | ||
wagner.elixus.org/~autrijus/cpan.rdf wasn't successful | |||
Juerd | All ASCII is 7-bit | ||
ingy | is that you? | ||
autrijus | ingy: wagner is offline | 18:04 | |
maybe permanently | |||
Juerd | integral: I think it's better described as: ascii is represented with unmodified bytes in utf-8 | ||
autrijus | be patient while we deal | ||
ingy | ouch | ||
integral | Juerd: true | ||
ingy | autrijus: I'm a Perl programmer, but OK | ||
theorbtw1 | A pure ASCII file is valid utf-8, with identical semantics. | 18:06 | |
(By definition.) | |||
autrijus | pmichaud: yeah. problem is, a parser needs to be two-pass | ||
to accurately accomodate for both utf8 and latin1 | |||
pmichaud | sure, but let's say I grab a file from cpan that has utf-8 characters in it into my non-utf8 editor | ||
autrijus | pmichaud: either that, or allocate a fixsize buffer to guess | ||
pmichaud | or, my editor understands utf-8, and happily converts the utf-8 sequences into iso-8859-1 for me | 18:07 | |
autrijus | pmichaud: the latter is rare | ||
pmichaud: the first is quite possible. | |||
(note that I was against the utf8 form of << >> and Y.) | |||
(mostly because they are not in big5 ;)) | |||
pmichaud | oh, I don't mind the utf8 forms -- I'm just curious how we'll end up dealing with them when it's all said and done :) | ||
autrijus | I still am, but it's part of spec, so I implement the utf8 form. :) | ||
theorbtw1 | pmichaud, if the editor is sane, you'll see two-byte sequences where there should be unicode chars, and if you don't touch them, you'll be fine. | 18:08 | |
autrijus | theorbtw1: the "don't touch them" part is hard | ||
integral | maybe just easier to bail, and print "You have a weird idea of utf-8, run perl6-fix-non-utf-8-encodings" | ||
autrijus | because you may be writing new code. | ||
theorbtw1 | Big5 doesn't have Ā„? That seems like an odd omission... | ||
pmichaud | theorbtw1: yes, I know one can probably get by with simply not touching the "funny looking characters", but I'm sure there will be a lot of programmers who struggle with it for a time | 18:09 | |
autrijus | theorbtw1: it has ļæ„ | ||
pmichaud | for me personally it won't be a problem -- I know about charsets and char encodings :-) | ||
ajs | autrijus: keep in mind that the unicode << and >> are ISO-8859-1 as well as Unicode, which is why Larry suggested them. | 18:10 | |
I don't know of any editor that does not support 8859-1 | |||
pmichaud | yes, but ISO-8859-1 is not utf-8 | ||
ajs | yes.... | ||
pmichaud | so, the parser has to have some idea of what encoding it's seeing when it's reading the file, or we have to decree that all perl programs are utf-8 or something like that | 18:11 | |
autrijus | ajs: notepad on win32, chinese edition | ||
does not support latin1. | |||
I think it's the same for CJK. | 18:12 | ||
also the Yen sign if typed in a JIS keyboard | |||
will become backslash sign \ in ascii. | |||
so I'd be very wary of using Yen sign in latin1. | |||
Corion | autrijus: Does wordpad support anything good? Because notepad.exe also doesn't support unix newlines. | 18:13 | |
autrijus | Corion: the same, I think. | ||
you can use utf8 or codepage | |||
Corion | autrijus: Ugh | ||
PerlJam is *so* glad that Larry is the language designer ;) | |||
autrijus | and the default codepage is not latin1 for CJK people. | ||
(actually you can also use ucs2.) | |||
ajs | If your editor spits out ASCII \ for yen, then I'm not sure there's much we can do for you. I honestly think you're better off writing in your native set and using a special module like "encoding" in Perl 5 (though hopefully better) | 18:16 | |
autrijus | ajs: that's why JPerl :) | 18:17 | |
theorbtw1 wonders how hard it would be to support something like 'use encoding "foo"'. | |||
autrijus ponders ļ¼ļ½ļ¼ļ½ļ¼ćļæ„ćļ¼ļ½ļ¼»ļ¼ļ½ļ¼½ | |||
Corion | PERL6OPT=-Mdecode=... :) | ||
theorbtw1 | autrijus, those are with the fullwidth chars? | ||
autrijus | theorbtw1: right. | ||
theorbtw1: there's no halfwidth "high-bit" special symbols in big5 | 18:18 | ||
ajs | remember that perl5 "encoding" is not sufficient, but hopefully Perl 6 won't have the same problems with unparsable text after the pragma. | ||
autrijus | theorbtw1: all of them are fullwidth | ||
theorbtw1 | Eh, ajs? | ||
kolibrie | autrijus: what font do I need to see those characters correctly? | ||
autrijus | kolibrie: I don't know... arphic maybe | ||
ajs | lemme get the quote from the docs.... | ||
iblech | Hm... it seems P5 regexes, when inside a given { when rx:P5/.../ {...} }, don't capture correctly, but I was yet unable to deduca a test case | ||
kolibrie | autrijus: thanks, I'll try | 18:19 | |
theorbtw1 | /who | ||
Grr. | |||
18:19
theorbtw1 is now known as theorbtwo
|
|||
ajs | Oh nevermind. Perl 5.8.1 fixed the encoding / Big-5 scan-ahead problme | 18:20 | |
er problem | |||
autrijus | right. | ||
iblech | P6 regexes seem to not work, either (when inside a bigger program)... /me continues to investigate | 18:21 | |
kolibrie | autrijus: ttf-arphic-ukai or ttf-arphic-uming or both? | ||
autrijus | pmichaud: hey, is this legal? | ||
rx /foo/ | |||
rx :P5/foo/ | |||
kolibrie: ming may be better | |||
either would do | |||
pmichaud | well, it's going to be rx :perl5 /foo/ | ||
kolibrie | autrijus: ok | ||
autrijus | er, larry hinted that it's changing to :P5 | 18:22 | |
is that retracted? | |||
pmichaud | actually, it was :p5 for some time and then I noticed it changed in the synopsis | ||
autrijus mumbles something about sunspot activity | |||
pmichaud: but anyway. is | |||
rx /foo/ | |||
legal? | |||
pmichaud | yes, why? | 18:23 | |
I'm pretty sure it is | |||
you mean as a statement by itself? | |||
or... | |||
? | |||
autrijus | the space | 18:24 | |
between rx and / | |||
I had it as legal | 18:25 | ||
not terribly sure | |||
pmichaud | S05.pod: $rule = rx :g :w :i / my name is (.*) /; | ||
iblech | autrijus: Both P5 and P6 regexes capture correctly (and promote $1, etc. correctly), but $/ and $1, $2, etc. are not lexical, it seems -- you know that bug? | 18:28 | |
autrijus | iblech: it's a XXX | ||
iblech | autrijus: Ok | ||
autrijus | not really sure how to do that | 18:29 | |
we can let each scope introduce its own $/ | |||
or, only add $/ to the pad when match happens | |||
or, make it effectively a temp() | |||
the last one is easiest | |||
pmichaud | I'd add $/ to the pad when match happens | ||
stevan | iblech: re: POD::Simple, what do you need? | ||
autrijus | pmichaud: right, but runtime pad? | ||
sub foo { m//; return -> { $/ } } | 18:30 | ||
maybe a static analysis at parsing time | |||
pmichaud | yeah, probably | ||
iblech | stevan: Currently, my perl6doc is just a wrapper around perldoc. It'd be cool if we had a pod2man/pod2text in pure Perl 6 :) | ||
autrijus | ok, I'll go with static analysis then | ||
good that eval "m//" will terminate at the "" scope | 18:31 | ||
kolibrie | autrijus: ttf-arphic-uming installed - do I have to restart my terminal, or will characters show up properly if you were to send again? | 18:35 | |
autrijus | kolibrie: ļ¼ļ¼ļ¼„ļ¼ļ¼£Ā² | 18:37 | |
putter | re static analysis: eval("m//") ? | ||
autrijus | putter: eval triggers reparse | ||
putter | k | ||
autrijus | putter: and the scope is in "" | ||
so all's good | |||
I worry about (m// + m//) though. | |||
does the second m// see $/ from the first? | |||
i.e. is the pad creation pushed to statement level? | 18:38 | ||
pmichaud | once a new match is started, $/ is bound to it | ||
autrijus | ok. but what about | ||
pmichaud | i.e., any $/ used in a match refers to the current match object | ||
autrijus | return (->{$/}, m//); | ||
pmichaud | (the one being built) | ||
autrijus | does the $/ bind to the pad created by m// ? | ||
kolibrie | autrijus: hmm. looks different, but still a few missing characters | 18:39 | |
pmichaud | autrijus: I dunno about that one -- I'd have to review my notes a bit | 18:40 | |
putter wonders if "defined $1" sheds any light | |||
Khisanth | $/ is still kicking around in p6? I thought all those punctionation type variables were going the way of the dodo... | 18:42 | |
Corion | Khisanth: $/ is now per =$fh , so I doubt that it's still called $/ | ||
Khisanth | heh $fh./ | ||
how is that for ugly? :) | 18:43 | ||
pmichaud | $/ is the "replacement" for $0 | ||
theorbtwo | $/ in p6 is something completely different from $/ in p5. | ||
autrijus | $fh.irs I think | ||
irs is a weird name. | |||
pmichaud | $/ is the result of the last match | ||
theorbtwo | Reminds me of taxes, autrijus. | ||
Corion | IRS is perfectly fine if you know awk ;( | ||
err - :) | |||
theorbtwo | (The US Internal Revenue Service.) | ||
Corion | (and shell, of course) | ||
clkao | inland revenue! | ||
Corion | Except there it's called "$IFS" :) | 18:44 | |
autrijus | clkao: hey. congrats for svk1.0 | ||
Khisanth | irs conjures too much hatred | ||
clkao | autrijus: thank you! and party! | ||
autrijus: obra is flying over for the party. you can, too! | |||
autrijus | ... | 18:45 | |
I guess I can. | |||
clkao | no, but, have a party in taipei maybe | ||
ha, for sure? it's this thursday | 18:46 | ||
autrijus | like, 48 hours from now? | ||
mmm. challenging | |||
clkao | correct | ||
autrijus | but not infeasible | ||
what's usd$2k among friends? ;) | |||
Aankhen`` | What the...? | 18:47 | |
Notices? | |||
Aankhen`` cries. | |||
autrijus | yeah, a bot written in perl6 | ||
Aankhen`` | msg #perl6 wasn't good enough? | ||
iblech | Aankhen``: The IRC RFC mandates that bots always use /NOTICEs to send stuff | ||
autrijus | oh there's an IRC RFC? | 18:48 | |
Aankhen`` | Sadly, notices are rather annoying. | ||
autrijus | also it's not logged | ||
maybe for the better. | |||
obra | autrijus: frequent flyer miles | ||
Aankhen`` | Anyway, it's cool to hear of the new bot. :-) | ||
iblech | autrijus: Yes, there'is RFC 1459 (from 1991 IIRC), and there're four new RFCs from 2000 (RFCs 2810 - 2814) | 18:49 | |
autrijus | ah. didn't know about the 28xx one | ||
kolibrie | autrijus: did I read that right - 'rule' is now implemented? | 18:50 | |
autrijus | kolibrie: rule{} yes. | ||
kolibrie | very nice | ||
PerlJam | yeah, autrijus++ and pmichaud++ | ||
iblech | Aankhen``: Plus, as there's now a working Net::IRC, writing new bots is very simple :) You may want to look at examples/network/{svnbot,logbot,seenbot}.p6 | ||
Aankhen`` | Will do. | 18:51 | |
autrijus | pmichaud: rules live in their own namespace right? | ||
pmichaud: i.e. you can have a grammar Foo, a rule Foo, a class Foo and a role Foo | |||
pmichaud | I haven't worked out the namespace issues yet | ||
Aankhen`` | I was recently called on to write a bot for someone, so maybe it'll end up being in Perl 6... :-D | ||
Although I dunno. It's not likely they'll be able to run Pugs, since they'll be at the mercy of the server admin. | 18:52 | ||
pmichaud | can we have a class Foo and a package Foo? | ||
PerlJam | modules, classes and packages all share the same namespace I thought | 18:53 | |
pmichaud | if that's the case, then grammars are there too :) | 18:54 | |
PerlJam | er, no pun intended | ||
pm: that makes sense to me. | |||
pmichaud | supposedly, grammar : rule -> class : method | ||
PerlJam | right, so grammar Foo and rule Foo can live peacefully together | 18:55 | |
pmichaud | either that or grammar : rule -> module : method | ||
putter | Re eval... thinking about Ruby's "functions can participate in class declaration" (eg, "has $.foo is rw" is "attr_accessor :foo", | 18:56 | |
where atter_accessor is an ordinary function doing something like class_eval("def foo ...")) | |||
how does one do this in p6? macros? | 18:57 | ||
Juerd | pmichaud: Yes, there can be a class Foo and a package Foo, but they share the same namespace :) | 18:58 | |
iblech | putter: I think has() could be implemented as a macro, yes. Because of BEGIN{}, Perl programs can freely "chat" with the compiler, so a thing like attr_accessor is relatively simple implemented (I think) | ||
wolverian | don't we have a Class.methods.push( { ... } ) or so? :) | 19:00 | |
pmichaud | juerd: in that case I'd say that grammar Foo shares the same namespace as well :) | ||
stevan | wolverian: maybe with the metaclases | ||
pmichaud | a rule is just a funny sort of sub | ||
wolverian | stevan: that'd make sense. | ||
pmichaud | that's certainly the way rules are implemented in parrot / PGE :) | 19:01 | |
putter | iblech: so the next question is whether/how one can modify a class decl at later runtime. In ruby its class_eval or somesuch, in python $class.something_more_specialized_like_define_method... | ||
wolverian | ask p6l? | 19:02 | |
Juerd | pmichaud: I've been wondering the past few days if rules need their own sigils | ||
pmichaud: And perhaps not be called with <...> but be "interpolated" with their sigils, accepting arguments the same way a &sub does | 19:03 | ||
pmichaud | I think it's best to leave them as & and subs | ||
PerlJam | Juerd: no way! | ||
Juerd | PerlJam: Why? | ||
It's a very major, important and omnipresent data type | |||
pmichaud | and the <...> for subrules works extremely well | 19:04 | |
Juerd | pmichaud: Then perhaps, and this may sound horrible, <> should be the sigil :) | ||
pmichaud | syntactically it's almost exactly what we want. In that sense, you could think of <...> as being the rule's sigil :) | ||
Juerd | Outside of rules | ||
putter | Ruby's eval, method_eval, class_eval has been much more flexible than the python equivalents. though apparently they are slated for downgrading (eg, new vars decled in eval have only eval in scope). | ||
pmichaud | no, I much prefer having <...> as the {'...'} replacement | ||
Juerd | If they share namespace, they mustn't clash with ANY other identifier | 19:05 | |
pmichaud: I badly want '' to be {''}'s replacement | |||
pmichaud: And $foo to be <$foo>'s replacement | |||
pmichaud: And "$foo" to be $foo's replacement | |||
It makes everything MUCH cleaner | |||
pmichaud | I'm not sure I agree that it makes everything MUCH cleaner | ||
Juerd | from simple matching, like '(' \w+ ')' to anything involving $foo | ||
autrijus | ok. < is now a sigil in Pugs's pad for rules :) | 19:06 | |
autrijus has been listening. | |||
Juerd | If <> calls rules, then <$foo> should call the rule NAMED $foo | ||
pmichaud | <...> is overloaded with lots of things | 19:07 | |
Juerd | i.e. $key := (\w+) = $value := (<$key>) | ||
pmichaud: Yes, and interpolation of strings or subrules doesn't belong there, imo | 19:08 | ||
Certainly literals don't belong in <> | |||
pmichaud | in this instance, you're wanting <$key> to be the rule that was assigned to $key earlier in the match? | ||
Juerd | Oh, damn, I read your {''} as <''> | ||
in rules | |||
For clarity, I want: | |||
<''> => '' | |||
<$foo> => $foo | |||
$foo => "$foo" | 19:09 | ||
pmichaud | you want quotes to be metachars in rules? | ||
Juerd | Yes! Very much! | ||
PerlJam | no way! | ||
Juerd | pmichaud: And <$key> should call <addr> if \w+ matched "addr" | ||
PerlJam: For anything's sake, stop the lame "no way" replies, and bring in some reasoning. | 19:10 | ||
pmichaud | I like <$key>'s current interpretation better | ||
theorbtwo | Hm, I'm not sure I try to match on ' or " in REs any more or less then < and >. | ||
PerlJam | Juerd: sorry I'm talking IRL | ||
Juerd | PerlJam: Then stfu | ||
pmichaud | <$key> treats the value of $key as a subrule to be matched | ||
theorbtwo | In any case, I suspect I'll use p5 REs for simple ones, and p6 REs for complicated ones. | ||
Juerd | pmichaud: To be honest, I don't like <$foo> calling a rule named $foo | ||
pmichaud: But I *hate* <''>, $foo and <$foo> as they are right now | 19:11 | ||
pmichaud | what exactly do you hate about them? | ||
Juerd | <''> because every <> matches something dynamic, but this one matches something static | ||
<$foo> because it's ugly and can be $foo if $foo is "$foo", which makes sense | 19:12 | ||
pmichaud | <[...]> isn't dynamic | ||
theorbtwo | <> matches something strange. Trying to match nothing at all counts as something strange to me. | ||
Juerd | That way, you are left with only one literal interpolator: '' and "" | ||
Instead of <''>, <""> and <$foo> | |||
pmichaud | would we do the same for matching arrays and hashes? | 19:13 | |
i.e., "@array", "%hash" ? | |||
Juerd | pmichaud: It's dynamic in the sense that <[a..z]> matches no dot, but one of a, b, c, ... z | ||
pmichaud: "" would follow normal interpolation for q:2 | |||
pmichaud | well, that wouldn't be the same as <@array> and <%hash> then, or @array and %hash as they are now | ||
Juerd | pmichaud: Making "$foo" the obvious way to match $foo literally in the same way that s/.../{ foo() }/ is s///e's natural replacement | 19:14 | |
This all greatly simplifies | |||
pmichaud | except for @array and %hash | ||
gaal_ | good morning. | ||
Juerd | No, those become more clear even | ||
@array now intepolates a disjunction of *rules* | 19:15 | ||
while $string interpolates a *string*, that is matched literally | |||
That's inconsistent | |||
pmichaud | and not true | ||
Juerd | Oh? | ||
pmichaud | @array interpolates a disjunction of strings | ||
theorbtwo wonders if you can do a C< rule :P5 {...} > | |||
Juerd | I see | ||
pmichaud | <@array> interpolates a disjunction of rules | ||
Juerd | Then at least it is consistent | ||
I still don't like it, though. | |||
pmichaud | well, the nice thing about PGE is that everyone can write their own RE syntax :-) | ||
Juerd | And I want '' and "" to be metacharacters because <''> sucks | 19:16 | |
\( \w+ \) is hardly readable | |||
<'('> \w+ <')'> is worse and hard to write as an extra bonus | |||
'(' \w+ ')' is clean, easy to read and write | |||
PerlJam | Juerd: so is <lp> \w+ <rp> :-) | 19:17 | |
putter | is there a reason Internals.hs imports Data.Ratio twice? i thought that was a no-no. | ||
theorbtwo | It is, PerlJam? | ||
Juerd | In a world of readable rules (as opposed to linenoise regexes), I would love to be able to avoid using the backslash to escape to literal interpretation | ||
PerlJam | theorbtwo: It looks clean to me and I found it easy to write :) | ||
Juerd | The same way you don't do $foo = '<' and not $foo = \< | ||
Rules are a language, no longer you should consider them string-like, I'm convinced. | 19:18 | ||
pmichaud | indeed, rules are a language unto themselves. That's why they have their own compiler | ||
PerlJam | Juerd: so ... where's your proposal to p6l? | ||
Juerd | It's also why \( is needlessly ugly | ||
PerlJam: I must read S05 again before I bug p6l. | |||
ajs | Juerd: \( \w+ \) isn't readable? Hmmm... I guess I must be too much of an old-school Unix guy. Looks clean to me. I always loved Perl for cleaning up the \ usage in regexen | 19:19 | |
PerlJam | Juerd: Then I eagerly await your post. At least then I'll have the time to shoot at it appropriately :) | ||
Juerd | PerlJam: And for that I haven't yet had the time. Read logs of this channel to find that I'm pondering this for more than a month now. | ||
ajs: Don't you think '(' \w+ ')' is more readable? | 19:20 | ||
ajs: And what about [email@hidden.address] compared to either of foo\@example\.com and <'foo@example.com'> | |||
Honestly, <''> breaks my fingers. | |||
theorbtwo | Juerd: You're using a sane keyboard layout, right? | 19:21 | |
Juerd | theorbtwo: Yes, dvorak. | ||
theorbtwo: It's *worse* with QWERTY. | |||
ajs | Hmmm... no, because '' is not visually balancing, so '('('('\w+')')')' is REALLY hard to read, even with spaces added appropriately '(' ( '(' \w+ ')' ) ')' where I find \((\(\w+\))\) to be much easier to count up \s | ||
theorbtwo | <'...'> isn't /that/ hard to type. | ||
Juerd | theorbtwo: Oh, yes, it is /that/ hard. | ||
ajs: I disagree. | |||
theorbtwo | Is there a reason not to allow both <'('> and \( ? | 19:22 | |
integral agrees with ajs | |||
Juerd | ajs: But -- my thinking is not that \ should go away. It should stay. | ||
ajs | Juerd: your perogative | ||
Juerd | ajs: And '' and "" should be added to the list of metacharacters | ||
PerlJam | Juerd: I find <''> fine for longish strings, but I agree that it's slightly annoying for one or two char strings. | ||
Juerd: I take it that something like <(> \w+ <)> wouldn't do it for you either? | |||
ajs | I have no gripe with your WTDI. There are cases where it would be clearer | 19:23 | |
Juerd | PerlJam: No, it's better than the <''> thing, but not by far good enough. Besides that, I'd like to pull weird exceptions out of <>, rather than adding even more. | ||
<> is way, WAAY too overloaded in rules. | |||
PerlJam | Juerd: Just like I'd like to have fewer metacharacters rather than more :-) | ||
pmichaud | sometimes it's better to put most of the overloading in one place | 19:24 | |
PerlJam | Juerd: I think the overloading of <> is fine. | ||
Juerd | PerlJam: IMO, anything that is \W can be a metacharacter without trouble, *especially* if '' is added | ||
PerlJam | Juerd: It allows you to escape into yet another sub-genre of the rule language. | ||
Juerd | pmichaud: Yes, certainly. But in my opinion, it is always better to find a way without any overloading at all, if it's within reach and reason. | 19:25 | |
pmichaud | the nice thing about <$file> is that you get a capture in the process | ||
whereas that wouldn't happen with $file | |||
Juerd | pmichaud: Why? Following my proposal, $file would be identical to the current <$file>. | ||
pmichaud | you want string interpolations to automatically capture to the hash? | 19:26 | |
er, to the match's hash? | |||
Juerd | pmichaud: And - I have no real use for <$var>. The symbolic reference thing was thinking out loud. | ||
pmichaud: So they can both be available even | |||
pmichaud: No, I want $foo to be rule interpolation, and string interpolation to be strictly associated with quotes | |||
autrijus | so, while you're chatting... | 19:27 | |
pmichaud | I think that's the wrong huffmanization | ||
autrijus | ...I've finished named rules and subrules support. | ||
Juerd | pmichaud: I think it's a better one than the current | ||
I won't suggest this on p6l. There's too much opposition. | |||
pmichaud | I'm actually not opposed | ||
I'm just pointing out possible advantages of the current system | 19:28 | ||
PerlJam | Juerd: suggest it anyway. Good ideas often spring from the discussion. | ||
Juerd | PerlJam: I'm a bit tired of floods of dozens of messages bashing my suggestion, then waiting a few months, and then seeing something that is suspiciously close to what I suggested. | 19:29 | |
PerlJam: Unless I think there are people supporting my ideas, I just wait until I see other people come up with whatever I thought. | |||
qmole | nice, autrijus | ||
PerlJam | of course, you may get another message from Larry to the effect of "I wish people would at least try to see that we've put alot of thought into the current system and that there are reasons why we made the choices we did" ;-) | 19:30 | |
Juerd | pmichaud: I'm not really concerned with huffmanization for single character things, in rules. I'm much more concerned with aesthetics, typeability (from my perspective as a chronic RSI patient), and logic in communication ("->" looks like an arrow, not minus greater than, and + obviously has something to do with numbers -- "" to programmers clearly indicates something stringy) | 19:31 | |
Corion | How do I index a (Haskell UTF8) String by character (instead of byte) ? If I have a byte index, I can get at the char index, but how to do the reverse? | 19:32 | |
theorbtwo | I'm not terribly sure about that last bit, Juerd. | 19:33 | |
autrijus | Corion: you can get at the char index? | ||
theorbtwo | If you want the value of $foo, a string, you write $foo, not "$foo", generally. | ||
autrijus | Corion: the only method I had was just encodeUTF8 and decodeUTF8 | ||
use them like Encode.pm equiv | 19:34 | ||
Corion | autrijus: I get at the char index by doing encodeUTF8 . takeGeneric . dropGeneric | ||
autrijus: Which is what you did via encode/decode. So I'll try decodeUTF8 | |||
autrijus | pugs> rule bar { 3 }; rule foo { <bar> }; say "Yes!" if 3 ~~ /<foo>/ | ||
Yes! | |||
I imagine interesting things happening with this support :) | 19:35 | ||
theorbtwo | Woo, cool, autrijus! | ||
autrijus | like, a perl 6 grammar. ;) | ||
or at least URI.pm can take advantage of this | |||
by using named captures and subrules | 19:36 | ||
Juerd | theorbtwo: If you want a string, in Perl 6, you write ~$foo or "$foo" if you must have string interpretation. $foo is a value that can be anything. If you know it'll be a string, ~$foo and "$foo" are bad style indeed. However, in rules, I think it's more natural to assume $foo will contain a rule, as in "", you assume $foo is as string. | ||
autrijus | isn't technology great? :) | ||
theorbtwo | I'm not sure about that. | 19:37 | |
Perhaps $foo should do the right thing depending on if it does Rule or not? | |||
Juerd | theorbtwo: That would be nice too. | ||
theorbtwo: The most important wish I have is that '' and "" be made to work without the surrounding <> | 19:38 | ||
theorbtwo | I'm not sure if that's mishuffmanization or not. | ||
Juerd | theorbtwo: "$foo" as string $foo flows from that, and allows <$foo> to become $foo, which isn't entirely important to me. | ||
theorbtwo | ' and " are awful common chars to make meta. | 19:39 | |
Juerd | theorbtwo: Why? | ||
theorbtwo: How often do you match them? | |||
Corion | Heh. The Prim.hs refactoring decreased the (unoptimized) rebuild time vastly! | ||
theorbtwo | Very often. | ||
Juerd | theorbtwo: I personally have not been able to find any example of that in a grammar where escapes for characters aren't used much more often | 19:40 | |
theorbtwo: And you can still match " with either \" (same as in a string!!) or '"' (same as you would declare it as a string) | |||
integral | great :-) | ||
PerlJam | Juerd: if the current <$foo> were changed to $foo, how would you pass arguments to it? | ||
Juerd | PerlJam: $foo(), with in (), expression syntax | 19:42 | |
PerlJam | So would $foo.() work too? | ||
Juerd | PerlJam: This is a good argument for not doing this, by the way. | ||
PerlJam: Still, I want the quotes. | |||
PerlJam | Juerd: Well, adding " and ' to the list of metacharacters doesn't seem too far fetched at the moment. | 19:44 | |
Juerd | So currently, you've succesfully changed my mind about both <$foo> becoming $foo and <$foo> being symbolically referring. | ||
PerlJam | (though I'd prefer fewer metacharacters_ | ||
autrijus | Corion: yes. refactor early refactor often! | ||
PerlJam | s/_/)/ | ||
autrijus | (AST.hs particularly needs love, but I've said that) | ||
Juerd | I like the suggestion of bare $foo being <$foo> if $foo.does(Rule) | ||
integral is loving AST | |||
Limbic_Region | question - does my $rv := some_routine(); bind $rv to the underlying variable being returned in the sub if it is like sub some_routine () { my $foo = 42; return $foo; } | ||
or just a copy? | |||
PerlJam | Limbic_Region: yes. | ||
Juerd | PerlJam: It's not far fetched at all. It's really close. See also the many forms of BNF. | ||
Limbic_Region | PerlJam - so if that value changed $rv should change too? | 19:45 | |
cause if it isn't supposed to be a copy - I think Pugs is broke | 19:46 | ||
PerlJam | Limbic_Region: pugs mayn't be broken. I may be wrong. | ||
Limbic_Region | oh - lots of help you are | ||
:P | |||
PerlJam | Limbic_Region: I don't think anyone has asked that question before (but if they have, it's on p6l somewhere) | 19:47 | |
Limbic_Region is writing p6.l now | 19:48 | ||
Corion | autrijus: I don't understand the doMatch and why it has UTF8 problems. What charset is Pugs internally? | ||
Or bytes? | |||
... or rather, what format are the Strings stored in? | |||
knewt | hmm. methinks it might take a while to sync down the pugs tree | 19:49 | |
theorbtwo | We probably shouldn't rely on them being anything specific... but they are probably utf8. | 19:50 | |
Juerd tries to refrain from raising the usual perl 5 red flag: you mustn't care about the internal representation, assume it's vogon for all you care. | |||
integral | knewt: use --skipto | ||
knewt | integral: it's nice to have the history | ||
integral | *all* of it 8-)? | ||
PerlJam | integral: --skipto --mylou --mydarling? | 19:51 | |
knewt | well ok, i could probably have done without the majority :) | ||
but now it's started... | |||
Corion | theorbtwo: Hmmm. We need to rely on them being something, or rather, there is some cognitive dissonance between what PCRE returns indices to, and what is returned to Pugs / Run.hs, and how they don't fit together. | ||
knewt | ghc6 is what i need once i've grabbed it, right? | ||
integral | killing it is fine. You can tell I did this earlier ;-) | ||
knewt: 6.4 | |||
knewt | damn. only got 6.2.2 in hoary | 19:52 | |
it won't work with 6.2.2 ? | |||
Juerd | No | ||
integral | nope | ||
autrijus | Corion: Strings are stored in Char | ||
Corion: Char are unicode. | |||
Juerd | knewt: Get ghc-cvs from universal/sid | ||
autrijus | Corion: but to pass things into PCRE, we need to encodeUTF8 them. | ||
Corion: so think of it as converting a u-string into bytestring | |||
Corion: now when PCRE passes back offset | |||
they are in byte offset | 19:53 | ||
even though PCRE does unicode matching just fine | |||
the only thing we need to do | |||
knewt | Juerd: what, the source, and then build my own local package? | ||
autrijus | is to convert the array of offsets from byte to char unit | ||
everything else will Just Work | |||
end of explanation :) | |||
Corion | autrijus: Hmmm ... We also return a substring. I don't know what it is used for, as we also return the offsets. | ||
But that must be converted as well I think | 19:54 | ||
autrijus | Corion: it's used to avoid keeping a copy of orig string around | ||
Corion | Aaah. OK. | ||
autrijus | Corion: which may or may not make sense :) | ||
but yeah, if the offsets are correct | |||
then just use offsets on the orig string (in u-char) | |||
Corion | autrijus: It will prevent later ugly hunting of weird interaction. | ||
autrijus | will yield the correct substring | ||
yes, that too. | |||
Juerd | knewt: No, it's the cvs version, compiled | 19:55 | |
knewt: apt-get install ghc-cvs, after you've enabled universal | |||
knewt | Juerd: i'm running ubuntu, not debian | 19:56 | |
Corion | Yay! Seems after talking through it again, I changed something that makes length.t Just Work! Thanks autrijus ! | ||
knewt | prefer not to mix/match | ||
Corion hurries to commit, just after the smoke test :) | 19:57 | ||
Limbic_Region | Corion - but do you know WHAT that something is and WHY it just works? | ||
Alias_ | what exactly is $bot<add_handler>("runloop", &svn_check) | ||
is that a method call? | |||
Juerd | knewt: universal is an ubuntu repository | ||
Corion | I even realize what I had wrong. I thought that Haskell used UTF8, but it doesn't. It needs a gateway via encodeUTF8 on the way to PCRE and decodeUTF8 on the way from PCRE | 19:58 | |
Juerd | knewt: in debian, it's called sid. | ||
Limbic_Region | Alias_ sort of | ||
Juerd | knewt: It's the same thing. | ||
Limbic_Region | since we don't have real methods yet | ||
Alias_ | ah | ||
Limbic_Region | using dispatch table | ||
Alias_ | So I'll almost never see it in real P6 code? | ||
Juerd | knewt: Do you want to run pugs, or not? You can (must) trust apt to handle things correctly and reversible. Besides, multiple ghc versions can be installed alongside. | ||
Limbic_Region | Alias_ - you will most assuredly see it in real P6 code, but just not for that purpose | 19:59 | |
Alias_ | good enough for me | ||
knewt | Juerd: universe is an ubuntu repo, and i've got "hoary universe" enabled. but the ghc-cvs in that is dated 2004-07-25, and 6.4 wasn't released until march 2005 | ||
Juerd | Limbic_Region: Sorry I missed your question when you asked it here. I had an answer :) | ||
Limbic_Region: Mailed now. | |||
theorbtwo | $bot{'add_handler'} has a coderef. | ||
Limbic_Region | thanks Juerd | ||
Alias_ | so it's basically ->() ? | 20:00 | |
Limbic_Region likes instant gratification | |||
Alias_ | oh wait.. | ||
theorbtwo | Yup. | ||
Limbic_Region | in p5 speak yes | ||
Alias_ | ->{foo}->() | ||
Corion | Ah great. And now when I want to test my stuff, the build is broken :/ | ||
theorbtwo | The second -> is optional in p5 too. | ||
Limbic_Region | well, p5 only forces you to dereference at 1 level | ||
Juerd | knewt: That sucks. Then pick the package from sid. Still won't hurt your system, AFAIK | ||
Limbic_Region | but yeah | ||
integral | urk, (broken builds)-- | ||
Alias_ | theorbtwo: But only by people that prefer terseness over clarity :) | ||
Juerd | knewt: If you really don't want to "infect" your system with perfectly compatible debian packages, install debian in a chroot with debootstrap | ||
Khisanth | Alias_: all the other -> would make for a lot of clutter | 20:01 | |
autrijus | for how things will eventually look like, see svn.openfoundry.org/pugs/ext/Test-B...Builder.pm :) | ||
Alias_ | Khisanth: Easy to read clutter | ||
autrijus | build's broken? | 20:02 | |
Limbic_Region | Alias_ - in any case, dispatch tables are going to be as useful in p6 as they were in p5 for the right situations - for OO though it is best to use OO | ||
Juerd | knewt: Which is a matter of mkdir ~/debian; debootstrap ~/debian sarge ftp.debian.nl/debian; cd ~debian/etc/apt; rm sources.list; wget juerd.nl/sources.list; chroot ~debian; apt-get install ghc-cvs svk | ||
Alias_ | Limbic_Region: Of course | ||
Khisanth | ->{}->[]->{}->() doesn't really add anything helpful | ||
Alias_ | Limbic_Region: But there's normal code, and then there's fun stuff | ||
Khisanth | and .{}.[].{}.() even less! | ||
Limbic_Region | Alias_ - we don't have OO yet so we get to say "We did OO before it existed" | 20:03 | |
Alias_ | I heard :) | ||
Limbic_Region ported Config::Tiny and thought it was a lot of fun | |||
discovered 3 pugsbugs in the process | |||
Alias_ | Limbic_Region: It should have been. Config::Tiny is pretty... dense :) | 20:04 | |
autrijus | Corion: unbroken | ||
Limbic_Region | I really need to study the Perl6::Bible as most of my p6 code is still just a straightforward translation of p5 | 20:06 | |
Corion | Yay. Build is progressing nicely and should soonish start smoking ;) | 20:07 | |
Alias_ | Limbic_Region: Especially to find a way to implement a blessed HASH properly :) | ||
Because I noticed you had to call a method to get the hash, and then get the value :) | |||
Which is somewhat against the spirit of the original | 20:08 | ||
Limbic_Region | Alias_ - that's a bug I found | ||
knewt | Juerd: ok, see, unless i force the dependencies it won't work to install a sid package into hoary. [[ Depends: libc6 (>= 2.3.2.ds1-21) but 2.3.2.ds1-20ubuntu13 is to be installed ]] | ||
Limbic_Region | you don't really need the blessed hash to do the spirit of Config::Tiny | 20:09 | |
Juerd | knewt: I personally have never had problems replacing ubuntu pakages with newer debian ones | ||
Limbic_Region | you just need to be able to store a hash reference as the value to a key in another hash (which will act as an accessor/mutator method) | ||
knewt | Juerd: except that now sid has a new version number on its libc6 than hoary does | ||
Limbic_Region | unfortunately - sticking a hash reference to another hash doesn't work correctly | 20:10 | |
knewt | Juerd: and when a package depends on that version number it won't install without forcing (no thanks) | ||
Limbic_Region | subsequently I found the bug is only a bug if you are initializing/creating the hash | ||
if you create it and then add the reference it works as expected | |||
as soon as I get a machine I can commit with I will make it prettier | |||
Alias_ - like I said, a lot of fun | 20:11 | ||
Alias_ | heh | ||
Juerd | knewt: I have replaced ubuntu's libc with debian's. | ||
Alias_ | I was curious how it would be done though | ||
Corion | Limbic_Region: You should work on my JavaScript text editor. Maybe you could make a telnet emulator out of it as well :) | ||
Alias_ | It was really just a curious confluence of Perl 5 oddities that allowed it to work in the first place | ||
Juerd | knewt: But I use bare debian now, because ubuntu was as limiting as many other distros | ||
Alias_ | I couldn't resist having a "plain" hash that you could call methods on | ||
Juerd | knewt: There's still the debootstrap+chroot method if you don't want to take risks | 20:12 | |
Alias_ | especially for something like .ini files which are SO obviously just a HoH | ||
autrijus | journal up; g'nite *wave* | 20:13 | |
Juerd | Sleep well | ||
integral | be prepared for a new AST.hs in the morning :-) | ||
Limbic_Region | Alias_ - it will work in the dispatch table with just 1 extra level | ||
ajs | Ok, I give up. What am I doing wrong: ./pugs -BParrot -e 'sub factorial($n){if $n>1 {$n*factorial($n-1)} else {$n}} say factorial(3)' | ||
Corion | BTW, there is one unguarded test (failure) in undef.t : pugs: user error (Cannot find the parrot executable in PATH) ... | 20:14 | |
Limbic_Region | In fact Alias_ - I may be able to nopaste something for you - give me a minute or two | ||
Alias_ | sure | ||
autrijus | integral++ # I'll be prepared :) | 20:15 | |
ajs: I think, obviously, the bug is in the -BParrot | 20:16 | ||
take it away and it will work ;) | |||
(but seriously, Parrot.hs codegen needs to be rewritten using MonadEval to keep track of temp PMCs.) | |||
ajs | Ok, I thought I was doing something dumb. Let me poke around and see what Parrot is thinking | ||
Limbic_Region | Alias_ - after working around the bug I changed the code enough to make changing it back non-trivial (more than 10 minutes worth of work) | 20:17 | |
I should have net access again after Saturday | |||
autrijus | Corion: "Cannot find parrot executable" should perhaps to be tryIO'ed in Prim's evalPGE. | ||
Limbic_Region | will ping you then | ||
Alias_ | ok | ||
autrijus | Corion: i.e. catch it and rethrow using Eval monad's fail"" | ||
but I need to sleep. :) & | |||
Corion | autrijus: Ah. Maybe tomorrow. I need to sleep in one hour ;) | 20:18 | |
good night autrijus | |||
autrijus | nite | ||
mj41 | g'night | 20:19 | |
Juerd | autrijus: I don't know how to write a test for it, but can we have __END__? | 20:21 | |
Juerd uses pod for now | |||
Limbic_Region | Juerd - is __END__ a parse error? | 20:22 | |
now I mean | |||
Juerd | AFAICT | 20:23 | |
push @foo, [ 1, 2 ] | |||
Limbic_Region | ok - so I think I figured out how to test it | ||
Juerd | Add 1 or 2 elements to @foo? | ||
I'm really hoping for 2 | |||
eh | |||
1 | |||
It's adding 1, 2 now | |||
Instead of an arrayref | |||
Is current behaviour a bug? | |||
gaal | Juerd, is __END__ specced? | 20:24 | |
isn't it spelled =for END or something | |||
? | |||
ninereasons | =begin END | ||
Juerd | gaal: No, it's not specced. | ||
gaal | this is the end, my only friend, etc. | ||
Juerd | Okay - why do arrayrefs flatten in list context? | ||
That way I can't nest them :( | |||
Limbic_Region | Juerd - WRT to testing for __END__ - create a module that has an __END__ and modify an exported variable after the __END__ | ||
in the test script that uses the module, check the value of the exported variable | 20:25 | ||
Juerd | Limbic_Region: Ah, good idea | ||
Limbic_Region | right now it would be a parsefail | ||
gaal | Juerd, do you just need something that ignores everythign after the __END__? i think i can add that | ||
Limbic_Region | after implementation it should be the last value before __END__ | ||
Juerd | But I do wonder if __END__ is valid. I hadn't considered the possibility it'd go away. | ||
gaal: I have =end now, which works too :) | |||
Limbic_Region | probably should ask @larry | 20:26 | |
Juerd | gaal: I converted some script to p6 long time ago, I'm testing it for the first time now | ||
I need to do it line by line | |||
Limbic_Region | cause people tend to like inline files | ||
Juerd | Because pugs isn't quite ready enough for this :) | ||
Limbic_Region | __DATA__ | ||
ninereasons | @=DATA | ||
gaal | i think data has also gone away | ||
yeah | |||
Juerd | pugs> [scalar [1,2, scalar [3, 4]]] | 20:27 | |
(1, 2, (3, 4)) | |||
Limbic_Region | but has __END__ ? | ||
gaal | now accessible consistently and programmatically like ninereasons says. | ||
Juerd | This is HARD to work with. | ||
gaal | i think so, yes. | ||
ninereasons | SO2 Limbic_Region | ||
Juerd | AAAAAAAAARGH. I'm going nuts here :) | 20:29 | |
Limbic_Region | ninereasons - [16:06] <Limbic_Region> I really need to study the Perl6::Bible as most of my p6 code is still just a straightforward translation of p5 | ||
Juerd | I want very simple nested literal arrays :( | ||
(flattening of references is madness. I wonder why it works like this) | |||
ninereasons | i'm pretty sure it's a persistent bug, Juerd | ||
squashed and resurrected, repeated.y | |||
_metaperl | isnt Perl6 a community rewrite of Perl? can the community vote on your issue Juerd? so far, it looks like it is no longer a community language | 20:30 | |
Juerd | _metaperl: It's not the community's language. | ||
_metaperl: The community writes the code. | |||
hachi | "@numbers >>++;" is throwing an error in pugs, are the hyper-operators working? | ||
_metaperl | perl6 is a community rewrite of Perl | ||
integral | the community's input was some RFCs ages ago | ||
Juerd | Larry makes the final decisions. | ||
Corion | I don't believe in "voting". That assumes that all voters are equally competent. | ||
ninereasons | I suppose that someone might say that, "final" decisions are made in usage | 20:31 | |
Corion | Of course, we are free to implement "useful" things in Pugs and see if they survive until Perl6 | 20:32 | |
gaal | forum2.org/gaal/pugs/smoke-cygwin.html incidentally. | 20:33 | |
Juerd | Corion: My wish is a wish for rules. | 20:34 | |
Corion: Which has some impact on compatibility. | 20:35 | ||
Corion | gaal: I unified your patch with my reimplementation of getEnv and it all Just Works for the moment ;) | ||
gaal | yes, thanks - works great here! | ||
Juerd | Is there any haskeller around who could make arrayrefs in list context non-flattening? | ||
Currently, [] and () are treated equally. | 20:36 | ||
gaal | my wish is for fluency in haskell like my fluency in perl | ||
hachi | ow! | ||
Corion | Juerd: I think I could find the place, but I only got one more hour today ... | ||
Juerd | Corion: Do what suits you best | ||
Corion | ... and I want to hack up some nice graph display thing in HTML, like GraphViz but more restricted. For displaying a MUD map. | 20:37 | |
So, if anybody has a nice MUD map renderer that I can access / feed from Perl, ... :) | |||
gaal | (not to say my perl is perfect of course, only that i don't get stuck with it so often as i do with relatively basic things) | ||
Juerd | Hm | ||
Corion | (actually it's a dual-lived project - MUD map renderer to edit a MUD, and also to display the dataflow/system structure for $work) | ||
Juerd | Corion: If you write it in perl 6, you'd need arrayrefs probably, so do that ;) | 20:38 | |
Corion | ... but the data structure is quite similar. | ||
Juerd: Hah. We'll have to wait until my boss adopts Perl6 as new development language :) | |||
Juerd | You write muds for work? Nice job! | ||
castaway | define nice, Corion ;) | 20:39 | |
Juerd | 17466 juerd 25 0 180m 177m 10m R 96.3 35.1 3:38.42 ghc-6.5 | 20:40 | |
holy puppy | |||
It's very memory hungry. | |||
hachi | err, I thought it was eating up over 500 MB last night when I compiled | ||
Corion | castaway: Ah, at least like GraphViz, if not better. I'd prefer something like SVG or DHTML with drag-and-drop or a very good automatic layout of course. | ||
castaway | aehm.. | ||
well theres a pic of mine somewheres.. | |||
Corion | Juerd: No, I don't write MUDs for work, but I realize that the (simplified) data structure of a MUD is the same as the data structure of our IT architecture and its dataflow :) | 20:41 | |
(and $boss ran a MUD in his university days) | |||
crysflame | are you neu too? | ||
castaway doesnt like much of GraphViz' output | 20:42 | ||
Juerd | Corion: wheh | ||
castaway | Corion, desert-island.dynodns.net/perl/telnetclient.html | ||
theorbtwo | Your IT arch is like a dungeon? That's scary. | ||
Corion | r2948 - 4860 test cases: 4783 ok, 77 failed | 20:43 | |
(at datenzoo.de/pugs/win2k.html ) | |||
castaway | hmm.. I wonder.. you could probably make pretty ones with zMapper actually :) | ||
Corion | theorbtwo: Well, the systems are like MUD rooms, the import/export interfaces are like doors and the data transport is a connection between doors. | ||
castaway | and that one uses a "real" DB | ||
(and is customizable..) | 20:44 | ||
that'd be interesting, to use it for a network layout.. | |||
Corion | castaway: That's my plan, at least for $work ;) | 20:45 | |
anyway - afk for the moment | |||
theorbtwo | I'm convinced that it's possible to get useful graphviz output... I just haven't figured out how yet. | ||
castaway | which is the plan? | 20:46 | |
yeah, I'm still hoping you will :) | |||
Corion | theorbtwo: I don't know how to tell GraphViz that a certain passage has to connect to the "north" of a cell | ||
Juerd | theorbtwo: Ignorance isn't bliss in this case. It's a huge waste of time. | ||
Corion | still - afk & | ||
Juerd | PackFile_unpack: Bytecode not valid for this interpreter: version mismatch | 20:47 | |
Parrot VM: Can't unpack packfile /home/juerd/project/pugs/src/pge/PGE-Hs.pbc. | |||
What does it mean and how can I avoid it? | |||
theorbtwo bets the file is zero-length? | 20:48 | ||
Juerd | I have no idea which file and why. | 20:52 | |
stevan | gaal: ping | ||
Juerd | Okay, I give up. | ||
I'm going to hard code | |||
Arrayrefs are utterly useless if they flatten | |||
gaal | plong! | 20:53 | |
stevan | gaal: did you see my comments re: Hack::Instances | ||
gaal | nope! shall i grep the logs? | ||
stevan | nah I can tell you | ||
gaal | yes plz | ||
revdiablo | Juerd: fwiw, I wrote up some tests to show the weird flattening behavior in t/pugsbugs/flattening.t | 20:54 | |
stevan | well, originally I had a counter | ||
Juerd | revdiablo: Thanks | ||
stevan | but I changed it to the rand number later | ||
to get a more identifiable string | |||
gaal | a random number is more identifiable? :) | 20:55 | |
stevan | in a weird way yes | ||
but it would really function the same either way | |||
gaal | hahaha!!! lookie this: | ||
./pugs.exe -V | egrep path_sep\|osname | |||
osname: cygwin | |||
path_sep: : | |||
ajs | grats! | ||
ninereasons | wow. many of the tests work now, in t/rules/Disabled/rules.t | ||
gaal | i think i know why pugscc &c didn't work on cygwin ;-) | 20:56 | |
ninereasons | pmichaud++ | ||
ajs | gaal: oh heh, I thought you were pointing out having gotten it working, | ||
yeah, : isn't quite right is it :) | |||
gaal | stevan, a rand number is just a wee bit less safe, isnt' it? | ||
stevan | how so? | ||
Juerd | Anyone any idea how to use a literal hash ref? | ||
gaal | better have both imho | ||
Juerd | both { } and hash { } are broken | ||
stevan | I ran about 10,000 random numbers and got no dups | 20:57 | |
gaal: we can do both I suppoer | |||
gaal | ajs, this could have been the bug that was preventing it from work | ||
stevan | suppose | ||
Juerd hard codes again | |||
stevan | gaal: it is also a very temporary hack (at least I hope it is) | ||
Juerd: welcome to the wonderful world of Pugs hacking :) | |||
gaal | stevan: well, a reasonable person would say that you and me, and all the pugs hackers together might never get a collision until real objects land | 20:58 | |
but i am unreasonable! :) | |||
stevan | LOL | ||
putter | Fyi, rules are apparently not usable on FC3 x86_64. Embedded due to a ghc bug which may or may not have been fixed yesterday in cvs-ghc, and parrot standalone due to an undiagnosed interrupted system call failure. | ||
stevan | gaal: ok, adding the counter in now ... | ||
gaal | just make sure you don't *add* the counter :)) | ||
stevan | LOL | ||
gaal: concat-ing the counter :) | 20:59 | ||
gaal | this reminds me of a riddle (which of course will now be easy to solve) | ||
join it witha delim, stevan :) | |||
stevan | yes | ||
OBJECT;<class>;<rand>;<counter> | |||
gaal | n programmers are siting at a table and they want to know their average salaray | ||
putter | Fyi, as of ghc-6.4.20050506, on FC3 x86_64 the pugs-kill gc bug has _not_ yet been fixed (hopes to the contrary not withstanding;). A ghc bug report has been submitted. | 21:00 | |
gaal | however, they don't want evryone to know each other's particular salary. | ||
putter | err, s/pugs-kill/pugs-killing/ | ||
gaal | what scheme can they use to know the average w/o losing privacy? | ||
n > 2 | |||
theorbtwo wonders if it's a card table. | 21:01 | ||
stevan | gaal: r2949 | ||
gaal | stevan++ | ||
stevan | gaal++ | ||
gaal | stevan+=rand+$counter++ | 21:02 | |
stevan | gaal: the answer is 0, they were all outsourced | ||
theorbtwo | Everybody gets some chits, closes their eyes, and throws the chips representing their salary into one hat, and the rest into the other. | ||
stevan | :D | ||
theorbtwo | This may involve more aim then programmers are capable of, though. | 21:03 | |
stevan | more athleticism at least | ||
wow, bsmith++ | |||
gaal | svnbot6 is teh bomb | 21:04 | |
putter | Re Perl6::Rules t/*.t port, I hope to clean it up tomorrow to reflect Damian's S05 draft post, and check it in largely untested. :( | ||
stevan | I love svnbot :) | ||
integral | Pugs.AST.Internals is still >1500 lines :-) | ||
Corion | bsmith is on a refactoring rampage :) | ||
stevan | jabbot: do you love svnbot? | ||
jabbot | stevan: We were discussing you -- not me. | ||
Corion | but that's cool, because that reduces (re)build times while developing | ||
stevan | jabbot: are you jealous of svnbot | ||
jabbot | stevan: What are your feelings now? | ||
stevan | jabbot: I am feeling that your days are numbered | 21:05 | |
jabbot | stevan: Really, my days are numbered? | ||
castaway | ;) | ||
theorbtwo wonders if anybody has a better plan. | |||
stevan | jabbot: yes, it is only a matter of time before ingo write you out of existence | ||
jabbot | stevan: åä¾å¦ę¤ | ||
putter wishes svnbot "notices" were logged... | |||
Juerd | Fsck. No gather/take yet? | 21:06 | |
stevan | Juerd: nope | ||
integral | putter: svn log ... | ||
Juerd | grumble | ||
ajs | a tells b "s(a)+rand(1)", b tells c "s(b)+s(a)+rand(1)+rand(2)" c tells a "s(c)+s(b)+s(a)+rand(1)+rand(2)+rand(3)" a subtracts rand(1) and passes result to b, b subtracts rand(2) and passes to c, c announces "(s(a)+s(b)+s(c))/3" | ||
Juerd | Is "is copy" implemented? | 21:07 | |
Corion | I doubt it... | 21:08 | |
stevan | yes | ||
although maybe not 100% for really big/nested/odd structures | |||
Juerd | I'm getting complaints about trying to change a readonly value | ||
But I can't find it | |||
gaal | ajs++ | ||
except that rand(1) is not really needed | |||
it can be any random number | |||
oh | |||
putter | integral: colabti.de/irclogger/irclogger_log/...-05-10,Tue : "bsmith is on a refactoring rampage :)"... but you wouldn't know it, or have much idea what's being discussed, by looking at the irc log. :( | ||
Juerd | tnx.nl/3763VEZF | ||
stevan | Juerd: you can always make a new local copy | ||
integral | putter: oh, right | 21:09 | |
Juerd | *** Error: Can't modify constant item: VRef <Hash>: NonTerm (MkPos "examples/matrix.p6" 38 18 38 31) at examples/matrix.p6 line 51, column 2-18 | ||
gaal | you were using rand(1) as "a first randome number". yes, that's right. | ||
Juerd | That's the build_re line | ||
The bottom line in the paste | |||
gaal | bbiab | ||
integral | and it's less a rampage, and more a let's wait for ghc to finish, _again_ | ||
ajs | gaal: yep... sorry, subscripts not available ;-) | ||
gaal | integral: make unoptimized | ||
is much much faster to compile. | |||
integral | yeah, still slow | ||
stevan | Juerd: which one is not able to copy? %had? | 21:10 | |
Juerd | stevan: It still complains if I copy manually | ||
stevan: I have no idea which one! | |||
stevan | my %new_had = %had; | ||
as the first line of the sub | |||
Juerd | stevan: Still complains | ||
sub build_re ($y, $x, $todoX, ?%hadX) { | |||
my $todo = $todoX; | |||
my %had = %hadX; | |||
stevan | Juerd: where is @matrix coming from | 21:11 | |
Juerd | stevan: Defined earlier. It is in scope | ||
As is @adj | |||
stevan | Juerd: then your problem is likely in @matrix | ||
Juerd | How so? | ||
stevan | I have had issues with this before | ||
Juerd | @matrix isn't changed | ||
stevan | oh | 21:12 | |
ok | |||
lemme look closer | |||
Juerd | The function's pure with dependencies | ||
stevan | Juerd: what is line 38 | 21:15 | |
Juerd | stevan: my @next; | 21:16 | |
Oh, no, line numbers changed | |||
I'll repaste current first | |||
stevan | ok | ||
gaal | beh, that bug i though i found, it wasn't a bug :( | 21:17 | |
whcih sucks because if it was, we'd probably have had a working pugscc on cygwin | |||
Juerd | tnx.nl/3764JXCT | ||
I hate Terminal.app | |||
It scrolls on selecting text | |||
stevan | Juerd: so which is line 40 | 21:18 | |
gaal | p5 $Config{'path_sep'} isn't the, uh, subdirectory separator, it's the $PATH separator :) | ||
Juerd | stevan: %had{...}++ and next | ||
stevan | Juerd: have you tried breaking that up a bit | 21:19 | |
%has{ $_<y> ~ "/" ~ $_<x> }++ | |||
Juerd | I'll try that | ||
Tried; doesn't work | |||
Same error | |||
It's in the push line | 21:21 | ||
Now to find out why... | |||
Hm, no, it doesn't have to be | |||
stevan | $y and $x need to be is copy maybe? | ||
Juerd | They're not changed | ||
stevan | ok | ||
Juerd | The problem somehow has to do with the inner build_re call | 21:22 | |
Hm, no, even if I put its arguments in a bare list it croaks | |||
stevan | how about try adding a topic var to the loop | ||
no using $_ | 21:23 | ||
s/no/not/ | |||
Corion slumps into bed. | |||
Juerd | Any use of %$_ is wrong I think | 21:24 | |
So let's try that indeed | |||
gaal | should i be getting this? pugs.exe: user error (Cannot find the parrot executable in PATH) | ||
Corion | r2950 - datenzoo.de/pugs/win2k.html | ||
gaal: See the backlog. Autrijus hinted at what should be done about it. | |||
(tryIO) | |||
g'night | |||
& | |||
gaal | night Corion | ||
Juerd | Argh, $_ is undef | 21:25 | |
mugwump | morning all | 21:26 | |
Juerd | Oh, fscking hell | 21:27 | |
Hashes are flattened too | |||
So essentially, list context is fucked up entirely | |||
I give up for now | |||
Thanks for the help, stevan | |||
stevan | Juerd: your welcome | 21:28 | |
mugwump: hey there | |||
mugwump: I have a few questions when you have a moment | 21:30 | ||
gaal | bug: s:p5/aaa/bbb/ goes to parrot, s:P5 does not. | 21:41 | |
s:perl5 works too. maybe i got it wrong and :p5 is invalid? | 21:42 | ||
mugwump | hey stevan. I notice that there are two dists in ext/ now ... | 21:48 | |
stevan | mugwump: I moved it all to MetaModel | 21:49 | |
you probably need to remove metaClass manuaully | |||
knewt | woot, stage1 has finally built, and it's moved on to stage2 | 21:51 | |
revdiablo | gaal: I remember reading somewhere that you could use :P5 :perl5 and :Perl5 but not :p5 | ||
gaal | hey, anyone looking for a Prim to add? | ||
i'd like rename and chmod :) | 21:52 | ||
octal is spelled like 0o755 now, right? | 21:53 | ||
....and how do you say qx? is there a final word? | 21:54 | ||
mugwump | ah, right. I wonder why svn didn't do that for me | 21:55 | |
stevan | mugwump: maybe you had local mods? | ||
svn can be picky sometimes | |||
mugwump | that must have been it | 21:56 | |
it saw all my emacs ~ backups and just couldn't bring itself to delete them | |||
stevan | :) | ||
mugwump: so, I am wondering about MetaAssoc | 21:57 | ||
we are not using it to assoc properties to classes are we? | |||
properties == MetaProperty | 21:58 | ||
mugwump | Not directly. The association between MetaClass and MetaProperty is simply a hash | ||
stevan | ok | ||
I noticed (somewhere, not recalling right now) that methods can only ever be associated with one class | 21:59 | ||
and same with properties | |||
so should those two have a 'class' slot added? | |||
so we can enforce that? | |||
mugwump | Sure | ||
stevan | ok | ||
we surely can make Visibility and AssociateClassWith Roles when we have them | 22:00 | ||
but for now I will cut and paste :) | |||
jaap | I'm trying to download pugs from the darcs repository, but the link on the pugs website doesn't work | 22:01 | |
stevan | also I think the SuperClass -> Class -> SubClass relationship is pretty solid now | ||
jaap | i'm trying darcs get wagner.elixus.org/~autrijus/darcs/pugs | ||
stevan | I die if we have circular inheritence | ||
jaap: I think wagner.elixus is down | |||
jaap | stevan: is that temporary, or should i use a different repo? | ||
stevan | jaap: I would recommend the SVN repo | ||
I think i heard autrijus say it will be down indefinetly | 22:02 | ||
jaap | okay. such a pity, i much prefer darcs :-(, ah well, i'll get it from svn then, thanks | ||
stevan | mugwump: so, when a property is added to a class, I set the properties 'class' slot with $inv | 22:07 | |
s/class/metaclass/ | |||
and can properties be removed from metaclasses? | 22:08 | ||
I assume they can | |||
mugwump | naturally, this sort of thing should be able to be abstracted | 22:09 | |
but I'd worry more about making that work in classes that will be generated by MetaModel objects | 22:12 | ||
stevan | mugwump: I am not sure what you mean | ||
mugwump | ok, well these assertions that we're making about the relationship between "superclass" and "subclasses" - at least, the generic one that membership in one implies a corresponding membership in the other - apply to all associations | 22:14 | |
stevan | ok | 22:15 | |
but in meta-meta-models properties will more than likely be fixed? | |||
mugwump | I see this as an application of Set Theory style relationships to in-memory objects. But that's my connection, I don't have a thesis to back that up :) | ||
It's unlikely that the set of objects at Perl::MetaModel::$Model (or whatever) will change at runtime | 22:16 | ||
stevan | I know nothing (much) about set theory, so I'll buy that | ||
mugwump: so I can assume for now, that its set-once and then read-only | |||
and maybe in later refactoring, ... we can add the ability | 22:17 | ||
mugwump | If you know how to use a foreign key or a link table in a database, you at least know the concept driving this relationship companionship... | ||
changing at runtime basically means that a person is loading a module to parse another language or mutate the language | |||
stevan | mugwump: and they are on crack | ||
so I wont worry about that then | |||
mugwump | :) | ||
stevan | I will only enforce the rule for inserting | 22:18 | |
I wont bother with taking it out | |||
knewt | feck. i just ran out of disk space. this means that the entire build process from bootstrap -> stage1 -> stage2 will run again. aarrrggghhh. | ||
mugwump | Yep. It's an interesting condition to try to assert. Basically you have to catch updates to the containers, do set operations to find out the "differences", then send messages to the affected objects | ||
stevan | mugwump: for now I was just going to make a removeClsProperty method and make everyone go through that | 22:19 | |
mugwump | right. Now you're arriving at another conclusion I came to in Class::Tangram, this is very good :) | 22:20 | |
stevan | :) | ||
meta-meta-hacking is fun | 22:21 | ||
I also found a book on MetaCLasses on my bookshelf | |||
I dont have it with me at the moment | |||
mugwump | cool... any good? | ||
stevan | havent fliped through it yet | ||
got it a while ago in a tech-book grabbag on ebay | 22:22 | ||
never had a use for it until now | |||
ok next question | 22:23 | ||
what are methodParams? | |||
the method args? | |||
or something else | 22:24 | ||
more mysterious maybe :P | |||
mugwump | it's a signature, really. there are lots of parts on the MetaModel that are pre-echos of what will only really be needed on the next level | ||
stevan | ok | 22:25 | |
so should I break that up? returnType, argTypeMap, etc? | |||
ooh, the Metaclass book has symbol glossary, | 22:26 | ||
which means no more guessing at what all those funny bits mean | |||
mugwump | we want all that magic to happen on the Class Model, it happening on MetaModel is ok but perhaps superfluous for "bootstrapping" | 22:28 | |
stevan | ok | ||
so I leave params as just a list? or hash? | 22:29 | ||
hash seems to make the most sense | |||
mugwump | if it makes sense to you that a hash represents a parameter specification :). | 22:33 | |
stevan | mugwump: well it all depends on the details of the parameter spec, a hash seems pretty flexible | 22:36 | |
mugwump | It needs to be something like the Params definition in src/Pugs/AST.hs | 22:38 | |
sorry, src/Pugs/AST/Internals.hs | |||
but again - doing that in full might end up being unnecessary in the Meta-Model.. | 22:39 | ||
stevan | line 561 -> data Param = MkParam | 22:41 | |
that one? | |||
mugwump | yes, that's it | ||
the metamodel objects we're building would ideally be generated from these parts of the haskell source | 22:43 | ||
perhaps, anyway. | |||
stevan | ok | ||
well I think a list is better | |||
as we will likely have a list of param objects | |||
mugwump | yes. besides, the MetaModel is supposed to be as simple as possible | 22:44 | |
stevan | ok |