Codestation.org start page - The Switch
Google™
Wikipedia™
IMDB™
Youtube™
Google Maps™
Wolfram Alpha™
Google Groups™
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:
#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