On Tue, Jan 31, 2012 at 4:10 AM, Damien Pollet <damien.pol...@gmail.com>wrote:

> On 29 January 2012 21:11, Guillermo Polito <guillermopol...@gmail.com>
> wrote:
> > I've spent a few hours playing with Alien+FFI and I did want to have a
> > Command line interface to play and use as a quick browser.
>
> This is something I'd like to have as a part of Coral.
>
> What's your opinion on the FFI-libc approach compared to OSProcess? I
> was actually thinking of doing something like that using NativeBoost
> :)
>

There is a third option which just uses the stdio streams in
StandardFileStream.  this has been working in the Cog VMs for some time now.


> > Gofer it
> >     squeaksource: 'CLInterface';
> >     package: 'ConfigurationOfCLInterface';
> >     load.
> >
> > ConfigurationOfCLInterface load.
> >
> >
> > To play with it write a script, for example startCLI.st, with the
> following:
> >
> > CLInterface start
> >
> >
> >
> > And then, from the command line
> >
> > CogVM -vm-display-null <image> startCLI.st
> >
> >
> > What it does support?
> > - executes smalltalk expressions
> > - handles the errors and shows them into the stdout (so it does not
> explode
> > :P)
> > - stores variables as a workspace
> > Since I used standard C functions (fgets and printf only) this should
> work
> > on every platform from scratch (having a VM with FFI working, of
> course)...
> >
> > The problems I've ran so far:
> > - blocking FFI blocks the vm.  I've not tried yet to use threads through
> FFI
> > (and I don't know if it works.  Does it?).  But It should be great to
> start
> > a headless seaside server with a command line :/.
> >
> > Ok, it's a very simple thing, but it allows to execute a expression from
> a
> > remote server via ssh without doing much :).
> >
> > Guille
>
>
>
> --
> Damien Pollet
> type less, do more [ | ] http://people.untyped.org/damien.pollet
>
>


-- 
best,
Eliot

Reply via email to