Giter Club home page Giter Club logo

trufflesom's Introduction

TruffleSOM - The Simple Object Machine Smalltalk implemented using the Truffle Framework

Introduction

This is the repository for TruffleSOM, an implementation of the Simple Object Machine (SOM). SOM is a minimal Smalltalk dialect that was used to teach VM construction at the Hasso Plattner Institute. It was originally built at the University of Århus (Denmark) where it was used for teaching and as the foundation for Resilient Smalltalk.

In addition to TruffleSOM, other implementations exist for Java (SOM), C (CSOM), C++ (SOM++), and Squeak/Pharo Smalltalk (AweSOM).

A simple Hello World looks like:

Hello = (
  run = (
    'Hello World!' println.
  )
)

TruffleSOM is a Truffle-based implementation of SOM, including SOM's standard library and a number of examples. Please see the main project page for links to other VM implementations.

Obtaining and Running TruffleSOM

To checkout the code, run:

git clone --depth 1 https://github.com/graalvm/mx.git
git clone https://github.com/SOM-st/TruffleSOM.git
export PATH=$PATH:`pwd`/mx

TruffleSOM uses the mx build tool, which is easiest to use when on the PATH.

After downloading the git repositories, TruffleSOM can be build with:

cd TruffleSOM
./som --setup labsjdk  # downloads a compatible JDK
mx build

And now we, can execute tests with:

./som -G -cp Smalltalk TestSuite/TestHarness.som

A simple Hello World program is executed with:

./som -G -cp Smalltalk Examples/Hello.som

To work on TruffleSOM, mx can generate project definitions for Eclipse, IntelliJ, and NetBeans. Chose the one you prefer:

mx eclipseinit
mx intellijinit
mx netbeansinit

TruffleSOM uses the Graal compiler to reach state-of-the-art performance. To use it, we need to compile it together with TruffleSOM:

mx --env libgraal build

Afterwards, we can run a benchmark, and observe that the initial iterations take much longer, but after a while we reach magnitudes faster execution speeds:

./som -cp Smalltalk Examples/Benchmarks/BenchmarkHarness.som Mandelbrot 100 500

Information on previous authors are included in the AUTHORS file. This code is distributed under the MIT License. Please see the LICENSE file for details.

Build Status

Thanks to GitHub Actions, all commits of this repository are tested. The current build status is: Build Status

YourKit

This Project makes use of the Yourkit profiler to help find performance bugs and aid in our research of profilers.

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

Yourkit Logo

trufflesom's People

Contributors

charig avatar gpummer avatar humphreyhcb avatar smarr avatar sophie-kaleba avatar zapster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.