Login Register


[Anti-Golfing] Hello World filter_list
Author
Message
[Anti-Golfing] Hello World #1
So, I tried this before, but no one bit. Round two.

The aim is to print
Code:
Hello, World!
in the most complex way possible with the longest program possible. A Rube Goldberg machine, or Anti-Golfing. You should include pseudocode or a simple explanation as to what your code is doing.

Scores will be calculated using a Byte Counter and program complexity (judged by us).

Code:
(no_of_bytes/2)*complexity

Spoiler: Leaderboard
Points may change based on complexity judgement and algorithm.
1) @Shebang - 1443.8 ((7219/2)*0.4)
2) @lux - 775.95 ((2217/2)*0.7)
3) @Master Antrax - 0.555 ((111/2)*0.01)


The winner will be awarded 25 NSP.
Donate to @SyntaxPot to add to our prize pool.

Reply

RE: [Anti-Golfing] Hello World #2
Code:
// Manually defining the unicode alphabet in an array. var alpha = ["\u0041", "\u0042", "\u0043", "\u0044", "\u0045", "\u0046", "\u0047", "\u0048", "\u0049", "\u004A", "\u004B", "\u004C", "\u004D", "\u004E", "\u004F", "\u0050", "\u0051", "\u0052", "\u0053", "\u0054", "\u0055", "\u0056", "\u0057", "\u0058", "\u0059", "\u005A"]; // Manually definine special characters in an array of unicode, spac = \u0020 var special = ["\u0020", "\u0021", "\u0022", "\u0023", "\u0024", "\u0025", "\u0026", "\u0027", "\u0028", "\u0029"]; //Assinging letters as variables to the index of the unicodes. var h = alpha.indexOf('\u0048'); var e = alpha.indexOf('\u0045'); var l = alpha.indexOf('\u004C'); var o = alpha.indexOf('\u004F'); var w = alpha.indexOf('\u0057'); var r = alpha.indexOf('\u0052'); var d = alpha.indexOf('\u0044'); var sp = special.indexOf("\u0020"); var exp = special.indexOf("\u0021"); //Creating a prototype to bind 'console.log' to 'logThisOutYeahMate' var logThisOutYeahMate = Function.prototype.bind.call(console.log, console); // A sequence of if statements to see if the unicode character exists. If it exists it'll return a numerical value // Of the position in the array. Luckily A isn't used, as it's position would be 0, resulting in a 'false' and not // allowing the if statement to run if (alpha.indexOf('\u0048')) { if (alpha.indexOf('\u00485')) { if (alpha.indexOf('\u004C')) { if (alpha.indexOf('\u004C')) { if (alpha.indexOf('\u004F')) { // Oh look, here's an anomaly... The position of '\u0020' in the array 'special' is 0, which is equivalent to // false. So we'll just check if it equals the Numeric 0, which is true. if (special.indexOf('\u0020') === 0) { if (alpha.indexOf('\u0057')) { if (alpha.indexOf('\u004F')) { if (alpha.indexOf('\u0052')) { if (alpha.indexOf('\u004C')) { if (alpha.indexOf('\u0044')) { // Creates a function that takes the argument 'doTheThingWhenTheThingIsDone' function f(doTheThingWhenTheThingIsDone) { // Checks if the variable 'doTheThingWhenTheThingIsDone' is equal to the unicode string of // 'The thing to be done' if (doTheThingWhenTheThingIsDone == '\u0054\u0068\u0065\u0020\u0074\u0068\u0069\u006e\u0067\u0020\u0074\u006f\u0020\u0062\u0065\u0020\u0064\u006f\u006e\u0065') { // Calls the bound logThisOutYeahMate function previously defined, and applies it to the // the console. logThisOutYeahMate.apply(console, [alpha[h].toUpperCase() + alpha[e].toLowerCase() + alpha[l].toLowerCase() + alpha[l].toLowerCase() + alpha[o].toLowerCase() + special[sp].toLowerCase() + alpha[w].toLowerCase() + alpha[o].toLowerCase() + alpha[r].toLowerCase() + alpha[l].toLowerCase() + alpha[d].toLowerCase() + special[exp].toLowerCase()]); // We call each unicode character from the array 'alpha' by parsing it the variables we // previously defined by checking the indexOf // And we make sure these are all either UPPER-CASE, or lower-case } } // We call the function, and set the argument 'doTheThingWhenTheThingIsDone' to equal the unicode string // equivalent to 'The thing to be done' f(doTheThingWhenTheThingIsDone = '\u0054\u0068\u0065\u0020\u0074\u0068\u0069\u006e\u0067\u0020\u0074\u006f\u0020\u0062\u0065\u0020\u0064\u006f\u006e\u0065'); } } } } } } } } } } }
2,217 Bytes
Gotta' make sure those letters exist.

