News for hackers. Stuff that matters.
Re:Ruby in Twenty Minutes (2006) by intertextuality on Saturday February 09, 2019 @08:48PM (#19125922)
Ruby 3 is specifically going to address speed issues, among other features. However in a lot of cases that’s usually not where the bottleneck is.

Using rails-api as a backend with your choice of frontend is still a viable option. Perhaps it’s not one’s first choice these days but it’s far from obselete.

Re:Ruby in Twenty Minutes (2006) by freehunter on Saturday February 09, 2019 @09:03PM (#19125969)
Agreed. Rails API and whatever Javascript front-end you want is the best possible option out there. It's fast to develop, it's well documented since Rails has been around forever, Ruby on the backend is sooo much nicer than Javascript, and you still get access to the front end trickery you need from modern Javascript.

I have three languages I use. My web sites are done in Rails because it's fast and logical. One site has a Vue front end, only on a couple of pages where I need the JS fancy stuff. Most of my pure APIs are done in Flask because it's lighter weight. I use React Native for my native apps. I tried using Express.js for the APIs backing these apps but I could never get it all working right. I ended up rewriting it in Rails and now it's rock solid and fast as hell.

I'd also like to mention most web development out there is still right in line with even old school PHP and does not need React or Angular or anything fancier than Rails. YAGNI.

Re:Ruby in Twenty Minutes (2006) by h1d on Saturday February 09, 2019 @10:47PM (#19126264)
While I like ruby, your post is completely based on your experience. I have a Koa (express.js successor) with TypeScript and it's rock solid and since I don't like rails that much, I feel pretty loose there.
Re:Ruby in Twenty Minutes (2006) by mromnia on Sunday February 10, 2019 @05:33AM (#19127214)
Isn't this comparing apples to oranges? I haven't used koa, but it seems to be same level of abstraction as express - basically a thin layer over HTTP with routing. Rails or Django are several levels higher - they include auth, database interaction, CRUD etc. I'm not saying that either approach is better, just that the comparison seems strange.
Re:Ruby in Twenty Minutes (2006) by benbristow on Sunday February 10, 2019 @06:17AM (#19127341)
Rails doesn't include Auth.

Devise does a great job of it though - https://github.com/plataformatec/devise

Re:Ruby in Twenty Minutes (2006) by e12e on Monday February 11, 2019 @07:14PM (#19139824)
It does include "has_secure_password" and its friends (password/password_confirmation) though, which goes a ways towards including auth/authz even if one doesn't use devise, when coupled with before_action-s. It certainly comes with some facilities for getting off the ground:

https://api.rubyonrails.org/classes/ActiveModel/SecurePasswo...

Re:Ruby in Twenty Minutes (2006) by h1d on Sunday February 10, 2019 @05:41AM (#19127237)
I'm only saying what the OP and I'm stating is worthless because they're based on experience.
Re:Ruby in Twenty Minutes (2006) by spricket on Sunday February 10, 2019 @01:11AM (#19126580)
Agree 100% Koa from the original devs of Express is amazing. Rails is worthless for modern webapps, there's just much better options
Re:Ruby in Twenty Minutes (2006) by spricket on Sunday February 10, 2019 @01:00AM (#19126565)
This ain't a good defense for Ruby server-side. They're working on speed, okay. is that not where the bottleneck is? Perl 6 is coming too I guess

Because on production servers we have 10 Ruby front ends for a single Postgres database that barely sweats. At the same time, we have a lively Hibernate setup in crufty java using 4 front end servers and overloads our database regularly.

Ruby is slow as hell, to the point that it costs a lot more money to run servers vs ancient J2EE junk. V3 speed increases will be interesting if it's 10x+ . If not, Ruby is dead. Even Python and it's crazyness is far faster and somewhat easier to use.

Ruby is doomed

Re:Ruby in Twenty Minutes (2006) by intertextuality on Sunday February 10, 2019 @07:27AM (#19127526)
It all comes down to what you're doing. To put it another way: it depends. Obviously, writing logic in Go can boost performance, but one needs to assess that that's where the slowdown actually is first. One can also eke out a lot more speed from ruby/rails than you'd think! [0]

For a lot of people (and businesses), Ruby more than suffices. If it doesn't, other languages always exist. So no, Ruby is far from doomed–one just needs to evaluate the pros and cons of Ruby vs something like Go, etc. Ruby with Rails isn't hype or sexy technology, but it is quite mature and robust.

[0]: https://www.speedshop.co/