Camelia, the Perl 6 bug

IRC log for #parrot, 2008-02-07

Parrot | source cross referenced

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

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

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

Parrot | source cross referenced