Skip to content
Dr. Nicola Mingotti edited this page Feb 4, 2022 · 65 revisions

A programming language cookbook is something like StackOverflow, without the digging part and the try&pray experience. For a gentle and structured introduction to Cuis-Smalltalk, you should start with the The Cuis Book and Learning-Cuis more about this on the References.

Reliability. I am writing this notes while learning Cuis. Some of what I write may not be the best way to solve the problem, it may not even be correct. Be patient, double check! Since I use these recipes myself I am going to improve them in time.

Sorting principles. Topics order is intended to go from easy to difficult. From frequently necessary to rarely used. From needed at the beginning of the programming experience to needed by black belts. These three forces, as the 3 laws of robotics, regulate what chapter goes toward the top of the document. They hold also for sub-chapters and articles.

Contribution. If you wish to contribute send me a pull request.

Copyright. You have the right to read, print for your own use and contribute to the document. You can make external links to this document. You can not copy the document and make it available somewhere else on the Internet. You can't claim ownership. You can't bring the document to an editor and publish it. I, as the author of more than 99% of the words here displayed retain all rights as well as the right to change these rules.

  • Introduction. What you should expect from this book and the reason why I am writing it. STARTED.
  • Why Smalltalk?. For what reason should you learn another programming language which is also not so popular. Read on, there are very good reasons. STARTED.

Installation and start up

Cuis in its environment

Scripting

Things unique to Cuis and/or Smalltalk

Here are all the things that are totally unknown for anybody who never programmed in any Smalltalk.

About a general Class and Object

Data Structures

Strings

Collections

Streams

Date and time

Files and directories

You should keep in mind that Smalltalk uses files but it is not based on files. I copy here
part of a Juan mail to mailing list: "... The essential idea you need to be aware of when learning about all this is that Smalltalk uses files, but it is not file-based. What this means is that all the tools in the Smalltalk image (with the only exception of FileList and FileContentsBrowser) are NOT showing files, but live objects. The way them relate to files is usually not really important ...".

Processes

Uncategorized useful features

Run external programs

If you run Cuis in Linux/Unix, at to some extent also in the Mac, you can use thousands of already written shell
programs that solve the most diverse issues. Do you want to know how much free space is available on the disk?
How many wireless networks your computer can see? Run a R script to make a fantastic plot? These and thousands
other things are possible once you are able to leverage the power of Unix from Cuis.

You can perform this kind of operations with the module OSProcess included in Cuis or with the external package CommandShell. The second is easier the first is more lower level.

Networking and the Web

Databases

Scripting Cuis

This section is about setting Cuis to start up in the way you like it, on any image you may want to boot.

Scripting with Cuis

Is it possible to make Unix scripts with Cuis? Does it make any sense? This section explores these subject.

  • Initial considerations. here

Delivering an application written in Cuis

This sections explores ways in which you can have other people, non programmers, use the your coolest applications.

Morphic Cookbook

The compiler

This notes are taken reading the wonderful document "The HitcHiker's guide to the Smalltalk Compiler" by Vassili Bykov, here .

The Virtual Machine

Applications built on Cuis

TODO

These are reminders for me about things to do in the Cookbook or in Cuis

  • DEV. SpellChecker, for text panes in Cuis. It would be useful to be able to spellcheck comments in code. I like to put comments, without spell checker they are so full of bugs they appear really untrustworthy.
  • Video about class variables.
  • Page about ';' -- '::' -- 'yourself'.
  • Video about installation of Cuis, not so easy the first time
  • Video about updating Cuis, not obvious
  • Video about using the Transcript efficiently
  • Video about creation of a minimal GUI
  • Video about creation of a minimal application, runnable from Linux command line
  • Video about creation of a minimal application, runnable from Windows GUI
  • Video about making Tests, and discovering how to use existing classes with them
  • Video-or-page about variables, especially class variables
Clone this wiki locally