Amber Smalltalk

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Amber Smalltalk
Amber Smalltalk Logo.svg
Original author(s) Nicolas Petton
Developer(s) Amber Community
Initial release September 13, 2011; 4 years ago (2011-09-13)
Stable release 0.14.18 / January 1, 2016; 38 days ago (2016-01-01)
Development status Active
Written in Smalltalk, JavaScript
Operating system Cross-platform
Type Object-oriented programming language, IDE
License MIT license
Website www.amber-lang.net

Amber Smalltalk, formerly known as 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.[1] The programming environment in Amber is called Helios.[2]

Key Features[edit]

Amber includes an integrated development environment with a class browser, Workspace, transcript, object inspector and debugger. Amber is written in itself, including the compiler, and compiles into JavaScript, mapping one-to-one with the JavaScript equivalent.[3] This one-to-one mapping with JavaScript differentiates Amber from other Smalltalk variants such as Pharo, Seaside, and Squeak.[1] 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 runs fast.

History[edit]

Amber was originally created by Nicolas Petton in 2011.[4] Amber was influenced by an earlier Smalltalk in browser project, called "Clamato", created by Avi Bryant.[4][5] Both Amber and Clamato use Parsing Expression Grammar (PEG) libraries for parsing Smalltalk sourcecode. Amber uses the JavaScript based PEG.js library[6][7] written by David Majda and Clamato uses PetitParser, a Smalltalk based library written by Lukas Renggli.[4] Both Clamato and Amber were influenced by earlier work by Dan Ingalls in developing the Lively Kernel implementation of Morphic in the web browser using JavaScript.[4][8]

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

Installing Amber[edit]

You need to install git, if you don't already have it. Writing down the following commands will install amber:[2]

# for OS X and Linux, you need the following two commands
npm config set prefix=~/npm
export PATH="$PATH:$HOME/npm/bin" # add to .bash_profile or .bashrc
npm install -g amber-cli

To create a new project, write:

# Create the project structure
mkdir example-project
cd example-project

# Create and initialize a new Amber project
amber init

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

amber serve

After that if you type http://localhost:4000 in your browser you will get to the application.

See also[edit]

References[edit]

  1. ^ a b Smalltalk Implementations (brief comparative summaries describing Smalltalk dialects)
  2. ^ a b Eng, Richard (2015-06-09). "A Gentle Introduction to Amber: Engaging in Smalltalk with Her, Reads Like English, and It’s Still Succinct!, "It’s alive! It’s alive!", The All-seeing Helios, Testing D3". Medium. Retrieved 2016-02-07. 
  3. ^ Petton, Nicolas. "Amber Smalltalk". amber-lang.net. Retrieved 2016-01-30. 
  4. ^ a b c d Schuster, Werner (August 22, 2011). "Smalltalk IDEs Come to the Browser: Jtalk, tODE, Lively Kernel 2.0". Retrieved October 20, 2011. 
  5. ^ "Clamato".  (Home page for the Clamato Smalltalk project)
  6. ^ "PEG.js".  (Home page for the PEG.js JavaScript parser generator project)
  7. ^ "Amber 0.9 Announcement".  (Announcement email of Amber 0.9 includes switch to PEG.js)
  8. ^ Shuster, Werner (June 22, 2010). "Dan Ingalls on the History of Smalltalk and the Lively Kernel". Retrieved October 26, 2011. 
  9. ^ "amber-smalltalk/amber". GitHub. Retrieved 2016-01-30. 
  10. ^ "amber-smalltalk/amber". GitHub. Retrieved 2016-01-30. 
  11. ^ Petton, Nicolas. "Installing Amber". docs.amber-lang.net. Retrieved 2016-01-30. 

External links[edit]