Author Topic: any examples of OS not written in C/C++?  (Read 25745 times)

0 Members and 1 Guest are viewing this topic.

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #150 on: April 19, 2021, 04:29:11 pm »
Scheme makes a good systems programming language  :popcorn:  :-DD

As for single vendor controlled products, I've learned that opinionated vendors are a win for solving problems. I've got 20 years out of .Net so far.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19450
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #151 on: April 19, 2021, 04:46:16 pm »
Scheme makes a good systems programming language  :popcorn:  :-DD

As for single vendor controlled products, I've learned that opinionated vendors are a win for solving problems. I've got 20 years out of .Net so far.

I thought you made your money clearing up the messes dropped buy other people!
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19450
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #152 on: April 19, 2021, 04:58:53 pm »
Quote
And that we should not blame the languages for not trying to stop the developers for implementing idiotic designs.

Again, agreed.

But when the fundamental properties of a language mean that large applications are "castles built on sand", we shouldn't shy away from recognising that choosing a different language ought to mean the "castle is built on rock". It is, of course, possible to choose a different language so that the "castle is built on a swamp".
Fully agreed.

Problem is, every programming language we currently have, have their drawbacks.  I "solve" this by using multiple programming languages; for example, Python for UI, C for heavy computation (in a library form).  I automate tasks using Bash or POSIX shell scripts, Makefiles, and Awk; the latter is especially useful for certain line/record based format data processing.  I try to pick each tool, each programming language, that seems the most appropriate for each task at hand, while being careful to not let my personal preferences skew the choice too much.


Yes indeed. Hammers vs screwdrivers and all that. But you can insert screws with hammers.

Quote
Now that Rust has its own foundation, I'm hoping it will become a reasonable alternative to systems level programming.  I dislike Go for the same reasons I dislike .Net: being single vendor controlled projects, their future is uncertain; and I've been bitten by single vendor products often enough to be wary of subjecting myself to those if reasonable alternatives exist.

We should distinguish swamps and sand from rock, and choose rock whereever possible.
Absolutely!  But, what would be the rock-analog to replace the swamp and sand that is C, in systems programming?  (Specifically, efficient low level libraries and services interfaced to from higher level languages, for my own use cases?)  I personally do not know of one.

Smalltalk, xC, or macro assembler  >:D

More reasonably, Ada, SPARK or - if they pan out - Rust or Go.

Quote
So, I personally am trying to use piling (driving heavy stilts or posts into the swamp and sand to create a stable enough base to build on; an analog for replacing just the standard C library with something better, more suited to the task), until those better than I in computer science can develop a language that can achieve the same or better end results.

