Re: rethinking printf

2002-03-06 Thread Bart Lateur
On Wed, 6 Mar 2002 17:57:07 -0500, Uri Guttman wrote: >how often will you need to interpolate a hash? A whole hash: quite rarely. A hash item: a LOT. Don't forget that $foo{BAR} will now become %foo{BAR} -- Bart.

Re: 123_456

2002-01-26 Thread Bart Lateur
On Fri, 25 Jan 2002 17:34:12 +, Simon Cozens wrote: >Should we be allowed to use _ to group numbers, now that _ is concat? >If not _, then what? (if anything?) I don't really understand your question. Currently, "." is used for concat and that doesn't inhibit using it in a number, does it? O

Re: Apoc4: The loop keyword

2002-01-25 Thread Bart Lateur
On Mon, 21 Jan 2002 15:43:07 -0500, Damian Conway wrote: >What we're cleaning up is the ickiness of having things declared outside >the braces be lexical to the braces. *That's* hard to explain to beginners. But it's handy. And that was, until now, what mattered with Perl. -- Bart.

Re: Apoc 4?

2002-01-19 Thread Bart Lateur
On Fri, 18 Jan 2002 12:33:48 -0500, Will Coleda wrote: >http://www.perl.com/pub/a/2002/01/15/apo4.html > >David Whipp wrote: >> >> Michael G Schwern wrote: >> >> > Reading this in Apoc 4 ... >> >> I looked on http://dev.perl.org/perl6/apocalypse/: no sign of Apoc4. Where >> do I find this late

