Golfscript, score of 0 (only 179 174 (!) characters! no alphanumeric!)
[".,....."".,........."".,........."",.........""........,"".,.........."".,........""..,"".......,"".,.........""....,......""........,."",........."]{.,'""""'`,*\','?+}%''+
Will add explanation when I have time.
Some quick mini explanations for now:
'""""'`,
- a fancy way of saying "10" (I will substitute it for 10
in the explanations for clarity)
.,10*\
- takes the length of the string times ten, then pushes the original string back on the stack
','?+
- adds the index of the character ,
to the len*10
Therefore, for example, for ".,....."
, it becomes 7 * 10 + 1
, which is 71, the character code of the letter G
.
Old version:
Golfscript, score of 0 (only 1335 characters! no alphanumeric!)
[".......................................................................""...............................................................................................................""...............................................................................................................""....................................................................................................""..................................................................................................""........................................................................................................................."".....................................................................................................""................................"".......................................................................................""...............................................................................................................""..................................................................................................................""............................................................................................................""....................................................................................................""................................."]{,}%''+
Explanation:
The big thing of .
is an array containing the character codes of each letter. For example, the charcode of G is 71, so there's 71 periods in the first string.
At the very end is where the magic happens: {,}%''+
.
{,}%
converts each string of periods into a number.
''+
converts this array of charcodes into a string.
I think it's off-topic because it doesn't have an objective primary winning criterion (some languages do not use alphanumeric chars at all, like WhiteSpace). For that reason, I would suggest banning any language which does not use any alphanumeric character at all, not just brainfuck. – Erik the Outgolfer – 2016-10-05T14:26:00.933
1I suggest you disallow comments or unnecessary characters, or else people will post
print"Goodbye World"; #....................................
or something. (although that would disqualify my cheaty Ruby answer :P) – Doorknob – 2013-12-08T14:09:27.5904I think this would be more interesting (and golfy) without rule 3. (Make all non-alnums score nothing.) – FireFly – 2013-12-08T14:45:00.057
-1 because of rule 3 – John Dvorak – 2013-12-08T14:45:41.800
I agree with removing Rule 3 - that would disqualify my cheaty Ruby answer :P – Doorknob – 2013-12-08T14:59:23.770
"Unnecessary" non-alphanumeric characters are a problem. e.g. ((((3+4)))) or {{{{printf("Goodbye World!");}}}} I propose this addition: 4. If a non-alphanumeric character or continuous run of non-alphanumeric characters can be eliminated from a submission without affecting its output then those characters will be deemed to be "unnecessary" and will not be scored. – Darren Stone – 2013-12-08T17:54:51.890
@Darren Agreed. So basically, if removing one or more characters does not affect the output, then those characters don't count. – Doorknob – 2013-12-08T18:08:28.750
@DarrenStone Agreed... Updating the post, accordingly... – WallyWest – 2013-12-09T02:44:22.683
This looks like it would be better tagged as [tag:code-challenge] – Justin – 2013-12-09T03:19:29.137
I think you should just remove rule 3 (and therefore 4) altogether... – Doorknob – 2013-12-09T03:48:09.967
You know what guys, you're right...
Editing again... – WallyWest – 2013-12-09T03:49:09.970
Wait a minute, you can't just remove rule 3 and 4, I just made an excellent solution (-7790)! – Justin – 2013-12-09T03:52:16.327
"You're breaking my barrs, @Quincunx..." LOL
Where's your solution? – WallyWest – 2013-12-09T04:00:55.677
also, if you really want to remove it, then I recommend saying that non-alphanumeric characters score 0 (rather than 1) to better match what was previously in the question. Also, my solution is the Befunge 98 one. – Justin – 2013-12-09T04:01:45.410
So much strike-through, I'm having a hard time seeing the point of this. It looks like it's just a "Hello World" code golf with different text. – Iszi – 2013-12-09T04:14:29.857
Let me tidy that up... – WallyWest – 2013-12-09T04:20:44.760
@Eliseod'Annunzio You should definitely change it so that non-alphanumeric characters don't count, otherwise, you completely changed your question. – Justin – 2013-12-09T04:27:00.743
1Agreed, because otherwise my solution with literally just the string is better than the non alphanumeric one :-P Actually, I'd just suggest a larger handicap. Anyway I'm going to sleep now, will update my answer with whatever new rules in morning – Doorknob – 2013-12-09T04:36:15.670
1Wait, so do non alpha-num characters score 0? So that
--a-
would score 100 or is that 103? – None – 2013-12-09T05:29:59.907@LegoStormtroopr Looks like 100. – Johannes Kuhn – 2013-12-09T08:19:21.227
7If you have to disqualify languages, it almost certainly indicates a poorly designed question. – Peter Taylor – 2013-12-09T10:08:26.733
2@Doorknob et. al. If answers have to be updated due to new rules, and especially after the question's fifth revision, I think it's time to reconsider whether this question should stay open. It may be better to just close it, then put a new and improved version through the Sandbox before it gets posted again. – Iszi – 2013-12-09T14:53:20.367
1This question appears to be off-topic because it is constantly changing its criteria – John Dvorak – 2013-12-11T07:47:14.787