Kallisys
Latest News

07/16/2007:
[Newton] Einstein becomes OpenEinstein

05/31/2006:
[Newton] Einstein Platform 2006.6

01/14/2006:
[Newton] WWNC 2006

06/04/2005:
[Newton] einstein em UP2

05/26/2005:
[Mac] toolserver(1) 1.2

Cette page en français  This page in English About language detection 
Valid HTML 4.01!  Valid CSS!  Triple-A WCAG logo 

Fortunes icon Fortunes, Random quotes for your amusement

Introduction

Fortunes is the Newton version of the famous Unix software.

This software was written with Victor Rehorst and Michael Vacík.

When you power on your Newton (or just after having entered the pin), Fortunes shows a quote selected randomly among the quotes you have entered in the software. You can also set the fortune to disapear after a delay.

Quotes can also be in packages. This allows to handle them easily and to have them compressed on the Newton. Victor built the packages for the usually available fortunes on Unix, you can find them there.

Download

.sit.hqx file

Fortunes 1.0 (MacOS archive)

.zip file

Fortunes 1.0 (Zip archive)

Build Fortune Packages

Put fortunes in packages allows to have them compressed on the Newton and also to handle them easily. When the Fortunes software looks for a quote to show, it looks for package stores which name's ends with "Fortunes:Kallisys". Then, it looks for a soup called "Fortunes:Kallisys" on these stores and on the usual stores.

This soup should have entries in one of the two following possible formats:

  • As Unicode string: the class slot is '|Fortune@Fortunes:Kallisys|, the quote is a Newton string (hence UCS-2 encoded) in the text slot.
  • As US ASCII 7-bits: the class slot is '|Fortune/ASCII@Fortunes:Kallisys|, the quote is in the binary slot and it's a binary with the text encoded in ASCII 7 bits (without any null character terminator).

This soup should have two indices, one for the timestamp slot (int) and one for the labels slot (tags).

If you have MPW, MacPerl and NTK for Macintosh, you can download this sample which, from a Unix Fortune file, will generate a Newton package:

.sit.hqx file

Building your own fortunes (MacOS archive)

NewtonScript interface

Fortunes was first written to include random fortunes on my Newton Powered website.

If you want to get a fortune chosen randomly or if you want to show the fortune dialog from a script, you can use the two next methods:

  • fortunesApp:GetRandomFortune()
    Return a fortune chosen randomly as a NewtonScript string.
  • fortunesApp:LoginHandler()
    Show a fortune chosen randomly

The application symbol is '|Fortunes:Kallisys|. You can get a reference to it with:

local frame fortunesApp := GetRoot().|Fortunes:Kallisys|;

Change History

  • 06/15/2001 1.0
    • Initial release of the software