Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Johan Vromans
John Porter <[EMAIL PROTECTED]> writes: > Huh? They need to be "globals", because the "with" mechanism > is going to have to be able to write them into a symbol table. > You can't do this with lexicals. Yes, you can. For an approach like this, the hash needs to be a pseudo-hash anyway. -- Joha

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Clayton Scott
Damian Conway wrote: > So C is going to have to do some pretty freaky magic to work out > it should call that sub as part of the C. And call it with a > specifically ordered argument list. Yes, I never said it would work, just that it looked nicer :) > However, your suggestion *did* s

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Damian Conway
> > This seems less of a leap of logic/faith: > > %record = loadrecord($studentID); > > with %record { > > print < > Dear ^name: > > Your tuition is now due. Please send in a payment of at least > > ^minumum. > > SPAM > > }; "I do not thin' t

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread John Porter
Dave Storrs wrote: > On 17 Aug 2000, Johan Vromans wrote: > > Dave Storrs <[EMAIL PROTECTED]> writes: > > > > > 2) "express" should guarantee that, before it creates a variable > > > names $FOO, it first calls "local" on any existing $FOO > > > > Why, if the variable is lexical (see 3)? > > D

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Dave Storrs
This seems good...the HOF stuff seems to have pretty well accepted, and the thumbtack notation with it. Dave On Thu, 17 Aug 2000, Clayton Scott wrote: > > > On Wed, 16 Aug 2000, David L. Nicol wrote: > > > %record = loadrecord($studentID); > > > with %record

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Clayton Scott
Dave Storrs wrote: > > On Wed, 16 Aug 2000, David L. Nicol wrote: > > > Anyone for generalizing "select" to a more general "with" keyword > > which would operate on a limited hash and be syntactic sugar for > > replacing all appearances of unqualified variables that match > > the hash's keys wit

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Johan Vromans
Dave Storrs <[EMAIL PROTECTED]> writes: > 2) "express" should guarantee that, before it creates a variable > names $FOO, it first calls "local" on any existing $FOO Why, if the variable is lexical (see 3)? -- Johan

Re: Default filehandles(was Re: command line option: $|++)

2000-08-16 Thread Nathan Wiger
Chaim Frenkel wrote: > > NW> P.S. If you're not on -io, this implicitly means you DON'T CARE and are > NW> willing to accept whatever we come up with. So, everyone that's > NW> interested please get on -io. Thanks again. > > That's a bit strong. All we are doing is filtering the garbage for Larr

Re: Default filehandles(was Re: command line option: $|++)

2000-08-16 Thread Chaim Frenkel
> "NW" == Nathan Wiger <[EMAIL PROTECTED]> writes: NW> P.S. If you're not on -io, this implicitly means you DON'T CARE and are NW> willing to accept whatever we come up with. So, everyone that's NW> interested please get on -io. Thanks again. That's a bit strong. All we are doing is filterin

pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-16 Thread David L. Nicol
The poll can't have been exhaustive. I like these magic variables that depend on currently selected fie handles, they remind me of Pascal's C construction for entering the name space of a record structure. Anyone for generalizing "select" to a more general "with" keyword which would operate

Re: Default filehandles(was Re: command line option: $|++)

2000-08-16 Thread Nathan Wiger
Chaim Frenkel wrote: > > Unless one wants to have a $DEFAULT filehandle and get rid of single > arg select. Great minds think alike. :-) I'm in the process of codifying an RFC that will be titled something like: "Replace default filehandle / select with $OUTPUT fileobject" (chose $OUTPUT b

Re: Default filehandles(was Re: command line option: $|++)

2000-08-16 Thread Chaim Frenkel
I'm not sure if you are disagreeing with me or not. The context was the statment that $STDOUT is the _default_ filehandle. I was pointing out that by _overriding_ the instantaneous meaning of $STDOUT to the default fail handle, one would lose the immediate access to the previous value. I.e. $STD

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 06:53:30PM -0400, Chaim Frenkel wrote: > What if you want to print to a default file handle and also to STDOUT? > > select(OTHERFH); > print "This goest to OTHERFH\n"; > print STDOOUT "This went to STDOUT\n"; print $_ "Here I come to save the day!\n" for

