News for hackers. Stuff that matters.
Re:RubyLLM: A delightful Ruby way to work with AI by choxi on Friday March 14, 2025 @11:08PM (#43369607)
Matz said he designed Ruby to optimize for developer happiness, it’s just a core principle of the language since it was created
Re:RubyLLM: A delightful Ruby way to work with AI by kuboble on Saturday March 15, 2025 @03:48AM (#43370812)
Happiness of a developer writing code can be a misery of a one having to read / debug it. I worked in ruby for a couple years around 2009 and having to deal with a code that implemented most of its logic via method missing is still one of the strongest negative memories I have about coding.
Re:RubyLLM: A delightful Ruby way to work with AI by viraptor on Saturday March 15, 2025 @05:07AM (#43371180)
Another annoying one from that category is Ruby's forwarded methods. Since they're created via generated, injected code, you can't query which method it forwards to at runtime. Or not easily anyway.
Re:RubyLLM: A delightful Ruby way to work with AI by MatthiasPortzel on Saturday March 15, 2025 @07:50AM (#43371917)
`binding.irb` and `show_source` have been magical in my Ruby debugging experience. `binding.irb` to trigger a breakpoint, and `show_source` will find the source code for a method name, even in generated code somehow.
Re:RubyLLM: A delightful Ruby way to work with AI by richjdsmith on Saturday March 15, 2025 @02:12PM (#43374208)
… I’ve been using Ruby for years and never thought to use show_source like this in a debugger. Thanks kind stranger, you just made my day!
Re:RubyLLM: A delightful Ruby way to work with AI by RangerScience on Saturday March 15, 2025 @03:58PM (#43374819)
Yep yep, that's the whole "sharp knives" thing.

What I advise (and aim for) is only pulling out the sharp knives for "library" code, but application code should stay "simple" (and this much more easily navigable). Otherwise you can absolutely make a bloody mess!