Re: [PATCH] The Code Police [1/

2001-12-30 Thread Bart Lateur
On Sun, 30 Dec 2001 16:11:35 -0800 (PST), Boris Tschirschwitz wrote: >Yeah, > >int *num; > >is customary in C, but for some reason C++ people like to write > >int* num; > >I am sure I saw some rationale for that in gcc's C++ part, but I can't >find it anymore. Apparently C programmers do not fall

Re: Apropos of nothing...

2001-12-13 Thread Bart Lateur
On Thu, 13 Dec 2001 12:17:44 -0500, Mark J. Reed wrote: > @i = (0); > @ary[@i] = foo(); > >How could one get that behavior without the intermediate array? Parens, likely. (@ary[0]) = foo(); -- Bart.

Re: Moving string -> number conversions to string libs

2001-12-06 Thread Bart Lateur
On Thu, 06 Dec 2001 00:16:34 GMT, Tom Hughes wrote: >So far I have added as is_digit() call to the character type layer >to replace the existing isdigit() calls. There seems to be an overlap with the /\d/ character class in regexes. Can't you use the same test? Can't you use the definition of th

Re: Parrot FAQ

2001-12-05 Thread Bart Lateur
On Wed, 05 Dec 2001 13:32:32 -0500, Dan Sugalski wrote: >Right, but FORTH's not an interpreted language, generally speaking. The old FORTH's in the 80's worked pretty much like the p-copde interpreter. Nowadays, FORTH compilers are really optimizing compilers. There are excellent commercial off

Re: Parrot FAQ

2001-12-05 Thread Bart Lateur
On Tue, 04 Dec 2001 15:57:56 -0500, Dan Sugalski wrote: >Q: Don't you know that stack machines are the way to go in software? >A: No, in fact, I don't. > >Q: But look at all the successful stack-based VMs! >A: Like what? There's just the JVM. > >Q: What about all the others? >A: *What* others? Th

Re: Benchmarking the proposed RE engine

2001-11-26 Thread Bart Lateur
On Sun, 25 Nov 2001 19:34:15 -0800, Brent Dax wrote: >Perl 5's REs will always appear faster because Perl 5 has an >intelligent, optimizing regex compiler. For example, take the following >simple regex: > > /a+bc+/ > >pregcomp will optimize that by searching for a 'b' and working outwards

Re: PMC Classes Preprocessor

2001-11-25 Thread Bart Lateur
On Sun, 25 Nov 2001 13:14:22 +, Simon Cozens wrote: >On Sun, Nov 25, 2001 at 02:32:34AM -0500, Angel Faus wrote: >> use Text::Balanced 'extract_bracketed'; > >Urgh. We need to work around this. Can somebody fill me in exactly how this is supposed to behave? I think that this may come close

Re: sizeof(INTVAL), sizeof(void*), sizeof(opcode_t)

2001-11-23 Thread Bart Lateur
On Wed, 21 Nov 2001 13:46:09 -0500, Dan Sugalski wrote: >Nah, using an I register as a host-machine-address for jumps doesn't argue >for sizeof(INTVAL) >= sizeof(void *). Instead, it argues that the design >that uses an int as an absolute address is wrong. > >I'm going to rewrite the docs and o

Re: Perl 6 - Cheerleaders?

2001-10-26 Thread Bart Lateur
On Thu, 25 Oct 2001 16:53:46 -0500, Garrett Goebel wrote: >Piers Cawley has written a nice article entitled: "Perl 6 : Not Just For >Damians". >http://www.perl.com/pub/a/2001/10/23/damians.html I just hope that you don't really have to insert that many blank lines in your code just to make it c

Re: Revamping the build system

2001-10-23 Thread Bart Lateur
On Tue, 23 Oct 2001 08:39:29 -0400, John Siracusa wrote: >As one of the few rabid Mac users on this list, let me just say that I >personally have no problem with classic Mac OS support being totally dropped >from Parrot if it'll get stuff out the door sooner :) Classic Mac OS is >(somewhat sadly

Re: Math functions? (Particularly transcendental ones)

2001-09-11 Thread Bart Lateur
On Mon, 10 Sep 2001 18:48:01 -0400, Dan Sugalski wrote: >At 12:35 AM 9/11/2001 +0200, Bart Lateur wrote: >>On Mon, 10 Sep 2001 17:13:44 -0400, Dan Sugalski wrote: >> >> >Who the heck is going to override arctangent? (No, don't tell me, I don't >> &

Re: Math functions? (Particularly transcendental ones)

2001-09-10 Thread Bart Lateur
On Mon, 10 Sep 2001 17:13:44 -0400, Dan Sugalski wrote: >Who the heck is going to override arctangent? (No, don't tell me, I don't >want to know) Perhaps you do. Think BigFloat. Or Complex. -- Bart.

Re: Math functions? (Particularly transcendental ones)

2001-09-09 Thread Bart Lateur
On Sat, 08 Sep 2001 13:02:04 -0400, Dan Sugalski wrote: >>Uri mentioned exp(x) = e^x, but I think if you are going to include >>log2, log10, log, etc, you should also include ln. > >Added. Er... aren't ln and log synonyms? -- Bart.

Re: What's up with %MY?

2001-09-06 Thread Bart Lateur
On Tue, 04 Sep 2001 18:38:20 -0400, Dan Sugalski wrote: >At 09:20 AM 9/5/2001 +1100, Damian Conway wrote: >>The main uses are (surprise): >> >> * introducing lexically scoped subroutines into a caller's scope > >I knew there was something bugging me about this. > >Allowing lexically scope

Re: Should MY:: be a real symbol table?

2001-09-06 Thread Bart Lateur
On Mon, 03 Sep 2001 19:30:33 -0400, Dan Sugalski wrote: >The less real question, "Should pads be hashes or arrays", can be answered >by "whichever is ultimately cheaper". My bet is we'll probably keep the >array structure with embedded names, and do a linear search for those rare >times you're

Re: Should MY:: be a real symbol table?

2001-09-06 Thread Bart Lateur
On Mon, 03 Sep 2001 19:29:09 -0400, Ken Fox wrote: >> *How* are they "fundamentally different"? > >Perl's "local" variables are dynamically scoped. This means that >they are *globally visible* -- you never know where the actual >variable you're using came from. If you set a "local" variable, >all

Re: !< and !>

2001-09-02 Thread Bart Lateur
On 01 Sep 2001 14:40:40 -0700, Russ Allbery wrote: >Sterin, Ilya <[EMAIL PROTECTED]> writes: >>> From: Russ Allbery [mailto:[EMAIL PROTECTED]] > >>> How is !< different from >=? ... >It's the same number of characters. How can it be more convenient? Why is it ">=" and not "=>"? Why "=<" and no

Re: Come and get me, Schwern

2001-08-30 Thread Bart Lateur
On Wed, 29 Aug 2001 16:26:59 -0500, David L. Nicol wrote: >Bill J. Programmer publishes a class foo that is guaranteed to correctly >blarg the frobniz, someone subclasses it and breaks the blarg function, >that simply will not do! > >With a "final" it is no longer possible for the new class to id

Re: Something to hash out

2001-08-27 Thread Bart Lateur
On Sat, 25 Aug 2001 18:58:50 +0100, Simon Cozens wrote: >I was using .pas and .pac. Gotta think about 8.3ness, unfortunately. The "8" might not be that relevant nowadays, but the "3" still matters. On Win32, file extensions get cut off after 3 characters. So a ".html" file is actually the same a

Re: new syntax idea: eval "..."o;

2001-08-07 Thread Bart Lateur
On Tue, 7 Aug 2001 09:27:43 -0400, John Porter wrote: >David L. Nicol wrote: >> eval ${code}o; > >Another brilliant idea from David Nicol! Not really. What I would like is an option to just *compile* a piece of perl code, without executing it. This kinda works: $coderef = eval "su

Re: Draft assembly PDD

2001-08-07 Thread Bart Lateur
On Mon, 06 Aug 2001 21:55:07 -0400, Dan Sugalski wrote: >>But I do not agree that calculated jumps should be done in such a hard >>way. > >Nothing hard about it, really. I was referring to Hong Zhang's proposal, not yours. -- Bart.

Re: Draft assembly PDD

2001-08-06 Thread Bart Lateur
On Mon, 6 Aug 2001 15:41:59 -0700 , Hong Zhang wrote: >>Branches should work from >> both constants and registers. > >Even so, the "branch #num" should have better performance, and >it is part of any machine language. Since we already have jump >instruction, do we really need the "branch %r", w

Re: Modules, Versioning, and Beyond

2001-07-30 Thread Bart Lateur
On Tue, 31 Jul 2001 07:24:45 +0200, Bart Lateur wrote: >For example, with simple file names, it's impossible to run a perl 5.005 >and a perl 5.6 both using XML::Parser, at the same time. It's also impossible, on Win32, to use XML::Parser and (an XS version of) HTML::Parser

Re: Modules, Versioning, and Beyond

2001-07-30 Thread Bart Lateur
On Mon, 30 Jul 2001 22:32:54 -0400 (EDT), Sam Tregar wrote: >On Mon, 30 Jul 2001, Dan Sugalski wrote: > >> When you actually use a module, the simple name (like IO) will be >> internally expanded out to the three value thing. So if you have two >> modules that each use a different version of the

Re: if then else otherwise ...

2001-07-30 Thread Bart Lateur
On Sun, 29 Jul 2001 19:36:43 -0400, Bryan C. Warnock wrote: >$x = ($default,$a,$b)[$b<=>$a]; # Much like I did before Note that $x = cond? a : b does lazy evaluation, i.e. the value for a or for b is only fetched when it's actually needed. In your construct, they're all fetched anyway

Re: if then else otherwise ...

2001-07-29 Thread Bart Lateur
On Sun, 29 Jul 2001 18:08:00 +0300, raptor wrote: >But at least the second shortcut is worth it, i think : >> >>cond ? then : else : otherwise > >This has a vague smell of Fortran. > >]- I don't know Fortran sorry :") Then check this out.

Re: if then else otherwise ...

2001-07-29 Thread Bart Lateur
On Sun, 29 Jul 2001 14:22:23 +0300, raptor wrote: >But at least the second shortcut is worth it, i think : > >cond ? then : else : otherwise This has a vague smell of Fortran. -- Bart.

Re: as long as we are discussing 'nice to have's...

2001-07-24 Thread Bart Lateur
On Sat, 21 Jul 2001 14:47:43 -0700 (PDT), Dave Storrs wrote: >I discovered today that I had forgotten to put 'use strict' at the top of >one of my modules...it was in the script that _used_ the module, but not >in the module itself. Putting it in instantly caught several annoying >bugs that I'd

Re: aliasing - was:[nice2haveit]

2001-07-18 Thread Bart Lateur
On Wed, 18 Jul 2001 09:00:25 -0400, John Porter wrote: >> Does such a thing exist already? > >A WTDI exists already: > >for ( $XL->{Application}->{ActiveSheet} ) { > $_->cells(1,1) = "Title"; > $_->language() = "English"; >} > >(presuming lvalue-methods, of course...) So, in th

Re: nice2haveit

2001-07-14 Thread Bart Lateur
On Fri, 13 Jul 2001 20:55:07 +1000 (EST), Damian Conway wrote: >Would you like to clarify what you mean here. >Are you talking about typeglob assignments? >Perl 6 will have: > > $Foo::{'$bar'} = \$baz; # Alias $Foo::bar to $baz Are we back to "globals only"? What about lexical alia

Re: precision belongs in bigfloats, nowhere else.

2001-07-14 Thread Bart Lateur
On Thu, 12 Jul 2001 18:09:07 -0400, Dan Sugalski wrote: >Precision is a useful thing with bigfloats so something like 1/3 doesn't >chew up all your available memory. 1/3 would better be represented as a ratio, 1 over 3. We've been here before, haven't we? Ratio's, or whatever you'd want to

Re: Multiple classifications of an object

2001-06-28 Thread Bart Lateur
On Wed, 27 Jun 2001 13:48:38 -0400, Dan Sugalski wrote: >And the current @ISA stuff is MI, >albeit on a per-class basis rather than on a per-object one. > >Anyway, as Damian mentioned, setting the .ISA property is a perfectly >reasonable sort of thing to do if the language supports this. Just

Re: The internal string API

2001-06-28 Thread Bart Lateur
On Tue, 19 Jun 2001 14:51:43 -0500, Jarkko Hietaniemi wrote: >But a locale is a collection of user preferences. How I want >my dates to be formatted, how I want my strings to be sorted. That's not right. If I do a text conversion from Windows to Mac, I would want to source to use the CP-1522 lo

Re: ~ for concat / negation (Re: The Perl 6 Emulator)

2001-06-21 Thread Bart Lateur
On Thu, 21 Jun 2001 23:49:21 +0100, Simon Cozens wrote: >> > Does anyone else see a problem with =~ ? > >Does anyone else see a problem with "$negated=~$scalar;" ? :) You forgot the space between the "=" and the "~". And yes, that is a bit of a problem. -- Bart.

