|
#parrot Parrot 0.5.2 Released | parrotcode.org/ | see www.parrotcode.org/misc/parrotsketch-logs/ for logs Set by moderator on 6 February 2008. |
|||
| Tene | is --target=parse output yaml? | 00:11 | |
| looks almost like yaml... | 00:12 | ||
| particle | no | ||
| Tene | Is it anything that any perl modules know how to read? | ||
| particle | no | ||
| not yet. | |||
| Tene | 'kay | 00:13 | |
| particle | i'm working on yaml input/output for past | ||
| Tene | Is it possible to get a parse tree object in any parrot-hosted language yet? | 00:14 | |
| particle | hrmm, not sure about that. | 00:15 | |
| it should be *possible* | 00:16 | ||
| Tene | I've been wanting to actually use Rules in parrot languages instead of just to compile parrot languages for a while now, actually. | ||
| particle | ok, well, we haven't hooked pge into rakudo yet | 00:17 | |
| Tene | Not enough to actually look to see if I could do it, though, obviously. Looking now, though. | ||
| Yeah, I heard someone mention they were working on it. | |||
| particle | pmichaud was/is | ||
| jonathan | particle: Got a patch here to implement the extra sub insepection info that was discussed in #ps yesterday. | 00:18 | |
| Tene | jonathan: nice work! | ||
| jonathan++ | |||
| jonathan | Not got extensive tests for it, but implemented arity in terms of it, and that test passes. | ||
| Somehow my editor managed to get into "throw tabs all over the place" mode, but once I've fixed that up I'll ci. | 00:20 | ||
| particle | sweet. | 00:21 | |
| if you get yourself vim, it's easy | |||
| :set et sw=4 | |||
| :retab | |||
| :W | |||
| er, :w | |||
| jonathan | particle: Visual Studio. | ||
| purl | rumour has it visual studio is pretty nice | ||
| particle | jonathan: i don't know how to use that stinkin' editor | ||
| jonathan | I use it mostly for the debugger. | 00:22 | |
| particle | you could load the file in vim just to do fixups | ||
| jonathan | particle: I did the fixups in VS. ;-) | ||
| Find/replace. | |||
| particle | urk. ok. | ||
| jonathan | I don't even have vim installed. | ||
| particle | can you remove trailing ws, too? | ||
| your files often have that monstrosity too | |||
| jonathan | I'd prefer to remove the test that whines about it. | 00:23 | |
| I mean seriously, why? | |||
| particle | i *hate* trailing whitespace | 00:24 | |
| jonathan | Strangely, I don't ever notice it... | ||
| PerlJam | particle: that's an odd thing to hate. :) | ||
| Tene | "trailing space"-- | ||
| particle | it distracts me from the code | ||
| why the heck is my cursor in this strange position, when i told it to go to the end of the line? | 00:25 | ||
| Tene | So a fun project might be getting Wx working in parrot. | 00:26 | |
| PerlJam | I guess I just delete trailing whitespace when ever I encounter it, but it's so rare that I'm not that bothered by it. | ||
| jonathan | PerlJam: Same. | 00:27 | |
| particle: Just for you, I removed the two trailing whitespaces I'd left behind. | |||
| particle | it's so easy to fix. especially in an editor with macro support | 00:28 | |
| jonathan mumbles something about a pre-commit hook | |||
| Coke | that would cut down on a lot of cleanup work. :| | 00:29 | |
|
00:29
cognominal_ joined
|
|||
| particle | robrt *hates* commit hooks :( | 00:29 | |
| so we were forced to use tests | 00:30 | ||
| bgeron | can't you install those hooks on the client side? | 00:32 | |
| PerlJam | If you're using git (for instance) locally, it has a hook that does the trailing whitespace check | 00:36 | |
| I don't think the vanilla svn client can do local hooks (at least I've never tried it or run across such a thing) | 00:37 | ||
| svnbotlt | r25558 | jonathan++ | trunk: | 00:39 | |
| : [core] Implement inspect and inspect_str on the Sub PMC, making various bits of information about the arguments it takes available. Re-implement arity in terms of inspect_str. As a bonus, the data is now cached, so it'll perform better. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25558 | |||
| Tene returns to grab that commit before leaving. | 00:40 | ||
| jonathan | Tene: Por favor, write some more tests for it in t/pmc/sub.t, if you have time. ;-) | 00:41 | |
| jonathan needs to sleep real soon now | |||
| Tene | jonathan: I've made a note to do so. | ||
| :) | |||
| PerlJam | is inspect_str sort of like a serialization of inspect? | ||
| PerlJam looks at the duff | 00:42 | ||
| er, diff | |||
| jonathan | PerlJam: No, inspect gives you a hash of all data, inspect_str just gives you the one bit you ask for. | ||
| PerlJam | interesting. It certainly made arity much shorter :) | 00:44 | |
| introspection++ | |||
|
00:49
Limbic_Region joined
|
|||
| jonathan has the Visual Studio .Net SDK. | 00:51 | ||
| jonathan sleeps | 01:00 | ||
| Coke | particle: I know Robrt doesn't like them, but if we explain how much time we're wasting ex-post-committo. | 01:08 | |
| Limbic_Region | Coke - any movement on Piper/svn/commitbit? | 01:09 | |
|
01:13
AndyA joined
|
|||
| Coke | nope. INVISIBLE ROBRT | 01:17 | |
| svnbotlt | r25559 | coke++ | trunk: | 01:20 | |
| : [t] | |||
| : Update coding standard test so that someone looking at the verbose output | |||
| : knows what to fix without having to read the source of the test; makes | |||
| : output of the test more like that of t/distro/file_metadata.t | |||
|
01:28
wtgee joined
|
|||
| Coke | any C programmers here? Trying to figure out t/codingstd/c_parens.t; I've fixed most of the errors, but test one is failing in packfile.h, near "INTVAL (" ... which looks fine, according to the spec. Any clue? | 01:44 | |
| (is the test written wrong? | 01:45 | ||
| particle | the test is likely wrong | ||
| ok, so it's a problem because it doesn't know about typedefs, probably | 01:47 | ||
| Coke | typedef is in the keywords... | 01:48 | |
| ... I'll check in the comma fixes I do have. | |||
| particle | yes, it's in the keywords | ||
| that means it expects "typedef (foo)" not "typedef(foo)" | |||
| this is totally different, though | 01:49 | ||
|
01:50
clara30 joined
|
|||
| Coke | ahhh. so we need to tell it how to chain keywords? (why is INTVAL a keyword, anyhoo? Just because we use it like one?) | 01:50 | |
| particle | it's a keyword probably to attempt to step around this issue | ||
| the test doesn't understand the syntax of typedef | |||
| imo it would be better to skip typedef statements until they can be parsed properly | 01:51 | ||
| but, does the test know how to skip a statement? | |||
| Coke | well, that's easy, just remove typedef from the keyword list. neh? | ||
| particle | heh, if only that would work. | 01:53 | |
| i gotta run out to meet tene | |||
| & | |||
|
02:22
Partizx joined
|
|||
| svnbotlt | r25560 | coke++ | trunk: | 02:35 | |
| : [codingstd] | |||
| : shuffle bits to make parens test happier | |||
| r25561 | coke++ | trunk: | |||
| : [t] | |||
| : Rename some coding std tests to make their c-only status more obvious. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25561 | |||
| r25562 | coke++ | trunk: | 02:42 | ||
| : [t] | |||
| : making codingstd test have more standard output; remove confusing display of the | |||
| : bad line, which for this test is pretty much always " ,". | |||
| r25563 | coke++ | trunk: | |||
|
02:56
grim_fandango joined
|
|||
| Andy | I'm back ! I'm back! | 03:02 | |
| svnbotlt | r25564 | coke++ | trunk: | 03:07 | |
| : [t] | |||
| : update the harness to change the hardcoded file names (... shouldn't we be | |||
| : doing this by directory to avoid this kind of double booking?) | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25564 | |||
| pmichaud screams, for no apparent reason whatsoever. But he also feels better. | 03:19 | ||
|
03:20
cout joined
|
|||
| Tene | pmichaud++ | 03:23 | |
| Coke | does "bcg" exist? | ||
| (will it ever? is it superseded by PCT?) | |||
| pmichaud | compilers/bcg/ was an attempt to build a bytecode generator from PAST-pm | ||
| (or perhaps even PAST) | 03:24 | ||
| I don't think it's been updated for PCT | |||
| it's not really superceded by PCT so much as PCT just ignored it | |||
| Coke is going to delete the glossary reference to FOTW. | |||
|
03:24
Theory joined
|
|||
| svnbotlt | r25565 | coke++ | trunk: | 03:45 | |
| : [docs] | |||
| : Cleanup the glossary some. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25565 | |||
|
03:46
buildbot joined
|
|||
| svnbotlt | r25566 | coke++ | trunk: | 04:04 | |
| : [docs] | |||
| : Some updates to the ROADMAP | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25566 | |||
| Coke | pmichaud: how goes? You think you'll be able to cut the release this month? | 04:09 | |
| svnbotlt | r25567 | coke++ | trunk: | 04:10 | |
| : [docs] | |||
| : Update some more stale references to LICENSE vs. LICENSES | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25567 | |||
| Coke | -> abed | 04:21 | |
| peepsalot | what are lexicals? | 04:25 | |
| purl | lexicals are a hack. | ||
| peepsalot | i'm reading this page about CPS, but I don't know what it means when it talks about lexicals | 04:26 | |
| www.sidhe.org/~dan/blog/archives/000185.html | |||
| pmichaud | Coke: so far, yes. | 04:32 | |
| peepsalot: "lexical" usually refers to a symbol within a given scope | 04:33 | ||
| for example, in Perl, "my $a;" identifies the scope of $a as being limited to the current block | 04:34 | ||
| svnbotlt | r25568 | chromatic++ | trunk: | 04:42 | |
| : [IMCC] Don't leak memory used when parsing heredocs. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25568 | |||
| peepsalot | what part of parrot uses CPS? | 04:47 | |
| pmichaud | ...all of it? ;_) | 04:48 | |
| iiuc, CPS is the underlying implementation for Parrot's call/return scheme | |||
| svnbotlt | r25569 | chromatic++ | trunk: | 04:55 | |
| : [IMCC] Free register information associated with multis. This plugs yet | |||
| : another memory leak. Only 58 left to go (at least from "Hello, World!" in Perl | |||
| : 6). | |||
| : Why not remove the unnecessary use of 'struct' and reduce some duplicate code | |||
| : too? Shorter and correcter -- that's good stuff. | |||
| r25570 | pmichaud++ | trunk: | |||
| : [pct]: | |||
| : * Avoid "Cannot take substr outside string" error when an interactive-mode | |||
| : program throws an exception that doesn't have a message (e.g., exit 0) | |||
| : * Resolves RT#50552. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25570 | |||
|
05:10
peeps[work] joined
|
|||
| Andy | my shootout just is not running. | 05:13 | |
| chromatic has more leaks than I do. | 05:20 | ||
| svnbotlt | r25571 | petdance++ | trunk: | 05:26 | |
| : Set the type of the malloc | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25571 | |||
| Andy | ./parrot examples/shootout/ack.pir just hangs | 05:35 | |
| moritz | I think it just takes exponential time | 05:39 | |
| ./parrot examples/shootout/ack.pir 8 takes really long, but finishes | 05:40 | ||
| Andy | what's the 8? | ||
| purl | Outlook not so good, Andy | ||
| moritz | it calculates ack(3, 8) | 05:41 | |
| Andy | How long is really long? | ||
| moritz | didn't measure it, perhaps a minute or two | ||
| Andy | huh | 05:42 | |
| and it wants to compute ack(3,9) | 05:43 | ||
| bah | |||
| moritz | 55s for 8, 3.5s for 7 | ||
| 0.7s for 6 | |||
| so I guess for 9 it needs half an hour | 05:44 | ||
| Andy | well, that needs to be fixed. | 05:45 | |
| here it comes. | |||
| svnbotlt | r25572 | petdance++ | trunk: | 05:53 | |
| : dropped the ack(3,9) down to ack(3,7). 9 is prohibitively slow | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25572 | |||
| moritz | not quite a fix :/ | 05:54 | |
| svnbotlt | r25573 | petdance++ | trunk: | 05:58 | |
| : the shootout only wants to run 3,7 now | |||
| r25574 | petdance++ | trunk: | |||
| : use mem_sys_free where possible. NULL freed pointers. Remove a str_dup. use snprintf where possible. | |||
| r25575 | chromatic++ | trunk: | |||
| r25576 | petdance++ | trunk: | 06:11 | ||
| : consting | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25576 | |||
|
06:42
bgeron joined
|
|||
| svnbotlt | r25577 | petdance++ | trunk: | 06:43 | |
| : More doc patches from ajr, and some localization goodness | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25577 | |||
| r25578 | chromatic++ | trunk: | 06:50 | ||
| : [IMCC] Minor cleanup in the optimizer. Here's a target ripe for major | |||
| : refactoring (the register alligator is slow at computing dominators because | |||
| : reptiles are very bad at math). | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25578 | |||
| Tene | particle: it works now. the problem was that I was inserting 'find_name("foo")' instead of 'find_name "foo"' | 06:56 | |
| particle++ # clever solution | |||
| Now to take a look at the inspect() stuff jonathan++ added... | 06:59 | ||
|
07:08
uniejo joined
|
|||
| nopaste | "tene" at 67.135.212.243 pasted "current lolcode expression handling patch" (213 lines) at nopaste.snit.ch/12293 | 07:18 | |
| Tene | Not done yet, but soon... soon... | 07:19 | |
|
07:22
paq joined
07:27
buildbot joined
07:28
jisom joined
|
|||
| Tene | Hmm... | 07:53 | |
| I keep getting: Method 'inspect' not found for invocant of class 'Sub' | 07:54 | ||
| but inspect() *does* exist in src/pmc/sub.pmc | |||
| I'm up-to-date... | |||
|
07:57
cout joined
|
|||
| Tene | ... oh, nevermind. | 07:57 | |
|
08:22
iblechbot joined
08:24
cosimo joined
09:47
ruoso joined
09:50
alvar joined
09:51
Ademan_ joined
10:05
kj joined
|
|||
| svnbotlt | r25579 | kjs++ | trunk: | 10:21 | |
| : [docs] add a bit to the pct_optable_guide.pod | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25579 | |||
|
10:24
IllvilJa joined
|
|||
| svnbotlt | r25580 | kjs++ | trunk: | 10:34 | |
| : [docs] more updates to pct/pct_optable_guide.pod | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25580 | |||
| r25581 | kjs++ | trunk: | 10:41 | ||
| : [docs] add a see-also, faq, and some more sections that need explanation to pct/pct_optable_guide.pod | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25581 | |||
| r25582 | kjs++ | trunk: | 10:46 | ||
| : [docs] past_building_blocks.pod: fix a spelling error and explain term "rakudo". | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25582 | |||
|
10:49
cognominal_ joined
|
|||
| Alias_ | Aside question, did you fix the build for parrot yet? | 10:50 | |
| Can you do a make install to somewhere and detach it from the svn checkout? | |||
| Or is that still buggy | |||
|
10:50
contingencyplan joined
11:25
HG` joined
12:08
DarkWolf84 joined
12:36
cosimo joined
12:57
dwave joined
13:00
dwave joined
|
|||
| Coke | AndyAway: aren't the shootout examples supposed to be examples of specific shootout tests? (wondering if reducing 9 to 7 there is a bad thing long term) | 13:14 | |
| Alias_: (fix the build) which platform? | 13:15 | ||
|
13:49
Andy joined
14:51
GeJ_ joined,
skv_ joined
|
|||
| Andy | Coke: It might be, but at this point it is effectively a stop to my running "make test" | 14:59 | |
| spinclad | Coke: so call it a shootout-related test instead | 15:26 | |
|
15:26
rdice joined
15:29
mj41_ joined
15:33
dwave joined,
silug joined,
peeps[work] joined
|
|||
| spinclad | Coke: note at head of examples/shootout/ack.pir says 'ackermann - ack(3, 9) is default / shootout runs ack(3, 11)', so 9 seems already reduced | 15:33 | |
| particle | well, that's good then. | ||
| it's more ok that andy changed it | |||
| spinclad | (also: 'time for ack(3,11): 0.8s (AMD X2@2000)', so we've quite a way to go) | ||
| Andy | YEAH | ||
| :w | |||
| spinclad | ack(3,11) should be 2^(11+3)-3, i think: 16381 | 15:35 | |
| a bit of memoizing would make it run _real_ fast! | 15:36 | ||
| Andy | Or just make it a print. | 15:39 | |
| spinclad | oh, no! calculate, just don't calculate anything twice. | 15:42 | |
| Andy | Yes, I understand. I was making a funny. Building on your funny. | 15:45 | |
| spinclad ENOHUMOR today :( | 15:46 | ||
| so you're suggesting pre-memoizing... | 15:48 | ||
| ikindigit | |||
| s/g/gg/ | 15:49 | ||
|
15:52
gryphon joined
15:57
contingencyplan joined
|
|||
| svnbotlt | r25583 | kjs++ | trunk: | 16:02 | |
| : [docs] add section about pasttype and pirop traits in optable guide. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25583 | |||
|
16:06
gryphon joined
16:21
sjansen joined
|
|||
| kj | anybody care to do a first review on docs/pct_optable_guide.pod? It's kidna complete, except some loose ends that I need to check, but don't really feel like doing right now. | 16:24 | |
|
16:26
DarkWolf84 joined
|
|||
| svnbotlt | r25584 | kjs++ | trunk: | 16:27 | |
| : [docs] pct fix more todos in documentation. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25584 | |||
| moritz | kj: perlpunks.de/paste/show/47ab3276.688b.17d | 16:32 | |
| typo + one additional paragraph | |||
| kj | moritz: thanks! What does "bloat" mean? | ||
| svnbotlt | r25585 | kjs++ | trunk: | ||
| : [docs] pct/pct_optable_guide.pod: add note about left being default assoc and 'none' as an option. don't know exactly what that implies. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25585 | |||
| kj | (maybe it should read "can't bloat" .. | ||
| moritz | kj: increase size unneccesarly | ||
| as in "blow up" | 16:33 | ||
| kj | ah i see | ||
| your grammar explodes by adding new precedence levels | |||
| moritz | yes | ||
| kj | right. good point. | 16:34 | |
| moritz | that's perhaps easier to understand if you put it that way | ||
| "Perl 6 rules are run as ordinary subroutines" - aren't they methods, technically? | |||
| kj | yeah, but for parrot there's not really a diff | 16:35 | |
| you think it adds to clarity? | |||
| moritz | not clarity, but it's a bit more correct ;) | ||
| kj | (btw, I wrote all this from the top of my head; not sure if everything makes sense) | ||
| (i've never been a math guy) | 16:36 | ||
| i even just figured out what this associaty works (why is it called left and right :-P ) | |||
| particle | there is a difference between sub and method (self) | ||
| kj | ok will fix it | ||
| afk for a bit | 16:40 | ||
| moritz | kj: the first example to "is assoc" is wrong - the (1 + (2 ^ (3 * 4)) | 16:44 | |
| kj: ... parse tree contradicts the precdence rules you defined earlier | |||
| svnbotlt | r25586 | kjs++ | trunk: | ||
| : [docs] tell about rules being methods, not ordinary subs. suggested by moritz++. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25586 | |||
| moritz | kj: more doc nits: perlpunks.de/paste/show/47ab3845.2b0e.26 | 16:57 | |
| Alias_ | Coke: As I was told, all of them? | ||
| In order to get a working perl6, you had to leave it inside the build | |||
| You couldn't make install it | |||
|
17:04
rdice joined
17:11
parrot-poke joined
17:25
alvar joined
|
|||
| kj | moritz: thnx. but I don't quite understand | 17:32 | |
| moritz | kj: which part? | 17:33 | |
| purl | the IMPORTANT part! | ||
| kj | wit the power op | ||
| (1+(2^ .. | |||
| moritz | ^ has higher precedence than *, right? | ||
| kj | yea | ||
| ... mmm ... | 17:34 | ||
| jonathan | seen pmichaud | ||
| purl | pmichaud was last seen on #parrot 12 hours and 45 minutes ago, saying: iiuc, CPS is the underlying implementation for Parrot's call/return scheme | ||
| moritz | so 2^(3*4) can't be the outcome of parsing 2^2*4 | ||
| kj: better just stick with infix:- or infix:/ examples | |||
| kj | heh yeah :-) | ||
| moritz | everybody understands those | ||
| kj | I suck at math | ||
| mmm guess I better not make such remarks; future employers might check them out :-P | 17:35 | ||
| moritz | just don't tell them you're 'kj' ;) | ||
| kj | ha ha. | ||
| the example with - is good, right? | |||
| moritz | right | 17:36 | |
| (as far as I understand - I'm better with math, but I have next to no experience with parsers) | |||
| particle | hrmm... do i need to specify .params if i'm going to do a tailcall? | 17:37 | |
| jonathan | particle: .return the_thing_to_tailcall(x, y, z) on the calling side...and on the callee side, the param declarations are just normal. | 17:38 | |
| Or am I missing something? | |||
| particle | i'm thinking about implementing 'is export' in rakudo | ||
| jonathan | Ah. | 17:39 | |
| I was going to try and avoid doing a tailcall... | |||
| particle | in src/classes/List.pir we have .sub keys :method and .sub keys | ||
| .sub keys is simply a tailcall to the method | |||
| .sub keys :multi('List') | 17:40 | ||
| .param pmc list | |||
| .return list.'keys'() | |||
| .end | |||
| jonathan | And just make a MultiSub PMC and push the method onto it...maybe. :-) | ||
| Or if there already is a multi-sub PMC for the name, it's easy. | |||
| Coke | Alias_: ... ah. install ne build, hence my confusion. | ||
| jonathan | Just find it and push it on. | ||
| Coke waves from home with strep throat. | |||
| jonathan | Thing is, is export is really a role, but I'm not sure MMD cares about "does" as well as "isa"... | 17:41 | |
| jonathan had been thinking about is export too :-) | 17:42 | ||
| particle | well, it's a funny role | ||
| i consider 'is export' to take effect during composition time, not at runtime | |||
| but i suppose it could be either, now that you mention it | 17:43 | ||
| jonathan | is SomeClassHere for inheritance is blurry like that. :-) | ||
| particle | @keys = keys @array; | ||
| so, at runtime, lookup is done for a function named 'keys' | 17:44 | ||
| jonathan | Yup. | 17:45 | |
| particle | if we're using mmd lookup, it sees there's no invocant | ||
| and notices the first arg is type List | |||
| jonathan | Right. | 17:46 | |
| particle | previously, 'is export' has registered a multisub with that type | ||
| ok, that works. | 17:47 | ||
| however, it's the registration bit i'm fuzzy on. | |||
| kj | moritz: thanks for the review. | ||
| jonathan | particle: Yes, that is...fun. :-) | ||
| moritz | kj: you're welcome | 17:48 | |
| jonathan | If you have a class, then it has a block. The same block we stick the class declaration in. | ||
| particle | if you don't need to know the params, it's pretty straightforward | ||
| huh? | |||
| it == past? | |||
| jonathan | Yup | ||
| Somewhere, you need to stick the code that applies the trait to the sub. | 17:49 | ||
| svnbotlt | r25587 | kjs++ | trunk: | ||
| : [docs] fix a bit based on comments by moritz++ | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25587 | |||
| jonathan | By calling trait_auxiliary:is | ||
| particle | sure, fine. | ||
| jonathan | I *think* that pushing it onto $?PACKAGE wil usually work out OK. | 17:50 | |
| particle | here's what i'm fuzzy on: | ||
| i want to say: | |||
| i mean, i *have* to say: | 17:51 | ||
| .sub delete :multi('List') | |||
| .param pmc list | |||
| .param pmc indices :slurpy | |||
| .return list.'delete'(indices :flat) | |||
| .end | |||
| that is, i need to know the params in order to call the method | |||
| but i'd like to grab the invocant and call the method on that, without processing params | 17:52 | ||
| jonathan | Important question before I say what I'm about to...one second... | ||
| jonathan has an idea but wants to see if it'll work :-) | 17:53 | ||
| On what you just said though, you can have non-multi params too, right? | 17:54 | ||
| Oh, wait, you did what I was going to say. | |||
| :-) | |||
| particle | :) | ||
| yes, slurpy/flat helps | |||
| but i don't think a nullary method will work well with slurpy/flat | |||
| i think parrot will err on params... but that's just my in-head compiler | 17:55 | ||
| jonathan | particle: OK, here's a stream of stuff I've been thinking about. | 17:56 | |
| I think that we are going, for Perl 6, to actually generate *every* sub as a :multi, where it's marked with multi or not. | |||
| I think we're going to have to, I mean. | 17:57 | ||
| particle | unless it's marked 'only' | ||
| jonathan | Not even that, though. Because you need to be able to install extra multis to handle junction auto-threading. | ||
| particle | iirc 'proto' is default | ||
| jonathan | At a Perl 6 level, sure, it's an error to re-declare a non-multi even with different arguments. | 17:58 | |
| particle | if the sub doesn't accept junctions, it'll work with 'only' | ||
| (at the parrot level) | |||
| i see what you're saying. | |||
| jonathan | The way we need to implement auto-threading is | ||
| 1) Try and dispatch. Every argument is Any by default, not object. | |||
| 2) If it fails because we have a Junction in there, which is not a subtype of Any, we catch that error. | 17:59 | ||
| 3) We look at see if the reason we failed was because one of our parameters was a Junction. If not, we show an error or call the AUTOLOAD or whatever Perl 6 calls it. | |||
| particle | yep. | 18:00 | |
| Coke | associecity => associativity? | ||
| particle | we need our own mmd on top of parrots | ||
| jonathan | If so, then we generate a wrapper that does the auto-threading on that argument or those arguments, and install it as a multi. | ||
| Then, next time, it's "free" because multi-dispatch does the Right Thing for us. | |||
| TimToady | yes, I'd do it as a failover the first time, so you get the benefits of direct dispatch if you never feed it a Junction | 18:01 | |
| jonathan | For this to work at all, we need the call to fail when you pass a Junction to a non-Junction or Object parametter. | ||
| particle | yep | ||
| TimToady | binding should fail correctly | ||
| particle | so we need to do :multi(Any) on everything | 18:02 | |
| jonathan | particle: Right, that's my thought. | ||
| TimToady | you mean to an Any parameter, and Object should accept Junction | ||
| jonathan | TimToady: Yes, that's what I mean. :-) | ||
| non-(Junction or Object) :-) | |||
| TimToady | to many irc channels, not enough time... | ||
| particle | this will make the PAST uglier :( | 18:03 | |
| jonathan | particle: So going back to your is export... | ||
| Consider we write this class: | 18:04 | ||
| .namespace [ 'Foo' ] | |||
| .sub init :init :load $P0 = newclass 'Foo' | |||
| .end | |||
| .sub test :method :multi('Foo', int) .param int i say i | |||
| .end | |||
| gah, lack of line breaks. | |||
| particle | i can read it | ||
| jonathan | OK | 18:05 | |
| Then: | |||
| Method call: | |||
| $P0 = new 'Foo' | |||
| $P0.test(1) | |||
| Or sub call: | |||
| $P1 = find_global [ 'Foo' ], 'test' | |||
| $P1($P0, 1) | |||
| TimToady | given that Junctional processing is going to be generally pretty heavy, it might not be noticable to make it failover every time rather than just the first | 18:06 | |
| particle | TimToady: that would incur the penalty for anything derived from Object and not Any | ||
| TimToady | esp if the Junction is the first thing you're trying to bind | ||
| particle | (which is currently just Junction) | ||
| TimToady | it's not a penalty unless binding fails | 18:07 | |
| particle | right. | ||
| TimToady | you have to do something if binding fails in any case | ||
| particle | it's simpler | ||
| jonathan | particle: So here's how we avoid creating a wrapper at all. | ||
| $P2 = new 'MultiSub' | 18:08 | ||
| $P1 = $P1[0] # this gets the method itself, in fact we need an iterator here for all of 'em, I guess | |||
| push $P2, $P1 | |||
| set_global 'test', $P2 # stick it in the namespace | |||
| test($P0, 42) # works! | |||
| One Sub PMC to rule them all. :-) | |||
| particle | $P1 = $P1[0] # what's $P1? | 18:09 | |
| jonathan | $P1 = find_global [ 'Foo' ], 'test' | ||
| It's a continuation of my earlier example code ;-) | |||
| hey! Duh! | 18:10 | ||
| Oh no, not duh. :-) | |||
| But anyway, it's not quite that simple. You need to find_global 'test' first, to see if there already is a multi. | |||
| particle | right. | ||
| jonathan | But hopefully I've explained the idea well enough. | 18:11 | |
| particle | and what if the sub is defined first | ||
| does 'only' on a sub affect a method in the same namespace? | |||
| jonathan | I guess if you export something and there is a sub marked only in the namespace you export it into, then you're asking for trouble. ;-) | 18:12 | |
| I think we're going to need to subclass the Sub PMC to give ourselves places to stick flags like "is_only". | |||
| particle | module Foo { only sub bar(Foo $x) {1} }; class Foo { method bar {1} } | ||
| jonathan | Ouch. I'd not throught of that. | 18:13 | |
|
18:14
DarkWolf84 joined
|
|||
| jonathan | I'd not even thought of using module and class on the same namespace. Is that legal? | 18:14 | |
| I'd normally say "I hope not", but this is Perl 6. :-) | |||
| particle | ...enough rope... | 18:15 | |
| Coke | (subclass Sub) ... Tcl does that! | ||
| (though there is definitely room for more stuff to go in Sub that we could share.) | |||
| mdiep | yes, implement things that Tcl will need. :) | 18:16 | |
| TimToady | moritz: btw, I never talk about higher/lower precedence, because people can't keep those straight; instead I always use tighter/looser | ||
| jonathan | particle: So, you're going to implement is export now? ;-) | ||
|
18:17
slightlyoff joined
|
|||
| particle | sure, matt. just for you. | 18:17 | |
| jonathan | .sub 'trait_auxiliary:is' :multi('export', 'Sub') | ||
| TimToady | "is export" is a trait, so theoretically has an effect immediately on whatever is being declared; of course, that effect might just be to mark it for later processing in this case | ||
| jonathan | You'll need to hack the name "export" into existence somehow though. | ||
| moritz | TimToady: might be better, yes ;) | ||
| TimToady | it doesn't help that half the precedence tables in existence are printed with the high precedence operators on the bottom :/ | 18:19 | |
| we even made that mistake in the first Camel | |||
| moritz | ;) | ||
| TimToady | maybe it goes with trees that grow downward... | ||
| but then surely it should be recursive ascent parsing | 18:20 | ||
| particle | your roots are showing | 18:21 | |
| TimToady | at least they're not square | ||
| well, half of them are square; only every other generation has a square number | 18:23 | ||
| jonathan needs to go shop, cook, eat, etc. Back later. | 18:24 | ||
| TimToady waves | |||
| particle | damn. there's a lot more of perl 6 to implement. | 18:29 | |
| is there much left to spec? | |||
| TimToady | if we merely implement what's specced so far, we'll have a darn good language :) | 18:40 | |
|
18:42
Theory joined
|
|||
| confound | heh | 18:44 | |
|
19:08
Ademan joined
20:01
Davemon joined
20:08
rdice joined
22:01
pjcj joined
22:13
IllvilJa left
|
|||
| svnbotlt | r25588 | jonathan++ | trunk: | 22:21 | |
| : [core] Tidy up my messy C. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25588 | |||
|
22:23
Limbic_Region joined
22:24
rdice joined
|
|||
| svnbotlt | r25589 | particle++ | trunk: | 22:28 | |
| : [config] great, i finally find a useful warning for 64bit conversion on windows, and it gets deprecated! | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25589 | |||
| jonathan | heh heh...gotta love MS compilers. | 22:29 | |
| I found a (minor) bug in the C# 3.0 one within a week of it's release. | 22:30 | ||
| Tene | is it fixed yet? | ||
| Juerd | <spam> Dutch Perl Workshop 2008-02-29 www.perlworkshop.nl </spam> | 22:31 | |
| jonathan | Tene: Don't think SP1 for VS 2008 is about yet. | 22:32 | |
| It's not a bug in the code it generates. It's a warning bug. | |||
| Emits a warning about a field in a structure never being assigned to if the only place you assign to it is inside a Linq query. | 22:33 | ||
| So minor, but annoying. | |||
| Juerd: I'll be there! | 22:34 | ||
| Limbic_Region | w | ||
| Juerd | jonathan: Great :) | 22:40 | |
| jonathan | Juerd: Last stop on my February conference visiting. | 22:44 | |
| Juerd | I hope you will still have some energy left :) | ||
|
22:52
wknight8111 joined
|
|||
| jonathan | particle: Decided to do a workaround for the OO issues. | 22:56 | |
| Took all of 30 minutes. | |||
| Going to blog about it now... | 22:57 | ||
| Tene | yay blog! | ||
| svnbotlt | r25590 | jonathan++ | trunk: | 22:58 | |
| : [rakudo] Work around the class/role ordering issue for now, so people can play with OO in Rakudo until we work out a Real Solution. | |||
| diff: perlsix.org/svn/parrot/revision/?rev=25590 | |||
|
23:00
Theory joined
|
|||
| Limbic_Region | just noticed the following when doing mingw32-make perl6.exe - gcc: unrecognized option `-Foperl6.o' | 23:02 | |
| is that expected? | |||
|
23:03
slightlyoff joined
23:18
slightlyoff joined
|
|||
| pmichaud | jonathan: ping | 23:25 | |
| jonathan | use.perl.org/~JonathanWorthington/journal/35610 | 23:29 | |
| pmichaud: pong | |||
| pmichaud: How's things? | |||
| pmichaud | the OO code you've been adding seems to have a lot of inline PIR... is it really necessary to do that? Couldn't we just create a built-in function or method to handle it? | 23:30 | |
| (things are relatively good here... we have one more hospital night to go) | |||
| jonathan | pmichaud: Perhaps, though you need to generate bits to apply the traits, bits for the "does", etc. | 23:31 | |
| But yes, agree, would be tidier to factor out what we can. | |||
| pmichaud | what does 'apply the traits' mean in this context? | ||
| jonathan | Call trait_auxiliary:is | ||
| pmichaud | I haven't looked at the code in great detail... I just know that it seems to be an awful lot of inline PIR, where I was expecting to have some builtins to handle it | ||
| jonathan | Built-ins at what level? PCT, or just that code factored out to PIR subs? | 23:32 | |
| pmichaud | code factored out to subs | ||
| i.e., creating a new subclass can be done via a method call to a helper sub that does it, instead of writing inline PIR to do it | |||
| jonathan | Right, agree. | 23:33 | |
| pmichaud | it was just an observation. Maybe I'll have some time to play with it a bit later tonight. | ||
| jonathan | I'll happily admint I've been going for getting it working and getting the right semantics over beautiful implementation. | 23:34 | |
| It was eaiser to see what was going on for me just having it all there in one place. | |||
| pmichaud | well, I think that "getting the right semantics" is probably method-based anyway, also. :-) | ||
| jonathan | Aye, true. | 23:35 | |
| I don't disagree it wants some refactoring and clean-up anyway. | |||
| It's a first cut at it. | |||
| pmichaud | sounds good | 23:36 | |
| I'll see if I can do some refactoring on it | |||
| jonathan | Sure, well, I hope it's a good start if nothing else. | ||
| pmichaud | oh, it's at least that. :-) | ||
| jonathan | I just did a journal post showing what people can do with it now. | ||
| I want to try and start getting the spec tests in shape for this stuff. | 23:38 | ||
| pmichaud | that would be a very good thing to do. | ||
| jonathan | It's certaily time to, now the very basic bits are in place. | 23:39 | |
| What do you suggest in terms of directories to break it up? | |||
| Is S12-class and S12-role not granular enough? | 23:40 | ||
| pmichaud | could start that way | ||
| it's subversion, so it's easy enough to change :-) | |||
| jonathan | True. | ||
| Also thinking maybe it'd be good to support writing bits of the compiler in Perl 6 now. Especially since there's enough support to start writing some simple classes. | 23:42 | ||
| pmichaud | sure | ||
| I'm having trouble finding good bits to write in Perl 6 though :-) | |||
| jonathan | Hmmm...in that case maybe it's less of a priority and there's better things I can do? | 23:45 | |
| Or Just Do It anyway for the bits we can do that way? | 23:46 | ||
| pmichaud | definitely do it for the bits we can do that way | 23:48 | |
| jonathan | OK, sure. I don't expect it to be so hard. | ||
| ...famous last words... :-) | |||
| Are parsing rules and grammars on your todo list? | 23:49 | ||
| I'd love to be able to show those working in Ukraine... | |||
| pmichaud | you mean to be added to rakudo? sure. | ||
| I don't know if I'll have those within a week, but it might not be too difficult. | |||
| jonathan | Ukraine is two weeks. ;-) | ||
| I'll have lots of time sat in German language talks next week that I can't really follow, so expect to have time to hack a decent bit on Rakudo. | 23:50 | ||
| cognominal_ | jonathan, was is the url of your site, I forgot it | 23:54 | |
| what.... you spoke of german... | 23:55 | ||
| oops, that was in the backlog | |||
| jonathan | cognominal_: www.jnthn.net/ - really need to update the upcoming talks page there... | 23:58 | |
| Tene | Would be nice if jonathan's use.perl blog was syndicated on planet.parrotcode.org | 23:59 | |