<- Back
Comments (62)
- munchler> I’ve also heard that functional languages lend themselves especially well to parsing tasks, and I’ve never understood why, so it’s a good opportunity to learn.This is mainly due to a technique called "parser combinators", which can be expressed very cleanly in functional languages. The idea is to start with a standard set of primitive general-purpose parsers and combine them into more complex parsers that are specific to the task at hand. If you have an interest in either functional programming or parsing in general, parser combinators are good to have in your toolkit.It looks like Gleam has at least two parser combinator packages that you might be able to use: • party (https://hexdocs.pm/party/) • parser_gleam (https://hexdocs.pm/parser_gleam/)
- justusthaneAs someone who isn’t a programmer, but enjoys dabbling, and has been curious about functional languages, this was a really helpful (and fun!) read!Tutorials written by beginners are so valuable, because once you’re more experienced with a given subject, it’s hard to remember what it was like to be a beginner. It can feel vulnerable to write them because you have to expose your ignorance, but it’s such a great thing to do.
- jszymborskiGleam has long kinda seemed like my idea programming language. My only real hang-up is maybe an irrational one, but I don't love that it needs either a VM (BEAM) to run, or for it to be compiled to an interpreted language (javascript). I really wish it could target LLVM or something so it could be compiled down to native.Maybe someone can sell me on BEAM though.EDIT: The comments below are indeed beginning to sell me on BEAM, I'm realizing my reluctance might come from some negative experiences I've had dealing with the JVM.
- WJWIt really is a neat language. Sort of like the smaller more elegant language that has been waiting to break out of Haskell, but combined with Erlang. Definitely not the "standard" programming language but very very nice.The core language is pretty small too. Any moderately experienced programmer can probably burn through the language tour and be ready for a few simple AoC problems in an afternoon or so. This is due to the language designer having a very strict dedication to keeping the language as simple as possible. (Much to the chagrin of my muscle memory, as I keep expecting pattern matching on function arguments to work but it doesn't)
- asib> [...] It’s an Elixir-like language that supports static typing.Maybe just me, but when I tried Gleam it really came off much more like Rust. In fact, other than running on the BEAM (and having some OTP libs in the works), it doesn't really _feel_ like Elixir at all to me, but that is definitely an opinion.
- thayneMy biggest problem with gleam is the lack of any kind of ad-hoc polymorphism (interface, trait, typeclass, protocol, etc.).It also seems weird to make a language for BEAM that depends on a separate library for actors and concurrency.
- figbertI was tricked into trying Gleam earlier this summer, and really liked it! I anticipate that I will at least use it for all future web projects (one example: https://github.com/FIGBERT/bdab) due to my serious JavaScript allergy.I will note something that might be of use for the work in this particular article: https://hexdocs.pm/gleam_stdlib/gleam/dynamic/decode.htmlGleam Decoders are something I haven’t fully wrapped my head around, but are supposedly very powerful and do exactly what this article is focused on (parsing input data into Gleam types) in a more(?) idiomatic way.
- brightballThere was a great talk on Gleam at the Carolina Code Conference in 2024.https://youtu.be/vyEWc0-kbkw?si=3o-KasK4H2n-0_KD
- oDotI moved to Gleam with all of my projects and am not going back. The language is fantastic but really the most impactful are the coding paradigms that it enables, especially the actor model and especially on the front end (The Elm Architecture)
- datboi_420This was a great read! One thing that def makes Gleams error handling _look_ nicer, is utilizing `result.try` with the `use` keyword.
- scuff3dI tried with Gleam, I really wanted to like it. I really like Louis Pilfold and I like his goals for the language. But something about it just didn't click for me. It's a good language, but at the end of the day I just didn't enjoy writing it.It might be something the author talked about, but I think the language might be too small. It's one of the things I dislike about Rust too. I prefer a more batteries included approach because I can't stand having to pull in a bunch of small dependencies.
- IncreasePostsI'm glad I'm not the only one who hoarded all their AIM log data. Whenever I want to cringe I can pull up a random file
- librastevethanks for posting this --- very interesting to read the "first impressions of FP" side of itto be honest, I felt like shouting "please try raku" (https://raku.org) after about 4 paragraphs!why? well raku Grammars are built in parsers...
- effnorwood[dead]
- curtisszmania[dead]
- lordofgibbonsGleam has caught my eye for the past year or so, and I'd totally learn it if I didn't believe firmly that we won't be coding by hand within the next 9 months. It'll all be done by LLMs so syntax and ergonomics won't mean too much. At least as soon as LLMs learn to stop being turbo-slop generators.
- back2dafuchaThe only languages Im interested in are future proof AI resistant languages. Since LLMs need alot of training (because they cant read language ASTs and write code correctly), a language that either isnt possible to express using fonts and character sets on the Internet, can only live in a private cloud, and is known to only verified practitioners runs on everything, and yet cant be decompiled.You can launch a nuclear war in 5 lines of Visual Basic. I want a language AI doesnt know and cannot ever know.