Camelia, the Perl 6 bug

IRC log for #parrot, 2008-12-22

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:07 Aisling joined #parrot
00:09 AndyA joined #parrot
00:14 Whiteknight joined #parrot
00:30 gmansi_ joined #parrot
00:34 Random joined #parrot
00:42 gmansi_ joined #parrot
00:50 tewk joined #parrot
00:55 * Coke gets another spec test working.
01:04 TiMBuS joined #parrot
01:39 leto joined #parrot
01:43 cspencer joined #parrot
01:44 cspencer in PIR, is there a way of writing a single multi method that runs on two different types?
01:44 cspencer ie) is there a way of doing a logical OR in the :multi(...)  syntax?
01:49 Hadi joined #parrot
01:49 Hadi left #parrot
01:49 gmansi_ joined #parrot
01:59 Coke no.
02:00 Coke easiest way to do that (if a non trivial sub) is to have one that does the work (make that the common case) and another that dispatches.
02:00 Coke (presuming your types are amenable to that sort of thing.)
02:03 cspencer alright, thank you :)
02:04 Random left #parrot
02:07 kid51 joined #parrot
02:23 Coke pmichaud: ping
02:35 Hadi joined #parrot
03:09 Andy joined #parrot
03:09 Andy left #parrot
03:13 Andy joined #parrot
03:14 dalek r34222 | jkeenan++ | trunk/t/codingstd:
03:14 dalek : Delete inline comment re RT 444437.
03:14 dalek review: http://xrl.us/y5w5g
03:15 Andy ok, what can I do for you?
03:18 kid51 Andy:  Can you do anything with these RTs:  http://rt.perl.org/rt3/Tic​ket/Display.html?id=39117 http://rt.perl.org/rt3/Tic​ket/Display.html?id=43827 http://rt.perl.org/rt3/Tic​ket/Display.html?id=50684
03:18 Andy looking
03:19 Andy first one yes
03:19 Andy 2nd was from valgrind I think
03:20 Andy 3rd one maybe
03:20 kid51 Thanks.
03:21 gmansi joined #parrot
03:24 Hadi left #parrot
03:25 dalek r34223 | petdance++ | trunk (3 files):
03:25 dalek : no IO::File imports
03:25 dalek review: http://xrl.us/y6fjx
03:35 lathos joined #parrot
03:36 * kid51 must sleep
03:36 purl $kid51->sleep(8 * 3600);
03:36 lathos Urgh, if there a way to pass arrays into NCI? I don't think there is.
03:37 tewk lathos: use an unmanaged struct maybe?  what are you trying to do.
03:37 tewk oh is this an IN arg?
03:38 lathos Yep. Postgresql API wants bind parameters passed in as const char * const *paramValues
03:40 tewk We could write a custom PMC that takes a PIR array and does the needed transformations
03:40 lathos That seems like an awfully large hammer to use in order to "avoid" writing C.
03:41 Andy anyone else having problesm with t/library/pcre?
03:42 Andy where's the smoker site these days?
03:43 dalek r34224 | petdance++ | trunk/compilers/imcc:
03:43 dalek : Make the sprintf arguments a const char, not a buffer
03:43 dalek review: http://xrl.us/y7p23
03:45 lathos More generally it would be nice to have an NCI type of, say, [t] and have the wrapper function create the array. No idea how to go about this though.
03:48 tewk lathos: we can do that, all the sigs are one letter long, so we have to pick a new letter, for now.
03:48 lathos The obvious thing to do would be to use lower case for scalar and upper case for vector, but that's already been trod on by p, s, and i.
03:49 lathos ("s" for short and "S" for string is particularly awkward.)
03:49 tewk S is for a Parrot STRING, t converts a STRING register to char*,
03:49 rurban_ joined #parrot
03:50 lathos Yes. But still "s" and "S" are wildly assymetrical. Anyway.
03:50 lathos Hrm, nothing says a sig needs to be one letter long.
03:50 tewk well there are 56 letters, plenty left unused though awkard.
03:51 lathos I don't want to have to be remembering that z is an array of integers and A is an array of shorts.
03:52 lathos "At some point punctuation may be used as modifiers on the function parameters, in which case each parameter may be represented by multiple letters.'
03:53 tewk lathos: at that point, why not move to a full dsl
03:53 lathos You keep coming out with these big hammers. :)
03:53 tewk you can be a parrot developer until you over abstract everything you do:)
03:54 lathos Which is why parrot is about 15 times slower than it used to be.
03:54 tewk I agree. MMD and calling conventions unification have added a lot of slow down.
03:55 tewk I'm not opposed to [t], its a really simple, small dsl.
03:55 tewk :)
03:56 lathos Well, we can follow the PDD and have a couple of punctuation characters, "&" for "pointer-to", "@" for "array-of".
03:57 tewk I should probably read th PDD
03:58 lathos Oh, hang on, there's an undocumented "T" type which gives you "char **".
04:00 tewk Where are you reading this?  Did I add it?
04:00 lathos tools/build/nativecall.pl
04:00 lathos 16172 paultcochrane     T   => "char **",
04:01 tewk I'll have to see if I support that in jitted NCI
04:01 lathos I still think a generic array mechanism is better than a mountain of special cases with bizarre names.
04:02 tewk Sounds good to me, just some c parsing code to change,
04:02 lathos It's not even parsed. The functions are kept in a hash.
04:02 lathos s/functions/signatures/. Well, both, actually.
04:03 tewk jitted nci parses it, tools/build/nativecall.pl parses it also to generate subs
04:03 tewk stubs that is.
04:03 lathos Ah, so I see, yes.
04:07 lathos Ah, Dan added "T" about five years ago.
04:08 lathos I *have* been out of the loop.
04:10 lathos Although it doesn't have a case in make_arg, so I can't imagine that it would work.
04:16 johbar_ joined #parrot
04:18 tewk pmichaud: ping
04:20 cotto joined #parrot
04:20 pmichaud pong
04:21 tewk I've got some perl6 failures as a result of trying to remove :method and :vtable from namespaces.
04:22 pmichaud probable.
04:22 tewk Would you have some time to look if I made a branch or set you a patch?
04:22 pmichaud there are some places where perl 6 expects methods to be in the namespace
04:22 tewk I fixed the ones that were obvious to me.
04:22 pmichaud make a branch.  I'm working on something else right now and won't be done with it for about an hour
04:23 tewk I'll check it in so you can at least look, feel free to give me pointers and hints, and I'll be happy to do keep working on it.
04:27 Tene pmichaud: up for a POST question?
04:30 Tene pmichaud: if I have foo = self.'uniquereg'('P'), how do I represent foo ~ '["type"]' in a POST node?  Do I just concat?
04:32 dalek r34225 | tewk++ | branches/nsentry:
04:32 dalek : [nsentry] create branch
04:32 dalek review: http://xrl.us/zaqru
04:36 dalek r34226 | tewk++ | branches:
04:36 dalek : Remove all nsentry branch
04:36 dalek review: http://xrl.us/zayk8
04:37 dalek r34227 | tewk++ | branches:
04:37 dalek : Recreated nsentry branch
04:37 dalek review: http://xrl.us/za2v4
04:38 pmichaud Tene: you mean you want to have a keyed access?  Yes, concatenate.
04:39 Tene I'm putting together a first draft of loop_helper.  I except it will need at least naming changes.  Do you want me to just commit if tests pass, or do you want to review a patch first?
04:39 pmichaud please let me review patch
04:39 * Tene nods.
04:40 pmichaud or work on it in a branch
04:40 pmichaud branch might be better.
04:40 Tene You prefer branch?
04:40 pmichaud yes, I don't think it'll live long.
04:40 pmichaud tomorrow seems like a good day to get the loop stuff done.
04:40 Tene can you create one for me to use?
04:41 pmichaud done.  pctloop.
04:42 pmichaud oh, wait, not done.
04:42 pmichaud it failed.
04:42 pmichaud one moment.
04:42 dalek r34228 | tewk++ | branches/nsentry (27 files):
04:42 dalek : [nsentry] current nsentry changes for branch
04:42 dalek review: http://xrl.us/za9uq
04:43 pmichaud okay, now created:  https://svn.perl.org/parrot/branches/pctloop
04:43 Andy joined #parrot
04:43 dalek r34229 | pmichaud++ | branches:
04:43 dalek : [pct]:  new branch for refactoring loop code.
04:43 dalek review: http://xrl.us/zbctb
04:44 tewk pmichaud: nsentry branch ready for you to look at.
04:48 pmichaud okay, thanks.  I'm trying to get this commit in by midnight.
04:49 pmichaud (CST, 72 minutes from now)
04:52 lathos t/pmc/stmlog dying?
04:52 lathos Oof, t/pmc/pmc dying. But this could be in my modified tree.
04:56 tewk pmichaud: #   at lib/Parrot/Test/NCIGENAST.pm line 78.
04:56 tewk #                   'Method 'clone' not found for invocant of class 'NCIGENAST;TypeDef'
04:57 tewk NCIGENAST is my subclass of PCT::Node,
04:57 tewk is clone something new?
04:57 tewk error building ncigen
04:57 tewk not building, but running the tests.
05:04 nopaste "tewk" at 97.117.90.121 pasted "nsentry spectest failures" (40 lines) at http://nopaste.snit.ch/15057
05:11 lathos OK, some tests are failing and it's not the fault of my code. :)
05:35 Tene Okay, have a good draft done.  'for' in nqp and rakudo all work.
05:35 Tene Spectest looks okay, but I'll let it keep running anyway.
05:36 Tene Going to commit, and then move another loop type over to using it.
05:38 dalek r34230 | tene++ | branches/pctloop/compilers/pct/src/PAST:
05:38 dalek : [pct]: First draft of loop refactor.
05:38 dalek review: http://xrl.us/zex24
05:39 Tene t/spec/S04-statements/map-and-sort-in-for.t gets some uncaught exceptions...
05:40 Tene Oh, no, not that one.  t/spec/S04-statements/next.rakudo
05:42 Tene Ah, becaus eof 'while'
05:45 Hadi joined #parrot
05:50 dalek r34231 | pmichaud++ | trunk/languages/perl6/src (3 files):
05:50 dalek : [rakudo]:  Add whatever star to list and array slices.
05:50 dalek review: http://xrl.us/zfstg
05:52 dalek r34232 | petdance++ | trunk/src:
05:52 dalek : change strcpy to memcpy
05:52 dalek review: http://xrl.us/zfx8e
05:53 vaidyagi joined #parrot
05:53 TiMBuS hmm, the language spec im using calls for frexp to be implemented. is there a way to get the component bits of a parrot Num? the bitwise ops only work on ints
06:02 dalek r34233 | petdance++ | trunk/src:
06:02 dalek : consting
06:02 dalek review: http://xrl.us/zgqas
06:02 Andy is src/bignum.c of any value?
06:02 Tene pmichaud: any plans to have a PAST type for C-style for loops AKA Perl 6 'loop'?
06:03 pmichaud Tene: I'm thinking about it, yes.
06:03 pmichaud I was hoping to make that part of the loop refactor.
06:04 pmichaud there are a lot of similarities.
06:04 Tene Excellent.  I'll do that now.  Any naming preference?
06:04 pmichaud 'loop' ?
06:04 Tene Great.
06:04 pmichaud that would most closely match the p6 syntax.
06:17 dalek r34234 | petdance++ | trunk/compilers/imcc:
06:17 dalek : Combined a strcpy/strlen together
06:17 dalek review: http://xrl.us/zhkq7
06:20 Tene 'while' and 'loop' now use loop_helper.
06:20 Tene Now to implement 'redo'
06:21 dalek r34235 | tene++ | branches/pctloop (2 files):
06:21 dalek : [pct]
06:21 dalek : * Port 'while' to use loop_helper
06:21 dalek : * Add a 'loop' type for C-style 'for' loops.
06:21 dalek review: http://xrl.us/zhpfa
06:26 pmichaud Tene:  what's the purpose of 'push_throw_typed' ?
06:26 Tene pmichaud: It pushes instructions to create a new exception, set its type, and throw it.  I found I was repeating that in several places.
06:27 pmichaud okay.  I was wondering if loops should always throw exceptions, but I guess p6 will require that they do so.
06:29 dalek r34236 | tene++ | branches/pctloop (2 files):
06:29 dalek : [pct]: Support 'redo' in loop_helper
06:29 dalek : [rakudo]: Add 'redo' and 'last' subs
06:29 dalek review: http://xrl.us/zibc6
06:29 Tene Is this approximately what you had planned?
06:30 pmichaud I'm still looking at it.  It's approximately what I had planned, yes, but I'm still looking at it a bit.  Some pieces don't quite feel right yet.
06:30 * Tene nods.
06:33 pmichaud I don't think the next semantics are quite right.
06:34 pmichaud i.e., I think that an exception thrown by the for won't catch a NEXT exception handler in the body.
06:35 Tene They might not be quite right, but I'm pretty sure that that specific issue is handled correctly.
06:35 Tene Let me check...
06:36 nopaste "tene" at 166.70.38.237 pasted "example for pmichaud++" (4 lines) at http://nopaste.snit.ch/15058
06:36 pmichaud oh, I see, you're pushing the default .CONTROL_LOOP_NEXT onto the end of the body's post
06:36 Tene That runs correctly.
06:36 Tene Right.
06:37 pmichaud ...so if the body was a PAST::Block, does this add the throw to be inside the block?
06:37 Tene No.
06:38 Tene ... wait, should it?
06:39 pmichaud I don't know.  I'm trying to see how all of that would fit together.
06:39 Tene in that example, should the CONTROL block be hit or not, do you think?
06:41 Tene You're right, though, to represent that.
06:43 pmichaud with   for @list { ... NEXT { ... } }
06:43 pmichaud the NEXT block has to be triggered on each iteration.
06:44 Tene Hmm.
06:45 pmichaud ...so I'm thinking it might not be best to do this all with control exceptions.
06:45 pmichaud it gets a little dicey if we're having to push the exception throwing into the body itself.
06:46 pmichaud (we do have to still use control exceptions, yes --- to handle things like 'next' and 'last' in nested blocks.  But it might not be best to use handlers for all of it.)
06:47 Tene We still need 'for @l { ...; next; ... }' to work right, though.
06:47 Tene I can refactor that specific case out, but that won't allow NEXT blocks to work either.
06:47 pmichaud I'm confused -- how does what you just wrote relate to what I said?
06:48 pmichaud next() continues to throw a control exception, yes.
06:48 pmichaud that control exception has to be caught by the for loop, yes.
06:49 pmichaud but I'm not sure PCT should be forcing exceptions into the blocks.
06:49 nopaste "tene" at 166.70.38.237 pasted "I thought that you were proposing this change" (21 lines) at http://nopaste.snit.ch/15059
06:49 pmichaud I think I am proposing that change, yes.
06:49 Tene How does that help with allowing NEXT blocks to work?
06:50 pmichaud in itself, it doesn't
06:50 pmichaud I'm just saying that the overall design of throwing 'next' exceptions for the basic loop feels wrong.
06:50 pmichaud i.e,. I'd like the 'for' nodes to be "unexceptional"
06:50 Tene 'kay
06:51 pmichaud more likely what I'm thinking might happen is that rakudo generates the 'next' exceptions at the end of the block.
06:51 * Tene nods.
06:51 pmichaud instead of PCT doing it.
06:51 pmichaud if we do that, *then* the NEXT handler inside the block would get triggered
06:51 pmichaud it still is up to the PAST 'for' node to catch the exception and do the right thing with it
06:52 pmichaud but the PAST 'for' node isn't responsible for generating the exception
06:52 nopaste "tene" at 166.70.38.237 pasted "like this" (12 lines) at http://nopaste.snit.ch/15060
06:53 pmichaud close, it would probably need to push onto $past[1]
06:53 Tene Ah.
06:53 pmichaud so that it goes on the block, and not on the 'for' node itself.
06:54 pmichaud ...but we have similar issues with LAST and FIRST
06:54 pmichaud does a LAST block get called on the last iteration, or only in response to an explicit 'last' call?
06:54 pmichaud I'm guessing the former.
06:54 Tene The former.
06:55 pmichaud the block itself can't be throwing that exception, though.  So... hrm.
06:56 pmichaud I'm wondering if loops have to become a new blocktype.
06:56 Tene That's what I was considering.
06:58 pmichaud that doesn't feel quite right either, though.
07:00 Tene That patch doesn't actually work... trying to figure out why...
07:01 pmichaud anyway, I'm getting a bit tired on this end, and I still have a couple of blog posts I need to write
07:01 pmichaud how about I sleep on it a bit tonight and pick it up tomorrow?  (you're of course welcome to continue working on it)
07:02 pmichaud figuring out the right way to handle FIRST/NEXT/LAST in this will be the key to getting loops in general to work.
07:03 Tene Semantically, I suspect that either loops are a new type, or rakudo is reaching up the stack to tweak the Op.
07:03 Tene I can make either of those work.
07:03 pmichaud at the time we build the block, there's no "stack" to "reach up"
07:03 pmichaud instead, the loop construct would have to inspect the block and hoist things up.
07:03 Tene Well, yeah.
07:04 pmichaud in order to do that we'd want a somewhat different structure than the PAST::Control nodes we have now.
07:04 pmichaud at least for those items.
07:04 Tene Or, I guess, PCT could inspect the block.
07:04 Tene That seems a little odd, though.
07:05 pmichaud it'd be odd
07:05 Tene I'm not convinced it's necessarily wrong, but odd.
07:05 pmichaud we'd have to provide special slots for those things
07:05 pmichaud -and-
07:05 pmichaud and we'd have to say that the body of a loop is always a block.  I was trying to avoid that.
07:05 Tene No.  Stmts can have these too.
07:05 pmichaud or we put the special slots on every PAST node
07:05 Tene You were already considering that for the Control nodes.
07:05 pmichaud oh, it could just go on Stmts
07:06 Tene Right now the 'handlers' attribute or whatever it ended up named is on ::Node
07:06 pmichaud hmm.  that's not quite so bad.
07:07 Tene You think you have enough to think on?
07:07 pmichaud having PCT grab the handlers is a pain, though, because it messes up the lexical nesting.
07:08 Tene Oh, true.
07:08 pmichaud or at least has the potential to mess up the lexical nesting.
07:08 pmichaud and we'd have to do it before processing the body.
07:08 pmichaud anyway, that approach feels like it's making things messier, not neater.
07:09 pmichaud I'm sure there's a more elegant solution -- just need to explore it a bit more.
07:09 Theory joined #parrot
07:09 Tene I'll keep thinking.  Go blog.
07:10 dalek r34237 | pmichaud++ | trunk/languages/perl6/docs:
07:10 dalek : [rakudo]: spectest-progress.csv update: 261 files, 5790 passing, 0 failing
07:10 dalek review: http://xrl.us/zmiiw
07:10 pmichaud +562 new passing tests in two days.  +1011 new passing tests in two weeks.
07:11 Tene Very nice. :)
07:20 cottoo joined #parrot
07:23 cottoo irclog?
07:23 purl irclog is http://irclog.perlgeek.de/parrot/today or see also: infrared clogs
07:28 Tene ... ohright, work tomorrow.
07:28 Tene I have to sleep.
07:31 UltraDM joined #parrot
07:51 * cottoo wonders how people will react to the new default TT report page.
07:52 cotto https://trac.parrot.org/parrot/report/1
08:02 TiMBuS woah
08:02 TiMBuS a trac
08:02 TiMBuS does it have a web based submission thing?
08:03 TiMBuS because if so, woot
08:04 pdcawley joined #parrot
08:05 cotto yes, but you have to register
08:11 TiMBuS awesome
08:27 dalek r34238 | pmichaud++ | trunk/src/charset:
08:28 dalek : [core]:  Recognize LINE/PARAGRAPH SEPARATOR unicode chars as whitespace.
08:28 dalek review: http://xrl.us/zqvop
08:37 iblechbot joined #parrot
08:52 masak joined #parrot
09:09 Tene pmichaud: I have a good solution... will explain tomorrow
09:10 masak joined #parrot
09:37 dalek r34239 | bernhard++ | trunk (2 files):
09:37 dalek : [codingstd] trailing whitespace
09:37 dalek review: http://xrl.us/zvi3n
10:07 elmex joined #parrot
10:12 tomyan joined #parrot
10:56 alvar joined #parrot
11:20 donaldh joined #parrot
11:33 Tux joined #parrot
11:33 Tux pmichaud, yt?
11:36 Ademan joined #parrot
11:48 rurban_ joined #parrot
11:52 iblechbot joined #parrot
11:53 barney joined #parrot
11:57 dalek r34240 | bernhard++ | trunk/languages/pipp/t/embed:
11:57 dalek : Add examples on how to find 'no_args'.
11:57 dalek review: http://xrl.us/z85z4
12:07 ffwonko joined #parrot
12:12 ff-wonko joined #parrot
12:17 rkh joined #parrot
12:23 dalek r34241 | bernhard++ | trunk/languages/pipp/config/makefiles:
12:23 dalek : [Pipp] Normalize indention of continuation lines
12:23 dalek : Rename 'make smolder-test' to 'make smoke'.
12:23 dalek review: http://xrl.us/2aziw
12:24 jimmy joined #parrot
12:28 dalek bernhard.schmalhofer@gmx.de | Pipp:
12:28 dalek link: http://www.perlfoundation.​org/parrot/index.cgi?pipp
12:39 dalek r34242 | bernhard++ | trunk (4 files):
12:39 dalek : [Pipp] Move pipp.pir from src/common into src
12:39 dalek review: http://xrl.us/2b29b
12:51 rjh joined #parrot
12:54 bacek rakudo: my @a=(1,2); say @a.WHAT
12:54 polyglotbot OUTPUT[Array␤]
12:54 bacek it's... strange
12:54 rjh rakudo: my @a=(1,2); say @a.HOW
12:54 polyglotbot OUTPUT[get_string() not implemented in class 'P6metaclass'␤current instr.: 'print' pc 16384 (src/builtins/io.pir:26)␤called from Sub 'say' pc 16403 (src/builtins/io.pir:35)␤called from Sub '_block14' pc 111 (EVAL_13:49)␤called from Sub '!UNIT_START' pc 15866 (src/builtins/guts.pir:327)␤called from
12:54 polyglotbot ..Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PC...
12:54 rjh :S
12:54 bacek rakudo: my @a=(1,2); say @a ~~ List
12:54 polyglotbot OUTPUT[1␤]
12:55 bacek rakudo: my @a=(1,2); say @a ~~ Array
12:55 polyglotbot OUTPUT[1␤]
13:17 ask_ joined #parrot
13:26 Lorn joined #parrot
13:36 Coke cotto: doe the colors on that report do anything other than cause nausea? =-)
13:56 apeiron joined #parrot
14:02 dalek r34243 | fperrad++ | trunk/lib/Parrot/Harness:
14:02 dalek : [smolder]
14:02 dalek : - load proxy settings from *_proxy environment variables
14:02 dalek review: http://xrl.us/2itvq
14:05 lathos I'm about to do something really nasty to tools/build/nativecall.pl
14:05 Coke nasty enough to warrant a branch?
14:05 lathos Not yet.
14:06 lathos Currently just some aggressive refactoring.
14:06 lathos Tomorrow, however...
14:14 dalek r34244 | bernhard++ | trunk/src:
14:14 dalek : [doc] Update doc for Parrot_register_HLL().
14:14 dalek : Signature was changed in r21105
14:14 dalek review: http://xrl.us/2jtw6
14:19 lathos Whoa, tests pass.
14:21 barney Try 'make codetest'
14:22 lathos Is there a specific NCI stress test I can apply?
14:24 lathos Actually maybe I should send this patch to chromatic for review.
14:29 Theory joined #parrot
14:42 Coke does parrot have the equivalent of http://www.tcl.tk/man/tcl8​.5/TclCmd/tclvars.htm#M21 ?
14:43 Coke $tcl_platform(osVersion)
14:48 gryphon joined #parrot
14:49 gryphon joined #parrot
14:49 dalek r34245 | moritz++ | trunk/languages/perl6/t:
14:49 dalek : [rakudo] three more tests for t/spectest.data
14:49 dalek review: http://xrl.us/2m4rh
15:03 DietCoke joined #parrot
15:04 donaldh Hi, what's the default behaviour for PIR that doesn't contain a :main sub ?
15:04 Andy joined #parrot
15:04 Coke when invoked from the command line?
15:04 donaldh Yup.
15:04 Coke I believe the first sub is run.
15:06 donaldh Hmmm. That's wknight's problem with his jit_h_files branch.
15:06 donaldh The tests seem to be running on to next sub.
15:07 Coke is he perhaps missing an "end"?
15:07 donaldh possibly.
15:07 nopaste "donaldh" at 213.123.171.12 pasted "This causes a SEGV with -j" (14 lines) at http://nopaste.snit.ch/15061
15:08 nopaste "donaldh" at 213.123.171.12 pasted "This DOESN'T cause a SEGV with -j" (14 lines) at http://nopaste.snit.ch/15062
15:11 jhorwitz joined #parrot
15:12 PerlJam donaldh: on the first one, what happens if you add a call to "end" as the last thing in _main?
15:13 donaldh PerlJam: that also fixes it.
15:14 PerlJam donaldh++
15:18 donaldh msg wknight8111 Have a look at the irclog for a suggestion about your jit_h_files problem http://irclog.perlgeek.de/​parrot/2008-12-22#i_780388
15:18 purl Message for wknight8111 stored.
15:20 Coke end is added by default in the normal core on main.
15:22 donaldh For wknight's jit core it looks like an explicit main works, but an implicit one doesn't.
15:23 donaldh A lot of tests use implicit main, i.e. first sub
15:27 dalek r34246 | Whiteknight++ | trunk/docs/pdds (2 files):
15:27 dalek : [PDD] add mention of "parrot" root namespace to PDD19 and 21. This is for TT#80, which I will close if there are no objections to this edit.
15:27 dalek review: http://xrl.us/2qdm5
15:27 Wknight8111 joined #parrot
15:29 donaldh Wknight8111: Have a look at the irclog for a suggestion about your jit_h_files problem http://irclog.perlgeek.de/​parrot/2008-12-22#i_780388
15:30 Wknight8111 thanks!
15:31 Wknight8111 I figured it was something with the jit end code. The jit_emit.h file had multiple definitions of some functions that were conditionally defined with macros
15:31 Wknight8111 so what I need now is to figure out what function I clobbered and fix that
15:34 alvar joined #parrot
15:50 ruoso joined #parrot
15:52 ruoso joined #parrot
15:52 jsut|work what's up with the docs on parrotcode.org, i'm just getting blank pages
15:53 jsut|work the index is there, but all the pages linked to by the index are blank
15:53 jsut|work ie: http://www.parrotcode.org/docs/intro.html
16:02 barney Whiteknight8111: I thought that the true root namespace had the name ''
16:02 barney 'parrot' being one down the true root namespace
16:03 barney s/one down/one level below/
16:06 AndyA joined #parrot
16:07 barney Also line 308 in pdd19 should probably say: You can specify the **hll** root namespace by using empty brackets
16:14 tewk lathos: send me the patch, also jitted nci must be tested on linux or windows i32
16:14 lathos It's just a refactor of the perl side so far, doesn't have any semantic change and so shouldn't have any effect on jitted nci.
16:15 tewk good, I'd be happy to test.  If you send me future patches I'll do the jitted nci refactorins too.
16:17 tewk lathos:  your welcome do delve into jitted nci, but I'll do it you would like.
16:18 lathos I'd rather not at the moment. :)
16:18 lathos But until I've finished refactoring the Perl there shouldn't be any changes needed. Once I start implementing $ and @ signatures things will get more interesting but that won't be for a while.
16:19 tewk Sounds great.
16:24 davidfetter joined #parrot
16:28 hercynium joined #parrot
16:29 riffraff joined #parrot
16:29 riffraff hi everyone
16:29 purl Howdy, riffraff, you fantastic person you.
16:29 riffraff purl, you're lovely
16:29 purl riffraff: sorry...
16:31 riffraff dummy question wrt using parrot to parse a custom language: if I have a rule defined in terms of itself (such as expr = value | expr + expr ) when writing the action for the rule I should be able to access the nested nodes, right?
16:33 riffraff in this example, I'd have something like for $p=PAST::Op.new;  @($<expr>) { $p.push( $($_) ) } but $<expr> seem to be empty
16:45 Wknight8111 Are you sure that the true root namespace is ''?
16:51 rkh joined #parrot
16:58 pmichaud expr = value | expr + expr    is likely to be an infinite loop.
17:00 pmichaud good morning, everyone.
17:01 moritz good morning
17:02 Khisanth joined #parrot
17:06 iblechbot joined #parrot
17:06 khisanth_ joined #parrot
17:07 Tux pmichaud, does my CSV fix work for you?
17:10 pmichaud Tux:  which csv fix?
17:10 Tux Spreadsheet::Read
17:10 pmichaud (I'm still just waking up.)
17:10 Tux it is you who asked me that for MacOSX, right?
17:11 pmichaud not I -- at least I don't think I did.
17:11 pmichaud I don't have a Mac.
17:11 Tux then ignore me. sorry to have bothered
17:11 pmichaud no problem
17:11 Tux From: Patrick Michaud <pmichaud@u.washington.edu>
17:11 pmichaud heh
17:11 Tux you can imagine I thought it was you
17:11 pmichaud that's my doppelganger
17:12 * davidfetter has at least one, too
17:12 pmichaud there's _another_ Patrick Michaud in the Perl community.
17:12 pmichaud We keep running into each other at YAPC::NA.
17:12 pmichaud and confusing the heck out of registration folks.
17:12 Tux ok, i'll hide in my cave again. enjoy
17:12 Tux left #parrot
17:13 davidfetter there's a guy who works at portland state university in their IT department
17:13 davidfetter named David Fetter
17:13 davidfetter i'm constantly bumping into him at OSCON, or was until last year :P
17:19 apple-gunkies joined #parrot
17:35 riffraff joined #parrot
17:37 jhorwitz sounds like the other patrick michaud at YAPC
17:37 dalek r34247 | pmichaud++ | trunk/languages/perl6/src/builtins:
17:37 dalek : [rakudo]:  @*INC should be an Array, not a List (RT #61608, moritz++)
17:37 dalek review: http://xrl.us/2272d
17:38 moritz pmichaud: funnily I found that bug while running a pugs regression test of which I thought "oh, this is so pointless" ;-)
17:39 pmichaud heh
17:40 moritz the one in t/magicals/inc.t
17:43 pdcawley joined #parrot
18:00 Coke pmichaud: have you given any thought to how rakudo is going to implement tying?
18:01 Coke (tieing?)
18:01 pmichaud a little.
18:02 pmichaud any particular aspect you're curious about?
18:02 pmichaud in general, one does:    my @array is TiedArray
18:02 pmichaud that causes @array to be created as a TiedArray object
18:02 pmichaud then everything "just works" after that :-) :-)
18:02 Coke ok. so you're going to have separate classes for anything that is tied.
18:03 pmichaud that's pretty much what the p6 spec says, yes.
18:03 Coke so I might analogously have a TiedTclList
18:03 pmichaud Perl 6 has a "Tieable" role, iirc
18:03 Coke and then you have methods on Tied* to register method/vtable overrides, and then dispatch things as necessary?
18:04 pmichaud yes.
18:04 Coke k.
18:04 Coke that's about what I had, but was hoping vtables would magically make it easier. =-)
18:04 pmichaud postcircumfix:<[ ]> and postcircumfix:<{ }>  are methods, as well as .STORE and possibly .FETCH
18:05 Coke I am at the point now where in order to get much further I need to implement a tcl-level override hash-indexing on read.
18:06 Coke (Tcl's tcltest.tcl requires the equivalent of 'tie' to function properly.)
18:06 Coke it works as long as you don't ask whether you should be skipping certain tests.)
18:09 Coke (also, I need to turn on tracing after a variable has been created, but I should be able to do that.)
18:10 apple-gunkies joined #parrot
18:18 rjh at the risk of sounding a Ruby fanboy, the ability to simply subclass Array/Hash and override the fetch/store methods was very intuitive and sensible
18:19 rjh are Perl 6 arrays/hashes 'full' objects? could this be done?
18:20 pmichaud yes, they're 'full' objects
18:20 pmichaud so one would likely override postcircumfix:<[ ]>
18:20 rjh nice
18:20 rjh so where does tying fit in
18:35 dalek r34248 | pmichaud++ | trunk (2 files):
18:35 dalek : [core]:  Correct .arity for subs with optional named parameters (RT #61606).
18:35 dalek : * Also adjust test to only test valid PIR.
18:35 dalek review: http://xrl.us/27yce
18:36 pmichaud tying fits in simply by declaring an array or object as an instance of the overridden class
18:36 pmichaud thus
18:36 pmichaud my @a is MyCustomTiedArray;
18:37 pmichaud then all accesses to @a would go through the overridden methods instead of the normal Array ones.
18:37 cotto Coke, do you think the colors don't add anything to the TT report?
18:37 pmichaud I find the colors more distracting than helpful.
18:37 pmichaud perhaps that's because I haven't memorized the color scheme yet.
18:38 pmichaud I'd find it easier if priority was a column instead of a color, although we're getting a bit too much information in the display already.
18:39 cotto better?
18:39 purl i guess better is relative, depends how you want to use them ;)
18:39 pmichaud I don't see the priority, though.
18:40 pmichaud the "version" column isn't that useful yet... maybe it will be in the future as we get onto a more stable release cycle.
18:40 pmichaud afk, lunch and errands.
18:41 cotto it's between component and version now
18:41 cotto (just added)
18:48 * jonathan waves from England
18:49 * Tene waves from not-England.
18:55 rurban Hi jonathan
18:55 jonathan rurban: Hi :-)
18:55 Wknight8111 purl forget better
18:55 purl Wknight8111: I forgot better
18:58 Coke cotto: no, they're too confusing.
18:58 * Coke wonders if someone would like to write 'set_pmc' for TclArray. =-)
19:02 Coke oooh, copy works.
19:15 Coke bah, no it doesn't do what I need, I think.
19:15 Coke I have a PMC foo; I wish the PMC to become a subclass of itself. ... morph?
19:18 jonathan Coke: Rakudo has a rebless_subclass dynop that may do what you want.
19:18 jonathan If you have a use case too, perhaps we make it an official Parrot op.
19:18 pmichaud copy can work.
19:18 pmichaud $P0 = new 'Subclass'
19:19 pmichaud copy self, $P0
19:19 pmichaud (do things to $P0 to preserve information)
19:19 pmichaud (before the copy)
19:19 pmichaud Rakudo does this to get ResizablePMCArray objects to turn into List objects
19:19 jonathan hi pm
19:19 pmichaud hiya, jonathan
19:19 jonathan I see you made a couple more tests pass. ;-)
19:20 pmichaud a few.
19:23 jonathan s/few/few hundred/
19:23 jonathan pmichaud++
19:23 pmichaud yeah, I just got started on finding things that could be easily done, and did those.  :-)
19:23 pmichaud got some really good momentum, so decided to ride on that a while :-)
19:24 jonathan Nice
19:24 jonathan I've just been travelling, seeing people, doing Christmas shopping, etc.
19:25 pmichaud that sounds good.  (I did Christmas shopping as well, but none of that other stuff )
19:25 Coke jonathan: now I think I just need to figure out which :vtable override I need on the reader side.
19:26 jonathan Yeah, it's nice to get a break from things a bit.
19:28 barney joined #parrot
19:32 Tene pmichaud: what do you think about this:
19:32 Tene 1. 'while' and 'for' and friends strip the 'handlers' attribute out of the block and pass it as a named parameter to 'loop_helper'
19:32 Tene 2. 'loop_helper' constructs the loop, wraps the passed handlers around the loop, and then adds its own handlers around that
19:32 Coke jonathan++
19:33 pmichaud Tene: it still feels as though the handlers would end up with the wrong lexical scoping.
19:34 Tene Hmm.
19:36 Tene You might be right... thinking...
19:36 pmichaud I'm starting to think that looping in a perl6 sense is going to be something we do within a block, as opposed to do "on" a block.
19:37 Tene My thinking here is that the Op loop nodes represent a modification of the block.
19:37 pmichaud that feels wrong.
19:38 pmichaud if we're modifying a block, we should just do it on the block.
19:38 mberends joined #parrot
19:38 pmichaud or else the Op loop node belongs *within* the block, instead of outside of it.
19:39 Tene If the loop is within the block, the loop handlers will be nested inside of the block handlers.
19:39 pmichaud doesn't have to be that way -- we can change the way handlers are genrated.
19:39 Tene Unless loop nodes are a variant of blocks.
19:40 pmichaud well, that's kinda what I've been thinking also
19:40 particle1 joined #parrot
19:40 Tene That seems to be the idea we've been dancing around.
19:40 pmichaud but if we're going that route, then I want to solve ENTER and LEAVE as well.
19:40 Tene For a nested loop node to reach out and wrap handlers around the outside of what contains it seems wrong to me.
19:41 nopaste "Coke" at 72.228.52.192 pasted "complete hack, but this now works:" (8 lines) at http://nopaste.snit.ch/15063
19:41 particle1 pmichaud: you broke rakudo for c89-compliant compilers with r34219. strncasecmp isn't c89.
19:42 Coke jonathan++
19:42 pmichaud particle:  I'm open for suggestions.
19:42 pmichaud I just borrowed what src/pmc/bigint.pmc was doing.
19:42 particle1 lc first?
19:42 particle1 hrmm
19:43 pmichaud I can't lc the entire source code.
19:43 pmichaud I could do a series of three tolower() tests.
19:43 pmichaud but that seems ugly.
19:44 pmichaud I'll just do the tolower tests.
19:44 particle1 ok, i don't have bigint support, so this may have been broken for some time.
19:44 particle1 i'll look into that
19:46 dalek r34249 | pmichaud++ | trunk/languages/perl6/src/classes:
19:46 dalek : [rakudo]:  Refactor some Mapping methods (RT #61618, cspencer++)
19:46 dalek : * Patch courtesy Cory Spencer <cspencer@sprocket.org>
19:46 dalek review: http://xrl.us/3dzgb
19:46 pmichaud jonathan: btw, I tried doing the trick of eliminating perl6str's vtable functions by moving them into another PMC type and using add_vtable_method, but couldn't get it to work at all.
19:46 pmichaud I didn't have a good way of looking up the method from the generic PMC.
19:48 particle1 pmichaud: could you stick the pmc in the _perl6 namespace, then expose them as methods?
19:48 pmichaud particle1: that's the thing, I couldn't look them up as methods
19:48 particle1 oh, i thought you couldn't look them up as vtables
19:49 dalek r34250 | pmichaud++ | trunk/languages/perl6/src/pmc:
19:49 dalek : [rakudo]:  Eliminate strcasecmp from inf/nan conversions (particle++)
19:49 dalek review: http://xrl.us/3ebmz
19:50 particle1 find_sub won't work?
19:50 pmichaud it's not in the namespace, is it?
19:50 particle1 you could put it in the namespace
19:50 pmichaud from C?
19:50 pmichaud how do I do that?
19:51 particle1 checking... but the namespace code is still a mess, and i'm a bit rusty
19:51 pmichaud there are, unfortunately, a lot of messy things at the moment. :-|
19:52 particle1 some things never change ;)
19:52 pmichaud Coke: btw, you asked a few days ago about things to speed up PGE
19:52 particle1 btw seattle isn't really set up to handle 17" of snow over 4 days
19:52 Infinoid I'm told driving in the snow in seattle is like nascar in slow motion
19:53 pmichaud this is going to sound like I'm being snarky, but actually what would help PGE the most at this point is (1) faster method calls (calling conventions), and (2) PIR-level profiling
19:53 pmichaud I mean yes, redesigning for protoregexes and LTM will help a lot also, but I'd guess the bigger wins are in making those calls faster in the first place.
19:54 pmichaud for example, when I switched the Match objects from being PIR based to PMC-based, we got a 15% speed improvement.
19:54 particle1 Infinoid: that's not far from the truth. i've got 4wd and chains, so i'm fine. those other morons, though....
19:54 jonathan pmichaud: Don't write them as vtables, write them as normal methods, then you can look them up with find_method.
19:54 pmichaud jonathan: I did write them as normal methods.
19:54 pmichaud find_method wouldn't find them.
19:54 barney apropos messy namespaces: How do I construct a PAST::Op node that calls a funcion below a different HLL root namespace ?
19:54 Coke (pir level profiling) that's a big win all around.
19:54 jonathan pmichaud: Oh. That's....weird.
19:54 Infinoid particle1: heh.  AWD and snow tires usually works fine for me, but yeah, you gotta pay attention
19:55 Coke pmichaud: I also wonder if being forced to use PMCs for attributes is hurting us.
19:55 jonathan pmichaud: OK, I'll try and take a poke and see why it doesn't work at some point.
19:55 Infinoid does anyone here have an opinion on the changes I've made to dalek's svn log?
19:55 Coke (with extra GC pressure)
19:55 Infinoid I've got a bit of negative feedback about linking to svn.perl.org for the diffs, but on the other hand, it's more reliable than parrotvm.org seems to be
19:55 nopaste "pmichaud" at 72.181.176.220 pasted "find_method doesn't work on PCCMETHODs (for jonathan)" (6 lines) at http://nopaste.snit.ch/15064
19:55 Coke why negative feedback? isn't that the canonical source?
19:56 Infinoid parrotvm.org's diffs look nicer (when it doesn't crash generating them)
19:56 pmichaud I agree -- looking at the diff seems more difficult on perl.org
19:56 pmichaud I can't see it all at once
19:56 pmichaud but perl.org thus far has worked okay for me as well.
19:56 Infinoid yeah, I haven't found a way to convince svn.perl.org to give me the whole thing on one page (yet)
19:56 Infinoid I have been looking.
19:57 pmichaud oops, I forgot the output
19:57 pmichaud renopasting
19:57 Coke couldn't you use svn.perl.org's feed, but just point to parrotvm.org's urls?
19:57 nopaste "pmichaud" at 72.181.176.220 pasted "find_method doesn't work on PCCMETHODs, with output (for jonathan)" (12 lines) at http://nopaste.snit.ch/15065
19:57 Coke seems like it should just be a revision # you have to change, neh?
19:58 Infinoid I certainly can, and I will if it's preferred
19:58 * Coke don't care.
19:58 Infinoid its just a $url = "http://blahblah?rev=$rev", easy to change
19:58 Coke I like the branch to "longest matching path", though.
19:58 Coke er, change.
19:58 Infinoid thanks, glad that's working
19:58 Infinoid last time I tried parrotvm.org, it completely failed to display a diff to a checkin to some branch
19:58 Infinoid let me see if I can find that again
19:59 Infinoid (trunk checkins worked, I don't know why)
19:59 Infinoid do we have a timeframe for switching svn to trac?  (I'm wondering how much effort I should invest in the current stuff.)
20:00 Infinoid ok, here's an example.  http://www.parrotvm.org/svn​/parrot/revision?rev=34168 loads fine; http://www.parrotvm.org/svn​/parrot/revision?rev=34169 has an error
20:01 Coke Infinoid: we're hoping for post-january release.
20:01 Coke (on the svn switchover)
20:02 Infinoid ok.  if I get a couple more votes for review links to parrotvm.org, I'll switch them back (easy on my end of things)
20:10 bacek joined #parrot
20:15 dalek joined #parrot
20:16 Infinoid (switched back to parrotvm.org, bug me if you hate it)
20:18 pmichaud afk # lunch
20:18 Coke (*&#$. to get this one thing to work, I have to implement [trace variable foo r], [namespace code], [namespace inscope] ...
20:18 Infinoid yakkity yak
20:18 Coke aiming for a pre-existing test suite sucks. ^_-
20:24 riffraff are the logs for #parrot still available somewhere?
20:25 Tene purl: irclog?
20:25 purl irclog is http://irclog.perlgeek.de/parrot/today or see also: infrared clogs
20:25 riffraff on http://www.parrotcode.org/misc/parrotsketch-logs/ they seem to be stopped at 200809
20:25 Infinoid infrared clogs?
20:25 purl infrared clogs are like ruby slippers, but more so
20:26 riffraff thanks
20:26 riffraff possibly the resources page on parrotcode should be updated ?
20:26 particle1 pmichaud: i can replicate your behavior :(
20:27 gryphon joined #parrot
20:27 nopaste "particle" at 76.121.106.245 pasted "find_method not finding method :(" (35 lines) at http://nopaste.snit.ch/15066
20:27 riffraff pmichaud, thanks for reply earlier today, sadly I had a network failure ad could not read it
20:28 pmichaud particle:  I think that chromatic's post to parrot-dev is a not-so-good indictment of Parrot internals at the moment.
20:28 pmichaud anyway, I'm really going to lunch now.
20:28 pmichaud later.
20:29 Coke pmichaud: we've been saying for some time, correct, then fast, neh? so the fact that there are HUGE optimizations to make does not surprise me at all. (but it does certainly look bad)
20:51 dalek r34251 | fperrad++ | trunk/languages/WMLScript/t/Parrot/Test:
20:51 dalek : [WMLScript] Test
20:51 dalek : - now, work with absolute pathname
20:51 dalek review: http://xrl.us/3ic22
20:57 dalek r34252 | fperrad++ | trunk/languages/WMLScript/t (21 files):
20:57 dalek : [WMLScript] Test
20:57 dalek : - now, work with a correct pragma 'use lib'
20:57 dalek review: http://xrl.us/3iy43
20:59 dalek r34253 | fperrad++ | trunk/languages/markdown/t/Parrot/Test:
20:59 dalek : [Markdown] Test
20:59 dalek : - now, work with absolute pathname
20:59 dalek review: http://xrl.us/3i7an
21:01 dalek r34254 | fperrad++ | trunk/languages/markdown/t (11 files):
21:01 dalek : [Markdown] Test
21:01 dalek : - now, work with a correct pragma 'use lib'
21:01 dalek review: http://xrl.us/3jcjz
21:01 bacek rakudo: my ($a,$b) = 1; say $a*$b
21:02 bacek rakudo: say "O HI"
21:02 polyglotbot OUTPUT[Use of uninitialized value␤0␤]
21:02 polyglotbot OUTPUT[O HI␤]
21:03 bacek rakudo: say (1).reduce($^a*$^b)
21:03 polyglotbot OUTPUT[too few arguments passed (0) - 2 params expected␤current instr.: '_block14' pc 35 (EVAL_13:26)␤called from Sub '!UNIT_START' pc 15950 (src/builtins/guts.pir:327)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub
21:03 polyglotbot ..'parrot;PCT;HLLCompiler;evalfiles' pc 1217 (src/PCT/HLLCompiler.pir:669)␤called...
21:04 bacek rakudo: say (1).reduce({$^a*$^b})
21:04 polyglotbot OUTPUT[Method 'iterator' not found for invocant of class 'Int'␤current instr.: 'parrot;Any;reduce' pc 10209 (src/builtins/any-list.pir:409)␤called from Sub '_block14' pc 64 (EVAL_13:40)␤called from Sub '!UNIT_START' pc 15950 (src/builtins/guts.pir:327)␤called from Sub 'parrot;PCT;HLLCompiler;eval'
21:04 polyglotbot ..pc 892 (src/PCT/HLLCompiler.pir:508)␤called from...
21:04 bacek rakudo: say ((1)).reduce({$^a*$^b})
21:04 polyglotbot OUTPUT[Method 'iterator' not found for invocant of class 'Int'␤current instr.: 'parrot;Any;reduce' pc 10209 (src/builtins/any-list.pir:409)␤called from Sub '_block14' pc 64 (EVAL_13:40)␤called from Sub '!UNIT_START' pc 15950 (src/builtins/guts.pir:327)␤called from Sub 'parrot;PCT;HLLCompiler;eval'
21:04 polyglotbot ..pc 892 (src/PCT/HLLCompiler.pir:508)␤called from...
21:04 dalek r34255 | fperrad++ | trunk/languages/lua/t/Parrot/Test (3 files):
21:04 dalek : [Lua] Test
21:04 dalek : - now, work with absolute pathname
21:04 dalek review: http://xrl.us/3jnku
21:04 bacek rakudo: say list(1).reduce({$^a*$^b})
21:04 polyglotbot OUTPUT[1␤]
21:14 dalek r34256 | fperrad++ | trunk/languages/lua/t (64 files):
21:14 dalek : [Lua] Test
21:14 dalek : - now, work with a correct pragma 'use lib'
21:14 dalek review: http://xrl.us/3kauy
21:23 riffraff joined #parrot
21:26 Coke particle1: are you sure that is meant to work on an instance and not a class?
21:28 particle1 pdd17 lists 'find_method' under 'class/object' vtable functions
21:28 apple-gunkies joined #parrot
21:29 jose joined #parrot
21:29 particle1 also note adding $P0 = get_class $P0 # doesn't help
21:30 Coke no guarantee that the opcode is calling the vtable you think.
21:31 clunker3 joined #parrot
21:31 Coke ->
21:43 dalek r34257 | bernhard++ | trunk/languages/pipp (10 files):
21:43 dalek : [Pipp] Put the builtin functions below the hll root namespace 'pipp'.
21:43 dalek : Funny workaround for setting ".HLL 'Pipp'" in generated PAST.
21:43 dalek : Break 'require_once'.
21:43 dalek review: http://xrl.us/3nmr6
21:45 eric256 joined #parrot
21:45 eric256 all the doc links on parrotcode.org point to blank pages... http://www.parrotcode.org/docs/intro.html
21:47 donaldh joined #parrot
21:49 peters joined #parrot
21:49 peters good localtime()
21:50 peters rakudo: (my $vacation++ == my $perl6_fun++).say
21:50 polyglotbot OUTPUT[1␤]
21:51 peters =)
21:52 dalek r34258 | bernhard++ | trunk/languages/pipp/src/pct:
21:52 dalek : [Pipp] small beautifications
21:52 dalek review: http://xrl.us/3ogz6
21:52 Aisling joined #parrot
21:54 eric256 i saw http://rakudo.org/2008/12/rakud​o-now-supports-inline-pir.html, is there a way to pass something to the PIR? i want to write some wrappers around socket for expirementation os i'd need to keep track of the socket
21:54 shorten eric256's url is at http://xrl.us/3opm7
21:56 nopaste "peters" at 83.183.129.106 pasted "S05-metasyntax/enumerated-character-classes.t ?" (38 lines) at http://nopaste.snit.ch/15068
21:56 peters seen moritz
21:56 purl moritz was last seen on #parrot 4 hours, 16 minutes and 26 seconds ago, saying: the one in t/magicals/inc.t
21:56 peters moritz: ping
21:58 riffraff is there a common idiom to iterate over something that may be either a list or a single object? I guess something like for ([$foo].flatten) {}
21:58 riffraff with NQP
22:00 jonathan @($foo) maybe?
22:01 jonathan eric256: You can create a lexical variable, and then use find_lex in PIR to get at it.
22:02 riffraff thought so but I get a "Method list not found for invocant ResizablePMCArray"
22:04 eric256 thansk jonathan...right now its giving me errors on the http.pir example just straight out of the box ;)
22:05 particle1 eric256: like jonathan said, "my $x = 1; q:PIR { $P0 = find_lex '$x' \n say $P0 }; # says '1'
22:06 eric256 excllent
22:06 eric256 tanks
22:06 eric256 thanks even
22:06 dalek r34259 | bernhard++ | trunk (6 files):
22:06 dalek : [Pipp] Support for do-while
22:06 dalek : Courtesy of Daniel Keane.
22:06 dalek review: http://xrl.us/3pwyk
22:07 peters eric256: are you working on a http implementation?
22:08 eric256 just playing with it, but i thought i would try yes
22:09 pmichaud Coke:  (correct, then fast)  perhaps, but in fact many of the recent changes parrot (e.g., mmd) seem more like pessimizations than optimizations.
22:09 pmichaud *to parrot
22:09 eric256 but the examples/io/http.pir throws errors without even doing anything (unless i'm just makeing a plain stupid mistake which is probable)
22:09 tewk 66% speed up by stealing perl6's <ws> memoization
22:09 peters eric256: I just finnished a URI (RFC3986) grammar so i can implement a HTTP grammar
22:10 barney Is there a way to set the hll root namespace for a PAST?   Something like   :inline(".HLL 'Pipp')   ?
22:10 particle1 eric256: it's possible that example is bitrotten, there have been some opcode changes recently and i'm not sure examples/ have been kept up-to-date
22:10 barney pir_pragma     seems to be unimplemented
22:11 jonathan Not to mention any side-effects recent IO changes could have had on socket stuff (I assume we have tests...)
22:11 eric256 i'm getting "error:imcc:syntax error, unexpected VAR, expecting '(' ('address')" when running the example
22:14 tewk socket doesn't appear to be an op anymore.
22:14 particle1 ack socket src/ops # no results
22:14 eric256 hehe yea i just found that out as well...hmmm
22:14 barney See docs/pdds/pdd22_io.pod
22:17 particle1 ack socket t/ -i # no results... that doesn't look promising
22:18 barney Sorry, I inadvertedly changed pdd21_namespaces.pod. But there's an open ticket #80 about that.
22:22 * jonathan tries to look surprised.
22:23 riffraff in NQP, my $foo := () gives "no result object" which seems an error from the PAST conversion. Is it expected or a bug?
22:23 jonathan riffraff: Perhaps a bug; to do what you want calling list() instead may work.
22:24 jonathan my $foo := list();
22:24 pmichaud NQP doesn't have a 'list' function.
22:24 jonathan Oh?
22:24 pmichaud NQP doesn't provide any runtime functions beyond 'say'
22:24 pmichaud (that's kinda the point of NQP)
22:24 jonathan Ah. I suspect that I musta been calling the Rakudo one...
22:24 pmichaud correct.
22:25 jonathan OK, that won't help anyone working on another langauge then. :-)
22:25 pmichaud NQP will call whatever runtime functions you happen to provide, but it doesn't provide any on its own.
22:25 pmichaud that said, it's plausible that NQP would recognize () as being an empty ResizablePMCArray
22:26 riffraff makes sense not to have builtins, but then how can I get an empty list since @foo is invalid, I can't assign an empty one and I can't build it?
22:26 pmichaud my $foo = ResizablePMCArray.new()     # would work if ResizablePMCArray protoobject is registered
22:26 pmichaud so
22:27 particle1 := of course
22:27 pmichaud P6metaobject.register('ResizablePMCArray');
22:27 pmichaud my $foo := ResizablePMCArray.new();
22:27 riffraff ah, that't the trick
22:27 pmichaud I _think_ that works.
22:27 riffraff cause I tried new'in ResizablePMCArray and it failed
22:27 riffraff id the metaobjects is not defined at least it makes sense
22:28 pmichaud and of course eventually NQP will have
22:28 pmichaud my $foo := Q:PIR { %r = new 'ResizablePMCArray' };
22:28 pmichaud (need to backport that in from Rakudo)
22:31 riffraff oh that would be nice
22:32 riffraff (failed with P6meta.register, but I'll try to work from that)
22:32 pmichaud looking.
22:32 pmichaud ahhh
22:32 pmichaud it's P6metaclass.register(...
22:34 riffraff yep found
22:34 riffraff thanks once more :)
22:38 TiMBuS joined #parrot
22:38 barney pmichaud: Is anything speaking against implementing :pir_pragma() as it's mentioned in pdd26 ?
22:41 dalek r34260 | pmichaud++ | trunk/languages/perl6/src/classes:
22:41 dalek : [rakudo]:  Add .perl to Whatever.
22:42 dalek review: http://xrl.us/3q8qj
22:42 Whiteknight joined #parrot
22:42 pmichaud barney: I don't know what/how pir_pragma would be used.
22:43 barney only for     .HLL 'Name'
22:43 pmichaud Huh.  I didn't even know that went in there.
22:45 barney or a kind of   :inline that's printed before the sub declaration
22:46 eric256 left #parrot
22:47 peters rakudu: ?!0.say
22:48 peters rakudo: ?!0.say
22:48 polyglotbot OUTPUT[0␤]
22:48 particle1 like .include 'foo.pasm' ?
22:48 peters rakudo: ?(!0).say
22:48 polyglotbot OUTPUT[1␤]
22:48 pmichaud I think that pir_pragma was originally for what is now pir flags.
22:48 pmichaud er, :pirflags
22:49 particle1 rakudo: (?!)0.say
22:49 polyglotbot OUTPUT[Syntax error at line 1, near "(?!)0.say"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤called from Sub 'parrot;Perl6;Grammar;TOP' pc 20613 (src/gen_grammar.pir:250)␤called from Sub 'parrot;PCT;HLLCompiler;parse' pc 634
22:49 polyglotbot ..(src/PCT/HLLCompiler.pir:388)␤called from Sub 'parrot;PCT;HLLCompiler;compile' p...
22:49 pmichaud yes, it's now :pirflags
22:49 barney :pirflags is on the same line as the sub declaration
22:50 pmichaud right.
22:50 pmichaud PAST doesn't yet provide a way to do declarations or statements outside of a parrot Sub
22:50 pmichaud I've been trying to figure out how that should look.
22:50 barney .HLL 'Pipp'     needs to be outside a .sub       like .namespace
22:51 pmichaud yes, I know.
22:51 pmichaud I don't have a good answer yet.
22:51 pmichaud I've been wondering if hll should actually be an attribute on blocks, like :namespace is.
22:51 particle1 if you can change .HLL in a file, that makes sense
22:52 particle1 i think you can.
22:52 pmichaud yes, PIR/Parrot currently allow that.
22:52 Whiteknight barney, thanks for the fix
22:53 particle1 yeah, then block attr seems correct to me. pir subs are compunits. hll and ns are attributes of those compunits
22:53 apple-gunkies joined #parrot
22:53 barney PDD19 says that  '.HLL'  is perl file
22:53 pmichaud it still doesn't answer the question of getting .include in place.
22:53 pmichaud I think PDD19 might be wrong there, then.
22:53 barney s/perl file/per file/
22:54 barney That's good
22:54 pmichaud I know that current imcc allows multiple .HLL directives per file.
22:54 particle1 .HLL is not per file, for sure
22:55 * barney ponder renaming .HLL to .hll_root_namespace
22:57 nopaste "particle" at 76.121.106.245 pasted "hll is not per file, but .include is" (13 lines) at http://nopaste.snit.ch/15069
22:58 particle1 i don't know how to deal with .include, except as a first pass to pass it through to the generated pir directly
22:59 particle1 it's possible two files could load include files which redefine the same symbol differently
22:59 pmichaud two files in the same compilation stream?
22:59 * pmichaud is confused.
22:59 particle1 i wonder what imcc does with that currently....
22:59 Whiteknight probably breaks
22:59 pmichaud it should complain about attempting to redefine a symbol.
23:00 particle1 hopefully. that would mean .include isn't per-file, it's per program
23:00 pmichaud particle, you're confusing me.
23:00 dalek r34261 | fperrad++ | trunk/languages/lua/t (11 files):
23:00 dalek : [Lua] Test
23:00 dalek : - now, all files used as resource by test are relative to $FindBin::Bin
23:00 dalek review: http://xrl.us/3rvy4
23:00 pmichaud all .include does is take the text of another file and include it in the current compilation stream.
23:01 pmichaud That's it. Period.
23:02 bacek_ joined #parrot
23:05 nopaste "particle" at 76.121.106.245 pasted ".include is per-file" (32 lines) at http://nopaste.snit.ch/15071
23:06 pmichaud all that means (to me) is that imcc doesn't complain if you redefine a symbol.
23:07 particle1 it's not redefined, is it? both definitions work
23:07 pmichaud it's redefined.  Watch.
23:08 pmichaud http://nopaste.snit.ch:8001/paste
23:08 pmichaud oops
23:08 pmichaud http://nopaste.snit.ch/15072
23:08 nopaste "particle" at 76.121.106.245 pasted ".include is per-file, .FOO is redefined in main, not in A or B" (19 lines) at http://nopaste.snit.ch/15073
23:09 barney Does  parrot --pre-process-only    still work ?
23:09 pmichaud the phrase ".include is per-file" is totally misleading.  .include doesn't supply a context or anything like that.  It just says "place text from a file here."
23:10 pmichaud see nopaste 15072 -- the FOO gets redefined *in the same file*
23:11 particle1 i guess my example is no good because i used macros
23:11 barney parrot --pre-process-only     is (still) broken
23:11 * particle1 wonders when it last worked
23:11 particle1 i don't even remember --pre-process-only
23:12 particle1 it should either be tested or removed by march, need a ticket
23:12 barney I think it never worked. never showed the included files
23:12 pmichaud in 15073, you get those results because at the time .FOO was used when compiling A.pir it was defined as 1 (so the generated code is "say 1"), and after compiling B it's defined as 2.
23:13 particle1 pmichaud: yes, i understand that
23:13 particle1 but you can't say:
23:13 particle1 .sub main
23:13 particle1 .include 'A.pir'
23:13 particle1 'A'()
23:13 particle1 .include 'B.pir'
23:13 particle1 'B'()
23:13 particle1 ...
23:13 pmichaud not if A.pir and B.pir contain .sub definitions you can't
23:14 pmichaud because that would be the same as writing
23:14 pmichaud .sub main
23:14 pmichaud .sub A
23:14 pmichaud ...
23:14 pmichaud .end
23:14 pmichaud 'A'()
23:14 pmichaud .sub B
23:14 pmichaud ...
23:14 pmichaud .end
23:14 pmichaud 'B'()
23:14 pmichaud ...
23:14 particle1 right
23:14 pmichaud and Parrot doesn't allow nested sub definitions.
23:15 PacoLinux joined #parrot
23:15 pmichaud but if A.pir and B.pir contain things that are valid within a sub, it works just fine.
23:15 particle1 of course
23:15 pmichaud in either case, .include doesn't supply a "file context"
23:15 pmichaud it's just a straight text substitution.
23:18 * barney submitted https://trac.parrot.org/parrot/ticket/81
23:58 dalek r34262 | jkeenan++ | trunk:
23:58 dalek : Added entry about change in 'make smoke'.
23:58 dalek review: http://xrl.us/3w358

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

Parrot | source cross referenced