Zeroconf to execute playground in a pre-made image (winddows 10)?

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

Zeroconf to execute playground in a pre-made image (winddows 10)?

Fuhrmanator
Hello all,

I have a playground script that will analyze the first MSE model and produces output in a CSV file. 

I would now like to be able automate this, and I think Tudor Girba gave me a hint of using Zeroconf.

So far I have not been able to get it to work under Windows 10. The curl command works to get the image from get.pharo.org,  curl get.pharo.org | bash

However, the following attempts don't result in errors, but I don't get any useful output either:

    $ bash ./pharo Pharo.image --help

    $ ./pharo Pharo.image --help

    $ pharo-vm/PharoConsole.exe --headless Pharo.image --version

Does it work in Windows 10? I've tried in Git Bash and CMD.exe (the last command, since the bash commands don't work).

Cheers,

C. Fuhrman

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Zeroconf to execute playground in a pre-made image (winddows 10)?

Fuhrmanator
Just following up (answering my own questions). 

My "playground" can be stored in a "playground.st" file and executed with the zeroconf st Command Line Handler. I didn't catch that yes, Pharo is smalltalk == st :-). 

To load an MSE file programmatically (rather than the MSE button in the MoosePanel) I used this code (inspired by the MoosePanel code):

====

mooseModel := MooseModel new.

stream := FileStream readOnlyFileNamed: 'myMSEFile.mse'.
stream 
  ifNotNil: [ mooseModel importFromMSEStream: stream.
stream close ].

====

It's primitive (effective but not robust) to use "Transcript show:" to generate a .CSV file, especially with output going to stdout. I also got it to work with a Stream and even used NeoCSV.   

I installed ubuntu under a VirtualBox and got everything working there. Coming back to Windows 10, I realized now the Zeroconf commands DO work under Windows 10 (GitBash runs the ./pharo script and CMD.exe works with the call to pharo-vm\Pharo.exe). However, the output is sent to files called "stdout" and/or "stderr", which I was not expecting to see under Windows 10. Working again Linux set me straight :-)

Down in the Ubuntu rabbit-hole, with the latest 64-bit Pharo and since my work is using Roassal, I had to also install the 32-bit cairo library:

    sudo apt-get install libcairo2:i386 

It's not on the http://pharo.org/gnu-linux-installation (because it's probably Roassal?), but it seems like it could be useful to be there (otherwise it's a cryptic message and some Googling to find the answer). 

Another issue was related to the Moose 6.1 image missing the right version of Fame-Core. The solution was to install it https://github.com/moosetechnology/Moose/issues/1228 and save my image. 

Finally, all of the visualization scripts I developed in 5.x work under ubuntu and Windows 10 with the latest Pharo 6.1 with no changes to code (apart from what I mentioned above). 

Cheers!

Cris

On Thu, Aug 3, 2017 at 3:16 PM, Cris Fuhrman <[hidden email]> wrote:
Hello all,

I have a playground script that will analyze the first MSE model and produces output in a CSV file. 

I would now like to be able automate this, and I think Tudor Girba gave me a hint of using Zeroconf.

So far I have not been able to get it to work under Windows 10. The curl command works to get the image from get.pharo.org,  curl get.pharo.org | bash

However, the following attempts don't result in errors, but I don't get any useful output either:

    $ bash ./pharo Pharo.image --help

    $ ./pharo Pharo.image --help

    $ pharo-vm/PharoConsole.exe --headless Pharo.image --version

Does it work in Windows 10? I've tried in Git Bash and CMD.exe (the last command, since the bash commands don't work).

Cheers,

C. Fuhrman


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev