Live data from Hacker News

RubyLLM: A delightful Ruby way to work with AI

github.com

181–182 of 182 posts

Re: RubyLLM: A delightful Ruby way to work with AI

#181
post #173

Earlier quoted context omitted.

Yes, it does. Ruby has a global interpreter lock (GIL) that prevents multiple threads to be executed by the interpreter at the same time, so Puma does have threads, they just can’t run Ruby code at the same time. They can hide IO though.

The GIL is released during common IO operations like the HTTP requests that power LLM communication

The Rails documentation has lots of info about this: https://guides.rubyonrails.org/tuning_performance_for_deploy...

Concurrency support is missing from the language syntax and this particular library as a concept. This is by design, to not distract from beautiful code. Your request will make zero progress and take up memory while waiting for the LLM answer. Other threads might make progress on other requests, but in real world deployments this will be a handful (It’s amazing how the Ruby community argues against their own docs and doesn’t acknowledge the design choices their language creators have made.

Re: RubyLLM: A delightful Ruby way to work with AI

#182

Earlier quoted context omitted.

> More lines of code typically makes maintenance more difficult. That’s kind of just the surface level of maintenance though. Go is not so much focused on making it easy to read a single file, but on minimizing the chains of abstraction and indirection you need to follow to understand exactly how things work. It’s much more likely that all the logic and config to do something is right there in that file, or else just…

> or else just one or two “Go to definition” clicks away This is the biggest part of it: maintainers need static analysis and/or (preferably and) very good grepability to help them navigate foreign code. Ruby by its nature makes static analysis essentially impossible to do consistently, whereas Go leans to the opposite extreme.

I've found for years that ctrl-b works pretty damn well in Rubymine as well as Goland. Huge advantage vs other editors 5+ years ago. I wonder if the difference is still as stark in the age of lsps?
Post reply on HN