104 posts
Location
Somewhere in my mind, to which only makes sense to me.
Posted 22 January 2015 - 12:12 AM
i'm building a programming language in a language i'm far better at than lua (for x86 and x86_64 pc's). But it features several cool features:
It's called Hydra as in it has many heads (or programming languages), hydra code is not done by any means, but can do simple tasks right now.
hydra runs in a very small virtual machine.
Here's a sample.
C# code
class program
{
public static void Main (string[] args)
{
Console.WriteLine ("I can run");
}
}
converted to Hydra code
Hydra code
8;program;"9;Main;args|7;I can run"
10;program;Main
Hydra code byte code identifiers:
1 = new variable
2 = add
3 = subtract
4 = multiply
5 = divide
6 = if statement
7 = print
8 = class
9 = function
10 = call
Edited on 21 January 2015 - 11:15 PM
779 posts
Location
Kerbin
Posted 03 February 2015 - 05:10 PM
Interesting.
I guess it's an OOP language.
Suggestion: Make a CC program that runs scripts from hydra.
541 posts
Location
Melbourne, Australia
Posted 06 February 2015 - 06:26 AM
This is awesome, would love writing in Python, converting to hydra then running it in cc.
104 posts
Location
Somewhere in my mind, to which only makes sense to me.
Posted 12 February 2015 - 09:30 PM
would be very possible, maybe i will
2151 posts
Location
Auckland, New Zealand
Posted 13 February 2015 - 05:58 AM
I'm curious to know why such a language appeals to people. Isn't it just underpowered and hard to read?
Edited on 13 February 2015 - 04:58 AM
1140 posts
Location
Kaunas, Lithuania
Posted 13 February 2015 - 01:52 PM
I suspect that the main idea is to make a custom bytecode and its interpreter, plus a compiler for a language you already use or maybe even a new language.
104 posts
Location
Somewhere in my mind, to which only makes sense to me.
Posted 13 February 2015 - 02:23 PM
YES!!! exactly and i am making it, its called Havok. Havok will also run on linux, windows, computercraft and android. (pc and android written in C/C++)
Edited on 13 February 2015 - 01:24 PM