7 ms·
> It's still an interesting effort, and it makes me wonder if we'll ever see a day when a significant portion of Linux is written in a safer language. I really
by hazz99 8y ago
> It's still an interesting effort, and it makes me wonder if we'll ever see a day when a significant portion of Linux is written in a safer language.
I really hope Ada makes a comeback, especially in commercial kernel programming.
- vasilia 8y agoWe can start with nodejs. Nodejs with async model will be the best solution to achieve the best performance(after 'delete spaces' method of course).
- mav3rick 8y agoPerformance isn't an issue with C code. Security is.
- atilaneves 8y agoIt can be. Unless one resorts to macros, templates are usually faster.
- mav3rick 8y agoEverything can be an issue everywhere. No one will choose Node JS over C to counter performance.
- atilaneves 8y agoNo, but one can get code to perform as fast or faster than C with any other systems programming language, especially if they have templates/generics.
- goatlover 8y agoThe libuv library Node makes us of for handling async calls is written in C.
- vasilia 8y agoIt's not a problem. The main problem is the assembly code. There is no way to inline it in JS code. After boot time system should make some things like A20, enable paging/protected and long mode, build GDT/IDT.
- goatlover 8y agoRight, but my reply to the parent was that Node isn't a performance improvement over C because it has async, when the async part is written in C. JS popularity has led to some wild claims. Never thought I'd live to see the day someone proposed a JS runtime would be more performant than C for writing operating systems.
- Itaxpica 8y agoSomeone suggesting re-writing the Linux kernel in nodejs may be a strong contender for Peak HN
- vasilia 8y agoWhy Linux? It's a simple hybrid kernel. It will be better to rewrite HURD/L4.
- mixedCase 8y agoWhat's your opinion on Rust? It seems to be successfully filling the niche Ada could not, even if Ada's problems were more political than technical.
- hazz99 8y agoI'm not a kernel programmer, and I haven't used Rust before, so take that into consideration. Some of my favourite things about Ada is it's approach to concurrency, which (I think) is far superior to other imperative concurrent languages like Go. We should never have to deal with low-level primitives like semaphores and mutexes - it's 2018! Why are we stuck in the 80s? I've heard that concurrency is difficult in Rust, but I've never used it, so I can't comment. I plan on learning very soon!
- dilyevsky 8y agoWe should never have to deal with low level primitives like functions and variables - it’s 2018 why are we stuck in the 50s?
- hazz99 8y agoThat is an incorrect analogy. Semaphores are the "goto" statement of the concurrent world. Semaphores are not typed. They is no semantic connection to the thing they protect. Debugging concurrent systems with mutual exclusion enforced through these low-level primitives is a nightmare. If you forgot to lock/unlock, you'll never know! The compiler cannot check it. Deadlocks are imminent. We've had better abstractions since the 80s. Conditional critical regions, monitors, and (ideally) protected objects. Hell, even guards are better than semaphores and mutexes - at least they are associated with their critical region! I struggle to think of situations where a semaphore is the best choice. Maybe in extremely high-performance cases, but even then the compiler can usually make a better decision.
- goatlover 8y agoWell, Alan Key pretty much said that in the 70s, and has stuck to his high level guns all this time.