Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib l Mar 12, 2016
spec Fix spec Mar 12, 2016
syntaxes l Mar 12, 2016
.gitignore Implement parsing of custom user-defined grammars Apr 26, 2015
.travis.yml Ready Mar 12, 2016
LICENSE Add info Mar 12, 2016 S Mar 13, 2016
Rakefile Implement parsing of custom user-defined grammars Apr 26, 2015
hivemind.gemspec Ready Mar 12, 2016

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.