Awesome Open Source
Awesome Open Source

Build Status MIT License


A prototype of a multi-syntax programming language.

Hivemind has a core language defined by its AST and configurable syntaxes acting like plugins.

The concept of "syntax" for hivemind is similar to

  • a theme for a text editor
  • a skin for a gui app
  • a json/html/xml template for a MVC web app

Syntaxes are defined using code-like examples for core ast nodes and they act in a bidirectional way:

  • they are used to parse source code using that syntax
  • and to render code in that syntax
  • source in each syntax is automatically transltable to another syntax

Tools for the language would also support representations of source grouped by class or methods or as a graph

Syntaxes look like that:

A pythonic syntax:

if <test>:

<left> = <right>

<function>(<<args:', '>>)


<object>.<label> = <right>

<left> <operation> <right>

[<<elements:', '>>]

method <method_name>(<<args:', '>>):

class <class_name>:

module <module_name>:

A lisp-like syntax

(if <test>

(define <left> <right>)

(method <method_name> (<<args:' '>>)


(update <object>.<label> <right>)

(<operation> <left> <right>)

(! <function> <<args:' '>>)

_(<<elements:' '>>)

(class <class_name>

(module <module_name>


pythonic example schemelike example


gem install hivemind


Run a file

hivemind <filename>

Translate a file into another syntax representation

hivemind render pythonic


  • Experiment with diffent syntaxes in different contexts
  • Use different sub-language seamlessly across the same codebase
  • A possible solution for the expression problem (just convert between different representations)


The core language is just a simple python/ruby-like language for now.


Created for the HackFMI 5

Future development

  • fluid folder/file structure representations
  • editor plugins
  • more syntaxes


Copyright 2016 Alexander Ivanov

Distributed under the MIT License.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
ruby (12,372
compiler (487
language (422
experiment (32

Find Open Source By Browsing 7,000 Topics Across 59 Categories