View Full Version : Ruby Golf
Alorn15
03-15-2011, 05:59 PM
Ruby Golf: A Competition.
The goal is to write a ruby script that outputs the following:
http://codegolf.com/competition/output/99-bottles-of-beer
...in as few characters as possible. Newlines count as characters. Basically do a wc -m on the file.
The rules are that you can use anything that comes with standard ruby 1.8.x or 1.9.x. Obviously wgets/curls/http-requests are out. Reading a file is out. Don't share your code right away, so that others have to arrive at solutions on their own.
The tricky part is getting all the inflections right.
I'm at 249, but others have far lower scores. Beat me!
LMingrone
03-15-2011, 07:33 PM
I bet you Googled it.
This is what I love about coding. Most of the time you can just take other people's code and copy it with different comments. No way for them to prove you stole it. This is how I got through C, Java, Databases, and OSs. Copy code, change comments and mangle math. BAM!
Alorn15
03-15-2011, 07:42 PM
246.
Alorn15
03-15-2011, 08:51 PM
LMingrone: How about you walk the walk then? I am unconvinced that you will find a competitive answer through google.
LMingrone
03-15-2011, 08:53 PM
176
Your rules are not to post code though
edit: 173
Alorn15
03-15-2011, 08:57 PM
Actually, now that I look, finding that is trivial. BUT you're missing the point.
LMingrone
03-15-2011, 08:57 PM
So you are missing my point then?
Edit: And I wasn't trying to break your balls. 246 is good...if you wrote it from scratch on your own.
Alorn15
03-15-2011, 09:00 PM
What point?
LMingrone
03-15-2011, 09:02 PM
Did you write EVERY part of your code on your own? Or did you take snippets from other people's?
PM me yours, and I won't share it.
Alorn15
03-15-2011, 09:04 PM
I think the contest needs to be modified to be specific to lich. I forgot my audience - people that game anything they can.
Edit: I'll post my solution when I get home and am not on a phone.
LMingrone
03-15-2011, 09:08 PM
You are getting my point. I wasn't trying to be a jerk. I love people that come up with new ways to do things. In most cases though, people just expand on things that already exist and optimize them. That's a good thing.
Alorn15
03-15-2011, 09:13 PM
Do we have to hug it out?
You guys sound so fucking cool. I want to take up coding.
LMingrone
03-15-2011, 09:14 PM
Roshambo for it?
Alorn15
03-15-2011, 09:17 PM
There's no code on Alderaan dude.
LMingrone
03-15-2011, 09:21 PM
On a side note. My first professor wrote the first animation software. My second was part of the project to build the internet as we know it today. Those tsunami sensors that were being monitored? My uncle designed those. He also built the first talking "computer". I hate coding and math. My douche father forced me into CS.
There's no code on Alderaan dude.
:(
Alorn15
03-15-2011, 10:04 PM
http://pastebin.com/1QbFhgzz
Tillmen
03-15-2011, 11:02 PM
237 no Gooogles.
Tillmen
03-15-2011, 11:07 PM
Eh.. I wasn't done but here's mine.
http://pastebin.com/5h78uRme
As you can see, I'm using a crapload of characters to remove the S's. You ruined all the fun by posting your answer!
Tillmen
03-15-2011, 11:25 PM
Down to 226... http://pastebin.com/0C88nswd
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.