Live data from Hacker News

Why I switched from Ruby back to C++

chrismdp.github.com

41–50 of 100 posts

Re: Why I switched from Ruby back to C++

#41

This post should be titled, "Why I fucked up by choosing Ruby to write a game." - Or "What the fuck was I thinking" I love Ruby, I spend a lot of time writing it. I also write kids games for iOS. I would never consider Ruby(in it's current state) a good language to write a game in. Anyone who would has clearly; never written a game before; or never used Ruby for anything serious before. I agree with the other posters…

This post is mean, and has no place on Hacker News. It's fine to say there's no reason to ever use Ruby for a game, but it seems like the main purpose of your post is just to call into question the OP's intelligence and experience.

Re: Why I switched from Ruby back to C++

#42
A good takeaway from this is make your tests performance related. Since the op is using unitests already, a test that updated the game loop for a few minutes, rendering the target number of objects and failed if a frame dropped, would have saved a lot of wasted development.

Re: Why I switched from Ruby back to C++

#43
post #38

Earlier quoted context omitted.

While what you say may be 100% true you might be shocked by the number of Ruby and Python devs I talk to who tell me that Ruby can do anything that C++ does if you're even a half-decent Ruby or Python dev. I've literally asked people, "What about something like Gran Turismo 7?" And I've literally been in rooms where every dev there (none game devs, all web devs) basically said if they were writing it in Ruby it could…

For what it's worth, I help to organize a fairly active Ruby group, and I am certain that, if not zero, nearly zero of us would make this proclamation. In fact -- and I mean not to attack you, but just to illustrate how incredulous I am -- I tried to think of a reason there might be for you to fabricate or exaggerate that story. I don't really think you did, but my mind went there.

Didn't make it up. No reason to do so, although I suspect if I spent some time on HN I could find some posts about Ruby perf that don't jive with reality.

But I will say this, do you think this guy made up his post about using Ruby to try to write this game? If you don't think it fabricated, do you think he's alone?

I do think there is a fundamental problem, especially with respect to perf, that a lot of people have never looked at what code actually runs on their box. Never looked at the emitted or generated asm. Don't know the cost of calling a method, much less invoking some framework routine to do something. And then you couple this with a lot of devs think their the cats meow because they got x trans/sec and hear horror stories about the ceremony and inefficiency of C++.

And it doesn't help with the blogs and articles that constantly come out saying that Java or Ruby or Lisp is faster than C/C++ (the answer is never pleasingly straightfroward).

While I appreciate that none in your Ruby group would think this, I'd also ask why do they believe this? It's no more reassuring if they don't have a clear understanding of why C++ might be better for the job.

Lastly, I should add that the conversation was a heated discussion where I was playing devil's advocate that I thought they were going to switch off of Ruby like Twitter. I don't think they really appreciated it, although I wasn't actually being all that serious at the time.

Re: Why I switched from Ruby back to C++

#46
it's simple, ruby is about scale out, not scale up. and rails helps you to build websites faster. multi-player games would probably be very fast to write compared to c++, however, the code will certainly not be optimized as well as c++, it's an interpreted language for gadsakes!

Re: Why I switched from Ruby back to C++

#47
post #23

This sounds very "link bait-ish"… Why were you trying to write a game in Ruby to start with? You didn't "switch back to C++", you simply realized you were trying to use a wrench to tight a philips screw… -.-

I suppose it does: but it's the honest truth. I have two months of ruby code that's rusting now, and it was quite a difficult post to write.

Ruby was simply the wrong language for games. There's a reason a huge percentage of real-world games use Lua for scripting.

Floats for one aren't objects, and LuaJIT is probably 10x faster than Ruby.

Re: Why I switched from Ruby back to C++

#48

This post should be titled, "Why I fucked up by choosing Ruby to write a game." - Or "What the fuck was I thinking" I love Ruby, I spend a lot of time writing it. I also write kids games for iOS. I would never consider Ruby(in it's current state) a good language to write a game in. Anyone who would has clearly; never written a game before; or never used Ruby for anything serious before. I agree with the other posters…

This post is mean, and has no place on Hacker News. It's fine to say there's no reason to ever use Ruby for a game, but it seems like the main purpose of your post is just to call into question the OP's intelligence and experience.

I thought he was just calling into question the link-baity title.

The title is designed to be controversial as people don't like their favourite programming language to be slandered, thus they will be obliged to read the article so that they can defend their baby.

Using link bait as a title is contrary to HN guidelines, so if anything, it is the article that does not belong on HN, not the grandparent comment.

Re: Why I switched from Ruby back to C++

#49
The author seems to be more interested in obsessive technical improvements than shipping a game many people want to play. One slow frame out of sixty prompts a rewrite? Product doomed. Wait until someone complains to fix anything. Something tells me that frame should not be priority one, but it is. Why?

Re: Why I switched from Ruby back to C++

#50
post #23

This sounds very "link bait-ish"… Why were you trying to write a game in Ruby to start with? You didn't "switch back to C++", you simply realized you were trying to use a wrench to tight a philips screw… -.-

I suppose it does: but it's the honest truth. I have two months of ruby code that's rusting now, and it was quite a difficult post to write.

A more honest title would by "Why C++ is better than Ruby for game development".
Post reply on HN