Live data from Hacker News

Optimizing Ruby Path Methods

byroot.github.io

31–40 of 66 posts

Re: Optimizing Ruby Path Methods

#31
post #2

don't take this the wrong way, but -- people still use ruby?

I use Rails for many of my side projects. Because of the emphasis on convention over configuration, Rails codebases tend to be succinct with minimal boilerplate, which keeps context windows small. That in turn makes it great for agent-assisted work. For web stuff, with server-side rendering and partials it means minimal requirement to touch the hot mess that is JavaScript, and you can build PWAs that feel native pret…

Not really slow since YJIT, I think 3.1?

Re: Optimizing Ruby Path Methods

#32
post #31

Earlier quoted context omitted.

I use Rails for many of my side projects. Because of the emphasis on convention over configuration, Rails codebases tend to be succinct with minimal boilerplate, which keeps context windows small. That in turn makes it great for agent-assisted work. For web stuff, with server-side rendering and partials it means minimal requirement to touch the hot mess that is JavaScript, and you can build PWAs that feel native pret…

Not really slow since YJIT, I think 3.1?

Even with yjit it's still more than twice as slow as even Go, to say nothing of C# AOT, which depending on the benchmarks is like 4x as fast.

Re: Optimizing Ruby Path Methods

#33
post #31

Earlier quoted context omitted.

I use Rails for many of my side projects. Because of the emphasis on convention over configuration, Rails codebases tend to be succinct with minimal boilerplate, which keeps context windows small. That in turn makes it great for agent-assisted work. For web stuff, with server-side rendering and partials it means minimal requirement to touch the hot mess that is JavaScript, and you can build PWAs that feel native pret…

Not really slow since YJIT, I think 3.1?

YJIT is amazing but for me, JRuby and TruffleRuby were the real game changers.

For anything "slow" I can put it in Sidekiq and just run the worker code with TruffleRuby.

I have high hopes for ZJIT but I think TruffleRuby is the project that proves that Ruby the language doesn't have to be slow and the project is still getting better.

If ZJIT, JRuby or TruffleRuby can get within 5-10% of speed of Go without having to rewrite code I would be very happy. I don't think TruffleRuby is far off that now.

Re: Optimizing Ruby Path Methods

#34
Makes me miss Ruby. Been in node typescript recently. Everything is a callback returning a promise in some weird resolution chain, mapped and conditional types, having to define schemas for everything and getting yelled at by lsp all day... Oh then you gotta write react components and worry about rerenders and undefined behavior caused by impurity in state, npm, arcane .json configs

Versus active record, mvc, yaml configs, bundler, beautiful syntax, robust and trivially extendable stdlib, amazing native debugging and cli docs out of the box, everything out of the box if you're using Rails

I do not understand why it becomes increasingly irrelevant, especially in web development. I kinda get scripting--bash and python tend to run everywhere

Re: Optimizing Ruby Path Methods

#35
post #33
post #31

Earlier quoted context omitted.

Not really slow since YJIT, I think 3.1?

YJIT is amazing but for me, JRuby and TruffleRuby were the real game changers. For anything "slow" I can put it in Sidekiq and just run the worker code with TruffleRuby. I have high hopes for ZJIT but I think TruffleRuby is the project that proves that Ruby the language doesn't have to be slow and the project is still getting better. If ZJIT, JRuby or TruffleRuby can get within 5-10% of speed of Go without having to…

Ah yeah I'm only vaguely familiar with Go. Didn't realize the speed differential was this drastic.

Re: Optimizing Ruby Path Methods

#36
What happened to Ruby? It was very successful at some point.

Maybe kids started using JS exclusively. But what happened to older developers? Did they move over?

Rails seemed to enable very fast prototyping and iteration. Isn't it still the case?

I see PHP usage going down, but PHP doesn't seem to have any advantages over JS, .NET, Python or Go. While Ruby coupled with Rails promised easy and rapid development.

Of course, Ruby might not be best suited for large code bases or microservices but probably 90% of the Internet are small to medium web sites.

Re: Optimizing Ruby Path Methods

#37
post #34

Makes me miss Ruby. Been in node typescript recently. Everything is a callback returning a promise in some weird resolution chain, mapped and conditional types, having to define schemas for everything and getting yelled at by lsp all day... Oh then you gotta write react components and worry about rerenders and undefined behavior caused by impurity in state, npm, arcane .json configs Versus active record, mvc, yaml co…

Lack of static types is one of the main reasons. Trying to decipher a complex ruby on rails codebase is unnecessarily difficult compared typescript. The tooling is also shit unless you use Ruby Mine.

An absolute shame given how good the functionality is baked into RoR.

Re: Optimizing Ruby Path Methods

#38
post #34

Makes me miss Ruby. Been in node typescript recently. Everything is a callback returning a promise in some weird resolution chain, mapped and conditional types, having to define schemas for everything and getting yelled at by lsp all day... Oh then you gotta write react components and worry about rerenders and undefined behavior caused by impurity in state, npm, arcane .json configs Versus active record, mvc, yaml co…

> getting yelled at by lsp all day

God forbid you get forced to fix bugs before they reach production.

Re: Optimizing Ruby Path Methods

#39
post #34

Makes me miss Ruby. Been in node typescript recently. Everything is a callback returning a promise in some weird resolution chain, mapped and conditional types, having to define schemas for everything and getting yelled at by lsp all day... Oh then you gotta write react components and worry about rerenders and undefined behavior caused by impurity in state, npm, arcane .json configs Versus active record, mvc, yaml co…

> getting yelled at by lsp all day God forbid you get forced to fix bugs before they reach production.

This might shock you but vast majority of bugs are logical.

Re: Optimizing Ruby Path Methods

#40

What happened to Ruby? It was very successful at some point. Maybe kids started using JS exclusively. But what happened to older developers? Did they move over? Rails seemed to enable very fast prototyping and iteration. Isn't it still the case? I see PHP usage going down, but PHP doesn't seem to have any advantages over JS, .NET, Python or Go. While Ruby coupled with Rails promised easy and rapid development. Of cou…

> Ruby might not be best suited for large code bases

Ruby/Rails powers some of the largest platforms on the planet - Shopify, GitHub, GitLab. Both have had something of a resurgence lately, too, with Ruby 4 and Rails 8 shipping recently, and people rediscovering that Rails is excellent for vibe coding.

I've been a Ruby developer for 10+ years and have never struggled to find work, and the communities feel very active and growing - so I'm honestly not sure what you mean by "what happened to Ruby". If you don't actively follow or participate in the community, I can imagine you wouldn't hear much about it day to day.

I don't pay attention to the JS world these days - what happened to JavaScript?

Post reply on HN