Re: The internal string API

2001-06-20 Thread Bart Lateur
On Tue, 19 Jun 2001 11:53:28 -0700, Hong Zhang wrote: >> * Do a substr operation by character and glyph > >The byte based is more useful. I have utf-8, and I want to substr it >to another utf-8. It is painful to convert it or linear search for >charaacter >position. I tend to agree. I currently

Re: More character matching bits

2001-06-15 Thread Bart Lateur
On Fri, 15 Jun 2001 06:52:32 -0400, Bryan C. Warnock wrote: >On a side note (and this *will* sound stupid, but there is a reason I'm >asking). Why is there no logical opposite to '.'; that is, a character >which never matches another character? (Besides, of course, that it's >utterly useless

Re: More character matching bits

2001-06-14 Thread Bart Lateur
On Wed, 13 Jun 2001 13:39:16 -0400, Dan Sugalski wrote: >> > Something that should be part of the core? I'll leave >> >that for you to decide. >> >>Most definitely NOT. > >Most definitely sort of. > >>There is no reason to put fucntionality for free matching of Japanese >>characters into the basi

Re: More character matching bits

2001-06-13 Thread Bart Lateur
On Wed, 13 Jun 2001 01:22:32 +0100, Simon Cozens wrote: > Something that should be part of the core? I'll leave >that for you to decide. Most definitely NOT. There is no reason to put fucntionality for free matching of Japanese characters into the basic perl executable. There were already voice

Re: should vtables be vtables?

2001-06-13 Thread Bart Lateur
On Wed, 13 Jun 2001 12:00:21 +0100 (BST), Dave Mitchell wrote: >I was thinking back to the earlier discusions on opcode dispatch, >and the fact that some people thought that a big switch was as good as, >or possibly faster than a dispatch table. Which led me to think... I would think that a swit

Re: Should the op dispatch loop decode?

2001-06-13 Thread Bart Lateur
On Tue, 12 Jun 2001 18:12:35 -0400, Dan Sugalski wrote: >'Kay, here's a question to ponder. Should the op dispatch loop handle >argument decoding, or should that be left to the opcode functions? Are you talking about lazy vs. normal evaluation? Lisp knows basically two modes, normal evaluation

Re: Social Reform

2001-06-12 Thread Bart Lateur
On Tue, 12 Jun 2001 08:54:13 +0100, Simon Cozens wrote: >On Mon, Jun 11, 2001 at 05:19:26PM -0700, Daniel S. Wilkerson wrote: >> I would say Simon was the one "ignoring an issue and attacking a person", not >> Vijay. > >You are wrong. Go back through the archives. Vijay has posted four >messages

Re: hash and array variables vs. references

2001-06-08 Thread Bart Lateur
On Fri, 8 Jun 2001 14:05:44 -0400, Mark J. Reed wrote: >My question/suggestion: why not get rid of @arrays and %hashes as >separate variable types? Have all variables be scalar - with, >of course, the ability to hold a reference to an anonymous array >or hash. Keep the funny characters around,

Re: Should we care much about this Unicode-ish criticism?

2001-06-05 Thread Bart Lateur
On 05 Jun 2001 11:07:11 -0700, Russ Allbery wrote: >Particularly since part of his contention is that 16 bits isn't enough, >and I think all the widely used national character sets are no more than >16 bits, aren't they? It's not really important. UTF-8 is NOT limited to 16 bits (3 bytes). With

Re: PDD 2nd go: Conventions and Guidelines for Perl Source Code

2001-06-05 Thread Bart Lateur
On Tue, 29 May 2001 18:25:45 +0100 (BST), Dave Mitchell wrote: >diffs: > >-"K&R" style for indenting control constructs >+"K&R" style for indenting control constructs: ie the closing C<}> should >+line up with the opening C etc. On Wed, 30 May 2001 10:37:06 -0400, Dan Sugalski wrote: >I realize

