Re: [PHP-DEV] I hope this is the last email about this :) (was RFC:

2002-10-24 Thread Yasuo Ohgaki
Alan Knowles wrote:

Im +1 for reverting the patch - (for what it's worth)

Why?
Well - most 'average' (and below) PHP programmers when attempting to do 
CLI programming, will get a serious WTF reaction from wondering why when 
they 'echo' stuff, it doesnt appear. The more advanced Users can 
manually turn off flushing, but for most small, quick scripts (eg. 
50%+), this instant flush is going to be perfectly acceptable..

This makes 2+ for having auto flushing :)

BTW, real language (i.e. not shell) don't flush. Please let me
know if there is real language that do automatic flushing by
default.

In addition, is it too difficult to write this kind of code?

function prompt($prefix) {
 echo $prefix;
 flush();
}

I think this kind of code will be taught at the first
class of programming course. (I could be wrong,
since I don't know where people learned programming ;)

I probably disable automatic flushing almost always.
Why? My script will process XML and other formatted
text almost always. Auto-flushing is useless.

Let's guess something interesting.

How much % of scripts actually needs automatic flushing?
My guess is less than 1%. What is yours?

That said, does it still worth to have?

--
Yasuo Ohgaki




Anyway Just my 2c
Regards
Alan


It's a very _bad_ default. Fortunately, it's not released yet.
That's why I'm against it strongly.

IMO, flushing on every output by default is stupid setting.
If you ever programmed interactive programs, you should know
that unless you're ignorant about efficiency.

I guess my questions are too hard to be understood by you
compare to the last one. Derick, it seems you're alone so far.

http://news.php.net/article.php?group=php.devarticle=89995

Do you finally realize your argument actually did not make sense?
(Unless you need stupid PHP/CLI shell that requires start/end tag
to do anything, of course ;)

I'm going to fix it again unless many people want to make
PHP/CLI behave like a shell rather than programming language.

Alternatively, could you fix it again? (including Makefile.global)
Thank you and I hope this is the last mail about this.

PS: If you would like to write INI independent scripts, I
suggest you to use php.ini-recommended at least. You don't/
didn't know phps crashing and make test does not work well with
php.ini-recommended, nonetheless, you're insisting there is no
problems.

--
Yasuo Ohgaki









--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] I hope this is the last email about this :) (was RFC: CLI behave like SH or PERL/RUBY/PYTHON?)

2002-10-24 Thread Melvyn Sopacua
At 02:51 24-10-2002, Alan Knowles wrote:


