https://github.com/estebanlm/pharo-remoteinterface
The remote interface is a very simple framework to spawn and comunicate pharo processes (images), through the standard IO
https://github.com/estebanlm/pharo-remoteinterface
glib pharo
Last synced: 3 months ago
JSON representation
The remote interface is a very simple framework to spawn and comunicate pharo processes (images), through the standard IO
- Host: GitHub
- URL: https://github.com/estebanlm/pharo-remoteinterface
- Owner: estebanlm
- License: mit
- Created: 2022-12-28T16:49:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-10T13:37:15.000Z (almost 3 years ago)
- Last Synced: 2025-04-06T15:39:24.975Z (about 1 year ago)
- Topics: glib, pharo
- Language: Smalltalk
- Homepage:
- Size: 109 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pharo Remote Interface
The Pharo Remote Interface (RI) is a very simple framework to spawn and comunicate pharo processes (images), using the standard IO files and STON ([Smalltalk Object Notation](https://github.com/svenvc/ston)) as communicating pipes.
[](https://github.com/estebanlm/pharo-remoteinterface/actions/workflows/runTests.yml)
The RI package uses the GIO functionality present in Glib ([bindings can be found here](https://github.com/pharo-spec/gtk-bindings)) to spawn and communicate process.
## Install
```Smalltalk
Metacello new
repository: 'github://estebanlm/pharo-remoteinterface';
baseline: 'PharoRI';
load.
```
## Usage
The easiest way to use it is just executing:
```Smalltalk
runner := RmRemoteRunner new.
runner spawn.
```
and then you can execute commands synchronously:
```Smalltalk
runner runCommand: [ 42 factorial ]
```
or asynchronously:
```Smalltalk
runner
runCommand: [ 42 factorial ]
onSuccess: [ :result | result inspect ]
```
**IMPORTANT:** The blocks passed to the spawned image need to be "clean blocks", for obvious reasons they can't have references to `self`, `super` or local variables.
## Monitoring the remote image
There is a small tool that help to monitor what happens in the spawned image, you can open it by executing:
```Smalltalk
RmRunnerMonitorPresenter open.
```
To use it, you need first to enable the logging on the remote image:
```Smalltalk
runner listenToLog.
```
## Using PharoRI for testing
TODO