21st Century Smalltalk

March 31, 2007

Smalltalk Inspectors in Vst/Flash

Filed under: Lisp, Vista Smalltalk — pfisk @ 9:26 pm

lisptest21
Vista Smalltalk Site

Open Vista Smalltalk in your browser.

Above are some initial inspector tools for Vst/Flash – there is a DefaultInspector and an OrderedCollectionInspector. More will be added for specialized purposes such as inspecting graphic objects and communication streams.

These classes were built using the file editor in Vst/Apollo. At the moment, the editor is very primitive and lacks search/replace, automatic reformatting and bracket matching; these capabilities will be added as time permits. Tomorrow, I will begin adding basic support for graphics, animations and JSON encoding for server requests.

The latest version of Vst/Apollo can be downloaded here.

The lastest Lisp sources can be browsed online here.

March 30, 2007

Unix Everywhere

Filed under: General — pfisk @ 8:05 pm

Paul Murphy recently posted two excellent commentaries on the impact and history of Unix.

The first deals with the leveling impact of Unix on organizations.

Unix, of course, went the other way right from the beginning – As Dennis Ritchie put it: “What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form.”

And the second describes the environment in which Unix was created.

Thus Unix, the product, originated as advertised at Bell Labs, but Unix, the set of ideas, goes back to ancient Greece and the city philosophers, takes root in the the post depression expansions in technology and communications in the United States, and were first expressed in terms of computer technology during the Multics design battles in the early sixties -and, bottom line, Unix now is largely what Multics set out to be then.

My first introduction to Unix was an article in Byte magazine (about 1980) and I loved the combination of power and simplicity. In the years since, I have used Unix on machines ranging from PC’s to engineering workstations to large datacenters. Always, I have been impressed by its stability, flexibility and consistency across a range of platforms.

Microsoft Windows, of course, has a different history. It started out as a GUI to which operating system features were later added. People use Windows because the Win32 API has become the most popular user interface. Which brings me to subject of this post.

People are using computers increasingly as a gateway to the Internet and less as a standalone device. And so, new environments are emerging to reflect this new reality. There are highly interactive gaming environments (Everquest, World of Warcraft), virtual worlds (Second Life) and personalized browser environments (Google desktop) – and most of these new environments are not from Microsoft.

Whether the next GUI standard is from Adobe, Firefox, Mozilla or someone else is not as important as the fact that Microsoft is slowly losing control of the user interface.

When users interact with computers mainly through a next-generation browser or through a downloaded VM (Flash/Apollo), then the role of the OS becomes simply to manage files and system resources – a role that Unix fulfills both admirably and freely.

If Microsoft loses control of how people interface to their computers, then their reason to exist as a company all but vanishes.

IBM in 1983 – Microsoft in 2007

Filed under: General — pfisk @ 6:39 pm

In 1983, I was part of a team planning the IT strategy for a financial services company in Toronto. One of the major objectives was to minimize communication costs, since there were about 50 regional offices scattered from Halifax to Vancouver.

We wanted to do our data processing in-house using equipment from a single vendor – IBM. But after six months of trying to develop an acceptable plan, we decided to look for other alternatives.

IBM is a great company, and I have always admired their engineering. But, in 1983, they lacked any sort of strategic vision. Their product lines were as follows:

  • mechanical office equipment (eg Selectric typewriter)
  • single-user computers for accounting
  • single-user word processors
  • small computer systems (System 34/36)
  • medium computer systems (System 38)
  • mainframes running VM/CMS
  • mainframes running DOS/VSE
  • mainframes running MVS/XA
  • IBM PC/XT

Senior management wanted a plan that allowed for expansion but which required the minimal amount of retraining for personnel and the minimal amount of equipment replacement. IBM, on the other hand, wanted us to purchase a completely different system every time that a certain threshold was passed.

At one of our final meetings with the IBM salesmen, I made the remark that AT&T was entering the market with UNIX-based machines that ranged from single-user to hundreds of users. Their reaction was that UNIX “wasn’t suitable for business” – they also thought that the PC-XT “might replace some word processing functions” over the next several years.

