Re: My Parrot 0.7.0 patches (cygwin)
Reini Urban wrote: You want one patch only against HEAD? That's easy. But I dislike the idea, as it violates the usage of single tickets. This is different than the usual case as it's a collection of dependent patches that can't be evaluated independently. Splitting them out is actually more work for the reviewer/tester. I've created a branch cygwin070patches for testing this collection. To do platform or language testing, please check out that branch. Reini, please submit further changes as diffs against that branch instead of updates to your previous patch files. Overall the work is sane. It'll need a few changes before merging in: In runtime/parrot/library/config.pir you add commented-out code, and a mention that certain logic has to be reversed "when installed versions should run faster than source builds". Those sorts of configuration changes should never involve commenting out and uncommenting bits of configuration files. Make it a compile-time or run-time configuration flag instead. In lib/Parrot/Configure/Data.pm, you changed some double C<<>> Pod tags to single C<> Pod tags. But, those code items contain "=>" separating the key/value arguments, and the '>' in the arrow will terminate the code tag. The double C<<>> tags avoid terminating on single '>' (which is why they were double C<<>> tags in the first place). So, I reverted that file before committing. (See the output from 'perldoc' or any Pod parser on your modified file.) In lib/Parrot/Configure/Compiler.pm, I agree that 'CONDITIONED_LINE' and 'INVERSE_CONDITIONED_LINE' aren't the clearest names, but '+' and '-' are far less clear. Change them to something meaningful like 'SHOW_LINE_IF' and 'HIDE_LINE_IF'. We can note the change in DEPRECATED.pod now, and remove 'CONDITIONED_LINE' and 'INVERSE_CONDITIONED_LINE' after a standard deprecation cycle (one release). Also in lib/Parrot/Configure/Compiler.pm, change the Polish notation of "(and a b (not c d))" to a saner "(a and b not (c and d))". Though really, since you're not implementing the advanced conditions, delete the comment defining the interface and the TODO comments about implementing it, just add a TODO RT ticket or keep it on your private TODO list. In config/gen/makefiles/pge.in, config/gen/makefiles/tge.in, and config/gen/makefiles/root.in, pick a more meaningful variable name than 'SHRPENV' and a more meaningful condition name than 'cygchkdll'. Also in config/gen/makefiles/root.in we don't need a makefile target for regenerating the makefile. Delete it. And you added a chunk of commented out code again. Delete it. Since you've touched the config file and core PIR file for every language, this branch will need extensive platform and language testing before it can be merged in. The branch is failing one test that passes in trunk, should be a quick fix: t/codingstd/cuddled_else.t Thanks! Allison
[perl #58308] [PATCH] Implementation fo string_str_rindex and rindex op.
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #58308] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=58308 > Hello. There is almost copy-pasted version of rindex. -- Bacek. commit e23d65f77c2e0963d5647a9ccf585c6484c8323b Author: Vasily Chekalkin <[EMAIL PROTECTED](none)> Date: Sun Aug 24 20:40:35 2008 +1000 Implement op rindex diff --git a/src/ops/ops.num b/src/ops/ops.num index 24e25fb..18329c8 100644 --- a/src/ops/ops.num +++ b/src/ops/ops.num @@ -1224,3 +1224,16 @@ stm_commit_ic 1193 stm_wait_ic1194 stm_abort 1195 stm_depth_i1196 +rindex_i_s_s 1197 +rindex_i_sc_s 1198 +rindex_i_s_sc 1199 +rindex_i_sc_sc 1200 +rindex_i_s_s_i 1201 +rindex_i_sc_s_i1202 +rindex_i_s_sc_i1203 +rindex_i_sc_sc_i 1204 +rindex_i_s_s_ic1205 +rindex_i_sc_s_ic 1206 +rindex_i_s_sc_ic 1207 +rindex_i_sc_sc_ic 1208 + diff --git a/src/ops/string.ops b/src/ops/string.ops index 066186b..bf483cb 100644 --- a/src/ops/string.ops +++ b/src/ops/string.ops @@ -273,6 +273,29 @@ inline op index(out INT, in STR, in STR, in INT) :base_core { } +=item B(out INT, in STR, in STR) + +=item B(out INT, in STR, in STR, in INT) + +The B function searches for a substring within target string, but +without the wildcard-like behavior of a full regular-expression pattern match. +It returns the position of the last occurrence of substring $3 +in target string $2 at or after zero-based position $4. +If $4 is omitted, B starts searching from the beginning of the string. +The return value is based at "0". +If the string is null, or the substring is not found or is null, +B returns "-1". + +=cut + +inline op rindex(out INT, in STR, in STR) :base_core { +$1 = ($2 && $3) ? string_str_rindex(interp, $2, $3, 0) : -1; +} + +inline op rindex(out INT, in STR, in STR, in INT) :base_core { +$1 = ($2 && $3) ? string_str_rindex(interp, $2, $3, $4) : -1; +} + =item B(out STR, in STR, invar PMC) =item B(out PMC, invar PMC, invar PMC) commit bbd7144bee1648f4516d61a98b48177b1370fe78 Author: Vasily Chekalkin <[EMAIL PROTECTED](none)> Date: Sun Aug 24 20:51:41 2008 +1000 Implement rindex diff --git a/languages/perl6/src/builtins/any-str.pir b/languages/perl6/src/builtins/any-str.pir index 77bb24c..84a62c6 100644 --- a/languages/perl6/src/builtins/any-str.pir +++ b/languages/perl6/src/builtins/any-str.pir @@ -21,7 +21,7 @@ the size of that file down and to emphasize their generic, .namespace [] .sub 'onload' :anon :init :load $P0 = get_hll_namespace ['Any'] -'!EXPORT'('chars index substr', 'from'=>$P0) +'!EXPORT'('chars index rindex substr', 'from'=>$P0) .end @@ -75,6 +75,44 @@ the size of that file down and to emphasize their generic, .return ($P0) .end +=item rindex() + +=cut + +.namespace ['Any'] +.sub 'rindex' :method :multi(_) +.param string substring +.param int pos :optional +.param int has_pos :opt_flag +.local pmc retv + +if has_pos goto have_pos +pos = 0 + have_pos: + +.local string s +s = self + + check_substring: +if substring goto substring_search +$I0 = length s +if pos < $I0 goto done +pos = $I0 +goto done + + substring_search: +pos = rindex s, substring, pos +if pos < 0 goto fail + + done: +$P0 = new 'Int' +$P0 = pos +.return ($P0) + + fail: +$P0 = new 'Failure' +.return ($P0) +.end =item substr() =cut
Re: Windows visibility (was: Re: Parrot 0.7.0 "Severe Macaw")
2008/8/23 Allison Randal <[EMAIL PROTECTED]>: > Moritz Lenz wrote: >> >> On #perl6 somebody just asked if there were up-to-date windows builds of >> parrot somewhere, he had googled for 'parrot windows'. The parrotwin32 >> project didn't show up in his search (but it's first for 'parrot win32'). >> >> I think we should improve that situation. Suggestions: >> >> 1) A link on http://www.parrotcode.org/source.html > > Sure. Already done since 2-3 months, see http://www.parrotcode.org/source.html#Packages, but with the word Win32, not Windows. François. > >> 2) A page in the parrot wiki > > Even better, on the new site give it a page like > http://www.parrot.org/windows. > >> 3) maybe even a separate site (parrot-on-windows.org perhaps?) > > It already has a separate site on SourceForge. Adding yet another site would > be more confusing than helpful. > > Allison > >
[perl #57956] [BUG] [PATCH] config/auto/sizes.pm not cleaning up after itself
In a posting to list not in RT, Allison confirmed that 'test_*' files are being cleaned up properly. So this ticket can be resolved.
[perl #57780] [PATCH]: Let --verbose-steps handle multiple steps; name steps in Configure.pl output
No complaints. No smolder test failures. Resolving ticket.
[perl #44315] [TODO] Enable scripting of an entire configuration session
This Smolder report is on the 'newsc' branch. http://smolder.plusthree.com/app/public_projects/report_details/4405
[perl #53976] [PATCH] Remove tools/dev/ops_renum.mak
On Sat May 10 20:22:53 2008, coke wrote: > This make file isn't preprocessed like the standard root.in: it > assumes perl is in your path, and redefines the list of OPSFILES. > > Let's move the step into the core makefile, and add another > --maintainer tweak like the one for lex/yacc - either run the real > command in maintainer mode, or set the command to be 'echo' in > non-maintainer mode. Then we can eliminate this other makefile. > > Feedback welcome. > Coke, I'm going to give this ticket back to you so that if you want to do the above makefile modification, you can. Otherwise, you can simply close the ticket. Thank you very much. kid51
Re: Windows visibility (was: Re: Parrot 0.7.0 "Severe Macaw")
2008/8/23 François Perrad <[EMAIL PROTECTED]>: > 2008/8/23 Allison Randal <[EMAIL PROTECTED]>: >> Moritz Lenz wrote: >>> >>> On #perl6 somebody just asked if there were up-to-date windows builds of >>> parrot somewhere, he had googled for 'parrot windows'. The parrotwin32 >>> project didn't show up in his search (but it's first for 'parrot win32'). >>> >>> I think we should improve that situation. Suggestions: >>> >>> 1) A link on http://www.parrotcode.org/source.html >> >> Sure. > > Already done since 2-3 months, see > http://www.parrotcode.org/source.html#Packages, > but with the word Win32, not Windows. Cygwin is missing there: http://cygwin.com/";>Cygwin -- Reini Urban http://phpwiki.org/ http://murbreak.at/
Re: Windows visibility ([PATCH])
Reini Urban wrote: > 2008/8/23 François Perrad <[EMAIL PROTECTED]>: >> 2008/8/23 Allison Randal <[EMAIL PROTECTED]>: >>> Moritz Lenz wrote: On #perl6 somebody just asked if there were up-to-date windows builds of parrot somewhere, he had googled for 'parrot windows'. The parrotwin32 project didn't show up in his search (but it's first for 'parrot win32'). I think we should improve that situation. Suggestions: 1) A link on http://www.parrotcode.org/source.html >>> >>> Sure. >> >> Already done since 2-3 months, see >> http://www.parrotcode.org/source.html#Packages, >> but with the word Win32, not Windows. > > Cygwin is missing there: > > http://cygwin.com/";>Cygwin Attached patch adds that. -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ Index: source.html === --- source.html (revision 1347) +++ source.html (working copy) @@ -42,6 +42,7 @@ http://alioth.debian.org/projects/pkg-parrot/";>Debian Packages http://sourceforge.net/project/showfiles.php?group_id=211372";>Windows (Win32) + http://cygwin.com/";>Cygwin http://trac.macports.org/browser/trunk/dports/lang/parrot/Portfile";>MacPorts port install parrot
[perl #57884] [PATCH] file_type option for Parrot::Configure::Compiler->genfile
On Sat Aug 23 06:21:57 2008, mmcleric wrote: > > Week is over and release has happened, can this be commited? > I'm asking because I want to get familiar with submitting process and > move on to sending new and more interesting patches :) > Applied in r30521. I'm running coverage analysis to see whether there are any new branches/conditions in lib/Parrot/Configure/Compiler.pm which need testing.
Re: My Parrot 0.7.0 patches (cygwin)
2008/8/24 Allison Randal <[EMAIL PROTECTED]>: > Reini Urban wrote: >> >> You want one patch only against HEAD? That's easy. >> But I dislike the idea, as it violates the usage of single tickets. > > This is different than the usual case as it's a collection of dependent > patches that can't be evaluated independently. Splitting them out is > actually more work for the reviewer/tester. > > I've created a branch cygwin070patches for testing this collection. To do > platform or language testing, please check out that branch. Reini, please > submit further changes as diffs against that branch instead of updates to > your previous patch files. > > Overall the work is sane. It'll need a few changes before merging in: > > In runtime/parrot/library/config.pir you add commented-out code, and a > mention that certain logic has to be reversed "when installed versions > should run faster than source builds". Those sorts of configuration changes > should never involve commenting out and uncommenting bits of configuration > files. Make it a compile-time or run-time configuration flag instead. Just was just an internal TODO comment, and is actually fixed. I will delete the superflous comment. > In lib/Parrot/Configure/Data.pm, you changed some double C<<>> Pod tags to > single C<> Pod tags. But, those code items contain "=>" separating the > key/value arguments, and the '>' in the arrow will terminate the code tag. > The double C<<>> tags avoid terminating on single '>' (which is why they > were double C<<>> tags in the first place). So, I reverted that file before > committing. (See the output from 'perldoc' or any Pod parser on your > modified file.) Thanks. > In lib/Parrot/Configure/Compiler.pm, I agree that 'CONDITIONED_LINE' and > 'INVERSE_CONDITIONED_LINE' aren't the clearest names, but '+' and '-' are > far less clear. Change them to something meaningful like 'SHOW_LINE_IF' and > 'HIDE_LINE_IF'. We can note the change in DEPRECATED.pod now, and remove > 'CONDITIONED_LINE' and 'INVERSE_CONDITIONED_LINE' after a standard > deprecation cycle (one release). #+ and #- are well known common lisp idioms (the most well-known reader-macros), thats why the reverse polish notation in the logic is used. It's just so much easier to parse and understand. > Also in lib/Parrot/Configure/Compiler.pm, change the Polish notation of > "(and a b (not c d))" to a saner "(a and b not (c and d))". This is ALGOL syntax you suggest is really not "sane" :) > Though really, > since you're not implementing the advanced conditions, delete the comment > defining the interface and the TODO comments about implementing it, just add > a TODO RT ticket or keep it on your private TODO list. I'll implement it for sure, but later. First I wanted to bring out the packages and this is just convenience sugar. > In config/gen/makefiles/pge.in, config/gen/makefiles/tge.in, and > config/gen/makefiles/root.in, pick a more meaningful variable name than > 'SHRPENV' and a more meaningful condition name than 'cygchkdll'. SHRPENV is directly from per5, and cygchkdll is they only way to check now for cygwin without the 57548-CONDITIONED_LINE_enh.patch. After that we can check against cygwin, the $^O. I really need some #+(and cygwin win32): sections. > Also in config/gen/makefiles/root.in we don't need a makefile target for > regenerating the makefile. Delete it. And you added a chunk of commented out > code again. Delete it. That was the framework to autodetect configuration changes, to get rid of make clean before perl Configure.pl. I do need to regenerate the makefile, that's why I added it for every makefile. I'll rather add the missing bits to the missings deps, than delete this logic. The commented-out section works in 90%, but has still a flaw somewhere, which could lead to cycles. I'll debug this when I have more time. > Since you've touched the config file and core PIR file for every language, > this branch will need extensive platform and language testing before it can > be merged in. I tested it extensively for the cygwin package. I believe I'm the only one who tested it at all because there were so many errors and still are. And I begin to wonder how others dare to release packages without working installables and with self.build make recipes. deb, gentoo, freebsd, rpm, the win32 build, and now my self-build work, but at least as Makefiles so we will have a standard. Just test-installable is a bit of work TODO. I had to test this by hand so far. > The branch is failing one test that passes in trunk, should be a quick fix: > t/codingstd/cuddled_else.t Thanks for reviewing! -- Reini Urban http://phpwiki.org/ http://murbreak.at/
[perl #57884] [PATCH] file_type option for Parrot::Configure::Compiler->genfile
On Sun Aug 24 09:30:43 2008, [EMAIL PROTECTED] wrote: > I'm running coverage analysis to see whether there > are any new branches/conditions in lib/Parrot/Configure/Compiler.pm > which need testing. I never cease to find coverage analysis rewarding for its ability to enable you to spot dead code. After running Devel::Cover over the configuration and build tools, I noticed that lines 315-317 of lib/Parrot/Configure/Compiler.pm had one-half of the branch and two-thirds of the condition uncovered by the test suite. if ( !exists $options{file_type} && $target =~ m/makefile$/i ) { $options{file_type} = 'makefile'; } These lines were formerly found higher up inside genfile(). The more I stared at them, the more I realized that they now duplicated code at lines 298-301: if ( !exists $options{file_type}) { if ( $target =~ m/makefile$/i ) { $options{file_type} = 'makefile'; } So they could be excised. I further realized that since with makefiles we always want 'replace_slashes' and 'conditioned_lines' to be enabled, we could simplify this: if ( $options{file_type} eq 'makefile' ) { exists $options{replace_slashes} or $options{replace_slashes} = 1; exists $options{conditioned_lines} or $options{conditioned_lines} = 1; } ... to this: if ( $options{file_type} eq 'makefile' ) { $options{replace_slashes} = 1; $options{conditioned_lines} = 1; } ... and in the process eliminate two conditions which were also coming up short in coverage analysis. Changes were committed in r30527. kid51