dc0d
Re:Elixir Nitpicks
on Wednesday February 07, 2024 @01:15PM (#39292062)
Thank you for the reference (not finished it yet).
Worth mentioning functions that can error, should follow the {:ok, response} | {:error, reason} pattern. Because if such a function returns response | {:error, reason}, then if we are inside a with clause and we want to capture the response and use it in the next with clause, such capture value can be either response or {:error, reason} - which goes around the pattern matching.
with response_f1 <- f1(),
{:ok, response_f2} <- f2(response_f1) do
# do something
else
{:error, reason_f1} ->
# we will never come here
# because the returned value from f1
# is already matched to the variable response_f1
end
Re:Elixir Nitpicks
on Wednesday February 07, 2024 @11:10AM (#39290267)
> There’s a cultural split between Erlang and Elixir that makes life harder than it needs to be.
On that note I have witnessed: "Finding Erlang developers was hard. And I hated Elixir. So, we ported everything to Java."
Maybe that was just one such occasion. Maybe there are more.
Re:Ten years without Elixir
on Thursday January 14, 2021 @01:54PM (#25780514)
"There are only two kinds of languages: the ones people complain about and the ones nobody uses."
― Bjarne Stroustrup, creator of C++ programming language
The fact that Elixir is getting some hate is a good sign - it's reach is growing.
Sub-Commands for Go using built-in flag package
Re:Goreuse: Generic Code for Go
on Sunday February 04, 2018 @12:06AM (#16301447)
Mostly. But since it is possible to replace/redefine the functions and methods too, it's a bit more capable than that and one can "override" methods or redefine functions.
Re:Goreuse: Generic Code for Go
on Saturday February 03, 2018 @02:48PM (#16299205)
goreuse takes Go, modifies the AST by replacing those parts that are needed to be customized and generates a Go source that is specialized for concrete types. It is "go generate" compatible.
Goreuse: Generic Code for Go
Re:ETag Middleware (for Golang)
on Wednesday September 20, 2017 @12:05AM (#15290754)
I have to do web projects from time to time and every time, I reinvented this wheel. Finally got the time to put it together. Might come in handy for somebody else too.