Scale icon indicating copy to clipboard operation
Scale copied to clipboard

define a way to add interpreters

Open sbragagnolo opened this issue 9 years ago • 3 comments

Now if I need a new interpreter but the scale basic one, i need to make a new image with the installation of the interpretation.

I should define a way to hook up interpreters from fuel files maybe, and define dynamically what's possible.

sbragagnolo avatar Aug 22 '16 09:08 sbragagnolo

Can you give an example of what you want?

1st) Will the separate interpreter be already loaded or downloaded? If it is loaded on demand, I would expect it would be cached somewhere.

2nd) Maybe we can change the interpreter just by changing the shebang:

#! /usr/local/bin/scale => #! /usr/bin/env scale

or even better =>

#! /usr/bin/env pharo scale

=>

#! /usr/bin/env pharo scale --interpreter InterpreterClass

guillep avatar Oct 24 '16 08:10 guillep

Dynamic magical variables that relies in code that may not be in the image. In the end is the import we were talking at the lab:

import file: 'myModule.st' into: #myMagicalVariable.

Or even also

import repository: 'github://whatever/project/bashFacade.st' into: #bash. bash chmod: '+x' to: myFileRef.

The only thing we need to add is a nice way to define this kind-of-functions and persist this code in a more pharo way, so for developing this modules we can use pharo it self.

sbragagnolo avatar Oct 24 '16 08:10 sbragagnolo

#! /usr/bin/env pharo scale --interpreter InterpreterClass

Beware, there are limitations on how many words after the shebang will be taken into account (depending on OS and shell versions, of course, because POSIX is a well-defined cough standard)

cdlm avatar Oct 24 '16 10:10 cdlm