Pre-releasing Bee Smalltalk

Today marks a key milestone in Bee project: we are realizing Bee main sources and libraries to the public sphere! Do not get too excited yet. This is stated as a pre-release, because many things are yet missing and as the license is CC-BY-NC (for now). Also, there's no way to browse code like in a complete smalltalk environment, nor to rebuild the kernel.

You can consider this as just a small preview of what the system is going to be like internally. There are two kinds of files: SLLs are the binary smalltalk libraries, SMLs contain the source code of their respective libraries. bee.sll is the main executable (it is just an .exe file, you can rename and double-click). In case no arguments are passed, a *REALLY* basic command line interface is shown, where you can enter some Smalltalk code:

$> bee
Welcome to bee.
command line interface is waiting for you
> 3+4+5
12
> 3 class
SmallInteger
> | o | o := Object new. o size

0


If you pass a file, like this:

$> bee script.st

bee will load the nativizer and compiler and try to compile and execute the file sources. In linux (with wine) you can write a script like:

#!/usr/bin/wine bee.sll

Transcript show: 'hello bee'

You can also execute:

$> bee loadAndRunLibrary: <libname>

which will load the library (allowing to execute code without loading the compiler and nativizer). I think the most interesting thing to look for now are the implementations of the primitives. You can go to your favourite smalltalk to inspect

CompiledMethod allInstances select: [:cm | cm primitiveNumber > 0]

and then check in bee.sml how we implemented them (be sure to look at the bootstrapped version and not the Host VM one, we are writing both for now).

SLL files may or may not contain native code. In the case of the Kernel library (bee.sll), course native code is present (because you require some machine code to execute). Also, the JIT contains native code (to generate native code you also need a native native code generator).  Anything else doesn't require native code (but may contain it). For example, for now the compiler doesn't contain any native code. When loaded, the nativizer generates machine code just in time when methods are executed.

That's all for now, I'll be showing more details at ESUG, see you!



Comentarios

  1. The link to GitHub is not available anymore ... any update?

    ResponderEliminar
    Respuestas
    1. Hi, we had to pull it for some time to make adjustments. We hope we'll be able to upload it again soon. We've been silently but steadily working on bee, if interested you can check the videos of the Smalltalks2014 here

      https://www.youtube.com/playlist?list=PLCGAAdUizzH0-aox_bwLBztVCUhRhR7yd

      cheers!

      Eliminar
  2. One year passed ... any news on this?

    ResponderEliminar
    Respuestas
    1. Underneath we have been doing huge advances in the project. The self-hosted VM is working nicely, it already supports loading the full environment and even doing GC almost without crashes. Though in open sourcing, there are a few issues to resolve yet, we just have be patient :/. Meanwhile, I expect to write in the blog more often from now on.

      Eliminar

Publicar un comentario

Entradas populares de este blog

Design principles behind Bee Smalltalk's Execution Engine

Connecting the dots