News for hackers. Stuff that matters.
Re:Mint, a new HTTP library for Elixir by skrebbel on Monday February 25, 2019 @01:23PM (#19247982)
It took me a while to figure out whether this is an HTTP client library or a server library. Turns out it is the former. Nice! I like that it's in-process. I wish more Elixir libraries would default to such a design.

(EDIT: I had accidentally written "latter" instead of "former" above, causing a bunch of people to correct me, thanks for that)

Re:Mint, a new HTTP library for Elixir by derefr on Monday February 25, 2019 @01:50PM (#19248230)
I've noticed that the distinction between server and client is much less apparent in HTTP2 libraries than it was in HTTP1 libraries. It doesn't seem like Mint follows this philosophy, but many HTTP2 libraries (even ones that also support HTTP1) are both server and client libraries.

Presumably this is because HTTP2 is sort of two protocol layers stuck together—a session layer and an application layer—and at the session layer, HTTP2 just has identical "peers" rather than any concept of client/server. (Theoretically either side of an HTTP2 connection could open a session to the other side and send a message! It's just the semantics of the HTTP-mimicking application layer that stop this. If you read the RFC, all the session stuff—frames et al—are specified in terms of "peers", and it's only when the spec starts talking about HTTP request-response that we see "clients" and "servers" mentioned.)

Since implementing the session layer is most of the work of implementing an HTTP2 client/server, and the session layer is just about "peers", once you've implemented it for a client (or server), you can reuse it to implement a server (or client) mostly "for free."

Re:Mint, a new HTTP library for Elixir by thibaut_barrere on Monday February 25, 2019 @01:29PM (#19248045)
It's a "new HTTP client" (tweet from one of the authors -> https://twitter.com/whatyouhide/status/1100082898986774528).
Re:Mint, a new HTTP library for Elixir by hartator on Monday February 25, 2019 @01:38PM (#19248109)
The example is confusing, but it's actually an HTTP client.
Re:Mint, a new HTTP library for Elixir by davidw on Monday February 25, 2019 @03:54PM (#19249364)
In the Erlang world... it's always yet another client.
Re:Mint, a new HTTP library for Elixir by msie on Monday February 25, 2019 @02:27PM (#19248567)
So, it's the former (client library).