Code Monkey home page Code Monkey logo

smalltalk.js's Introduction

smalltalk.js

A simple(!) Smalltalk interpreter written in TypeScript.

('interpreter' as in 'not really fast'. it would be much smarter to compile to javascript and let the javascript jit take it from there... which is what Amber is doing.)

My goal here is to learn Smalltalk and be able to run and share some examples I found in the literature on the web.

This is a work in progress, only tests so far, run with bun test (bun.sh 0.5.7).

History

The Smalltalk system with it's OOP, Live Coding, Code Browser, Refactoring tools, MVC, etc. has been a major influence on, not just the Apple Lisa/Macintosh, but also on Agile, Clean Code, Unit Testing (SUnit), TDD, Design Patterns, XP, MVVM, ...

Then it became overshadowed by C++, and finally became a niche in the 90's when IBM united with Sun Microsystems against Microsoft and switched from Smalltalk to Java and Sun moved the Strongtalk team from Smalltalk to Java.

VisualWorks is still around as a commerical grade Smalltalk (and also the origin of the MVVM pattern) while Squeak is aimed at the educational market and has replaced MVC with Morphic. E.g. the first versions of Scratch were written with Squeak.

Distribution

When you go to look for a Smalltalk implementation, you'll usually find these things:

  • Compiler

    Compiles Smalltalk into another language. Most compilers are part of a Smalltalk Image running inside a Smalltalk VM and generate bytecode suitable for that VM.

    E.g. Amber compiles Smalltalk into Javascript.

  • Interpreter

    Compiles and executes the code at once.

    E.g. GNU Smalltalk.

  • Virtual Machine (VM)

    The book Smalltak-80 The Language and It's Implementation describes a common Smalltalk VM.

    Smalltalk VMs usually mimic a complete operating system complete with a bitmapped display to be able to run old Smalltalk images.

    E.g. Squeak, which is based on the the book but was been adjusted to deliver better performance.

  • Just-In Time Compiler (JIT)

    A VM which also compiles parts into native machine code.

    E.g. Strongtalk, which adds optional type checking to Smalltalk and whose JIT layed the foundation for todays Java (HotSpot) and JavaScript (V8) VMs.

  • Image

    An image to run in a VM. Old ones are available starting from the 1972 till today.

Links

Docs

Code

smalltalk.js's People

Contributors

markandre13 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.