3 ms·
checkout elixir/phoenix. Its almost as productive as rails while having performance within the same realm as go. pros: imutable data types. ruby like syntax. s
by cultofmetatron 4y ago
checkout elixir/phoenix. Its almost as productive as rails while having performance within the same realm as go.
pros: imutable data types. ruby like syntax. similar codebase organization. super fast. more modular than rails. the websocket system is way faster to develop in and deploy.
cons: no runtime metaprogramming but you do have a sophisticated macro system. not as many drop in libraries. not as many jobs for it yet.
- your_username 4y ago
- zumu 4y agoUnfortunately Elixir just doesn't have the network effects of Ruby. Ruby support (libraries, SDKs, first class integrations) and popularity (ability to hire effective devs) is just an order of magnitude or more higher than Elixir. I say this as a massive Elixir and functional programming fanboy.
- cultofmetatron 4y agonetwork effects take time to develop. unfortunately it doesn't have a major company or foundation pushing it forward aggressively. That said, I'm hopeful. its defiantly the BEST platform for building anything websocket based. the killer apps for picking elixir will be anything requiring soft realtime. case in point, I built my startup in elixir. completely agree on the difficulty in hiring but its not hard to teach. It was harder for me to find people who knew sql well. Unlike active record, ecto embraces sql so you have to know sql to use it. anyways, its time will come. more and more companies are adopting it from discord to supabase to <cringe> trump media group.</cringe>
- freedomben 4y agoYeah I've found that many people have ruby/rails experience, and they can usually pick up elixir pretty well since so much will be familiar.
- cutler 4y agoI've heard this time and time again but I just don't buy it. The only similarity between Ruby and Elixir is syntax and even there I'd say it's a superficial likeness. Beyond that Elixir and Ruby are almost diametrically opposite. Elixir is functional/immutable whereas Ruby is mutable/OOP. Languages such as Elixir and Clojure were designed to counter the OOP trend and its mindless disregard for mutation. So, anyone who is really into The Ruby Way is going to have to disrobe before entering the temple of Elixir.
- freedomben 4y agoYes the syntax, but also many of the libraries and conventions are the same. The package management/build tool has a lot of similarity as well. When learning a new language, learning the standard library and the many conventions is a lot of the friction. With Ruby -> Elixir that is a lot less. Also, I think you underestimate how many people (such as myself) who use Ruby in a very functional way already. Immutability is really not all that different. The only thing is you can't use ! methods and instead have to assign. For example instead of `array.sort!()` it's `array = array.sort()`. It's really not that hard, and in fact I found it easier because I didn't have to remember if `array.concat()` mutated or not. IMHO the only "hard" things for a rubyist to learn are pattern matching and Actor model (OTP) concepts. Actor model concurrency is definitely different. But for an experienced programmer, that can be learned in a couple of hours (or less).
- likortera 4y agoCons: missing community, a lot less well maintained libraries, needs more wheel reinvention, impossible to hire experienced developers, far worse tooling and editor support.
- rhizome31 4y agoThis is what people were saying about Python 20 years ago.
- likortera 4y ago/remind 20 years check Elixir again.
- paganel 4y agoThe community was there, at least that was my feeling when I started learning Python around 2003. What wasn't there was of course almost anything web-related, for my first "website" in Python I had to resort to using mod_python, which was a perfectly fine project in itself but which wasn't giving you the same instant gratification as PHP did when it came to the web. (there was also the Zope ecosystem, but that's a subject in itself).
- cutler 4y agoElixir performance similar to Go? That's stretching it a bit. Elixir is fast within its own niche - network I/O - but it's a dynamic language so can't compete with Go on, say, heavy calculations or other CPU-intensive tasks. Elixir doesn't even have a vector data structure, relying instead on Erlang's very clunky offering.
- cultofmetatron 4y agoyes I agree its not as great at cpu intensive stuff. but most people are using go in networked applications where network I/O IS the bottleneck that said, elixir has excellent interrop with rust via rustler for when you need those heavy caclulations. and I trust a rust implementation long before I'll trust one in go. and as far as lacking a vector data structure, sure but there's been a lot of work into Nx. who cares about a vector data structure when you have a full power numerical processing library complete with tensors! and unlike python, you can combine it with genstage and broadway to do all kinds of crazy shit.