Re: junctions as indicies

2005-04-18 Thread Rod Adams
Paul Hodges wrote: --- David Christensen <[EMAIL PROTECTED]> wrote: I'm looking in S09, and reading about junctions. It seems to me that if we have a junction $j which we use to index into an array or a hash, it should DWIM and return a junction of the corresponding values. @ar=[1..10]; %hash=(

Re: junctions as indicies

2005-04-18 Thread Luke Palmer
Paul Hodges writes: > Maybe, but I don't like returning junctures in those cases unless you > *explicitly* ask for it. I'd rather the default be the arbitrary lists > returned, or whatever fits the context. How about > > @ar=[a..z]; > %hash=(a=>1,b=>4,c=>7); > > $j=1|2|3; @j = (1,2,3); >

Re: junctions as indicies

2005-04-18 Thread Paul Hodges
--- David Christensen <[EMAIL PROTECTED]> wrote: > I'm looking in S09, and reading about junctions. It seems to me > that if we have a junction $j which we use to index into an array > or a hash, it should DWIM and return a junction of the corresponding > values. > > @ar=[1..10]; > %hash=(a=>1,b

[perl #31148] [TODO] Documentation - out of date

2005-04-18 Thread Will Coleda via RT
This is a uselessly generic TODO that was cribbed from a file in the repository. It's covered by other, more specific documentation todos. If you know of documentation that needs to be added, please open a specific ticket.

RT Cleanup

2005-04-18 Thread William Coleda
There are some potentially crufty tickets out there. Can the relevant experts verify if these can be closed before we get the next release out? Win32: (10 tickets) http://rt.perl.org/rt3/NoAuth/parrot/List.html?Field=Platform&Value=mswin32 http://rt.perl.org/rt3/NoAuth/parrot/List.html?Field=Platf

Re: State of the Tcl [r7876]

2005-04-18 Thread William Coleda
More updates: 1) changed the tclparser PMC to emit actual real_exceptions in several cases; and 2) Added a divide method to TclInt to override the default Integer behavior of promotion to float (This is necesssary because Tcl's floats stringify with ".0", always - so while [expr 6.0 / 2] is "3.0

Re: regular expressions and parrot

2005-04-18 Thread Henrik Gulbrandsen
> On Sun, Apr 17, 2005 at 04:33:57PM +0200, BÁRTHÁZI András wrote: > > Just a short question I'm interested in: where will be, and how will > > work (I just asking for a general description about it) the regular > > expression / rules part of Parrot? On Sun, 2005-04-17 at 09:38 -0500, Patrick R

Re: TestSimple/More/Builder in JavaScript

2005-04-18 Thread David Wheeler
FYI Begin forwarded message: From: Marshall Roch <[EMAIL PROTECTED]> Date: April 18, 2005 5:44:26 PM PDT To: Michael G Schwern <[EMAIL PROTECTED]> Cc: jesse <[EMAIL PROTECTED]>, David Wheeler <[EMAIL PROTECTED]>, Adam Kennedy <[EMAIL PROTECTED]>, "Sean M.Burke" <[EMAIL PROTECTED]>, [EMAIL PROTECT

State of the Tcl [r7870]

2005-04-18 Thread William Coleda
Ok. I was somewhat surprised to hear about the Tcl breakages recently. I expect that Tcl is going to work on all of Parrot's supported OSen. Here are some recent improvements. o fixed the most gratuitous GC errors that Leo diagnosed. o committed a patch so that PGE is built by default (per chip).

statement modifiers for setting variables

2005-04-18 Thread Dave Whipp
The following is legal perl: print "$a $b $c" if ($a,$b,$c)=(1,2,3); This prints "1 2 3", but the definitions obviously aren't scoped to the modified statement. And a C in the modifier is a bit too late. Any reason to [not] add a C statement modifier which restricts the scope of the declaratio

Re: TestSimple/More/Builder in JavaScript

2005-04-18 Thread David Wheeler
On Apr 17, 2005, at 5:05 PM, Michael G Schwern wrote: http://dynapi.sourceforge.net/dynapi/ Perhaps, But then the mail lists are simply hosted by SourceForge. Ick. Sorry, the point was more "drag these guys into this" as they have obviously thought about the problem of includes and library paths.

Re: [FYI] enhanced backtraces

2005-04-18 Thread William Coleda
Cool. Can I co-opt this so I can get tcl-like backtraces when running tcl code? If so, how? =-) Jens Rieks wrote: Hi, the new backtrace code is in. If a parrot program aborts due to an error, a backtrace is shown. Examples: Null PMC access in invoke() current instr.: 'd' pc 149 (t/op/debu

Re: [perl #35018] [PATCH] Recent ASCII changes, Tcl Breakage

2005-04-18 Thread William Coleda
Leopold Toetsch wrote: Will Coleda <[EMAIL PROTECTED]> wrote: The recent conversion to mostly defaulting to ascii has broken Tcl (*again*). ./parrot languages/tcl/tcl.pbc languages/tcl/examples/hello.tcl No, I don't think so. $ ./parrot languages/tcl/tcl.pbc languages/tcl/examples/hello.tcl He

Re: rx/abc$/

2005-04-18 Thread Larry Wall
On Tue, Apr 19, 2005 at 12:02:45AM +0300, Roie Marianer wrote: : But rx:P5// should act like qr//, shouldn't it? Yes. : LW> I suspect we can check after the $ for ), ], |, #, whitespace, or the : LW> terminator, which rules out direct use of $/ inside /.../. : I'll add a flag for that in rx:P5. I

Re: junction adverb: :except

2005-04-18 Thread Luke Palmer
David Christensen writes: > Hypothetical here: > > If we want to calculate a set of values for a junction which map nicely > to a range with a few outliers, would it be possibly to have a > qualifier :except which allows us to make exceptions to our given > range? I.e., > > (Ignore for the mo

junction adverb: :except

2005-04-18 Thread David Christensen
Hypothetical here: If we want to calculate a set of values for a junction which map nicely to a range with a few outliers, would it be possibly to have a qualifier :except which allows us to make exceptions to our given range? I.e., (Ignore for the moment the inefficiency of the choice of this

Re: Context of hash slices; quotation adverbs

2005-04-18 Thread Larry Wall
On Mon, Apr 18, 2005 at 06:44:55PM -0400, Kurt Hutchinson wrote: : On Mon, Apr 18, 2005 at 11:23:34PM +0300, Roie Marianer wrote: : > That makes sense, but that would make : > %num_of_lines = @file : > not DWIM... of course that would translate into : > %num_of_lines = scalar @file : > so maybe t

Re: junctions as indicies

2005-04-18 Thread Luke Palmer
David Christensen writes: > I'm looking in S09, and reading about junctions. It seems to me that > if we have a junction $j which we use to index into an array or a hash, > it should DWIM and return a junction of the corresponding values. > > @ar=[1..10]; > %hash=(a=>1,b=>4,c=>7); > > $j=1|2|3

junctions as indicies

2005-04-18 Thread David Christensen
I'm looking in S09, and reading about junctions. It seems to me that if we have a junction $j which we use to index into an array or a hash, it should DWIM and return a junction of the corresponding values. @ar=[1..10]; %hash=(a=>1,b=>4,c=>7); $j=1|2|3; $k="a"|"c"; $u = @ar[$j]; # 2|3|4 $

Re: Context of hash slices; quotation adverbs

2005-04-18 Thread Kurt Hutchinson
On Mon, Apr 18, 2005 at 11:23:34PM +0300, Roie Marianer wrote: > That makes sense, but that would make > %num_of_lines = @file > not DWIM... of course that would translate into > %num_of_lines = scalar @file > so maybe that's OK. In order to promote proper syntactical thinking, note that this is

Re: rx/abc$/

2005-04-18 Thread Roie Marianer
LW = Larry Wall AT = Autrijus Tang LW> I think I have to clarify what I mean by that last phrase. Trailing LW> delimiters are hidden inside any token that has already been started, LW> but not at the start of a token (where token is taken to be fairly LW> restrictive). AT> Consider this: AT> AT>

Re: Context of hash slices; quotation adverbs

2005-04-18 Thread Larry Wall
On Mon, Apr 18, 2005 at 11:23:34PM +0300, Roie Marianer wrote: : > : But when you start interpolating, you get into a big mess: : > : h<\qq[$interpolated]> = want(); # ??? : > : h<<$foo>> = want(); # ??? : > : > I think that, as with functions called in unknown context, we should : > just force t

Re: Context of hash slices; quotation adverbs

2005-04-18 Thread Roie Marianer
> : But when you start interpolating, you get into a big mess: > : h<\qq[$interpolated]> = want(); # ??? > : h<<$foo>> = want(); # ??? > > I think that, as with functions called in unknown context, we should > just force the RHS here to list context, and rely on the RHS to add > extra context as

Re: [RFC] .local, .syn, etc.

2005-04-18 Thread MrJoltCola
At 04:52 PM 4/18/2005, chromatic wrote: On Mon, 2005-04-18 at 14:44 +0200, Leopold Toetsch wrote: > Yep. As a first step, I'd redefine this to be C<.label>: > >.macro SpinForever (Count) > .label $LOOP: dec .COUNT# ".label $LOOP" defines a local label. >branch .$LOO

Re: Module and package version numbering

2005-04-18 Thread Michael G Schwern
On Mon, Apr 18, 2005 at 02:00:23PM -0700, David Wheeler wrote: > On Apr 18, 2005, at 12:50 PM, Adrian Howard wrote: > >Personally I prefer separate version numbers per-module, but some > >people don't. I've yet to read anything /really/ convincing for either > >side - so I'd do whatever you're

Re: Module and package version numbering

2005-04-18 Thread David Wheeler
On Apr 18, 2005, at 12:50 PM, Adrian Howard wrote: Personally I prefer separate version numbers per-module, but some people don't. I've yet to read anything /really/ convincing for either side - so I'd do whatever you're comfortable with myself. I used to do it per-module, but then I kept forge

Re: [RFC] .local, .syn, etc.

2005-04-18 Thread chromatic
On Mon, 2005-04-18 at 14:44 +0200, Leopold Toetsch wrote: > Yep. As a first step, I'd redefine this to be C<.label>: > >.macro SpinForever (Count) > .label $LOOP: dec .COUNT# ".label $LOOP" defines a local label. >branch .$LOOP # Jump to said label. >.endm Ca

Re: Module and package version numbering

2005-04-18 Thread Rafael Garcia-Suarez
Michael G Schwern wrote in perl.qa : > On Mon, Apr 18, 2005 at 05:03:42PM +0100, David Cantrell wrote: >> 1) Am I correct to seperate the package version (1.3004) from the A small correction -- 1.3004 would be the distribution version, (not mentioned as $...::VERSION in any package).

alarm() and later()

2005-04-18 Thread Gaal Yahas
Two things popped up while implementing a demo version of alarm() today. 1. In perl5 and in most underlying libraries, alarm() has 1 second granularity (and a possible 1 second error on top of that). Can we have the alarm builtin not assume the worst, and take a Num instead of an Int, so that on s

Re: Module and package version numbering

2005-04-18 Thread Adrian Howard
On 18 Apr 2005, at 17:03, David Cantrell wrote: [snip] Number::Phone::UK::Data - no version, this is where the .0004 comes from though. It has no version number because the entire file is generated from a *really* dumb

Re: Module and package version numbering

2005-04-18 Thread Michael G Schwern
On Mon, Apr 18, 2005 at 05:03:42PM +0100, David Cantrell wrote: > 1) Am I correct to seperate the package version (1.3004) from the > versions of the several modules contained therein - and if not, where > should the package version number come from? and There is no correct here. As long as eac

Re: rx/abc$/

2005-04-18 Thread Larry Wall
On Tue, Apr 19, 2005 at 01:31:12AM +0800, Autrijus Tang wrote: : On Sat, Apr 16, 2005 at 12:10:48PM -0700, Larry Wall wrote: : > I think I have to clarify what I mean by that last phrase. Trailing : > delimiters are hidden inside any token that has already been started, : > but not at the start of

rx/abc$/

2005-04-18 Thread Autrijus Tang
On Sat, Apr 16, 2005 at 12:10:48PM -0700, Larry Wall wrote: > I think I have to clarify what I mean by that last phrase. Trailing > delimiters are hidden inside any token that has already been started, > but not at the start of a token (where token is taken to be fairly > restrictive). Therefore

Re: Kwalitee and has_test_*

2005-04-18 Thread Adrian Howard
On 17 Apr 2005, at 13:47, David A. Golden wrote: [snip] 2) A metric to estimate the quality of a distribution for authors to compare their work against a subjective standard in the hopes that authors strive to improve their Kwalitee scores. In this model, faking Kwalitee is irrelevant, because

[FYI] enhanced backtraces

2005-04-18 Thread Jens Rieks
Hi, the new backtrace code is in. If a parrot program aborts due to an error, a backtrace is shown. Examples: Null PMC access in invoke() current instr.: 'd' pc 149 (t/op/debuginfo_4.imc:24) called from Sub 'c' pc 116 (t/op/debuginfo_4.imc:18) called from Sub 'b' pc 85 (t/op/debuginfo_4.im

Module and package version numbering

2005-04-18 Thread David Cantrell
My apologies if this is the wrong place to ask, but it seems like the least-worst option of all the perlish lists I'm on :-) I'm not sure if I'm using version numbers properly. For example, I recently released a package Number-Phone-1.3004 to the CPAN. That number comes because it contains th

Re: [RFC] .local, .syn, etc.

2005-04-18 Thread Leopold Toetsch
William Coleda <[EMAIL PROTECTED]> wrote: > Macros support labels, defined using B<.local>, that are local to a > given macro expansion. The syntax looks something like this: > .macro SpinForever (Count) > .local $LOOP: dec .COUNT# ".local $LOOP" defines a local label. >

Re: Kwalitee and has_test_*

2005-04-18 Thread Adrian Howard
On 17 Apr 2005, at 11:09, Tony Bowden wrote: On Sun, Apr 17, 2005 at 08:24:01AM +, Smylers wrote: Negative quality for anybody who includes a literal tab character anywhere in the distro's source! Negative quality for anyone whose files appear to have been edited in emacs! Ow! Coffee snorted do

Re: CGI.pm url_encoding problem

2005-04-18 Thread Mark A. Biggar
BÁRTHÁZI András wrote: Randal, BÁRTHÁZI> use CGI; BÁRTHÁZI> set_url_encoding('utf-8'); BÁRTHÁZI> The problem is that "use CGI" automagically initializes the parameters BÁRTHÁZI> *before* I set the encoding of them, so set_url_encoding will run too BÁRTHÁZI> late. Did I miss the memo where anythi

Re: CGI.pm url_encoding problem

2005-04-18 Thread Randal L. Schwartz
> "BÁRTHÁZI" == BÁRTHÁZI András <[EMAIL PROTECTED]> writes: >> Did I miss the memo where anything outside the list of valid >> URI characters needed to be hexified, hence there's no need >> for such a URL encoding scheme? Where is this memo? BÁRTHÁZI> Can you write it again with other words?

Re: CGI.pm url_encoding problem

2005-04-18 Thread =?ISO-8859-1?Q?B=C1RTH=C1ZI_Andr=E1s?=
Hi, I believe that the standard for URL's calls for always encoding in utf-8 but that all non-ascii bytes (bytes with the high bit set) are to be further encoded using %xx hex notation. So the URL is always transmitted as an ascii string, but is easily converted into a utf-8 string simply by c

Re: CGI.pm url_encoding problem

2005-04-18 Thread =?ISO-8859-1?Q?B=C1RTH=C1ZI_Andr=E1s?=
Hi, Randal L. Schwartz wrote: "BÁRTHÁZI" == BÁRTHÁZI András <[EMAIL PROTECTED]> writes: Did I miss the memo where anything outside the list of valid URI characters needed to be hexified, hence there's no need for such a URL encoding scheme? Where is this memo? BÁRTHÁZI> Can you write it again wi

Re: Push and Pop on Infinite lists

2005-04-18 Thread Larry Wall
On Sun, Apr 17, 2005 at 11:33:45PM -0400, Stevan Little wrote: : I am working on edge cases and error cases for some of the t/builtin/ : tests. : : I know its a silly thing to do, but how should push and pop behave with : (0 .. Inf) lists? : : I read through this thread: : http://www.mail

Re: CGI.pm url_encoding problem

2005-04-18 Thread =?ISO-8859-1?Q?B=C1RTH=C1ZI_Andr=E1s?=
Randal, BÁRTHÁZI> use CGI; BÁRTHÁZI> set_url_encoding('utf-8'); BÁRTHÁZI> The problem is that "use CGI" automagically initializes the parameters BÁRTHÁZI> *before* I set the encoding of them, so set_url_encoding will run too BÁRTHÁZI> late. Did I miss the memo where anything outside the list of val

Re: PugsBugs: Weird behavior of shift

2005-04-18 Thread Larry Wall
On Mon, Apr 18, 2005 at 12:08:36AM -0400, Stevan Little wrote: : These examples: : : pugs -e 'say shift [1, 2, 3].shift' : pugs -e 'say shift([1, 2, 3].shift)' : pugs -e 'say shift([1, 2, 3]).shift' : : do not ever return, but yet does not seem to chew up the CPU either. I don'

Re: Hyper operator corner case?

2005-04-18 Thread =?UTF-8?B?VGhvbWFzIFNhbmRsYcOf?=
Roger Hale wrote: One set of cases that doesn't seem to have come up in discussion: (1, 3, 2) >>-<< (83, 84, 81, 80, 85) Should this give (-82, -81, -79, -80, -85) From an arithmetic point of view it should be exactly that. The implementation might need to morph the code though, see below.

Re: patch for t/operators/hyper.t

2005-04-18 Thread Nicholas Clark
On Sun, Apr 17, 2005 at 10:11:47AM -0500, David Christensen wrote: > Enclosed is a patch for t/operators/hyper.t to test for some corner > cases with list extension. Let me know if the unicode ">>" are coming > through correctly; I am not seeing them as such in my email. Your mailer claims that

Re: CGI.pm url_encoding problem

2005-04-18 Thread Randal L. Schwartz
> "BÁRTHÁZI" == BÁRTHÁZI András <[EMAIL PROTECTED]> writes: BÁRTHÁZI> use CGI; BÁRTHÁZI> set_url_encoding('utf-8'); BÁRTHÁZI> The problem is that "use CGI" automagically initializes the parameters BÁRTHÁZI> *before* I set the encoding of them, so set_url_encoding will run too BÁRTHÁZI> late.

Re: CGI.pm url_encoding problem

2005-04-18 Thread =?ISO-8859-1?Q?B=C1RTH=C1ZI_Andr=E1s?=
Stevan, Well once we have a proper "use", we should be able to set the encoding at compile time. But until then, I see a few possible options: I think, it would be nice to find another solution. - setting the url encoding forces a re-encoding of any parameters already encoded. This means extra w

Re: CGI.pm url_encoding problem

2005-04-18 Thread Stevan Little
Andras, Well once we have a proper "use", we should be able to set the encoding at compile time. But until then, I see a few possible options: - setting the url encoding forces a re-encoding of any parameters already encoded. This means extra work if you change the encoding, but it will only h

Re: MMD roundup 2 - TODO and design items

2005-04-18 Thread Leopold Toetsch
Leopold Toetsch <[EMAIL PROTECTED]> wrote: > 5) new opcodes that return a new result: > Px = n_add Py, Pz # new Px created > These opcodes will be done RSN. RSN is now. There is one basic test in t/pmc/integer.t. Overloading is tested in mmd.t. More tests are welcome for other PMCs. Cav

[BUG] "cd" issue in main Makefile

2005-04-18 Thread Jonathan Worthington
Hi, I've tracked down a Win32 build problem that I reported on IRC on Friday, but I'm not sure how to fix makefile generation so this doesn't happen. Hopefully someone with more knowledge/time can. :-) In the main makefile we have things like this:- subdirs :: $(NOECHO) cd ext\CGI $(MAKE)

MMD roundup 2 - TODO and design items

2005-04-18 Thread Leopold Toetsch
Below is some stuff, which I'm unsure of how it should be implemented eventually. Input is highly welcome. Thanks, leo TODO items and design issues 1) bitwise or, and, xor We currently have two distinct sets of opcodes and MMD functions for numeric (i.e. integer) and string bitwise functionalit

MMD roundup 1 - current state

2005-04-18 Thread Leopold Toetsch
Below inline/attached describes what's done until now. leo According to the proposed changes described in Subject: [PROPOSAL] infix MMD operators Subject: Again the infix ops the following is done: 1) Arithmetic infix opcodes add, sub, mul, div, fdiv, mod, cmod, pow are converted to use t

CGI.pm url_encoding problem

2005-04-18 Thread =?ISO-8859-2?Q?B=C1RTH=C1ZI_Andr=E1s?=
Hi! This is the code: use CGI; set_url_encoding('utf-8'); The problem is that "use CGI" automagically initializes the parameters *before* I set the encoding of them, so set_url_encoding will run too late. Any idea? Bye, Andras

Re: Kwalitee and has_test_*

2005-04-18 Thread David Cantrell
Michael Graham wrote: If someone were to take over maintenance of your module, or they were to fork it, or they were submitting patches to you, then they would want these tools and tests, right? How would they get them? By asking for them? It is my experience that when someone takes over maintenan

Re: [perl #35018] [PATCH] Recent ASCII changes, Tcl Breakage

2005-04-18 Thread Leopold Toetsch
Will Coleda <[EMAIL PROTECTED]> wrote: > The recent conversion to mostly defaulting to ascii has broken Tcl (*again*). > ./parrot languages/tcl/tcl.pbc languages/tcl/examples/hello.tcl No, I don't think so. $ ./parrot languages/tcl/tcl.pbc languages/tcl/examples/hello.tcl Hello World $ ./parr

Re: [perl #35016] [BUG] t/pmc/timer.t

2005-04-18 Thread Leopold Toetsch
Will Coleda <[EMAIL PROTECTED]> wrote: > t/pmc/timerNOK 7# Looks like you failed 1 tests of 8. Could it be that system load was too high when the test was run, so that it didn't finish in one second? leo

Re: [RFC] some doubtable MMDs?

2005-04-18 Thread Leopold Toetsch
Larry Wall <[EMAIL PROTECTED]> wrote: > On Sun, Apr 17, 2005 at 09:50:28AM +0200, Leopold Toetsch wrote: >: Larry Wall <[EMAIL PROTECTED]> wrote: >: > Is there a bitarray lookup by native int? >: >: Yes. All array lookups support a native int index. > Good, good. Speaking of bitarrays (uint1 in t

Re: Hyper-slices?

2005-04-18 Thread Rod Adams
David Christensen wrote: I definitely like the hyper stuff how it is; maybe the answer is to just define an infix:<[[]]> operator which returns the crosswise slice of a nested list of lists. In any case it could be shunted aside to some package and certainly does not need to be in core. Didn't