Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Ivan Enderlin @ Hoa
Hello, This project is interesting but it is also possible to do it only with PHP. As a proof of concept, I would like to share some links with you. First one: http://hg.hoa-project.net/Central/file/tip/Library/Console/Readline/Readline.php, which is highly hackable: we can add mappings (esc,

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Andrew Faulds
On 05/08/12 19:33, Ivan Enderlin @ Hoa wrote: On 05/08/12 12:39, Andrew Faulds wrote: Great, but couldn't you type some command which would screw it up, by accident? What do you mean? Say your implementation uses some global variable called $history. Now say I type $history = []; at the

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Ivan Enderlin @ Hoa
On 05/08/12 20:36, Andrew Faulds wrote: On 05/08/12 19:33, Ivan Enderlin @ Hoa wrote: On 05/08/12 12:39, Andrew Faulds wrote: Great, but couldn't you type some command which would screw it up, by accident? What do you mean? Say your implementation uses some global variable called

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Andrew Faulds
On 05/08/12 19:44, Ivan Enderlin @ Hoa wrote: On 05/08/12 20:36, Andrew Faulds wrote: On 05/08/12 19:33, Ivan Enderlin @ Hoa wrote: On 05/08/12 12:39, Andrew Faulds wrote: Great, but couldn't you type some command which would screw it up, by accident? What do you mean? Say your

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Ivan Enderlin @ Hoa
On 05/08/12 20:56, Andrew Faulds wrote: On 05/08/12 19:44, Ivan Enderlin @ Hoa wrote: On 05/08/12 20:36, Andrew Faulds wrote: On 05/08/12 19:33, Ivan Enderlin @ Hoa wrote: On 05/08/12 12:39, Andrew Faulds wrote: Great, but couldn't you type some command which would screw it up, by

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Andrew Faulds
On 05/08/12 22:03, Ivan Enderlin @ Hoa wrote: On 05/08/12 20:56, Andrew Faulds wrote: On 05/08/12 19:44, Ivan Enderlin @ Hoa wrote: On 05/08/12 20:36, Andrew Faulds wrote: On 05/08/12 19:33, Ivan Enderlin @ Hoa wrote: On 05/08/12 12:39, Andrew Faulds wrote: Great, but couldn't you type

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Johannes Schlüter
On Sat, 2012-08-04 at 21:49 +0200, Ferenc Kovacs wrote: Hi, As most of you know, the current php interactive shell is pretty much useless without compiling php --with-readline, but for the most users this the first impression what they experience (eg. using the php interactive shell without

Re: [PHP-DEV] Error handling brainstorming

2012-08-05 Thread Nicolas Grekas
Hi, having worked on the user land side of error handling [1]https://github.com/nicolas-grekas/Patchwork-Logger/blob/master/class/Patchwork/PHP/ErrorHandler.php, I wanted to share some more ideas that could help enhance the current error handling mechanism. Concerning throwing vs not throwing

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Ferenc Kovacs
On Mon, Aug 6, 2012 at 12:18 AM, Johannes Schlüter johan...@schlueters.dewrote: On Sat, 2012-08-04 at 21:49 +0200, Ferenc Kovacs wrote: Hi, As most of you know, the current php interactive shell is pretty much useless without compiling php --with-readline, but for the most users this

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Andrew Faulds
On 06/08/12 00:21, Ferenc Kovacs wrote: On Mon, Aug 6, 2012 at 12:18 AM, Johannes Schlüter johan...@schlueters.dewrote: On Sat, 2012-08-04 at 21:49 +0200, Ferenc Kovacs wrote: Hi, As most of you know, the current php interactive shell is pretty much useless without compiling php

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Johannes Schlüter
On Mon, 2012-08-06 at 00:22 +0100, Andrew Faulds wrote: to tell you the truth I'm just throwing around ideas and waiting for somebody with better understanding the actual implementation to help me out. ;) I wonder which is the actual problem to solve? ;-) Probably a better solution is to

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Ferenc Kovacs
On Mon, Aug 6, 2012 at 1:22 AM, Andrew Faulds a...@ajf.me wrote: On 06/08/12 00:21, Ferenc Kovacs wrote: On Mon, Aug 6, 2012 at 12:18 AM, Johannes Schlüter johan...@schlueters.dewrote: On Sat, 2012-08-04 at 21:49 +0200, Ferenc Kovacs wrote: Hi, As most of you know, the current php

Re: [PHP-DEV] php interactive shell without readline

2012-08-05 Thread Andrew Faulds
On 06/08/12 00:37, Ferenc Kovacs wrote: On Mon, Aug 6, 2012 at 1:22 AM, Andrew Faulds a...@ajf.me mailto:a...@ajf.me wrote: On 06/08/12 00:21, Ferenc Kovacs wrote: On Mon, Aug 6, 2012 at 12:18 AM, Johannes Schlüter johan...@schlueters.de

Re: [PHP-DEV] Error handling brainstorming

2012-08-05 Thread Stas Malyshev
Hi! Basically Etienne mentioned that the original issue was a good example why would we reconsider throwing exceptions from the core, which is currently discouraged.[2] Stan replied with the idea of turning the current error handling mechanism in php into using Exceptions for everything, but

Re: [PHP-DEV] Error handling brainstorming

2012-08-05 Thread Levi Morrison
. . .For example, if you try to open a file and the file isn't there, throwing exception is a very annoying behavior (yes I know some languages do that, IMO it's wrong). Because checking that the returned variable is `!== FALSE` is *way* better than throwing an exception, right? This type of