[Pharo-project] is there a way to pass a script to a vm without passing via a file?
Hi I would like to know if there is a way (may be with OSProcess to pass a script to a image or starting image) without creating a file? Stef
is that enough? cogVM foo.image evaluate "FileStream stdout nextPutAll: 'fubu'; crlf" On 2012-06-23, at 22:11, Stéphane Ducasse wrote:
Hi
I would like to know if there is a way (may be with OSProcess to pass a script to a image or starting image) without creating a file?
Stef
How do you make that work on Windows? Here, I do get the system opening its window and that's all. /Phil 2012/6/23 Camillo Bruni <camillobruni@gmail.com>
is that enough?
cogVM foo.image evaluate "FileStream stdout nextPutAll: 'fubu'; crlf"
On 2012-06-23, at 22:11, Stéphane Ducasse wrote:
Hi
I would like to know if there is a way (may be with OSProcess to pass a script to a image or starting image) without creating a file?
Stef
-- Philippe Back Dramatic Performance Improvements Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027 Mail: phil@highoctane.be| Web: http://philippeback.eu | Blog: http://philippeback.be High Octane SPRL rue cour Boisacq 101 1301 Bierges Belgium
On 2012-06-23, at 22:42, phil@highoctane.be wrote:
How do you make that work on Windows? Here, I do get the system opening its window and that's all.
/Phil
igor has been working on that. It seems that it is super hard to get window + stdin working at the same time under windoze btw I just fixed the commandline handling to support the stdin pipe
echo "1 + 2" | cogVM pipeIt.image eval 3
This Pharo thing is becoming seriously cool stuff :-) 2012/6/23 Camillo Bruni <camillobruni@gmail.com>
On 23 Jun 2012, at 22:11, Stéphane Ducasse wrote:
Hi
I would like to know if there is a way (may be with OSProcess to pass a script to a image or starting image) without creating a file?
Stef
Yes, there should be something like -eval or even better -doit I believe Camillo added some extra vm options at one time⦠Sven
On 2012-06-23, at 22:23, Sven Van Caekenberghe wrote:
On 23 Jun 2012, at 22:11, Stéphane Ducasse wrote:
Hi
I would like to know if there is a way (may be with OSProcess to pass a script to a image or starting image) without creating a file?
Stef
Yes, there should be something like -eval or even better -doit I believe Camillo added some extra vm options at one timeâ¦
no no all in the image :), see BasicCodeLoader
On 23 Jun 2012, at 22:25, Camillo Bruni wrote:
no no all in the image :), see BasicCodeLoader
Very nice, but you mean EvaluateCommandLineHandler is guess ? If I understand it correctly, it will always quit the image after evaluating something. Furthermore is print the results of the evaluation to stdout, no ? Sven
On 2012-06-23, at 23:50, Sven Van Caekenberghe wrote:
On 23 Jun 2012, at 22:25, Camillo Bruni wrote:
no no all in the image :), see BasicCodeLoader
Very nice, but you mean EvaluateCommandLineHandler is guess ?
If I understand it correctly, it will always quit the image after evaluating something. Furthermore is print the results of the evaluation to stdout, no ?
yes, I think that default behavior is pretty consistent with what I know from other languages. but yeah, maybe should add a default option --no-quit or so to keep the image open. otherwise there is still the st handler that keeps the image open (which I do not like that much either :/) at least both should work the same way IMO
participants (4)
-
Camillo Bruni -
phil@highoctane.be -
Stéphane Ducasse -
Sven Van Caekenberghe