Page 2 of 2

Re: create a programming language for my own OS

Posted: Tue May 12, 2009 10:07 am
by Combuster
Is there a language that can perform both these functions
Ooh, difficult question. (And very subjective as well).

- Visual basic (infamous for being noob language, yet it had a good share in commercial software in the old days) don't even think about it, brynet-inc .'-)
- Java (it is the first language you get taught in college, and big businesses run off it)

Re: create a programming language for my own OS

Posted: Tue May 12, 2009 6:01 pm
by JackScott
Shrek: Sorry, I wrote my question a bit ambiguously. I know that any programming language can solve any solvable problem (I've written programs in BrainFuck to prove it), but rather that there is a language that is good to use to solve any problem. Having thought about it overnight, I think Java is probably fairly close to the goal of being good for small and for large programs, though it isn't very expressive as far as string processing is concerned.

Re: create a programming language for my own OS

Posted: Fri May 22, 2009 4:33 pm
by Khumba
Brendan wrote:To be honest, this sort of simplicity (one language for everything) is one of the things I really miss from old computers
JackScott wrote:Is there a language that can perform both these functions, or are they mutually exclusive?
Smalltalk too! Aside from the C VM, most of a Smalltalk system is actually implemented in Smalltalk, so that even true/false/etc. are replacable. (Maybe even just Smalltalk+asm for the early ST machines.) I'd say that most high-level efficiently JIT-able languages (preferrably with a small runtime) would do the job, with the benefits JITs give nowadays.

FORTH is touted as being for both, though I sure wouldn't want to have to write a big system in it. Very easy to implement though.

Re: create a programming language for my own OS

Posted: Fri May 22, 2009 9:23 pm
by AndrewAPrice
Personally, I would [url="http://www.mono-project.com/Embedding_Mono"]embed Mono[/url] (the open source .Net runtime). Mono is written in standard C. It comes with a JIT'er (just in time compiler, which compiles a .NET IL Assembly into machine code for your specific architecture and optimised for your CPU) that can run as a stand alone program (an executor) or embedded into another program (e.g. even your kernel, or script executor). Mono also provides a compiler (C# and VB I think) so you can embed that also into your program and then you'll have a script-like-interface that can Compile to IL->JIT->Run in one step.

You're able to dynamically link in native (Non .Net) libraries at runtime aswell as (provided your OS has this function), if not you can add internal calls (very fast, low overhead) that are basically function pointers to your native C/C++ code.

You get the advantage of building your applications in any .Net language using the Microsoft compilers (through Visual Studio), the ones Mono provides, or any other .Net language compiler, plus (if you provide the libraries) you should be able to run any .Net assembly under you OS.