Re: slices

2001-05-25 Thread Bart Lateur
On Thu, 24 May 2001 22:19:12 -0400, James Mastros wrote: >But what about: @foo[(1,2,3)]? > >Are those parens a list-maker, or are they a scalar expression using >the comma operator. Both. But in this case, I'd say: it depends on the context the slice is called in. @bar = @foo[(1,2,3)]

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Bart Lateur
On Fri, 18 May 2001 23:26:53 +0200, Trond Michelsen wrote: >While I understand how "0 but true" is a cute hack that is destined to >be replaced by a truth property, I fail to realize how it's useful to >have a value that's true no matter what value you assign to it later. I thought the "truth" p

Re: Damian Conway's Exegesis 2

2001-05-16 Thread Bart Lateur
On Wed, 16 May 2001 13:49:42 +0200, Carl Johan Berglund wrote: >sub show {print "6"} >print "Perl ${show()}\n"; > >(That prints "6Perl", not "Perl 6".) > >If you want to call the subroutine in the middle of the string, you >should make it _return_ something, not print it. This person obviously

Re: what I meant about hungarian notation

2001-05-14 Thread Bart Lateur
On Mon, 14 May 2001 20:38:31 +0100, Graham Barr wrote: >You forgot > > $bar[$foo]; # $bar is an array reference > $bar{$foo}; # $bar is a hash reference As to what the combined $bar[$foo] would mean: that depends on what $bar contains. (Aw! That hurt!) -- Bar