Im +1 for reverting the patch - (for what it's worth)

Why?
Well - most 'average' (and below) PHP programmers when attempting to do 
CLI programming, will get a serious WTF reaction from wondering why when 
they 'echo' stuff, it doesnt appear. The more advanced Users can manually 
turn off flushing, but for most small, quick scripts (eg. 50%+), this 
instant flush is going to be perfectly acceptable..

My thoughts exactly. Defaults should work for the masses - it's not like 
it's enforced behavior, that is irreversible.


With kind regards,

Melvyn Sopacua
?php include(not_reflecting_employers_views.txt); ?


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] I hope this is the last email about this :) (was RFC:

2002-10-24 Thread Melvyn Sopacua
At 08:42 24-10-2002, Yasuo Ohgaki wrote:


I think this kind of code will be taught at the first
class of programming course. (I could be wrong,
since I don't know where people learned programming ;)


Why do you assume people learned programming?
I think Rasmus has made the case for PHP to be a language that
solves problems, not be academically correct, many times on this
list.


With kind regards,

Melvyn Sopacua
?php include(not_reflecting_employers_views.txt); ?


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] I hope this is the last email about this :) (was RFC:

2002-10-24 Thread Yasuo Ohgaki
Melvyn Sopacua wrote:

At 08:42 24-10-2002, Yasuo Ohgaki wrote:


I think this kind of code will be taught at the first
class of programming course. (I could be wrong,
since I don't know where people learned programming ;)



Why do you assume people learned programming?
I think Rasmus has made the case for PHP to be a language that
solves problems, not be academically correct, many times on this
list.


Sure, some people just learn programming by themselves.

Are you trying to say it justifies to have useless settings for
almost all scripts? I hope not.

They should learn such simple thing even to be Sunday programmer.
Beside, the knowledge is useful for other popular languages, C/C++,
Java, Perl, Python, Ruby, etc.

--
Yasuo Ohgaki



--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] I hope this is the last email about this :) (was RFC:

2002-10-24 Thread Melvyn Sopacua
At 16:42 10/24/2002 +0900, Yasuo Ohgaki wrote:


Melvyn Sopacua wrote:

At 08:42 24-10-2002, Yasuo Ohgaki wrote:


I think this kind of code will be taught at the first
class of programming course. (I could be wrong,
since I don't know where people learned programming ;)


Why do you assume people learned programming?
I think Rasmus has made the case for PHP to be a language that
solves problems, not be academically correct, many times on this
list.


Sure, some people just learn programming by themselves.


Indeed.


Are you trying to say it justifies to have useless settings for
almost all scripts? I hope not.


No, it justifies less academically correct __overridable defaults__, which are
intuitive for beginners.
Let me emphasize overridable defaults again, just to make sure you get
that I mean overridable defaults.


They should learn such simple thing even to be Sunday programmer.
Beside, the knowledge is useful for other popular languages, C/C++,
Java, Perl, Python, Ruby, etc.


Don't assume people ambition a career in programming, just because they use
a tool, to solve a specific problem they're facing.



/MELVYN

void wakeup() {
for(unsigned int cuppajava;drink();cuppajava++);
}


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] I hope this is the last email about this :) (was RFC:

2002-10-24 Thread Zeev Suraski
This has nothing to do with academical correctness.  Flushing or not 
flushing is not a matter of right or wrong, it's a matter of choice.

There's one 'real language' that does automatic flushing, it's called PHP, 
and it's going to stay that way.  Why other languages chose not to do it 
(maybe they don't have the facilities to do it?) is beside the point and 
not all that interesting.

Thank you.

Zeev

At 09:17 24/10/2002, Melvyn Sopacua wrote:
At 08:42 24-10-2002, Yasuo Ohgaki wrote:


I think this kind of code will be taught at the first
class of programming course. (I could be wrong,
since I don't know where people learned programming ;)


Why do you assume people learned programming?
I think Rasmus has made the case for PHP to be a language that
solves problems, not be academically correct, many times on this
list.


With kind regards,

Melvyn Sopacua
?php include(not_reflecting_employers_views.txt); ?


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DEV] I hope this is the last email about this :) (was RFC:

2002-10-24 Thread Ford, Mike [LSS]
 -Original Message-
 From: Yasuo Ohgaki [mailto:yohgaki;ohgaki.net]
 Sent: 24 October 2002 07:42
 To: [EMAIL PROTECTED]; Alan Knowles
 
 Alan Knowles wrote:
  Im +1 for reverting the patch - (for what it's worth)
  
 
 This makes 2+ for having auto flushing :)

Add one more -- or even more, as I 'd say I'm +1 for this!

 BTW, real language (i.e. not shell) don't flush. Please let me
 know if there is real language that do automatic flushing by
 default.

But PHP-CLI *is* a shell-scripting language, and therefore should behave
like one.  Other flavours of PHP aren't, and shouldn't.  QED.

 In addition, is it too difficult to write this kind of code?
 
 function prompt($prefix) {
   echo $prefix;
   flush();
 }
 
 I think this kind of code will be taught at the first
 class of programming course. (I could be wrong,
 since I don't know where people learned programming ;)

At university: learned half-a-dozen languages; *all* of them flushed streams
open on TTY either after every character, or (at line-end or when input
requested from same device).  I've been programming now for over 25 years,
and this is *still* the behaviour I expect by default when programming
command-line-executable scripts or programs.

 Let's guess something interesting.
 
 How much % of scripts actually needs automatic flushing?
 My guess is less than 1%. What is yours?

For PHP-CLI: more than 90%.
For PHP CGI or SAPI: much less than 1%.

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] I hope this is the last email about this :) (was RFC: CLI behave like SH or PERL/RUBY/PYTHON?)

2002-10-23 Thread Edin Kadribasic
I thought that we have agreed that you should revert the patch. You can now 
change the default behavior by both ini_set() and .the -d switch if you don't 
like the default.

Edin

On Thursday 24 October 2002 00:27, Yasuo Ohgaki wrote:
 Derick Rethans wrote:
  On Wed, 23 Oct 2002, Yasuo Ohgaki wrote:
 Yes, since it should not set in php_cli.c.
 It's a lot confusing, bad thing to do with current code,
 inefficient, bad default, etc.
 
  It's a very good default

 Derick,

 It's a very _bad_ default. Fortunately, it's not released yet.
 That's why I'm against it strongly.

 IMO, flushing on every output by default is stupid setting.
 If you ever programmed interactive programs, you should know
 that unless you're ignorant about efficiency.

 I guess my questions are too hard to be understood by you
 compare to the last one. Derick, it seems you're alone so far.

 http://news.php.net/article.php?group=php.devarticle=89995

 Do you finally realize your argument actually did not make sense?
 (Unless you need stupid PHP/CLI shell that requires start/end tag
 to do anything, of course ;)

 I'm going to fix it again unless many people want to make
 PHP/CLI behave like a shell rather than programming language.

 Alternatively, could you fix it again? (including Makefile.global)
 Thank you and I hope this is the last mail about this.

 PS: If you would like to write INI independent scripts, I
 suggest you to use php.ini-recommended at least. You don't/
 didn't know phps crashing and make test does not work well with
 php.ini-recommended, nonetheless, you're insisting there is no
 problems.


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php