I remember my mind being blown when I first came across list comprehensions. It was one thing to be able to effectively generate one list from another:
Squares = [X*X || X <- [1,2,3,4]].
(This can be read as, Squares equals a list of X*Xs such that each X is a member of [1,2,3,4])
Going from that to then realizing that you can use list comprehensions to implement quicksort in basically 2 lines of code:
qsort([]) ->
[];
qsort([H | T]) ->
qsort([ X || X <- T, X < H ]) ++ [H] ++ qsort([ X || X <- T, X >= H ]).
These examples are written in Erlang though list comprehensions are found in many other languages, Python and Haskell to name a couple.
Does this logic not basically invalidate anything that isn't imperative at a high level that eventually runs on a processor? Like, "why bother writing Haskell? It just gets compiled and ran imperatively." Isn't the whole point that you can reason about Haskell?
That's true, in fact there are a whole bunch of BEAM languages[1]. It's just if OP needs to learn Erlang for their current project, learning Elixir, Gleam, LFE etc... might not be the best use of time.
I think Erlang's concurrency model is quite a bit different to the likes of Go (and probably most other languages). With Go you still have to worry about shared memory and have to manage that correctly when using Go routines. In Erlang, there is no shared memory with processes. Parallel processes are completely independent, they have their own stack and heap, and so the only way one process is able to share or access data to/from another process is through message passing.
I haven't used Go all that much, but in Python I try to write in a style that avoids any mutable objects accessed by more than one thread. All communication is through queues and I tend to have a simple RPC scheme sending callables through the queues. This has always worked pretty well for me.
In recent years there has been some improvement with the available tooling with the likes of rebar3[1] and just a few months ago WhatsApp released ELP (Erlang Language Platform)[2] which integrates with your IDE as a language server that provides really nice support when working with Erlang.
If you know Emacs, there’s a really good editor mode that’s included with Erlang. Shameless plug…I made a simple tool to make it easier to configure it…
I've had such a good experience with ELP, though did have some issues getting it working correctly with my emacs setup (that's probably somehow my fault). I will say though that for VSCode, it's a case of installing the extension, zero config and it just works!
The difference is providing a short succinct message that is either familiar or can be looked up as rg does here, vs vaguely saying invalid name without saying why.
It worsens the UX for no reason.
As a sibling comment said, the program already knows why the name was invalid. It would have cost nothing to surface the reason when reporting the error.
I'm not arguing that I think "Invalid name" is a good message here. I don't think it is. But if you're relying on either familiarity or the ability to look it up, then you're still relying on there being a manual to provide that information in the first place if it is not somehow included in the error message itself. As would be the case here with Bee and rg.
This seems rather incomplete. Even if you were to use the cheat sheet to create a role/user and create a policy with a condition there's zero mention of row-level security, or even the 'ENABLE ROW LEVEL SECURITY' statement which is a requirement for any of this to even work. There's no mention on differences between 'USING' and 'WITH CHECK' on a policy and it seems to give off the idea that users and roles are separate things.
That's fair. It doesn't address the numerous cases where they did similar, but in this one case, sure, despite it matching their business model perfectly.
Going from that to then realizing that you can use list comprehensions to implement quicksort in basically 2 lines of code:
These examples are written in Erlang though list comprehensions are found in many other languages, Python and Haskell to name a couple.