Re: Apoc2 - concerns

2001-05-14 Thread Bart Lateur
On Mon, 14 May 2001 12:39:11 +0100, Simon Cozens wrote: >I think the more immediate problem with Sather is that it's totally obscure. >I'd never heard of it. I'd never read any articles about it. It has no >publicity. If people haven't heard of it, it'll remain unpopular.

Re: Apoc2 - concerns

2001-05-14 Thread Bart Lateur
On Thu, 10 May 2001 17:15:09 +0100, Simon Cozens wrote: >> What you could do, is treat an iterator as "something similar to reading >> a line from a file". Tied filehandles allow something like it in Perl5. > >You know, if what you say is true, I'd expect to find a module on CPAN which >turns the

Re: A proposal for more powerful text processing to be built in to Perl: Flex and Pushdown Expressions.

2001-05-11 Thread Bart Lateur
On Fri, 11 May 2001 08:29:07 -0500, Tad McClellan wrote: >On Thu, May 10, 2001 at 04:26:56PM -0700, Daniel S. Wilkerson wrote: > >> Flex - Put all of flex right into Perl. >Don't we already have that in Perl 5? Sortof. What he is proposing, is again the age old proposal of putting the notion o

Re: Perl, the new generation

2001-05-11 Thread Bart Lateur
On Fri, 11 May 2001 08:20:53 -0400, John Porter wrote: >> Let's not confuse Perl 6, the Language, with Perl 6, the Implementation, >> which includes compatibility apparatus that knows about Perl 5. > >Maybe we need more difference in the names than "exactly one bit". Then maybe it's a good thing

Re: Apoc2 - concerns

2001-05-10 Thread Bart Lateur
On Fri, 4 May 2001 18:20:52 -0700 (PDT), Larry Wall wrote: >: love. I'd expect $FOO.readln (or something less Pascalish) to do an >: explicit readline to a variable other than $_ > >It would be $FOO.next, but yes, that's the basic idea. It's possible >that iterator variables should be more synta

Re: what I meant about hungarian notation

2001-05-09 Thread Bart Lateur
On Wed, 9 May 2001 11:06:45 -0400, Bryan C. Warnock wrote: >>At that >> point, Hungarian notation fell apart for me. Its strict use adds (IMO) as >> much confusion as MicroSoft's redefinition of C, with thousands of >> typedefs representing basic types ("LPSTR" and "HWND" come to mind as the >> m

Re: Apoc2 - concerns ::::: new mascot?

2001-05-09 Thread Bart Lateur
On Wed, 9 May 2001 10:24:26 -0400, David Grove wrote: >I remember someone (whether at O'Reilly or >not I don't remember) saying that, even if it looks like a horse but has a >hump, it's not allowed. Or was that an alpaca with a llama... > >The RFC pleads for a community spirit from ORA. Barring t

Re: what I meant about hungarian notation

2001-05-09 Thread Bart Lateur
On Wed, 9 May 2001 09:47:56 -0400, John Porter wrote: >> Undecorated if for function calls and methods. And buolt-ins, of course. > >No, that's the situation already. David is proposing a change. > >> So what you're really saying is that references aren't really scalars, >> but their own type. T

Re: what I meant about hungarian notation

2001-05-09 Thread Bart Lateur
I really need to spell-check better. >Undecorated if for function calls and methods. And buolt-ins, of course. Undecorated is for function calls and methods. And built-ins, of course. -- Bart.

Re: what I meant about hungarian notation

2001-05-09 Thread Bart Lateur
On Tue, 08 May 2001 20:21:10 -0500, David L. Nicol wrote: >What if, instead of cramming everything into "scalar" to the point >where it loses its value as "a data type that magically converts >between numeric and string, as needed," we undo the Great Perl5 >Dilution and undecorate references. Un

Re: Apoc2 - concerns

