Top
Best
New

Posted by tomekw 21 hours ago

Doom-ada: Doom Emacs Ada language module with syntax, LSP and Alire support(github.com)
71 points | 11 comments
valorzard 20 hours ago|
Ada is something I've always wanted to get into (it interests me that there's a low level programming language that came around at the same time as C but just never took off)

Ada has a bunch of features built into it already, including concurrency support with tasks [0]

I just haven't found the right motivation to figure out what to do with it yet. Maybe I could play around with the Raylib bindings [1] at some point?

There's also the SDL bindings, which a LOT of work has seemingly gone into [2]

[0] https://learn.adacore.com/courses/intro-to-ada/chapters/task...

[1] https://blog.adacore.com/ada-gamedev-part-3-enjoy-video-game...

[2] https://github.com/ada-game-framework/sdlada

jordanb 18 hours ago|
I learned Ada back in the day, and like it a lot. Always want a project to get back into it. It's more C++ than C though. Arguably, it's C++ done right, or rather, a worse-is-better situation with C++.

One take away is that learning Ada would be a good way to learn the proper way to write C++ code, because the patterns that C++ developers eventually adopted for that level of abstraction are prescribed in Ada. For instance, Ada's Controlled Types map pretty much exactly to the C++ "RAII" pattern.

Ada also is better than C as an embedded language because it has features that make mapping to hardware easier. For instance, it has Representation Clauses that describe to the compiler how a data structure needs to be laid out in memory. It also has native support for bit manipulation. This makes mmaped-io extremely easy and reliable.

lr0 1 hour ago||

   git clone https://github.com/tomekw/doom-ada ~/.doom.d/modules/lang/ada

Why don't contribute this to Doom Emacs repo instead? I personally would not enjoy having git submodules in my config repo.
tomekw 50 minutes ago|
I will. This is a first step to gather feedback and everything.
globular-toast 18 hours ago||
Why is it specific to doom emacs?
fleur-de-lotus 16 hours ago||
How can I use it from stock emacs ?
v9v 3 hours ago||
It seems all this package does is install and configure ada-ts-mode and eglot (to use ada-language-server) with some custom commands (defined in config.lisp). Here's how I adapted it to my config: https://pastes.io/ada-config

Note that I added a format-on-save hook in my config, and since I do completions using corfu and not company, I didn't include that part of the package.

tomekw 18 hours ago||
Nothing specific to Doom Emacs. And that’s great! I just packaged it so it just works! :)
forty 17 hours ago|||
The author/maintainer of doom emacs is amazing but also very nice, I think you should try to open a MR to include your work inside the project, which would make it even smoother to enable and also easier to discover
tomekw 16 hours ago||
I will, I will. A man has to start somewhere ;) Thanks!
iLemming 16 hours ago|||
Yes! Doom Emacs & Spacemacs are recipe books, not necessarily concrete products you have to use in prescriptive manner. Any Emacs user can make use of their modules, some of them are full of interesting gems. I'd highly recommend exploring them for ideas.
salibs34y 19 hours ago|
[dead]