6 ms·
My first experience with Gleam Language
- giovannibonetti 2y agoI have been slowly getting acquainted with the language over the last few months and I really love it. It combines great features from multiple languages into a single one that is perfect for building back-end web apps: - It is strongly typed, and has sum types like Rust, with very similar syntax, nice error messages, full type inference and first-party LSP implementation for great IDE tooling; - Unlike Rust, it is a high level language with garbage collection and a sane concurrency mechanism; - It follows the same concurrency paradigm from Erlang, since it is compiled to it and runs in the BEAM. It is quite performant for I/O stuff, apparently in the same ballpark as Go; - It can also be compiled to JS either to run either in the back-end or the front-end side, making it possible to build isomorphic web apps if that's your thing.
- brightball 2y agoThere was an excellent talk on Gleam at the Carolina Code Conference last weekend. It should be available on YouTube in a week or so.
- clarkmcc 2y agoI’m most excited about the Rust-ish types in a garbage collected language. Aside from the lack of compiling to static binaries, this fills an empty void for me between Go and Rustz
- pmarreck 2y agoI'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.)
- windlep 2y agoThe 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).
- karmajunkie 2y agonotably 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.
- pmarreck 2y agoI 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.
- archargelod 2y agoCheck 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 https://nim-lang.org
- pmarreck 2y agonim unfortunately took python's significant-indentation idea though
- cb321 2y agoFor 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.
- pmarreck 2y agoRoc, 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.
- cb321 2y agohttps://github.com/c-blake/cligen 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 https://github.com/c-blake/bu . Unsure all that adds up to "critical mass" for you, but it seemed worth noting.
- tlavoie 2y agoHow about OCaml? https://ocaml.org/ https://ocaml.org/ It's not BEAM-based, though I don't know that any single-file deployment would be either.
- pmarreck 2y agoI’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.
- tlavoie 2y agoThere 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.
- Fervicus 2y ago[flagged]
- HauntedDrum 2y ago> The politics on their homepage is a bit off a turn off though. This is probably the idea.
- asib 2y ago[flagged]
- amw-zero 2y ago[flagged]
- okkdev 2y ago[flagged]
- karmajunkie 2y ago[flagged]
- adipose 2y ago[flagged]
- heterodoxlib 2y agoIt's a shame that we can't have a reasonable conversation about gender and mental health anymore without it offending someone or other. "Trans rights are human rights" is a perfectly reasonable statement if what is meant is that trans people are entitled to every human right. It's a dangerous call for groupthink if what is meant is "the right to gender-affirming care is a human right". One can be both a deeply caring person who views trans people as people who deserve love and respect and also be wary of running headlong after politically-driven healthcare practices that, when looked at critically, seem to do more harm than good. But even saying that immediately makes me a far-right neonazi as far as many in communities like Gleam's are concerned, and that's where I share OP's discomfort with the language. It's unhelpful to ostracize large numbers of good, generous people from your community because they have science-based reservations about how to best help certain members of our society. Edit: As expected, immediately flagged. The groupthink is real and it's dangerous. People are already getting hurt, and silencing calls for moderation is not helping, it's making things worse.
- clarkmcc 2y agoGleam seems cool. In the Discord the lead guy bit off someone’s head in chat and I thumbs downed his comment, then he removed my thumbs down and messaged me to say that I was rude. Bit of a turn off tbh…
- giraffe_lady 2y agoWhat did "someone" say? Key piece of info here.
- lolinder 2y agoThis is just an anecdote and should be taken as such, but I don't know how relevant what was said is—removing an emoji reaction on one of your own posts is a pretty petty abuse of admin privileges regardless of the context. I'm actually less concerned about the follow up message in private, it's the undoing of expressions of disapproval of the admin's behavior that is most concerning regardless of what was said by the original person. A good admin can cope with disagreement about their moderation practices without having to remove the evidence that someone disagreed.
- clarkmcc 2y agoYeah I didn’t give his comment much thought other than the thumbs down, it was the follow up reprimand for even emoting and removing the emote. Just the whole exchange rubbed me the wrong way. Here are the receipts https://imgur.com/a/nsRpFGk https://imgur.com/a/nsRpFGk
- giraffe_lady 2y agoI don't think either of you come off either great or horribly here. That is kind of a rude action (esp I mean, were you just a lurker at this point?) but also he didn't handle it very tactfully. But it does seem wild to bring it up as a top level comment on another forum now. What are you hoping for? People to not use the language? An apology?