2001-05-06 Thread Bart Lateur
On Sat, 5 May 2001 15:22:40 -0700, Nathan Wiger wrote: > I suggest >that we simply create another q-op to do the qw-ish things you're proposing. >Perhaps qi() for "interpolate" or something else. qqw -- Bart.

Re: Apo2: \Q ambiguity

2001-05-04 Thread Bart Lateur
On Fri, 04 May 2001 15:05:12 -0400, Dan Sugalski wrote: >Have you considered allowing Unicode characters as alternatives to some of >the less pleasant looking bits? $foo<<1>> (where << and >> are the double >angle characters) as an alternative to $foo\Q[1] if the user's got the >characters han

Re: apo 2

2001-05-04 Thread Bart Lateur
On Fri, 4 May 2001 10:49:48 -0500 , Garrett Goebel wrote: >> > > And btw . . . Wouldn't >> > > >> > > $thing has property >> > > >> > > make more sense than >> > > >> > > $thing is property >> > >> >"$foo has true" doesn't flow as well as "$foo is true". Dunno quite >> >what the oth

Re: apo 2

2001-05-04 Thread Bart Lateur
On Thu, 03 May 2001 22:14:47 -0500, David L. Nicol wrote: >I am going to miss doublequoting being the default quoting for >here strings. I find that to be a very nice optimization and >would like to know more about the reasoning behind taking it >away. I was already panicking when I saw this me

Re: Please make "last" work in "grep"

2001-05-02 Thread Bart Lateur
On Wed, 2 May 2001 11:41:32 -0500, Jarkko Hietaniemi wrote: >but I suspect in this case want('LIST') would >> return that magical "0 but true" or something similar. > >Hopefully the "something similar", I hope in Perl 6 we will able to >bury the "0 but true" workaround to the backyard on a moonle

Re: Please make "last" work in "grep"

2001-05-02 Thread Bart Lateur
On Wed, 2 May 2001 17:05:31 +0100, Graham Barr wrote: >wantarray-ness is already passed along the call stack today. Thats >the whole point of it. So what is the difference in passing a number >instead of a boolean ? Because you might have a wantarray situation that expects no values? ()

Re: Curious: -> vs .

2001-04-27 Thread Bart Lateur
On 26 Apr 2001 23:19:49 -0400, Buddha Buck wrote: >$bar = [$obj method() ]; # method call $bar = method $obj() would be more consistent with perl's current $object = new Class() syntax. -- Bart.

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-26 Thread Bart Lateur
On Wed, 25 Apr 2001 06:09:56 -0700 (PDT), Larry Wall wrote: >Bart Lateur writes: >: Er... hip hip hurray?!?! >: >: This is precisely the reason why I came up with the raw idea of >: highlander variables in the first place: because it's annoying not being >: able to access

Re: a modest proposal Re: s/./~/g

2001-04-26 Thread Bart Lateur
On Thu, 26 Apr 2001 10:15:14 +0200, Bart Lateur wrote: >For example, in > > -3.4 > >and in > > 2-3.4 > >the - sign is a *different* kind of operator. No conflict. Well alright, in the first line, the "-" might be part of the number. Replace &

Re: a modest proposal Re: s/./~/g

2001-04-26 Thread Bart Lateur
On Wed, 25 Apr 2001 18:19:40 GMT, Fred Heutte wrote: >Yes, I know ~ is the bitwise negation operator. Have you EVER used it? Yes. A lot. But there is no conflict. ~ is currently just an unary operator, while your use would be as a binary operator (are those the correct terms?). For example, in

Re: Curious: -> vs .

2001-04-26 Thread Bart Lateur
On Wed, 25 Apr 2001 15:52:47 -0600 (MDT), Dan Brian wrote: >the idea of a "dereference operator" dumbfounds lots >of folks. "What's an object got to do with a reference, much less a >pointer?" A p5 object is very confusing to others for this reason, and so >is the syntax. So you want a method in

Re: Tying & Overloading

2001-04-25 Thread Bart Lateur
On Wed, 25 Apr 2001 11:01:07 -0300, Branden wrote: >If the idea is supporting arbitrary add-on operators, which I believe will >be done seldom, for only some specific classes, wouldn't it be better to >have a ``catch all'' entry for operators different than the built-in ones? > >Of course, add-

Re: Sane "+" string concat proposal

