Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define a way to add interpreters #9

Open
sbragagnolo opened this issue Aug 22, 2016 · 3 comments
Open

define a way to add interpreters #9

sbragagnolo opened this issue Aug 22, 2016 · 3 comments

Comments

@sbragagnolo
Copy link
Collaborator

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.

@guillep
Copy link
Owner

guillep commented Oct 24, 2016

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

@sbragagnolo
Copy link
Collaborator Author

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.

@cdlm
Copy link
Collaborator

cdlm commented Oct 24, 2016

#! /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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants