|
Parrot 2.1.1 Released! | parrot.org/ | Tasks: PCC deprecations branch, HLL subclassing and MMD branch Set by moderator on 19 February 2010. |
|||
| Whiteknight | Austin: you going to be upset if I use spaces instead of tabs? | 00:02 | |
| Austin | Not at all. | ||
| I program in a proportional font, so I expect the tabs are all over the place for you. | 00:03 | ||
| Whiteknight | w00t, because those are my settings and I'll be damned if I'm changing them :) | ||
| Austin | So long as you keep the 1 tab = 12 spaces equivalence.... | ||
| :) | |||
| Whiteknight | I was going to use 1 tab = (7.435 * line number) spaces, but an even number is slighly better | 00:04 | |
| Austin: how to test it? | 00:11 | ||
| parrot-nqp setup.nqp test failed | |||
| Austin | What, tab size? | ||
| Oh. | |||
| What fails? | 00:12 | ||
| purl | see "doesn't work" | ||
| Austin | (Because it works for me.) | ||
| Whiteknight | Cannot find harness-nqp script. Did you set HARNESS_ROOT_DIR? at t/harness line 36. | ||
| Austin | Hmm... chmod +x t/harness-nqp.sh ? | 00:13 | |
| Whiteknight | ah, that did it | ||
| Austin++ | |||
| Austin | Is there a way to set that in git, like svn:executable? | 00:14 | |
| Whiteknight | t/bootstrap/UnitTest/Testcase.nqp ..... 1/? Could not find non-existent sub assert_that | ||
| Austin: I think there is, I feel like I've done it at some point | |||
| Austin | Ruh roh. | 00:15 | |
| purl | ruh roh is Raggy? | ||
| Austin | That's a real error. (I remember - I fixed it today or y-day.) | ||
| Edit that file, remove the test. | |||
| Whiteknight | Austin: I changed that file to +x and commited the change | 00:16 | |
| I also just commited a test for nested super() | |||
| Austin | Woot! | ||
| Does it pass? | |||
| Whiteknight++ | |||
| Whiteknight | test does indeed pass | 00:17 | |
| I'm sorry I doubted | |||
| Austin ++ | |||
| :) | |||
| I'm about waist deep in the mocking stuff right now. I think I've got a model that works... | 00:19 | ||
| It's just a question of building the horribly tangled thing... | |||
| dalek | kapo: ed480bb | whiteknight++ | : make harness-nqp.sh executable |
||
| kapo: 31e3b92 | whiteknight++ | t/Syntax.nqp: test that super() nests to multiple levels correctly |
00:20 | ||
| Austin sings, "The judge said 'Son, what is your alibi? If you were somewhere else then you won't have to die.'" | 00:38 | ||
| Whiteknight | You use a proportional font? | 00:43 | |
| Austin | Yeah | ||
| Whiteknight cringes | |||
| Austin | :) | ||
| Everybody talks about how code is read more than written... | 00:44 | ||
| Well, what if there were fonts that were optimized for reading? | |||
| Oh,wait! _There already are!_ | |||
| Whiteknight | I don't know, but it's definitely not how my mind works | ||
| Austin | Wait 'til you get older... | 00:45 | |
| The eyes start to go... suddenly, it matters. | |||
| dukeleto | 'ello | 00:46 | |
| Austin | Hey, duke | 00:47 | |
|
00:47
patspam joined
|
|||
| dukeleto | Austin: how goes it? did you see my msg about the diehard stats tests? | 00:48 | |
| Austin | Yeah, I'd seen those when I was googling around before, looking for how to test random. For a guy with a stats background, I'm ashamed to admit that my eyes glazed right over... | 00:49 | |
| dukeleto | Austin: i may be interested in implementing some of them. i also said that i would work on fixing the randomness of parrot RNG's and haven't done that yet either... | 00:53 | |
| Austin: feel free to bug me about stats stuff. i had to take way too many stats classes for my math degrees | 00:54 | ||
| Austin | More power to you, then. I know a lot of people have put a lot of thought into how to do good RNG, so it seems like it ought to be "free" from the system(s). | ||
| Yeah, me too. | 00:55 | ||
| Stats and economics. | |||
| Two great tastes that go great together. Like Lutefisk and ... some other horrible thing | |||
| dukeleto | Austin: if parrot gets GSL binding (another thing I have promised and not delivered on) then we get like 60 different RNG algorithms | 00:56 | |
| Austin: hah! | |||
|
00:56
abqar joined
|
|||
| Austin | What's a GSL? | 00:56 | |
| purl | a GSL is a pure C library. I want to access it's functions from Parrot, perhaps as PMCs, perhaps not. what is the best plan of action to start? | ||
| dukeleto | Austin: search.cpan.org/~leto/Math-GSL-0.20...GSL/RNG.pm | ||
| Austin | Apparently not the first time that has been asked. | ||
| dukeleto | Austin: GNU Scientific Library | ||
| Austin: i wrote the Perl 5 bindings | |||
| Austin | Ahh, okay. | 00:57 | |
| purl, forget a GSL | |||
| purl | Austin: I forgot gsl | ||
| Austin | purl, GSL is the GNU Scientific Library. See www.gnu.org/software/gsl/ | 00:58 | |
| purl | OK, Austin. | ||
|
01:12
ascent_ joined
01:22
kid51 joined
01:24
bacek joined
02:24
bacek joined
|
|||
| Whiteknight | Austin: src/Exceptions.nqp is depressing | 02:25 | |
| bacek | hi again. | 02:28 | |
| purl | oh, you're back! | ||
| kid51 | Uh-oh: Am once again getting this smolder submission error: | 02:44 | |
| Could not upload report to Smolder at smolder.plusthree.com | |||
| HTTP CODE: 500 (read timeout) | |||
| Austin | Heh. | 03:04 | |
| Tene | Where is this depression Exceptions.nqp ? | 03:09 | |
| Austin: you parroting tonight? | 03:10 | ||
| Austin | Tene: Yeah, I'm up. | ||
| He's talking about Kakapo's Exceptions.nqp, which defines a bunch of exception classes. | 03:11 | ||
| Tene | Ew, yes, Exceptions.nqp is unfortunate. | ||
| I was thinking of working on type-based EHs now. Lemme throw together an example for you to look at. | |||
| Hmm. The resume continuation isn't getting set in subclasses of Exception. That's strange. | 03:22 | ||
| nopaste | "tene" at 76.27.121.193 pasted "Austin: similar to the existing types only/except list API" (63 lines) at nopaste.snit.ch/19819 | 03:26 | |
| Austin | Tene, does that run? | 03:29 | |
| Tene | No, it doesn't. | ||
| Austin | ok | ||
| Tene | oh, crap, I said "handle_types". | ||
| Austin | yeah, I wondered at that | 03:30 | |
| Tene | That's the method used right now to set filters based on the integer type id. | ||
| should be handle_classes oslt | |||
| I'm wondering if you have comments or strong opinions on the "handle_these" / "handle_except_these" API before I implemented it. | |||
| Austin | As I see it, there's a couple of different use cases. | 03:31 | |
| First, you can try to catch a particular exception. | 03:32 | ||
| That's like catching file-not-found or something. | |||
| Next, you can try to catch a whole family of exceptions: any unit test failure, any database error, etc. | |||
| Tene | any IO error, which will presumably include file-not-found | 03:33 | |
| Austin | The sort-of converse to that would be Java-esque: catch anything except the horribly fatal ones. (Runtime Errors) | ||
| Tene | Is there ever a use case for "ignore IO errors, but catch anything else"? | ||
| Austin | They solve that problem by creating two separate class hierarchies implementing a common interface. | 03:34 | |
| There's the control-exception scenario: catch any of these. | |||
| And the kind of obvious "anything but a control exception" | |||
| Which is what nqp currently does. | |||
| try { foo() CONTROL { say("control exception"); } CATCH { say("anything else"); } }; | 03:35 | ||
|
03:35
janus joined
|
|||
| Austin | Most of those scenarios reduce down to any subclass of X, or not-any subclass of X. | 03:36 | |
| Tene | Right, that was the original motivation for .handle_types_except | ||
| Austin | The control-exceptions could be trivially recoded to catch the one type or its children | ||
| Tene | I guess with a type hierarchy, there's less need for "catch any exception of a type in this list". | ||
| Austin | The place where I see "any on this list" being used is when the coder rattles off a set of exceptions to catch. It may be harder to see in *perl, since the catch blocks look like if statements. | 03:37 | |
| But other languages make you declare your types as part of the catch: catch (FileNotFoundException e) {...} catch (QuotaException q) {...} ... | 03:38 | ||
| So I can see them maybe being used, but I don't think it's the end of the world if the performance isn't great. | |||
| Anyway, I think that anything-but-these becomes less useful because at this moment we can just set up a class tree the right way. | 03:40 | ||
| Tene | well, we definitely do need "anything-but-control", although I guess we could have a "not-control-exception" superclass for everything else. | ||
| Austin | Right | 03:41 | |
| I'd like to know how .net handles this stuff. | |||
| okay, they don't distinguish. | 03:44 | ||
| (and coders suffer from catching too many things) | |||
| Anyway, I guess the upshot of this is that the handle_foo approach is just fine, and will encompass every case I can think of, so long as it honors subclasses. | 03:45 | ||
| Tene | Great, okay. I'll start implementing that as soon as I track down this issue with resume continuations in subclasses. :( | 03:46 | |
| Austin | (and handle_not_foo) | ||
| :) | |||
| Tene | ex['message'] gets the message just fine. | 03:47 | |
| ex['resume'] gives Null PMC | |||
| Austin | heh | ||
|
03:47
Andy joined
|
|||
| Austin | One thing that seems important to me is resumable versus not. | 03:48 | |
| Tene | Yes, that's definitely important, but I'm not entirely certain how it should be implemented. | 03:49 | |
| Something about roles should be considered. | |||
| seems like. | |||
| Austin | Well, as I understand it, a resumable exception comes with a resume continuation. | ||
| Tene | Right. | ||
| Austin | Now, think about "finally" | 03:50 | |
| If I write some code like: try { do_something() } ... finally { close( handle ); } | |||
| I think I need to catch every exception as it goes by, in order to make sure I send control over to the finally block. | 03:51 | ||
| But a resumable exception shouldn't get finalized. | |||
| Tene | but if the handler chooses *not* to resume it, it should. | 03:53 | |
| Austin | yeah | ||
| If some "vice president of exceptions" decides to resume it, then you should not have finalized. But otherwise you should have. | 03:54 | ||
| :-$ | |||
| This is why the handler is supposed to execute in the dynamic context of the thrower. | 03:55 | ||
| The part I don't understand is where does the change occur from context-of-the-thrower to back-10-levels-up-the-stack? | 03:57 | ||
| Tene | okay, the issue is accessing it through ex['message'] | 04:01 | |
| if I getattribute instead of using the keyed interface, resuming works fine with subclasses. | |||
| Austin | heh. What's wrong with that picture? | ||
| Tene | oh, setting through the keyed interface doesn't work either. | 04:02 | |
| vtable override stuff? | |||
| I don't really understand that bit of parrot. | |||
| Austin | Okay. So apparently marking the exception as "handled" is what turns off the resum-ability. | 04:03 | |
| Tene | Not right now it doesn't, although I could imagine an interface that does. | ||
| the default handlers generated by PCT check for the 'handled' attribute to decide whether to rethrow. | 04:04 | ||
| If it's handled, wouldn't that mean that you *do* want to resume it? | 04:06 | ||
| Austin | Heh. | ||
| No. | |||
| If you want to resume it, you invoke the resume continuation. | 04:07 | ||
| Tene | Well what we *want*, then, is that each handler either rethrows, resumes, or marks the exception handled. | 04:08 | |
| Austin | Right. | ||
| Tene | marking it handled would invoke any 'final' blocks. | ||
| Austin | rethrow is easy. and resume ought to be easy. | ||
| Tene | Parrot noticing the lack of any additional handlers would invoke any 'final' blocks. | ||
| Austin | (provided you get that problem sorted out) | ||
| Tene | The problem is whether we can either: enforce that all handlers do one of these three, or detect when a handler doesn't do one of those. | 04:09 | |
| Austin | The p6 approach to finally is for the language to maintain a queue of them in some other data structure, and the handler unspools the queue when it decides to handle. | ||
| I can live with that, I guess. | |||
| Tene | I could just deprecate the keyed interface to resume continuations, and make you getattribute instead, and give it a method that invokes the resume cont. | 04:10 | |
| ex.'resume'() | |||
| Austin | While I'm sure there's something wrong with deprecating the keyed interface, I'd love a method. | 04:11 | |
| But I can write it, so no strain | |||
| Detecting the failure-to-act: | |||
| that has to be some kind of opcode condition. | 04:12 | ||
| Like inserting a dummy stack frame? | 04:13 | ||
| If you try to return from the handler without acting, ... | |||
| That's a little wiggy. | |||
| dalek | rrot: r44552 | bacek++ | branches/ops_pct/ext/nqp-rx (4 files): Add to-be-nqp-settings |
04:14 | |
| rrot: r44553 | bacek++ | branches/ops_pct/compilers/opsc (5 files): Use nqp-settings. Cleanup builtins little bit |
|||
| rrot: r44554 | bacek++ | branches/ops_pct/src/ops/core.ops: Remove redundant 'goto NEXT' |
|||
| Tene | how much utility would there be in 'finally' blocks that run in *most* leave conditions, except not in those where the handler misbehaves? | ||
| any? | |||
| purl | rumour has it any is being done as a particular language feature | ||
| Austin | Little. | ||
| Depends on how you define 'misbehaves'? | |||
| But I think finally blocks can be left to the languineers. | 04:16 | ||
| Tene | returns or goes elsewhere without doing one of those three. | ||
| Austin | "goes elsewhere" makes me nervous. Does that mean sub-call, or more than 100 opcodes from the target? | 04:18 | |
| Tene | Oh! I know! Just *always* do the finally blocks, and then if the handler resumes, run the 'finally' block backwards. | ||
| eh, probably just 'returns'. I'll have to think about it more. | 04:19 | ||
| Austin | Don't sink a lot of energy - there's a solution already. | 04:20 | |
| Tene | Explain? | ||
| Austin | hll's can keep a finally queue themselves. | 04:23 | |
| A handler that wants to not-resume can just suck on the queue until it gets to its own level or higher on the stack. | |||
| Tene | Well, yes, if we assume "The HLL doesn't misbehave", that's fine. It would be nice if there was a way that we could offer something on the parrot level that would handle it, but it's outside the scope of what we're working on right now. | 04:24 | |
| Austin | while @queue { if @queue.peek.is_below( $current_context ) { @queue.pop.finally(); } } | ||
| Yeah. | |||
| Plus, we gotta trust somebody. | 04:25 | ||
| Tene | Right. | ||
| Austin | Might as well be the hll. | ||
| Tene | Okay, I'm comfortable with that. | ||
| I'm *un*comfortable with this keyed interface misbehaving in subclasses, though. | |||
| Austin | Can't trust the vm... | 04:26 | |
| Tene | I'll try to remember to bring it up during the day when others are around. | 04:27 | |
| Austin | What is the problem? | ||
| purl | the problem is that WikiDoc doesn't use Pod formatting codes, and I don't like to have two sets of formatting codes. | ||
| Austin | It doesn't get set when throwing a subclass? | ||
| Tene | It does get set, but fetching it through get_pmc_keyed_str doesn't work, because it doesn't make it to the VTABLE in Exception.pmc | 04:28 | |
| fetching it with getattribute works fine. | |||
| ex['resume'] # fails on subclasses | |||
| getattribute ex, 'resume' # works fine | |||
| Austin | Ah. Can I see your code? | ||
| You might have a C3 problem. | |||
| "The first parent is the main parent" | 04:29 | ||
| nopaste | "tene" at 76.27.121.193 pasted "Sure, here you go." (47 lines) at nopaste.snit.ch/19821 | ||
| Austin | Or it might be a difference between object.pmc and exception.pmc | ||
| Tene | if you swap the # from line 29 to 28, it dies with Null PMC access in invoke() | 04:31 | |
| Austin | you've modified the get_..._keyed to support resume? | 04:32 | |
| get_pmc_keyed, I guess, since resume isn't a string | 04:33 | ||
| Tene | get_pmc_keyed just ends up fetching the named attribute. | ||
| and it works fine on Exceptions. | 04:34 | ||
| Nothing in that path has been modified. | |||
| Austin | Huh? | ||
| okay. I got it | 04:35 | ||
| Tene | Um, nevermind, I guess. I added a printf to Exception.pmc, and it *does* call get_pmc_keyed in Exception.pmc when fetching from the subclass. | 04:36 | |
| Austin | But there's no data? | 04:37 | |
| Tene | yeah, it returns a null pmc. tracking it down a bit more... | ||
| Austin | Heh. Whiteknight's email was talking about overriding the get_pmc_keyed stuff to do method lookup. This stuff proxies through that same code. | 04:38 | |
| Tene | it calls GET_ATTR_resume | ||
| nopaste | "tene" at 76.27.121.193 pasted "GET_ATTR_resume definition" (10 lines) at nopaste.snit.ch/19822 | 04:41 | |
| Austin | You know the data is in there. | 04:45 | |
| Because you can access it with getattribute. | |||
| But if get_attr_str is looking in the wrong place... | 04:46 | ||
| Tene | op getattribute is just: $1 = VTABLE_get_attr_str(interp, $2, $3) | 04:47 | |
| Austin | But which vtable? | 04:48 | |
| purl | which vtable are we referring to at the moment? | ||
| Austin | I'm wondering if there's some shenanigans going on with pmcproxy | ||
| Tene | my printf shows that it does end up in Exception.pmc's get_attr_str | 04:49 | |
| Austin | Right | ||
| But what set_attr did it go to? | |||
| throw calls vtable-set-attr-str directly | |||
| And when you call get-attr-str directly, you get the data back | |||
| But when you call get-pmc-keyed, which locally-calls get_attr_str, you get bupkis. | 04:50 | ||
| Maybe try calling the vtable version of getattr-str from get_pmc_keyed? | |||
| Tene | no change. | 04:52 | |
| Austin | bummer | ||
| Is this code on a branch somewhere? | 04:53 | ||
| Tene | Yes. | ||
| exceptions_refactor | |||
| oh, if I add a 'resume' method, I'll have to deal with the C/PIR boundary, I think. | 04:56 | ||
| So, that's less than ideal. | 04:57 | ||
| Well, I'll just stick with using getattribute for now, and try to ignore it. | 04:58 | ||
|
05:09
davidfetter joined
|
|||
| dukeleto | sweet. parrot compiles with the latest clang | 05:13 | |
| the test suite passes too! | 05:19 | ||
| dukeleto does a little dance | |||
| dalek | rrot: r44555 | tene++ | branches/exceptions_refactor/src (2 files): Allow rethrown subclassed exceptions to find the next handler. |
05:20 | |
| Austin | Suppertime! | 05:25 | |
| dalek | rrot: r44556 | bacek++ | branches/ops_pct/compilers/opsc (13 files): Brake everything. Restructure files and directories. Strip out old stuff |
05:53 | |
| rrot: r44557 | bacek++ | branches/ops_pct/compilers/opsc/opsc.pir: Fix opsc.pir |
|||
| rrot: r44558 | bacek++ | branches/ops_pct/compilers/opsc/Rules.mak: Remove removed opsc_core from Rules |
|||
| rrot: r44559 | bacek++ | branches/ops_pct/compilers/opsc/src/Ops/Op.pm: Borrow Ops::Op from ops2c |
06:09 | ||
| rrot: r44560 | bacek++ | branches/ops_pct/compilers/opsc (2 files): Add build of Ops::Op |
|||
| rrot: r44561 | bacek++ | branches/ops_pct/compilers/opsc/t/04-op.t: Add tests for Ops::Op |
|||
|
06:33
eternaleye joined
06:52
uniejo joined
07:13
eternaleye joined
07:56
fperrad joined
08:10
iblechbot joined
08:36
bacek joined,
riffraff joined
08:53
mikehh joined
08:57
payload joined
09:02
slavorg joined
09:08
mikehh joined
|
|||
| dalek | rrot: r44562 | mikehh++ | trunk/runtime/parrot/library/Test/Builder/Test.pir: fix codetest failure - trailing spaces |
09:26 | |
|
09:34
mikehh joined
09:36
AndyA joined
09:40
bacek joined
|
|||
| dalek | rrot: r44563 | bacek++ | branches/ops_pct/compilers/opsc (3 files): Made Ops::Op inherited from PAST::Block and construct them during compilation phase |
09:42 | |
|
09:43
eternaleye joined
09:53
JimmyZ joined
09:54
JimmyZ joined
|
|||
| mikehh | All tests PASS (pre/post-config, make corevm/make coretest, smoke (#32446), fulltest) at r44562 - Ubuntu 9.10 i386 (g++ with --optimize) | 09:55 | |
| dalek | rrot: r44564 | bacek++ | branches/ops_pct/compilers/opsc (3 files): Add stub for Ops::File |
09:58 | |
| rrot: r44565 | bacek++ | branches/ops_pct/ext/nqp-rx/src/gen/settings.pm: Update nqp settings |
|||
| rrot: r44566 | bacek++ | branches/ops_pct/compilers/opsc (2 files): Fix parsing almost empty ops |
|||
| rrot: r44567 | bacek++ | branches/ops_pct/compilers/opsc (2 files): Implement Ops::File.read_ops |
|||
| mikehh | heading back to amd64 - bbiab | 10:07 | |
|
10:18
mikehh joined
10:33
gaz joined
11:20
kid51 joined
11:23
smash joined
12:05
bkuhn joined
12:12
jimk joined
12:30
tetragon joined
12:37
plobsing joined
|
|||
| dalek | rrot: r44568 | bacek++ | branches/ops_pct/compilers/opsc/t/03-past.t: Rewrite test in NQP |
12:42 | |
| rrot: r44569 | bacek++ | branches/ops_pct/compilers/opsc/t/03-past.t: Fix test |
|||
| rrot: r44570 | bacek++ | branches/ops_pct/compilers/opsc/src/builtins.pir: Add lc |
|||
| rrot: r44571 | bacek++ | branches/ops_pct/compilers/opsc (5 files): Add normalization of op args as in ops2c |
|||
| rrot: r44572 | bacek++ | branches/ops_pct/compilers/opsc (2 files): Stole expand_args from ops2c |
|||
| rrot: r44573 | bacek++ | branches/ops_pct/compilers/opsc (3 files): Move expand_args into Actions |
|||
| rrot: r44574 | bacek++ | branches/ops_pct/compilers/opsc (3 files): Create op variants during parsing |
|||
|
12:45
ruoso joined
12:49
cognominal joined
12:50
cognominal joined
12:57
whiteknight joined
13:01
payload joined
|
|||
| whiteknight | good morrow, kind #parrot | 13:01 | |
|
13:19
iblechbot joined
13:30
FullMetalHarlot joined
|
|||
| whiteknight | ENETSPLIT | 13:49 | |
|
13:51
KatrinaTheLamia joined,
mikehh joined,
bkuhn joined,
riffraff joined,
dalek joined,
NotFound joined,
Austin joined,
PacoLinux joined,
preflex joined,
wagle joined,
TonyC joined,
szabgab joined,
pmichaud joined,
Coke joined,
dngor joined,
eirik joined,
cotto_work joined,
ttbot joined,
confound joined,
sri joined,
bacek_at_work joined,
Tene joined,
ingy joined,
solarion joined,
rhr joined,
workbench joined,
slavorgn joined,
cxreg joined,
Infinoid joined,
jjore joined,
elmex joined,
baest joined,
frodwith joined,
tewk joined,
treed joined,
athomaso1 joined,
eiro joined
13:52
mikehh joined
13:58
Andy joined
14:00
payload1 joined
14:01
mikehh joined
14:07
mikehh joined
14:13
davidfetter joined
14:34
cognominal joined
14:36
JimmyZ joined
15:06
ruoso joined
15:07
mikehh joined
15:09
zostay joined
15:12
bubaflub joined
15:14
slavorgn joined
|
|||
| Tene | anyone willing to express an opinion on how handle_types, handle_types_except, handle_classes, and handle_classes_except should interact with each other? | 15:33 | |
| dalek | kudo: 9efead6 | (Solomon Foster)++ | src/core/Bool.pm: Add Bool.perl. |
||
| kudo: bbe9441 | (Solomon Foster)++ | t/spectest.data: Turn on S02-literals/char-by-number.t and S02-names_and_variables/perl.t. |
|||
| kudo: af0424a | (Solomon Foster)++ | src/core/Signature.pm: "Bool::True" instead of "1", as per jnthn. |
|||
| Tene | Hey! Those are commit messages, not opinions about exception handlers! | ||
| Austin | Fail - you can only handle one or the other. | ||
| Tene | orly? Hmm. That sounds reasonable. | 15:35 | |
| Austin | Since classes is new, types vs. classes can be exclusive. | 15:36 | |
|
15:36
lucian joined
|
|||
| Austin | classes and classes-except is the first time that handle_yes and handle_no might be meaningful in the same scenario. | 15:36 | |
| I'd say look-for-no, and if not found, look-for-yes. | 15:37 | ||
| That lets you do "handle subclasses of A, except for any subclasses of A::X | |||
| Tene | I'm tempted to just have a sense bit for include/exclude, and if you really want anything more-complicated, use a subclass of ExceptionHandler (NYI) | 15:38 | |
| Austin | That also works. | ||
| Tene | or, handle A, and rethrow if A::X | ||
| So, let's do that. | |||
| Austin | I was wondering if typed versus class-ed handlers weren't different pmcs | ||
| Tene | but your inclincation is that typed filters and classed filters wouldn't make sense on the same handler? | 15:39 | |
| right? | |||
| purl | ooh, the system. right, right. | ||
| Austin | No. | ||
| Tene | purl, forget right. | ||
| purl | Tene: I forgot right | ||
| Tene | Is that "No, you're wrong about my inclination." or "No, both on the same handler wouldn't make sense."? | 15:40 | |
| Tene english fail | |||
| Austin | I don't see them both on the same handler. | ||
| Tene | Okay. I should be able to reduce this to a single array and two sense bits, then. | ||
| Austin | And I kind of see deprecating typed exceptions, too. | 15:41 | |
| But that's for tomorrow. | |||
|
15:41
Psyche^ joined
|
|||
| Austin | Here's a weird thought: does an exception handler have anything in common with a multisub, in this model? | 15:43 | |
| We're basically saying "catch these, and send them here, here, or here." | 15:44 | ||
|
16:03
whiteknight joined
16:04
theory joined,
riffraff joined,
Andy joined
16:06
betterworld joined
16:10
lucian joined
|
|||
| Austin sings, "So here we a-are, in the Tijuana jail; ain't got no friends to go our bail!" | 16:11 | ||
| Tene | Austin: Quite possibly. | ||
| Tene committed, now afk working. | |||
| dalek | rrot: r44575 | tene++ | branches/exceptions_refactor/src/pmc/exceptionhandler.pmc: Refactor ExceptionHandler to use one array instead of four. |
16:16 | |
|
16:18
davidfetter joined
|
|||
| mikehh | All tests PASS (pre/post-config, make corevm/make coretest, smoke (#32454), fulltest) at r44574 - Ubuntu 9.10 amd64 (g++ with --optimize) | 16:22 | |
| davidfetter | oh hai | 16:24 | |
|
16:28
whiteknight joined
16:44
patspam joined
16:53
payload1 left
|
|||
| dukeleto | 'ello | 16:58 | |
|
17:02
smash joined
|
|||
| Tene | Hi! | 17:03 | |
|
17:03
shockwave joined
|
|||
| shockwave | Hello. | 17:04 | |
| To overload the == operator, there is 'is_equal' vtable method. I don't see a vtable method for '!='. Is it not possible to override != ? | |||
| Austin | There's the 'ne' opcode. | 17:09 | |
| == maps to eq, or iseq. != maps to ne, or isne | 17:10 | ||
| (ne returns !vtable_is_equal) | |||
| (See $_OPS/cmp.ops) | 17:11 | ||
|
17:11
kurahaupo joined
|
|||
| shockwave | Austin. They way I find out about vtable methods is by looking at src/vtable.tbl. There is a is_equal method there. | 17:14 | |
| Austin | sure | ||
| :) | |||
| But somebody has to call those methods. | |||
| shockwave | You mentioned that != maps to ne, or isne. Is there a way to make the connection of != to ne? | ||
| Austin | Probably no. | ||
| The 'ne' opcode is a test-and-branch op, while isne returns a result as an int expression. | 17:15 | ||
| shockwave | Sorry, that's not what I mean. | ||
| Austin | ok | ||
| What *do* you mean? :) | 17:16 | ||
| shockwave | What I meant is, if I don't see something in vtable.tbl, for mapping to !=, how can I draw a conclusion as to what it would be based on what's in cmp.ops | ||
| Austin | Well, cmp.ops contains this: $1 = !VTABLE_is_equal(interp, $2, $3); | 17:17 | |
| Tene | if you want to know what an op does, just read src/ops/foo.ops | 17:18 | |
| Austin | So I'd recommend you read the pod first (perldoc cmp.ops, or check the docs/ directory), and then follow up by reading the source. | ||
| Just be warned that the docs frequently lie. | 17:19 | ||
| :< | |||
| shockwave | I'm about to read the doco you guys mentioned, but it's looking like there is no != vtable override. | 17:20 | |
| I base that assumption on the fact that ne is defined as !VTABLE_is_equal. | |||
| One could draw the conclusion that vtable method names are the same as the function names, minus the VTABLE_ part | 17:21 | ||
| Thus, there is no VTABLE_isnt_equal. | |||
| Hopefully I'm wrong. | |||
| Thanks, Austin, Tene. | |||
| Austin | You're welcome. You're also right. | ||
| (Why do you want there to be a vtable op for != ? | |||
| Tene | shockwave: you're correct. There isn't a separate vtable for != | 17:22 | |
| != is *defined* as "the opposite of ==", so that's how it's implemented. | |||
| shockwave | Austin, so that I can map both != and == to an override in my language. | ||
| Austin | Oh. No. | ||
| shockwave | Operator overload. | 17:23 | |
| Tene | >< ew | ||
| No, that's not supported. | 17:24 | ||
| shockwave | Some people like it, some people dont. But, in either case, I need the functionality. | ||
| It really helps to override operator for things like 3D matrices and vectors. | |||
| Tene nods | |||
| shockwave | Otherwise you find yourself doing things like Vector.plus(Vector.times(Vector)) | 17:25 | |
| Tene | when dealing with matrices and vectors, etc, is it not just "the opposite of =="? | ||
| shockwave | Tene, yes. | ||
| Tene | "Yes, it is just the opposite of ==" or "yes, it is not just the opposite of =="? | ||
| Apparently I fail at english negation today. | 17:26 | ||
| kurahaupo | question would go away if it were VTABLE_equal(pmc1,pmc2,equalresult,neresult) | ||
| question would go away if it were VTABLE_equal(target,pmc1,pmc2,equalresult,neresult) | |||
| shockwave | Tene, somehow, I need to be able to do this in PIR: $P0 != $P1 # Both would be vector objects. | ||
| and I need to call a custom made function to deal with that. | 17:27 | ||
| vtable is_equal maps nicely to ==, but to deal with !=, I'm not sure what kind of mess I'm gonna need to create. | |||
| tewk | $P2 = $P0.'custom_made_function'($P1) | 17:28 | |
| Tene | shockwave: is the answer returned going to be different from: { $I0 = $P0 == $P1 \\n not $I0 } | ||
| shockwave | Tene. Yes. | ||
| Tene | shockwave: if you define VTABLE_equal, then both == and != will work | ||
| Okay, in that case, I wouldn't say that the operation is != | |||
| Austin | I think that != does not have the same definition as not( == ) | 17:29 | |
| shockwave | BUT, the user is free to overload != however they want. | ||
| Austin | Okay | ||
| Tene | at least not as parrot thinks of it. | ||
| shockwave | Unfortunately. | ||
| particle | smells like a multimethod to me | ||
| kurahaupo | User can overload either eq or ne but not both | 17:30 | |
| plobsing | shockwave: can't you modify tene's suggestion to use a PMC { $P2 = $P0 == $P1 \\n $P3 = not P2 } ? | ||
| Tene | plobsing: he wants to support == and != not being related at all. | ||
| Austin | Yeah, that's a multimethod. Tene is right. | ||
| Tene | that is, it's possible for both == and != to be true, or both to be false. | ||
| kurahaupo | Yuck. | 17:31 | |
| Austin | shockwave: Build a :multi sub. Then when a user overrides !=, extend the multisub by adding another arguments-permutation | ||
| Tene | shockwave: vtables aren't the place to be doing that. use methods, and have the compiler for your language compile operations to function calls. | ||
| s/methods/functions/whatever | |||
| shockwave | Tene. As Parrot is defined, I must do that. It's just that == mapped very nicely to is_equal, and Parrot took care of the details. | 17:33 | |
| I'll do it with subs. | |||
| Thanks | |||
| kurahaupo | Or silently convert overloading of != into overloading of == with a wrapper that inverts the result. | ||
| Tene | and one of those details is that the != op is defined as the opposite of the == op. You can still use ==, and just have your default != op use parrot's != | 17:34 | |
| kurahaupo: that won't work for defining both == and != independently. | |||
| "== op" overloading goes in vtable equals. default != function just calls parrot != on the arguments. | 17:35 | ||
| kurahaupo | That's intentional. throw error if they try. | ||
| Tene | kurahaupo: he *want* to support that. that's a requirement of his language. | ||
| shockwave | For now, I will restrict != to not be overloadable and do the inversion thing. | ||
|
17:36
payload joined
|
|||
| shockwave | So that if one overloads == in the language, it will behave as Parrot (Automatically supply a !=, which does the inversion). | 17:36 | |
| I can live with that. | |||
| Thanks for the sudjestion, guys. | 17:37 | ||
| Tene | np | ||
| kurahaupo | IMHO if == & != can have same value the those are the wrong names for whatever is being expressed. | 17:38 | |
| shockwave | kurahaupo, I agree. | 17:39 | |
|
17:40
payload joined
17:53
szabgabx joined
17:54
PerlJam joined
18:16
cosimo joined
18:23
kurahaupo1 joined
|
|||
| dukeleto | if i give --cc=clang to Configure.pl, but don't set --link or --ld, is it using gcc for those? | 18:33 | |
| in case anybody is wondering, i found the free non-commercial download page for icc: software.intel.com/en-us/articles/n...-download/ | 18:39 | ||
| whiteknight++ | |||
|
18:42
ruoso joined
18:43
gaz joined
19:02
cosimo joined
|
|||
| Coke skips review. | 19:07 | ||
| dukeleto: if you want to know what it's using, look at config_lib.pasm, or use parrot_config | |||
| (or the Makefile) | 19:08 | ||
| whiteknight | dukeleto: (re: --cc=clang) I think it uses gcc in thosec ases, yes. I always do the complete "--cc=clang --ld=clang --link=clang" incantation | 19:12 | |
| Tene | So, there's a problem I ran into last night. Exception.pmc stores stuff in attributes. using getattribute on subclasses of Exception works perfectly. The standard interface, though, is get_pmc_keyed, and Exception.pmc's get_pmc_keyed just calls SELF.get_attr_str, which calls GET_ATTR_foo, and that just returns pmcnull for subclasses. | 19:13 | |
| whiteknight | of course, I have a huge obnoxious library of aliases and functions that do i for me | ||
| Tene: sounds delicious. Why does GET_ATTR_foo return PMCNULL? | |||
| Tene | No idea. | 19:14 | |
| whiteknight | okay | ||
| Coke | ISTR there is setup you have to do in the PMC to allow attr's to work in subclasses. | ||
| ISTR this broke tcl for after the initial switchover. | |||
| (but tcl doesn't subclass exception...) | |||
| Tene | Coke: getattribute on the subclass instance works fine. | ||
| Coke | it didn't say getattribute. =-) | 19:16 | |
| Tene nods. | |||
| Coke | s/it/I/ | ||
| I think the ATTR's were special. | |||
| I think cotto might have been the guy that worked on that, but I can't recall for sure. | |||
| Tene | okay, looks like it depends on how it's set. | 19:21 | |
| cotto_work | hi | ||
| Tene | set with keyed, can only fetch with keyed. set with setattribute, can only fetch with getattribute | ||
|
19:21
hercynium joined
|
|||
| Austin | Heh. | 19:21 | |
| nopaste | "tene" at 76.27.121.193 pasted "Example of weirdness with subclasses" (45 lines) at nopaste.snit.ch/19829 | ||
| Austin | Data is fine, just two separate bits of data. | ||
| Tene | Yeah. | ||
| if nobody has any ideas, I'll take it to the list. | 19:23 | ||
| Austin | Hey, cotto_work. Do you know anything about how to get access to ATTRs in a subclass of a pmc? | ||
| cotto_work | in pir? | 19:25 | |
| in C it's the same as with the parent class | |||
| Austin | No, C. This is for Tene. | ||
| There seems to be different data being accessed by the get/set_attr_str macros and the VTABLE functions when a C Exception.pmc is subclassed in pir. | 19:27 | ||
| Tene's recent nopaste highlights the difference using get/set_pmc_keyed, which in Exception just calls SELF.get/set_attr_str | |||
| cotto_work | I have to take off for a bit but I can look at it this afternoon. | ||
| Tene | cotto_work: look for mail on the list. | 19:28 | |
| it'll be there shortly. | |||
| Austin | What is the "PObj_is_object_TEST" ? | ||
| So if the subclass is an object, it calls the vtable method. Which looks for the attrib-index in an attributes table? | 19:32 | ||
| Tene | #define PObj_is_object_TEST(o) PObj_flag_TEST(is_object, o) | 19:34 | |
| sent. | |||
| I don't remember if this is the list I have issue posting to or not. | 19:35 | ||
| Coke | I see no post nor admin request. | 19:38 | |
| dalek | kudo: 64e4d36 | (Solomon Foster)++ | t/spectest.data: Turn on bit.t, equality.t, increment.t, and inplace.t, all in S03-operators. |
19:52 | |
| NotFound | Tene: last time I tried, to access the attributes of the PMC in derived classes you need to add_attribute to the class. That doesn't mean doing that works well, though. | 19:55 | |
| And when it works, someone broke it in some PMC by directing accessing the attributes for speed, or something. | 19:56 | ||
| In short: the full attributes thing doesn't work well with class derived from PMC | 19:57 | ||
|
19:59
joeri joined
|
|||
| dalek | rrot: r44576 | coke++ | trunk/DEPRECATED.pod: The only place a .namespace is declared in the repo with an embedded :: is examples/ |
20:02 | |
|
20:03
bubaflub left
20:07
riffraff joined
|
|||
| Tene | Hmm. My mail still hasn't arrived at the list. | 20:07 | |
|
20:14
kjeldahl_ joined
|
|||
| cotto_work | I see it. | 20:23 | |
| Tene | ah, yes, I see it now too. | 20:30 | |
| tewk | Tene, I saw a similar problem because of PMCProxy | 20:36 | |
| Basically an object had a pointer to a PMCProxy, but the PMCProxy didn't know it was an object so it used PMC_data(pmc) instead of VTABLE_get_attr_str. | 20:37 | ||
| I don't remember exactly but check it out. | 20:38 | ||
|
20:45
ash_ joined
21:18
tjc joined
21:22
snarkyboojum joined
21:36
eternaleye joined
|
|||
| dalek | kudo: 5e5969d | (Solomon Foster)++ | t/spectest.data: Turn on S04-statements/ given.t and if.t. |
21:39 | |
|
21:41
tjc left
21:42
NotFound joined
21:43
bacek joined
|
|||
| cotto_work | hi bacek++ | 21:44 | |
| bacek | good morning cotto :) | ||
| Why ++ today? | 21:45 | ||
| cotto_work | opsc work over the weekend | ||
| Coke | bacek-- # too many questions. | ||
| bacek | Coke, Yay! :) | ||
| Coke is harsh. | |||
| cotto, you boson. | |||
| anticoke | don't get too close | 21:46 | |
| It won't end well. | |||
| cotto_work | I should have some tuits this week. I'm looking forward to diving into that code again. | 21:48 | |
| What's the current plan? | |||
| purl | i guess the current plan is to get schwern and fimmy an SDSL line and put a couple boxen there. They're going to trade me power, space, and hardware needs for bandwidth. | ||
| Coke | purl, plot? | ||
| purl | Plot. What a funny word. Plot. Plot plot plot. Plot plot plotplotPLOT. PlotplotplotPLOTPLOT! Plot plot plotplotplotplot. | ||
| bacek | cotto_work, I'm going to finish end-to-end skeleton for generating .c/.h files. | 21:52 | |
| Next big thing - ops bodies parsing. | 21:53 | ||
| cotto_work | Are you planning on writing a C parser? | ||
|
21:55
tac-tics joined
|
|||
| bacek | cotto, I'll probably borrow Close :) | 21:55 | |
| cotto, and we need pmichaud++ help for speed up parsing. It takes about 35 seconds to parse all ops... | 21:57 | ||
| cotto_work | quite likely | 22:00 | |
| I'll see if I can find anything with the profiling runcore. | 22:01 | ||
| bacek | I suspect a lot of backtracking. But :: isn't implemented in nqp-rx yet. | 22:02 | |
| cotto_work | Let me know if there's anything that'd parallelize well or that you don't feel like working on. | 22:05 | |
| bacek | cotto, ops bodies parsing I think. | 22:06 | |
| cotto_work | via a C parser or via cheating? | 22:07 | |
| Coke | for parsing ops bodies, do you need all of C, or just the special bits we've layered on top? | ||
| cotto_work | (I vote for cheating since the compiler will catch any C errors) | ||
| Coke | (or, just the bits thatwe're using) | ||
| bacek | almost all of C... | 22:08 | |
| cotto_work | yeah. We'd need to parse anything that can appear in a function. I imagine we use a very significant subset. | ||
| bacek | LTM doesn't work well, so something like [ goto NEXT () | .*? ] doesn't work as expected. | 22:09 | |
| Close? | |||
| purl | hmmm... Close is close file (or pipe or socket) handle or bad on sockets, use shutdown() instead or horseshoes or grenades or nuclear weapons or code.google.com/p/close/ | ||
| cotto_work | that presents some difficulties to the "flagrant cheating" approach | 22:10 | |
| why not do the bare minimum parsing necessary to capture an op body (matched curly braces, string parsing, etc) and do simple search and replace on the op body? | 22:14 | ||
| I'll have to look at that approach when I get home tonight. | 22:18 | ||
| It'd be nice to avoid the complexity of a near-complete C parser if possible. | |||
| bacek, to clarify, you plan is to generate the different runcore files except without any changes to the op function bodies? | 22:32 | ||
| s/you/your/ | |||
| bacek | cotto, yes. | ||
| cotto_work | ok' | 22:33 | |
|
22:51
kthakore joined
23:16
pootek joined
23:17
Whiteknight joined
23:21
snarkyboojum joined
23:27
lucian_ joined
|
|||
| cotto_work | clock? | 23:31 | |
| purl | cotto_work: LAX: Mon 3:31pm PST / CHI: Mon 5:31pm CST / NYC: Mon 6:31pm EST / LON: Mon 11:31pm GMT / BER: Tue 12:31am CET / IND: Tue 5:01am IST / TOK: Tue 8:31am JST / SYD: Tue 10:31am EST / | ||
| Whiteknight | clock? | 23:43 | |
| purl | Whiteknight: LAX: Mon 3:43pm PST / CHI: Mon 5:43pm CST / NYC: Mon 6:43pm EST / LON: Mon 11:43pm GMT / BER: Tue 12:43am CET / IND: Tue 5:13am IST / TOK: Tue 8:43am JST / SYD: Tue 10:43am EST / | ||
| cotto_work | time marches on | 23:44 | |
| Whiteknight | how are you doing tonight, cotto_work? | 23:45 | |
| cotto_work | brain tired | 23:46 | |
| want to do fun things | |||
| Whiteknight | Ah, I know that feeling | ||
| Whiteknight resists the urge to complain about his job or his incompetent manager in a publically-logged forum | 23:47 | ||
| cotto_work | fortunately my desire to get paid overrules my desire to go home early and hack on Parrot | ||
| Whiteknight | ditto | ||
| ash_ | Whiteknight: i don't know if you remember, but i mentioned to you before i am working on a sort of alternative nqp, based on the llvm, i just was going to let you know, i have a bison based parser that can parse most of the test suite for nqp, now i am working on building the AST from the parser | 23:52 | |
| Whiteknight | ash_: yeah, I remember. I mentioned your project in my blog a few days back | ||
|
23:55
patspam joined
|
|||
| ash_ | cool, thanks for mentioning it | 23:55 | |
| Whiteknight: i am writing about my implementation on my website greaterthaninfinity.com/ if your interested, i am trying to keep that up to date with my work, but i am not much of a blogger, or wordsmith so it might be painful to read at times | 23:59 | ||