huginn - programming language with no quirks, so simple every child can master it.

git clone https://codestation.org/repo/huginn.git
git clone https://github.com/AmokHuginnsson/huginn.git
git clone https://bitbucket.org/huginn/huginn.git
Huginn is a computer programming language with following traits:
- interpretedmultiplatform, what you type is what you got
- imperativeuse statements to change a program's state
- functional stylefunctions, lambdas and closures are first class citizens
- object orienteduser defined types, composition, inheritance, exceptions
- introspective, non-reflective type systemuser defined types are fixed and immutable at runtime,
no monkey patching - strongly typedabsolutely no implicit value conversions and no implicit type coercion
- dynamically typedfinal type consistency checks are done at runtime
- duck typinga set of members determine the valid semantics of a type
- no quirks guaranteesemantics is consistent across types in all contexts
- support arbitrary precision calculations per built-in type precision is restricted only by the amount of hardware resources
-
interpreter/executor trivially embeddable in C++ code
#include <yaal/tools/hhuginn.hxx> void foo( HStreamInterface& src_ ) { HHuginn h; h.load( src_ ); h.preprocess(); if ( h.parse() && h.compile() && h.execute() ) { cout << "ok" << endl; } }
Example program written in Huginn language:
#! /bin/sh exec huginn -E "${0}" "${@}" #! huginn /* First Huginn program. */ import Algorithms as algo; main( argv_ ) { print( "Hello World!\n" ); argc = size( argv_ ); print( "number of arguments: {}\n".format( argc ) ); for ( i, arg : algo.enumerate( argv_ ) ) { print( "argv_[{}]: {}\n".format( i, arg ) ); } if ( argc >= 3 ) { base = number( argv_[1] ); exp = number( argv_[2] ); print( "{} ^ {} = {}\n".format( argv_[1], argv_[2], base ^ exp ) ); } else { print( "Not enough arguments to calculate power.\n" ); } return ( 0 ); }
Output:
[amok@vegeta](2/1)~/$ ./pow.hgn 3 333 Hello World! number of arguments: 3 argv_[0]: ./pow.hgn argv_[1]: 3 argv_[2]: 333 3 ^ 333 = 76098802313205980972042586726503278072789635637207786511701003\ 703579163143930619961304414564937852255793535157094995201000183376930256\ 6531786879537190794573523