> On 11 Apr 2018, at 21:44, Stephane Ducasse <stepharo.s...@gmail.com> wrote:
> 
> I did not know about the NeoConsole. Nice because I wanted to build a
> little REPL for my minilanguage implementation.

You are of course welcome to look at it.
But it is Pharo specific.
I use it to be able to hook/look into running headless server images.
For this it is super handy.

> Stef
> 
> On Wed, Apr 11, 2018 at 8:47 PM, Sven Van Caekenberghe <s...@stfx.eu> wrote:
>> Alistair,
>> 
>>> On 11 Apr 2018, at 19:42, Sven Van Caekenberghe <s...@stfx.eu> wrote:
>>> 
>>> I will send you some code later on.
>> 
>> Today I arranged for my NeoConsole code (that normally works over a network 
>> connection) to work over stdio. Although I am not yet happy with every 
>> aspect of the implementation, it does work (using unaltered Zn streams and 
>> code). The foll
>> 
>> $ cat /etc/issue
>> Ubuntu 16.04.4 LTS
>> $ mkdir pharo7
>> $ cd pharo7/
>> $ curl get.pharo.org/70+vm | bash
>>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  
>> Current
>>                                 Dload  Upload   Total   Spent    Left  Speed
>> 100  3036  100  3036    0     0  36799      0 --:--:-- --:--:-- --:--:-- 
>> 37024
>> Downloading the latest 70 Image:
>>    http://files.pharo.org/get-files/70/pharo.zip
>> Pharo.image
>> Downloading the latest pharoVM:
>>        http://files.pharo.org/get-files/70/pharo-linux-stable.zip
>> pharo-vm/pharo
>> Creating starter scripts pharo and pharo-ui
>> On a 64-bit system? You must enable and install the 32-bit libraries
>>   Please see http://pharo.org/gnu-linux-installation for detailed 
>> instructions
>> $ ./pharo Pharo.image config http://mc.stfx.eu/Neo ConfigurationOfNeoConsole 
>> --install=bleedingEdge
>> 'Installing ConfigurationOfNeoConsole bleedingEdge'
>> 
>> Loading 1-baseline of ConfigurationOfNeoConsole...
>> Fetched -> Neo-Console-Core-SvenVanCaekenberghe.24 --- http://mc.stfx.eu/Neo 
>> --- http://mc.stfx.eu/Neo
>> Loaded -> Neo-Console-Core-SvenVanCaekenberghe.24 --- http://mc.stfx.eu/Neo 
>> --- cache
>> ...finished 1-baseline
>> $ ./pharo Pharo.image eval NeoConsoleStdio run
>> Neo Console 
>> Pharo-7.0+alpha.build.760.sha.d2734dcabda799803c307365bcd120f92211d34a (32 
>> Bit)
>> pharo> 1+2
>> 
>> 3
>> pharo> 42 factorial
>> 
>> 1405006117752879898543142606244511569936384000000000
>> pharo> Stdio stdin
>> 
>> StdioStream: #stdin
>> pharo> ==
>> self: StdioStream: #stdin
>> class: StdioStream
>> file: a File
>> handle: #[148 213 25 107 160 197 105 247 0 0 0 0 0 0 0 0 0 1 255 1]
>> forWrite: false
>> peekBuffer: nil
>> pharo> show StdioStream>>#atEnd
>> StdioStream>>#atEnd
>> atEnd
>> 
>>        ^ file atEnd
>> pharo> get process.list
>> Morphic UI Process
>> Delay Scheduling Process
>> Low Space Watcher
>> Input Event Fetcher Process
>> Idle Process
>> WeakArray Finalization Process
>> CommandLine handler process
>> pharo> quit
>> Bye!
>> a NeoConsoleStdio
>> 
>> I know there are many approaches to a REPL, I don't claim mine is best, it 
>> is just the one that I have been using for years.
>> 
>> In the above, I do not depend on EOF - just to be clear. The point being 
>> that there is no immediate fundamental problem.
>> 
>> But there is something wrong with what is returned by Stdio stdin
>> 
>> Sven
>> 
>> 
>> 
> 


Reply via email to