5 ms·
I'm a self-taught junior developer who started with Ruby in 2016. I've very much enjoyed the experience so far, and am currently rather invested in Rails, thoug
by rlue 8y ago
I'm a self-taught junior developer who started with Ruby in 2016. I've very much enjoyed the experience so far, and am currently rather invested in Rails, though I'm preparing to branch out into other areas of web development (I'm looking at you, React).
This thread is really opening my eyes to the sheer vitriol that gets directed at Ruby outside of its own echo chamber.
I get that it has performance issues (to be addressed in Ruby 3) and interest in Rails is now less than half what it was at its peak.[0] Everyone has very strong opinions, and when people start soapboxing like they are in this thread, nobody learns anything.
At this point, honestly, I just think the rest of the community could use a little bit of Ruby's characteristic niceness.[1]
[0]: https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0505cl https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...
[1]: https://en.wiktionary.org/wiki/MINASWAN https://en.wiktionary.org/wiki/MINASWAN
- toasterlovin 8y agoThe people who complain about Ruby performance are really missing the the forest for the trees, IMO. Most people are using Ruby for web development. Web development has hundreds of milliseconds of latency that there is absolutely no way to get rid of (in the form of transit to the server and back to the client). Then you're doing a bunch of I/O. The actual amount of time spent executing Ruby is just not significant in all of that. Ruby could be 2x faster than it is now and it would probably make a sub-10% difference in response time for most of the endpoints in most of the Ruby/Rails apps I've encountered.
- lucidone 8y agoExecution speed of your server code is critically important in today's atmosphere. It's a lot easier to scale an application than the database behind it (e.g, spin up a few more VMS/containers vs. partitioning your db - one is a 2 minute task, the other a bohemian effort). That being said, I enjoy Ruby a lot, and mostly enjoy working on Rails codebases (depends on how the front end is built, as Rails particularly _doesn't_ prescribe any form of convention here). I wish they worked on improving the front end story like Laravel has.
- jmknoll 8y agoUnrelated to your main point, but what is a bohemian effort?
- scns 8y agos/bohemian/herculean ?
- toasterlovin 8y agoIf it's easy to scale your application servers horizontally, then language execution speed isn't very critical. Speed is critical for the things which are hard to scale (like your data store). And everyone is coming at this conversation like caching isn't a thing that you do on any high-traffic site (and lots of low-traffic ones too).
- Rapzid 8y agoI'm getting 74ms of total latency loading this page; much less than hundreds. You are correct that there are latencies involved that don't involve executing code, however my experience with Ruby, Python, and PHP is that they contribute a significant portion of the total latency in the most basic CRUD LAM(P|R|Py) stacks. Once you start getting into much heavier applications such as CMS's or eCommerce app code execution can easily dominate request latency by more than an order of magnitude.
- toasterlovin 8y agoI'm almost certain that you're hitting a cache when you load this site (I'm getting a 40ms ping to news.ycombinator.com, which would leave about 30ms to render a page here, and these pages are complex enough that the DB query would be more than 30ms). Caching is a thing you can do with Rails, you know... Look, I spend a fair amount of time looking at the performance monitoring tools for the Rails apps I deal with. Ruby execution time just isn't that big of a deal most of the time. And when you have a monster of a page and it is an issue, you use caching, like you do with every other language/framework.
- pjmlp 8y agoUsing Tcl for the same purpose in the first .com wave taught me to never use again in production a language without JIT or AOT on their canonical toolchains. You really note the difference with that load falls down and then there are this weekend all nighters converting script code into C.
- jashmatthews 8y agoJRuby can leverage HotSpot via invokedynamic and has been able to partially leverage HotSpot for about 10 years. It's in production use at places like SoundCloud and TalkDesk. Ivo Anjo (now working for Amazon) has talked about their use of JRuby at TalkDesk: https://ivoanjo.me/blog/2017/01/29/benchmarking-jruby-invokedynamic/ https://ivoanjo.me/blog/2017/01/29/benchmarking-jruby-invoke...
- pjmlp 8y agoI have followed most of the JRuby talks at JVM Language Summit and the efforts lead by Charles Nutter. However I did mentioned "on their canonical toolchains" on purpose, as not many in the Ruby community would welcome Java on their computers and rather fork a C compiler as pseudo-JIT.
- jashmatthews 8y agoJRuby is canonical and both teams contribute to ruby/spec. JRuby does not alter the language unlike Rubinius. MJIT uses C to mimize the maintenance burden on the core team. Using LLVM would mean either pinning to an LLVM version as Rust does or supporting what would probably be 6 different versions of IR to support as far back as say, Ubuntu 14.04.
- pjmlp 8y agoFaire enough regarding JRuby. As for MJIT, it is not like LLVM would be the only way to implement a JIT compiler, plus the impact of forking a C compiler and linker is quite considerable versus an in-process JIT.
- ksec 8y ago50ms response time, as compare to 50ms Round trip. I don't see that as a Sub 10% difference. And that is assuming most of the Rails Apps does 50ms response time. Yes, there may be 30ms spent in DB, in parts because of the ORM, but the whole languages and framework still needs a lot more speed to become that "10%" difference.
- tarsinge 8y agoWith the typical website loading megabytes of JS to serve a SPA, which itself make additional requests, plus tens to hundreds requests for ads and third party tracking, how is the performance of Ruby relevant? Again I’m not talking about advanced and scaled up use cases, just typical websites and web apps. What’s the point of a low latency if it’s to serve loaders?
- thunderbong 8y agoIn my experience Roda/Sequel beats almost any other combination of application language / DB (ORM) Speed stats - https://www.techempower.com/benchmarks/#section=data-r14&hw=ph&test=db&l=7p6ku3 https://www.techempower.com/benchmarks/#section=data-r14&hw=...
- benbristow 8y agoIf you're looking into React, have a look at this. https://github.com/reactjs/react-rails https://github.com/reactjs/react-rails Sets up Webpack and directly integrates into your templates with ERB tags like <%= react_component("HelloWorld", { greeting: "Hello from react-rails." }) %> (First argument is name of component, second argument is a hash of props) Easy as pie!