Re:My first experience with Gleam Language
by pmarreck on Saturday August 31, 2024 @09:17PM
(#41413397)
I'd love something like Gleam, but it compiles to a single binary and isn't Rust. (I know that that binary would invariably be larger than something Rust might produce due to the need to include things like a GC or BEAM process manager.)
[ Parent
| on HN ]
Re:My first experience with Gleam Language
by archargelod on Saturday August 31, 2024 @10:11PM
(#41413653)
Check out Nim[0] - it's strongly typed, with good type inference, clean elegant syntax, memory management is automatic (optional gc, default is ARC + small footprint cycle collector), compiles to small single binaries (Hello World is less than 100 kb), has powerful metaprogramming and lsp support.
Nim compiles to C/C++ and then to native code, so performance is on the same level as Rust/C/C++. You can also compile Nim to js/wasm and run the same code in the web.
[0] - https://nim-lang.org
Re:My first experience with Gleam Language
by pmarreck on Thursday September 05, 2024 @09:16AM
(#41456338)
nim unfortunately took python's significant-indentation idea though
Re:My first experience with Gleam Language
by cb321 on Thursday September 05, 2024 @09:56AM
(#41456692)
For what it's worth, Nim allows much more lexical flexibility than Python. You can very often use parens ()s and optional extra parens are not usually a problem either - the bracket is just not spelled {}. As another example, both code & documentation comments have "open-close" forms with #[ and ##[. Also, my hello world's are more like 16K on x64-Linux than 100K. There are also user-defined operators, lisp-like syntax macros but with static typing, etc., etc. Nim is Choice, but not everyone likes that.
Re:My first experience with Gleam Language
by pmarreck on Friday September 06, 2024 @06:00PM
(#41470030)
Roc, Nim and Idris are currently compelling to me.
Roc and Idris mainly because I like pure functional languages along with some typing. But I like Nim a lot too.
I am on the lookout for a language that I can replace some overly complex Bash scripts with for commandline use.
Re:My first experience with Gleam Language
by cb321 on Saturday September 07, 2024 @01:54PM
(#41475249)
https://github.com/c-blake/cligen makes whipping up CLI utilities very easy in Nim with a pretty fancy CL-user experience (colorized, user-tunable --help, Zsh/bash completions, brief long options, spellcheck/autosuggest on typos, etc.). As examples, there are like 60+ such utilities over at https://github.com/c-blake/bu . Unsure all that adds up to "critical mass" for you, but it seemed worth noting.
Re:My first experience with Gleam Language
by pmarreck on Sunday September 08, 2024 @10:19AM
(#41480563)
That is definitely worth noting!!
I don’t suppose I could compile a binary that runs on both linux and macos (a la Cosmopolitan)?
Re:My first experience with Gleam Language
by cb321 on Monday September 09, 2024 @04:52AM
(#41486637)
I do not have any personal experience with it, but I have heard several success stories for Actually Portable Executables & Nim and there is this to try to ease the path for cosmopolitan libc fans: https://github.com/foxoman/cosmonim/blob/master/README.md
Re:My first experience with Gleam Language
by mixmastamyk on Friday September 06, 2024 @03:23PM
(#41468956)
One of the best parts. Only it's getting worse with colon-itis.
Re:My first experience with Gleam Language
by windlep on Saturday August 31, 2024 @09:46PM
(#41413539)
The mix package manger for Elixir has a release option which compiles and bundles everything to a single binary. It appears possible to use Gleam libraries/code with mix, which should allow one to compile it all down to a single binary as well (though I haven't attempted this myself).
Re:My first experience with Gleam Language
by karmajunkie on Saturday August 31, 2024 @10:21PM
(#41413697)
notably though, a release isn’t itself runnable in the same way a go binary artifact is, for example. there are a couple of projects like burrito that create runnable artifacts but in my (limited) experience with them they can be a little finicky.
Re:My first experience with Gleam Language
by pmarreck on Monday September 02, 2024 @01:28PM
(#41427232)
I don't think that's true, or at least, I'd be surprised that I've never heard of it; it's my understanding that due to the multilayered nature of running Elixir, this is actually difficult to do. I know about Burrito, but that's not the same thing.
Re:My first experience with Gleam Language
by tlavoie on Monday September 02, 2024 @02:31AM
(#41423101)
How about OCaml? https://ocaml.org/
It's not BEAM-based, though I don't know that any single-file deployment would be either.
Re:My first experience with Gleam Language
by pmarreck on Sunday September 08, 2024 @10:25AM
(#41480589)
I’ve definitely been curious about it! Must have a ton of tooling and libraries at this point.
Roc has some great new ideas while also being inspired by the good stuff out there. But it’s also incredibly new.
Re:My first experience with Gleam Language
by tlavoie on Sunday September 08, 2024 @11:16AM
(#41480901)
There are a fair number of packages, there is a page on the recently-revised web site. I have started digging back into it myself, after tinkering on and off for some years. The new multicore functionality looks very cool, along with a bunch of the supporting work they've put into the compiler to support it all.