Re: [Pharo-users] How to write a little REPL

2017-11-30 Thread Todd Blanchard
Ian Piumarta wrote an XTerm in Squeak a long time ago.

No idea if it is still viable.

> On Nov 30, 2017, at 10:41 AM, Alistair Grant  wrote:
> 
> On 29 November 2017 at 21:14, Stephane Ducasse  
> wrote:
>> On Tue, Nov 28, 2017 at 9:35 AM, Alistair Grant  
>> wrote:
>>> On 28 November 2017 at 08:18, Stephane Ducasse  
>>> wrote:
 Sorry I wanted to have it in pharo :)
>>> 
>>> Are you talking about having a terminal inside Pharo?
>> 
>> Yes I'm having fun with a small scheme interpreter and I would like to have 
>> repl
> 
> OK.  The terminal part is actually CommandShell:
> 
> http://www.squeaksource.com/CommandShell.html
> 
> At the moment it is tied to OSProcess - which I haven't been able to
> get working in Pharo for a while, so it may need to be decoupled.
> Also, don't forget that OSProcess and OSSubprocess can't be loaded at
> the same time.
> 
> Cheers,
> Alistair
> 
> 
>>> OSProcess included something like this, i.e. open the window and have
>>> a prompt where you can enter expressions to be evaluated.  It would
>>> also run external processes and capture the output.
>>> 
>>> Cheers,
>>> Alistair
>>> 
>>> 
 On Mon, Nov 27, 2017 at 3:56 AM, Holger Freyther  
 wrote:
> 
>> On 27. Nov 2017, at 05:38, Stephane Ducasse  
>> wrote:
>> 
>> Hi
> 
> Hey!
> 
> 
>> I'm working on a mini scheme implementation and I would like to add a 
>> REPL and
>> I wonder how I can super easily get a read line.
> 
> The easiest might just be to use "rlwrap your-interpreter"? But I think 
> you want to allow multi-line input. So either link libreadline (GPL) or 
> libedit?
> 
> holger
 
>>> 
>> 
> 




Re: [Pharo-users] How to write a little REPL

2017-11-30 Thread Alistair Grant
On 29 November 2017 at 21:14, Stephane Ducasse  wrote:
> On Tue, Nov 28, 2017 at 9:35 AM, Alistair Grant  wrote:
>> On 28 November 2017 at 08:18, Stephane Ducasse  
>> wrote:
>>> Sorry I wanted to have it in pharo :)
>>
>> Are you talking about having a terminal inside Pharo?
>
> Yes I'm having fun with a small scheme interpreter and I would like to have 
> repl

OK.  The terminal part is actually CommandShell:

http://www.squeaksource.com/CommandShell.html

At the moment it is tied to OSProcess - which I haven't been able to
get working in Pharo for a while, so it may need to be decoupled.
Also, don't forget that OSProcess and OSSubprocess can't be loaded at
the same time.

Cheers,
Alistair


>> OSProcess included something like this, i.e. open the window and have
>> a prompt where you can enter expressions to be evaluated.  It would
>> also run external processes and capture the output.
>>
>> Cheers,
>> Alistair
>>
>>
>>> On Mon, Nov 27, 2017 at 3:56 AM, Holger Freyther  wrote:

> On 27. Nov 2017, at 05:38, Stephane Ducasse  
> wrote:
>
> Hi

 Hey!


> I'm working on a mini scheme implementation and I would like to add a 
> REPL and
> I wonder how I can super easily get a read line.

 The easiest might just be to use "rlwrap your-interpreter"? But I think 
 you want to allow multi-line input. So either link libreadline (GPL) or 
 libedit?

 holger
>>>
>>
>



Re: [Pharo-users] How to write a little REPL

2017-11-29 Thread Stephane Ducasse
On Tue, Nov 28, 2017 at 9:35 AM, Alistair Grant  wrote:
> On 28 November 2017 at 08:18, Stephane Ducasse  
> wrote:
>> Sorry I wanted to have it in pharo :)
>
> Are you talking about having a terminal inside Pharo?

Yes I'm having fun with a small scheme interpreter and I would like to have repl

>
> OSProcess included something like this, i.e. open the window and have
> a prompt where you can enter expressions to be evaluated.  It would
> also run external processes and capture the output.
>
> Cheers,
> Alistair
>
>
>> On Mon, Nov 27, 2017 at 3:56 AM, Holger Freyther  wrote:
>>>
 On 27. Nov 2017, at 05:38, Stephane Ducasse  
 wrote:

 Hi
>>>
>>> Hey!
>>>
>>>
 I'm working on a mini scheme implementation and I would like to add a REPL 
 and
 I wonder how I can super easily get a read line.
>>>
>>> The easiest might just be to use "rlwrap your-interpreter"? But I think you 
>>> want to allow multi-line input. So either link libreadline (GPL) or libedit?
>>>
>>> holger
>>
>



Re: [Pharo-users] How to write a little REPL

2017-11-28 Thread Clément Bera
 There is a REPL Image we use for VM debugging. It's a REPL in the command
line and in the VM Simulator.

