HN user

alain_gilbert

452 karma

http://agilbert.name/

alain.gilbert.15@gmail.com

Posts12
Comments204
View on HN

reminds me of an project I made many years ago to manage dependencies in between repositories. So if project A was waiting for a fix in project B to be in production, you could draw a line between the two commits (from project A to project B) and get notified when the commit in project B gets into the "production" branch. And then merge and deploy your feature branch from project A.

Go's Sweet 16 8 months ago

I worked on a toy programming language (that compile down to golang), which is a fork of the go lexer/parser, but it changes how functions can only return one value allowing the use of Result[T]/Option[T] and error propagation operators `!` and `?`.

It has enums (sum type), tuple, built-in Set[T], and good Iterator methods. It has very nice type inferred lambda function (heavily inspired by the swift syntax)... lots of good stuff!

https://github.com/alaingilbert/agl

Nim 2.2.6 9 months ago

@tinfoilhatter if that's the example of an `hostile and abrasive member of the Nim community` looks to me like the nim community is doing just fine.

Nim 2.2.6 9 months ago

...and views he expressed to me regarding climate change...

Is that for real? I bet I can find some chocolate chip cookie recipe that the Go team would disagree with me. I ain't ever using Go again.

Even after reading the article, it's not clear why that particular expression is so egregiously poor.

I'm glad I'm not the only one wondering why this is not instant to type check.

For case like this, I'd say your text editor should definitely just be able to tell you right away that this variable is a "string" when you mouse over it.

Go 1.25 Release Notes 11 months ago

Or if he was to use any kind of decent text editor, he could also just place his mouse over the variable and see the type it has.

Then comes the hard part "where is it defined"... he could even press "command" and then click on it.

Gleam v1.12 12 months ago

The most ironic thing is that if you search for "nazi programming language" you'll find gleam.

I'm working on this programming language that compiles to Go.

The goal is to have it behave like typescript for Go, where any Go program would compile out of the box, but then you can use the new syntax.

Featuring: built-in Set/Enum/Tuple/lambda/"error propagation operators"

It also have a working LSP server and generates a sourcemap, so when you get a runtime stacktrace, it gives you the original line in your .agl file as well as the one in the generated .go file.

I recently finish porting all my "advent of code 2024" in AGL -> https://github.com/alaingilbert/agl/tree/master/examples/adv...

https://github.com/alaingilbert/agl

I was also quite inspired by borgo. But unlike borgo, yes, at this time nil is part of the language, which allows you to use other libraries without the need to make laborious wrappers. But if I can manage to create a script to automatically make the wrappers, I'd love to remove the nil keyword entirely.

I haven't think much about it, a lot of things are probably going to change. I tried to get something working as fast as I possibly could, and in two weeks, lots of corners were cut to make it happen.

Thanks for the feedback, it's good to know when something does not make sense ^^

I did use AI for the logo! Using Go libraries is still kinda rough, the standard library works fine, but for other libraries you'd need to (re) define the types manually. I'm trying to make something that would generate it all automatically, but there is some problems that I don't know how I would solve.

For example, I'd like to have the pointers being automatically wrapped in a Option[T], but then if you have something like a linked list, with a struct containing pointers to other nodes, it gets complicated.

I think you guys just made a bunch of low hanging fruits that are dead easy to make way better without too much effort.

Which also provide the opportunity to maybe have a fairly successful project for the author of the rewrite project.

Because it's annoying to have to implement it every time you make a one off script (or small projects) among other things.

And it is usually a pretty basic iterator standard to have it so that someone maybe not as familiar with concepts like reduce can just sum the sequence.

Or if someone not familiar with reduce read your code, and is like "what is that `.reduce(0, +)` thing everywhere!?" while instead it should be a no brainer `.sum()` <-- "yup make sense"

https://doc.rust-lang.org/std/iter/trait.Sum.html

My two mains "why tf is this not built-in" are:

"Why are tuple not Hashable ?!"

Which means that you cannot have a tuple of Int `(1, 1)` as a key in a dict, and you have to make a struct that implement Hashable instead.

And

"Why do they not have a `.sum()` and I have to do `.reduce(0, +)` every time instead."

Or implement it yourself

    extension Sequence where Element: AdditiveArithmetic {
        func sum() -> Element { reduce(.zero, +) }
    }