Better HN
topnewbestaskshowjobs
Log inSign up

dc0d

9 karma · joined Mar 27, 2013 (13y ago) · 12 submissions

Submissions

comment 2y ago · link · parent

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

comment 2y ago · link · parent

> 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.

comment 5y ago · link · parent

"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.

4.

Tool bit like Git stash, without git(github.com ↗)

3 points · by dc0d · 7y ago · discuss

5.

Sub-Commands for Go using built-in flag package(github.com ↗)

1 points · by dc0d · 8y ago · discuss

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

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.

8.

Goreuse: Generic Code for Go(github.com ↗)

19 points · by dc0d · 8y ago · 3 comments

comment 9y ago · link · parent

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.

10.

ETag Middleware (for Golang)(github.com ↗)

2 points · by dc0d · 9y ago · 1 comment

11.

Elixir to start with(codementor.io ↗)

1 points · by dc0d · 9y ago · discuss

12.

Ask HN: When will be an official docker image for CouchDB 2.0 (if ever)?

1 points · by dc0d · 9y ago · discuss