News for hackers. Stuff that matters.
Re:Why We’re Sticking with Ruby on Rails at Gitlab by cultofmetatron on Monday June 13, 2022 @02:09PM (#31729164)
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.

Re:Why We’re Sticking with Ruby on Rails at Gitlab by zumu on Monday June 13, 2022 @03:47PM (#31730780)
Unfortunately 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.

Re:Why We’re Sticking with Ruby on Rails at Gitlab by cultofmetatron on Monday June 13, 2022 @05:35PM (#31732079)
network 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>

Re:Why We’re Sticking with Ruby on Rails at Gitlab by freedomben on Monday June 13, 2022 @07:03PM (#31732838)
Yeah 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.
Re:Why We’re Sticking with Ruby on Rails at Gitlab by cutler on Monday June 13, 2022 @10:10PM (#31734040)
I'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.
Re:Why We’re Sticking with Ruby on Rails at Gitlab by freedomben on Monday June 13, 2022 @11:00PM (#31734275)
Yes 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).

Re:Why We’re Sticking with Ruby on Rails at Gitlab by likortera on Monday June 13, 2022 @03:53PM (#31730877)
Cons: missing community, a lot less well maintained libraries, needs more wheel reinvention, impossible to hire experienced developers, far worse tooling and editor support.
Re:Why We’re Sticking with Ruby on Rails at Gitlab by rhizome31 on Monday June 13, 2022 @04:10PM (#31731111)
This is what people were saying about Python 20 years ago.
Re:Why We’re Sticking with Ruby on Rails at Gitlab by paganel on Monday June 13, 2022 @04:32PM (#31731403)
The 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).
Re:Why We’re Sticking with Ruby on Rails at Gitlab by likortera on Wednesday June 15, 2022 @12:05PM (#31755090)
/remind 20 years check Elixir again.
Re:Why We’re Sticking with Ruby on Rails at Gitlab by cutler on Monday June 13, 2022 @10:03PM (#31734004)
Elixir 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.
Re:Why We’re Sticking with Ruby on Rails at Gitlab by cultofmetatron on Tuesday June 14, 2022 @12:42PM (#31742065)
yes 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.