Alternate implementation languages

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
ehird
Member
Member
Posts: 214
Joined: Thu Mar 15, 2007 8:48 am

Alternate implementation languages

Post by ehird »

There's plenty of people writing OS' in C, asm, and Pascal. But what about other languages?

Lisp-style languages and Haskell seem unsuited for direct hardware access.

But what about, say, D - http://www.digitalmars.com/d/ - a garbage-collected, compiled language with a GCC frontend? Would that be suitable? D is like C++ done right, IMO it fixes all the idiocy C++ has embedded in its core, and reveals a good language. Heck, it even has lazy evaluation. Plus, it finally does the right thing as char - char == utf-8 character, not a byte.

Thoughts welcome
Last edited by ehird on Sat Apr 07, 2007 2:33 pm, edited 1 time in total.
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:

Post by Combuster »

I use BASIC (to be exact, FreeBasic) as the main language for drivers. Actually it has everything needed to write kernels in.

I just need to find some time to write out a hello world kernel for it. It isnt really my top priority :oops:
"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
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

I think there's someone on this forum that has an OS written in D. (Or was that elsewhere?...) It's possible, but I think most stay away from it, because of D's almost closed status.

As for Lisp and Haskell, mystran, I think, is writing an OS in his own dialect of Scheme. So under certain circumstances, it is possible. I think I might try my own Haskell OS sometime....Although, I might use it at a higher level and use assembly for access to hardware......

That covers imperative and functional languages.....Anyone for Prolog? (Logical Languages)
C8H10N4O2 | #446691 | Trust the nodes.
ehird
Member
Member
Posts: 214
Joined: Thu Mar 15, 2007 8:48 am

Post by ehird »

D isn't closed. The D compiler frontend is free/open source. The spec is free/open source. The stdlib is free/open source. Only the digital mars backend is non-free, and then - just use the GDC gcc frontend.
ehird
Member
Member
Posts: 214
Joined: Thu Mar 15, 2007 8:48 am

Post by ehird »

Alboin wrote:I think there's someone on this forum that has an OS written in D. (Or was that elsewhere?...) It's possible, but I think most stay away from it, because of D's almost closed status.
I've been talking in #d for a bit, and I recognized hakware from this forum. Yeah, it seems his OS is in D.

What I like about D is its inline asm syntax...


asm { statement; statement }

or

asm {
mov blah;
yada yada;
}

It's Intel syntax embedded right into a regular block. This means that you wouldn't need a seperate asm-only file, because it wouldn't be all annoying strings for inline asm.
User avatar
~
Member
Member
Posts: 1226
Joined: Tue Mar 06, 2007 11:17 am
Libera.chat IRC: ArcheFire

Post by ~ »

I also have been trying to implement a C-like language of my own, to help in programming complex code blocks in assembly. But it currently is too dependent to x86 because it uses its register names (to make it practically a direct assembly language with C syntax).

If well I was doing my kernel in it, it's more a pseudocode representation to further translate to traditional assembly.

I don't use it very much now, unless there is something far too complex to design directly in assembly.

If somebody had some ASM code to show this pseudolanguage (if there's interest) I would do the translation. Something short preferably.
User avatar
hakware
Member
Member
Posts: 66
Joined: Sat Mar 31, 2007 4:57 pm
Location: Xanadu
Contact:

Post by hakware »

Yeah, XANA is in D. Though the executable format is in a language I'm working on called EPL (dunno if that name's taken already though). It's an enfiladal / link-oriented graphical bytecode whose structure is built into the filesystem. It's rather like a more integrated Nuzzl, or something like what you'd get if you gave asm opcodes icons and used them in a scheme variant wherein the parentheses were replaced with hyperlinks. It also works over networks (i.e., your program can be distributed across the net, but running all on one computer, without downloading the whole thing).
"It is time to return real programming to users and even beginning users, to whom it has been denied since 1984."
- Theodore Holm Nelson

Image
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

I don't know if these count as they are basically difference versions of C, and sometimes BASIC style programming. I use a modified C for kernel module development who has a native object structure whose access is co ordinated with a built in object manager. I also use a customized version of that where the special objects are compiled and run specifically for use in a cluster. There are numerous others i use for user space, like a special threading C (dubbed strings for the time).
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

There have been Java/C# OS's..

Hey.. has anyone heard about Microsoft now releasing the entire Windows CE 6.0 kernel until their shared source license? Now to find where I can get it from..
My OS is Perception.
User avatar
binutils
Member
Member
Posts: 214
Joined: Thu Apr 05, 2007 6:07 am

Post by binutils »

User avatar
hakware
Member
Member
Posts: 66
Joined: Sat Mar 31, 2007 4:57 pm
Location: Xanadu
Contact:

Post by hakware »

Lisp has been done endlessly, actually. It used to be pretty standard among hackers to have a machine whose processor was in fact a lisp interp (that is, if you were a rich hacker and could afford a Symbolics Lisp Machine or one of their competitors ;-).
"It is time to return real programming to users and even beginning users, to whom it has been denied since 1984."
- Theodore Holm Nelson

Image
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

I've actually rather liked the idea of doing a kernel in D (mine's currently in Object Pascal), but the D frameworks for kernel coding don't seem to have stabilized relative to D itself. Anything to say on that?
ehird
Member
Member
Posts: 214
Joined: Thu Mar 15, 2007 8:48 am

Post by ehird »

Why use a framework? iirc it's not much you need to satisfy D - Object class, basic GC, and basic memory management.

I'm considering making a kernel in Scheme.
Or Haskell.
User avatar
hakware
Member
Member
Posts: 66
Joined: Sat Mar 31, 2007 4:57 pm
Location: Xanadu
Contact:

Post by hakware »

XANA had to go through a lot of annoyances to get D code to run standalone; if anyone wants to make a D kernel, I'd point them to the current XANA code for a start (the basic stuff is pretty useful, especially considering you gotta drop in the gc, memory manager, typeinfos, and a ton of random stuff pretty immediately before anything will work). It's easy enough to rewrite my code, which is more than I can say for Walter Bright (the guy who wrote the original D compiler and most of the standard lib).
"It is time to return real programming to users and even beginning users, to whom it has been denied since 1984."
- Theodore Holm Nelson

Image
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

One, don't call a thread "alternative implementation language" when you're actually advertising D.

Two, before you make claims like "C++ done right", imagine that there might be people out there who have a different idea of what is "broken" in C++. I, for one, feel quite OK in a language that doesn't do GC.

Let's say that D is an interesting language in its own right, and leave it at that.
Every good solution is obvious once you've found it.
Post Reply