If you were to code an operating system from scratch in 2016, would you still use C?

If you were to code an operating system from scratch in 2016, would you still use C?

Other urls found in this thread:

wiki.osdev.org/Languages
toastytech.com/guis/qnxdemo.html
en.wikipedia.org/wiki/BareMetal
redox-os.org
launchpad.net/pycorn
wiki.osdev.org/Category:Bare_bones_tutorials
gist.github.com/anonymous/74c951c2a45ca498c05652c8debcdf18
twitter.com/AnonBabble

I would use assembly

what a cute negress

I'd fuck her senseless.

You mean like kolibri and menuetos?

>If you were to code an operating system from scratch in 2016, would you still use C?
Most likely, at least until I could bootstrap a C++ runtime without having to do too much work myself.

wiki.osdev.org/Languages

Yes. I didn't see any part about my new operating system having to be written in a language that hasn't been used before.

I'm genuinely interested in trying one of these assembly OS's out. If only I had the time...

They fit in a floppy and have a boot time of 2 seconds, you have no excuses.
I've tried Kolibri and it's been an interesting proof of concept.

This, even if it would be a nightmare to program and mantain, the language constraints and the lack of high-level features would make it a better choice for OS development.
>but muh C is as faster as ASM
Compiled and optimized C doesn't run as fast as pure unfiltered ASM because of some compiling quirks.

i want her to sit on my face

How functional was it?

Could I browse the web without issue? Did it have an office suite?

Me too brother, me too.

not him but the floppy version is bare bones and doesn't offer much. also I had some issues with video modes on a pentium 233 and pci gpu.

the QNX demo disks were pretty badass at the time: toastytech.com/guis/qnxdemo.html

Yep, she will procreate some beautiful light skin black babies.

The environment worked alright, I never tested the lan connectivity but it should support it with no problems, it does have a web browser but right now I don't remember if there was a office suite installed.

Also Jezabel Vessir is such a qt niggerette.

Did she mean physically or economical?

Can I boot from a live usb or does it need installation?

Also, imagine an assembly OS for modern smartphones.
Shit would be so cash.

What else are you supposed to use? Java? Python? Javascript? HTML5?

>python
>operating system
Someone please do this.

Java is clearly the only answer. Just look at Android and Minecraft.

C++

I'd use Lua for le fast scripting language meme

C is still better. C++ can be used for certain software, but the kernel and base OS shouldn't be made in C++.

Whitespace

>the kernel and base OS shouldn't be made in C++.
Why?

As someone who develops an actual OS, yes, I would. It gets out of the way to do many of the things that you have to do when developing an OS. C++, not so much, and I've worked extensively in both. You also can't avoid assembly for many of the things you have to do in a kernel.

...

C and assembly are faster. If you want to make a BloatOS go ahead and use C++, C# or even Python if you'd like. Unless you're making something irrelevant, you should choose optimisation over convenience and ease of programming. This is the same reason python isn't used for anything serious.

I would use PHP

en.wikipedia.org/wiki/BareMetal

I would write it in Ada & processor specific assembler

I would probably use Rust, and it seems someone's already doing that.

redox-os.org

node.js

>This is the same reason python isn't used for anything serious.
You are severly mistaking

Either C or Rust

launchpad.net/pycorn

I'd like to disagree with - it's perfectly fine writing a kernel in C++. However one has to remember that there are severe drawbacks in doing so. For one you could only use a subset of C++ since parts of the language rely on the C++ standard library which wouldn't be available since we need to write the functions that it requires.
That's a common problem with writing an OS in higher-level languages - usually you need to sacrifice parts of the languages advantages in order to be able to write kernel-level code.

wiki.osdev.org/Category:Bare_bones_tutorials

>Ada
>C#
>D
>FreeBasic
>Go
>Java
>Pascal
>Rust
>Swift

I'd have to consider the reason I was writing a new OS from scratch.

I'd most probably use Rust, with appropriate sprinkles of assembly language for very hot loops, ABI, memory/IO management, hardware specific drivers, and crypto primitives.

I'd probably want formal methods too, something like the proof systems used to verify the seL4 microkernel and ARM implementation against the design. That would also necessitate reproducible builds.

If I was doing it, I'd do it on a fresh, formally-verified, RISC-V designed SoC. Rockwell Collins showed it's possible to do in the AAM7PG, no reason to pussy out on the engineering.

>If you were to code an operating system from scratch in 2016, would you still use C?
No. There are better languages in every aspect.

