Comments
by _why
A small object- and mixin-oriented (traits) language by _why.
    .ooo
      'OOOo
  ~ p ooOOOo tion ~
      .OOO
       oO      %% a little
         Oo    fast language.
        'O
         `
        (o)
    ___/ /          
   /`    \ 
  /v^  `  ,
 (...v/v^/
  \../::/
   \/::/ 

~ potion ~

Potion is an object- and mixin-oriented (traits) language.

Its exciting points are:

  • Just-in-time compilation to x86 and x86-64 machine code function pointers. This means she's a speedy one. Who integrates very well with C extensions.

    The JIT is turned on by default and is considered the primary mode of operation.

  • Intermediate bytecode format and VM. Load and dump code. Decent speed and cross- architecture. Heavily based on Lua's VM.

  • A lightweight generational GC, based on Basile Starynkevitch's work on Qish. http://starynkevitch.net/Basile/qishintro.html

  • Bootstrapped "id" object model, based on Ian Piumarta's soda languages. This means everything in the language, including object allocation and interpreter state are part of the object model. (See COPYING for citations.)

  • Interpreter is thread-safe and reentrant. I hope this will facilitate coroutines, parallel interpreters and sandboxing.

  • Small. Under 10kloc. Right now we're like 6,000 or something. Install sloccount and run: make sloc.

  • Reified AST and bytecode structures. This is very important to me. By giving access to the parser and compiler, it allows people to target other platforms, write code analysis tools and even fully bootstrapped VMs. I'm not as concerned about the Potion VM being fully bootstrapped, especially as it is tied into the JIT so closely.

  • Memory-efficient classes. Stored like C structs. (Although the method lookup table can be used like a hash for storing arbitrary data.)

  • The JIT is also used to speed up some other bottlenecks. For example, instance variable and method lookup tables are compiled into machine code.

Information updated 10/17/13
View Comments