r28814 | fperrad++ | libs4php: : [php] check number of args diff: http://www.parrotvm.org/svn/parrot/revision?rev=28814 % iblechbot has joined #parrot % purl has joined #parrot % barney has joined #parrot % masak has joined #parrot % stupidbot has left stupidbot!~bot@123-243-38-218.tpgi.com.au % stupidbot has joined #parrot % barney has left barney!~bernhard@dslb-084-058-097-054.pools.arcor-ip.net re <@Patterner> if you see purple dinosaurs, you should stop smoking those mushrooms...: _smoking_ mushrooms is a waste of good psychedelics. they should be had lightly roasted. and eaten with green evil stuff. I recently discovrered that the yellow Chartreuese (yellow evil stuff) is the TimToady favorite color % mauro43 has joined #parrot % mauro43 has left #parrot % apeiron_ has joined #parrot % apeiron has left apeiron!~apeiron@c-69-248-118-67.hsd1.pa.comcast.net % paco has left paco!~chatzilla@139.Red-80-36-122.staticIP.rima-tde.net % bacek has joined #parrot evening everyone hullo % paco has joined #parrot % kid51 has joined #parrot % kid51 has left kid51!~jkeen@68.237.12.118 % jimk has joined #parrot % magnachef_ has joined #parrot % magnachef has left magnachef!~dmagnus@cpe-74-78-109-88.buffalo.res.rr.com % magnachef has joined #parrot % magnachef_ has left magnachef_!~dmagnus@cpe-74-78-109-88.buffalo.res.rr.com % magnachef_ has joined #parrot % jimk has left jimk!~jkeen@70.107.10.27 % magnachef has left magnachef!~dmagnus@cpe-74-78-109-88.buffalo.res.rr.com % magnachef__ has joined #parrot % magnachef_ has left magnachef_!~dmagnus@cpe-74-78-109-88.buffalo.res.rr.com % magnachef_ has joined #parrot r28815 | fperrad++ | trunk: : [plumhead] : - fix target clean-pmc diff: http://www.parrotvm.org/svn/parrot/revision?rev=28815 % magnachef__ has left magnachef__!~dmagnus@cpe-74-78-109-88.buffalo.res.rr.com % kid51 has joined #parrot % Whiteknight has joined #parrot r28816 | pmichaud++ | trunk: : [rakudo]: : * Update test_summary.pl script to use -G, : record aborted test runs as failed tests. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28816 % cognominal has left cognominal!~cognomina@82.67.232.89 r28817 | Whiteknight++ | gsoc_pdd09: : [gsoc_pdd09] update to trunk r28819 diff: http://www.parrotvm.org/svn/parrot/revision?rev=28817 % ruoso has left ruoso!~ruoso@201009085227.user.veloxzone.com.br r28818 | pmichaud++ | trunk: : [rakudo]: : * In test_summary.pl, counting aborts as failed tests should count : them as tests, too. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28818 % cognominal has joined #parrot r28819 | fperrad++ | libs4php: : [php] more check type of parameter diff: http://www.parrotvm.org/svn/parrot/revision?rev=28819 r28820 | jkeenan++ | autoicu: : In two cases, don't put $conf inside hashref argument. Make it explicit. : Continue refactoring code out of runstep() into internal subs; test them. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28820 % Whiteknight has left Whiteknight!~Whiteknig@pool-72-78-175-240.phlapa.east.verizon.net % ruoso has joined #parrot r28821 | fperrad++ | libs4php: : [php] add sha1 diff: http://www.parrotvm.org/svn/parrot/revision?rev=28821 r28822 | pmichaud++ | trunk: : [rakudo]: : * spectest-progress update: 75 test files, 1077 passing, 74 failing diff: http://www.parrotvm.org/svn/parrot/revision?rev=28822 % jan has left jan!~chatzilla@90-229-128-103-no52.tbcn.telia.com % TiMBuS has left TiMBuS!~Hurf@123-243-167-27.static.tpgi.com.au seen purl purl was last seen on #poot 2 days and 4 minutes ago, saying: _Fud was last seen on #poot 2 days and 22 minutes ago, saying: heyo [Jun 25 07:42:25 2008] [Jun 27 08:03:59 2008] seen purl purl was last seen on #poot 2 days and 4 minutes ago, saying: _Fud was last seen on #poot 2 days and 22 minutes ago, saying: heyo [Jun 25 07:42:25 2008] [Jun 27 08:03:59 2008] seen spinclad spinclad was last seen on #parrot right now, saying: seen spinclad % barney has joined #parrot r28823 | jkeenan++ | autoicu: : Fix accidental deletion of one sub call. Delineate possible return points for : runstep() more explicitly. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28823 % Andy has left Andy!~Andy@64.81.227.163 r28824 | bernhard++ | trunk: : [Plumhead] : svn merge -r 28770:28822 https://svn.perl.org/parrot/branches/libs4php/languages/plumhead : Fix codingstd failure. : Mark failing tests as TODO. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28824 % jan has joined #parrot % apeiron_ is now known as apeiron % magnachef has joined #parrot r28825 | bernhard++ | trunk: : [Plumhead PCT] : Add TRUE, FALSE and NULL to parser and to actions. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28825 % magnachef_ has left magnachef_!~dmagnus@cpe-74-78-109-88.buffalo.res.rr.com % barney has left barney!~bernhard@p549A1FE4.dip0.t-ipconnect.de % Whiteknight has joined #parrot % Andy has joined #parrot r28826 | moritz++ | trunk: : [rakudo] removed connect.t from spectest_regression, connect() isn't : implemented. This test only succeeded (and skipped everything) so far : because nobody had PERL_TESTS_ALLOW_NETWORK env variable set. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28826 % kid51 has left kid51!~jkeen@pool-70-107-0-169.ny325.east.verizon.net % petdance has joined #parrot % Andy has left Andy!~Andy@adsl-75-57-166-215.dsl.emhril.sbcglobal.net r28827 | jkeenan++ | autoicu: : Add third test file for this step. Tests in this file are run only if : icu-config is available. Reposition call to _verbose_report() inside : runstep(). diff: http://www.parrotvm.org/svn/parrot/revision?rev=28827 % rong has joined #parrot % rong has left #parrot % ruoso has left ruoso!~ruoso@201009085227.user.veloxzone.com.br r28828 | fperrad++ | libs4php: : [php] implement trim() diff: http://www.parrotvm.org/svn/parrot/revision?rev=28828 % petdance has left petdance!~Andy@adsl-75-57-166-215.dsl.emhril.sbcglobal.net paste? hmmm... paste is (see: nopaste) or like glue but a little safer to sniff. or http://nopaste.snit.ch:8001/ or http://scsys.co.uk:8001/ anywhere shadowpaste is or mmm, sticky paste or You there! Eating the paste. or 2 girls, 1 paste "NotFound" at 213.96.228.50 pasted "pir charset and encoding" (18 lines) at http://nopaste.snit.ch/13423 According docs/pdds/draft/pdd19_pir.pod uft8:unicode: and unicode: must have the same effect. pmichaud around? NotFound: where in the pdd does it say that? "Valid character sets are currently: "ascii" (the default), "binary", "unicode" (with UTF-8 as the default encoding)" that doesn't say that utf8:unicode: is the same unicode: I interpret it this way: utf8:unicode: says that the following string is viewed as utf-8, and be used a unicode string moritz: this versions looks to me more confusing then the original. whereas unicode: interprets all escape sequences like \x{f0} as code points, and uses utf8 to store it internally if you're used to perl5's braindead handling of byte strings vs. character strings that makes perfect sense to me moritz: maybe, but I think than one of the key goals of parrot/perl6 is to do unicode things well from the beginning. NotFound: yes. In this case I think that the docuemntation needs clarification, not the implementation needs improvements moritz: at least rakudo or PGE in general needs improvement, it emits the wrong version when compiling a utf8 source. that could very well be the case, I don't know very much about PGE's Unicode handling. I just wanted to say that the PIR example you posted seemed sane to me, if only it were properly documented afk & football, for once ;) % Psyche^ has joined #parrot Following that point of view, it can be needed a way to specify both the source and the object encodings. And even also a charset for both. % Patterner has left Patterner!~Psyche@e177227067.adsl.alicedsl.de % Psyche^ is now known as Patterner r28829 | pmichaud++ | trunk: : [rakudo]: : * Need to avoid tailcalls in cmp and leg due to RT#56448. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28829 r28830 | pmichaud++ | trunk: RT 56448: [BUG] tailcalls cause segfault when invoked from C - new : [rakudo]: : * More fixes to list context, move 'join' and 'sort' into Any class. : * All spectest_regression tests pass again. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28830 r28831 | fperrad++ | libs4php: : [php] math : is_nan() & friends diff: http://www.parrotvm.org/svn/parrot/revision?rev=28831 * NotFound puts his red t-shirt on r28832 | Whiteknight++ | gsoc_pdd09: : [gsoc_pdd09] a few small changes, fix my mistake with the Stack_Entry_t, a few changes and simplifications to src/stacks.c, simplify the way stacks are marked alive, flesh out my idea of separating non-PObjs. maybe other stuff too. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28832 % Whiteknight has left Whiteknight!~Whiteknig@pool-72-78-175-240.phlapa.east.verizon.net % apeiron_ has joined #parrot % apeiron has left apeiron!~apeiron@c-69-248-118-67.hsd1.pa.comcast.net Goal! NotFound: Good game, ain't it?! :-) Yeah! % iblechbot has left iblechbot!~iblechbot@ppp-62-216-199-47.dynamic.mnet-online.de % peepsalot has joined #parrot Weeeee are the campiooooons! % masak has left masak!~user@130.238.45.242 % jjore has left jjore!~jjore@c-24-19-49-60.hsd1.mn.comcast.net % jjore has joined #parrot r28833 | pmichaud++ | trunk: : [rakudo]: : * Update name of S04-statements/no-implicit-block.t diff: http://www.parrotvm.org/svn/parrot/revision?rev=28833 % iblechbot has joined #parrot Regarding #56448, the segfaults happens inside a function that have a comment: "This needs a test for tailcalls too, but I think there is no syntax to pass a key to a tailcalled function or method." r28834 | fperrad++ | libs4php: : [php] math : refactor trigo diff: http://www.parrotvm.org/svn/parrot/revision?rev=28834 % peepsalot has left peepsalot!~peepsalot@bwext.kpimdp.com % paco has left paco!~chatzilla@139.Red-80-36-122.staticIP.rima-tde.net % iblechbot has left iblechbot!~iblechbot@ppp-62-216-196-241.dynamic.mnet-online.de % rdice has joined #parrot % zarchne has left zarchne!~michael@209.40.67.38 % ruoso has joined #parrot % Theory has joined #parrot % tetragon has joined #parrot % Theory has left Theory!~Theory@c-67-160-131-113.hsd1.or.comcast.net % ruoso has left ruoso!~ruoso@201009085227.user.veloxzone.com.br % rdice has left rdice!~richarddi@CPE001ff33cb98b-CM00159a01d44c.cpe.net.cable.rogers.com % Whiteknight has joined #parrot % Psyche^ has joined #parrot r28835 | Whiteknight++ | trunk: : [memory] added some documentation, a macro, and a function prototype for the "mem__internal_realloc_zeroed" function I'm working on. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28835 % Patterner has left Patterner!~Psyche@e177236238.adsl.alicedsl.de % Psyche^ is now known as Patterner % rdice has joined #parrot % bacek has left bacek!~bacek@123-243-38-218.tpgi.com.au % bacek has joined #parrot % tetragon has left tetragon!~seneca@gw-312-705.somanetworks.com % Theory has joined #parrot % AndyA has left AndyA!~andy@82.152.157.85 % Theory has left Theory!~Theory@c-67-160-131-113.hsd1.wa.comcast.net % bacek has left bacek!~bacek@mcas-151.usr.optusnet.com.au % bacek has joined #parrot % AndyA has joined #parrot % tetragon has joined #parrot % magnachef_ has joined #parrot % magnachef has left magnachef!~dmagnus@cpe-74-78-109-88.buffalo.res.rr.com % rdice has left rdice!~richarddi@CPE001ff33cb98b-CM00159a01d44c.cpe.net.cable.rogers.com % TiMBuS has joined #parrot r28836 | chromatic++ | trunk: : [GC] Cleared the metadata attached to a PMC_EXT structure when recycling it. : This prevents stale (and themselves recycled) metadata PMCs from sticking : around nothing expects them. This fixes at least RT #55782. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28836 RT 55782: [BUG] for 1..1000 -> $a { say $a } segfaults in rakudo (Gargbage Collector) - open r28837 | Whiteknight++ | gsoc_pdd09: : [gsoc_pdd09] adding changes to ensure we null out the various fields of a PMC_EXT, when we allocate a new one, and when we recycle an old one. We might not need both. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28837 r28838 | Whiteknight++ | gsoc_pdd09: : [gsoc_pdd09] Fix handling of Sync* members of PMC_EXT. Free them once we free PMC_EXT items, which I don't think was done before. Add some function-level documentation. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28838 % tetragon has left tetragon!~seneca@gw-312-705.somanetworks.com % apeiron has joined #parrot % tetragon has joined #parrot % apeiron_ has left apeiron_!~apeiron@c-69-248-118-67.hsd1.pa.comcast.net % teknomunk has joined #parrot r28839 | coke++ | trunk: : Update perlcritic.t to use standard Test::Perl::Critic and a standard perlcritic : configuration file instead of our handrolled (and recently broken by updates : to Perl Critic) version. : Resolves RT#56166. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28839 RT 56166: [BUG] [PATCH] Perl::Critic Version Problems - open * DietCoke closes the one ticket he threatened to this weekend and calls it good. msg kid51 I'll review the opnum one tomorrow during my lunch break. Message for kid51 stored. % acalhoon has joined #parrot hello hi, acalhoon. any one here know how to get the perl6 executable to build under openbsd ? % Ademan has joined #parrot i'm having trouble building pbc_to_exe anyone around ? I'm around, but I probably can't help you what problem are you having? what revision are you on? i'm at revision 28838 which i believe is 0.6.3 okay, so exactly up to date (we're at 28839 now) what error message are you getting? oh, ok, fair enough /home/acalhoon/src/parrot/blib/lib/libparrot.a(string_primitives.o)(.text+0x26):src/string_primitives.c:58: undefined reference to `u_isdigit' /home/acalhoon/src/parrot/blib/lib/libparrot.a(string_primitives.o)(.text+0x36):src/string_primitives.c:58: undefined reference to `u_charDigitValue' /home/acalhoon/src/parrot/blib/lib/libparrot.a(string_primitives.o)(.text+0x75a): In function `Parrot_char_digit_value': src/string_primitives.c:313: undefined reference to `u_charDigitValue' /home/acalhoon/src/parrot/blib/lib/libparrot.a(unicode.o)(.text+0x1da): In function `compose': src/charset/unicode.c:274: undefined reference to `unorm_normalize' /home/acalhoon/src/parrot/blib/lib/libparrot.a(unicode.o)(.text+0x252):src/charset/unicode.c:284: undefined reference to `unorm_normalize' ... it's during the build of pbc_to_exe I dont think I can help you, but you should open a ticket somehow I managed to have a version of pbc_to_exe in my local binaries, but faking it out doesn't seem to help should I revert back to a released version to see if I have the problem there? Send an email to parrotbug@parrotcode.org with your system information, the revision number, and the error you have you can try to revert, yes. But definitely send the bug email in so we know there is a problem with the current revision assuming I don't have the problem on the released revision ? that will be nice information to know. Either way, we need to fix it do you know the rev number for the last release? or is switching to tags/RELEASE_*** the preferred method? I don't know the revision number of it, no. Switching to the tag should probably work. sent awesome, thanks acalhoon: wait... you have a pbc_to_exe on your path? maybe an older installed version of Parrot is confusing the newly built one i do I have a local pbc_to_exe too late btw :) so, you suggest pulling the pbc_to_exe out of my path? I suggest uninstalling all the files from the older version of parrot, if possible I don't think the executables will get in the way, but I'm afraid the libraries will. hmmm is there a make uninstall equivalent? I doubt it. the install process is not very well-supported at the moment drat :) which platform are you on? using gcc? openbsd yes no such luck I realize I installed a port of parrot-0.5.0 a while back * Infinoid does a quick build to see how many libs and stuff are generated I just "uninstalled" that and "removed" it still no luck I'll try from scratch have you already submitted a bug, with a build log or somesuch? if not, can you post one via nopaste.snit.ch? I just submitted the build log as part of my bug report ok. I just checked RT, looks like it hasn't come through quite yet if my build from clean fails, I'll post the results to nopaste thanks! sure thing drat "acalhoon" at 74.131.25.177 pasted "make./ perl6 Build Failure" (54 lines) at http://nopaste.snit.ch/13426 I pasted the "relevant" part hope that helps :) looking now what happens if you configure --without-icu ? haven't tried the missing functions are from ICU support. I think maybe we need to link against an additional library to get those on openbsd I see perl Makefile.PL --without-icu ? Configure.pl is the main script, Makefile.PL is a wrapper and I don't know if it mangles its arguments. by the looks of it, it does so, "perl Configure.pl --without-icu" please in progress * acalhoon hesitates to say that it "looks better" "Hello, world" hooray! great! ... any idea which library u_isdigit() is part of, on openbsd? is there a manpage? no manpage at least not for me this is a relatively new install of openbsd % Ademan has left Ademan!~dan@h-67-101-43-171.snfccasy.dynamic.covad.net to be honest, I can't really even suggest where to look :P here on linux there are libicui18n and libicuuc shared libraries, but I'm not sure how the whole ICU thing works. I don't see either of those on pbc_to_exe's linker command line, either. ha go figure aha hang on a minute "acalhoon" at 74.131.25.177 pasted "OpenBSD ICU libs; under /usr/local/lib/icu" (264 lines) at http://nopaste.snit.ch/13427 sorta verbose of me :) but it mentions something to the effect of: ### To link your application with ICU: # 1. use LDFLAGS, CFLAGS, etc from above # 2. link with $(ICULIBS) # 3. optionally, add one or more of: # - $(ICULIBS_I18N) - i18n library, formatting, etc. do you have an icu-config command? yup is it in your PATH? yes hmm. Configure.pl's --help says its supposed to use that automatically, then % icu-config --ldflags -lpthread -lm -L/usr/lib64 -licui18n -licuuc -licudata -lpthread -lm on my machine, libparrot.so is linked with those libraries, and pbc_to_exe is linked against libparrot, so everything works. interesting % Ademan has joined #parrot % tetragon has left tetragon!~seneca@gw-312-705.somanetworks.com % apeiron has left apeiron!~apeiron@c-69-248-118-67.hsd1.pa.comcast.net % apeiron has joined #parrot should i try with --icu-config="path" ? scratch that, I AM trying that it's worth a try, if the version in your PATH is yielding the wrong data and you have another one to try if it still doesn't work, can you cutpaste the failed gcc command line (for linking pbc_to_exe), add `icu-config --ldflags` (with backticks) to that command line, and see if it goes through? sure (it just failed by the way) yup that seems to have worked \o/ ha genius. so, for openbsd, the ICU libraries need to be added to the executable command lines, not just the libparrot line. apparently now ... * Infinoid scratches his head trying to figure out how to do that tell everyone to copy paste :) well, tacking it on the the link portion of tools/dev/pcb_to_exe.pl works (basically the same as copy paste) pbc_to_exe_gen.pl *** looks like it stuffs the results into icushared of icu-config that is yeah, I've got a patch to do basically the same thing, but to pull the cached icushared string from parrot's config icu-config found... good! icuconfig: icu-config icushared='-lpthread -lm -L/usr/local/lib -licuuc -licudata -lpthread -lm' headers='/usr/local/include' Setting Configuration Data: "Infinoid" at 75.37.106.69 pasted "ICU patch for openbsd" (30 lines) at http://nopaste.snit.ch/13428 icu_dir => '/usr/local', ); ha excellent, i'll try it out your's still builds correctly I assume :) yep! and its in a non-windows clause, so I shouldn't have to worry about that whole can of worms * acalhoon has not passed the moment of truth yet looks promising! oh, the suspense. :P wait for it...wait for it..... Hello, world. rm -fr / YAY! that's the ticket alright I wonder how many more of those are missing for OpenBSD :P so you're confirming that it works? I did indeed like magic great. any other issues come up, or does "make" build to completion? I have a working perl6 executable :) [acalhoon]:~/src/parrot% ./perl6 > say "bawk bawk bawk" bawk bawk bawk r28840 | infinoid++ | trunk: : [pbc_to_exe] : * OpenBSD needs ICU libs passed directly on the linker line for executables; : linking libparrot against them isn't sufficient. Fix pbc_to_exe to do this : when it links. : * acalhoon++ for reporting and testing. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28840 yippie I've in some small way contributed to perl6 and open source hah thanks Infinoid karma acalhoon acalhoon has karma of 1 you are well on your way to becoming a parrot hero :) thanks for the report! haha guess I get to kill the RT ticket when it shows up. karma Infinoid infinoid has karma of 180 wow I've got a long way to go :) me too. karma pmichaud pmichaud has karma of 1453 yipes! well thanks again. I'm off to bed. goodnight % acalhoon has left #parrot karma leo leo has karma of 1883 karma dan dan has karma of 230 karma particle particle has karma of 1360 * bacek knows the trick karma c c has karma of 7003 karma bacek bacek has karma of 45 karma moritz moritz has karma of 58 bah... He've got commit bit... karma jjuran jjuran has neutral karma % teknomunk has left teknomunk!~teknomunk@r74-195-239-111.stl1cmta01.stwrok.ok.dh.suddenlink.net karma Whiteknight whiteknight has karma of 130 awesome, tripple digits opbots, trust Whiteknight Ok pmichaud: I need more karma :) What about RT#56214? RT 56214: [PATCH] Implementation of Str.index. - new r28841 | pmichaud++ | trunk: : [rakudo]: : * spectest-progress update: 74 files, 1126 passing tests (0 failing tests) diff: http://www.parrotvm.org/svn/parrot/revision?rev=28841 bacek: (RT56214) * parameters should probably be named "substr" and "pos" instead of "x" and "start" (to match definition in S29) pmichaud: ok. * I'm guessing this belongs in Any instead of Str, so that 1000.index(...) will work it doesn't seem to verify that a start parameter has been provided (i.e., we aren't certain that start gets initialized) I'm not sure what the purpose of "unless $I0 check length" is. er, "unless $I0 goto check_length" % davidfetter has left davidfetter!~davidfett@start.fetter.org slavorg has not been very reliable by itself, so I'm giving it a friend for better redundancy. If anyone objects, feel free to /kick % slavorgn has joined #parrot I think that we should be able to do this with a single 'index' method (that is then placed in global via !EXPORT) purpose of 'unless $I0' in spectest. 5 tests under # Empty strings doesn't Parrots opcode already handle empty strings? I learned about '!EXPORT' after creating this patch :) (index). Seems no. I've added this check after trying spectest. % Whiteknight has left Whiteknight!~nobody@c-71-230-33-251.hsd1.pa.comcast.net parrot throws exception (and I think that it is good approach from parrot's POV) interesting, you're correct about the index op not handling "". I'm a bit surprised. probably need a comment in the code about that. why? It's not-VM-problem. Enforcing particular semantic for language in this case is bad... except that the common semantic is that a null string matches immediately wow... Submit a bug in parrot about inconsistency? no, I just mean in most languages. In C, index("hello world", "") returns 0 in Perl, index("hello world", "") returns 0 in PHP, strpos("hello world", "") returns 0 hmm... none of them decide to return -1 or an indication of any sort of error i.e., all of them consider the empty string to be found at any position in a target string. So, Parrot is the odd-environment-out by choosing to have "" always come back as "not found" ..and other languages can check empty strings for themself. Definetely looks-like-a-bug well, it would be a bug except there's actually a test for it in in t/op/string.t . So it was apparently a deliberate design decision at some point. % Ademan has left Ademan!~dan@h-67-101-40-110.snfccasy.dynamic.covad.net If the string is null, or the substring is not found or is null, B returns "-1". (from parrot docs). TO me that's a bizarre interpretation of index. oh well. pasm_output_is( <<'CODE', '0', '0 length substr' ); set I4, 0 set S4, "JAPH" substr S3, S4, 1, 0 length I4, S3 null sring is not empty string... well, parrot's index opcode is definitely returning -1 if the substring is empty string this is from t/op/string.t. AFAIU this is expecting exception. $ cat x.pir .sub 'main' :main $S0 = "Hello world" $I0 = index $S0, "", 0 say $I0 .end $ ./parrot x.pir -1 -1 $ yak... it kind of weird... that's just really odd. anyway, I guess we're likely stuck with it for now. but I'm wondering who thought it up in the first place. anyway, test for empty string is better done as unless x goto ... instead of $I0 = length x; unless $I0 goto ... (side question) should we separate empty string and undef? e.g. "foo".index(undef) well, undef should throw an exception if used 'use fatal' nad invoke 'fail()'? i.e., "foo".index("") should succeed, while "foo".index(undef) will likely throw an exception. s/nad/and/ also, it looks to me like some of the tests in S29-str/index.t are wrong. for example: is(index("Hello World", "x"), -1, "One char, no match"); why? from S29: If the substring is not found, a bare C containing no position is returned. This prototype C evaluates to false because it's really a kind of undef. Do not evaluate as a number, because instead of returning -1 it will return 0 and issue a warning. got it. anyway, bedtime here. be back in a few hrs probably returning Failure/Undef better then Int pmichaud: g'night well, it should really return StrPos Failure is probably better for the time being, yes. later % Ademan has joined #parrot * bacek thinks that StrPos is actually (Int|Failure)... % Psyche^ has joined #parrot % Patterner has left Patterner!~Psyche@e177227165.adsl.alicedsl.de % Psyche^ is now known as Patterner r28842 | coke++ | trunk: : sane-ifying macro usage slightly. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28842 % Ademan has left Ademan!~dan@h-67-101-40-110.snfccasy.dynamic.covad.net r28843 | coke++ | trunk: : Don't blindly add -w to every process we run. We're trying to add a parrot : warning level that we don't want enabled all the time, so having this : turned on just to use the harness is too verbose. : Any perl we're invoking should already have 'use warnings' in the source : anyway. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28843 r28844 | coke++ | trunk: : Add a new warnings setting to parrot to squawk about deprecated items. : Add a :deprecated flag to the op2c compiler which respects the warnings setting : and issues a warning about any ops so tagged : Add a note to DEPRECATED.pod about this. : This resolves RT#41606. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28844 RT 41606: [TODO] Add flag to do runtime check on deprecated ops - open r28845 | coke++ | trunk: : You would think I'd notice these awkward sentences when doing the preliminary svn diff. : Nope, need to see them in the email, apparently. diff: http://www.parrotvm.org/svn/parrot/revision?rev=28845 % iblechbot has joined #parrot % Ademan has joined #parrot % Ademan has left Ademan!~dan@h-67-101-96-130.snfccasy.dynamic.covad.net