Well, things happened differently.

Within a decade, PC’s wiped out typewriters, dedicated word processors, small accounting computers and (when attached to LAN’s) the small office computer systems. UNIX replaced most medium-scale computer systems and all but the largest mainframes.

And IBM went through a major crisis, losing (IIRC) about 200,000 employees between 1988 and 1992.

Microsoft today reminds me of IBM in 1983. There are major changes happening in the way that people use computers. There are new possibilities and new expectations – and Microsoft is failing to deliver.

The .Net initiative was announced in 2000. Seven years later, they still have not presented a coherent policy on how to implement this vision across their own products (IE6, XP, Win2000, Win98) or competing products (Firefox, Macintosh, Linux).

If Microsoft cannot present a compelling vision of the future, then the future will belong to somone else…

March 29, 2007

Vista Smalltalk Apollo Version Available

Filed under: Adobe, Vista Smalltalk — pfisk @ 6:13 pm

I have posted an Apollo version of Vista Smalltalk on the downloads page. Vst Apollo installs on Windows and Macintosh like any standard desktop application. Its main purpose for now is as a workbench for developing Vst applications.
Make sure that:
1) you have Flash 9 installed
2) you have the Apollo runtime installed
3) the *.lisp files should be in the runtime directory

I am now using the Apollo version of Vista Smalltalk to develop Smalltalk tools such as browsers and inspectors. Starting next week, I will begin work on the graphic animation classes.

When the workbench becomes more mature, I will link the Flex SDK compiler to allow writingActionScript primitives from within the environment.

March 28, 2007

3D in Flash

Filed under: 3D, Adobe — pfisk @ 2:00 pm

papervision1

Open 3D image in your browser (requires Flash 9).

The image above is a demo of PaperVision3D, which is an opensource Flash project. Currently the project is in private beta.

From the few samples that I have seen, 3D in Flash seems just as capable as 3D in WPF, except that it runs on many more platforms.

As soon as the PaperVision3D beta is released, I will add the necessary libraries to use it in Vista Smalltalk.

March 26, 2007

Standard Deviations

Filed under: Lisp, Smalltalk Language, Vista Smalltalk — pfisk @ 7:21 pm

There are two reference implementations that I use in building Vista Smalltalk:

  • Squeak for Smalltalk-80
  • Clisp for Common Lisp

On matters of language syntax, I try to make Vst as con-formant as possible to these two references. There are, however, some elements of standard Smalltalk (NCITS J20) and standard Lisp (ANSI X3.226:19) that I do not intend to implement.

fractional numbers fractions will not be part of the Vst core language. Support for fractions will be available as part of a library intended for teaching mathematics.
complex numbers complex arithmetic will not be part of the core language. It will be available as part of a math/engineering library.
big integers all numbers in Vst are 64-bit. There will be a library for big integers if there is a demand for it.

The parser for Vista Smalltalk is built using the Lisp reader, and it can be dynamically modified through the use of reader macros. So it is fairly straightforward to add new syntax (eg for fractions) as part of a library.

The issue of big integershas come up several times since the first release of Vista Smalltalk in 2004 (under the name Smalltalk/Vmx).

Both Lisp and Smalltalk were first developed in an era of very limited memory and many implementations probably used 16 or 24 bit integers. So, in the early days, it was essential to have “bignum” libraries in order to deal with many practical problems.

Today, memory is no longer a problem and I use 64-bit integers and floats in both the Flash and .Net versions of Vst giving 15-digits of precision over a range of +/- 1.79e+308. Almost all of the  coding solutions that I have seen over the years can be handled within those limits (with the possible exceptions of long running numerical simulations or cryptography).

My focus in Vista Smalltalk is to include features required for the next generation of applications:

  • IP connectivity
  • security levels
  • graphics
  • animations
  • serialization (JSON, etc)
  • P2P (XMPP, etc)

Lisp and Smalltalk are great languages. But to compete in the realm of Internet applications, they both need to be brought up to date.

