create a programming language for my own OS

Programming, for all ages and all languages.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: create a programming language for my own OS

Post 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)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Re: create a programming language for my own OS

Post 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.
Khumba
Posts: 12
Joined: Sat Oct 23, 2004 11:00 pm
Location: In ur gcc, watchin' you compile.
Contact:

Re: create a programming language for my own OS

Post 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.
khumba.net - prototype capability language and operating environment
"Lose your questions and you will find your answers" -D'ni Proverb
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: create a programming language for my own OS

Post 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.
My OS is Perception.
Post Reply