Supriya Ghosh (Editor)

Amber Smalltalk

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Original author(s)
  
Nicolas Petton

Repository
  
lolg.it/amber/amber

Developer(s)
  
Amber Community

Development status
  
Active

Initial release
  
September 13, 2011; 5 years ago (2011-09-13)

Stable release
  
0.15.1 / February 6, 2016; 11 months ago (2016-02-06)

Amber Smalltalk, formerly named Jtalk, is an implementation of the Smalltalk-80 language that runs on the JavaScript runtime of a web browser. It is designed to enable client-side development using the Smalltalk programming language. The programming environment in Amber is named Helios.

Contents

Key features

Amber includes an integrated development environment (IDE) with a class browser, Workspace, transcript, object inspector, and debugger. Amber is written in itself (is self-hosting), including the compiler, and compiles into JavaScript, mapping one-to-one with the JavaScript equivalent. This one-to-one mapping with JavaScript differentiates Amber from other Smalltalk variants such as Pharo, Seaside, and Squeak. Starting the Amber IDE requires Node.js. Amber doesn't run slowly on a bytecode virtual machine due to its convenient mapping to JavaScript, which makes compiled code run fast.

History

Amber was originally created by Nicolas Petton in 2011. Amber was influenced by an earlier Smalltalk in browser project, named Clamato, created by Avi Bryant. Amber and Clamato both use parsing expression grammar (PEG) libraries to parse Smalltalk source code. Amber uses the JavaScript based PEG.js library written by David Majda. Clamato uses PetitParser, a Smalltalk-based library written by Lukas Renggli. Clamato and Amber were both influenced by earlier work by Dan Ingalls in developing the Lively Kernel implementation of Morphic to run in web browsers via JavaScript.

Starting with version 0.12.0, Amber modules compile to asynchronous module definition (AMD). Starting with version 0.12.6, the development helper command-line interface (CLI) tool is extracted to dedicated module amber-cli, which can be installed from npm; and setting up the project and its JavaScript ecosystem (bower, npm, grunt) is greatly simplified using this CLI tool by issuing amber init and answering a few questions. This makes setting Amber Smalltalk easier for people with little JavaScript experience.

Installing

To install Amber, Git must be installed first, if it is not already. The following commands will install Amber:

To create a new project, write:

"amber init" step will lead to some questions about the project. For most of them, a default answer can be set. The next step is to start the server:

amber serve

After that, typing http://localhost:4000 in the browser will get to the application. Most browsers will block Helios pop-ups by default, so browser settings may need changing to allow the Helios application popup to appear.

References

Amber Smalltalk Wikipedia