Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net Set by stevan on 15 August 2005. |
|||
stevan | hey putter | 01:01 | |
01:33
sleepster is now known as typester
|
|||
stevan | autrijus: let me know when you commit Pugs.Class.* I am very interested to see the metamodel come to life in Haskell | 02:05 | |
stevan ponders porting the MM 2.0 tests to Pugs .... hmmm | |||
geoffb rezzes in | 05:00 | ||
Since I seem to be off schedule from . . . well, basically everyone right now . . . | |||
rafl: what are the plans re: packaging parrot 0.3.0 for Debian? | |||
autrijus: Will you be attempting 0.3.0 compat for 6.2.10 or 6.28.0? | 05:01 | ||
stevan: I skimmed through MM 2.0, and I'm curious about stylistic choices: | |||
1) Why so many routines forced into the P5 :: namespace? | 05:02 | ||
2) Something about it feels . . . not sufficiently sugary. Is this intentional, for performance or stylistic reasons? | |||
3) Are you planning to add more sugar in a later rev? | |||
4) How much of the MM code exists merely to perform the bootstrapping, and how much is useful to the programmer after bootstrap? | 05:03 | ||
Um . . . I think that's most of what I wanted to ask for now. | |||
stevan | hey geoffb | 05:05 | |
geoffb | hey stevan | 05:06 | |
stevan | to answer your questions ... | ||
1) I was trying to avoid p5 namspaces alltogether, and the easist way to do that was to force the global :: namespace | |||
2) the MM is not where the sugar is,.. the sugar is in the language itself | 05:07 | ||
3) nope,.. no more sugar,.. thats autrijus's problem ;) | 05:08 | ||
geoffb | 1a) Why avoid P5 namespaces entirely? In other words, since in effect you chose one namespace to use everywhere, why not a different one? | ||
2a) Sugar to make later MM .pl files cleaner, not sugar exposed to the user programmer | 05:09 | ||
stevan | 4) only genesis.pl is bootstrapping,.. the rest is building up the meta-objects, which (I hope) will be exposed for the user to manipulate | ||
geoffb | 4a) Fair enough. | ||
stevan | 1a) MM 2.0 was an attempt at a pure meta-model, not just a "lets see how this feels" prototype | 05:10 | |
I asked autrijus what I could expect to be available to me | |||
he said "arrays, hashes, scalars and subs" | |||
i did my best to build it out of just that,.. keeping as much of the "not just that" stuff in chaos.pl | 05:11 | ||
also,... p5 namespaces/packages will not work the same was as p6 namespaces/packages | |||
so I felt it best to avoid them | 05:12 | ||
2a) ?? | |||
geoffb | So am I correct to assume that MM 2 is optimized for implementation language portability? | ||
stevan | geoffb: yes | ||
and theoretical correctness | 05:13 | ||
based on the theory I know,. which I hope is correct :) | |||
geoffb | 2a.1) Um, clearly I'm not making any sense. :-) I guess I was trying to say that some of the files contain a lot of repeated very similar constructions; I expected to see some of that factored away. | ||
I hope that makes more sense | |||
heh | |||
stevan | I borrowed heavily from what I had read about CLOS and Smalltalk (including source code) | ||
geoffb | nod | ||
stevan | 2a.1) you mean like refactoring some common things into helper subs and such? | 05:14 | |
things like attribute access, and such | |||
geoffb | yeah, that's what I meant, exactly. I was wondering if it was intentional, or historical artifact, or todo, or what | 05:15 | |
stevan | well, I didnt want to make any assumptions about sharing of code between various elements of the metamodel | ||
geoffb | . . . because some languages might not make that easy? | 05:16 | |
stevan | exactly | ||
geoffb | ah-hah. OK. | 05:17 | |
stevan | it might force the implementation to conform in a certain way | ||
and besides,.. I am a fast typer,.. so I dont mind :) | |||
geoffb | The code was too regular not to have a reason for that, but I couldn't figure out what the reason was. | ||
stevan | agian,.. for "correctness" over anything else | ||
and readability too | |||
geoffb | nod | ||
stevan | I suppose I saw that as an implementation descision,.. if you want/can do that,.. go for it | 05:18 | |
geoffb | right, I think I understand now. | ||
stevan | other than that,.. no good reason really ;) | ||
MM 1.0 was more about "what can I do to just make it work as specced" | 05:19 | ||
geoffb | So . . . what kind of performance are you expecting from your primitives (the above mentioned arrays, hashes, scalars, subs) . . . have you assumed roughly P5-level O() performance? | 05:20 | |
stevan | MM 2.0 was more about "how should this really be designed, in order to make it work as specced" | ||
geoffb: performance is something I have not even thought about until very recently | |||
geoffb | . . . the reason I ask is to know if a language that doesn't intrinsically have an array type with O(1) random access needs to have it emulated to get proper MM performance, for instance | ||
stevan | bascially when putter started adding it to PILRUN | 05:21 | |
geoffb | nodnod | ||
stevan | to be honest,.. I haven't given it that depth of thought | ||
geoffb | nodnod. | ||
stevan | I know the way Smalltalk approaches it is .. | 05:22 | |
if it needs to be fast,.. it is a primative method | |||
geoffb | Perl 5's primitives can lull one into believing that hashes and arrays are intrinsically fast things . . . but that's only because of a lot of implementation effort on Larry's part | ||
stevan | and CLOS make a seperation between functional and procedural parts of the protocol,.. functional being (mostly) side-effect free,. and so easily memoizable | 05:23 | |
geoffb: yes, that is true | |||
geoffb | thats an interesting and useful distinction . . . (the CLOS one) | ||
stevan | yes, I only recently stumbled on that chapter :) | ||
geoffb | :-) | 05:24 | |
stevan | hence the recent memoization of method dispatch in chaos.pl | ||
it was about a 20% speed boost on my machine | |||
geoffb | nothing to sniff at. :-) | ||
stevan | geoffb: I guess I make an assumption that the implementation has a resonably fast Map (hash) and Array type | 05:25 | |
most do now adays | |||
geoffb | fair enough. | ||
stevan | its the compilers problem,. not mine ;) | ||
geoffb is just poking at the design to see what goes "boing" | |||
heh | |||
stevan very much appreciates that | 05:26 | ||
I am very interested to see what happens when autrijus starts hacking it into Haskell | |||
the last time it exposed some issues in the design | |||
geoffb | ditto | ||
nodnod | 05:27 | ||
Is autrijus in flight? | |||
stevan | mostly that it was to dependent on Perl 5 OO | ||
literally? | |||
geoffb | right, I vaguely remember that | ||
stevan | I have no idea | ||
oh yeah,.. also did I mention I have obsessive compuslive personality disorder? | 05:28 | ||
geoffb | figuratively, I guess, as in "making his way home" as opposed to "doing a post ICFP hackathon" or "heading to another country not his own", or whatever | ||
stevan | not like wash your hands OCD | ||
just I get obsessed with things,.. like MM purity | |||
geoffb | (which I have) | ||
stevan | I think he is heading to europe,... although I am not sure of that | 05:29 | |
EURO OSCON I think | |||
geoffb | I'm not like a movie character, but I definitely have (undiagnosed) OCD. I just accepted it, and went on with my life. | ||
stevan scored higher on the ADD test then most tests he "took" in high school | |||
geoffb | heh | ||
stevan | and I take way too much pleasure in silly useless things | 05:30 | |
geoffb | That, I think, is generally a good thing | ||
stevan | "All art is quite useless" - Oscar Wilde | ||
geoffb is trying to decide what to do next with his awake time . . . | 05:32 | ||
hmmm . . . catch up on $work, read online for a while, eat some good chocolate, . . . more than one of the above maybe | |||
A little too burnt on massive Forth input to work on the interpreter right now (though from the last book, it's clear my interp needs a major overhaul) | 05:33 | ||
stevan | $work is no fun, chocolate is good,.. | ||
hey actually,.. that reminds me... | |||
geoffb | Yeah, but getting done with $work *is* fun . . . :-) | 05:34 | |
stevan | I wanted to talk with you about an article idea I had while mowing my lawn | ||
geoffb chuckles | |||
stevan | I actually threw it out to chromatic earlier tonight,.. no response yet.,.. last I heard he was on vacation | ||
the title says it all | 05:35 | ||
geoffb | Geeks are so good at thinking during everyday activities. | ||
stevan | Perl for Programming Language Research | ||
basically,. there seems to be a lot of activity lately around this area | |||
geoffb | That seems like a good idea to me . . . but it would either have to be high level or *long* | ||
stevan | you, nothingmuch with the Forth thing | ||
nothingmuch's Blondie | |||
I think it would end up being long | 05:36 | ||
cause you just cant skim this one | |||
geoffb | From what I can tell, chromatic is religious about only doing O'Reilly mail during pure working hours, and he seems to only check it like once or twice a day in big passes | ||
nodnod | |||
Or at least, you shouldn't. :-) | |||
stevan | yeah I used the oreilly.com account,.. since it was work didnt want to bother him if he was on vaca | 05:37 | |
geoffb | He may have gone off again, but I believe he was back as of a week ago | ||
stevan | ah,.. ok | ||
geoffb | Of course, he could be backlogged | ||
stevan | well we will see,.. I am no rush :) | ||
it has always seemed to me though that Perl was at least as good as Smalltalk, LISP, etc | 05:38 | ||
in it's own way of course | |||
geoffb | . . . especially if, like me, you write much slower than you type. So a few thousands words take many hours. | ||
stevan | I tend to blurt out a few hundred words,.. then refactor | 05:39 | |
a couple lawn movings later,.. and I am done :) | |||
geoffb | When I was in school, I was a one pass guy. Tanked for a while, then wrote straight from stream of consciousness. Now I always outline first for anything over about 100 words | 05:40 | |
heh | |||
stevan went to art school,.. you dont really write many papers there | |||
geoffb | Oh? What was your focus? | 05:41 | |
stevan | I dont think I ever wrote an actual "paper" in my life | ||
Fine Art Painting,.. I did 2 years and decided to just learn to wait tables and save my parent some $$ | 05:42 | ||
geoffb | I tried to avoid them. I found only a couple teachers in my life who could actually mark up a paper worth a damn -- most of them just looked to see if you could spell and complete a sentence. | ||
stevan | ok, time for me to go to bed .... | 05:43 | |
good talking to you geoffb | |||
geoffb | My favorite language teacher had a policy that all papers should have approximately the same amount of red ink . . . because everyone can improve. | ||
you too! | |||
have a good sleep | |||
stevan | :D | ||
*sigh* school,.. I never quite understood it | 05:44 | ||
svnbot6 | r7213 | Darren_Duncan++ | /modules/Rosetta-Incubator : Added all 15 initial core modules under lib/, though each is currently just a copy of the same template internally; Added t/00_Compile.t, which checks that all 15 would compile and are the right versions; Added usual svn props for all | ||
geoffb | heh | ||
dduncan | seen mugwump | 05:54 | |
jabbot | dduncan: mugwump was seen 33 days 1 hours 37 minutes 54 seconds ago | ||
rafl | geoffb: I'm currently about to rework the parrot build system for that. Waiting for the comitter bit currently. | 05:59 | |
geoffb: Why? | |||
geoffb | curiosity, I guess. | 06:01 | |
Partly because I just built a new dev machine, and didn't feel like syncing parrot again. :-) | |||
putter | stevan: multi methods.. are external to mm2? | 06:02 | |
dduncan | I'm having a SVN problem, regarding a project on a *different* server than Pugs, and I'm not sure if its at my end or the other end | 06:03 | |
geoffb | putter, it will probably be a while, stevan just headed off to bed about 20 min ago | ||
putter | ah | ||
thanks | |||
geoffb | dduncan, is it HTTP? You could just hit it from a browser and see if it's up. | ||
putter, sure, np | |||
dduncan | everything works fine but committing | 06:04 | |
on commit, it says: The OPTIONS request returned invalid XML in the response: XML parse error at line 1: no element found | |||
putter | good night & | ||
geoffb | night, putter | ||
dduncan, odd, that | |||
Using svn client, or svk? | 06:05 | ||
dduncan | It's mugwump's server, and I tried asking him, but he's not around in this last half day | ||
geoffb | nodnod | ||
dduncan | the client is SVN 1.1.3, the server is SVN 1.1.4 | ||
same one I've been using for the last 2 months | |||
geoffb | wierd. | ||
Sorry man, I've got nothin'. | |||
dduncan | thanks anyway | ||
meppl | guten morgen | 06:16 | |
brentdax waves. | |||
geoffb | morning, meppl | ||
morning, brentdax | |||
meppl | good morning geoffb | ||
dduncan | geoffb, fyi, I did more testing and found that a different project on the same server would still commit, suggesting that the problem is specific to the first project, and not just the server or client | 06:18 | |
geoffb | interesting | 06:19 | |
dduncan | I left more messages for mugwump, and perhaps he can check for corruption on the server side | ||
geoffb | misconfiguration or corruption in the repo, maybe. | ||
dduncan | I had done a clean svn checkout between the first and second instances of the same problem | ||
geoffb | nodnod | ||
dduncan | anyway, I'm going to bed, goodnight | 06:20 | |
nothingmuch | morning | ||
geoffb | gnight, dduncan | 06:24 | |
gmorning, nothingmuch | |||
nothingmuch | hi ho | ||
geoffb | what's on the agenda for today, nothingmuch? Blondie? | 06:25 | |
Khisanth | Brunette! :) | 06:26 | |
geoffb | Mmmm, Blondie . . . | 06:27 | |
geoffb searches for Best of Blondie in his collection | |||
nothingmuch | today - work | 06:28 | |
there's a holiday soon | |||
i've been learning lots of type stuff | |||
(though there is still no tapl =( ) | |||
i am getting a semi clear picture on Milner type inference | |||
and I hope I can implement that WRT luqui's theory tuples | 06:29 | ||
geoffb | nodnod | ||
nothingmuch | and then i hope I can make it partial | ||
geoffb | Rosh Hashana? (forgive my spelling) | ||
nothingmuch | yep | ||
spelling is good | |||
i think it is, anyway | |||
nothingmuch never really knows... there's so much of them this time of year | 06:30 | ||
geoffb | OOC, what is the work week in Israel? | ||
nothingmuch | sun-thu inclusive | ||
geoffb 's guess was correct then | |||
06:55
_jql is now known as jql
|
|||
nothingmuch | given $luqui.svn { when Broken { $nothingmuch.complain } } | 07:08 | |
svnbot6 | r7214 | brentdax++ | Cipher API for cryptographic ciphers: | 07:11 | |
r7214 | brentdax++ | * Cipher base class, including docs | |||
r7214 | brentdax++ | * Cipher::Caesar for shift ciphers (including rot13) | |||
r7214 | brentdax++ | * Tests for Cipher::Caesar | |||
r7214 | brentdax++ | To come: Cipher::Stream and Cipher::Block base classes, docs for Cipher::Caesar, more tests, real ciphers. | |||
r7215 | luqui++ | Wrote intro to theory.pod. | 07:36 | ||
nothingmuch pings luqui | 07:47 | ||
07:56
erg_ is now known as erg
|
|||
nothingmuch | archive.cs.uu.nl/pub/RUU/CS/techrep...04-037.pdf | 08:06 | |
nothingmuch thinks that L::AG will be used to infer blondie's types | 08:07 | ||
it's essentially a middle-order traversal of the tree | |||
with some simple replacement | |||
08:20
Aankh|Clone is now known as Aankhen```,
Aankhen``` is now known as Aankhen``
|
|||
nothingmuch | yummy: āĪ±. āĪ². Ī± ā Ī² | 08:41 | |
sili | . | 08:51 | |
rafl | geoffb: You asked about debianisation of parrot lately. Do you want to help me with that? | 08:57 | |
gaal | brentdax: ping | 09:00 | |
svnbot6 | r7216 | iblech++ | * Usual svn props. | 11:31 | |
r7216 | iblech++ | * util/svnlog2graph.pl: The scaling is adjusted automatically now. | |||
r7216 | iblech++ | * STATUS: Minor updates WRT MM2. | |||
r7217 | iblech++ | ext/Config-Tiny: | 11:55 | ||
r7217 | iblech++ | * t/basic.t: s/ok !.../dies_ok {...}/ | |||
r7217 | iblech++ | * Config::Tiny: Removed dead code (a pugsbug was fixed). | |||
r7217 | iblech++ | This means Config-Tiny's tests pass again. | |||
masak | is it possible to force list context in perl 6? | 12:01 | |
nothingmuch | yes | 12:02 | |
* does that | |||
masak | thx, i'll try it | ||
nothingmuch | if it doesn't work post the code, maybe we can figure it out | ||
nothingmuch wishes luqui would fix his svn already | |||
i have a nice, shiney, failing tests for him to fix =) | 12:03 | ||
pasteling | "masak" at 130.238.83.176 pasted "I have a problem with context in the calculate_n() method" (73 lines, 2.3K) at sial.org/pbot/13409 | 12:07 | |
masak | * didn't work :( | ||
help appreciated | 12:08 | ||
nothingmuch | masak: got a line number? | ||
oh, calculate_n | |||
masak | yes, the reverse call, more specifically | 12:09 | |
nothingmuch | reverse is from prelude, right? | ||
masak | i don't know | ||
nothingmuch | is it forcing list context on calculate_z? or is it returning a scalar? | ||
okay | |||
i don't have a working pugs ATM | 12:10 | ||
byt try this: | |||
@.n = $reversed_pattern.calculate_z(); | |||
say @.n; | |||
and then @.n = reverse @.n; | |||
masak | oki, will try that | ||
brb | |||
nothingmuch | so that we know for sure who is the guilty party | ||
then we may want to fix revere, or alternatively, provide a new test case for pugs | |||
masak | ah! @.n is a one-element list all the time | 12:12 | |
svnbot6 | r7218 | iblech++ | ext/Set: | ||
r7218 | iblech++ | * Set::Hash: s/sub infix:<...> is export/multi *infix:<...>/ | |||
r7218 | iblech++ | * t/overload.t: Removed a now-obsolete pugsbug workaround. | |||
r7218 | iblech++ | This means Set's tests pass again, and, as some modules depend on Set, they | |||
r7218 | iblech++ | should work again as well. | |||
nothingmuch | okay, so it's time to debug calculate_z =) | 12:13 | |
masak | yes | ||
rafl | How to declare class methods? | ||
masak | hm, "return @.z" seems like the right thing to me... | ||
nothingmuch | rafl: hmm.. good question | 12:14 | |
since overriding 'method new' seems to work, i guess you go with that | 12:15 | ||
but ask stevan | |||
masak: it does seem right | |||
try return [@.z] | |||
just to be sure | |||
masak | oki | ||
still same problem | 12:16 | ||
nothingmuch | hmm =( | ||
say want(); before the return | |||
masak | Scalar ((mkType "Scalar")) | 12:17 | |
nothingmuch | okay | ||
now, try this:. | |||
@.n = reverse $reversed_pattern.calculate_z(); | |||
return @.n; | 12:18 | ||
rafl | nothingmuch: method methodname(Class $class: ...) {...} seems to do the job. | ||
nothingmuch | and see if it prints the same | ||
masak | nothingmuch: oki | ||
nothingmuch | rafl: hmm... sounds right | ||
although $class might not necessarily be Class ;-) | |||
rafl | Err, Why? | ||
nothingmuch | you can override it | ||
rafl | What does ::?CLASS mean, btw? | ||
nothingmuch | ::?CLASS::Bar is Foo::Bar if $?CLASS eq "Foo" | 12:19 | |
rafl | nothingmuch: Doesn't every class somehow inherit from 'Class'? | ||
nothingmuch | it's something you can put in a namespace directly | ||
rafl: no... but i'm guessing for sanity every class at least does Class ;-) | |||
i'm just being silly though, don't listen to me | |||
rafl | Aye. :-) | ||
nothingmuch | (btw, in which case methodname (Class $class: ...) will still work | 12:20 | |
masak | nothingmuch: the want() is now "List (Any)" but the end result is still a scalar "0 0 0 4 0 0 2 0 0 0 0 21" | ||
nothingmuch | masak: style question - why do you say ./index_of_first_mismatch(substr(...\n<lots of whitespace>) and not ./index_of_first_mismatch(\n<only 4 more spaces> ? | 12:21 | |
hmm | |||
okay | |||
that's a good thing | |||
say "@.z" in there, and make sure it's right | |||
oh wait | |||
sorry | |||
@.z has 21 elems, right? | |||
okay... say @.n and +@.n and make sure they're OK | |||
masak | nothingmuch: i wanted to vertically align the arguments | ||
nothingmuch | and say want in calculate_n | ||
masak | but i see they have become misaligned anyway | 12:22 | |
nothingmuch | masak: they're still vertically aligned with a \n, but it's more space efficient IMHO | ||
masak | nothingmuch: ok, i'll try that | ||
nothingmuch | but nevermind, it's not really an issue | ||
wait | |||
svnbot6 | r7219 | iblech++ | Recurrence: | ||
r7219 | iblech++ | * Set::Symbols: Again, s/sub infix:<...> is export/multi *infix:<...>/ | |||
r7219 | iblech++ | This means Recurrence's and DateTime-Set's tests pass again. | |||
nothingmuch | what is @.z? | ||
who do 0, 0, 0, 4, 0, 0, 2, etc belong to? @.z? or something else? | 12:23 | ||
masak | nothingmuch: an array of integers, and yes, the numbers belong to it | ||
the methods are calculating information about a pattern later to be used for searching | |||
nothingmuch | aye | 12:24 | |
okay, so isn't it the last element of @.z that's being screwed up? | |||
@.z[$k] = ./index_of_first_mismatch(.... # bad ctx? | |||
masak | "say +@.z" from within calculate_z() prints 12 | 12:25 | |
but "say +@.n" from within calculate_n() prints 0 | |||
nothingmuch | hmm | ||
odd | |||
try doing the reverse manually? | |||
masak | hmm :( | 12:26 | |
nothingmuch | it's not that hard: | ||
masak | what do you mean about # bad ctx, btw? | ||
nothingmuch | i mean that maybe that assignment has a bad value | ||
hmm | |||
masak | but calculate_z() works ok | ||
nothingmuch | yeah, i know that now =) | 12:27 | |
anywho | |||
masak | trying reverse manually :/ | ||
nothingmuch | my @new; for @.n -> $x { unshift @new, $x }; say "@new"; @.n = @new; say "@.n"; return @new; | ||
masak | thx | 12:28 | |
i'll do it inline, though | |||
@.n = (); for $reversed_pattern.z -> $x { unshift @.n, $x } | 12:29 | ||
that worked | 12:30 | ||
nothingmuch | okay | ||
lets find reverse | |||
masak | yes, let's :> | ||
i want to have a quiet chat with reverse | |||
nothingmuch | it's not in the prelude | 12:31 | |
Prim.hs | |||
masak | ok | ||
a few weeks ago i finally understood the subtleties of reverse in p5 | |||
now i'm being bitten by what seems like reverse bugs in p6... | 12:32 | ||
nothingmuch | hehe | ||
masak | nothingmuch: i don't read haskell very well | ||
nothingmuch | this is no subtlety... it's a bug =) | ||
masak: add some tests for reverse if you like | |||
i'll try to crack it | |||
masak | ok, i'll try and make a minimal test case | ||
nothingmuch | t/builtins/lists/reverse.t | 12:33 | |
coral | .g "focused LEDs" | ||
nothingmuch | i'm guessing it's not imposing the right context | ||
masak | ?eval my $a = (12, 34); reverse $a | ||
evalbot_7219 | '43 21' | ||
coral | oh, i'm sorry, ww | ||
masak | is this right? | ||
nothingmuch | aha | 12:34 | |
that stringifies | |||
masak | yes | ||
nothingmuch | ?eval my $a = (12, 34); list reverse $a | ||
evalbot_7219 | ([12, 34]) | ||
nothingmuch | phoeey | ||
masak | :) | ||
it's congruent with the annoying behaviour in my program | |||
nothingmuch | ?eval sub foo { my $a = (12, 34); return my @n = reverse $a }; my @m = foo(); @m; | 12:35 | |
evalbot_7219 | Error: No compatible subroutine found: "&my" | ||
nothingmuch | ?eval sub foo { my $a = (12, 34); my @n; return @n = reverse $a }; my @m = foo(); @m; | ||
evalbot_7219 | [[12, 34]] | ||
nothingmuch | blech | ||
masak | indeed | ||
nothingmuch | what was actually the problem? | ||
masak | that reverse stringifies | ||
nothingmuch | i mean, what was the last thing we tried before it succeeded? | ||
masak | hand-code reverse | ||
nothingmuch | no, one step earlier | 12:36 | |
masak | uh... (backlogging) | ||
nothingmuch | i didn't see the code, so i may have lost synch | ||
masak | printing the numifications of the @.z and @.n values | ||
which were 12 and 0, respectively | 12:37 | ||
svnbot6 | r7220 | iblech++ | * t/builtins/math/rounders.t: skip all tests undef PIL2JS and PIL-Run (no eval). | 12:38 | |
r7220 | iblech++ | * ext/MIME-Base64/t/Base64.t: Temporarily skip all tests so smoke loops | |||
r7220 | iblech++ | have a chance of finishing again; it seems to be a Parrot-related issue | |||
r7220 | iblech++ | anyway. | |||
r7220 | iblech++ | * Pugs.Parser: Extremely minor cosmetic fix. | |||
r7220 | iblech++ | * Added the standard shebang line to tests. | |||
masak | i think we did $reversed_pattern.calculate_z(); @.n = reverse $reversed_pattern.z; return @.n; | 12:39 | |
?eval my @z = (12, 34); my @n = reverse @z; say @n | 12:40 | ||
evalbot_7220 | 3412 bool::true | ||
masak | this works fine | ||
nothingmuch | ?eval class { Foo { } | 12:41 | |
evalbot_7220 | Error: unexpected "{" expecting term postfix, operator, ":", ",", postfix conditional, postfix loop, postfix iteration, ";", "}" or end of input | ||
masak | maybe it's the access method... | ||
nothingmuch | ?eval class Foo { has @.n; method foo { (1, 2, 3) }; method bar { return @.n = reverse ./foo } } | ||
evalbot_7220 | undef | ||
nothingmuch | ?eval class Foo { has @.n; method foo { (1, 2, 3) }; method bar { return @.n = reverse ./foo } } Foo.new.bar; | ||
evalbot_7220 | Error: No compatible subroutine found: "&foo" | ||
nothingmuch | ?eval class Foo { has @.n; method foo () { (1, 2, 3) }; method bar { return @.n = reverse ./foo } } Foo.new.bar; | ||
evalbot_7220 | Error: No compatible subroutine found: "&foo" | ||
nothingmuch | ?eval class Foo { has @.n; method foo () { (1, 2, 3) }; method bar { return @.n = reverse $?SELF.foo } } Foo.new.bar; | 12:42 | |
evalbot_7220 | \'3 2 1' | ||
nothingmuch | ?eval class Foo { has @.n; method foo () { (1, 2, 3) }; method bar { return @.n = reverse $?SELF.foo } } my @n = Foo.new.bar; say @n; say +@n; | ||
evalbot_7220 | 3 2 1 1 bool::true | ||
nothingmuch | aha | ||
masak | ?eval class Foo { has @.z; } my $f = Foo.new; $f.z = (12, 34); my @n = reverse $f.z; @n | ||
evalbot_7220 | [[12, 34]] | ||
nothingmuch | it makes one concatenated thingy | ||
masak | yes | ||
nothingmuch | okay, i'm adding my test case | ||
masak | nothingmuch++ | 12:43 | |
nothingmuch | windows is making my head hurt | ||
masak | i know, it tends to do that | ||
?eval class Foo { has @.z = (12, 34); } my $f = Foo.new; my @n = reverse $f.z; @n | 12:44 | ||
evalbot_7220 | Error: unexpected "=" expecting trait, "handles", ";" or "}" | ||
masak | ah | ||
?eval class Foo { has @.z; } my $f = Foo.new(:z(12, 34)); my @n = reverse $f.z; @n | 12:45 | ||
evalbot_7220 | [34, 12] | ||
masak | ah-ha! | ||
oh :) that's actually correct... | |||
nothingmuch | =) | ||
i think the problem is the cxt passing | |||
masak | ok | ||
i suspected that too, but i don't seem to find it and you already have, so... | 12:46 | ||
besides, my program works now | |||
thx | |||
nothingmuch | isn't | 12:48 | |
my @n = do { | |||
(1, 2, 3) | |||
} | |||
say @n; | |||
supposed to work? | |||
i remember an S or an A saying that }\s*?\n does not require a ; | |||
masak | me too, vaguely | 12:49 | |
but add one for clarity anyway :) | |||
nothingmuch | it's a syntax error in pugs | 12:50 | |
added another test | 12:51 | ||
svnbot6 | r7221 | nothingmuch++ | r8773@syeeda: nothingmuch | 2005-10-02 14:45:15 +0200 | 12:54 | |
r7221 | nothingmuch++ | maskak++ 's reverse bug | |||
r7222 | nothingmuch++ | log want()s all around masak++ 's bug, and test that they are all List (Any) | |||
rafl | How to declare private class variables? | 12:55 | |
As well as public ones. | |||
gaal | rafl: class Foo; has $:a_public_var; has $.a_public_var; | 12:58 | |
masak | gaal: you mean $:a_private_var; | 12:59 | |
rafl | gaal: Thought that's the way to define instance variables. | 13:01 | |
masak | rafl: ah, use my and our for class variables | 13:02 | |
rafl | Ah, OK. | ||
masak | see S12 | ||
nothingmuch | no prefix needed, btw | 13:03 | |
gaal | oh, *class* vars, oops, right. | ||
obviously what i need is to finish this coffee. | |||
masak | my generates access methods, our doesn't | ||
...i think | 13:04 | ||
nothingmuch is going to ask his boss to not do windows work | |||
it's really frustrating | |||
every time I think i finally managed to simplify things so they are not a big conglomerate of special cases, it turns out there is yet another catch | 13:05 | ||
rafl just started porting XML::SAX, if anyonce cares. | 13:08 | ||
masak | rafl: will you use it for something afterwards? | 13:10 | |
rafl | masak: XML-RPC would be nice to have. Of course there are lots of other things to use an XML parser for. Jabber/XMPP for example.. :-) | 13:11 | |
Hm, how to call class methods? ::Foo::Bar.meth() doesn't work for me. | 13:13 | ||
masak | rafl: xslt, too :) | 13:14 | |
rafl | masak: Of course! | ||
masak | rafl: that seems to be the reasonable way... isn't that how new is called? | ||
rafl | I have class XML::SAX-0.01; method load_parsers(Class $class: Str $?dir, Str $?file) { ... }; and do ::XML::SAX.load_parsers(); | 13:15 | |
Hm, something about optional arguments seems to be broken. | 13:22 | ||
XML::SAX.load_parsers("foo", "bar") works. | 13:23 | ||
rafl wonders how File::Spec can work. It uses quite similar code. | 13:24 | ||
Is there already a test for class methods with optional arguments? If not, where should it go? t/oo/methods/class.t ? | 13:38 | ||
nothingmuch arrives at home | 13:51 | ||
luqui! wake up! | 14:00 | ||
rafl | Hm. File::Spec.splitpath("/foo/bar") returns <obj:Module>. Why? | 14:01 | |
nothingmuch | shouldd it really be done as class methods? | ||
this interface issue has always bothered me about File::Spec | |||
i don't understand what's so bad about calling File::Spec::splitpath | |||
but it does hinder the user's ability to import, and makes the code yucky | 14:02 | ||
rafl | Hm, use File::Spec <splitpath>; splitpath("foo") works. | ||
Calling File::Spec::spitpath doesn't. | 14:03 | ||
nothingmuch | how is it documented to work/ | 14:04 | |
rafl | It's not documented how to call it without importing the subs. | 14:06 | |
nothingmuch | hmm | 14:07 | |
beh. File::Spec is a horrible interface =( | |||
it should have a .new | |||
that is, File::Spec is a factory | |||
and it creates a File::Spec::Unix, or File::Spec::Win32 based on $?OS | 14:08 | ||
'use File::Spec' should export functions that call these methods on a singleton | |||
based on $?OS | |||
rafl | You're welcome to rework it. :-) | ||
nothingmuch | anyway, File::Spec::Unix etc is sub yadda | 14:09 | |
so File::Spc::splitpath *should* work | |||
you know what? no need for objects | |||
rafl | No compatible subroutine found: "&File::Spec::splitpath" | ||
nothingmuch | the current version is actually good enough | ||
oh wait | 14:10 | ||
stevan | rafl: File::Spec was one of the early modules ported,.. and it is probably suffering from neglect | ||
nothingmuch | that's because of the horrible hack at the top | ||
stevan | have you ran the test suite? that should spotlight issues | ||
nothingmuch | rafl: okay, one idea is to hack File::Spec so that it loads the right one to itself and to it's caller | 14:11 | |
try to paste the if($?OS eq "MSWin32") part under File::Spec-0.0.1 too | |||
rafl | Well, simply importing everything I need is enough for me, currently. | 14:16 | |
nothingmuch | the issue is that File::Spec doesn't really have any functions | ||
it just delegates to the module that it loads | 14:17 | ||
so that importing goes to it instead of to File::Spec | |||
but it doesn't contain any functions | |||
rafl | Ah. | 14:18 | |
?eval class Foo { my constant $:bar = 42; method bar { $:bar } } Foo.new.bar.say | 14:19 | ||
evalbot_7222 | bool::true | ||
rafl | Shoudn't that say '42'? | ||
nothingmuch | ?eval class Foo { my constant $:bar = 42; method bar { $:bar } } Foo.new.bar | 14:20 | |
evalbot_7222 | \undef | ||
nothingmuch | that's what's confusing you... it printed the result of the say | ||
?eval class Foo { my $:bar = 42; method bar { $:bar } } Foo.new.bar | 14:21 | ||
evalbot_7222 | \undef | ||
rafl | Well, \undef is false nevertheless, isn't it? | ||
nothingmuch | odd | ||
?eval class Foo { my $:bar = 42; method bar { $:bar = 42; $:bar } } Foo.new.bar | |||
evalbot_7222 | \42 | ||
nothingmuch | hmm... i'm guessing the first assignment never happens | ||
?eval class Foo { my $:bar = do { say "evaling"; 42 }; method bar { $:bar } } Foo.new.bar | |||
evalbot_7222 | evaling \undef | ||
nothingmuch | phhoey | 14:22 | |
lets see if it's the closure that's not sharing | |||
?eval class Foo { my $:bar; method bar { $:bar } method set { $:bar = 42; $?SELF }} Foo.new.set.bar | |||
evalbot_7222 | Error: No compatible subroutine found: "&bar" | ||
nothingmuch | ?eval class Foo { my $:bar; method bar { $:bar } method set { $:bar = 42; $?SELF }} my $x = Foo.new; $x.set; $x.bar; | ||
evalbot_7222 | \42 | 14:23 | |
nothingmuch | this seems like a bug | ||
i'm guessing the first $:bar container goes out of scope some how | |||
rafl | Could you please write a test for it? | 14:26 | |
svnbot6 | r7223 | stevan++ | Perl6::MetaModel 2.0 - | 14:31 | |
r7223 | stevan++ | * some work on Synopsis 12.5 | |||
r7223 | stevan++ | * added lib6/ directory and began a *very rough* translation of the | |||
r7223 | stevan++ | meta-model to Perl 6 code | |||
rafl | Does someone wants to port Config::Tiny to real OO and maybe to add read_string and read_fh methods? | 14:41 | |
nothingmuch | you completely misunderstood Config::Tiny! | 14:42 | |
it's purpose is to be small | |||
so that it loads extra fast | |||
it doesn't need any features | |||
that stuff will just add "bloat" | |||
rafl | OK, could someone please write Config::Bloated? :-) | 14:43 | |
nothingmuch | you should ask Damian to port Config::Std | 14:44 | |
rafl | nothingmuch: The original Config::Tiny has a read_string method, btw. | ||
Ah, iblech already did it: tpe.freepan.org/repos/adamk/Config-...ig/Tiny.pm | |||
Why isn't that version used for pugs? | |||
nothingmuch | hmm | 14:45 | |
we forgot about freepan | |||
;-) | |||
ingy: ping | |||
rafl | I want to what methods can be called on Arrays, but I can't find it in the Prelude. Where should I look for that? | 15:10 | |
I have an array of hashes: @a = ({Name => 'foo'}) and I want to add another hash as the value of a new hash key to the last hash in the array. How to do that? @array[-1]<Foo><key> = $val? | 15:19 | ||
It should look like ({Name => 'foo', Foo => {key => $val}) afterwards. | 15:20 | ||
nothingmuch | rafl: Prim.hs has some stuff | 15:45 | |
e.g. List::elems | |||
i suspect this is handled very dynamically | |||
as for the hash assignment - that sounds right | 15:46 | ||
rafl | nothingmuch: OK, how to do that if I wan't interpolation in the assignment? @array[-1]{Features}{$0} = {$1} seems to try to execute &Features. | 15:47 | |
nothingmuch | either << >> or the french variant | 15:48 | |
or use {"Features"} | |||
{ no longer auto bareword } | |||
@array[-1]<Features>{$0} | 15:49 | ||
but that's ugly ;-) | |||
i would use @array[-1]{'Features'}{$0} or @array[-1]<Features><<$0>> | |||
but with french quotes, since I like unicode | |||
rafl | nothingmuch: That gives me [{('Features' => {.}), ('Name' => 'foo')}]. $0 and $1 are correctly set. | ||
nothingmuch | odd | 15:50 | |
what about @array[-1]<Features> = { $0 => $1 } ? | |||
?eval my @array = { Name => 'foo' }; @array[-1]<Features><key> = "va"; | |||
evalbot_7223 | Error: Can't modify constant item: VUndef | ||
nothingmuch | ?eval my @array = { Name => 'foo' }; @array[-1]<Features><key> = "val"; @array; | ||
evalbot_7223 | Error: Can't modify constant item: VUndef | ||
nothingmuch | ?eval my @array = { Name => 'foo' }; @array[-1]<Features>= { key = "val"; @array; | 15:51 | |
evalbot_7223 | Error: unexpected end of input expecting end of input, ";", statements or "}" | ||
nothingmuch | ?eval my @array = { Name => 'foo' }; @array[-1]<Features>= { key => "val"}; @array; | ||
evalbot_7223 | Error: Can't modify constant item: VUndef | ||
nothingmuch | bah | ||
?eval my @array = ({ Name => 'foo' }); @array[-1]<Features> = { key => "val"}; @array; | |||
evalbot_7223 | Error: Can't modify constant item: VUndef | ||
nothingmuch | ?eval my @array = ({ Name => 'foo' }); @array[-1]{'Features'} = { key => "val"}; @array; | ||
evalbot_7223 | Error: Can't modify constant item: VUndef | ||
nothingmuch | ?eval my @array; @array[0] = { Name => 'foo' }; @array[-1]{'Features'} = { key => "val"}; @array; | ||
evalbot_7223 | [{('Features' => {('key' => 'val')}), ('Name' => 'foo')}] | ||
nothingmuch | ?eval my @array; @array[0] = { Name => 'foo' }; @array[-1]<Features><key> = "val"; @array; | 15:52 | |
evalbot_7223 | [{('Features' => {('key' => 'val')}), ('Name' => 'foo')}] | ||
nothingmuch | ?eval my @array; @array[0] = { Name => 'foo' }; my $x = "key"; @array[-1]<Features>{$key} = "val"; @array; | ||
evalbot_7223 | Error: Undeclared variable: "$key" | ||
nothingmuch | ?eval my @array; @array[0] = { Name => 'foo' }; my $x = "key"; @array[-1]<Features>{$x} = "val"; @array; | ||
evalbot_7223 | [{('Features' => {('key' => 'val')}), ('Name' => 'foo')}] | ||
nothingmuch | Works For Meā¢ | ||
(after many tries, admittedly ;-) | 15:53 | ||
rafl | nothingmuch: Hm, maybe you wan't to take a look at the code: pastebin.com/380603 - My code is nearly identical and doesn't work though. | 15:54 | |
nothingmuch | line? | 15:55 | |
rafl | nothingmuch: 48 | ||
nothingmuch | can't think of anything =( | 15:56 | |
rafl | Running XML::SAX.load_parsers.perl.say gives me that: \Class.new(('known_parsers' => [{('Features' => {.}), ('Name' => MkMatch {matchOk = True, matchFrom = 1, matchTo = 19, matchStr = "XML::SAX::PurePerl", matchSubPos = [], matchSubNamed = {}})}, {('Features' => {.}), ('Name' => MkMatch {matchOk = True, matchFrom = 1, matchTo = 16, matchStr = "XML::SAX::Expat", matchSubPos = [], matchSubNamed = {}})}, {('Features' => {.}), ('Name' => MkMatch {matc | 15:57 | |
nothingmuch loves builtin Data::Dumper =) | 15:58 | ||
rafl | Well, it could be a bit more pretty, though. | ||
nothingmuch | i bet autrijus could be temped into using AGs to write a pretty printer ;-) | 15:59 | |
rafl | I doubt that would fix my problem. ;-) | 16:01 | |
nothingmuch | beh | 16:03 | |
?eval {.} | |||
evalbot_7223 | Error: unexpected "." expecting ";", statements or "}" | ||
nothingmuch | that sucks | ||
it's not even .perl ;-) | |||
rafl | :-( | 16:06 | |
nothingmuch | rafl: do you think you could reproduce that? | 16:08 | |
copy XML::SAX into a test | |||
take away code till it stops working? | |||
rafl | nothingmuch: I'll try. | ||
nothingmuch: Where should that test go? | |||
nothingmuch | pugsbugs | 16:09 | |
rafl | nothingmuch: Can you exaplain that error: *** Can't modify constant item: VUndef | 16:20 | |
at nested_hash.t line 28, column 33-59 | |||
nested_hash.t line 58, column 4-41 | |||
nested_hash.t line 58, column 1-42 | |||
pastebin.com/380632 | |||
nothingmuch | i'm guessing it's an out of bounds assignment | 16:21 | |
perhaps @config.push didn't work as expected | |||
since [-1] returned a constant undef instead of a container (since there is no elem) it gave up | |||
rafl | @config.perl.say before the failing assignment gives me: [(('Name' => MkMatch {matchOk = True, matchFrom = 1, matchTo = 19, matchStr = "XML::SAX::PurePerl", matchSubPos = [], matchSubNamed = {}}))] | 16:22 | |
nothingmuch | anyway, i need to go to dinner | ||
blech | |||
rafl | Bye. | ||
nothingmuch doesn't know what to say | |||
rafl | Oh, nein.. ich hab' nur noch zwei Blaettchen und kann bis Dienstag nicht einkaufen gehen. Duh! | 16:25 | |
nothingmuch summons luqui once more | 17:21 | ||
it's already noon over there, right? | 17:22 | ||
ingy | nothingmuch: eh? | 17:33 | |
nothingmuch | nothing... /me was just noting that freepan needs more P.R. | ||
how's that patch application coming along? | |||
ingy | ? | ||
nothingmuch | Test::Base ;-) | 17:34 | |
ingy | sorry... where is the patch? | ||
nothingmuch | i forgot again | ||
i'll regenerate | |||
against .43 | |||
ingy | mail to [email@hidden.address] | ||
nothingmuch | you get to integrate, since it took you so long | ||
okay | |||
ingy | okay | 17:35 | |
*kisses*& | |||
nothingmuch | sent | 17:40 | |
18:28
typester is now known as typeout
|
|||
Aankhen`` goes to sleep. | 18:35 | ||
nothingmuch | ciao | ||
Aankhen`` | G'night. | ||
geoffb | rafl, sure, I've always wanted to learn more about Debian packaging. What should I read to get (more) up to speed? | 19:29 | |
19:41
typeout is now known as typester
|
|||
wolverian | geoffb: www.debian.org/doc/manuals/maint-gu...ex.en.html | 19:57 | |
geoffb | wolverian, anything else, or will it all be pointed to from there? | 20:03 | |
wolverian | I'm not sure, I'm in the same process as you are - learning. :) | ||
geoffb | (and thanks for the link) | ||
ah, OK | |||
rafl, anything else to look for besides what wolverian just linked? | |||
wolverian | (looking into updating the debian irssi-snapshot from SVN) | ||
geoffb | (for when he gets back :-) | 20:04 | |
wolverian | (which has dismally failed thus far.. :) | ||
geoffb | ah | ||
geoffb would like to debianize all of his code, and just host a package pool | |||
but it | |||
's always been a low-priority task | |||
FEK | |||
svnbot6 | r7224 | stevan++ | Perl6::MetaModel 2.0 - | 20:33 | |
r7224 | stevan++ | * added implementation of singleton methods using AUTOLOAD and Roles | |||
r7224 | stevan++ | to be honest, I really dont like it, however the more I read about | |||
r7224 | stevan++ | singleton methods, the more I think they need to actually be integrated | |||
r7224 | stevan++ | into the MM itself (it would make class-methods cleaner thats for sure) | |||
wolverian | geoffb: oh, you have code of your own? ;) | 20:38 | |
K | where is the official PAR website? | 20:43 | |
revdiablo | search.cpan.org? | 20:45 | |
obra | par.perl.org, but it got blown away recently in a disk outage | 20:52 | |
K | i noticed, it appeared to be a chinese blog | ||
or something | |||
obra | That's autrijus' girlfriend. | ||
Likely, it's the only thing still live on that box | 20:53 | ||
nothingmuch | oh luqui where art thou | ||
does anybody know to diagnose svn server errors? | 20:54 | ||
luqui's svn says: Berkeley DB error: PROPFIND request failed on '/svn/misc': Could not open the requested SVN filesystem | |||
sounds like a runaway lock to me... either that or data corruption | |||
rafl | geoffb: What link? | 21:26 | |
geoffb: Fine. Let's talk about co-maintainership for pugs and parrot tommorow, OK? | 21:27 | ||
geoffb | rafl, OK | 21:28 | |
rafl, I've got a lot to learn, so you may need to do some teaching . . . . | |||
rafl | geoffb: That's fine with me. | 21:29 | |
geoffb | wolverian, what, you're surprised? I do occasionally do *something* of value, besides take care of my kids. :-) | ||
rafl, fair enough. | |||
rafl | geoffb: What did wolverian link? "22:04 < geoffb> rafl, anything else to look for besides what wolverian just linked?" | ||
geoffb | wolverian geoffb: www.debian.org/doc/manuals/maint-gu...ex.en.html | ||
"Debian New Maintainers' Guide" | 21:30 | ||
rafl | geoffb: Well, as I last read the new-maint-guide it was kind of outdated and not very complete. | ||
geoffb | Oh, OK. | ||
rafl | geoffb: But it's a good starting point nevertheles. | ||
revdiablo | Heh, it's good to start out being out of date and incomplete? | ||
geoffb | Other places to look as well? I tend to dive deep for a couple days at a time on something, so it's good to have a queue of stuff to read | 21:31 | |
I'll backlog . . . | 21:32 | ||
geoffb swaps back in "Watching Quantum Leap" task | |||
rafl | geoffb: Well, the policy is always good to read. The whole new maintainers corner on debian.org/devel as well. | 21:36 | |
geoffb: I'll send you some further links tomorrow. I'll take a bath now. Bye! | |||
21:39
flgr__ is now known as flgr
|
|||
geoffb | thx, rafl . . . ttyl | 21:56 | |
wolverian | geoffb: oh, I was just comparing you to myself. I'm far too lazy to be productive. :) | 22:03 | |
dudley_ | rafl: ping | 22:05 | |
rafl | dudley_: pong | 22:25 | |
dudley_ | what are you planning to do with parrot's build system? | 22:26 | |
rafl | dudley_: Well, changing it. Not sure how, yet. Currently it uses the MANIFEST to decide where files should be installed that's ought to change. | 22:28 | |
dudley_ | I'm just curious becuase I was going to try to port parrot to VMS a long time ago, but the build system was too unixy for it to work at all | 22:29 | |
rafl | dudley_: Well, what's the exactly the problem with VMS? We could write a new, more portable, build system together. It's ought to change anyway, because it doesn't support shared-lib builds and parallel builds very well. | 22:30 | |
sili | i thought parrot was supposed to be portable? | ||
dudley_ | VMS doesn't have a 'make' that works | ||
rafl | sili: It's thought to be, but it isn't. | 22:32 | |
dudley_: What does it use then? | |||
dudley_ | there's a makelike utility called mms | ||
sili | there goes my dream of parrot on win3.11 | 22:33 | |
rafl | Well, at least a LSB compliant version would be great. | ||
rafl goes to bed now. See you tomorrow. | |||
dudley_ | 'night | ||
dduncan | nighteynight | 22:34 |