Camelia, the Perl 6 bug

IRC log for #parrot, 2008-10-01

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:00 chromatic Aha.
00:00 NotFound Function that is documented as: "Needs to be documented!!!"
00:00 chromatic Like most of IMCC.
00:00 chromatic Document/exorcise.
00:00 chromatic Comment out that line and the code no longer hands.
00:00 chromatic hangs
00:01 NotFound A nice optimization
00:01 tetragon chromatic: This is the major release/platform combination that is certified as Unix 03
00:03 NotFound I don't understand the comment before the optimizer_level change. What has to do the "need to allocate the temp - run reg_alloc" with the optimizer level?
00:03 chromatic tetragon, beware this platform.  I have only certified it.  It may not work.
00:04 chromatic NotFound, that code creates a new N register for some reason.
00:04 chromatic and a set_n opcode.
00:08 NotFound In pmichaud example, the mul by integer operation generates a set NO, I0 followed by a mul NUM NUM
00:08 chromatic NOM NOM
00:08 chromatic sorry
00:09 NotFound What's the reason for that? Avoid an opcode?
00:09 AndyA joined #parrot
00:09 chromatic It might be the *= rewriting.
00:10 chromatic Hm, the more I think, the more I think you're right.
00:10 chromatic Avoid an opcode.
00:11 chromatic Promote upwise, precision-wise.
00:12 NotFound I dislike assemblers and assembler-like languages that generates instructions by his own will.
00:12 bacek_ joined #parrot
00:13 chromatic It's an optimization.
00:13 chromatic It's a decent optimization in numeric code too.
00:13 NotFound I think is an unoptimization, mul NUM INT will be faster and shorter
00:17 NotFound Maybe the problem is inside try_find_op. The part commented as: "reuse generated temp Nz" may be fooling the allocator.
00:20 chromatic Just taking out that branch doesn't help though.
00:20 chromatic The alligator still loops.
00:21 chromatic This may have been one of the problems in the concurrency branch when we added the new branch stack ops.
00:21 chromatic local_branch and local_return
00:21 chromatic The basic block identifier may not know about them.
00:23 ashleyb joined #parrot
00:23 NotFound I wonder why is the reason for the optimizer_level change, An attempt to avoid this problem that sometimes worked?
00:24 chromatic That's plausible.
00:26 NotFound Ups, is too late for me. Going to bed.
00:46 Whiteknight joined #parrot
01:16 dalek joined #parrot
01:19 Juerd joined #parrot
01:32 gmansi joined #parrot
01:39 tetragon joined #parrot
01:46 AndyA joined #parrot
01:51 tetragon joined #parrot
02:13 Andy joined #parrot
02:30 GeJ Anyone with C-fu up?
02:33 Ontolog joined #parrot
02:43 Theory joined #parrot
02:47 mwhudson joined #parrot
04:12 Bzek joined #parrot
04:21 cotto GeJ, what's your question?  I don't claim great C-fu, but I can take a shot at it.
04:58 Zaba joined #parrot
05:31 PerlJam joined #parrot
05:34 cotto In Soviet Russia, code generates you.
06:09 japhb joined #parrot
06:12 uniejo joined #parrot
06:21 GeJ how can I explore a PMC under gdb?
06:21 chromatic What would you like to know about it?
06:22 GeJ Well, I'm trying to investigate the segfaulting loop we discussed about a couple of days ago. And I think I reached the point where current->pmc_ext->_next_for_GC is NULL
06:23 chromatic Excellent.
06:23 GeJ so I'd like to know what's in current
06:23 GeJ right now my gdb session is :
06:23 GeJ b src/gc/dod.c:434 if next == 0
06:23 GeJ r t/stm/runtime_4.pir
06:24 GeJ Breakpoint 3, Parrot_dod_trace_children (interp=0x8106040, how_many=4294966628) at src/gc/dod.c:435
06:24 GeJ 435             if (!PMC_IS_NULL(next) && next == current)
06:24 GeJ (gdb) p next
06:24 GeJ $1 = (PMC *) 0x0
06:24 chromatic I usually look at pmc->vtable->base_type, then look in include/parrot/core_pmcs.h to find its type.
06:25 GeJ $1 = 23
06:26 GeJ enum_class_RetContinuation I assume
06:26 chromatic That's right.
06:33 GeJ all the pointers in the PMC_EXT looks like they're NULL (_metadata, _synchronize and _next_for_GC that is )
06:34 chromatic That sounds like a big zeroed block of memory.
06:34 chromatic Or a recycled PMC_EXT.
06:40 cotto Someone needs to be smacked for making string_equal return 0 when the two STRINGs are equal.
06:41 GeJ (gdb) p current->vtable->whoami
06:41 GeJ $3 = (STRING *) 0x8170814
06:41 GeJ Is there a way to get the content of the string?
06:41 cotto That's what string_compare is for.
06:41 * GeJ apologizes for asking such stupid questions.
06:42 GeJ my C-fu sucks so much. I blame it on Perl though ;)
06:42 chromatic p current->vtable->whoami->strstart
06:42 chromatic p *(STRING *)current->vtable->whoami
06:42 chromatic p *(current->vtable->whoami)
06:43 chromatic maybe that last one is best, but I usually use ->strstart
06:43 GeJ ah, great, thank you c
06:52 Zaba joined #parrot
07:05 rafl joined #parrot
07:22 Ademan joined #parrot
07:26 dalek r31538 | rurban++ | trunk:
07:26 dalek :
07:26 dalek : [cage] fix perl5 warning
07:26 dalek : Use of uninitialized value $dynpmc_include in concatenation (.) or
07:26 dalek : string at tools/build/dynpmc.pl line 74.
07:26 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31538
07:30 Zaba_ joined #parrot
07:40 iblechbot joined #parrot
08:05 cosimo joined #parrot
08:23 mwhudson joined #parrot
08:25 moritz the table at http://www.perlfoundation.o​rg/parrot_grant_from_nlnet seems to suggest that each subsystem has to go through another iteration prior to the 1.0 release - is that correct?
08:33 Zaba joined #parrot
08:36 dalek r31539 | kjs++ | trunk:
08:36 dalek : [pirc/new] refactor some code, so that opinfo always points to the right opinfo entry. There's still some optimization to be done, that's next.
08:36 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31539
08:36 kj joined #parrot
08:51 contingencyplan joined #parrot
08:59 szabgab joined #parrot
08:59 szabgab anyone knows how to make Inline::Parrot work? tests are failing for me
09:26 tomyan joined #parrot
09:53 Zaba_ joined #parrot
09:57 krunen joined #parrot
10:06 clunker3 joined #parrot
10:50 cotto can someone please smack parrotvm.org?
10:51 iblechbot joined #parrot
10:55 moritz easier said than done
10:56 moritz apache2: /tmp/buildd/subversion-1.5.1dfsg1/su​bversion/libsvn_ra/ra_loader.c:977: svn_ra_get_log: Assertion `*path != '/'' failed.
10:58 cotto unrelatedly, does calling pobject_lives take care of calling VTABLE_mark when appropriate?
11:00 cotto and do STRINGs need to be marked?
11:04 dalek r31540 | cotto++ | trunk:
11:04 dalek : [pipp] implement get_* and set_*, and enable a few passing (!) tests
11:04 dalek : The test suite should be reworked, but I wanted to commit something functional.
11:04 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31540
11:05 dalek r31541 | moritz++ | trunk:
11:05 dalek : [rakudo] simplified Str.chop. Patch by azawawi++
11:05 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31541
11:43 dalek r31542 | cotto++ | trunk:
11:43 dalek : [pipp] add code for exists_* and delete_*, plus tests
11:43 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31542
11:59 bacek joined #parrot
12:23 bacek joined #parrot
12:26 dalek r31543 | fperrad++ | trunk:
12:26 dalek : [pipp] fix build on MinGW32
12:26 dalek : so work with GNU Make on Windows (and *nix),
12:26 dalek : but not yet with nmake on Windows.
12:26 dalek : How writes for nmake the following Makefile sample ?
12:26 dalek : export MYVAR=this_var_must_be_seen_​in_the_env_of_called_program
12:26 dalek : all:
12:26 dalek : perl -e "print join qq{\n}, sort keys %ENV"
12:26 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31543
12:30 tomyan joined #parrot
12:45 bacek joined #parrot
12:45 bacek hi everybody
12:45 purl Hi, Dr. Nick!
12:46 moritz hi
12:46 bacek purl: glad to see you alive ;)
12:46 purl bacek: i'm not following you...
12:46 bacek hi moritz
12:47 bacek moritz: You've just closed my first rakudo ticket that contains patch from someone else :)
12:48 tetragon joined #parrot
12:49 moritz yes
13:11 wolverian joined #parrot
13:17 pmichaud joined #parrot
13:19 bacek joined #parrot
13:23 bacek moritz: ping.
13:23 moritz bacek: pong
13:24 bacek moritz: there is another not mine patch for rakudo http://rt.perl.org/rt3/Tic​ket/Display.html?id=58646
13:24 bacek probably Pm checked it already.
13:24 pmichaud it's on my list.  :-)
13:24 pmichaud about to check it now.
13:24 bacek pmichaud: :)
13:25 bacek pmichaud: it's actually looks sane. And "WFM"
13:26 pmichaud looks fine to me -- feel free to apply.
13:26 moritz ok, will do
13:28 * bacek spend last couple of weeks on almost-useless-meeting-about-how-to-manage-team...
13:28 bacek Anyone have something to develop by "casual" developer? ;)
13:29 moritz you mean perl 6/parrot wise?
13:29 moritz or $job?
13:29 purl $job is in oakland, will probably move farther south in I-880 corridor *cough* *hairball*
13:29 pmichaud I'd like to see us get rid of a few more of those "Use of uninitialized value" items out of the test suite :-)
13:30 bacek moritz: meetings - $job. "casual devolpment" - for parrot
13:30 moritz pmichaud: then give me a way to 1) disable some and 2) test for them
13:30 PerlJam pm: no problem!  just start adding "no warnings 'uninitialized';"  ;->
13:30 PerlJam moritz: I just gave you #1 I think  :-)
13:30 pmichaud moritz: using .defined isn't disabiling them?
13:31 pmichaud *disabling
13:31 moritz pmichaud: there are valid cases like testting '1+undef'
13:31 pmichaud ...that's valid?!
13:31 moritz pmichaud: and I'd like to have a tool to disable them it these cases?
13:31 bacek pmichaud: both of you disagreed with my patch for Test.pm :)
13:31 pmichaud bacek: I want the tests to avoid the warnings, not to ignore them :-)
13:31 moritz pmichaud: it's valid, and it should emit a warning, but since it's inteded, I'd like a way to switch off the warnings
13:32 moritz pmichaud: there are other warnings that I can get rid of by s/todo/skip/ a few times - don't think that's desirable either
13:32 * bacek vote for local scoped "no warnings 'uninitialized'"
13:33 PerlJam bacek: Me too, but only humorously.  That's not a real solution.
13:33 pmichaud I keep thinking there ought to be an operator of some sort that marks an undef value as handled and returns the undef value
13:33 moritz pmichaud: also, .defined doesn't work on all values yet
13:33 bacek moritz: indeed.
13:33 pmichaud moritz: is there a ticket for .defined not working?
13:33 pmichaud and some examples?
13:34 moritz pmichaud: at least for $!.defined there's a ticket
13:34 bacek pmichaud: .defined returns false for protoobjects.
13:34 pmichaud okay.
13:34 pmichaud bacek: defined is supposed to return false for protoobjects.
13:34 pmichaud bacek: that's part of what makes them protoobjects.
13:34 moritz perl6: my $x; say $x.defined
13:35 moritz output see #perl6
13:35 pmichaud got it.
13:35 pmichaud that's because scalars are defaulting to Undef when they need to be an Object
13:35 moritz aye
13:35 pmichaud okay, that gets fixed as part of reference-and-value-semantics.  but .defined is noted for that case.
13:35 PerlJam Undef doesn't inherit from Object?
13:35 Tene catch undef-exception ( $-.resume() ) :)
13:36 moritz Tene: hey, you could implement CATCH blocks ;)
13:36 pmichaud PerlJam: Undef is a Parrot PMC
13:36 pmichaud Perl 6 doesn't have an Undef type
13:36 pmichaud (so no, Undef doesn't inherit from Object)
13:36 Tene They're nyi?  Point me to spectest.
13:36 moritz t/spec/S04-statements/try.t
13:37 pmichaud careful with CATCH blocks .... we also don't do START, INIT, CONTROL, etc.
13:37 pmichaud and I suspect they're all related.
13:37 pmichaud so I'm not eager to apply a patch that "just does CATCH"
13:37 Tene I'll look into it once I get to the training center.
13:37 particle can't Undef be registered as a subtype of Object?
13:37 PerlJam pm: is there some barrier between PMCs and Perl6 objects?
13:38 * Tene sends email: do-everything.patch
13:38 pmichaud PerlJam: there (needs to be) a distinction between Parrot objects and Perl 6 objects, yes.
13:38 pmichaud because Parrot objects don't always have Perl 6 semantics.
13:38 Tene moritz: are there tests for start, init, control, etc?
13:38 pmichaud Undef is an example.
13:39 PerlJam so Undef is a "parrot undef" with differing semantics than Perl6Undef ?
13:39 pmichaud yes.
13:39 pmichaud (because there is no Perl6Undef)
13:39 moritz Tene: t/spec/S04-closure-traits/*.t
13:40 moritz ack++ ;-)
13:40 Tene moritz++
13:40 pmichaud Tene:  I found a bug in the next/last/redo patch, btw.
13:40 PerlJam So ... why are scalars defaulting to the parrot undef instead of a perl6 undef?
13:40 pmichaud PerlJam: because that's the way jonathan++ coded it for now?
13:40 moritz "not yet fixed"
13:40 PerlJam gotcha
13:41 bacek pmichaud: so. is($blah, StrPos) can't be properly implemented using .defined...
13:41 moritz pmichaud: should I open another ticket for $x.defined?
13:41 pmichaud PerlJam: because at the time the scalars code is compiled, the perl6 code hasn't had a chance to create the Failure class yet?
13:41 Tene pmichaud: plz explain
13:41 PerlJam bacek: Are there StrPos yet?
13:41 PerlJam if so, /me really hasn't been paying attention.
13:41 bacek PerlJam: I had one :)
13:41 pmichaud Tene: look at the output of a simple for loop from PCT, if the iterated value is undefined then we end up with a pop_eh but no push_eh
13:42 pmichaud bacek: is($blah, StrPos)  is asking... what?
13:42 Tene very nice
13:42 Tene thanks, pmichaud.
13:42 pmichaud Tene: fixing that _might_ also avoid the other problem we're seeing, since moving that "unless" around also causes compilation to succeed.
13:42 bacek pmichaud: my $blah = "foo".index("bar"); is($blah, StrPos)
13:43 pmichaud bacek: you didn't answer my question -- what do you expect   is($blah, StrPos) to do?
13:43 Tene hmm. want me to commit fixed patch to repo?
13:43 Tene trunk?
13:43 purl trunk is live on the site or http://dev.catalyst.perl.org/repos/Catalyst/trunk/ or "svn co http://dev.catalyst.perl.org/repos/Catalyst/"
13:43 pmichaud Tene: yes, perhaps to both trunk and the branch?
13:43 bacek pmichaud: it's actually isa_ok.
13:43 Tene but then the branch doesn't exercise the bug.
13:44 pmichaud sure it does, with the version of foo2.pir I posted last night.
13:44 moritz bacek: usually the test for that is isa_ok()
13:44 pmichaud bacek: isa_ok doesn't have to check for definedness
13:44 pmichaud bacek: one could also write the test as    ok( $blah ~~ StrPos )
13:44 pmichaud bacek: none of these require .defined to be defined in 'is'
13:45 bacek isa_ok($a,$b) -> ok(isa($a),$b) -> is(isa($a), $b)
13:45 bacek It's in current Test.pm
13:45 pmichaud then it's wrong.
13:45 pmichaud if you want to test isa_ok this way, then it should be:
13:46 bacek pmichaud++ # for defined "wrong" ;)
13:46 pmichaud is(isa($a), ~$b)
13:46 Tene What's the full list of loop types that next/redo/last work on?
13:46 pmichaud Tene: in PCT should be for, while, until, repeat_while, repeat_until
13:46 Tene thx
13:47 pmichaud I still need to refactor while/until/etc.   to handle parameterized bodies
13:47 moritz Tene: in perl 6: http://perlcabal.org/syn/S04.html#Closure_traits
13:47 cotto what's the mailing list where parrot commits get sent to?
13:47 Tene I might be able to do those too.
13:47 pmichaud bacek: at any rate, the problem with defined handling and isa is not in the 'is' function but in the definition of isa_ok
13:47 * Tene offline, dressing then driving.
13:48 dalek r31544 | moritz++ | trunk:
13:48 dalek : [rakudo] Convert some 'new Failure' instances to '!FAIL', as per RT #58646
13:48 dalek : Patch courtesy by ronaldxs++
13:48 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31544
13:48 pmichaud we should probably go ahead and convert is() to use infix:<eqv>, too.
13:48 bacek pmichaud: why not infix:~~ ?
13:49 bacek (it was impossible few month ago)
13:49 moritz bacek: because is() implies symmetry that ~~ doesn't have
13:49 pmichaud bacek: we can define isa_ok in terms of infix:~~, yes.  (This somewhat assumes that infix:~~ is working... but I think that's reasonable.)
13:49 moritz pmichaud: that's a bad idea when type names are passed as strings
13:50 pmichaud for that matter, we should define isa_ok in terms of .isa
13:51 bacek isa_ok($a,$b) -> is($a.isa, $b.isa)?
13:51 pmichaud no.
13:51 pmichaud isa_ok($a,$b) -> ok($a.isa($b))
13:52 pmichaud the .isa method is already part of 01-sanity, and thus a prerequisite for Test.pm
13:52 bacek yak
13:52 dalek r31545 | moritz++ | trunk:
13:52 dalek : [rakudo] add a file to spectest_regression, and restore alphabetical order
13:52 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31545
13:52 * bacek hides.
13:52 bacek It's actually current approach in Test.pm
13:53 bacek But it fails in case of isa_ok(undef.isa("Something"))
13:53 pmichaud ...it does?
13:53 particle cotto: parrot-cvs@perl.org or something like that
13:53 bacek s/fails/emit warning/
13:53 pmichaud cotto: I think there's a new list being created for parrot commits
13:54 pmichaud cotto:  parrot-commit@lists.parrot.org I think
13:54 pmichaud I don't know if it's active yet.
13:54 pmichaud isa_ok(undef.isa("Something")) should not emit a warning -- that would be a bug if true.
13:55 pmichaud and it should be written as   isa_ok(undef, Something)
13:57 bacek rakudo: my $foo; say $foo.isa("String")
13:57 pmichaud ENOPOLYGLOTBOT
13:57 bacek EEPICFAIL
13:57 moritz probably didn't survive feather's power outage
13:58 * bacek going to sleep
13:59 bacek sorry, I have 3 meetings and 2 interviews tomorrow...
13:59 bacek must sleep
13:59 purl $bacek->sleep(8 * 3600);
13:59 * bacek glad to see at least on working bot ;)
14:00 pmichaud for some definition of "working".
14:00 moritz if "spitting out glibberish" is "working", then purl is working indeed
14:01 cotto cvs-parrot-subscribe@perl.org looks like it'll get me what I want
14:04 Andy joined #parrot
14:06 cotto parrot commits?
14:06 cotto parrot commits is cvs-parrot-subscribe@perl.org or http://www.nntp.perl.org/group/perl.cvs.parrot/
14:06 moritz yes
14:06 cotto purl, parrot commits is cvs-parrot-subscribe@perl.org or http://www.nntp.perl.org/group/perl.cvs.parrot/
14:06 purl i already had it that way, cotto.
14:06 cotto lovely
14:08 ashleyb joined #parrot
14:10 grim_fandango joined #parrot
14:11 barney joined #parrot
14:12 dalek r31546 | cotto++ | trunk:
14:12 dalek : [pipp] add get_bool to PHPArray
14:12 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31546
14:23 pmichaud Tene: when I fix the pop_eh problem in foo2.pir, the compile issue appears to go away.
14:23 Tene Yeah, I'm pretty sure that's what's causing the problem.
14:24 Tene It still shouldn't hang, but my code was wrong too
14:24 pmichaud correct.  So, if fixing PCT solves the problem, I vote that we go ahead an apply to trunk.  Then I'll take the foo2.pir code I had last night and submit as a separate ticket for solving imcc's compute_dominance problem.
14:25 pmichaud since that code doesn't rely on PCT at all.
14:25 Tene right
14:26 polyglotbot joined #parrot
14:32 NotFound joined #parrot
14:33 Tene pmichaud: what exactly does a block label mean?
14:35 particle block label? as in FOO: {...}?
14:35 Tene If I have, say, "BAR: { ... }" can what does "BAR.WHAT()" retuD[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Drn?
14:35 Tene ETOOMUCHLAG
14:38 pmichaud I'd have to look at the synopses a bit.
14:38 Tene Eh, I can probably do that.
14:39 pmichaud anyway, BAR.WHAT() would be the protoobject for the block -- i.e., probably Code or Routine
14:39 pmichaud sorry, not Routine
14:39 pmichaud Code.
14:39 Tene So it's a name for the block itself?
14:39 pmichaud yes
14:39 Tene I could call BAR(), perhaps?
14:39 Tene $x = BAR; ?
14:40 pmichaud I don't know about those.
14:40 Tene Hmm.  Okay.
14:41 Tene I'll check synopses or harass someone else into doing it for me.
14:42 pmichaud it does make some sense that a block label would be a form of lexical name for the block
14:43 Tene pmichaud: can you show me your fixed patch for Compiler.pir?
14:43 Tene I tried moving the push_eh up to start of the sub, even, and it still hangs for me.
14:43 Tene Or the fix for the pir, or whatever.
14:44 pmichaud I added an extra label after the push_eh, and got the unless to go to that.
14:44 pmichaud er
14:44 pmichaud wrong
14:44 pmichaud I added an extra label after the *pop_eh*, and got the unless to branch to that.
14:45 Tene ah
14:49 particle constant Block FOO := { ... }
14:49 particle or should that be ::=
14:51 moritz presumably ::=
14:53 dalek r31547 | tene++ | trunk:
14:53 dalek : [pct]
14:53 dalek : * Generate an exception handler for CONTROL_LOOP_NEXT exceptions in for loops
14:53 dalek : [perl6]
14:53 dalek : * Add a 'next' sub to throw CONTROL_LOOP_NEXT exceptions
14:53 dalek : [cardinal]
14:53 dalek : * Add a 'next' sub to throw CONTROL_LOOP_NEXT exceptions
14:53 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31547
14:54 Tene Next I'll refactor that code into a couple of subs, 'push_control_handlers' and 'define_control_handlers'
14:54 Tene And then add them to the other loops that need control handlers.
14:54 Tene adding redo and last somewhere in there.
14:55 Tene moritz: newly passing tests in t/spec/S04-statements/next need fudging
14:55 moritz Tene: I'll take care of that
14:55 Tene there's an Undef ~= 'A'
14:56 * Tene goes to teach about Process Accounting.
14:57 pmichaud the parrotvm.org revision links appear to not be working.
14:58 moritz yes :(
14:58 moritz I tried to find out what's wrong, without success
15:05 tewk joined #parrot
15:10 particle is it possible a subversion upgrade would help?
15:11 moritz more likely a subversion upgraded killed it ;)
15:36 dalek r31548 | moritz++ | trunk:
15:36 dalek : [rakudo] add tests for next to spectest_regression, Tene++
15:36 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31548
15:52 Theory joined #parrot
16:07 leo joined #parrot
16:10 soxet joined #parrot
16:15 moritz spectest_regression now at 4397 passing tests
16:15 particle i've got a 4+GB gz file in unix, need to split it up to transfer it, then recombine it. what commands do i use for that?
16:15 pmichaud so, maybe we can have 5k tests passing by next week :-)
16:15 moritz zcat + split perhaps?
16:15 pmichaud particle:  dd, perhaps?
16:16 pmichaud split ought to work.
16:16 moritz zcat $file.gz | split -b=$size - splits_;
16:17 moritz for i in splits*; gzp $i; done
16:17 moritz and on the receiver side simply zcat * > file
16:18 particle what does zcat do?
16:18 pmichaud uncompresses a file to standard out
16:18 pmichaud basically gunzip + cat
16:18 pmichaud but you probably want to split w/o the zcat
16:19 particle yeah, that's what i think, i don't need to unzip/rezip
16:19 moritz ah, right
16:19 pmichaud split -b=$size foo.gz foo_split_
16:19 pmichaud or something like that.
16:20 moritz has anything been done yet for the TCL/Tk on rakudo grant?
16:20 pmichaud I haven't heard anything.
16:21 pmichaud if anything's being blocked due to a rakudo feature being unimpl, I'd like to hear of it though.
16:21 moritz I'd expect the person to at least hang out here or on #perl6
16:22 particle i haven't heard a word about it
16:22 dalek r31549 | pmichaud++ | trunk:
16:22 dalek : [rakudo]: spectest-progress.csv update: 194 files, 4381 passing, 7 failing
16:22 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31549
16:23 moritz 7 failing? where did they come from?
16:23 pmichaud I suspect they come from S05-modifier/ignorecase.t
16:23 pmichaud but that's just a guess.
16:24 moritz how would test-summmary.pl know how many fail if the file name was wrong?
16:24 moritz anyway, is it clean now?
16:24 pmichaud the filename was fixed on 09-30
16:24 pmichaud this latest report is for 10-01
16:25 pmichaud I don't think it's clean now... looks to me like there are some tests in there that definitely need fudging
16:25 pmichaud (I didn't look at the tests until just now.)
16:25 pmichaud they would probably work if the :i was placed inside the regex instead of after the m
16:25 pmichaud (of course we need to test both.)
16:25 moritz here everything is fine, and t/spec/ has a clean diff for me
16:26 moritz s/clean/empty/
16:26 moritz same in languages/perl6/
16:26 pmichaud checking.
16:26 pmichaud but I don't see how m:i could pass, since rakudo doesn't parse it yet.
16:27 moritz #?rakudo emit skip_rest('unimplemented m:i parsing');
16:27 moritz #?rakudo emit =begin
16:27 particle split: 2048m: invalid number of bytes
16:27 particle rats
16:27 moritz pmichaud: that's what should stop rakudo from running these tests
16:30 moritz particle: sub postfix:<m>(Num $x) { $x * 1024**2 } # ;-)
16:32 pmichaud ah, on my system ignorecase.t is complaining "no ICU lib loaded"
16:32 moritz makes sense
16:32 moritz case information is a Unicode property
16:33 moritz so should I remove it from spectest_regression again?
16:33 particle or conditionally fudge them
16:33 pmichaud I don't know if we have "conditional fudge"
16:33 moritz we don't
16:33 particle #?rakudo emit
16:33 pmichaud I'm not sure why we're getting the error, though.
16:34 pmichaud I don't think in Perl 6 we have a way to check for ICU, though.
16:34 NotFound What charsest and encoding use this test?
16:34 moritz the non-fudged tests are all ASCII
16:34 pmichaud right, so I'm not sure why it would give an error for those.
16:35 NotFound moritz: did you mean the content of the strings, or the encoding used?
16:35 moritz #?rakudo emit skip_rest('unimplemented m:i parsing');
16:35 moritz #?rakudo emit =begin
16:35 particle is downcase used in the generated pir?
16:35 moritz sorry, double copy-n-paste
16:35 pmichaud the regexes will use downcase to perform the case-insensitive match.
16:35 moritz NotFound: the string contents
16:35 purl i heard the string contents was easiest with:
16:35 pmichaud but the strings involved should still be ascii
16:36 NotFound I can take a look at it, making a workaround if all codepoints are < 128
16:36 pmichaud parrot/pge should be handling that already
16:36 particle right
16:36 pmichaud so hold off on the workaround.
16:38 pmichaud aha... the downcase is in compiling the regexes
16:38 pmichaud and yes, the source in this case is unicode
16:39 NotFound utf8?
16:39 purl utf8 is probably the One True Encoding or RFC 2044 or statico's test at http://langworth.com/pub/unicode.png (screenshot) and http://langworth.com/pub/unicode.html (source & browserable) or at http://www-950.ibm.com/software/globalizati​on/icu/demo/converters?conv=UTF-8&amp;s=ALL or teh sux0r ( http://sam.zoy.org/writings/utf8/ ) or use the fine 8
16:39 pmichaud yes, utf8
16:40 masak joined #parrot
16:40 pmichaud okay, I understand now.
16:41 pmichaud NotFound: if you want to create a patch for src/charset/unicode.c that implements downcase for codepoints < 256, that'd be great.
16:42 NotFound pmichaud: I'm doing a without-icu build to do some tests.
16:42 NotFound pmichaud: 256 or 128?
16:42 NotFound 128 is easier and less problematic.
16:43 pmichaud well, I was thinking 256 -- tolower() should be able to work for that.
16:43 pmichaud (that's what iso-8859-1.c currently uses for its downcase opcode)
16:43 particle yep
16:43 pmichaud oh, wait, never mind
16:43 particle um, unicode < 256 *is* latin1
16:44 pmichaud it *doesn't* use tolower() for the 128-256 range.  But the code that is in iso-8859-1.c would work for codepoints up to 256
16:44 NotFound Yes, but I suspect many people are assuming that the defualt is not 8859-1 but "anything fixed 8 my system uses"
16:44 particle can the regex code determine if there are any chars > 255, and default to latin1 if not?
16:44 pmichaud doesn't matter, just don't use tolower()
16:45 pmichaud particle: this is the regex generator that is running into the problem
16:45 particle yes, i know
16:45 pmichaud and there's not an easy way to say "are there any chars > 255" short of looping through them all and checking.
16:45 pmichaud and that would be slow to do for every literal in a regex.
16:45 particle how is it done for source?
16:46 NotFound Are we all Ok that will be just a provisional workaround, right?
16:46 particle yes, until we have unicode properly implemented in parrot
16:46 pmichaud it's less provisional than what we have now.
16:46 pmichaud right now our "workaround" is "throw a 'No ICU library found' exception"
16:47 NotFound pmichaud: yeah, but at least is a clean and comprehensible diagnostic ;)
16:48 pmichaud the algorithm for downcase is basically     if (x >= 0x41 && x <= 0x5a) || (x >= 0xc0 && x <= 0xde && x != 0xd7)  { x |= 0x20 }
16:48 NotFound Somebody is building parrot on an ebcdic system?
16:48 * moritz hopes not
16:48 pmichaud perhaps, but that doesn't matter here.  :-)
16:49 NotFound (Rethoric question)
16:49 pmichaud yes, iirc we do plan to support ebcdic.
16:49 moritz ebcdic should have been killed before it was born
16:50 NotFound Maybe planned, but there is nothing in charset nor in encoding about it.
16:50 pmichaud it did come up in a conversation I had with allison in July.
16:50 moritz it seems that ebcdic in perl 5 is slowly bitrotting
16:52 pmichaud in some ways it would be more helpful if parrot provided a (unicode-compatible) means of doing case-insensitive comparisons.
16:52 pmichaud changing to downcase isn't always reliable for that.
16:54 pmichaud maybe I'll post that to the mailing list
16:54 NotFound pmichaud: better wait strings pdd work.
16:55 dalek r31550 | bernhard++ | trunk:
16:55 dalek : [codingstd] Use single quotes for Perl literal strings,
16:55 pmichaud I think I'll post it to the list so the folks doing strings pdd work can keep it in mind in the design.
16:55 dalek : when there in no interpolation.
16:55 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31550
16:56 NotFound pmichaud: Ok, but please do not mark it as [TODO]
16:56 pmichaud (1) why not, and (2)  I meant mailing list, not RT
16:57 NotFound To avoid the risk of naive implementations making more difficult the strings refactoring.
16:57 pmichaud we shouldn't apply patches with naive implementations, then.
16:57 pmichaud that's not a reason to avoid the [TODO] marker.
16:58 pmichaud besides, the most likely implementation will be that it uses ICU
16:58 pmichaud (I'm assuming that ICU has some form of case-insensitive compare function available.)
16:58 NotFound But is not nice to ask for someone do it, if we don't want to accept.
16:59 pmichaud I can put in the ticket that naive implementations aren't acceptable, or that this should wait for the strings refactoring.
16:59 barney Has anybody seen ' Parrot VM: PANIC: Null vtable used; did you add a new PMC?' errors from t/src/extend.t  ?
16:59 pmichaud but again, that's not really a reason to not mark a ticket for what it is.
16:59 NotFound The wait for string is the better, IMO
16:59 pmichaud and as I said, I'd like the string pdd folks to keep it in mind, because it's a bit of a hole in Parrot at the moment.
17:00 NotFound barney: I've seen it as a symptom of lack of realclean
17:01 NotFound Or a conflicting parrot library
17:01 barney I even did a fresh svn checkout, after it didn't go away after 'realclean'.
17:02 barney conflicting parrot library  might be it
17:04 pmichaud afk, lunch
17:04 particle barney: i'll run make test now on win32
17:06 barney NotFound++, it was the confliction parrot lib
17:10 NotFound This is amusing: the special case for utf8 encoding and plain ascii content is already present... but is inside the #if PARROT_HAS_ICU
17:11 particle uggh
17:11 * particle hands NotFound a !
17:15 NotFound Doing tests...
17:26 ashleyb joined #parrot
17:32 NotFound I've got a bad plan for t/spec/S29-conversions/ord_and_chr.rakudo This was already present in without-icu build?
17:32 moritz NotFound: yes, it's a bug in the harness
17:32 moritz NotFound: if you run that with ../../parrot perl6.pbc t/spec/S29-conversions/ord_and_chr.rakudo it should work
17:34 NotFound Yes, it works that way
17:34 moritz then ship it!
17:35 NotFound There are utf8 non-ascii chars in the output. The harness problem can be related to that?
17:35 moritz NotFound: dunno, it works on my second Debian box...
17:36 NotFound moritz: wait, I want to retest with icu before shipping
17:36 moritz NotFound: and a clean checkout worked at some point, until it stopped working when I copied it to another location
17:38 NotFound Too much black magic
17:38 moritz and most importantly, I can remove all non-ASCII from the TAP output, and still get the same failures
17:39 dalek r31551 | bernhard++ | trunk:
17:39 dalek : [Pipp] Untodo and add tests for stringification of floats.
17:39 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31551
17:40 ruoso joined #parrot
17:48 dalek r31552 | bernhard++ | trunk:
17:48 dalek : [Pipp] Skip two test cases with excessive memory use
17:48 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31552
17:48 Ivatar joined #parrot
17:50 wolv joined #parrot
17:59 Tene pmichaud:
17:59 dalek r31553 | julianalbo++ | trunk:
17:59 dalek : allow downcase of utf8 encoded strings with plain ascii content in absence of ICU
17:59 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31553
18:00 moritz NotFound++
18:01 Tene pmichaud: should I just add the handlers inline in while, etc, or should I factor that out into a couple of subs?
18:09 particle DRY
18:11 pmichaud can it be factored into subs?
18:11 Tene Well, methods.
18:11 purl i think methods is a Hash, you find that. then what breaks?
18:11 pmichaud I don't quite understand what you mean by "factor" here.
18:12 Tene self.push_loop_control_handlers(ops,looplabel)
18:12 masak purl, forget methods
18:12 Tene self.define_loop_control_handlers(ops,looplabel)
18:12 purl masak: I forgot methods
18:12 pmichaud where self is a PAST::Op node?
18:13 Tene Whatever self is in sub 'for'
18:13 pmichaud I'd like to think about it a bit.
18:13 Tene I'll make a patch.
18:13 pmichaud I'm thinking I may refactor all of them.
18:14 pmichaud (all of the loop types, that is)
18:15 NotFound pmichaud: downcase fix done. The code was already present, but inside the ICU if'ed part.
18:19 pmichaud NotFound: that seems to only handle ascii, though.
18:20 NotFound pmichaud: yes, is the only content that does no require transcoding.
18:21 particle latin-1 doesn't require transcoding
18:21 pmichaud why not get it to handle iso-8859-1 also?
18:21 pmichaud oh, because it has to be transcoded.
18:21 pmichaud right.
18:21 NotFound particle: from utf8, yes.
18:21 particle ah, right
18:22 NotFound pmichaud: iso-8859-1 is not handled in unicode.c
18:22 pmichaud alas, that means we still can't handle things like  " « hello » "  because of the presence of the non-ascii chars.
18:23 NotFound pmichaud: without a more elaborate code, not.
18:23 moritz are you looking towards parsing STD.pm, or why do you think that «...» are so important?
18:23 moritz (that was to pmichaud)
18:23 pmichaud parsing STD.pm, yes
18:24 NotFound perl guys like to use all symbols they can ;)
18:24 pmichaud but also to support « and » quotes in Rakudo
18:24 nopaste "tene" at 148.87.66.55 pasted "pct loop control refactor for pmichaud" (98 lines) at http://nopaste.snit.ch/14209
18:24 pmichaud Tene: that works, but it's not really the approach I'm thinking of at the moment.
18:26 Tene What's your approach?
18:26 pmichaud refactor all of the loop constructs so they're basically handled by one method in PAST::Compiler
18:27 pmichaud in particular, we need a way to be able to handle the Perl 6:    loop($i=0; $i<10; $i++) { ...; next; ...}
18:27 pmichaud such that the 'next' causes the $i++ to be executed
18:27 Tene Hmm.
18:27 NotFound I'd like to kill 8859-1 charset and redoing it as an unicode encoding limited to 0-255 codepoints.
18:27 pmichaud NotFound: please, no.
18:27 pmichaud that would be awful from a performance perspective.
18:28 NotFound pmichaud: why?
18:28 pmichaud oh, you mean keep it as fixed_8, though?
18:28 pmichaud i.e., fixed-width encoding?
18:28 Tene pmichaud: so have a pasttype('loop'), and a past node for each of perl 6 loop($1,$2,$3) ?
18:28 NotFound pmichaud: yes, fixed-width encoding and limited codepoint range.
18:28 pmichaud NotFound: I wouldn't see too much difficulty with that.  But are you proposing that we cause iso-8859-1 to rely on ICU?
18:29 pmichaud NotFound: in other words, how would what you're describing differ from what we have now?
18:30 NotFound pmichaud: mainly because was designed with that thing in mind, and it will make recoding between current unicode encodings an 8859-1 easier.
18:30 pmichaud Tene: perhaps have a 'loop' sub that handles the basic looping constructs, and then for/while/until/etc. are all defined in terms of 'loop'
18:30 pmichaud NotFound: I don't see how it makes things easier.
18:31 NotFound pmichaud: the difference is that the conversions become just encoding, without changing charset
18:31 pmichaud pmichaud: is that difficult now?
18:31 Tene pmichaud: Interesting.  I'll look into it sometime today.
18:31 pmichaud er, NotFound: is that difficult now?
18:32 pmichaud Tene: because, in all of this we really ought to be handling 'last' and 'redo', too.
18:32 NotFound pmichaud: is not easy to evaluate the impact.
18:32 pmichaud Tene: and it would also be good to provide options on the node that say what sorts of exceptions we're willing to handle.
18:33 pmichaud creating the exception handlers is a good pessimizing strategy, but the hll compiler ought to have a way to say "there's only a 'next' statement here".
18:33 pmichaud or "this loop doesn't have any control exceptions in it"
18:34 pmichaud since that can be determined by static analysis for many languages that aren't Perl 6 :-)
18:34 particle s/loop/block/
18:34 pmichaud no, loop.
18:35 pmichaud for these specific exceptions (I'm only talking about loop control exceptions here).
18:35 particle ok, so if a block contains 'redo;' it's a loop?
18:35 particle and how do you determine that ahead of time?
18:36 pmichaud does redo work in a normal block?  It doesn't in Perl 5.
18:36 particle not sure, i'll have to check
18:36 moritz it throws a control exception
18:36 particle yes, that it does
18:36 moritz if nothing catches that, it's an error
18:36 moritz and methods like .map can (and should) catch it
18:36 pmichaud right, and a loop construct would be the thing that catches redo
18:36 pmichaud (where .map is a form of loop construct.)
18:37 moritz pmichaud: but things like .map might be user defined, at run time...
18:37 pmichaud that's okay
18:37 pmichaud my point is that it's not the _block_ that catches the exception.
18:37 moritz right.
18:37 pmichaud thus, "this loop doesn't have any control exceptions in it" is a case of static analysis of the loop
18:38 pmichaud (for languages that aren't Perl 6)
18:38 moritz right ;)
18:38 pmichaud or, perhaps phrased better:  "this loop doesn't need to handle any control exceptions", because we can statically determine that there aren't any present.
18:38 particle so, is a sub with 'take' in it a loop?
18:38 pmichaud particle:  no.
18:39 particle s/take/gather/
18:39 pmichaud gather makes a loop-like construct, yes.
18:40 NotFound pmichaud: you can handle «, if you take care of emitting the strings as iso-8859-1 where possible
18:40 pmichaud NotFound: I do that, yes.  But sometimes the strings come in as unicode, and I don't necessarily want to transcode them.
18:41 pmichaud and sometimes I have to downcase the string prior to emitting it.
18:41 pmichaud (i.e., for doing case-insensitive comparison against a literal.)
18:42 NotFound Ah, yes, I thinked only about literal regexes in perl6 source.
18:45 particle so, a pessimized loop looks like: loop (;;) { ...; CONTROL { ... } };
18:46 particle where the next/last/redo or whatever handlers are inside the CONTROL block
18:46 pmichaud particle: I'm not at all sure what you're referring to here.
18:46 particle isn't that what pct should do, then?
18:46 particle http://perlcabal.org/syn/S0​4.html#Control%20Exceptions
18:47 pmichaud particle:  I'm expecting that PCT has the basic handlers in place for handling next/last/redo as most dynamic languages expect them to work.
18:47 particle http://perlcabal.org/syn/S​04.html#Control_Exceptions
18:47 pmichaud I'm not necessarily expecting PCT to natively do it the Perl 6 way.
18:47 particle i'm wondering, what happens when the user adds a CONTROL block, is it executed before or after the builtin control handlers?
18:47 pmichaud I'm saying that if I have some PHP code that looks like     for($array as $v) { print $v; }
18:48 pmichaud then the PHP compiler should be able to tell PCT "generate a for looping construct and don't bother with generating any control exception handlers, because there aren't any present".
18:49 pmichaud currently the 'for' loop in PCT is *always* generating a control exception handler for 'next', even if the body of the loop can't possibly generate a .CONTROL_LOOP_NEXT exception.
18:50 particle ok, i'm sorry for confusing perl 6 and pct semantics
18:50 pmichaud thus my repeated phrase "for many languages that aren't Perl 6"
18:50 moritz so maybe the solution is to add no handlers by default, and to allow either default or a list of handlers?
18:51 pmichaud moritz: yes.... but I don't want to have to duplicate that code for every loop type
18:51 pmichaud thus I'm thinking to refactor the different loop types into a single construct internally in PAST
18:51 moritz right
18:51 pmichaud sorry in PAST::Compiler.
18:51 particle use inheritance or roles, then
18:51 isop joined #parrot
18:52 pmichaud it's basically the same way that 'if' and 'unless' are currently handled by one common section of code.
18:52 particle there may be two loop types, if do is considered different from loop
18:53 isop pmichaud: I'm trying to figure out how import should work in Pynie
18:53 pmichaud do is just a loop where something controls/constrains it to execute once
18:53 pmichaud but it handles control exceptions
18:53 pmichaud seems to me that "do X"  is pretty much equivalent to   "for 1 X"
18:54 pmichaud at least semantically (not syntactically)
18:55 particle would you keep the :pasttype('while') api?
18:55 pmichaud sure
18:55 pmichaud those are very common
18:55 pmichaud they just re-dispatch to the common loop handling code, which knows how to handle the various cases.
18:56 particle yes, seemed burdensome to change that to something else
18:56 pmichaud same as the way that :pasttype('unless') redispatches to :pasttype('if')
18:56 isop afaik Python doesn't have a separate syntax for namespaces, you access functions in namespaces by calling "methods" of the namespace object
18:56 pmichaud isop: then pynie probably needs to have namespace objects of some sort.
18:56 pmichaud isop: that can map method calls into function calls, or whatever.
18:57 pmichaud isop:  I know very little about Python beyond the basics, so it pretty quickly gets beyond my ability to say what should/shouldn't happen here :-)
18:58 isop pmichaud: this would be Pynie's HLL namespace object (as per pdd21)?
18:58 pmichaud isop: I guess so.  I'm still of the opinion that pdd21 needs a redesign.
18:59 pmichaud or at least pdd21 needs to be brought up-to-date with respect to other changes in parrot.
18:59 isop does HLL type mapping work?
18:59 pmichaud pct and p6object don't know how to handle those yet, no.
18:59 pmichaud it's on my list of things to update soon.
18:59 isop does parrot handle it right?
19:00 pmichaud for various definitions of "right", maybe.
19:00 isop ok
19:00 pmichaud afaik partcl is the only language actively using hll type mapping.
19:00 * isop looks
19:04 ruoso joined #parrot
19:12 isop if code in one HLL calls code in some other HLL with HLL-mapped types, do they get remapped?
19:15 particle no, unless your compiler does that for you
19:18 isop so how does interop work? different languages' builtin types have different interfaces
19:19 particle all pmcs share the same interface (vtables)
19:20 isop I mean, say, Perl operators don't work the same way as Python operators
19:20 particle beyond that, you'll have to map methods between hlls
19:22 particle hll interop has not been seriously implemented yet, so questions abound
19:22 isop ok
19:31 Tene pmichaud: perl -e '$i=0;{print "foo$i\n";$i++;redo if $i < 2;}'
19:31 Tene pmichaud: 'redo' *does* work in a bare block in Perl 5.
19:33 pmichaud Tene: oh.  in Perl 5 a bare block is a do-once loop.
19:33 pmichaud Tene: but that's not true in Perl 6.
19:33 particle yep
19:36 pmichaud (you're correct that I mis-spoke earlier about redo in blocks.  In p5, redo doesn't work in sub, eval, or do blocks, but it does in bare blocks.)
19:42 particle pmichaud: there was an item or two you wanted to bring up today on the phone...
19:47 pmichaud particle:  yes,  :g in regexes was one
19:47 pmichaud I don't recall any others at the moment.
19:48 particle is that related to an rt#? because i remember a rt#
19:48 pmichaud afaik it's not directly related to an rt #
19:48 * pmichaud checks the queue.
19:48 moritz that was related to a discussion on the november list
19:49 moritz about subst(m:g/../, $closure)
19:50 dalek r31554 | julianalbo++ | trunk:
19:50 dalek : pirric: hyperbolic functions and some changes in control exceptions
19:50 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31554
19:52 pmichaud I don't see any rt tickets that ring a bell for me.
19:53 particle okies
19:54 * particle reads S11-Exportation
20:00 TimToady speaking of bells, phone
20:00 pmichaud btiab
20:22 dalek r31555 | julianalbo++ | trunk:
20:22 dalek : fix Complex.pmc pow for PMCNULL destination
20:22 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31555
20:27 dalek r31556 | julianalbo++ | trunk:
20:27 dalek : pirric: remove unimplemented functions accidentally inserted in r31554
20:27 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31556
20:36 dalek r31557 | moritz++ | trunk:
20:36 dalek : [rakudo] refactored Str.capitalize to use find_cclass.
20:36 dalek : Patch courtesy by azawawi++
20:36 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31557
20:38 Theory joined #parrot
20:41 NotFound moritz: are you asking for more no-icu troubles? ;)
20:42 moritz NotFound: I hope not
20:42 moritz NotFound: pmichaud suggested that refactor, so I hope he knows what we're up to ;)
20:44 NotFound At least you know who to blame ;)
20:45 * moritz blames users without icu
20:49 isop what's the difference between the 'typeof' and the 'class' pir ops?
20:51 clunker9_ joined #parrot
20:53 PerlJam There's a "class" op?
20:53 pmichaud I think "class" op is deprecated, though.
20:55 Tene It is?  How do you get the class of a pmc then?
20:56 pmichaud typeof
20:56 pmichaud $P0 = typeof $P1
20:57 Tene Oh.
20:57 Tene Right.
20:57 moritz in sovjet russia pmc types get you!
20:58 PerlJam I think I've only ever seen typeof
20:58 Tene I think I used it... somewhere...
21:06 nopaste "isop" at 87.69.10.102 pasted "quick crash using typeof" (8 lines) at http://nopaste.snit.ch/14212
21:10 johbar joined #parrot
21:11 NotFound isop: nice catch
21:12 isop :)
21:13 moritz isop: parrotbug@parrotcode.org ;)
21:13 PerlJam isop: don't forget to send the patch that fixes it too  ;)
21:14 particle does that crash saying can't assign to pmcnull?
21:14 NotFound particle: is not pmcnull, is NULL
21:14 pmichaud note that $P1 = typeof $P0   and $S1 = typeof $P0 do very different things
21:15 pmichaud the first returns the class object associated with $P0
21:15 pmichaud the second returns the name of the class associated with $P0
21:15 particle =item B<typeof>(out STR, invar PMC)
21:15 particle =item B<typeof>(out INT, invar PMC)
21:15 particle =item B<typeof>(out PMC, invar PMC)
21:15 particle Return the type of PMC in $2.
21:15 moritz and neither should make Parrot_say_p segfault ;)
21:15 NotFound pmichaud: it must return PMCNULL, not plain NULL
21:15 pmichaud the second one is deprecated.
21:15 particle the documentation is wrong in src/ops/pmc.ops
21:16 pmichaud I correct, it should not get plain null, so I suspect the error is in the NameSpace PMC
21:16 Ademan joined #parrot
21:16 pmichaud s/I//
21:16 NotFound pmichaud: looks like someone is creating a namespace pmc without init.
21:16 pmichaud i.e., the NameSpace PMC is not returning a proper PMCProxy when get_class is being called on it
21:17 pmichaud NotFound: since in this particular case the namespace is the "default root namespace", I don't know what creates it.
21:17 pmichaud i.e., I don't know what creates the 'parrot' root HLL namespace.
21:18 pmichaud (so it's entirely possible it's not initialized properly)
21:18 dalek r31558 | moritz++ | trunk:
21:18 dalek : [rakudo] add two more small files to spectest_regression
21:18 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31558
21:20 NotFound interp->root_namespace = pmc_new(interp, enum_class_NameSpace);
21:21 isop I think I got that with other namespaces, too
21:21 NotFound pmc_new calls init, it isn't?
21:25 NotFound But get_namespace returns the current namespace or the global?
21:25 particle i believe so, and we have pmc_new_noinit
21:26 particle take a look at pdd21
21:26 NotFound Is the parrot namespace, not the root namespace.
21:39 mwhudson joined #parrot
21:42 Whiteknight joined #parrot
22:10 bacek joined #parrot
22:12 dalek r31559 | cotto++ | trunk:
22:12 dalek : [pipp] implement push_*, pop_*, shift_* and unshift_* for PHPArray
22:12 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31559
22:18 davidfetter joined #parrot
22:18 isop moritz: rt #59532
22:21 dalek r31560 | cotto++ | trunk:
22:21 dalek : [pipp] various POD and typo fixes
22:21 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31560
22:22 moritz isop: good. chromatic will be happy ;)
22:22 particle that'll be the day...
22:23 isop moritz: why?
22:23 moritz isop: chromatic is always happy to fix segfaults that can be reproduced in pure pir. especically when the test program is as short as yours ;)
22:24 isop ah :)
22:38 Theory joined #parrot
22:39 isop I'm trying to make a Pynie module object that does namespace lookups on attribute access/method calls
22:40 isop but it seems I can't just return a normal sub from 'find_method', it gets treated as a method somehow
22:45 particle1 joined #parrot
22:46 isop right now I've got it working by returning 'self' (which gets set to the module object anyway), setting the requested function in an attribute, and calling that in 'invoke'
22:49 tetragon joined #parrot
22:58 kid51 joined #parrot
23:04 isop is there a better way to do it?
23:04 dalek r31561 | particle++ | trunk:
23:04 dalek : [rakudo] add apostrophe and identifier tokens to grammar; not using them yet
23:04 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=31561
23:07 Whiteknight isop, the function returned by find_method will return a method if the subroutine is flagged as :method
23:07 Whiteknight check the function, see how it's flagged
23:10 isop Whiteknight: but it does get passed find_method's self
23:10 Whiteknight no, it gets passed the first argument when you invoke it
23:10 peepsalot joined #parrot
23:10 Whiteknight or, the object, if you invoke it on an object
23:11 Whiteknight so 'my_method'(self) or self.'my_method'()
23:11 isop here's what I mean
23:12 nopaste "isop" at 87.69.10.102 pasted "find_method and self" (23 lines) at http://nopaste.snit.ch/14213
23:13 isop and I just want to get 'not_a_method' as a normal function with no first object parameter
23:14 Whiteknight hmm, I haven't seen anything like that before
23:14 Whiteknight The find_method finds and invokes a method on an object
23:14 Whiteknight at least, I think it does
23:15 Whiteknight so when you return the method not_a_method, parrot calls $P0.not_a_method()
23:17 isop so it would seem
23:18 particle find_method doesn't invoke
23:18 particle invoke invokes :)
23:19 particle $P1.yum() calls call_method $P1, 'yum' (or whatever the op is called)
23:19 particle ...which calls find_method
23:20 particle sigh, i'm not being too clear
23:20 isop particle: I think I get it
23:20 particle try adding 'trace 1' just above $P1.yum()
23:20 particle that will show you the ops called
23:24 isop is there some way I can get it to call the returned function as a normal sub?
23:24 isop or, is there a nicer way to wrap the method so the function gets called properly?
23:24 isop joined #parrot
23:24 particle you can have the sub take an extra first param that you don't use
23:24 particle .param pmc self # unused
23:25 isop can I do that live? (the object with find_method is proxying a namespace)
23:26 particle what parrot op is called for $P1.yum() ?
23:27 particle callmethodcc or something?
23:28 particle 35 callmethodcc P1, "yum"           P1=Object(MyClass)=PMC(0xd05608)
23:28 particle 4 get_hll_global P0, "not_a_method"        P0=PMCNULL
23:28 particle ...
23:29 particle so, by the time you've found 'not_a_method', you've committed to the callmethodcc op, so that's how 'not_a_method' is called
23:32 Whiteknight I've been wrong before, and I'll be wrong again
23:32 Whiteknight all too often
23:32 particle well, i could be wrong, too. i'm a little foggy, as my head is in some perl 6 code atm
23:41 TimToady How can that be?  Perl 6 is the non-drowsy formula...
23:44 Tene But is it transparent?
23:57 particle cycling &

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

Parrot | source cross referenced