Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Squeak Startup Script from Debian
Last updated at 6:24 pm UTC on 14 October 2020
This page describes the squeak startup script in the Debian packages. The script is analagous to and is inspired by inisqueak. This page describes the rationale of the script and then gives its man page. The script and man page source are attached:
  1. squeak – the script
  2. squeak.sgml – the man page, in docbook format.

The main goal was that a new user can type squeak and get the expected behavior. They should not get a lecture about the proper invocation. They should not be given a lesson on image files and changes files. They should jump right into the Squeak world and be ready to play with the cool stuff, which is etoys, morphic, FM synthesis, and so on. Thus, the general strategy is to rename the VM to be squeakvm, so that the startup script can be called simply squeak.

This turns out to be nice for experienced users, too, so the script tries to accomodate them as well. Just because you know how to install files manually from /usr/share/squeak doesn't mean you have to or want to. But experienced users would like to be able to manage multiple image files, would like to specify extra VM parameters, and even would like to pass in arguments to their images.

Existing users are used to typing squeak foo.image. Since this is a common thing to want, and since it is a common situation, there is a special case for this particular command line.

More complex command lines require the image to be specified by an explicit -image argument. For example:
squeak -memory 100m -image foo.image

The explicit argument is necessary so that the script can reliably see which argument is the image file.

There are alternative strategies for the command line arguments, that were rejected for various reasons:
  1. The script could know how to parse every VM option, and thus reliably pick out the image name. Since the options are irregular, however, this is a lot of work. Further, the VM options are not fixed, which means that the script would need to be updated whenever the VM's options change.
  2. The VM options other than the image could be preceded by "–". This makes the command lines longer, however, and is especially bad if you try to pass arguments to the image:
    squeak foo.image -- -- arg1 arg2
    Yuck! One "–" is bad enough, and two is terrible.
  3. There could be a special option for VM arguments, e.g.:
    squeak -vm -memory,100m
    This is my favorite approach conceptually, because it is unambiguously parsable and because most users should not be entering VM arguments all the time. However, in practice, I know I have typed
    squeak -memory 100m
    too many times to be happy with this. Plus, people who use Squeak on machines without this script (assuming that such machines continue to exist :)) will find it weird.
  4. The VM arguments could be regularized, so that they may be detected algorithmically. I like this approach a lot, but politically and practically it seems difficult to make happen at this point. If that becomes a possibility, then the script's design could be revisited.

A final consideration was that people would like to be able to pass arguments to the squeak image. This is supported just like with the VM: you can either put in an explicit "–", or you can just stick them at the end of the command line if you think neither the script nor the VM will get confused by them.

Other notable little features:
  1. -image can be used along with auto-installation. If you do squeak -image temp then the script will install squeak into temp.image and temp.changes if those files do not already exist.
  2. In addition to gzipped images, the script allows bzip2 and uncompressed images. Also, the changes file is optional now; the script will happily install and run a bare changes-less image file. This is useful if you want to play with the plugin image.


Man Page

SQUEAK(1)							     SQUEAK(1)



NAME
       squeak -- Squeak computer authoring system

SYNOPSIS
       squeak  [filename]   [-install	| -list  | -l  | -run ]  [-image file-name]
       [-verbose  | -v ]  [vm options]	[-- image options]

DESCRIPTION
       The squeak command starts Squeak,  a  computer  authoring  system.   No
       arguments  are  necessary;  typing  squeak  alone should initialize any
       files you need in the current directory and then start Squeak.

       Squeak  uses  a	few  files  in	the  current  directory.    The   file
       squeak.image  holds  the  objects representing the entire stateof your
       world, including things such as open windows, a class  hierarchy,  tex-
       tual  notes,  prototype objects, and diagrams.  The file squeak.changes
       holds  a  log  of  any  program	code  you  have   written.    Finally,
       SqueakV*.sources  files are symbolic links to system-wide sources files
       holding program code that is common to all Squeak worlds.

OPTIONS
       -install  Run Squeak, but first initialize  the	present  directory  if
		 there	are  files missing.  If there is a choice of images to
		 install, then choose automatically.  No files will  be  over-
		 written.  This option gives the default behavior.


       -l

       -list	 Behave as if -install were specified, except that if an image
		 file is to be installed, let the  user  choose  from  a  list
		 which image to install.


       -run	 Do not install any files.  Either run Squeak, or fail.


       -image filename
		 Instead of using squeak.image to save the state of the world,
		 use filename.	Specifying the .image extension on filename is
		 optional.  The name of the changes file to use will be deter-
		 mined automatically.


       -v

       -verbose  Explain what files are being installed.


       vm options
		 Any unrecognized options are passed directly to squeakvm.


       -- image options
		 Any options following	a  double-hyphen  are  passed  to  the
		 Squeak world as it resumes.  By convention, many worlds treat
		 the first such option as the name of a file to load and  exe-
		 cute.


       For  convenience, an image may also be specified as the first argument.
       That is, the commandline squeak filename args is treated  the  same  as
       squeak -run -image filename args.

ENVIRONMENT
       SQUEAKVM  The  command  to use for the virtual machine.	The default is
		 the first squeakvm in PATH.


       SQUEAK_IMAGE_DIR
		 The directory holding available  Squeak  images  to  install.
		 The default is /usr/share/squeak.


       SQUEAK_IMAGE
		 The   filename   of   the  image  to  run.   The  default  is
		 squeak.image.


FILES
       /usr/share/squeak/*.image

       /usr/share/squeak/*.changes
		 Image and changes files that may be installed.  They may also
		 be  compressed with gzip(1) or bzip2(1), so long as an exten-
		 sion of .gz or .bz2 is added.


       /usr/share/squeak/squeak.image

       /usr/share/squeak/squeak.changes
		 The default image and changes files  to  install.   Typically
		 these	are  symbolic  links.  If they are links to compressed
		 files, then they should have .gz or  .bz2		exten-
		 sions matching the files they link to.


       /usr/share/squeak/SqueakV?.sources
		 Source files.


SEE ALSO
       squeakvm(1)

AUTHOR
       This manual page was written by Lex Spoon (lex at debian.org). Permission
       is granted to copy, distribute and/or modify this document in any way.