The 2 stacks is really cool. Seems like it solves a lot of problems dynamic allocation + RAII solves. Is there more written about this?
You don't need explicit language support to do this -- it's a fairly common practice in videogame development, but we usually usually call it an arena/scratch buffer. Ryan Fleury has a wonderful article where goes at length about different memory management strategies [1]. It's just a static buffer that you can use for temporary allocations, e.g. to return an array of 50 int32's to a parent stack frame you can just a…
Ada's dependent types, and its types as a whole
131–140 of 146 posts
Re: Ada's dependent types, and its types as a whole
#132Earlier quoted context omitted.
I'm a bit disappointed that we've ended up with Rust in the kernel but not Ada. The kernel relies on GCC and there's already an Ada compiler in GCC, so it wouldn't require adding another compiler as a build requirement like Rust does. There's a couple of major advantages that Ada could have in the Linux over Rust for safe drivers: 1. Having the option to use SPARK for fully verified code provides a superset of the co…
>ended up with Rust in the kernel but not Ada Linus hated Ada. I suspect he doesn't exactly like Rust either but the Tribe is just too strong within Linux.
Re: Ada's dependent types, and its types as a whole
#133Earlier quoted context omitted.
I really wanted to use Ada, at least learn it. Concepts are nice but I gave up when started looking into unicode support. It was wild, a bit discouraging. Or has the situation changed? What’s the unicode status in Ada?
You can embed and work with UTF-8 strings with no issue (I have source with emoji string literals), but if you need complex manipulation of code points vs glyphs etc. I’m not sure how robust the libraries are for what you are trying to do. https://ada-lang.io/docs/learn/how-tos/gnat_and_utf_8/
Re: Ada's dependent types, and its types as a whole
#134Earlier quoted context omitted.
>ended up with Rust in the kernel but not Ada Linus hated Ada. I suspect he doesn't exactly like Rust either but the Tribe is just too strong within Linux.
Do you have a source for that? I've found his remarks on Pascal and C++ but not Ada.
> We've had the system people who used Modula-2 or Ada, and I have to say Rust looks a lot better than either of those two disasters.
https://www.infoworld.com/article/2247741/linux-at-25-linus-...
Re: Ada's dependent types, and its types as a whole
#135Earlier quoted context omitted.
rust is in the kernel to attract the young developers, which ada does not.
GetIntoGamedev is not old, he's in his 20's. The issue is, is that people are not prepared to trying something if it doesn't look like C or C++.
Re: Ada's dependent types, and its types as a whole
#136Earlier quoted context omitted.
The original point is that there is only one open implementation. This is a link to that one open implementation. You are pushing this conversation around in circles.
How many open implementations are there for plenty of other languages, like the main implementations, driving the whole ecosystem, not partial implementations with if and buts?
(Serious question; I genuinely don't know. Always assumed it was about 1, though.)
Re: Ada's dependent types, and its types as a whole
#137Earlier quoted context omitted.
As far as I'm aware, the compiler AdaCore sells is just GCC. You can install GCC built with Ada support from your distros package manager and it will just work. You can also download builds from here: https://github.com/alire-project/GNAT-FSF-builds
If something hasn't changed, FSF builds are a year behind libre version (by design), and libre version is GPL3 cancer which is not suitable for commercial development. You're then stuck either with a year old version or buy into AdaCore Pro version of it. Not great, not terrible.. but that's kind of the only game out in the open, which is what makes it different from most of other languages out there.
YTF would GPL v. 3 be "cancer" for commercial development? (Shades of Ballmer; is Linux also "a cancer" to you?)
EULAs have all kinds of stupid shit in them already. Just make yours GPL3-compatible.
Re: Ada's dependent types, and its types as a whole
#138Earlier quoted context omitted.
How many open implementations are there for plenty of other languages, like the main implementations, driving the whole ecosystem, not partial implementations with if and buts?
How many open implementations are there of Rust? (Serious question; I genuinely don't know. Always assumed it was about 1, though.)
Re: Ada's dependent types, and its types as a whole
#139Earlier quoted context omitted.
The situation was pretty bad a few years ago, and the licensing was confusing but it's pretty straightforward now with Alire. (AdaCore also got rid of their "Community Edition which had the weird license restrictions). I'm doing a presentation at FOSDEM next year called "Get started with Ada in 2 minutes or less!"[1]; because (on MacOS and Linux) I can go from not having no toolchain a all to compiling hello world in…
Your step 1 violated my very hard rule against piping curl into a shell. …and is ironic advice for a safety-critical system, no? ——- (Yes, I’ve read arp242.net/curl-to-sh.html - but my point being that as I’d be new to Ada then I don’t know who to trust; I’ve never heard of getada.dev therefore I don’t trust it)
https://www.rust-lang.org/learn/get-started
> The primary way that folks install Rust is through a tool called Rustup, which is a Rust installer and version management tool.
A couple of lines below
> curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Re: Ada's dependent types, and its types as a whole
#140Earlier quoted context omitted.
Ada is a lot of fun and a great thing which is ruined (and blessed) by the fact there's de facto only one implementation and company behind it out in the open, and that is semi-closed / license PITA. There were improvements over the years by AdaCore, but I think this altogether hurt the adoption of such a great language in general - no other wide open implementation (like Rust has). If you want to see an extreme exam…
Yeah, to this day Ada, though a beautiful language, is a hard choice to make if you are concerned about certain targets. How would i get my program to compile to Android NDK? Even Swift has a better story with it's tooling. That's before we even talk about important stuff like libraries.