[Newbies] smalltalk program execution

Herbert König herbertkoenig at gmx.net
Tue Apr 19 16:10:23 UTC 2011


Hi Erlis,

EV> I have a some questions about program execution:

Not knowing your platform my reply is a bit unspecific, I can be more
specific on Windows.

EV> If I have a text file with some smalltalk code, is it possible to execute
EV> that code from the outside of the VM graphical interface?

If you specify a .st file in the command line to Squeak, it will be
executed. If you end the script with

SmalltalkImage current snapshot: false andQuit: true

Squeak will close after execution. In a recent image it may be
Smalltalk instead of SmalltalkImage current. I have no 4.2 handy.

EV> I'm looking a java like execution. Java as smalltalk use a VM to execute the
EV> code, but the way java execute the program, some people don't even know
EV> this. Due to the nature of smalltalk I don't know if what I'm asking is
EV> possible.

Googling Squeak headless will help you to make squeak run without any
visible UI. Assuming this was your question :-)

EV> -- these are other questions I have ---

One mail each topic helps that people with little time see that a
question is still unanswered.

EV> How are applications deployed in smalltalk?

Again only a rough sketch:

Smalltalk addToStartupList: MyClass will run
MyClass class side startUp: on startup.

At minimum you should disable the preferences to warn if no changes
file and to warn if no sources file. You can completely disable the
programmers facilities of Squeak, but then you can't debug into a
faulty image.

Use any installer builder (NSIS seems to be preferred by Windows
Squeakers, I used Inno Setup), to unzip your folder and create a
desktop or menu shortcut.

You can search Squeak dev or Squeak beginners on deploy, it's a FAQ.

EV> Once I have the image I can see how things are implemented. How do you do
EV> hide implementation that probably don't want other to see?

Disable Programmer facilities as described before. See my post here on
Jan 1st 2011 on "image not locking down" for details.

In theory you can debug any image file from another running image,
don't know if the tools readily exist. But then for dotNet assemblies
these tools seem to exist.


-- 
Cheers,

Herbert   



More information about the Beginners mailing list