News for hackers. Stuff that matters.
Re:Joy of Elixir by cordite on Monday July 31, 2017 @06:19PM (#14896378)
While I applaud creating documentation, books, and guides for those new to the language, there's still a significant accessibility gap in resources. I already know the language, I've already done some basic stuff in phoenix, I've even made my own HTTP API wrapper as its own library. But when it comes to architecting backend systems that aren't tied to phoenix or playing around with IEx, I really feel like I am on my own.

There are erlang books, of which I am reading, though it feels like there's always emphasis on history for backwards compatibility and the other warts that Erlang has with its age. I'd like to design reliable systems that operate outside of the classic HTTP -> Elixir -> Database pattern. Things that involve working in memory, processing queues, managing sessions and state, patterns for fallbacks and breakers for services, and so on, that is where I seek more content.

Unfortunately I hear the big BEAM player around, Basho, is shutting the lights--so I can't expect to witness the wonderful presentations their engineers provide at conferences or through recordings of such conferences.

Re:Joy of Elixir by bitwalker on Tuesday August 01, 2017 @01:41AM (#14898151)
I'm actually working on a book which I think covers a lot of what you're looking for (and was what I wanted back when I got started with Elixir a few years ago). I'm covering architectural patterns for the items you mentioned as well as flow control and digging in deep on how to really leverage the fault isolation mechanisms of OTP. I'm the maintainer of Distillery, the release tooling in Elixir, so I'm also covering a lot of the gritty details involved there, such as how to work with hot upgrades and such, as well as dealing with issues in production using some of the excellent operational tooling available.

Unfortunately I probably won't be done until the end of this month, but if you're interested, keep an eye out on ElixirForum.com, since I'll announce it there when it's available.

Re:Joy of Elixir by cordite on Tuesday August 01, 2017 @10:28AM (#14900950)
I echo what Hates_ says, do you have a mailing list so that I may also be notified when things come out?
Re:Joy of Elixir by bitwalker on Tuesday August 01, 2017 @12:12PM (#14902272)
I hope you don't mind if I just copy my reply to Hates_: "I don't yet, as I've been pretty heads down. I'll put one together this week and reply back once it's up."

I'll make sure to write back to you both :)

Re:Joy of Elixir by cordite on Wednesday August 02, 2017 @10:20AM (#14910749)
Thank you!
Re:Joy of Elixir by Hates_ on Tuesday August 01, 2017 @05:12AM (#14898925)
Do you have a mailing list I can sign up to to stay notified?
Re:Joy of Elixir by bitwalker on Tuesday August 01, 2017 @12:09PM (#14902229)
I don't yet, as I've been pretty heads down. I'll put one together this week and reply back once it's up.
Re:Joy of Elixir by jah on Monday July 31, 2017 @07:57PM (#14896877)
I feel that Erlang adoption is probably the most realistic growth path for most serious Elixir developers. All of these topics you mentioned (breakers, message routing, etc) have been discussed and developed in the Erlang community for years. The only new thing that Elixir brings to the table in these areas is abstraction and syntax - both of which are arguably not needed in large complex systems.

Source: full-time Erlang developer of 7 years who spent a full year coding Elixir in its v1.0.x days

Re:Joy of Elixir by 59nadir on Tuesday August 01, 2017 @01:41AM (#14898149)
Learning how the BEAM works and the architectural decisions that make sense for running your system on it is the realistic growth path for any serious BEAM developer. This has nothing to do with any of the languages on the BEAM, but with what makes sense on the VM.

Your assertion that abstraction is somehow not needed in "large complex systems" (this being completely undefinable, by the way) seems silly and I can refute it with about as many objective reasons as I suspect you have for making that comment. Our current code base would be significantly shorter if we used Elixir (on the order of 50% less code, conservatively approximated) and is an absolute bitch to spelunk in specifically because it's just Erlang.

There is no reason to create a new project in Erlang (instead of Elixir/LFE) outside of reasons like handing it off to clients or the like and the focus should never be on learning Erlang, but on the BEAM. Any knowledge gained through that is trivially used in one of the more productive languages on the BEAM.

Re:Joy of Elixir by ams6110 on Tuesday August 01, 2017 @02:07AM (#14898261)
50% less code? Can you provide some more specifics? That seems like a bold claim.
Re:Joy of Elixir by 59nadir on Tuesday August 01, 2017 @02:48AM (#14898401)
We use REST for both internal and external calls to services (a mistake, in my opinion) and while Erlang actually has frameworks for this, none of them are good and cowboy_rest requires lots of boilerplate. Doing it with Phoenix would cut out lots of entire modules and replace them with functions without paying any real cost.

I like Erlang, but there's no upside to using it instead of something else that runs on the BEAM, apart from making a basic library that you want to use both from Erlang and Elixir (I don't know what the situation for compiling Elixir with rebar3 is).

Effectively, Erlang is to Elixir what Java is to Kotlin, except there are even less performance differences and no compatibility issues. It makes perfect sense to learn Erlang syntax and learning the semantics of it will mean you've learned BEAM semantics, but you might as well do that in Elixir and actually have a better road to it.

Edit: I'd like to add that I find a general lack of tools for dealing with boilerplate in Erlang. It also has a generally outdated functional programming skew in that it doesn't at all facilitate pipelining and this makes it less attractive to make nice abstractions like Plug(0), for example. This is exacerbated by the fact that collections aren't abstracted over, so whenever you end up dealing with them there's lots of sighing and docs checking to see what the argument order was the week they designed that particular module and that particular function in that particular collection module.

0 - https://github.com/elixir-plug/plug

Re:Joy of Elixir by amorphid on Monday July 31, 2017 @08:35PM (#14897050)
I told myself I'd avoid Erlang at all costs. Then I decided I needed to know how leex and yecc work, so I got down and dirty w/ Erlang. It's close enough to Elixir that I can stumble through my way through it.
Re:Joy of Elixir by ams6110 on Tuesday August 01, 2017 @12:27AM (#14897870)
Just the reply I was looking for. I do not have your years of Erlang experience but I've done enough to think I have a feel for the language itself as well as the fundamentals of OTP.

I've looked at Elixir and my feeling is that "it's probably great if you're coming from Ruby but what's the point if you're already invested in Erlang?"

Perversely, I actually like Erlang syntax too.

Re:Joy of Elixir by passer-by-123 on Tuesday August 01, 2017 @08:59AM (#14900161)
As many others said in the thread, forget about the relationship between Ruby and Elixir, and give Elixir a try. It is much more than syntax: structs, protocols, the test framework, documentation, tooling... even the new error messages and debugger make a big difference on every day development.

There are reasons for picking Erlang over Elixir but if the reason is that "Elixir does not offer anything beyond syntax", it is likely the person has not been paying much attention.

Re:Joy of Elixir by didibus on Tuesday August 01, 2017 @01:32PM (#14903201)
Yup, I actually hate the Elixir syntax. I've never been a fan of ruby syntax. Granted I find the elixir syntax a step up on ruby. Anyways, Elixir is nice because of its abstractions. While I understand most people come to it from ruby for its familiar syntax.
Re:Joy of Elixir by lojack on Monday July 31, 2017 @09:08PM (#14897178)
Definitely recommend reading "The Little Elixir & OTP Guidebook"

The focus of the book sounds like pretty much what you're asking for. The first few chapters cover Elixir basics, but its really just a primer -- easily skippable if you already know it. Starts with implementing OTP features from scratch so you can see what they do and why they exist, then dives into how to do it using OTP.

Re:Joy of Elixir by tarr11 on Monday July 31, 2017 @06:46PM (#14896539)
Found this post from June about Basho.

https://news.ycombinator.com/item?id=14621359

Re:Joy of Elixir by lostcolony on Monday July 31, 2017 @07:13PM (#14896672)
Re:Joy of Elixir by rdtsc on Tuesday August 01, 2017 @12:07AM (#14897813)
> I'd like to design reliable systems that operate outside of the classic HTTP -> Elixir -> Database pattern.

Then use Erlang. I like and prefer Erlang to Elixir for example. It has a simpler syntax, it's consistent just like Elixir. And you'd be surprised that Erlang for being what 30 years old is being regularly updated and improved Most importantly things are deprecated regularly from the the language and the standard library, as new stuff is added. That's how it managed to still say small and simple. Plus you'll get a lot of resources and reference already created for it.

If you like Elixir, start with it as so many concepts overlap and then you'd pick the Erlang syntax and some conventions later without that much hassle.