10 ms·
I'm currently building a video course hosting platform with Elixir / Phoenix and all I can really say is this has been the nicest tech stack I've ever used in 2
by nickjj 7y ago
I'm currently building a video course hosting platform with Elixir / Phoenix and all I can really say is this has been the nicest tech stack I've ever used in 20 years of web development.
IMO it really does feel like you get the best of everything (developer productivity, developer happiness, great language for creating maintainable code, OTP and the BEAM bring a lot to the table, it's memory efficient, tracing code without a ton of experience is very doable, it's fast as balls and Phoenix channels / LiveView is a great abstraction on websockets). I find myself fist pumping all over the place as I make progress towards this app while learning as I go.
I don't think I've liked a technology this much ever and I'm honestly surprised it's not already more popular than it already is. I've been around for the release of a lot of major frameworks and technologies (Rails / Django, Node, Go, etc.). Nothing has impressed me this much. It truly feels like it's a zero compromise environment to write code in and I hope I can still be using it in 10+ years.
- enraged_camel 7y ago> I don't think I've liked a technology this much ever and I'm honestly surprised it's not already more popular than it already is. To be honest, this can probably be almost 100% attributed to the fact that it is not backed and heavily promoted by a tech giant.
- PopeDotNinja 7y agoI love Elixir, but the learning curve was steep. Async everything, dialyzer, macros, Erlang errors, charlist vs string vs iolist... It was a lot to take in. Edit: 4 upvotes in 4 minutes. I guess people are reading this... for anyone who hasn't already discovered it, the saving grace for me was the Elixir Slack channel. I also learned while working with someone who really knows Erlang, which helped quite a bit, too. If anyone learning Elixir gets to the point where they want to scream, feel free to email me. If I can help, I will! Email in profile.
- cutler 7y ago.... and no vectors/arrays.
- PopeDotNinja 7y agoYou're mostly right! http://erlang.org/doc/man/array.html http://erlang.org/doc/man/array.html
- enraged_camel 7y agoThere is List, which is similar (but not quite the same). Other than that, you may want to give this a read: https://elixirforum.com/t/arrays/8850/13 https://elixirforum.com/t/arrays/8850/13 tl;dr: the type of data structure that would satisfy your use case almost certainly exists in Elixir, but you need to look around a bit.
- derefr 7y agoYou've got: • http://erlang.org/doc/man/atomics.html http://erlang.org/doc/man/atomics.html and http://erlang.org/doc/man/counters.html http://erlang.org/doc/man/counters.html for cheap, mutable uint64 arrays; • The http://erlang.org/doc/man/array.html http://erlang.org/doc/man/array.html module for a functional persistent vector abstraction (similar to the one in Clojure); • ETS ordered_set tables, for mutable AVL trees (for when you want to cheaply apply a sequence of random mutations to a collection of terms without building a lot of garbage); • The process dictionary (https://www.erlang.org/course/advanced#dict https://www.erlang.org/course/advanced#dict), a mutable per-process hash-map data-structure, for when ETS ordered_set tables have too much inter-process copying overhead. All that, plus Erlang lists (singly-linked lists) are really cheap the way Erlang does them. (Each Erlang actor-process gets its own heap that gets independently GCed; short-lived processes never experience even a single GC, so allocating linked-list nodes (by consing to the beginning of a list) is just a matter of incrementing the actor-process's heap's free pointer—about the same level of optimality you'd hope to get from pushing to the end of a vector.)
- elcritch 7y agoThanks! Didn't know about some of those.
- hellofunk 7y agoI love hearing stories like yours. I wonder how Elixir would compare to Clojure, which I've used and liked for web development for many years. I hear nothing but good things about Elixir but I wonder if it would bring something new to the table for me in the "really liking it" category.
- erokar 7y agoI think you will find Elixir itself very similar to Clojure. They are both functional, dynamic languages with immutable data structures. They both use protocols/behaviors to achieve polymorphism in similar ways (e.g. functions working with collections (Clojure) and enumerations (Elixir)). While there is a superficial syntactical difference I think the most important differentiation is the runtimes, the JVM versus the BEAM. JVM will outperform BEAM with regards to computations, while the BEAM has better support for true immutability and concurrency. With regards to web development specifically the Elixir community seems to more or less have converged around a framework approach with Phoenix, while Clojure (too me) seems more geared towards a collection of libraries approach, á la Node.js. I don't have much experience with Clojure's tooling story, but the tools that come come bundled with Elixir, like Mix (build tool) and ExUnit (testing framework), are very good. Compared to the languages I have experience with (Python, Ruby, JS, Java, C#) Elixir provides the best developer ergonomics out of the box.
- truth_seeker 7y agoRelatively, JVM and Clojure ecosystem is much more mature and performant. I would any day prefer Clojure and framework Pedestal. https://github.com/pedestal/pedestal https://github.com/pedestal/pedestal
- demio 7y agoMore mature? Both Erlang and BEAM predate Java and JVM. The Erlang ecosystem is super mature and performant.
- namelosw 7y agoIMO BEAM is a better VM than JVM despite the number of libraries. It provides a more robust, performant and observable platform for Web development. (Technically JVM is faster batch operations but for Web, most Elixir apps win) More importantly, it's a perfect fit for immutable functional languages. Everything is immutable and proper tail-recursion are provided. Clojure is great but it has several different ways to define state and type, and sometimes I found they're a little bit awkward. With BEAM process, there's no need for language to have constructs for state/reference/async handling, which could makes the language itself more simpler and more compact.
- golemiprague 7y agoI don't know, it is not that fast per cpu and memory, just keeping up with node and the JVM. It doesn't have all the libraries that JVM based libraries or node/python have and there is a steep learning curve involved, both of the language itself, the concepts, the relation to erlang and the OTP. I will a little more unless I need to write something for the specific cases where erlang and the OTP really shines, but most of us don't need that.
- oftenwrong 7y agoAre there no bad parts?
- yelnatz 7y agoI've used it sparingly, I think deploying is pretty bad with it. I like the convenience of deploying a golang app, just one executable.
- srpablo 7y agoOTP releases let you build something akin to this, where the runtime and all the dependencies are bundled in; so long as you built it for the right architecture (much like a binary), it's a single command to run your app. This used to be done with Distillery[1], but I suspect its use will go down now that Elixir has native OTP releases.[2]. In either case, there's still work behind it, but it's not like deploying Ruby, Python, or Node, where you have to be pretty careful about library paths and runtime versions. [1]: https://github.com/bitwalker/distillery [2]: https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-released/
- eeZah7Ux 7y ago> I like the convenience of deploying a golang app, just one executable. This is crazy. What about configuration, systemd unit file / initscript, documentation, manpage, shell completion. And the ability to tell what is installed, where, and at which version. HN forgot how to do software distribution to the hype of statically compiled languages.
- inferiorhuman 7y agoDeployments are a mess and as it is interpreted, performance is closer to Ruby than Go. I found the community to be pretty disappointing (but YMMV obviously) — it seemed more alternative oriented than the Rust community (which seems more solutions oriented).
- erokar 7y agoElixir is compiled, not interpreted.
- keithnoizu 7y agoIt's a great stack. I've been primarily using it for the last 5 years although for a largish .5 million unit IOT backend not web development.
- JediPig 7y agoyou know the best framework is? is the one that's in production and doing its work. Most developers including me, get bored of doing something in x,y,z framework, and we gladly go try something else for a while. I have a good friend, that jumped on the band wagon of elixir. he openly now admits, he wish he just used python. I hate band wagoners.. no language , no framework is the cure all.
- AlchemistCamp 7y ago> I don't think I've liked a technology this much ever and I'm honestly surprised it's not already more popular than it already is. I think a big part of it has been a lack of learning resources. A major part of why I started my site and YT channel was the frustration I had learning Elixir in 2016. Phoenix was even tougher. At that time, even the paid resources were mostly out of date. I found about 70% of everything I came across (books, videos, blog posts) wouldn't compile on Elixir version > 1.0! The changes in Phoenix 1.2 and 1.3 were a similar story. The one exception to this was Dave Thomas's Programming Elixir book. I bought version 1.2 and he religiously updated it (for free!) all the way through its current version. I never found anything in it that didn't work on the current version of the language. Well done, Dave!