Re: command line option: $|++

2000-08-15 Thread Chaim Frenkel
> "s" == skud <[EMAIL PROTECTED]> writes: s> Command line options aren't really a language issue, however I'm not s> sure that there is a better list for them. Anyone on bootstrap got any s> good ideas? shove it over onto -internals. They will have to implement it anyway. The only other

Re: command line option: $|++

2000-08-15 Thread skud
Command line options aren't really a language issue, however I'm not sure that there is a better list for them. Anyone on bootstrap got any good ideas? K. -- Kirrily Robert -- <[EMAIL PROTECTED]> -- http://netizen.com.au/ Open Source development, consulting and solutions Level 10, 500 Collins

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Peter Scott
At 12:57 PM 8/15/00 -0700, Nathan Wiger wrote: >This is a succinct summary of the basic conclusions thus far: > >1. a default filehandle IS needed sometimes, but only > for stuff like print > >2. $|, $\, $/, etc will probably go away entirely in > favor of object methods such a

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Chaim Frenkel
> "NW" == Nathan Wiger <[EMAIL PROTECTED]> writes: NW>2. $|, $\, $/, etc will probably go away entirely in NW> favor of object methods such as $handle->autoflush It think they will still be needed as lexical variables used as an initializer for the corresponding per-filehandle valu

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Chaim Frenkel
> "JSD" == Jonathan Scott Duff <[EMAIL PROTECTED]> writes: JSD> On Tue, Aug 15, 2000 at 12:57:46PM -0700, Nathan Wiger wrote: >> This is a succinct summary of the basic conclusions thus far: >> >> 1. a default filehandle IS needed sometimes, but only >> for stuff like print JSD> Well, I thi

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Nathan Wiger
Jonathan Scott Duff wrote: > > On Tue, Aug 15, 2000 at 12:57:46PM -0700, Nathan Wiger wrote: > > This is a succinct summary of the basic conclusions thus far: > > > >1. a default filehandle IS needed sometimes, but only > > for stuff like print > > Well, I think that C should always pr

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread James Mastros
On Tue, Aug 15, 2000 at 03:28:33PM -0500, Jonathan Scott Duff wrote: > On Tue, Aug 15, 2000 at 12:57:46PM -0700, Nathan Wiger wrote: > >1. a default filehandle IS needed sometimes, but only > > for stuff like print > > Well, I think that C should always print to $PERL::STDOUT (or > what

Re: Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 12:57:46PM -0700, Nathan Wiger wrote: > This is a succinct summary of the basic conclusions thus far: > >1. a default filehandle IS needed sometimes, but only > for stuff like print Well, I think that C should always print to $PERL::STDOUT (or whatever we call i

Default filehandles(was Re: command line option: $|++)

2000-08-15 Thread Nathan Wiger
Peter Scott wrote: > > I don't want to be in the -io discussion; I just want to know the > conclusions that might affect -language. It seems silly to discuss > command-line options for setting $| here if there isn't going to be a $|. Ok, read this thread (4 messages long): http://www.mail-arch

Re: command line option: $|++

2000-08-15 Thread Peter Scott
At 11:35 AM 8/15/00 -0700, Nathan Wiger wrote: >Peter Scott wrote: > > > > Can someone knowledgeable on this issue speak to it? > > > > Will $| $/ $\ et al be retired, or be valid for some default filehandle? > > > > Will there still be default filehandles? > >There's been a big debate on the -io

Re: command line option: $|++

2000-08-15 Thread Nathan Wiger
Peter Scott wrote: > > Can someone knowledgeable on this issue speak to it? > > Will $| $/ $\ et al be retired, or be valid for some default filehandle? > > Will there still be default filehandles? There's been a big debate on the -io list about this. No clear decisions yet, but looks like the

Re: command line option: $|++

2000-08-15 Thread Peter Scott
At 12:31 PM 8/15/00 -0400, Casey R. Tweten wrote: >Frankly, they're both ugly. I personally like the *idea*, I'm not >advocating my solution. It would be wonderful if we could assign values >to Perl's special variables when we're doing a one line quick >hack. With a bit of luck, the special var

Re: command line option: $|++

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 10:03:55AM -0700, Nathan Wiger wrote: > Jonathan Scott Duff wrote: > > > > Well, now it's my turn to suggest something ;-> How about we give > > perl the ability to look for a .perlrc file? (Yes, I know the reasons > > against, but everything is up for grabs now right?

Re: command line option: $|++

2000-08-15 Thread Nathan Wiger
Jonathan Scott Duff wrote: > > Well, now it's my turn to suggest something ;-> How about we give > perl the ability to look for a .perlrc file? (Yes, I know the reasons > against, but everything is up for grabs now right? :-) If we do this, it should be off by default. csk/ksh make you turn i

Re: command line option: $|++

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 12:31:00PM -0400, Casey R. Tweten wrote: > Frankly, they're both ugly. I personally like the *idea*, I'm not > advocating my solution. It would be wonderful if we could assign values > to Perl's special variables when we're doing a one line quick > hack. Often, I will mo

Re: command line option: $|++

2000-08-15 Thread Casey R. Tweten
Today around 11:01am, Jonathan Scott Duff hammered out this masterpiece: : On Tue, Aug 15, 2000 at 09:14:20AM -0400, Casey R. Tweten wrote: : > This, by the way (even as a test) was agravating to me because in order to : > get decent output I really had to do this: : > : > cat /etc/passwd | perl

Re: command line option: $|++

2000-08-15 Thread Casey R. Tweten
Today around 11:52am, Philip Newton hammered out this masterpiece: : On Tue, 15 Aug 2000, Casey R. Tweten wrote: : : > cat /etc/passwd | perl -nfe 'print((split/:/)[0])' : > : > -f is just like $|=1 or, for example, $fh->autoflush(1); : : When did -f come into being? Or was this just a propose

Re: command line option: $|++

2000-08-15 Thread Nathan Wiger
Ed Mills wrote: > > Sounds like a good idea. I propose a commandline arg that gives info about > modules in @INC also. I emailed this to the list earlier but it never seemed > to make it. > > Something like > > perl -M 'Digest' > > might return: > > /usr/local/lib/perl5/site_perl/: >-r-

Re: command line option: $|++

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 09:14:20AM -0400, Casey R. Tweten wrote: > This, by the way (even as a test) was agravating to me because in order to > get decent output I really had to do this: > > cat /etc/passwd | perl -nfe '$\="\n";print((split/:/)[0])' cat /etc/passwd | perl -lnfe 'print((s

Re: command line option: $|++

2000-08-15 Thread Philip Newton
On Tue, 15 Aug 2000, Casey R. Tweten wrote: > cat /etc/passwd | perl -nfe 'print((split/:/)[0])' > > -f is just like $|=1 or, for example, $fh->autoflush(1); When did -f come into being? Or was this just a proposed new switch? > This, by the way (even as a test) was agravating to me because in

Re: command line option: $|++

2000-08-15 Thread Casey R. Tweten
time when i want to edit the previous line only a little : bit. i tried using ssfe (split screen front end, comes with sirc char : client) and i saw no output due to pipe buffering. so i had to put a : $|++ in the one liner to make it work. perl6 should have a command line : option to enable $| for

Re: command line option: $|++

2000-08-15 Thread Ed Mills
4733 Aug 5 1999 Digest.pm >From: Uri Guttman <[EMAIL PROTECTED]> >Reply-To: Uri Guttman <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: command line option: $|++ >Date: Tue, 15 Aug 2000 00:08:24 -0400 > >i just found an interseting little oddity i want

command line option: $|++

2000-08-14 Thread Uri Guttman
using ssfe (split screen front end, comes with sirc char client) and i saw no output due to pipe buffering. so i had to put a $|++ in the one liner to make it work. perl6 should have a command line option to enable $| for STDOUT. i haven't see any threads about perl's command line options