File-in in attachement to load and start the REPL.

On Tue, Nov 28, 2017 at 8:18 AM, Stephane Ducasse 
wrote:

> Sorry I wanted to have it in pharo :)
>
> On Mon, Nov 27, 2017 at 3:56 AM, Holger Freyther 
> wrote:
> >
> >> On 27. Nov 2017, at 05:38, Stephane Ducasse 
> wrote:
> >>
> >> Hi
> >
> > Hey!
> >
> >
> >> I'm working on a mini scheme implementation and I would like to add a
> REPL and
> >> I wonder how I can super easily get a read line.
> >
> > The easiest might just be to use "rlwrap your-interpreter"? But I think
> you want to allow multi-line input. So either link libreadline (GPL) or
> libedit?
> >
> > holger
>
>


-- 
Clément Béra
Pharo consortium engineer
https://clementbera.wordpress.com/
Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq


StartReader.st
Description: Binary data


LoadReader.st
Description: Binary data


Re: [Pharo-users] How to write a little REPL

2017-11-28 Thread Alistair Grant
On 28 November 2017 at 08:18, Stephane Ducasse  wrote:
> Sorry I wanted to have it in pharo :)

Are you talking about having a terminal inside Pharo?

OSProcess included something like this, i.e. open the window and have
a prompt where you can enter expressions to be evaluated.  It would
also run external processes and capture the output.

Cheers,
Alistair


> On Mon, Nov 27, 2017 at 3:56 AM, Holger Freyther  wrote:
>>
>>> On 27. Nov 2017, at 05:38, Stephane Ducasse  wrote:
>>>
>>> Hi
>>
>> Hey!
>>
>>
>>> I'm working on a mini scheme implementation and I would like to add a REPL 
>>> and
>>> I wonder how I can super easily get a read line.
>>
>> The easiest might just be to use "rlwrap your-interpreter"? But I think you 
>> want to allow multi-line input. So either link libreadline (GPL) or libedit?
>>
>> holger
>



Re: [Pharo-users] How to write a little REPL

2017-11-27 Thread Stephane Ducasse
Sorry I wanted to have it in pharo :)

On Mon, Nov 27, 2017 at 3:56 AM, Holger Freyther  wrote:
>
>> On 27. Nov 2017, at 05:38, Stephane Ducasse  wrote:
>>
>> Hi
>
> Hey!
>
>
>> I'm working on a mini scheme implementation and I would like to add a REPL 
>> and
>> I wonder how I can super easily get a read line.
>
> The easiest might just be to use "rlwrap your-interpreter"? But I think you 
> want to allow multi-line input. So either link libreadline (GPL) or libedit?
>
> holger



Re: [Pharo-users] How to write a little REPL

2017-11-27 Thread p...@highoctane.be
Or https://github.com/guillep/Scale

but linux.

Phil

On Nov 27, 2017 03:56, "Holger Freyther"  wrote:

>
> > On 27. Nov 2017, at 05:38, Stephane Ducasse 
> wrote:
> >
> > Hi
>
> Hey!
>
>
> > I'm working on a mini scheme implementation and I would like to add a
> REPL and
> > I wonder how I can super easily get a read line.
>
> The easiest might just be to use "rlwrap your-interpreter"? But I think
> you want to allow multi-line input. So either link libreadline (GPL) or
> libedit?
>
> holger
>
>


Re: [Pharo-users] How to write a little REPL

2017-11-27 Thread p...@highoctane.be
NeoConsole could be an option.

https://github.com/svenvc/pharo-server-tools/blob/master/README.md

Phil

On Nov 27, 2017 03:56, "Holger Freyther"  wrote:


> On 27. Nov 2017, at 05:38, Stephane Ducasse 
wrote:
>
> Hi

Hey!


> I'm working on a mini scheme implementation and I would like to add a
REPL and
> I wonder how I can super easily get a read line.

The easiest might just be to use "rlwrap your-interpreter"? But I think you
want to allow multi-line input. So either link libreadline (GPL) or libedit?

holger


Re: [Pharo-users] How to write a little REPL

2017-11-27 Thread Pavel Krivanek
Do you want it in the command line or in the Morphic UI?

-- Pavel

2017-11-26 22:38 GMT+01:00 Stephane Ducasse :

> Hi
>
> I'm working on a mini scheme implementation and I would like to add a REPL
> and
> I wonder how I can super easily get a read line.
>
> Stef
>
>


Re: [Pharo-users] How to write a little REPL

2017-11-26 Thread Holger Freyther

> On 27. Nov 2017, at 05:38, Stephane Ducasse  wrote:
> 
> Hi

Hey!


> I'm working on a mini scheme implementation and I would like to add a REPL and
> I wonder how I can super easily get a read line.

The easiest might just be to use "rlwrap your-interpreter"? But I think you 
want to allow multi-line input. So either link libreadline (GPL) or libedit?

holger


[Pharo-users] How to write a little REPL

2017-11-26 Thread Stephane Ducasse
Hi

I'm working on a mini scheme implementation and I would like to add a REPL and
I wonder how I can super easily get a read line.

Stef