Python isn't used by serious programmers. It has terrible performance. Note that AAA games aren't seriously developed either, anything that requires hardware to hide terrible optimisation is just bad code.

Maybe go. But I'll probably never recode an os

''serious developer '' knows than sometimes no one fucking care about performance and care about time. Learn your job.

We're talking about OS and system software here. A developer should always care about performance. Retards like you are the reason everything is bloated and sites are infested with unnecessary javascript. Learn English.

I would use C++ just to trigger Sup Forums's autism.

yes
gist.github.com/anonymous/74c951c2a45ca498c05652c8debcdf18

Can somebody post a link to it, I missed it :(

>A developer should always care about performance
fuck off poorfag

t. shitty developer who wouldn't have a job if meme languages and terrible companies didn't exist

...

t. NEET loser whose only achievement is writing fizzbuzz in brainfuck

I'd say the consumer's are also to blame. People should look at efficient software the same way they do efficient vehicles.

Is Sup Forums the only enthusiast board that prefers bad things over good things?

Why did mods delete the image in the op?

It can't be because it's off topic, because so are these and they didn't get deleted.
So what's up with that?

/thread

Bump

He wasn't talking about OS anymore. And ask your client if they pref a program ready to use in 2 months or an absolute performance program. This is the reality, and ofc have well done ligth software are better but isn't not the reality of the actual industry

I wonder about this too

As a white boi, I would

>HTML5
That's a markup language. How would that even work?

A true wizard would use brainfuck.

Bumping for this.

No.
C++

You don't need a C++ runtime for kernel dev.
You shouldn't be using exceptions or RTTI in the first place anyway.

And what bullshit standards are you pulling out of your ass to come to that conclusion?

>you should choose optimisation over convenience and ease of programming.
What if you can have programming convenience with next to zero overhead?
There's no logical reason not to use C++, only bullshit personal reasons.

like what

I might. For the really interesting parts of an OS, it doesn't matter all that much what language you write it in. The design is much more important. I think it'd be cool to write an OS in scheme but I also think it'd be pretty practical to write one in Ada. I probably wouldn't make an OS though, unless I really wanted to experiment with something that I couldn't mess with in a *NIX

Why?

JESUS FUCK, WHAT ARE YOU THINKING? WHY WOULD YOU POST THAT, THAT'S THE GROSSEST THING I'VE EVER SEEN!

I'd use assembly for more than most operating systems do and use C for the rest. Fortran for some stuff because I can.

RISC OS?

Sorry for my english guys.
Indeed you MUST use assembly since its the easiest way to develop a bootstraper and to connect with the hardware I/O.
About C, you dont HAVE to use C, i use C myself in my OS for some reasons:
1° it transpiles to ASM so i could just compile and copy paste a bunch of code and redactor it for performance sake
2° it lets you use embedded ASM code
3° its easy, powerfull and lets you do exactly what you want with no boilerplate code
4° every single piece of code u need must be written from scratch, so with C you can literally clone the glibc library.

You could use any languages you want, from Rust to Python or JS, but itll require some boilerplate, you have to set up the interpreter thats usually written in C or C++, and you will need tons of libraries and a POSIX compatible System from the begining.

About C++, you can easily build it in C++ since it compiles to ASM too, but theres literally no advantage on doing so, C++ is not a good languange for it IMO, also, a OS should be autocompilant, and if you wanna compile C++ shit youll need the whole C++ library, and you have to write it from scratch.

And yes, you could use transpilers to switch your toy-javascript to C and try to build a 100% Js OS, but itll perform poorly and wont be autocompilant either.

Yeah but I'd use ASM for the kernel

ASM is a pain in the ass, it works, its faster and is fun to write, but you have to manage everything, you would waste days only creating a decent printf

>kernel
>printf

While kernels do not have a concept of standard in/out/error, they do nonetheless have functions for printing crap, particularly to logs. In the Linux kernel, a printf-like function exists called printk for printing crap at the kernel log.

I would use C.

Why do so is clear to me: If I write a new operating system, it would be to demonstrate a better OS design, not to demonstrate that new fancy language X/Y/Z can be used to make a OS. Trying to do both at once would be fucking stupid.

Bump.

probably java, maybe ruby

I would use javascript.

No, I would use C++. C is deprecated.

>C and assembly are faster.

You can just write hot sections in C or inline ASM if this is a genuine concern of yours.