Live data from Hacker News

Show HN: Alumina Programming Language

github.com

11–20 of 90 posts

Re: Show HN: Alumina Programming Language

#11
post #7

I get that this is mostly for fun, but this is as good a place as any to bring up an issue I rarely see discussed with any post about a new language. Well-established languages have tons of widely used, highly vetted libraries implementing functionality that doesn’t exist in the new language and would be totally impractical for an individual to implement themselves. For example, if I’m doing scientific computing, I n…

Libraries are a farce. Stdlib or die. I 100% mean this and live this.

Why even use stdlib? Or an OS? Just write everything every time down to the bare metal.

Re: Show HN: Alumina Programming Language

#12
I thought people got along with Rust due to its features and semantics and learned to live with the syntax. Not it being something one would copy. (I'm personally still hoping for a Ratfor/Coffeescript transpiler)

Also, wonder how long it'll take until we see a "Aluminia" fork...

Re: Show HN: Alumina Programming Language

#13
post #10

So, as far as I understand its main feature is that it has a Rust-like syntax?

As far as I know it doesn't have a single feature that is really unique. It's more like a combination of things I like from other languages, like syntax and expressions from Rust, defer expressions from Go, UFCS from D.

The overarching theme is to see how far you can go making a language that feels high level without having a garbage collector or RAII. I used to use Deplhi/Pascal a lot when I was younger and it was this kind of language.

Re: Show HN: Alumina Programming Language

#14
> Unlike Rust, however, Alumina is not memory-safe and it requires manual memory management.

From what I gather, it might be more accurate to say that Alumina has no ownership model. Rust requires manual memory management, but offers the ownership model as a compile-time tool for doing so.

It would actually be pretty interesting to see some experimentation around alternative ownership models.

Re: Show HN: Alumina Programming Language

#15
post #6

Love this. What if Rust provide a separate analyzer to analyze potential memory leak from this language.

Valgrind and Sanitizers should work on Alumina. I have not actually tried them myself yet, but I don't see any reason why they couldn't work.

The only potential problem I see that with the current C backend, the debugging information is very hard to trace back to the original Alumina source code, so it might be hard to see where the leaks are coming from. This is something I plan to address in the self-hosted compiler, once it is functional.

Re: Show HN: Alumina Programming Language

#17
I really don’t like the cognitive load of having to remember to use defer. We already have the scope defined, why add something extra?

IMHO the way it’s used in Go is a workaround, of luck of destructors, not a feature.

Edit: not a criticism on your language OP, which is better than what I could have ever built. Just a comment in the “defer” trend.

Re: Show HN: Alumina Programming Language

#18
post #7

Earlier quoted context omitted.

Libraries are a farce. Stdlib or die. I 100% mean this and live this.

That's a strange take. Do you mean that you would rather call external binaries directly, like Bash does, or that you would rather re-implement all functionality you need, however complex?

To me, there is value in the process and craft. It started as a one year challenge to use only stdlib in all projects, for work and personal code, and became a way of life. Though it may not work for everyone, or all languages, or all skillsets, it was a revealing experience.

In retrospect, it made sense given that in my community we make our own furniture, instruments, tools, foods from whole items. Code seemed like the next logical step. During travels, once there was a man who had a word in his language for this. He said it was an aphorism loosely translatable to "the beauty of struggle". As he explained it, this is the positive benefit gained in return for the time and effort to do something as an act of appreciation of the craft, and how the value in the experience surpasses the debt of time and sweat.

To put it in a more modern and eastern philosphical context, think of it like Kata.

https://en.wikipedia.org/wiki/Kata

Re: Show HN: Alumina Programming Language

#19
I'm currently working on a project similar to Tree-Sitter.

Basically, it is going to be a full-featured Compiler front-end foundation library with incremental parsing capabilities, error recovering, AST manipulations, etc, but written entirely in Rust, and hopefully with more user-friendly API for Rust devs.

May I ask you to give me some feedback on your experience with Tree Sitter, and the challenges you faced during the development of your compiler's front-end?

Thanks in advance!

Re: Show HN: Alumina Programming Language

#20

I'm currently working on a project similar to Tree-Sitter. Basically, it is going to be a full-featured Compiler front-end foundation library with incremental parsing capabilities, error recovering, AST manipulations, etc, but written entirely in Rust, and hopefully with more user-friendly API for Rust devs. May I ask you to give me some feedback on your experience with Tree Sitter, and the challenges you faced durin…

Honestly, Tree Sitter is fantastic, I can highly recommend it. By far the most user friendly and powerful parser generator I've worked with. The C API is very nice.

The only two pain point I had is that the `node-types.json` that's generated only contains the names of the nodes, not the numerical IDs. This means that if you have some codegen generating Rust enums is difficult if you want to avoid matching nodes by string.

I wrote https://github.com/tibordp/tree-sitter-visitor for generating visitor traits in Rust for a given grammar. I actually did it a bit differently in the end for Alumina, but it might come useful.

Post reply on HN