Giter Site home page Giter Site logo

crcx / littlesmalltalk Goto Github PK

View Code? Open in Web Editor NEW
132.0 12.0 27.0 2.89 MB

Archive of Little Smalltalk (with updates to work on modern platforms). Also collects forks and documentation on this historic system.

Home Page: http://forthworks.com/lst/

License: Other

OpenEdge ABL 1.63% Smalltalk 29.27% C++ 1.03% C 62.35% Shell 0.12% CSS 0.02% JavaScript 0.23% Makefile 0.76% Java 1.71% HTML 0.21% Lex 0.25% Yacc 0.74% Roff 1.64% StringTemplate 0.03% DIGITAL Command Language 0.01%

littlesmalltalk's Introduction

Little Smalltalk

This contains the implementations of A Little Smalltalk from the former "A Little Smalltalk" project. I'm not actively working on any of these now, but keep the sources here to help keep this historical system from being lost.

Versions

v1

The original, and therefore oldest implementation. As of November 2014, this is working under OS X Yosemite on a 2013 MacBook Air.

v2

As of November 2014, this partially builds under OS X Yosemite, but fails to run.

v3

This is the version I've done the most work on. I've tested it on various Linux and OS X releases.

v4

A significant rewrite, this is fairly modern and has a significantly smaller and simpler implementation.

As of April 2017, this version:

  • Works on 64-bit, OS X, and Cygwin (at least it doesn't crash on light testing) and also when compiled with -m32 for 32-bit mode.

v5

An updated variation of LST v4. This was being worked on by Danny Reinhold and others, but has been frozen since a server hack on the littlesmalltalk.org website.

This is working on OS X Yosemite as of November 2014.

smallworld

A Java implementation.

Credits

My thanks go to Timothy Budd for creating this, Danny Reinhold for obtaining permissions to release and update these, and Dmitry Geurkov for sending me patches to fix several issues with lst1.

littlesmalltalk's People

Contributors

blakemcbride avatar crcx avatar darius 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  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  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  avatar

Watchers

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

littlesmalltalk's Issues

lst1 not running

Hi, I would like to try 'lst1' to have the closest system to the one described in the 'Little Smalltalk' book.
It compiles but it does not run, i get the following output (Linux Debian 64bit)

$> ./st 
respond error: new:
argument type not correct for primitive 129
Dictionary: backtrace. message  new
free(): double free detected in tcache 2
Aborted

The lst4 compiler is very slow

The compiler in version 4 takes multiple seconds to compile examples/disasm.st, which is only 215 lines long. I started looking into why, and this issue is just to record what I found for anyone else who might want to dig further.

The obvious guess is that this is the first version where the compiler is itself in Smalltalk instead of C, and Little Smalltalk is just that slow at everything. But that's not the reason: on a simple benchmark it executes millions of method calls per second.

I extended lst4 with call-count profiling -- unfortunately, the results don't really clear it up to me. Here are the methods called in compiling examples/disasm.st, with the count of how many calls for each:

callcount.txt

(Some of the numbers are inflated slightly because it also recorded counts for compiling the code that dumps the counts. But those mixed-in counts are under 4% of the counts for disasm.st, so I'm not going to the work to split them out.)

Clearly it's heavy on the string and array ops, but it's not obvious to me what higher-level code is making them pile up. A fancier profiler that also tracked the callers of the heavily-called methods would help. Or maybe just interrupting execution at random moments and printing the backtrace.

In summary: compiling a 5k-byte source file needs millions of string and array operations -- on the order of a couple thousand for each byte. There are some obviously quadratic algorithms in the compiler, but I couldn't see a likely candidate for which, on casual inspection.

Link updates for Java versions of SmallWorld

The smallworld directory contains a version that is not working anymore ( due to ArrayIndexOutOfBound because of implementation assumption of Object.hashCode() which has changed over time) - The author Russell Allen has recently updated his 2007's version here: https://github.com/russellallen/SmallWorld

So probably worth replacing the contents of the smallworld directory with an .md linking to that repo?

Also there is another link worth adding: to a working version of SmallWorld here: https://github.com/ericscharff/SmallWorld where the author Eric Scharff has made independent refactoring - also it contains some of the original classes referenced in Russels' online tutorials (i.e. Image, Color) here: http://web.engr.oregonstate.edu/~budd/SmallWorld/Book/index.html . Curiously, Russel has temporarily removed those classes in the 2007 version and 2015 version, but they are in this one from Eric, which is cool because one can play with Turtle Graphics...

They both run fine on current OSX / Java 8 setup (Eric's requires gradle to build).

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.