2001-04-25 Thread Bart Lateur
On Wed, 25 Apr 2001 08:25:40 -0400, Stephen P. Potter wrote: >| I'm really beginning to like >| >| $string3 = $string1 _ $string2; >| >| The underscore indeed "connects" the two strings. > >This still breaks because _ is a valid word character. So are "cmp", "and", "lt", and the proposed

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-25 Thread Bart Lateur
On Tue, 24 Apr 2001 21:06:56 -0700 (PDT), Larry Wall wrote: >: Ok, so what does: >: >: my %hash = ( 1 => 3); >: my $hash = { 1 => 4}; >: >: print $hash{1}; >: >: print? > >4. You must say %hash{1} if you want the other. Ok. So how about hash slices? Is $hash{$a, $b}, the faked multidimension

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-25 Thread Bart Lateur
On Tue, 24 Apr 2001 18:39:09 -0700 (PDT), Larry Wall wrote: >Edward Peschko writes: >: I guess my question is what would be the syntax to access hashes? Would >: >: $hashref.{ } >: >: be that desirable? I really like ->{ } in that case.. > >It won't be either of those. It'll simply be $hashre

Re: So, we need a code name...

2001-04-24 Thread Bart Lateur
On Tue, 24 Apr 2001 19:17:08 -0500, Jarkko Hietaniemi wrote: >Wasn't Perl also taken, so why care...? I vaguely remember reading >about another language called PERL... It was "Pearl", AFAIK. That's why the "a" got missing. So I've been told... ("Practical Extracting And Reporting Language"... y

Re: Sane "+" string concat proposal

2001-04-24 Thread Bart Lateur
On Wed, 25 Apr 2001 00:37:53 +0100, Simon Cozens wrote: >>$string3 = $string1 . $string2; >>$string3 = "$string1" + "$string2"; > >That's now *five* characters required to perform a very common operation. > >Rather than one. I'm really beginning to like $string3 = $string1 _ $s

Re: Tying & Overloading

2001-04-24 Thread Bart Lateur
On Tue, 24 Apr 2001 14:37:02 +0100, Simon Cozens wrote: >Let's put it a different way - if we can find a short operator which >is readily accessible on most people's keyboards, then that would >score over a longer operator which is readily accessible on most >people's keyboards. Maybe ~ isn't th

Re: Tying & Overloading

2001-04-24 Thread Bart Lateur
On Tue, 24 Apr 2001 10:49:18 +0100, Simon Cozens wrote: >While that's true, concatenation is quite a common operation >that I'd be really >uncomfortable with it necessitating 4 keystrokes (" cat") instead of one. Er, "~" is an extremely annoying character to type at many keyboards. It may depen

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-24 Thread Bart Lateur
On 24 Apr 2001 00:29:23 -0700, Russ Allbery wrote: >How do you concatenate together a list of variables that's longer than one >line without using super-long lines? Going to the shell syntax of: > >PATH=/some/long:/bunch/of:/stuff >PATH="${PATH}:/more/stuff" > >would really be a shame.

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-23 Thread Bart Lateur
On Mon, 23 Apr 2001 16:14:50 -0400, John Siracusa wrote: >Using + for concat: no! > >My vote is to use . and require space before and after. >$this.$is.$ugly.$anyway ;) My vote is to ditch the concat operator altogether. Hey, we have interpolation! "$this$is$just$as$ugly$but$it$works"

Re: Tying & Overloading

2001-04-23 Thread Bart Lateur
On Mon, 23 Apr 2001 13:19:24 +0100, Graham Barr wrote: >> Or we change the concatenation operator. >I am thinking that maybe it should be a 2 character operator with at >least one of then being + as + is common in many other languages >for doing concatenation. Or, in analogy to "cmp", "gt" etc:

Re: PDD 4 internal data types, version 1.1

2001-03-30 Thread Bart Lateur
On Thu, 29 Mar 2001 19:24:21 +0200 (CEST), Tels wrote: >And then, if we have BigFloat, we need a way to specify rounding and >precision. Otherwise 1/3 eats up all memory or provides limits ;o) Er... may I suggest ratio's as a data format? It won't work for sqrt(2) or PI, but it can easily store

Re: Schwartzian transforms

2001-03-29 Thread Bart Lateur
On Wed, 28 Mar 2001 11:11:20 -0500, Dan Sugalski wrote: > "Can perl automatically optimize away function and tie calls inside >a sort function, and under what circumstances?" > >It doesn't really matter if the functions inside the sort function are >idempotent--what matters is whether it's

Re: Schwartzian Transform

2001-03-21 Thread Bart Lateur
On Wed, 21 Mar 2001 15:40:20 -0500, John Porter wrote: >Uri Guttman wrote: >> JP> y/L/A/; >> >> tell that to perllol :) > >I do, through clenched teeth, every time I see it. IMHO, it is: HoA HoH LoA LoH -- Bart.

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-22 Thread Bart Lateur
On Wed, 21 Feb 2001 17:32:50 -0500 (EST), Sam Tregar wrote: >On Wed, 21 Feb 2001, Bart Lateur wrote: > >> Actually, it's pretty common. Only, most languages are not as forgiving >> as perl, and what is merely a warning in Perl, is a fatal error in those >> language

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-21 Thread Bart Lateur
On Wed, 21 Feb 2001 16:01:39 -0500, [EMAIL PROTECTED] wrote: >Has anyone actually used a language which has run-time warnings on by >default? Or even know of one? Actually, it's pretty common. Only, most languages are not as forgiving as perl, and what is merely a warning in Perl, is a fatal er