March 23, 2007

Graphics Speed in Vista Smalltalk

Filed under: .Net Architecture, Adobe, Vista Smalltalk — pfisk @ 4:07 pm

The speed of graphics in Vista Smalltalk is almost entirely dependent upon the underlying platform (Flash or WPF) and largely independent of the speed of the Vst interpreter.

This is because all primitive graphic operations such as drawing shapes, coloring, shading, scaling, transitions and rotations are handled by the rich set of operations built into the host platform. Also, I am building a fairly extensive host language library (ie ActionScript or C#) of additional effects to model physical constraints such as gravity, collisions, friction and transfer of momentum.

So using animated graphics in Vista Smalltalk is mostly a question of setting initial parameters and then letting the animation run asynchronously in the background. And, if the machine has a graphics accelerator, it is likely that the animation will execute mainly in the graphics engine completely independent of the main processor.

In contrast, Squeak Smalltalk uses the interpreter to do all visual effects – so graphics speed is directly related to the speed of the interpreter.

Vista Smalltalk is based on the Squeak language syntax – but the implementations are very, very different.

File Editor in Apollo

Filed under: Adobe, Vista Smalltalk — pfisk @ 2:17 pm

lisptest20
Vista Smalltalk Site

Open Vista Smalltalk in your browser.

Above is an image of the file editor built into the Apollo version of Vista Smalltalk.

The build process for Vst/Flash now produces two executables:

  • a desktop executable which includes the Apollo libraries
  • a browser executable without the Apollo libraries

Loading scripts is done asynchronously to avoid freezing the user interface.  I am now adding a queuing mechanism to ensure that scripts will be executed in the order that they were submitted – this will allow time-dependent activities (such as loading class hierarchies) to be broken into multiple scripts.

Over the next few days, I hope to add enough graphic classes to enable building some basic Smalltalk tools such as inspectors and some simple animations.

The Vst/Apollo version will be available for download next week.

March 20, 2007

First Apollo Test

Filed under: Adobe, Vista Smalltalk — pfisk @ 10:51 pm

lisptest19
Vista Smalltalk Site

Open Vista Smalltalk in your browser.

Vista Smalltalk running in a Firefox in the top window and as a desktop application in the bottom window (built using Adobe Apollo).

A desktop version will be available in about a week.

Simple Architecture Overview

Filed under: General, Lisp — pfisk @ 5:07 pm

Here is a very brief architectural overview.

The architecture of Vista Smalltalk is best described as having three layers:

  1. User Language
  2. Lisp
  3. Primitive Base

———————-
User Language Layer
———————-
The term “User Language” indicates any language which is designed for end-user interaction, such as:

  •  Smalltalk
  •  Basic
  •  Python
  •  Other

There are currently grammars for Smalltalk and Basic - the “Other” category might include specialized languages for modelling or games. “User” languages are converted to and from Lisp s-expression format for internal use.

———–
Lisp Layer
———–
The Lisp used internally is a very small dialect designed specifically for building object-oriented applications. It is implemented as an interpreter written in ActionScript (for Flash) or C# (for .Net). When C# 3.0 is released, I plan to add a compiler to the .Net version.

 It features:

  • reader macros
  • macro expansions
  • standard list functions
  • closures
  • Xlisp-style messaging
  • Smalltalk-like objects

Advantages of using Lisp are:

  • macros
  • excellent serialization
  • mix data/code
  • basis for AI techniques

—————
Primitive Base
—————
The primitive base is written in the host language of the implementation – C# for .Net or ActionScript for Flash.

It has three components:

  • interpreter
  • object system
  • Lisp primitive functions

Language capabilities can be extended by adding new Lisp primitive functions which are then accessible by user languages such as Smalltalk.

———-
Summary
———-
The architecture has these goals:

  • replace Javascript with better languages
  • replace MXML/XAML with Lisp
  • portable accross Flash or .Net
  • extensible architecture
  • basis for next generation AI
Older Posts »

Blog at WordPress.com.