Hacker News new | ask | show | jobs
by igouy 2705 days ago
> How do I run a "hello world" program from the command line?

You can load and run a smalltalk source file, at the OS command-line, something like —

    ./pharo Pharo.image st helloworld.st 
You can pre-load smalltalk source files, save a memory image, and use default startup behavior to run the saved bytecode —

    ./pharo helloworld.image
> deploy that to another machine

It's just moving files (VM + bytecode image) so — rsync, ssh

1 comments

> I just want a "hello world" example to get an idea what I am actually dealing with.

iirc something like —

    FileStream stdout nextPutAll: 'Hello, world'; cr.
You can do something like: `Stdio stdout nextPutAll: 'Hello, World!'.`
Are you suggesting that `FileStream stdout` doesn't work, or that using `Stdio stdout` is in some way better, or that `nextPutAll:` will add a newline, or that … ?
I think `FileStream` is deprecated in the new version of Pharo.
Thanks.