(For example, having carefully considered and tested various cases, I've changed my mind regarding garbage collection.  I do "like" pool based allocation more, but in objective terms, good garbage collection schemes simply have fewer drawbacks.)

A good GC implementation has remarkably few drawbacks for soft realtime applications - e.g. telecom networks. And even fewer if you can constrain the programming style so that most data has averyshorlife with limited visibility. That how some fintech people use Java for trading. Mind you,that mob also encode business rules in FPGAs to minimise latency!
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #153 on: April 19, 2021, 05:06:24 pm »
Scheme makes a good systems programming language  :popcorn:  :-DD

As for single vendor controlled products, I've learned that opinionated vendors are a win for solving problems. I've got 20 years out of .Net so far.

I thought you made your money clearing up the messes dropped buy other people!

Yes by creating new piles of shit  :-DD
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3894
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #154 on: April 19, 2021, 05:11:53 pm »
Quote
I'd like to play with a simple OS not written in C/C++.
How much do you consider "a simple OS"?

like DOS with TSR
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19450
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #155 on: April 19, 2021, 06:37:42 pm »
Quote
I'd like to play with a simple OS not written in C/C++.
How much do you consider "a simple OS"?

like DOS with TSR

DOS wasn't an operating system, it was a program loader with a few built-in peripheral libraries.

I liked it: load you program and the machine is yours!
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3894
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #156 on: April 19, 2021, 07:04:19 pm »
DOS wasn't an operating system, it was a program loader with a few built-in peripheral libraries.
I liked it: load you program and the machine is yours!

DOS stands for "disk operating system"; DOS + TSR means you can suspend a program, and launch an other.

It's my definition of "simple OS".

Things like "UCOS/2/3" are of a different level (it's a static task RTOS), and also of a different level of complexity. I have already implemented it on a MIPS32 and on arm-classic machine, but I only wrote the specific low level while the 90% of the code was just "ok" out of the box. Then I wrote a couple of tasks and a couple of drivers, one of them was a Modbus driver, the other a driver for a radio-link.

Kind of producer consumer problem. Not do bad, both were nice experiences, but I cannot rewrite this stuff in assembly, and it's too much code for translating it in Ada/Rust/etc...

I need something shorter, simpler.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19450
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #157 on: April 19, 2021, 07:33:30 pm »
I'm only too we'll aware of what MSDOS was :(

It ran a single programes at a time. You loaded that into memory from cassette, floppy, or if you're luck a hard disk.

If you wanted to do something different, you shut down that programes and loaded another. Hence the famous Small T-shirt slogan, "Don't mode me in"

Years later my u could sort-of run several programs at the same timeusing top view or DESQview.

Terminate and Stay Resident (TSR) was a side issue, usually used to loads few tiny utility programes that made better use of 640k
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #158 on: April 19, 2021, 07:43:13 pm »
DOS wasn't an operating system, it was a program loader with a few built-in peripheral libraries.
I liked it: load you program and the machine is yours!

DOS stands for "disk operating system"; DOS + TSR means you can suspend a program, and launch an other.

It's my definition of "simple OS".

Things like "UCOS/2/3" are of a different level (it's a static task RTOS), and also of a different level of complexity. I have already implemented it on a MIPS32 and on arm-classic machine, but I only wrote the specific low level while the 90% of the code was just "ok" out of the box. Then I wrote a couple of tasks and a couple of drivers, one of them was a Modbus driver, the other a driver for a radio-link.

Kind of producer consumer problem. Not do bad, both were nice experiences, but I cannot rewrite this stuff in assembly, and it's too much code for translating it in Ada/Rust/etc...

I need something shorter, simpler.

FORTH kernel. Collapse OS is interesting: https://collapseos.org/

Plus you can build some hardware it'll run on!

Also Brad Rodriguez's Moving FORTH series is interesting https://www.bradrodriguez.com/papers/moving1.htm

FORTH is not a language or an OS or a toolchain. It's just completely different.
« Last Edit: April 19, 2021, 07:45:15 pm by bd139 »
 
The following users thanked this post: DiTBho

Online PlainName

  • Super Contributor
  • ***
  • Posts: 6819
  • Country: va
Re: any examples of OS not written in C/C++?
« Reply #159 on: April 19, 2021, 07:55:27 pm »
Quote
It ran a single programes at a time.

Yes, that would make it a "single-tasking operating system". Which is why "multi-tasking" is often used to describe other types of operating systems.

You can be as sniffy as you like, but it was what it was: an actual operating system.

Quote
If you wanted to do something different, you shut down that programes and loaded another.

Indeed, but the important factor you've missed is that you didn't reboot the machine. DOS was still running, state maintained, etc. During the program run DOS was supplying services. A bootloader doesn't do that.

Quote
Hence the famous Small T-shirt slogan, "Don't mode me in"

Apparently not that famous. I had to look it up and found it related to user interface design. I grant that software of that era typically used modes, but that wasn't a DOS issue per se and applied to, well, interfaces of that time. Maybe your memory of that (and of what DOS was/wasn't) could do with a refresh.

---
From Wikipedia:
Quote
Tesler developed the idea of copy and paste functionality and the idea of modeless software.

Also from Wikipedia, linked to above, with my emphasis:
Quote
In user interface design, a mode is a distinct setting within a computer program or any physical machine interface, in which the same user input will produce perceived results different from those that it would in other settings.
 
The following users thanked this post: newbrain

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3894
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #160 on: April 19, 2021, 07:59:23 pm »
I'm only too we'll aware of what MSDOS was

I spent 5 years on a DOS machine with Turbo Assembler, Turbo Pascal, Turbo Basic and Turbo C
I learned a lot, then I moved to a UNIX "single user" (yes, incredible) machine: BeOS! Then to Linux.

happy days ... 20? 30? years ago  ;D
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #161 on: April 19, 2021, 08:12:14 pm »
I was barely inflicted with that crap fortunately. A relative died and left me a pile of cash so I got myself a nice Acorn A420 to replace my BBC. Eventually this was replaced with NT while I was using Sun kit at university and work...

MSDOS was horrible horrible horrible yuck. My father built a large business on it selling payroll software.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19450
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #162 on: April 19, 2021, 08:16:07 pm »
FORTH is not a language or an OS or a toolchain. It's just completely different.

You can say that about Smalltalk or Squeak.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: bd139

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19450
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #163 on: April 19, 2021, 08:25:57 pm »
I was barely inflicted with that crap fortunately. A relative died and left me a pile of cash so I got myself a nice Acorn A420 to replace my BBC. Eventually this was replaced with NT while I was using Sun kit at university and work...

MSDOS was horrible horrible horrible yuck. My father built a large business on it selling payroll software.

As I recall, dimly, the original Archimedes operating system (Arthur, after Arthur Norman who wrote optimiing compilers amongst other things) was very strange.

MSDOS was a pain, but no worse than its predecessors. Windows was the hack compared to its predecessors.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #164 on: April 19, 2021, 08:40:00 pm »
The original Arthur 1.20 was a pretty rough bit of code for sure. Fortunately I only had to suffer it for a year before I managed to persuade someone to do me some RISC OS 2 ROMs.

Rumor has it that it was actually short before A Risc os before THURsday due to failing entirely to ship the original OS plan which was a weird bastardisation of Modula 2 and Mach which may just have taken over the world if they had finished it. Look up ARX https://en.wikipedia.org/wiki/ARX_(operating_system)

Windows 3 was fairly nice at the time. I had all sorts of shit wired up on that doing automated testing with 16-bit VB.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19450
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #165 on: April 19, 2021, 08:54:46 pm »
Given I was in Cambridge until late 87 and played with the first Archimedes, I may have been using Arthur 0.20.

I never asked Arthur about "his" filesystem :)
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: bd139

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3894
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #166 on: April 19, 2021, 09:50:33 pm »
I started the project two years ago, in my case the filesystem is very advanced, but the heavy job is done remotely.

It's somehow similar to NFS but simpler.

The client, even if it's written in assembly, only has to issue simple requests to the remote server where the core of the filesystem runs

client's requests:
- file_open
- file_close
- file_read{8,16,32}
- file_write{8,16,32}
- file_read_block
- file_write_block
- file_get_size
- file_get_position
- file_set_position
- folder_open
- folder_close
- folder_read

There is not yet any implementation for metadata (when was this file/folder created? who is the owner? last time the file/folder was read? ... the server replies "not yet implemented"). The current implementation runs on a weird MIPS32 board with pipeline disabled. There are no delayed slots and no hazards with registers. It's clocked at 25Mhz, and it's a bit slow, but I like it.

The filesystem uses one serial line at 1Mbps with basically three packets, one  for transporting commands and requests, one for receiving feedback, and one for transporting data.

This project is basically a "bootloader" which can mount its filesystem after the bootstrap. The user can list for some folders and files, open a file into a folder and load its content into memory, so if the file is a binary, the bootloader can can also switch into user-mode and jump into what has been loaded.

The code in kernel space can always takes back control if something goes wrong (well, there is no memory protection, so ... if the application writes some pretty garbage into kernel space it will be a dead funeral).

Not bad, useless and it makes no sense but it is funny, and it's written in pure MIPS assembly  :D


Anyway, this is not an OS, it's just a bootloader able to talk with a remote filesystem-core.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 
The following users thanked this post: bd139

Online coppice

  • Super Contributor
  • ***
  • Posts: 8634
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #167 on: April 19, 2021, 10:18:06 pm »
MSDOS was horrible horrible horrible yuck. My father built a large business on it selling payroll software.
Yes it was. However, as a clone of CP/M for the 8086 it allowed a lot of CP/M software to be quickly ported to the new 8086 machines. The sad part about MSDOS is not that it existed, but that it stuck around for so long. It should have had quite a short market window.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19450
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #168 on: April 19, 2021, 11:05:33 pm »
It was sad that Windows was such a thin layer on top of MSDOS, continuing its limitations plus introducing extra complexity.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline rfclown

  • Frequent Contributor
  • **
  • Posts: 407
  • Country: us
Re: any examples of OS not written in C/C++?
« Reply #169 on: April 19, 2021, 11:26:22 pm »
Yes it was. However, as a clone of CP/M for the 8086 it allowed a lot of CP/M software to be quickly ported to the new 8086 machines. The sad part about MSDOS is not that it existed, but that it stuck around for so long. It should have had quite a short market window.

I'm running Windows 10.

C:\2>echo a>a

C:\2>copy a+a b
a
a
        1 file(s) copied.

C:\2>dir
 Volume in drive C has no label.
 Volume Serial Number is 148E-1AFC

 Directory of C:\2

04/19/2021  07:18 PM    <DIR>          .
04/19/2021  07:18 PM    <DIR>          ..
04/19/2021  07:18 PM                 3 a
04/19/2021  07:18 PM                 7 b
               2 File(s)             10 bytes

So why is the file "a" three bytes? CP/M of course (CR-LF)

Why is the file "b" seven bytes? CP/M of course. Have to add that CP/M end of file character.

Windows/DOS (from QDOS, Quick and Dirty OS), a hack on top of a hack on top of a hack.
« Last Edit: April 19, 2021, 11:33:21 pm by rfclown »
 

Offline rfclown

  • Frequent Contributor
  • **
  • Posts: 407
  • Country: us
Re: any examples of OS not written in C/C++?
« Reply #170 on: April 20, 2021, 12:07:24 am »
... Jeez, you lot don't half have tea-stain-tinted spectacles! ...

I liked DOS. You could have it on a floppy with enough space left to do other things. I didn't like or use Windows until 95. I got alot of milage out of DOS with QuickBASIC then later QuickC. For $99, those programs were a great bang for the buck in my opinion.
 
The following users thanked this post: DiTBho

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Re: any examples of OS not written in C/C++?
« Reply #171 on: April 20, 2021, 07:33:34 am »
... Jeez, you lot don't half have tea-stain-tinted spectacles! ...

I liked DOS. You could have it on a floppy with enough space left to do other things. I didn't like or use Windows until 95. I got alot of milage out of DOS with QuickBASIC then later QuickC. For $99, those programs were a great bang for the buck in my opinion.

Windows 95 was literally an application that ran on top of DOS and you retained the ability to do native DOS command line stuff. Ditto for Windows 98. Also Windows ME. All the later Windows versions originate from 32-bit Windows NT line, which has evolved to the 64-bit Windows of today.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: any examples of OS not written in C/C++?
« Reply #172 on: April 20, 2021, 07:42:14 am »
Quote
>> How much do you consider "a simple OS"?
like DOS with TSR
Well, that's why I asked.  DOS implemented a filesystem and a bunch of utilities, but had no multi-tasking and not much in the way of device drivers.A bunch of the current "RTOS" implementations give you real-time and multitasking, but no file system, utilities, or program loading capability.

Quote
Windows 95 was literally an application that ran on top of DOS and you retained the ability to do native DOS command line stuff.
Meh.  Since we admitted that DOS was little more than a program loader, it's not clear what the difference is between "an application loaded by DOS" and "an operating system loaded by a bootloader."
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #173 on: April 20, 2021, 08:20:53 am »
Yes windows 95 was not sitting on top of DOS at all. Neither was windows 3.1 really. It was more a full hardware context switch to another inferior kernel  :-DD.

Edit: in fact there was an undocumented native loader for it which was based on NTLDR. This shipped in windows ME if I remember but was never enabled.  You can boot it directly with NTLDR anyway.
« Last Edit: April 20, 2021, 08:27:41 am by bd139 »
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3894
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #174 on: April 20, 2021, 11:16:31 am »
I liked DOS. You could have it on a floppy with enough space left to do other things. I didn't like or use Windows until 95. I got alot of milage out of DOS with QuickBASIC then later QuickC. For $99, those programs were a great bang for the buck in my opinion.

When I moved to Linux, I was less impressed and less shocked compared to the experience from DOS to BeOS.

I had a shock when I left DOS for BeOS, because suddenly everything was different  :o :o :o

At that time I was used to installing everything by hands on a primitive i486 machine where you need to install a card and a driver, for each device.

For example, the CDROM was not ATAPI-IDE or SCSI, it was a proprietary Creative thing for which you needed to install an ISA16 card and a couple of drivers and also edit the "config.sys" file to tell the operating system how to configure them.

The same applied to the network card, there were just a few NICs supported by DOS, mostly by 3COM You had to manually setup IRQ, DMA, and edit the "config.sys" accordingly.

When I moved to BeOS v5 I found no floppy disk but only a bootable CDROM. WOW it was a new for me, I hadn't never seen before an OS you can install from a CDROM.

Until then my era experience with DOS had been three floppy disks for the core of the OS plus nine for misc(1), and a couple of days for the setup, especially to make some utilities able to "suspend" and "resume"  by TSR. It was a crude set of hacks.

Then I moved from a 486 to a PentiumII, BeOS was already ready to have multitasking, audio and video support already built-in, networking capabilities with just a couple of hacks.

BeOS v5.01 didn't naively support networking, I had to install an add-on called "net-bone", which basically added utilities like "telnet, fpt, finger, ..." and later also "scp ssh".

I also installed a C compiler package, gcc-v2.95, which I used to develop my applications and tools. This was completely different from the experience with Borland Turbo C. Different compilers, different libraries, different dialects (Borland vs GNU), different workflow, different debugging workflow (IDE debug vs GDB), different cost (90 Euro as "student pack" vs opensource).


Years later, I don't remember it as a bad experience, it was just a different experience, and even the Linux experience (kernel v2.2 and v2.4 at the time) is different from what we have today (kernel v5) ;D


(1)
- Norton Utilities
- Procomm (like Minicom on Linux)
- Borland' compilers { Basic, Pascal, C } (90 euro each, as "student pack")
- driver for a pretty nice serial (RS232) trackball mouse
- driver for the CDROM, not ATAPI, it was Creative's proprietary interface provided by the SoundCard
- driver for the sound-card Creative SoundBlaster16
- driver for 3COM network card
- Microsoft Lan suite with TCP/IP and UDP/IP tools and libraries

9 floppy disks for these, paid 400 euro for this!
« Last Edit: April 20, 2021, 11:18:21 am by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf