Re: [Pharo-project] Command Line Interface using FFI

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [Pharo-project] Command Line Interface using FFI

Damien Pollet
On 29 January 2012 21:11, Guillermo Polito <[hidden email]> 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

> Gofer it
>     squeaksource: 'CLInterface';
>     package: 'ConfigurationOfCLInterface';
>     load.
> ConfigurationOfCLInterface load.
> To play with it write a script, for example, with the following:
> CLInterface start
> And then, from the command line
> CogVM -vm-display-null <image>
> 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 [ | ]

Pharo-coral mailing list
[hidden email]