Reply

RE: [Anti-Golfing] Hello World #3
(08-23-2015, 03:04 PM)Lux Wrote:
Code:
var alpha = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; var special = ["!", "?", ",", ".", "-", "+", "=", "-", "*", "&", " "]; var h = alpha.indexOf('h'); var e = alpha.indexOf('e'); var l = alpha.indexOf('l'); var o = alpha.indexOf('o'); var w = alpha.indexOf('w'); var r = alpha.indexOf('r'); var d = alpha.indexOf('d'); var sp = special.indexOf(" "); var exp = special.indexOf("!"); var log = Function.prototype.bind.call(console.log, console); if (alpha.indexOf('h')) { if (alpha.indexOf('e')) { if (alpha.indexOf('l')) { if (alpha.indexOf('l')) { if (alpha.indexOf('o')) { if (special.indexOf(" ")) { if (alpha.indexOf('w')) { if (alpha.indexOf('o')) { if (alpha.indexOf('r')) { if (alpha.indexOf('l')) { if (alpha.indexOf('d')) { function f(doTheThingWhenTheThingIsDone) { if (doTheThingWhenTheThingIsDone === 'The thing is done') { log.apply(console, [alpha[h].toUpperCase() + alpha[e] + alpha[l] + alpha[l] + alpha[o] + special[sp] + alpha[w] + alpha[o] + alpha[r] + alpha[l] + alpha[d] + special[exp]]); } } f(doTheThingWhenTheThingIsDone = 'The thing is done'); } } } } } } } } } } }
1,545 bytes
Gotta' make sure those letters exist.

Oh, and I forgot to mention in the OP that you should include pseudocode or a simple explanation as to what your code is doing.

Reply

RE: [Anti-Golfing] Hello World #4
(08-23-2015, 03:26 PM)eclipse Wrote: Oh, and I forgot to mention in the OP that you should include pseudocode or a simple explanation as to what your code is doing.

Eugh. Fine. Time to get commenting

Reply

RE: [Anti-Golfing] Hello World #5
I'm working on a Brainfuck solution.. this might be a while.
[Image: CDUAq9d.png]

Reply

RE: [Anti-Golfing] Hello World #6
(08-23-2015, 03:26 PM)eclipse Wrote: Oh, and I forgot to mention in the OP that you should include pseudocode or a simple explanation as to what your code is doing.

Updated. Byte count does not include pseudocode.

Reply

RE: [Anti-Golfing] Hello World #7
Here is a brainfuck code for this:
Code:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
I mean, there is really no reason to put any comments... it just says "Hello World!"
You can compile it here:
http://copy.sh/brainfuck/

Byte Count: 111 Bytes

Reply

RE: [Anti-Golfing] Hello World #8
Not sure if this is valid, but whatever. It's a nested Brainfuck program!

7,219 Bytes

