RubyLLM: A delightful Ruby way to work with AI
51–60 of 182 posts
Re: RubyLLM: A delightful Ruby way to work with AI
#52Why is it using a global variable for this?
module RubyLLM
class Error
https://github.com/crmne/ruby_llm/blob/9825f4fea089b1b974961...If you're wondering about module RubyLLM. That's just how Ruby is often written.
Addendum: Ruby does not require you to put the opening and closing parenthesis on a function to run that function, and it's not always put there when you have zero or 1 parameter (I find it to be cleaner when you have a parameter, but have no opinion when there isn't a parameter)
In the example code from the link itself, you'll see:
chat.ask "What's the best way to learn Ruby?"
which is the same as chat.ask("What's the best way to learn Ruby?")Re: RubyLLM: A delightful Ruby way to work with AI
#53Earlier quoted context omitted.
Certainly a taste for global state, it seems.
Dogmatically rejecting global state even if it simplifies things in some particular case _is_ poor taste. Even a goto can be elegant sometimes.
Re: RubyLLM: A delightful Ruby way to work with AI
#54Saw this gem of a gem on reddit earlier today and there were some trollish comments about no one using ruby anymore blah blah blah which quietly bummed me out. Surprised and Delighted to see it as #1 here on HN tonight!
It's worth remembering that the trolls that complain about Ruby do so because they care about it. You'll often see the same names coming back on every post to angrily insist that no one is interested in Ruby ...apart from them obviously because if they didn't they would be busy trolling something else. :P
I don't think so. I mean there are complains about stuff you care about like people complaining about Healthcare. (edit: there are other forms of caring, see my grandchild comment)
Dissing on Ruby is definitely not this, they are not Ruby users wanting Ruby to be better. They don't even know Ruby apart from dissing on it is socially accepted, and makes them feel good.
Re: RubyLLM: A delightful Ruby way to work with AI
#55Earlier quoted context omitted.
Dogmatically rejecting global state even if it simplifies things in some particular case _is_ poor taste. Even a goto can be elegant sometimes.
Usually though it just creates long term issues, putting off important work to later.
Re: RubyLLM: A delightful Ruby way to work with AI
#56Re: RubyLLM: A delightful Ruby way to work with AI
#57Why is it using a global variable for this?
It's not. The method, RubyLLM.chat creates a new instance of the Chat object, as has been copied here: module RubyLLM class Error https://github.com/crmne/ruby_llm/blob/9825f4fea089b1b974961... If you're wondering about module RubyLLM. That's just how Ruby is often written. Addendum: Ruby does not require you to put the opening and closing parenthesis on a function to run that function, and it's not always put there…
mind = blown
I always liked how functionName denotes the function and functionName() calls the function, and then it denotes the result e.g. in JavaScript or in math. But just saying functionName to call a function makes the code read more like English. Code that reads like English > code that reads like math. (And you can still talk about functions of course.)
Re: RubyLLM: A delightful Ruby way to work with AI
#58Earlier quoted context omitted.
It's worth remembering that the trolls that complain about Ruby do so because they care about it. You'll often see the same names coming back on every post to angrily insist that no one is interested in Ruby ...apart from them obviously because if they didn't they would be busy trolling something else. :P
> It's worth remembering that the trolls that complain about Ruby do so because they care about it. I don't think so. I mean there are complains about stuff you care about like people complaining about Healthcare. ( edit : there are other forms of caring, see my grandchild comment) Dissing on Ruby is definitely not this, they are not Ruby users wanting Ruby to be better. They don't even know Ruby apart from dissing o…
Surely a one-off comment about nobody using Ruby doesn’t mean you “care”, but if it is true that it is the same people who keep commenting, they obviously care.
Is it because they are jealous of the beauty of Ruby/Rails, as a Rubyist I’d think so, but who is to say really. Maybe they worked at a company where they replaced whatever their favourite stack is with Rails and they have hated Ruby ever since. It could be anything.
You wouldn’t keep responding to stuff you don’t care about at some level.
Re: RubyLLM: A delightful Ruby way to work with AI
#59Saw this gem of a gem on reddit earlier today and there were some trollish comments about no one using ruby anymore blah blah blah which quietly bummed me out. Surprised and Delighted to see it as #1 here on HN tonight!
Re: RubyLLM: A delightful Ruby way to work with AI
#60Earlier quoted context omitted.
> It's worth remembering that the trolls that complain about Ruby do so because they care about it. I don't think so. I mean there are complains about stuff you care about like people complaining about Healthcare. ( edit : there are other forms of caring, see my grandchild comment) Dissing on Ruby is definitely not this, they are not Ruby users wanting Ruby to be better. They don't even know Ruby apart from dissing o…
Usually people get huffed up about stuff they care about. Caring doesn’t mean wanting it to be better, it could also mean get worked up about. Surely a one-off comment about nobody using Ruby doesn’t mean you “care”, but if it is true that it is the same people who keep commenting, they obviously care. Is it because they are jealous of the beauty of Ruby/Rails, as a Rubyist I’d think so, but who is to say really. May…
All in all, I don't think that other forms of caring apply either. I think that parroting "Ruby is dead" doesn't mean that they care about Ruby, it's just a thing people like to parrot, without the meaning realizing in their heads. A form of bonding, a form of distraction, a form of opening to a social interaction, a form of self-reassurance etc. It is lot of things, and caring about Ruby at all is usually not among those (IMO).