Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
/ siren Public archive

[status: superseded by Purr] Sirën is an experimental context-based programming language with ad hoc multiple hierarchies, and multimethods.

License

Notifications You must be signed in to change notification settings

robotlolita/siren

Repository files navigation

Siren

Siren is an experimental prototype-based object-oriented language. It differs from existing languages in that it uses a single delegation slot for sharing (and cheap instantiation), but allows controlled lexical extensibility.

Getting started

Siren's support for arbitrary-precision arithmetic uses the bignum library, so you'll need to have a C++ compiler and the headers for the OpenSSL library.

Install the Node.js 4.0.0+ (you'll need WeakMaps and Symbols), Make, and Git. After that clone this repository, and run make compile. This will generate a bin/siren compiler/interpreter, and a REPL bin/isiren.

$ git clone https://github.com/robotlolita/siren.git
$ cd siren
$ npm install
$ make all
$ bin/siren

You can use the REPL to try out pieces of code interactively:

$ bin/isiren
Type :quit to exit (or ^D).

> 1 + 1
=> <Integer: 2>

You can run individual files with the same binary. There are examples in the examples/ folder:

$ bin/siren examples/trivial/hello-world.siren

You can compile things to plain JavaScript using the --compile flag, but you'll need to pass the proper runtime to the module in order to run it:

$ bin/siren --compile examples/trivial/hello-world.siren > hw.js
$ node -e "require('./hw.js')(require('./runtime))"
Hello, world

More

  • Feel free to ask @robotlolita anything related to this project on Twitter.

  • Things will eventually be added to the Wiki, but also blogged about on http://robotlolita.me/

About

[status: superseded by Purr] Sirën is an experimental context-based programming language with ad hoc multiple hierarchies, and multimethods.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •