Hosted Development Environments / Languages

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
Kenny
Member
Member
Posts: 29
Joined: Thu Mar 01, 2007 7:42 am

Hosted Development Environments / Languages

Post by Kenny »

Does anyone know of (or have implemented) a language other than C that would be suitable for running on an OS?

Assuming a stating point of an OS that covers the basics (memory managment, filesystem, some form of input, graphics and sound capability), I'm looking for a programming language which has source available and that could be fairly easily hosted onto the OS, giving immediate access to a wealth of software (read: games).

Languages like C are fairly easy to implement and have lots of source, but don't have the framework to cover the graphics and sound. Languages like Java or .NET have all the framework, but would take a lot of implementing. I have used languages such as DarkBasic or Blitz Basic or (shudder) Visual Basic in the past that would be ok. An emulator like MAME would be ideal if it had compilation capabilities.

The ideal I have in my head is an open source language with a library of program source available. The language has a straightforward implementation (possibly even a language designed for implementing of custom OSes or could be implemented in parts) and abstracts at least graphics, input, sound and filesystem. Once implemented, it is trivial to download the source of an implementation of Worm, Asteroids, Pac-man or something and compile it.

I think the value such a language would add to the projects we are all developing and to the community as a whole would be good, but on the other hand I may be dreaming.

(My apologies if this has been discussed before, trying to search for "programming" or "language" on the forums doesn't work too well.)
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Hosted Development Environments / Languages

Post by NickJohnson »

There are a few projects that are working on making a kernel that runs a virtual machine or interpreted language of some sort. .NET/CLI has been a popular one, because of the popularity of C# - I know MOSA is one of those projects. The main problem with this is the size and complexity of the runtime environment, increased by the lack of high level resources on the bare hardware.

The kernel cannot be written entirely in a managed environment, of course, but I believe some of the projects have a lot of the mechanism past the runtime environment implemented in the managed virtual machine.

For other languages (that are not managed, mostly), there is a section on the wiki for that. :wink:
Kenny
Member
Member
Posts: 29
Joined: Thu Mar 01, 2007 7:42 am

Re: Hosted Development Environments / Languages

Post by Kenny »

Sorry, I'm not talking about writing a kernel in one of these high level languages, but finding one of these high level languages for implementing on a custom kernel. The conversations about which language to use to write the kernel have been done to death.

I was exploring and found an Amiga programming language called Amos that would be a good possibility if source code for the compiler were available. It has abstraction for graphics and sound and there are lots of existing games written in it.

Any other thoughts?
fronty
Member
Member
Posts: 188
Joined: Mon Jan 14, 2008 5:53 am
Location: Helsinki

Re: Hosted Development Environments / Languages

Post by fronty »

If you write a library with C, you can use it with any other language which uses same calling convention as your library.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Hosted Development Environments / Languages

Post by NickJohnson »

Sorry, I misunderstood you at first.
Kenny wrote:Languages like C are fairly easy to implement and have lots of source, but don't have the framework to cover the graphics and sound. Languages like Java or .NET have all the framework, but would take a lot of implementing. I have used languages such as DarkBasic or Blitz Basic or (shudder) Visual Basic in the past that would be ok. An emulator like MAME would be ideal if it had compilation capabilities.
I think it would take more effort to write an implementation of a managed VM that connects to resources in an OS than write a library that gives those resources a C interface. Once you have a C-accessible interface for sound and video, you can simply connect it to your VM implementation; in fact, that's essentially what you would have to do to make the VM use sound and video, sans some pretty interfaces and wrappers. You can just port a simple A/V lib like SDL, which has a lot of games written for it.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Hosted Development Environments / Languages

Post by Solar »

Kenny wrote:Assuming a stating point of an OS that covers the basics (memory managment, filesystem, some form of input, graphics and sound capability), I'm looking for a programming language which has source available and that could be fairly easily hosted onto the OS, giving immediate access to a wealth of software (read: games).
Many of the what you call "hosted" languages have their hosting layer written in C, or C++, so...
Languages like C are fairly easy to implement and have lots of source, but don't have the framework to cover the graphics and sound.
*COUGH*

:evil:

I think I answered that one before.

"Not having" and "not having as part of the core language" are two very different things.
Every good solution is obvious once you've found it.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Hosted Development Environments / Languages

Post by jal »

Kenny wrote:I was exploring and found an Amiga programming language called Amos that would be a good possibility if source code for the compiler were available.
AMOS is BASIC.


JAL
Post Reply