Code:
++++[->++++++++<]>.................+++++++++++..++[->++<]>+.++[--->++<]>.+[--->++<]>+..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+<]>+....--[->+++<]>+.++[--->++<]>.+[--->++<]>+..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.>++++++++++.[->+++<]>++................+++++++++++...+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+.-----------.....+++++++++++..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[->+++++++++<]>.--[----->+<]>.[->+++++<]>-..>++++++++++.[->+++<]>++...............+++++++++++.......++[->++<]>+.++[--->++<]>.--[---->+++<]>.[--->++<]>++......--[-->+++<]>.......[--->++++<]>.[---->+++<]>.+[->++<]>+.>++++++++++.[->+++<]>++..............+++++++++++..++[->++<]>+.++[--->++<]>.+[--->++<]>+..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+<]>+.......--[->+++<]>+.++[--->++<]>.+[--->++<]>+.....+[----->+<]>.[---->+++<]>.+[->++<]>+.>++++++++++.[->+++<]>++.............-[->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+.....+[----->+<]>.[---->+++<]>.[--->++<]>++........-[->+++<]>.[--->++<]>.+[--->++<]>+.+++.--[----->+<]>.[->+++++<]>-.....>++++++++++.[->+++<]>++............+++++++++++......++[->++<]>+.++[--->++<]>.--[---->+++<]>..[--->++<]>++.........--[-->+++<]>........[--->++++<]>.[---->+++<]>.>++++++++++.[->+++<]>++...........-[->+++<]>.[--->++<]>.--[---->+++<]>.[--->++++<]>.[->+++++<]>-..++[->++<]>+.++[--->++<]>.+[--->++<]>+..-----------..........--[->++<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...+[----->+<]>.>++++++++++.[->+++<]>++..........--[-->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...+[----->+<]>.[---->+++<]>.[--->++<]>++...........-[->+++<]>.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...+[----->+<]>.[---->+++<]>.+[->++<]>+.>++++++++++.[->+++<]>++.........-[->++<]>.+[--->++<]>+.........-----------............+++++++++++.....+++.--[----->+<]>.[->+++++<]>-...>++++++++++.[->+++<]>++........+++++++++++...++[->++<]>+.++[--->++<]>.--[---->+++<]>.....[--->++<]>++.............--[-->+++<]>..........>++++++++++.[->+++<]>++.......--[-->+++<]>...[--->++++<]>.[---->+++<]>.+[->++<]>+.-[-->+<]>---..++[->++<]>+.++[--->++<]>.[-->+<]>+..............+++++++++++..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+..>++++++++++.[->+++<]>++.......+++++++++++.+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...+[----->+<]>.[-->+<]>++....--[-->+++<]>.+[->++<]>+.[--->++<]>.[->+++++++++<]>.--[----->+<]>.[->+++++<]>-.....>++++++++++.[->+++<]>++.......+++++++++++.++[->++<]>+.++[--->++<]>.--[---->+++<]>.................[--->++<]>++....--[-->+++<]>.[--->++++<]>.[---->+++<]>.+[->++<]>+.-[-->+<]>---...++[->++<]>+.++[--->++<]>.+[--->++<]>+.>++++++++++.[->+++<]>++.......+++++++++++....................-----------....+++++++++++..........>++++++++++.[->+++<]>++.................+++++++++++......+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+<]>+....[-->+++<]>--.--[----->+<]>.[->+++++<]>-........>++++++++++.[->+++<]>++................+++++++++++...++[->++<]>+.++[--->++<]>.--[---->+++<]>.....[--->++<]>++.....--[-->+++<]>.....[--->++++<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.--[---->+++<]>.>++++++++++.[->+++<]>++...............--[->++<]>.[->+++++<]>-..++[->++<]>+.++[--->++<]>.+[--->++<]>+..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->+<]>+......-[->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+.......>++++++++++.[->+++<]>++..............+++++++++++....+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[->+++++++++<]>.--[----->+<]>.[-->+<]>++.......+++++++++++..........>++++++++++.[->+++<]>++.............+++++++++++.++[->++<]>+.++[--->++<]>.--[---->+++<]>....[--->++++<]>.[---->+++<]>.+[->++<]>+.[--->+<]>+........+++++++++++..++[->++<]>+.++[--->++<]>.+[--->++<]>+..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.>++++++++++.[->+++<]>++............--[->+++<]>+.++[--->++<]>.+[--->++<]>+..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.[-->+<]>+.........+++++++++++..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+..-----------..>-[--->+<]>--.[--->+<]>--.+++..+++++++.-[---->+<]>++.++++[->++<]>+.-[->++++<]>.---[->++++<]>-.++.+[->+++<]>+.++++++++.-[++>---<]>+.[->+++<]>+.--[--->+<]>-.[---->+<]>+++.[->++<]>+.>-[--->+<]>--.--[->++++<]>-.++++++..-[->++++<]>.[->++<]>+.--[----->+<]>-.++.[---->+<]>+++.---[->++<]>.--[->++++++<]>.>++++++++++.[->+++<]>++...........--[->++<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[->+++++++++<]>.--[----->+<]>.[->+++++<]>-....-----------..........+++++++++++....++[->++<]>+.++[--->++<]>.--[---->+++<]>....>++++++++++.[->+++<]>++..........--[->++<]>.[---->+++<]>.+[->++<]>+.-[-->+<]>---...++[->++<]>+.++[--->++<]>.+[--->++<]>+..-----------...........+++++++++++...........................+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[->+++++++++<]>.--[----->+<]>.[->+++++<]>-.........>++++++++++.[->+++<]>++.........--[->+++<]>+.++[--->++<]>.--[---->+++<]>........[--->++<]>++............--[-->+++<]>..[--->++++<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.--[---->+++<]>...[--->++++<]>.[->+++++<]>-...++[->++<]>+.++[--->++<]>.+[--->++<]>+...........................>++++++++++.[->+++<]>++........+++++++++++..........-----------.............+++++++++++..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[->+++++++++<]>.--[----->+<]>.[->+++++<]>-...........++[->++<]>+.++[--->++<]>.--[---->+++<]>..........[--->++++<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.--[---->+++<]>.[--->++++<]>.[->+++++<]>-..++[->++<]>+.++[--->++<]>.+[--->++<]>+.>++++++++++.[->+++<]>++.......+++++++++++..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...-----------.............+++++++++++.+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+.....+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.--[---->+++<]>......+.--[----->+<]>.[->+++++<]>-......++[->++<]>+.++[--->++<]>.--[---->+++<]>..........>++++++++++..-[->+++++<]>.........[--->++++<]>.[---->+++<]>.+[->++<]>+.-[-->+<]>---..++[->++<]>+.++[--->++<]>.+[--->++<]>+..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+...+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[->+++++++++<]>.--[----->+<]>.[->+++++<]>-......++[->++<]>+.++[--->++<]>.--[---->+++<]>..................[--->++++<]>.[---->+++<]>.+[->++<]>+.-[-->+<]>---.>++++++++++.+[->++++<]>-.++[->++<]>+.++[--->++<]>.+[--->++<]>+..+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+.....+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[-->+++<]>--.++[--->++<]>.+[--->++<]>+.....+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.[->+++++++++<]>.--[----->+<]>.[->+++++<]>-..........++[->++<]>+.++[--->++<]>.--[---->+++<]>..........[--->++++<]>.[---->+++<]>.+[->++<]>+.-[-->+<]>---...++[->++<]>+.++[--->++<]>.+[--->++<]>+..........+[----->+<]>.[---->+++<]>.+[->++<]>+.[--->++<]>.+[--->++<]>+...+++.

This outputs the following (leading spaces on the first line were replaced with a special character so format wasn't messed up):

Code:
                 ++[>++<-]> [>++<-]>[> +++<-]>[>+ ++<-]>.<++ +++++++[>- -------<-] ++[>++<-]> [>+++++<-] >[>+++++<- ]>+.<+++++ ++++++[>-- --------<- ]>-<++[>++ <-]>[>+++< -]>[>+++<- ]>[>+++<-] >+++++++++ +++++.<+++ +++[>----- ---------- ---<-]++[> ++<-]>[>++ +<-]>[>+++<-]>[>+++< -]>.<+++++ +[>----------------- -<-]+++[>+ ++++++++++++++++++++ ++++++++++ ++++++<-]> .<++++++++ +++[>----- -----<-]>- <++[>++<-] >[>+++++++ ++++<-]>.< ++++++++++ +[>----<-] ++[>++<-]> [>++<-]>[> ++<-]>[>++ Sorry I suck at ASCII Art :P <-]>.<++++ ++++[>---- <-]+++[>++ +++++++++++++++++++++++++++<-]>.<+++++++++ [>-------- --<-]>---<+++[>+++++++++++++++++++++++++++ ++++++++++ ++<-]>.<+++++++++++[>----------<-]>-<++[>+ ++<-]>[>+++ +<-]>[>+++++<-]>------.<++++++[>---------- ---------<-]++[>++<-]>[>+++<-]>[>+++<-]>[>+++<-]>.<++++++[>------------------<-]+ +[>++<-]>[>+++++<-]>[>+++++<-]>.<++++++++++[>----------<-]+++[>++++++++++<-]>+++.

Which outputs, obviously:

Code:
Hello, World!

Spoiler: Explanation
Code:
++[>++<-]>[>++<-]>[>+++<-]>[>+++<-]>. # Prints "H" <+++++++++[>--------<-] # resets the value to 0 ++[>++<-]>[>+++++<-]>[>+++++<-]>+. # Prints "e" <+++++++++++[>----------<-]>-< # resets the value to 0 ++[>++<-]>[>+++<-]>[>+++<-]>[>+++<-]>++++++++++++++. # Prints "l" <++++++[>------------------<-] # resets the value to 0 ++[>++<-]>[>+++<-]>[>+++<-]>[>+++<-]>. # Prints "l" <++++++[>------------------<-] # resets the value to 0 +++[>+++++++++++++++++++++++++++++++++++++<-]>. # Prints "o" <+++++++++++[>----------<-]>-< # resets the value to 0 ++[>++<-]>[>+++++++++++<-]>. # Prints a comma <+++++++++++[>----<-] # resets the value to 0 ++[>++<-]>[>++<-]>[>++<-]>[>++<-]>. # Prints " " <++++++++[>----<-] # resets the value to 0 +++[>+++++++++++++++++++++++++++++<-]>. # Prints "W" <+++++++++[>----------<-]>---< # resets the value to 0 +++[>+++++++++++++++++++++++++++++++++++++++<-]>. # Prints "o" <+++++++++++[>----------<-]>-< # resets the value to 0 ++[>+++<-]>[>++++<-]>[>+++++<-]>------. # Prints "r" <++++++[>-------------------<-] # resets the value to 0 ++[>++<-]>[>+++<-]>[>+++<-]>[>+++<-]>. # Prints "l" <++++++[>------------------<-] # resets the value to 0 ++[>++<-]>[>+++++<-]>[>+++++<-]>. # Prints "d" <++++++++++[>----------<-] # resets the value to 0 +++[>++++++++++<-]>+++. # Prints "!"


This is a great demonstration of how NOT to program in Brainfuck Tongue

(08-23-2015, 04:22 PM)Master Antrax Wrote: Here is a brainfuck code for this:
Code:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
I mean, there is really no reason to put any comments... it just says "Hello World!"
You can compile it here:
http://copy.sh/brainfuck/

Byte Count: 111 Bytes

The purpose of the challenge is not just to print it, but to have the longest and most complex code! Smile
(This post was last modified: 08-23-2015, 04:54 PM by Shebang.)
[Image: CDUAq9d.png]

Reply

RE: [Anti-Golfing] Hello World #9
@Shebang Oh sorry Tongue I thought it was to have the smallest xD

Reply

RE: [Anti-Golfing] Hello World #10
@Shebang is the winner and has been awarded 25 NSP. Feel free to still attempt the challenge if you wish.

Reply







Users browsing this thread: 1 Guest(s)