Live data from Hacker News

Writing Linux Modules in Ada (2016)

nihamkin.com

1–10 of 87 posts

Re: Writing Linux Modules in Ada (2016)

#2
Back in university I took a course in legacy programming. We did a project in each of Fortran, COBOL and Ada. I enjoyed Ada very much. The module system made a lot of sense to me and the compiler found a lot of mistakes (compared to C). Thanks for sharing this article. It brought me back and makes me want to give Ada another go now that I have 10 years of real world experience.

Re: Writing Linux Modules in Ada (2016)

#4
Hah, my perfect niche!

I think that an ada-like language could make a real resurgence in embedded programming. Ada gets all the things about bare-metal right that C got wrong. However, it's held up by legacy tooling, clunky syntax, and obtuse compiler errors. Adacore has gone a long way towards alleviating those issues over the last few years, with alire and the ada_language_server. Time will see where this language takes us.

Re: Writing Linux Modules in Ada (2016)

#6
post #2

Back in university I took a course in legacy programming. We did a project in each of Fortran, COBOL and Ada. I enjoyed Ada very much. The module system made a lot of sense to me and the compiler found a lot of mistakes (compared to C). Thanks for sharing this article. It brought me back and makes me want to give Ada another go now that I have 10 years of real world experience.

I had a digital design course. The instructor hated verilog and preferred VHDL for reason that didn't make much sense to me those days. There was only one VHDL compiler available that time called ghdl which worked fine for course. There was modelsim as well but one had to go to the lab.

Later I learnt that VHDL is related to ADA. I've been itching to try it for a long while. Might give it a try this week. Currently I am in my Rust phase and loving it (thanks cargo). My Haskell fever is gone though.

Re: Writing Linux Modules in Ada (2016)

#7

Hah, my perfect niche! I think that an ada-like language could make a real resurgence in embedded programming. Ada gets all the things about bare-metal right that C got wrong. However, it's held up by legacy tooling, clunky syntax, and obtuse compiler errors. Adacore has gone a long way towards alleviating those issues over the last few years, with alire and the ada_language_server. Time will see where this language…

I completely agree. 'Design-by-committee' gets a bad rap, but Ada's designers got a lot of things right when it came to bare-metal programming. The ability to specify the in-memory representation of a type is one of my personal favourites. I don't think Ada's syntax has aged well. I wish it would get a 21st-century overhaul. I don't think that's likely though, but we can all dream. AdaCore do great work, and contribute a lot back to the open-source community.

Re: Writing Linux Modules in Ada (2016)

#8
I've never used Ada, and I also don't really do systems stuff, but it does seem like it's a pretty neat language, at least compared to C. From what I have seen, it looks like it has better memory guarantees while still being fast and low-level.

With be the popularity of Rust, it makes me kind of wonder why Ada isn't more popular. I should give the language a go.

Re: Writing Linux Modules in Ada (2016)

#10
Cool project for a proof of concept. That said, the kernel has so many unsafe features that making real world modules that are safe requires a lot of boilerplate to get around those features. Sometimes it's impossible. Rust is only barely useable now after tons of work to make it viable.
Post reply on HN