Re: RFC 184 (v1) Perl should support an interactive mode.

2000-08-31 Thread Ariel Scolnicov
"Michael Maraist" <[EMAIL PROTECTED]> writes: [...] > First, the current debugger allows multi-lines if you use "\" at the end of > the line ( a la C ). Thanks. TomC also pointed this out. I still don't like it, though. (But it will be added to the next revision). Take a look at what sh will

Re: RFC 175 (v1) Add C keyword to force list context (like C)

2000-08-31 Thread Tom Christiansen
> > This is the kind of thing that keeps Perl instructors in business... >And Perl out of businesses :-( >More than anything I think the inability to write C DWIMishly >argues that we need it built-in. But we also need a *very* careful design >of the semantics. I'd like to see from this measu

Re: RFC 184 (v1) Perl should support an interactive mode.

2000-08-31 Thread Michael Maraist
I'll be brief because windows just crashed on me. First, the current debugger allows multi-lines if you use "\" at the end of the line ( a la C ). Second, lexically scoped variables will dissapear on subsequent debugger lines since their scope is wrapped in an eval. For the most part, the debug

Re: RFC 175 (v1) Add C keyword to force list context (like C)

2000-08-31 Thread Damian Conway
> This is the kind of thing that keeps Perl instructors in business... And Perl out of businesses :-( More than anything I think the inability to write C DWIMishly argues that we need it built-in. But we also need a *very* careful design of the semantics. Damian

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-31 Thread Jeremy Howard
Buddha Buck wrote: > At 05:35 PM 8/31/00 +, David L. Nicol wrote: > >Buddha Buck wrote: > > > > The array > > > > syntax would also be useful in multi-dimensional arrays. > > > > > > That is if multi-dimensional arrays are implemented as lists-of-lists, > > > which they might not be. > > > >Ev

Re: RFC 184 (v1) Perl should support an interactive mode.

2000-08-31 Thread Tom Christiansen
>The most serious obstacle to easy interaction is the impossibility of >typing multiple line commands to a Perl debugger (see below). % man perldebug ... Multiline commands If you want to enter a multi-line command, such as a subroutine definition with

Re: the C JIT

2000-08-31 Thread Sam Tregar
On Thu, 31 Aug 2000, David L. Nicol wrote: > We're talking about making a faster Perl. C's syntax requires enough > clarity to compile to something quick. it is a very short hop from > my dog $spot; > to > dog spot; What about the second version would result in faster execution? D

RFC 184 (v1) Perl should support an interactive mode.

2000-08-31 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Perl should support an interactive mode. =head1 VERSION Maintainer: Ariel Scolnicov <[EMAIL PROTECTED]> Date: 31 Aug 2000 Mailing List: [EMAIL PROTECTED] Version: 1 Number: 184 Status: Developin

Re: the C JIT

2000-08-31 Thread Nathan Wiger
"David L. Nicol" wrote: > > my dog $spot; > to > dog spot; > > If we only allow this where enough info is available to allocate dog-sized > pieces of memory directly, Perl can blaze through the code that deals with > dogs. I don't see what barewords gain us here. Who says that

Re: the C JIT

2000-08-31 Thread David L. Nicol
Sam Tregar wrote: > > On Thu, 31 Aug 2000, David L. Nicol wrote: > > run-time efficiency > > C doesn't get run-time efficiency from its syntax, so we can't really > expect to get anything here. It gets it from its compilation > architecture. If you want to build a Perl frontend for GCC

Re: RFC 175 (v1) Add C keyword to force list context (like C)

2000-08-31 Thread Peter Scott
At 11:46 PM 8/31/00 +0200, Bart Lateur wrote: >On Fri, 1 Sep 2000 07:27:24 +1100 (EST), Damian Conway wrote: > > > > > And has anyone pointed out that C is just: > > > > > > > > sub list {@_} > > > > > > Um no. I would expect it to be > > > > > > sub list { @_[0..$#_] } > > > >It's

Re: Proposal: chop() dropped

2000-08-31 Thread Bart Lateur
On Thu, 31 Aug 2000 13:36:10 -0600, Tom Christiansen wrote: >>I'm not arguing in favor of the tr/// hack specifically, but >>gosh, wouldn't it be nice if there were a thwack() builtin that >>stripped leading and trailing spaces? > >No. People should learn intrinsic mechanisms with which they c

Re: RFC 175 (v1) Add C keyword to force list context (like C)

2000-08-31 Thread Bart Lateur
On Fri, 1 Sep 2000 07:27:24 +1100 (EST), Damian Conway wrote: > > > And has anyone pointed out that C is just: > > > > > > sub list {@_} > > > > Um no. I would expect it to be > > > > sub list { @_[0..$#_] } > >It's too early in the morning. >The subtlety here escapes me

Re: RFC 139 (v1) Allow Calling Any Function With A Syntax Like s///

2000-08-31 Thread John Porter
Nathan Wiger wrote: > > Well, it just stacks arguments on the end, even with open-ended > prototypes: > >@a =~ my_user_sub($arg); # @a = my_user_sub($arg, @a) What it means is, you can't prototype the thingy that could be expected on the LHS of the =~, when function is open-ended, because i

Re: RFC 175 (v1) Add C keyword to force list context (like C)

2000-08-31 Thread John Porter
Graham Barr wrote: > On Thu, Aug 31, 2000 at 03:55:28PM +1100, Damian Conway wrote: > > And has anyone pointed out that C is just: > > > > sub list {@_} > > Um no. I would expect it to be > > sub list { @_[0..$#_] } According to my quickie tests, both have the desired effect (supplying l

Re: Ideas that need RFCs?

2000-08-31 Thread Ken Fox
Dan Sugalski wrote: > I expect we'd want to have some sort of heavy-duty regex optimizer, then, > to detect common prefixes and subexpressions and suchlike things, otherwise > we end up with a rather monstrous alternation sequence... We need a regex merge function too -- then we could write macro

Re: RFC 177 (v1) A Natural Syntax Extension For ChainedReferences

2000-08-31 Thread David L. Nicol
Peter Scott wrote: > > >Having the > >indices in one place saves a lot of characters. Compare > > > > $r->{{qw(a b c d e f g h)}} > > > >versus > > > > $r->{a}->{b}->{c}->{d}->{e}->{f}->{g}->{h} > > But I would compare it to > > $r->{a}{b}{c}{d}{e}{f}{g}{h} > > which is

Re: RFC 175 (v1) Add C keyword to force list context (like C)

2000-08-31 Thread Damian Conway
> > And has anyone pointed out that C is just: > > > > sub list {@_} > > Um no. I would expect it to be > > sub list { @_[0..$#_] } It's too early in the morning. The subtlety here escapes me. Damian

Re: Proposal: chop() dropped

2000-08-31 Thread Tom Christiansen
>I'm not arguing in favor of the tr/// hack specifically, but >gosh, wouldn't it be nice if there were a thwack() builtin that >stripped leading and trailing spaces? No. People should learn intrinsic mechanisms with which they can construct infinitely many beautiful and powerful effects. This

Re: Proposal: chop() dropped

2000-08-31 Thread Eric Roode
TomC wrote: >In general, getting folks to write > >s/^\s+//s; >s/\s+$//s; # XXX: \z > >is a *good* think. Why? Removing leading/trailing whitespace is a tremendously frequently- performed task. Perl gives you -l on the command line to strip newlines on input and add them on output, sim

Re: Proposal: chop() dropped

2000-08-31 Thread Tom Christiansen
>How would you do: ># Writer insists on blank line between paragraphs, first line indented. ># Publisher insists on one paragraph/line, first word ALL CAPS. Step 1: Fire the lame publisher. I'm serious. It's amazing what people tolerate. Some things aren't worth the pane. >{ >local $/ =

Re: Proposal: chop() dropped

2000-08-31 Thread Tom Christiansen
>tr///l # Translate only _l_eading characters matching. >tr///t # Translate only _t_railing characters matching. >With "Only leading" I mean translate from start/end until you find a >character not matching. Then you can do nifty things such as: >tr/\w//dlt # Trim all leading & tra

Re: Proposal: chop() dropped

2000-08-31 Thread Jonathan Scott Duff
On Thu, Aug 31, 2000 at 02:52:10PM -0400, Buddha Buck wrote: > How would you do: > > # Writer insists on blank line between paragraphs, first line indented. > # Publisher insists on one paragraph/line, first word ALL CAPS. > { > local $/ = ""; #slurp paragraph at a time. > while () { >

Re: Proposal: chop() dropped

2000-08-31 Thread Buddha Buck
At 01:35 PM 8/31/00 -0500, Jonathan Scott Duff wrote: >On Thu, Aug 31, 2000 at 07:59:31PM +0200, Dan Zetterstrom wrote: > > Why not use the "function" we already got, tr? Something like: > > > > tr///l # Translate only _l_eading characters matching. > > tr///t # Translate only _t_raili

Re: Proposal: chop() dropped

2000-08-31 Thread Jonathan Scott Duff
On Thu, Aug 31, 2000 at 07:59:31PM +0200, Dan Zetterstrom wrote: > Why not use the "function" we already got, tr? Something like: > > tr///l # Translate only _l_eading characters matching. > tr///t # Translate only _t_railing characters matching. > > With "Only leading" I mean transla

Re: Proposal: chop() dropped

2000-08-31 Thread Dan Zetterstrom
On Thu, 31 Aug 2000 19:59:31 +0200, you wrotc: >tr/\w//dlt # Trim all leading & trailing whitespace from $_ > Eh, scratch that. Too much caffeine i guess. tr/\n\r\t //dlt; # Trim some whitespace. -DZ -- Tell me your dreams and I will crush them.

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-31 Thread Buddha Buck
At 05:35 PM 8/31/00 +, David L. Nicol wrote: >Buddha Buck wrote: > > > The array > > > syntax would also be useful in multi-dimensional arrays. > > > > That is if multi-dimensional arrays are implemented as lists-of-lists, > > which they might not be. > >Even if they aren't implemented as lol,

Re: Proposal: chop() dropped

2000-08-31 Thread Dan Zetterstrom
On Thu, 31 Aug 2000 09:41:37 -0400 (EDT), you wrotc: >Nathan Wiger wrote: >>In a very cool email, Bryan Warnock talked about half a dozen different >>chop-like functions that are useful but not in core: >> >>http://www.mail-archive.com/perl6-language@perl.org/msg01522.html >> >>I think chop, cham

Re: RFC 110 (v3) counting matches

2000-08-31 Thread Steve Fink
[redirected to perl6-language] Tom Christiansen wrote: > > Note the difference between > > my $var = func(); > > and > > my($var) = func(); > > Those are completely different in that they call func() in scalar > and list contexts. Why? Because of hte presence or absence of (), > of

Re: RFC 175 (v1) Add C keyword to force list context (like C)

2000-08-31 Thread Graham Barr
On Thu, Aug 31, 2000 at 03:55:28PM +1100, Damian Conway wrote: > And has anyone pointed out that C is just: > > sub list {@_} Um no. I would expect it to be sub list { @_[0..$#_] } Graham.

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-31 Thread David L. Nicol
Perl6 RFC Librarian wrote: > arsenal. The constructs are: > > $ref->[[LIST]] > $ref->{{LIST}} > > The proposed respective meanings: > > $ref->[$elem[0]]->[$elem[1]}->[...]->[$elem[-1]] > $ref->{$elem[0]}->{$elem[1]}->{...}->{$elem[-1]} why not just use single

Re: Proposal: chop() dropped

2000-08-31 Thread Nathan Torkington
Eric Roode writes: > Useful functions all, no doubt. But I would lobby heavily for a new > set of names -- ones that can be remembered! Quick -- which trims > leading spaces, champ, chump, or chimp? My favourite: chafe(). Nat

RE: the C JIT

2000-08-31 Thread David Olbersen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A Perl frontend to GCC would make my life wonderful. Who would I talk to about that? I'm not about to pretend that I have any idea how to do that. - --Dave - -> -Original Message- - -> From: Sam Tregar [mailto:[EMAIL PROTECTED]] - -> Sent: T

Re: the C JIT

2000-08-31 Thread Sam Tregar
On Thu, 31 Aug 2000, David L. Nicol wrote: > Perl looks, and AFAIK has always looked, like "C plus lune noise" to > many people. I think Perl looks like "C plus moon noise" to former C programmers. I imagine some people see it and think "Csh plus Awk noise". Perl is a lot more than C-with-scal

Re: the C JIT

2000-08-31 Thread David L. Nicol
David Corbin wrote: > A C JIT is an interesting idea. > > I think that a project works best when it has a set of goals (I haven't > seen one yet really for Perl 6). Unless this is one of the goals, I can > easily see how this could become a serious distraction to what I > perceive as the like

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-08-31 Thread Tom Christiansen
>Next, what subset of the set-theory should be implemented. Obviously you >refer to the basic and / or / xor, but in real practice, the other operators >can be very useful. Chaining operators (especially with array-based-sets) >can be a performance nightmare. Unless you use bitwise operators on

Re: RFC 139 (v1) Allow Calling Any Function With A Syntax Like s///

2000-08-31 Thread Nathan Wiger
John Porter wrote: > > Not familiar with indirect object notation? Insulting non-argument. I'm not replying to it. > Who was it that suggested changing the m// operator to the match() > function, and the s/// operator to the subst() function? That would be me. > I suppose I could have propos

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-08-31 Thread Michael Maraist
> More functions from set theory to manipulate arrays > > I'd like to use these functions in this way : > > @c = union (@a, @b); > # wich is different from @c = (@a, @b) because union do not duplicate > same elements > > @c = intersection (@a, @b); > @c = diff(@a, @b); > Elements of this ar

Re: Proposal: use Perl5

2000-08-31 Thread Nathan Wiger
Jerrad Pierce wrote: > > That would be my hope too, but as I mentioned, it is seeming somewhat unlikely. I don't think so. There's lots of proposals out there right now, but only a very few actually break backwards compatibility. Plus, Larry's not going to make Perl 6 look like, as Tom would say

Re: {....} if condidion

2000-08-31 Thread Nathan Wiger
> >We already have a trailing if statement, so this argument is edgy, at > >best. > > Your brain/eye can look one statement. It's evil and wrong to make > it look infinite statements forward. How can you pretend those are > the same? Well, I think trailing statements already have only limited

Re: Proposal: use Perl5

2000-08-31 Thread Jerrad Pierce
>> Since everyone seems intent on breaking backward compatibility >I don't think this is at all true, but I also don't think the overall you seem to have ignored the paranthetical clause >idea of a Perl5 module is necessarily a bad one. >However, my hope would be that we do Perl 6 smoothly enough

Re: {....} if condidion

2000-08-31 Thread Jonathan Scott Duff
On Wed, Aug 30, 2000 at 10:58:45PM -0700, Nathan Wiger wrote: > We already have a trailing if statement, so this argument is edgy, at > best. The only thing that it can't do is easily span multiple lines and > expressions. Any reason why not other than style? Seems like the obvious > extension.

Re: RFC 139 (v1) Allow Calling Any Function With A Syntax Like s///

2000-08-31 Thread John Porter
Nathan Wiger wrote: > > If =~ allowed "indirect object" notation as -> does, then we could write > > > > s $str (pat){rep}; > > and > > for ( grok %db /Name/$name/g ) { > > Yeah, but I'm not sure what those are supposed to do. Not familiar with indirect object notation? How ab

Re: Proposal: chop() dropped

2000-08-31 Thread Eric Roode
Nathan Wiger wrote: >In a very cool email, Bryan Warnock talked about half a dozen different >chop-like functions that are useful but not in core: > >http://www.mail-archive.com/perl6-language@perl.org/msg01522.html > >I think chop, champ, chip, and friends should be available via the > > use St

Re: Proposal: chop() dropped

2000-08-31 Thread Jonathan Scott Duff
On Wed, Aug 30, 2000 at 04:34:50PM -0600, Nathan Torkington wrote: > I wouldn't go that far. It might say something about the difference > between proposals made as rhetorical devices ("yes, but if that's the > case then you should be getting rid of X, Y, and Z!"). Really, though, > I think it's

RE: Proposal: chop() dropped

2000-08-31 Thread Eric Roode
My first reaction was "NOOO!!" we'll break too much code! Now, I'm not so sure. Nearly always, chomp() is what is called for; how often *do* you need to chop off the last character of a string? And, as someone else pointed out, why not the first character? "Al" wrote: >I would actualy lik

Re: {....} if condidion

2000-08-31 Thread Decklin Foster
Tom Christiansen writes: > Look closer: do { ... } while does not require the reader to > scan down to find out the condition *BEFORE* the loop is > entered. With an if, it does. I believe what he's saying is that do { ... } requires the reader to scan down far enough to see if there is a whil

Re: the C JIT

2000-08-31 Thread David Corbin
"David L. Nicol" wrote: > > Dan Sugalski wrote: > > > I do want to have a set of C/XS/whatever sources as part of the test suite > > as well--right now perl's test suite only tests the language, and I think > > we should also test the HLL interface we present, as it's just as > > important in so

Re: Idea: minor %hash changes

2000-08-31 Thread Tom Hughes
In message <[EMAIL PROTECTED]> Nathan Torkington <[EMAIL PROTECTED]> wrote: > Tom Hughes writes: > > I must admit it had never occurred to me that somebody might > > deliberately use keys or values to achieve that, but I guess > > somebody might be relying on it without realising it. >

Re: Idea: minor %hash changes

2000-08-31 Thread Tom Hughes
In message <[EMAIL PROTECTED]> Jerrad Pierce <[EMAIL PROTECTED]> wrote: > >As far as I can tell reset %x currently tries to reset any > >variables which start with either % or x even though no variable > >can start with %... > > ~/perl > ${"%percent"} = "Quoth the raven"; > print ${"%pe