All Projects → alehander92 → Hivemind

alehander92 / Hivemind

Licence: mit
a multi-syntax language

Programming Languages

ruby
36898 projects - #4 most used programming language
language
365 projects

Projects that are alternatives of or similar to Hivemind

Impala
An imperative and functional programming language
Stars: ✭ 118 (-11.28%)
Mutual labels:  compiler
Phplrt
PHP Language Recognition Tool
Stars: ✭ 127 (-4.51%)
Mutual labels:  compiler
Jphp
JPHP - an implementation of PHP on Java VM
Stars: ✭ 1,665 (+1151.88%)
Mutual labels:  compiler
Modelchimp
Experiment tracking for machine and deep learning projects
Stars: ✭ 121 (-9.02%)
Mutual labels:  experiment
Cperl
A perl5 with classes, types, compilable, company friendly, security
Stars: ✭ 125 (-6.02%)
Mutual labels:  compiler
Md
A markdown parser and compiler. Built for speed.
Stars: ✭ 128 (-3.76%)
Mutual labels:  compiler
Coq Of Ocaml
Import OCaml programs to Coq 🐓 🐫
Stars: ✭ 117 (-12.03%)
Mutual labels:  compiler
Naskah
Bahasa pemrograman dengan sintaks Bahasa Indonesia (Programming language with Indonesian syntax) 🇮🇩
Stars: ✭ 132 (-0.75%)
Mutual labels:  compiler
Asterius
A Haskell to WebAssembly compiler
Stars: ✭ 1,799 (+1252.63%)
Mutual labels:  compiler
Ocaml Protoc
A Protobuf Compiler for OCaml
Stars: ✭ 129 (-3.01%)
Mutual labels:  compiler
Reading
A list of computer-science readings I recommend
Stars: ✭ 1,919 (+1342.86%)
Mutual labels:  compiler
Mcscript
A programming language for Minecraft Vanilla
Stars: ✭ 124 (-6.77%)
Mutual labels:  compiler
Pl0 Compiler
Compiler written for PL0 programming Language. Written in C, for COP3402 class from UCF.
Stars: ✭ 128 (-3.76%)
Mutual labels:  compiler
One
OneLang: The One System Programming Language. (release as soon)
Stars: ✭ 120 (-9.77%)
Mutual labels:  compiler
Instapack
All-in-one TypeScript and Sass compiler for web applications! 📦 🚀
Stars: ✭ 131 (-1.5%)
Mutual labels:  compiler
Serverless Layers
Serverless.js plugin that implements AWS Lambda Layers which reduces drastically lambda size, warm-up and deployment time.
Stars: ✭ 119 (-10.53%)
Mutual labels:  compiler
Grain
The Grain compiler toolchain and CLI. Home of the modern web staple. 🌾
Stars: ✭ 2,199 (+1553.38%)
Mutual labels:  compiler
Solang
First fully featured programming language for Stack Overflow Driven Development
Stars: ✭ 133 (+0%)
Mutual labels:  compiler
Tinyscript
自制的一个编译器, 用于学习,完整实现了词法分析,语法分析,中间代码(SSA)生成,机器码生成,和基于寄存器的虚拟机
Stars: ✭ 132 (-0.75%)
Mutual labels:  compiler
Thegoodman
An experiment with basic CSS3 animations.
Stars: ✭ 128 (-3.76%)
Mutual labels:  experiment

Build Status MIT License

hivemind

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_statement
if <test>:
    <true_branch>
else:
    <else_branch>

#assign
<left> = <right>

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

#attribute
<object>.<label>

#attribute_assign
<object>.<label> = <right>

#binary
<left> <operation> <right>

#list
[<<elements:', '>>]

#method_statement
method <method_name>(<<args:', '>>):
    <<body>>

#class_statement
class <class_name>:
    <<methods:''>>

#module_statement
module <module_name>:
    <<elements>>

A lisp-like syntax

#if_statement
(if <test>
    <true_branch>
    <else_branch>)

#assign
(define <left> <right>)

#method_statement
(method <method_name> (<<args:' '>>)
    <<body>>)

#attribute
<object>.<label>

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

#binary
(<operation> <left> <right>)

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

#list
_(<<elements:' '>>)

#class_statement
(class <class_name>
    <<methods>>)

#module_statement
(module <module_name>
    <<elements>>)

Examples

pythonic example schemelike example

Installation

gem install hivemind

Usage

Run a file

hivemind <filename>

Translate a file into another syntax representation

hivemind render a.hm pythonic a2.hm

Goals

  • 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)

Language

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

History

Created for the HackFMI 5

Future development

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

License

Copyright 2016 Alexander Ivanov

Distributed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].