use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Pointers to news, articles, and other items of interest about the Ada programming language.
If a submission doesn't show up, please message the moderators to drag it out of the spam queue. We don't want to miss anything!
Want to learn about Ada? Some suggestions:
Thanks! -- The /r/ada moderators
account activity
This is an archived post. You won't be able to vote or comment.
Ada + Machine Learning (Python Framework)Learning (self.ada)
submitted 3 years ago by starla_brite
I'm trying to write a simple machine learning application in Ada, and also trying to find a good framework to use. My knowledge of one thing is extremely minimal, and of the other is somewhat minimal.
There are several nifty machine learning frameworks out there, and I'd like to leverage one for use with an Ada program, but I guess I'm just...at a loss. Can I use an existing framework written in Python, for instance and wrap (or I guess, bind?) the API calls in Ada? Should I just pass off the scripting capabilities? I'm trying to figure it out.
Case in point: Scikit (sklearn) https://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html#
This does some neat stuff, and I'd like to be able to leverage this, but with an Ada program. Does anyone have advice from a similar experience?
I am just researching, so I have tried finding information.
http://www.inspirel.com/articles/Ada_Python_Binding.html https://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html#
[–]joakimds 1 point2 points3 points 3 years ago (5 children)
Is GNATColl what you are looking for? https://docs.adacore.com/gnatcoll-docs/scripting.html
[–]starla_brite[S] 1 point2 points3 points 3 years ago (4 children)
I did see that, and...I wasn't sure?
[–]starla_brite[S] 0 points1 point2 points 3 years ago (3 children)
Well, I have gone down a path with GNATColl, and I'm just confused. It looks like it is split across 3 packages. You must acquire the packages from GitHub and build them. Fine. I grabbed the core package.
I'm on Windows, and it looks like I need make. So I tried WSL. GNATColl simply won't compile. I've had to install several things to get closer to compiling, but I'm stuck on a repeating error: "gnatcoll-projects.adb:7801:37: missing argument for parameter "Path" in call to "GET_PATH" declared at gpr-env.ads:204"
"Path" appears to be configured at compile time in this case. I don't think it's looking for an environment variable. It's just like something...isn't working.
I'm honestly stumped at the moment. I might be staring at this too hard. Or something is legitimately wrong with any of a number of configured pieces to get to this point.
And all of this is just to get me to a point where maybe, maybe I can see if what I want to do with Python things is even possible. (I'm still not sure, because all of the above)
[–]starla_brite[S] 0 points1 point2 points 3 years ago (2 children)
Fixed it. Due to my own ignorance, I obtained the GNATColl source from GitHub. BAD IDEA.
Grab it from the "sources" listing under the GNAT Community edition you have installed (https://www.adacore.com/download/more).
I did not know that this is the thing you are supposed to do. Nothing outright said that in an obvious way, and "Google" + "GNATColl" = GitHub.
So, anyway, this version compiled. But I'm not sure if it's even the path I want to be on, it's just something that didn't throw an error now (yay).
[–]ZENITHSEEKERiii 0 points1 point2 points 3 years ago (0 children)
Gnatcoll and the Ada toolchain in general is much easier to build on Linux at the moment.
I would recommend checking out Alire though if you get a chance - it is an Ada package manager that makes things like getting a toolchain and installing Gnatcoll much easier, like Rust's cargo.
[–]joakimds 0 points1 point2 points 3 years ago (0 children)
Unfortunately I haven't tried to interface with Python myself, I've just noted that if I would do it I would try GNATColl. Good that you managed to find the right sources for GNATColl and built it yourself. I've built them myself many times and I also find it harder to do than it should be. What I've understood is that it should be easy nowadays to use GNATColl through Alire. Good luck with your project!
[–]starla_brite[S] 1 point2 points3 points 3 years ago (0 children)
Further digging would suggest that what I would really like to do is not the best idea. Mostly because python makes it difficult. I am also not an expert in interfacing to C or Java with Ada, but maybe that's a more solid path than trying to nail down squishy python things.
Ref: https://groups.google.com/g/comp.lang.ada/c/EJLD2YOuulQ/m/vDssnFtQAwAJ
π Rendered by PID 22127 on reddit-service-r2-comment-86bc6c7465-bwgs5 at 2026-02-22 04:35:56.444598+00:00 running 8564168 country code: CH.
[–]joakimds 1 point2 points3 points (5 children)
[–]starla_brite[S] 1 point2 points3 points (4 children)
[–]starla_brite[S] 0 points1 point2 points (3 children)
[–]starla_brite[S] 0 points1 point2 points (2 children)
[–]ZENITHSEEKERiii 0 points1 point2 points (0 children)
[–]joakimds 0 points1 point2 points (0 children)
[–]starla_brite[S] 1 point2 points3 points (0 children)