Re: Warnings, strict, and CPAN (Re: Closures and default lexical-scope for subs)

2001-02-20 Thread Bart Lateur
On Tue, 20 Feb 2001 16:31:35 -0500, Bryan C. Warnock wrote: >Scalar value @foo[$bar] better written as $foo[$bar], for one. I agree on this one (hash slices too), if this expression is in list context. There is no error in @r = map { blah } @foo{$bar}; -- Bart.

Re: ANNOUNCE: smokers@perl.org Discussion of perl's daily build and smoke test

2001-02-19 Thread Bart Lateur
On Mon, 19 Feb 2001 15:47:12 +0100, Johan Vromans wrote: >As an active non-smoker, I'd appreciate a different name. You guys (=plural) are nuts. So much bickering over such a tiny irrelevant detail. But anyway, if you want a clear and explicit name, why not "smoketesters". Nothing to do with to

Re: Warnings, strict, and CPAN

2001-02-18 Thread Bart Lateur
On Fri, 16 Feb 2001 21:03:54 -0800, Edward Peschko wrote: >It is one hell of a burden to find a missing 'use strict' or 'use warnings'. >'Well, type them then' you say. Right, and always type ';' at each line, or 1; >at the end of each file. Its as unavoidable as a *syntax error*, which is the >

Re: The binding of "my" (Re: Closures and default lexical-scope

2001-02-18 Thread Bart Lateur
On 17 Feb 2001 20:53:51 -0800, Russ Allbery wrote: >Could >people please take the advocacy traffic elsewhere where it isn't noise? Advocacy is noise everywhere. That doesn't mean that davocates for either side don't have anything interesting to say. For starters, it's usually dissatisfaction wi

Re: End-of-scope actions: do/eval duality.

2001-02-16 Thread Bart Lateur
On Thu, 15 Feb 2001 10:04:51 -0300, Branden wrote: >Why `do FILE' behaves like eval, if there's eval to do it? Isn't this a >little too much not-orthogonal? Why don't we require `eval { do FILE }' to >have the behaviour of not dying and setting $@ ? The reason for its existence is simple: histor

Re: End-of-scope actions: do/eval duality.

2001-02-15 Thread Bart Lateur
On Tue, 13 Feb 2001 11:35:16 -0800, Glenn Linderman wrote: >In the perl 5 pocket reference 3rd edition page 63, it claims that $@ is >set to the result of an eval or do. How does this impact exception >handling tests on $@ to determine if an exception was thrown, if $@ can >be set by a do ? OR

Re: JWZ on s/Java/Perl/

2001-02-11 Thread Bart Lateur
On Fri, 9 Feb 2001 16:14:34 -0800, Mark Koopman wrote: >but is this an example of the way people SHOULD code, or simply are ABLE to >code this. are we considering to deprecate this type of bad style, and force >to a programmer to, in this case, supply a ref to %baz in the arguements to >this s

Re: JWZ on s/Java/Perl/

2001-02-09 Thread Bart Lateur
On Fri, 09 Feb 2001 12:06:12 -0500, Ken Fox wrote: >There are two main reasons advanced garbage collectors are fast: > > 1. Cheap allocations. Most fast collectors have a one or two >instruction malloc. In C it looks like this: > > void *malloc(size) { void *obj = heap; heap += size; ret

Re: Auto-install (was autoloaded...)

2001-02-09 Thread Bart Lateur
On Fri, 9 Feb 2001 21:18:55 +, Nicholas Clark wrote: >> What? tar -z not good enough for you? > >I believe that that wognt work ugnless you have gnu tar. As a Windows user, I should add: * Archive::Tar is part of the Perl 5.6.0 distributions for Win32 (Activestate and IndigoPerl) * On a

Re: Auto-install (was autoloaded...)

2001-02-09 Thread Bart Lateur
On Thu, 8 Feb 2001 17:49:45 -0200, Branden wrote: >I've never actually used PPM, only read about it in >the web. I guess their file format is a disguised .tar.gz, right? It's a combination of an XML file, file extension "PPD", which describes the properties and dependencies, and platforms, and a

Re: Auto-install (was autoloaded...)

2001-02-09 Thread Bart Lateur
On Thu, 8 Feb 2001 17:39:01 +, Nicholas Clark wrote: >On Thu, Feb 08, 2001 at 12:26:59PM -0500, Dan Sugalski wrote: >> (Including Archive::Tar as part of the base perl distribution's not >> inappropriate, assuming we can get permission. ) Since it's already part of the "standard distributio

  1   2   3   4   >