Camelia, the Perl 6 bug

IRC log for #parrot, 2008-09-05

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:06 Zaba_ joined #parrot
00:06 bacek joined #parrot
00:09 AndyA joined #parrot
00:15 japhb joined #parrot
00:31 Theory joined #parrot
01:03 Whiteknight joined #parrot
02:04 Theory joined #parrot
02:12 particle1 joined #parrot
02:37 * kid51 must sleep
02:37 purl $kid51->sleep(8 * 3600);
02:40 s1n anyone know what get_pmc_keyed refers to (i.e. unimplemented method maybe?)
03:13 Whiteknight joined #parrot
03:15 Ademan joined #parrot
03:24 tetragon joined #parrot
04:25 tetragon joined #parrot
04:33 pmichaud get_pmc_keyed is a vtable method
04:34 pmichaud it's used for looking up entries (e.g. in a hash or array)
05:01 PerlJam good morrow.
05:09 pmichaud good morning
05:13 * PerlJam is staying up with a coughing child.
05:15 pmichaud sorry to hear that
05:15 pmichaud I've had a few nights like that :-|
05:17 PerlJam So, what's new in the world?
05:17 tetragon joined #parrot
05:17 pmichaud not a whole lot, other than news already reported :-)
05:19 PerlJam I'm still waiting to hear from TAMUCC. The position must stay open until 9/11, so I guess they can't officially hire me until 9/12
05:20 pmichaud sounds like business as usual :-)
05:23 pmichaud is Cyndi excited?
05:23 PerlJam I think I have some small insight into what it's like to be retired.  I keep wandering around looking for stuff to do.  I try to do parrot/rakudo things but kids/wife make that difficult.  So far I've mowed my sister-in-law's grass, made lots of meals,and generally puttered around their house.
05:23 PerlJam Cyndi is very excited (and happy)
05:23 pmichaud well, your insight into retirement somewhat matches mine :-)
05:25 PerlJam yeah, but you nominally get to hack on rakudo as your "day job"  :)
05:26 pmichaud well, between disability, kids, and travel there haven't been many "days" for my "job"  :-)
05:26 pmichaud (this last week there were some, but I'm apparently still recuperating from this summer :-)
05:29 PerlJam I've rediscovered that I'm not "normal".  I've been helping Cyndi's sister with her algebra homework (she's going back to school to become a teacher) and apparently I remember how to do it better than her engineer husband.  Everyone has been marveling at my ability to do algebra and I've been boggling that everyone is marveling.
05:30 pmichaud shall I send Matthew?  he does algebra pretty well also :-)
05:30 PerlJam heh
05:31 chromatic joined #parrot
05:31 PerlJam greetings chromatic
05:31 chromatic Greetz.
05:32 chromatic pmichaud, did you see my response to RT #58578?
05:32 pmichaud not yet
05:32 pmichaud I'm looking into something else
05:33 chromatic Good; I think I have a simpler solution.  (But I blame Rakudo still, not Parrot.)
05:36 pmichaud I'm pretty sure it needs to be max >= min
05:37 pmichaud the core of the difficulty is that there isn't really a way to find out the depth of the outer stack to know when to stop
05:37 pmichaud so we keep incrementing until we get an exception
05:38 pmichaud although I suspect we don't need to do $P0 = getinterp at each iteration.
05:38 nopaste "chromatic" at 63.105.17.30 pasted "Another Attempt (Less Confusing)" (21 lines) at http://nopaste.snit.ch/13959
05:39 pmichaud I wanted to have the ability to specify a range of depths to search
05:39 pmichaud thus the min/max approach
05:40 chromatic This still uses min/max, but it doesn't increment depth and decrement max every time through.
05:41 pmichaud except depth needs to be offset by one from min-max
05:41 pmichaud I want min and max to be relative to the caller, not to !OUTER
05:42 pmichaud i.e., a min of 1 would be !OUTER's caller's caller
05:43 chromatic but depth starts at min and goes up to max
05:43 pmichaud depth starts at min + 1
05:43 pmichaud and goes to max + 1
05:43 chromatic Right, min + 1
05:43 chromatic I don't understand why you decrement max every iteration though.
05:44 pmichaud I think I was tired when I wrote that code. :-)
05:44 chromatic I can change it so it goes to max + 1 and test; doing that now.
05:46 chromatic I kept getting the impression it walked out of the range and the exit condition was never true.
05:46 PerlJam seems like the way it is will never go from min+1 to max+1, but rather from min+1 to int((max+min)/2)
05:47 pmichaud in the original source?  no, because it's comparing max to min
05:47 pmichaud not to depth
05:47 pmichaud and min doesn't change
05:47 PerlJam oh, right.
05:48 chromatic No crash with my latest change.
05:48 pmichaud interesting.  I'm surprised it makes a difference.
05:49 PerlJam perhaps there's an obscure bug in parrot's inc/dec  ;)
05:49 chromatic My backtrace was over 10,000 call frames deep.
05:49 chromatic Sorry, 100,000.
05:49 pmichaud I don't quite understand what was generating the call frames.
05:50 nopaste "chromatic" at 63.105.17.30 pasted "Yet Another Rakudo Seggie Patch" (26 lines) at http://nopaste.snit.ch/13960
05:50 chromatic Exception handler invocations at first, until it exhausted Parrot contexts, and then recursive context marking.
05:52 pmichaud "exception handler invocations"?   from...?
05:53 chromatic No caller depth exceptions.
05:53 pmichaud but weren't they being popped at the done: label?
05:54 pmichaud or do you mean "No caller depth" exceptions?
05:54 chromatic Yes.
05:54 chromatic i mean the exceptions, not the handlers
05:55 pmichaud so, when the caller didn't have an :outer, it would generate an exception
05:56 chromatic I believe so.
05:56 pmichaud ...and the exception never gets gc'ed?
05:56 pmichaud or...
05:56 pmichaud I'm really confused.
05:57 chromatic The exception handler causes another exception to be thrown, which causes another exception to be thrown, which...
05:57 pmichaud which exception handler?
05:57 pmichaud that's the part I'm confused about.
05:58 chromatic I'm not sure.  It's really hard to tell.
05:58 pmichaud I would've thought that the push_eh on line 91 would be the exception handler for the "No caller depth" exception.
05:58 chromatic If I could reproduce it in a few lines of PIR, I could tell you for sure.
05:58 PerlJam chromatic++ for plumbing the depths of confusion anyway.  :)
06:00 pmichaud at any rate, I _really_ don't understand why changing the indices makes any difference.  :-)
06:01 pmichaud and that scares me a bit.
06:01 chromatic Me too.
06:03 pmichaud feel free to apply the patch, though
06:04 pmichaud I do prefer your approach to iterating depth
06:04 chromatic Let's see how many passes we get this way.
06:16 chromatic joined #parrot
06:17 dalek r30772 | chromatic++ | trunk:
06:17 dalek : [Rakudo] Improved caller lookup algorithm in !OUTER; it's slightly more clear
06:17 dalek : this way.  It also appears to clean up RT #58578 (reported by Moritz Lenz).
06:17 dalek : Neither Patrick nor I trust it completely though.
06:17 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30772
06:17 nopaste "PerlJam" at 24.243.121.169 pasted "Is there an easier way?" (41 lines) at http://nopaste.snit.ch/13961
06:17 PerlJam pm: see the paste.
06:17 pmichaud looking
06:18 PerlJam I just implemented the optional exprs in loop(;;)
06:18 pmichaud I think it ought to be simply    if $<e1>
06:19 pmichaud instead of  if $<e1>[0] ne ''
06:19 PerlJam just trying to be more explicit there (and remind my self that thingy? is an array)
06:20 pmichaud I feel that explicitly testing strings here is not the right way to go
06:20 pmichaud for one,  $<e1>[0]  will stringify its AST
06:20 PerlJam hmm
06:21 pmichaud because any match object stringifies as the stringification of its result object
06:21 tewk joined #parrot
06:23 PerlJam okay, so I guess I should change the if $<eee> test too (and I'm pretty sure the original implementation did not compare agains the empty string)
06:23 pmichaud I would do
06:23 pmichaud my $block := $($<block>);
06:23 pmichaud er, actually
06:23 PerlJam but, what I was really wondering was if there was a better/easier way to generate the empty statements
06:23 pmichaud start over
06:23 pmichaud my $past := $($<block>);
06:23 PerlJam (or even the always true)
06:24 pmichaud if $<e3> {
06:24 pmichaud $past := PAST::Stmts.new( $past, $($<e3>[0]) );
06:24 pmichaud }
06:25 pmichaud my $cond := $<e2> ?? $($<e2>[0]) !! PAST::Val.new( :value(1) );
06:25 PerlJam aha! NQP groks ternary.  I had though it didn't for some reason.
06:25 pmichaud $past := PAST::Op.new( $cond, $past, :pasttype('while') );
06:26 pmichaud if $<e1> { $past := PAST::Stmts.new( $($<e1>[0]), $past ); }
06:26 pmichaud make $past;
06:26 pmichaud we added ternary to NQP a few months ago... originally it didn't.
06:27 pmichaud anyway, we only add the $<e3> and $<e1> nodes if they're non-null.
06:28 pmichaud the other way to make sure we matched something other than empty string is to use   $<e1>[0].chars
06:29 pmichaud I _think_ .chars has been implemented on match objects
06:29 pmichaud yes, it has.
06:33 PerlJam well, I'll play with rearranging things a bit.  That'll at least help me get back into the feel of rakudo again.
06:33 pmichaud okay.
06:38 PerlJam does NQP understand the modifier form of if/unless while/until, etc. ?
06:38 pmichaud no.
06:40 uniejo joined #parrot
06:43 tetragon joined #parrot
06:43 moritz pmichaud, chromatic: now that test dies after 562 for me
06:43 pmichaud yes, I didn't think it should have that big an impact.
06:44 pmichaud I'll have to look at it in the morning though.  About to submit a patch for testing and then time for sleep
06:44 chromatic moritz, do you get an error in can() ?
06:44 moritz I'll try to skip that to see if it's the individual test, or more of a complexity problem
06:44 moritz chromatic: no, segfault
06:45 pmichaud also, for that test I'd prefer that it read the rx_* files and process the skip markers from there
06:45 chromatic Hm.  Let me back out a PGE patch and see if that changes things.
06:46 moritz would you want skip markers for all Perl 6 implementations in the rx_* files?
06:46 chromatic Sorry, PCT.
06:46 pmichaud moritz: they're already there
06:46 pmichaud at least for pge and pugs
06:46 nopaste "chromatic" at 63.105.17.30 pasted "Fiddled with this in PCT Debugging It as Well" (15 lines) at http://nopaste.snit.ch/13962
06:47 pmichaud chromatic: shouldn't any locally-set exception handler automatically be popped when leaving the current sub ?
06:48 chromatic I can never remember what's the new system and what's the old system.
06:48 chromatic Some PCT code has the generated pop_eh, and some doesn't.
06:48 pmichaud I agree it doesn't hurt to have the pop_eh there.
06:51 masak joined #parrot
06:52 chromatic No problem for me with the test under gdb either way.
07:03 dalek r30773 | pmichaud++ | failthrow:
07:03 dalek : Create a new branch for testing Failure objects and exceptions.
07:04 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30773
07:11 cotto_home chromatic, can #58040 be closed?  It looks like you committed a fix but never closed the ticket.
07:16 tetragon joined #parrot
07:17 chromatic Doing it now; thanks for the reminder.
07:17 PerlJam pm: still awake?  Want to look over my loop_statement refactor?
07:18 viklund joined #parrot
07:20 nopaste "PerlJam" at 24.243.121.169 pasted "loop_statement refactor with optional expressions for those that can read diff output" (62 lines) at http://nopaste.snit.ch/13963
07:21 cotto_home does merging tickets cause rt to explode or was that a coincidence?
07:21 * moritz tests that
07:21 purl tests that are failing?
07:22 moritz purl, forget tests that
07:22 purl moritz: I forgot tests that
07:22 PerlJam Is there a more useful visualization of the results of "make spectest" ?
07:22 moritz PerlJam: make spectest_regression instead
07:23 moritz that runs everything that should work right now
07:23 moritz (if that help you)
07:23 cotto_home and it's back
07:23 PerlJam moritz: aye, thanks.  But now my question is "Is there a more useful visualization of make spectest_regression?"  :)
07:24 moritz PerlJam: not that I know of
07:24 moritz PerlJam: what would you like to have visualized? it should be boring ;)
07:24 dalek r30774 | julianalbo++ | trunk:
07:24 dalek : rename example xlib.pir to Xlib.pir (first step to make it available from rakudo
07:24 chromatic pmichaud has a visualization he uses to create his CSV numbers, but I forget what that is.
07:24 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30774
07:24 dalek r30775 | pmichaud++ | failthrow:
07:24 dalek : [rakudo]: First-cut version of Failure objects that contain
07:24 * PerlJam adds such a thing to his list of potential projects
07:24 dalek : unthrown exceptions.  Still needs a little work, but exists
07:24 dalek : in a branch because it causes a lot of spectest_regression
07:24 dalek : failures.
07:24 purl : failures are mainly due to:
07:24 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30775
07:25 moritz chromatic, PerlJam: that's tools/test_summary.pl
07:25 PerlJam moritz: But when it's not boring, not only should it be exciting, but ueberhelpful if it can  :)
07:25 PerlJam moritz, chromatic: thanks for that too.
07:26 moritz PerlJam: you mean like a HTML matrix?
07:26 pmichaud I'd like to see the progress graphs also show the size of the spectest suite in a light gray
07:26 chromatic purl, forget : failures
07:26 purl failures are wierd; dying on a call that works in the 00 file.
07:26 dalek r30776 | julianalbo++ | trunk:
07:26 dalek : rename example xlib.pir to Xlib.pir - forgot to update MANIFEST
07:26 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30776
07:26 PerlJam moritz: something like that would be nice.
07:26 moritz PerlJam: patches to the test harness are welcome (hint, hint ;)
07:27 PerlJam moritz: if it itches enough, I'll scratch it.
07:27 pmichaud (and the size of the spectest suite is in the csv file)
07:27 pmichaud anyway, sleep time here
07:27 pmichaud bbiaw
07:28 pmichaud if people want to play with spectest_regression in the 'failthrow' branch that could be interesting and helpful
07:28 chromatic cotto_home, if you find other open tickets where the last note is me applying a patch, feel free to assign them to me and resolve, or just resolve.
07:28 pmichaud (i.e., run "make spectest_regression", and then look at the test file(s) that are reporting "use of uninitialized value" and figure out if it's true or not)
07:29 pmichaud in particular, I'm wondering if
07:29 pmichaud is($foo, undef, '$foo is undef');
07:29 pmichaud should throw an exception if $foo is uninitialized :-)
07:30 chromatic Is that a rhetorical question?
07:30 moritz pmichaud: on the Perl 6 level?
07:30 pmichaud moritz: yes.
07:30 pmichaud moritz: in the test suite.
07:31 moritz pmichaud: if we have warnings, and a kind of 'use warnings FATAL => ':all'' in place, yes
07:31 cosimo joined #parrot
07:31 pmichaud there are a lot of      is($foo, undef, '$foo is undef');   in the spectest suite, and I'm wondering if we need to change those tests or if that's a valid mechanism for testing for undefness
07:31 moritz (but tests like that are really wrong anyway)
07:31 moritz yes, they should be !$stuff.defined
07:31 moritz ok !$foo.defined, ...
07:32 pmichaud okay.  I need to get .defined defined in Object then
07:32 dalek r30777 | julianalbo++ | trunk:
07:32 dalek : rename namespace xlib to Xlib in xlib example (second step to make it available from rakudo)
07:32 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30777
07:32 moritz pmichaud: yes, please
07:32 pmichaud but it'll have to be tomorrow... too tired to reliably do it tonight
07:33 pmichaud and it scares me how many times I'm repeating words.  "What the meaning of C<is> is"   "I have to get C<defined> defined"  "I'm fixing C<Failure> failures"
07:33 dalek r30778 | duff++ | trunk:
07:33 dalek : Make the expressions in a loop statement optional and refactor loop_statement
07:33 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30778
07:33 PerlJam pm: that's what you get for being wiki wiki  :)
07:33 chromatic .defined should be easy to add, right?
07:33 chromatic Just check against Undef?
07:33 pmichaud there is no Undef :-)
07:34 chromatic Even easier.
07:34 purl i guess even easier is to serve different CSS documents
07:34 pmichaud and it's a bit tricky because we also want the vtable methods to dtrt
07:34 pmichaud so, we need a vtable method that delegates to the .defined method
07:34 chromatic Okay.  If it's more than four lines I might sleep myself instead.
07:34 pmichaud and then .true and get_boolean need to be properly defined in terms of .defined
07:35 pmichaud it's more than four lines.
07:35 pmichaud might be as few as eight, but definitely more than four.  :-)
07:35 moritz ;)
07:35 moritz sleep well
07:35 pmichaud and it's intricate enough that I'd rather do it when I'm thinking clearly so I don't do bad code like the stuff we found earlier :-|
07:36 PerlJam pm: before you go ... what's needed to make next/last/redo work?
07:36 PerlJam or, where would I look for more info?
07:36 pmichaud they have to be added into PCT so that the various loop constructs can trap those control exceptions and dtrt
07:36 moritz I think we should have control exception in PCT
07:37 pmichaud and for that we also need things like   "next LABEL" which means the loop and block constructs need to be able to recognize the control exceptions that have their label
07:37 pmichaud (and the control exceptions need labels)
07:37 pmichaud we already have control exceptions in PCT -- that's how 'return' works
07:38 pmichaud we just need to add the cases for next/last/redo etc.
07:38 * moritz envisions a :catches<name1 name2> syntax, so for example a while block would be set up to catch <<last redo next @labels>>
07:39 pmichaud something like that might work.  More likely is :label('FOO') and just catch all of the control types
07:40 moritz but it shouldn't catch return
07:40 moritz so not "all"
07:40 pmichaud it'll end up catching it and rethrowing it because it's not one of the recognized control exceptions
07:41 pmichaud afaik Parrot doesn't give me a way to say "only catch these types of exceptions"
07:41 pmichaud at some point it's supposed to allow us to mark exceptions as handled or unhandled, but I don't know if that's implemented yet.
07:42 pmichaud anyway, sleep
07:42 purl i think anyway, sleep is necessary before I cough up lej's lungs some more
07:43 PerlJam purl: forget anyway, sleep
07:43 purl PerlJam: I forgot anyway, sleep
07:47 chromatic pmichaud, if you backlog, I think you set a type for the exception handler
07:47 chromatic though the syntax for that I don't remember
07:54 dalek r30779 | julianalbo++ | trunk:
07:54 dalek : Fix another MANIFEST mistake
07:54 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30779
08:00 dalek r30780 | julianalbo++ | trunk:
08:00 dalek : add nqp and perl6 to nci Xlib examples
08:00 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30780
08:02 cotto_home is Allison the only one who can grant edit bits for parrot.org?
08:04 moritz NotFound: is xlibtest.p6 supposed to be a Perl 6 file that can be run by rakudo?
08:04 moritz NotFound: if so, I'd clean it up a bit (for example it uses perl 5 style POD)
08:22 dalek r30781 | julianalbo++ | trunk:
08:22 dalek : commented out pod in xlibtest.p6 example
08:22 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30781
08:34 dalek rurban@cpan.org | parrot_installation:
08:34 dalek link: http://www.perlfoundation.org/par​rot/index.cgi?parrot_installation
08:35 moritz NotFound: in Perl 6, the POD is delimited by  =begin pod ... =end pod
08:43 barney joined #parrot
08:59 iblechbot joined #parrot
09:01 Ademan joined #parrot
09:37 kid51 joined #parrot
09:40 dalek r30782 | kjs++ | trunk:
09:40 dalek : [pirc/new] implement some instruction selection and improve grammar a bit.
09:40 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30782
09:58 kj joined #parrot
10:20 Whiteknight joined #parrot
10:26 tetragon joined #parrot
10:32 dalek r30783 | julianalbo++ | trunk:
10:32 dalek : avoid usage of deprecated opcodes in example Xlib.pir
10:32 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30783
10:46 dalek r30784 | julianalbo++ | trunk:
10:46 dalek : Xlib example: use current screen in RootWindow instead of assuming 0
10:46 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30784
10:51 kj joined #parrot
11:04 barney joined #parrot
11:17 Whiteknight joined #parrot
11:22 bacek joined #parrot
11:43 bacek joined #parrot
11:55 Debolaz joined #parrot
12:00 aconran joined #parrot
12:35 dalek r30785 | pmichaud++ | trunk:
12:35 dalek : [rakudo]: spectest-progress.csv update: 157 files, 3129 passing tests
12:35 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30785
12:41 Zaba joined #parrot
13:24 dalek r30786 | coke++ | trunk:
13:24 dalek : [cage] fix trailing whitespace causing smolder failures.
13:24 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30786
13:27 paco joined #parrot
13:44 cognominal joined #parrot
13:45 NotFound moritz: thanks for the info, but I was not at home.
13:57 dalek r30787 | julianalbo++ | trunk:
13:57 dalek : use perl6 pod delimiters in xlibtest.p6
13:57 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30787
14:03 moritz pmichaud: I have some local changes to the suite pending here, which I can't commit until you install the .defined method in global
14:06 NotFound moritz: there is more cleaning required other than the pod and the lack of use v6; ?
14:06 moritz NotFound: yes
14:06 moritz use UnquotedModuleName;
14:06 moritz and rakudo supports =, so no need to use := all the way
14:07 moritz if you want I can do some cleaning
14:07 NotFound Will be nice, I'm not fluent in perl6.
14:09 moritz allright
14:09 NotFound Someone is taking care of writing a mysql module?
14:09 moritz not that I'm aware of
14:10 NotFound I've do some testing this morning, and seems doable, at least for simple queries.
14:10 moritz cool
14:11 NotFound I will write some simple code and let people test it.
14:13 dalek r30788 | moritz++ | trunk:
14:13 dalek : clean xlibtest.p6 a bit
14:13 dalek :  * use UnquoteModuleName
14:13 dalek :  * assignment instead of binding
14:13 dalek :  * more consistent whitespaces
14:13 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30788
14:17 NotFound moritz: good, thanks.
14:31 Zaba_ joined #parrot
14:33 jan joined #parrot
14:35 dalek r30789 | allison++ | pdd27mmd:
14:35 dalek : [pdd27mmd] Fixing a test failing from deprecated opcodes, and begin the
14:35 dalek : conversion to create a new destination by default.
14:35 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30789
14:35 gryphon joined #parrot
15:06 Zaba joined #parrot
15:18 Debolaz joined #parrot
15:20 radhios joined #parrot
15:21 Theory joined #parrot
15:39 ron joined #parrot
15:40 ron I created a page on parrot.org with URL http://www.parrot.org/wiki​/some-testing-status-tools to fill in for a broken link referring to Parrot Test Status tools on the dev page.
15:41 ron Anyone willing to take a look and see if it fits the content needs of that link?
15:42 * moritz notices that the "wiki" link in the navigation points to the perlfoundation.org wiki
15:45 gryphon joined #parrot
15:50 particle1 moritz: yes, it's still todo to move that to parrot.org
15:51 ron I don't have an edit bit to fix the link.  Should I ask for one, or is someone else interested in fixing the link, or is other content appropriate to fill in there?
15:51 NotFound purl: paste?
15:51 purl paste is probably (see: nopaste) or like glue but a little safer to sniff. or http://nopaste.snit.ch:8001/ or http://scsys.co.uk:8001/ anywhere shadowpaste is or mmm, sticky paste or You there! Eating the paste. or <see> 2 girls, 1 paste
15:51 moritz ron: ask for an edit bit
15:51 ron thx
15:52 nopaste "NotFound" at 213.96.228.50 pasted "Testing mysql access from pir with nci" (78 lines) at http://nopaste.snit.ch/13965
15:53 NotFound Someone want to test?
15:53 moritz NotFound: it says mysqlclient library not found
15:53 moritz I have a /usr/lib/libmysqlclient.so.15.0.0
15:54 NotFound moritz: Do you have a link /usr/lib/libmysqlclient.so to it?
15:54 moritz no
15:55 NotFound This is a problem.
15:55 moritz ./parrot mysql.pir
15:55 moritz mysql client version: 5.0.32
15:55 moritz src/string.c:2106: failed assertion 's'
15:55 moritz Backtrace - Obtained 17 stack frames (max trace depth is 32).
15:56 moritz (after I added the link)
15:56 NotFound You can try to put the full path in the loadlib call, but I don't know if works that way.
15:56 moritz it's good to be root ;)
15:56 NotFound Oooops... forgot that doesn't work without my null string patch.
15:57 jonathan purl 2 girls, 1 paste
15:57 purl jonathan: sorry...
15:57 jonathan ...
15:57 * jonathan was genuinely curious....
15:57 NotFound moritz: look at RT#58438
15:57 moritz jonathan: RT #58602 is extra for you ;)
15:59 jonathan Oh, that'll be resolved once I get the new dispatcher in place.
15:59 jonathan Perl6MultiSub actually handles this - there are PIR tests.
15:59 moritz NotFound: do I have to re-configure
15:59 moritz jonathan: thought so
15:59 NotFound moritz: to apply that patch? No.
16:00 moritz NotFound: now it segfaults instead :/
16:01 NotFound moritz: use connection data and query valid, error check is minimal.
16:01 NotFound A query that returns at least 1 row with 1 column.
16:02 moritz ok, will do
16:02 moritz what's the order of arguments?
16:02 moritz host, database, password, user?
16:02 NotFound It only prints first column, anyway.
16:02 moritz or host, user, password, database?
16:03 NotFound host, user, password, database
16:03 moritz thanks
16:03 moritz Fetched 92426 rows.
16:03 moritz NotFound++
16:03 NotFound Uou!
16:03 moritz (that was a part of the IRC log database ;)
16:04 NotFound Not a bad test, I do it with just two rows.
16:05 NotFound Well, that demonstrates that a simple module able to do queries is doable in short time :)
16:05 moritz ...assuming that the null thingy patch is applied
16:06 NotFound moritz: I'm surprised nobody commented it.
16:06 particle1 update log set line = 'notfound++' where line like '%mysql access from pir with nci'
16:06 NotFound I will commit anyway, don't see any reason to wait.
16:08 moritz I can comment with "very impressive", if that helps you ;)
16:10 dalek r30790 | julianalbo++ | trunk:
16:10 dalek : translate NULL STRING in nci t args to NULL C strings, RT#58438
16:10 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30790
16:11 NotFound After my tests with Xlib and mysql I can only say: NCI is great!
16:11 moritz indeed
16:11 moritz tewk++ I guess ;)
16:12 NotFound Compared with writting C glue for a Perl5 module, is orders of magnitude easier.
16:13 moritz somebody should blog about this.
16:13 particle NotFound isn't using tewk's ncigen yet
16:13 particle although HE REALLY SHOULD
16:14 NotFound particle: ENOTENOUGHDOC
16:14 particle since then it'd be another nail in the coffin of the old static nci implementation
16:14 particle NotFound: could you mail tewk and p2 about it?
16:14 particle if you don't, i will
16:15 NotFound My initial question is: there is some module using it?
16:16 particle tewk had some example code... don't know if it's committed
16:16 particle lemme see
16:16 NotFound Real module, will be better.
16:17 NotFound Xlib is not exactly a simple test case.
16:36 particle i have a diff from trunk to gsoc_nci_001
16:36 particle i'm looking through it for pod and other docs
16:41 particle NotFound: compilers/ncigen/t/ has some examples
16:42 particle you need only to look at the test library to see how to use ncigen
16:49 NotFound particle: I'm unable to understand uncommented complex perl code in less that one life ;)
16:53 particle try: parrot compilers/ncigen/c99.pbc --target=parse <your_h_file>
16:55 NotFound $ ./parrot compilers/ncigen/c99.pbc --target=parse /usr/include/X11/Xlib.h
16:55 NotFound Failed to parse source
16:56 NotFound Same with several other files.
16:57 particle try compilers\ncigen\t\spi.h
16:58 NotFound Don't have that file.
16:59 particle rats, it's gone in trunk
17:08 nopaste "NotFound" at 213.96.228.50 pasted "Testing mysql access from pir with nci 2.0" (120 lines) at http://nopaste.snit.ch/13966
17:09 NotFound More error checked and show more than one column.
17:10 moritz seems to work fine here
17:11 moritz with 7 columns
17:11 moritz 83796: '-775441', '#perl6', '2005-03-12', 'autrijus', '1110648540', 'yeah. be glad it is not an arrow parameterized on polymorphic existential endofunctors inside a ST thread under STM.', '0'
17:11 moritz .oO(...)
17:12 particle O_o
17:12 moritz 159748896 exported in real    1m14.105s
17:12 NotFound Good :)
17:12 moritz bytes, that is
17:14 NotFound The speed will probably not be great, I figured now that I build the struct data in each row.
17:14 moritz 159748896 / 1024 / 1024
17:14 purl 152.348419189453
17:15 * moritz is more impressed that 150MB were exported without error
17:15 moritz measuring speed of things that are not optimized isn't very interesting
17:16 moritz (I still do that sometimes ;)
17:16 NotFound Is a better test of parrot and nci stability that way, building and discarding a lot of objects.
17:16 particle optimizing things you haven't measured the speed of isn't very productive
17:17 NotFound So, the idea that a simple mysql module is doable  has been reconfirmed :)
17:18 moritz mysqldump takes 35s for the same table
17:18 moritz so it's not that bad ;)
17:18 particle 74/35
17:18 purl 2.11428571428571
17:19 NotFound moritz: I know of a guy that optimized for speed a loop until key pressed.
17:19 particle 211% slower
17:20 moritz NotFound: there's no limit for creativity
17:20 NotFound Let me avoid the pessimization for a nicer comparaison.
17:20 particle s/creativ/stupid/
17:20 moritz particle: not 211% slower. It takes 211% of the time, so it's only 111% slower
17:21 particle oops, finger slipped. yep!
17:21 NotFound There was an example to instruct another guy, but a fantastically bad choosen example.
17:23 nopaste "NotFound" at 213.96.228.50 pasted "Testing mysql access from pir with nci - unpessimized version" (121 lines) at http://nopaste.snit.ch/13967
17:26 moritz down to 1m9s
17:27 Tene I get an assertion failure with that pir.
17:27 NotFound Not bad
17:27 Tene src/string.c:2106: failed assertion 's'
17:27 NotFound Tene: svn up
17:27 moritz (and rebuild ;)
17:27 Tene 'kay
17:28 NotFound See RT#58438 for details.
17:28 moritz running with -G makes it even faster: 1m6s (and uses only about 1.2GB ram ;)
17:29 Tene NotFound: now I get a segfault.  Is that better?
17:29 NotFound moritz: it's using the mysql function to retrieve all data in a shoot, no wonder it eats a lot of memory.
17:30 moritz Tene: did you adapt the connection parameters?
17:30 Tene Nope.
17:30 moritz NotFound: yes, I figured...
17:30 NotFound Tene: please -t and tell me where dies.
17:30 Tene moritz: what params should I set to what?
17:31 moritz Tene: the connection params to the DB in the pir source
17:31 moritz Tene: search for real_connect
17:31 Tene moritz: what should I set them to?  I don't know where this db is.
17:31 moritz Tene: you can use any mysql db that you have access to
17:31 Tene ah
17:32 moritz then search for select, and edit that line to use a useful table name
17:32 nopaste "tene" at 166.70.38.237 pasted "parrot trace for notfound" (1 line) at http://nopaste.snit.ch/13968
17:32 nopaste "tene" at 166.70.38.237 pasted "parrot trace with stderr for notfound" (1 line) at http://nopaste.snit.ch/13969
17:33 moritz I too get a segfault if I use a wrong password
17:33 Tene Okay.
17:34 NotFound A table with all columns CHAR, better.
17:34 NotFound Or VARCHAR, or whatever.
17:34 moritz int works fine here
17:36 NotFound Tene: Don't see trace in your paste. Did you use parrot -t ?
17:37 moritz NotFound: http://nopaste.snit.ch/13970
17:41 NotFound I see... I'm using the NULL MYSQL result of the connect instead of the initial to get the error message.
17:43 Tene NotFound: look at the second paste.
17:43 Tene NotFound: I forgot to redirect stderr for the first.
17:44 NotFound Tene: is the same, look at the "(1 line)"
17:44 Tene ... huh
17:44 Tene Weird.
17:45 pmichaud j
17:47 Tene k
17:47 nopaste "NotFound" at 213.96.228.50 pasted "Testing mysql access from pir with nci - fixed segfault?" (123 lines) at http://nopaste.snit.ch/13971
17:47 Tene Yeah, fixed.
17:48 NotFound pmichaud: I've been able to make Xlib.pir usable from rakudo :)
17:48 pmichaud NotFound: yay!
17:48 NotFound Look at examples/nci/xlibtest.p6
17:49 dalek r30791 | allison++ | pdd27mmd:
17:49 dalek : [pdd27mmd] Arguments to multis may be null, in which case pass it along and let
17:49 dalek : the multi decide what to do with it (throw an exception, ignore it...).
17:49 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30791
17:50 barney joined #parrot
18:03 dalek r30792 | allison++ | pdd27mmd:
18:03 dalek : [pdd27mmd] Remove deprecated n_* opcode from test.
18:03 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30792
18:13 dalek r30793 | pmichaud++ | trunk:
18:13 dalek : [rakudo]:  Update svn:ignore to ignore auto-generated 'Test.pir'
18:13 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30793
18:15 Ademan joined #parrot
18:18 martin joined #parrot
18:19 dalek r30794 | allison++ | pdd27mmd:
18:19 dalek : [pdd27mmd] Removing more cases of defaulting to modifying/morphing the
18:20 dalek : destination PMC.
18:20 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30794
18:34 dalek r30795 | pmichaud++ | failthrow:
18:34 dalek : [rakudo]:  Change use of Failure objects to merely warn instead of die.
18:34 dalek : This causes spectest_regression to pass again, but with warnings
18:34 dalek : about places where undefs are being used in value contexts (and we
18:34 dalek : can start updating tests or Failure behavior as appropriate).
18:35 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30795
18:37 Ron joined #parrot
18:40 particle http://www.infoworld.com/article/08/08/2​8/35NF-open-source-france-lessons_1.html
18:41 cotto_work if someone's bored, the patch in #32087 can be committed and the ticket closed
18:43 cotto_work the number of tests needs to be incremented to 14, but the patch is fine otherwise
18:45 PerlJam particle: that seems more like and advertisement for france than anything else.
18:48 cotto_work france++
18:50 pmichaud I don't even remember the last time I was in france.  2001, probably.
18:52 dalek r30796 | allison++ | pdd27mmd:
18:52 dalek : [pdd27mmd] Fix the call to 'is_equal' so it isn't comparing the second argument
18:52 dalek : to itself.
18:52 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30796
18:53 paco NotFound: si la implemtacion con nci tarda 74 segs y la nativa son 35 segs, no seria un 50 % mas lenta? 35 es casi la mitad de 74
18:53 NotFound paco: wrong channel or wrong LANG X-)
18:53 paco sorry
18:55 martin joined #parrot
19:00 dalek r30797 | pmichaud++ | trunk:
19:00 dalek : [rakudo]:  Merge failthrow branch back into trunk.
19:00 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30797
19:00 dalek r30798 | pmichaud++ | failthrow:
19:00 dalek : Remove obsolete branch.
19:00 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30798
19:01 PerlJam obsolete?  Wasn't it created just a few hours ago?
19:01 moritz PerlJam: and already merged ;)
19:01 pmichaud I just wanted somewhere to stick the commit until I could make sure I had spectest_regression running
19:01 pmichaud branches are cheap. :-)
19:34 dalek r30799 | pmichaud++ | trunk:
19:34 dalek : [rakudo]:  Initial implementation of .defined for Object.
19:34 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=30799
19:43 Zaba_ joined #parrot
20:18 peepsalot joined #parrot
20:29 sjansen joined #parrot
20:39 silug joined #parrot
20:49 NotFound How can I know the size of an Array PMC in rakudo?
20:51 pmichaud .elems ?
20:51 NotFound Method 'elems' not found for invocant of class 'FixedStringArray'
20:52 pmichaud oh, is that @*ARGS ?
20:52 NotFound No, is a test of a pir module.
20:52 pmichaud Rakudo doesn't have an equivalent of FixedStringArray.  However, you could try simply evaluating it in numeric context -- i.e.,  +@array
20:54 NotFound get_number() not implemented in class 'FixedStringArray'
20:54 pmichaud what is creating the FixedStringArray?
20:54 NotFound Theres is an integer context?
20:54 pmichaud Perl doesn't really have an integer context, no.
20:54 NotFound pmichaud: is returned from a method call.
20:55 pmichaud NotFound: from a Parrot builtin type, or from something else?
20:55 NotFound From a pir module. The value returned is a FixedStringArray.
20:56 pmichaud well, this is an example of cross-hll types, then.  :-)
20:56 pmichaud I don't have a quick answer, other than FixedStringArray should probably provide a get_number vtable entry.  Most of the other Parrot array types do.
20:57 NotFound I'll try with resizable one.
21:03 Tene Should FixedStringArray have a .elems()?
21:12 iblechbot_ joined #parrot
21:14 Ademan joined #parrot
21:21 nopaste "NotFound" at 213.96.228.50 pasted "First attempt of Mysql module usage from perl6" (25 lines) at http://nopaste.snit.ch/13972
21:22 NotFound Is this valid perl6?
21:23 NotFound It works if I add a get_number vtable function to FixedStringArray.
21:40 particle notfound: does "my Mysql $mysql .= new();" work?
21:40 jonathan my Mysql $db .= new(); # reads so nicely :-)
21:40 particle is $row not already a number in "my $elems = +$row;" ?
21:41 particle ah, $row is an array, i suspect
21:41 jonathan I doubt my Mysql $db .= new(); will actually work, though.
21:41 NotFound particle: yes, is an array.
21:41 jonathan Because it's calling the new() sub in a namespace.
21:41 NotFound What must be provided to make that work?
21:42 NotFound A 'new' sub in the class namespace?
21:42 jonathan NotFound: I believe, register it with p6meta, which will make a proto.
21:42 particle yeah, that'll do it
21:43 NotFound I'm now making a Mysql::Row class, to simplify.
21:43 * jonathan is very happy to see this starting to work :-)
21:43 particle that inner while loop can be replaced with a map statement (or many other things)
21:44 jonathan Will certainly do some more Rakudo stuff in the next couple of weeks than I have in this last week.
21:44 NotFound particle: I left that for you rakudo guys.
21:44 particle and $row := $r.fetch_row... don't need the colon
21:44 NotFound I'm just trying to make Mysql to work.
21:45 particle yes, it's ugly perl 6, but it is valid perl 6 :)
21:45 NotFound The +$row is a valid thing, then?
21:46 particle yes, but $row.elems is probably more clear
21:46 NotFound Are you sure pmc arrays have that method?
21:46 particle if you use RPA it will
21:47 NotFound RPA?
21:47 purl hmmm... RPA is parrot's generic array, you can call push, pop, shift, unshift etc on it.
21:48 particle ResizablePMCArray
21:48 particle rather than FixedStringArray
21:50 Tene But should FSA have .elems?
21:51 NotFound I don't see that method in resizablepmcarray.pmc nor in fixedpmcarray.pmc
21:56 particle perl 6 should wrap RPAs as Perl6Arrays
21:56 particle and Perl6Array has .elems
21:57 particle but RPA does have .elements which it inherits from FPA
21:57 particle but i hope that's not exposed to perl 6, because it's not valid perl 6
21:58 PerlJam Better would be to DBDI to work  :)
22:00 NotFound The Mysql $mysql .= new(); gives: Method 'ACCEPTS' not found for invocant of class 'Mysql'
22:00 PerlJam speaking of which ... is anyone working on dbdi?
22:00 NotFound dbdi?
22:01 PerlJam ask google, it'll tell you everything you need to know.
22:26 bacek joined #parrot
23:03 tetragon joined #parrot
23:56 TiMBuS joined #parrot

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

Parrot | source cross referenced