Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

neos Universal Compiler and Bytecode JIT -- Coming Soon

17 views
Skip to first unread message

Mr Flibble

unread,
Mar 6, 2019, 7:18:21 PM3/6/19
to
From https://neos.dev ...

neos Universal Compiler and Bytecode JIT -- Coming Soon

Introduction
------------

neos is a cross-platform (C++) universal compiler that can theoretically
compile any scripting/programming language. The compiler targets custom
bytecode used by a custom VM with JIT. neos will be used as the scripting
engine in the neoGFX project.

The plan is for version 1.0 of neos to ship with implementations of the
following scripting/programming languages:
* Ada
* JavaScript
* Lua
* Python
* Forth
* C
* Rust
* Haskell
neos is open source and the source is available from:
https://github.com/i42output/neos.

Features
--------
* Language agnostic: a language schema file describes the syntax and
semantics of the scripting/programming language to use (theoretically
allowing any language to be used).
* Easy to write RJSON (Relaxed JSON) language schema file format.
* Extensible generic (cross-language) semantic concepts (extendable by
providing semantic concept plugins).
* The ability to mix source code from different programming languages
within the same source file.
* Invent your own scripting language to use with neos by writing a new
language schema!

Mixing Programming Languages
----------------------------
With neos it is possible to mix code from different programming languages
in the same source file. These source files have the .mix file extension.
Here is an example .mix file:

# The following line defines the language selection character (.mix files
are UTF-8 encoded)...
%%%⚛%
⚛⚛c⚛ /* make c the default language and select it */
#include <stdio.h>
⚛c++⚛ /* select the c++ language */
#include <iostream>
⚛ada⚛
with Ada.Text_IO;
use Ada.Text_IO;
⚛⚛ /* select the default language (c in this example) */
void hello_from_c()
{
printf("Hello, world (from C)!\n");
}
⚛ada⚛
procedure Hello is
begin
Put_Line("Hello, world (from Ada)!");
end Hello;
⚛⚛
int main()
{
hello_from_c();
⚛c++⚛
std::cout << "Hello, world (from C++)!" << std::endl;
⚛ada⚛
Hello();
⚛⚛
printf("Hello again from C!\n");
}

/Flibble

--
“You won’t burn in hell. But be nice anyway.” – Ricky Gervais

“I see Atheists are fighting and killing each other again, over who
doesn’t believe in any God the most. Oh, no..wait.. that never happens.” –
Ricky Gervais

"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Bryne asked on his show The Meaning of Life. "What
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a
world that is so full of injustice and pain. That's what I would say."
0 new messages