OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 31, 2020 4:26 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Alternative languages
PostPosted: Sat Feb 29, 2020 1:36 pm 
Offline
Member
Member
User avatar

Joined: Fri Nov 22, 2019 5:46 am
Posts: 95
Schol-R-LEA, you mentioned you are using a Lisp-derivative for OS dev. I wonder if you are talking about Scheme? If not, which derivative is it, if I may ask?

And are there any other fans of "alternative" languages (=all except Asm, C, C++) in lowlevel OS dev?

Maybe anyone coding an OS in Prolog? (jk)

Happy hacking
Peter


Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Sun Mar 01, 2020 12:59 am 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 457
I do believe we have a Wiki article on the subject.

Whether or not an OS can be written in a language depends primarily on whether the language can be made to run without a runtime support system, or whether such a system can be easily created on bare metal. Also, you are definitely going to need to link to assembly routines. For example, people have written OSes in Java by either only using Java 1.5 (before Generics), so you could still compile it with GCJ, or by writing a Java VM that runs on bare metal. YMMV if that counts as "OS written in Java", when the OS part is in fact a JVM, and the "OS" is an application running in it.

As to your question, I am not aware of an OS written in Prolog. Would be funny, though. If you want to do something, it probably won't work, but at least the OS will be able to explain to you why. LISP on the other hand... weren't there hardware implementations of it in the sixties? I seem to remember such a thing. Again, if you have a LISP compiler or interpreter that runs on bare metal, nothing should be able to stop you.


Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Sun Mar 01, 2020 1:08 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1602
Location: Athens, GA, USA
While Scheme is the primary language I am drawing inspiration from, I am intending to develop a new language to fit my specific purposes. Progress on this has been slow, for reasons unrelated to technical matters.

However, I do know of a number of other Lisp-based OS projects; I am aware of two currently on GitHub called Mezzano (using standard Common Lisp) and Chrsyalisp (which uses a mix of C and Common Lisp, as far as I can determine).

Also, if you go through the Wiki (including the page Languages, naturally enough), you'll find a number of members past and present have used languages such as Ada, D, Rust, Go, Java, C#, FreeBasic, and Pascal - in addition to the inevitable Forth contingent, because Forth-based operating systems have had a quiet by highly developed following, especially in the embedded world, going back to the early 1970s. Some those of those languages have variant editions of the Bare Bones tutorials for those who want to use them.

There's even a developer archetype, Alta Lang, for OS devs who want to design their own language with which to implement their OS.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Last edited by Schol-R-LEA on Sun Mar 01, 2020 10:23 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Sun Mar 01, 2020 1:23 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1602
Location: Athens, GA, USA
nullplan wrote:
weren't there hardware implementations of it in the sixties? I seem to remember such a thing. Again, if you have a LISP compiler or interpreter that runs on bare metal, nothing should be able to stop you.


Lisp Machines were in the 1970s and 1980s, with the last few even getting implemented as microprocessors, but they definitely were a thing. At least two startups - Lisp Machines Inc. and Symbolics - were founded to build them, and established companies such as Texas Instruments, Xerox, and Fujitsu tried their hands with them as well. Unfortunately, they ran into problems similar to those of the Xerox Star - with most of them built as handwrapped TTL systems which were both too bulky, too slow to construct, and too expensive both to buy and to maintain, while the microprocessor versions were on the bleeding edge, or even a bit past it, of the photolithographic processes of the time, and - like the Intel iAPX 432 from around the same time - they ended up with tons of hardware bugs and very low IC yields on a system that was all or-nothing, meaning they couldn't bin the partially working units as lower end parts. That, and they were simply promising more then the AI techniques could give when run on the hardware they could produce.

I imagine that a lot of the things they had problems with at the time on both LispMs and on the 432 - such as the tagged memory, and the hardware-level capability addressing mechanisms used on the Intel chip - would be trivial to solve today, simply by throwing current-day processes at them. Hell, much of what went into those is already in the x86-64 chips, only they are using them for things like predictive branching and cache coherence rather than as language support.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Last edited by Schol-R-LEA on Sat Apr 25, 2020 5:17 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Sun Mar 08, 2020 11:51 pm 
Offline

Joined: Mon Jun 13, 2016 2:25 am
Posts: 24
Location: Sydney
I have written some articles for the wiki about operating-system development in Ada. You can see some of them here: https://wiki.osdev.org/Category:Ada. There are a few osdev projects out there in the wild using Ada quite successfully, you can find a directory of them here: https://github.com/ohenley/awesome-ada#os-and-kernels

My own experiments using Ada for osdev can be seen here: https://github.com/ajxs/cxos.


Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Mon Mar 09, 2020 4:38 pm 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 282
I'm a fan of Forth, personally. I started with the slightly insane goal of having one language from the lowest level of the kernel all the way up to the interactive prompt. Forth comes closer to this goal than any other language. Forth is so very flexible as to make it rather debatable whether it will be the same language all the way up, but I can at least acheive much deeper integration and flexibility than Unix-likes or even Plan 9.

PeterX wrote:
Maybe anyone coding an OS in Prolog? (jk)

I LOL'd :D


Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Tue Mar 10, 2020 12:26 pm 
Offline
Member
Member
User avatar

Joined: Fri Nov 22, 2019 5:46 am
Posts: 95
eekee wrote:
I'm a fan of Forth, personally. I started with the slightly insane goal of having one language from the lowest level of the kernel all the way up to the interactive prompt. Forth comes closer to this goal than any other language.

Forth is definitely cool. I've seen a ATA/IDE driver in Forth being only approx. 8 or 10 lines of code.

I once imagined having a Lisp kernel translating itself to a different platform. I then noticed that for lowlevel kernel and bootloader it is less pain to code in Assembler and C than in most other languages. But the main kernel is a different story: There are plenty of other languages. For example Oberon. And Ada looks interesting, especially the "newer" Ada dialects (So Ada95 isn't actually new.)

Greetings
Peter


Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Wed Mar 11, 2020 8:44 am 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 282
PeterX wrote:
I once imagined having a Lisp kernel translating itself to a different platform. I then noticed that for lowlevel kernel and bootloader it is less pain to code in Assembler and C than in most other languages.

C is exceptionally good at low-level work, yes. I'd like to say Forth is its equal, but I should hold that back until I've actually tried it. ;) Forth 'should' be equal or better, its internals are more accessible and it's used for a lot of embedded work. The question rather depends on which Forth dialect & implementation because there are far more dialects of Forth than C, some tightly coupled to radically differing implementations with different intended uses.


Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Mon Apr 20, 2020 8:43 pm 
Offline
Member
Member

Joined: Wed Sep 01, 2010 3:54 pm
Posts: 36
I'm a little late to the party, but Schol-R-LEA mentioned Rust and it's what I've been using to do OS development. The wiki has links to blog_os, which is a good starting point and Redox, which has been advancing nicely over the past few years.


Top
 Profile  
 
 Post subject: Re: Alternative languages
PostPosted: Sat Apr 25, 2020 3:25 pm 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 282
rkennedy9064 wrote:
I'm a little late to the party, but Schol-R-LEA mentioned Rust and it's what I've been using to do OS development.

I've noticed several projects using Rust. It doesn't seem bad at all.

I'm looking into this Plain English Programming thing. I'm not quite ready to try OS dev with it yet though; still learning it but it looks like I'll get up to speed with it much faster than any other language.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group