News for hackers. Stuff that matters.
Re:Show HN: Erlang REST framework by hlieberman on Tuesday November 14, 2017 @08:34PM (#15700852)
I'm not sure why you would use this over cowboy's REST handler. Cowboy is the thing that powers Phoenix -- you really can't beat it for concurrent performance.

(Loïc of NineNines is an absolutely incredible guy that does a ton of really important work, and you all should consider supporting him at https://salt.bountysource.com/teams/ninenines)

Re:Show HN: Erlang REST framework by asd1o2487c on Wednesday November 15, 2017 @12:39AM (#15701689)
> you really can't beat it for concurrent performance

You can. Cowboy is not the most performant web server in Erlang.

Re:Show HN: Erlang REST framework by shinemonad on Tuesday November 14, 2017 @08:46PM (#15700884)
you are comparing apples and oranges :) I would go in that way: -> compare cowboy with mochiweb and leptus with rooster.
Re:Show HN: Erlang REST framework by hlieberman on Tuesday November 14, 2017 @10:35PM (#15701263)
Perhaps in part, yes. But cowboy does have a very powerful REST handler built into it that does a lot of the same things: https://ninenines.eu/docs/en/cowboy/2.1/guide/rest_flowchart...
Re:Show HN: Erlang REST framework by andreineculau on Wednesday November 15, 2017 @09:12AM (#15703811)
nothing "REST" about it. 100% HTTP

PS: if anyone is interested in a language-agnostic artifact like cowboy's or webmachine's, see https://github.com/for-GET/http-decision-diagram

Re:Show HN: Erlang REST framework by noncoml on Tuesday November 14, 2017 @08:15PM (#15700779)
Erlang is amazing language in its simplicity. And it was the perfect language for the web. I keep wondering why it never really took off.
Re:Show HN: Erlang REST framework by notamy on Tuesday November 14, 2017 @08:41PM (#15700867)
Syntax as well as just that it's a really weird way of thinking about things compared to languages like Java, Python, etc. Elixir seems to be helping some with this, so I guess we'll see.
Re:Show HN: Erlang REST framework by digitalzombie on Tuesday November 14, 2017 @09:47PM (#15701117)
It's Prolog inspired. It's weird because it never took off like C/C++ like languages.

The language syntax is small enough that I believe it'll take a short time to learn and get use to the syntax versus other languages.

Re:Show HN: Erlang REST framework by kornish on Wednesday November 15, 2017 @04:15AM (#15702493)
> The language syntax is small enough that I believe it'll take a short time to learn and get use to the syntax versus other languages.

I'm not sure size of syntax has all that much to do with adoption. Case in point: Lisp.

Re:Show HN: Erlang REST framework by noncoml on Tuesday November 14, 2017 @11:24PM (#15701438)
It’s funny because I would take Erlang’s syntax over Elixir’s anyday.
Re:Show HN: Erlang REST framework by im_down_w_otp on Wednesday November 15, 2017 @12:56AM (#15701744)
Likewise. I wish I could have Erlang the language w/ Elixir's community and growth.
Re:Show HN: Erlang REST framework by skrebbel on Wednesday November 15, 2017 @01:47AM (#15701910)
Can't you? I mean, aren't they interoperable?
Re:Show HN: Erlang REST framework by saurik on Wednesday November 15, 2017 @03:10AM (#15702213)
The canonical argument order in Elixir is backwards from Erlang (and I will argue just "wrong" with respect to the functional programming paradigm: it is essentially object-oriented corruption... the subject pretty much needs to be the final argument for various forms of functional composition to work; the place where this really becomes clear is when trying to call "reduce", which continues to have the "correct" argument ordering even while almost nothing else does <- though watch me be misremembering the exact place where this clicks as it hasn't been years since I spent a lot of time trying to be happy programming with Elixir :/), so there is a massive impedance mismatch tying to reuse functions and primitives codes in one language from the other (and it almost seems like many Elixir wrappers exist only to reverse the argument order). So, sure: they are "interoperable"... but so are C and Python ;P.
Re:Show HN: Erlang REST framework by filmor on Wednesday November 15, 2017 @03:34AM (#15702328)
Erlang does not support currying, so having the subject in the last arg does not help much.

Also, the actual ordering is not `func(Args..., Subject)` but instead `func(Args..., Subject, OptionalArgs...)` which bit me more than once.

I like Elixir's consistent use of the first arg for the subject along with the pipe operator, which gives you essentially currying-like behaviour in the first argument.

Re:Show HN: Erlang REST framework by tazjin on Wednesday November 15, 2017 @09:14AM (#15703820)
> it's a really weird way of thinking about things compared to languages like Java, Python

This depends on your background. I have a very hard time thinking about procedural behaviour and state mutations, Erlang's (and other functional language's) model is much easier to keep in my head.

Re:Show HN: Erlang REST framework by noncoml on Tuesday November 14, 2017 @08:56PM (#15700912)
Yeah, syntax is a bit different than the mainstream, but it only takes a week or so to get used to it.
Re:Show HN: Erlang REST framework by qaq on Tuesday November 14, 2017 @08:24PM (#15700822)
People are creatures of habit the syntax looks "weird" to many.
Re:Show HN: Erlang REST framework by pjmlp on Wednesday November 15, 2017 @03:31AM (#15702316)
To the point of rewriting syntax just because of it, e.g. ReasonML vs OCaml...
Re:Show HN: Erlang REST framework by issaria on Wednesday November 15, 2017 @04:43AM (#15702620)
For network applications, yes. Web? no.

It actually shares a lot of the usecase with golang, I would say, if the program can be distributed as binary, there would probably no golang.

Re:Show HN: Erlang REST framework by noncoml on Wednesday November 15, 2017 @03:37PM (#15707507)
> For network applications, yes. Web? no.

Meaning?

Re:Show HN: Erlang REST framework by jwatte on Tuesday November 14, 2017 @11:52PM (#15701535)
Why no comparison to webmachine? Webmachine has a really robust mapping to the HTTP standard, and sits on top of mochiweb.
Re:Show HN: Erlang REST framework by ams6110 on Wednesday November 15, 2017 @09:25AM (#15703889)
I have used webmachine for web services in erlang, which I liked a lot. Not sure it's much maintained anymore.

https://github.com/basho/webmachine/wiki

Edit: apparently it's still at least somewhat alive... http://lists.therestfulway.com/pipermail/webmachine_lists.th...

Re:Show HN: Erlang REST framework by bfrog on Tuesday November 14, 2017 @09:23PM (#15701019)
I wasn't aware anyone was still maintaining mochiweb, thats actually somewhat comforting to know!
Re:Show HN: Erlang REST framework by Exuma on Tuesday November 14, 2017 @07:53PM (#15700665)
Hows this compare to something like Elixir + Phoenix?
Re:Show HN: Erlang REST framework by shinemonad on Tuesday November 14, 2017 @07:59PM (#15700703)
I think you cannot. The Phoenix is a solid and stable framework. rooster still just a simple implementation of a basic REST framework.
Re:Show HN: Erlang REST framework by texuf on Wednesday November 15, 2017 @04:11AM (#15702479)
Anything out there that accepts GraphQL queries?
Re:Show HN: Erlang REST framework by rvense on Wednesday November 15, 2017 @04:36AM (#15702583)
Re:Show HN: Erlang REST framework by falava on Wednesday November 15, 2017 @07:11AM (#15703203)
There is also this, in Elixir:

http://absinthe-graphql.org