C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ObfuscatedHelloWorld
{
class Program
{
static void Main(string[] args)
{
int[,] y = new int[,] {{p(), p(), p(), n(), n(), n(), p(), n(), },
{p(), p(), n(), n(), p(), p(), p(), p(), },
{p(), p(), n(), n(), n(), p(), p(), n(), },
{p(), p(), n(), n(), n(), p(), p(), n(), },
{p(), p(), n(), n(), n(), p(), n(), p(), },
{p(), n(), n(), n(), p(), n(), p(), n(), },
{p(), p(), p(), p(), p(), p(), n(), p(), },
{p(), p(), n(), n(), n(), p(), n(), p(), },
{p(), p(), n(), p(), p(), n(), n(), n(), },
{p(), p(), n(), n(), n(), p(), p(), n(), },
{p(), p(), n(), n(), p(), p(), p(), n(), },
{p(), n(), n(), n(), p(), n(), p(), p(), }, };
for (int i = 0; i < s(gr().ToArray()[21], 1) / gr().ToArray()[1]; i++)
{
bool[] h = new bool[8];
for (int j = 0; j < 8; j++)
{
h[j] = pr(y[i,j]);
}
cw(Encoding.ASCII.GetString(new byte[]{o(b(h), b())}));
}
}
static void cw(string st)
{
using (StreamWriter s = new StreamWriter(Console.OpenStandardOutput()))
{
foreach (char c in st)
s.Write(c);
}
}
static byte o(byte c, byte z)
{
int l = s((0xAA00 ^ 0x0), -8);
l |= z;
return (byte)(c ^ l);
}
static byte b()
{
return (byte)s(0xFF, s(4097,3));
}
static byte b(bool[] a)
{
byte v = 0;
foreach (bool b in a)
{
v = (byte)s(v, 1);
if (b) v |= 1;
}
return v;
}
static int s(int i, int s)
{
if (s > 0)
{
i <<= s;
return i;
}
i >>= s + (s << 1);
return i;
}
static string pa(string st)
{
for (int il = 0; il < s(gr().ToArray()[11], 1) - st.Length; il++)
st = "0" + st;
return st;
}
static IEnumerable<byte> gr()
{
byte[] m = Convert.FromBase64String("AwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZg==");
foreach (byte bh in m)
yield return o(o(bh, b()), b());
}
static byte eb(bool[] ar)
{
byte v = 0;
foreach (bool b in ar)
{
v <<= gr().ToArray()[1] - 3;
if (b) v |= (byte)(gr().ToArray()[8] - gr().ToArray()[7]);
}
return v;
}
static int p()
{
foreach(byte b in gr())
if (pr(b))
return b;
return gr().ToArray()[gr().ToArray()[8] - gr().ToArray()[6]];
}
static int n()
{
foreach (byte b in gr())
if (!pr(b))
return b;
return gr().ToArray()[gr().ToArray()[0]];
}
static bool f(bool g)
{
return ((l(g) << gr().ToArray()[0] - 2) % gr().ToArray()[3] - 3 == 0);
}
static int l(bool k)
{
return (k ? (gr().ToArray()[12] >> gr().ToArray()[1]) : 0);
}
static bool pr(int t)
{
for (int i = gr().ToArray()[0] - 1; i < t; i++)
if (t % i == 0)
return false;
return true;
}
}
}
Why did my edit get rejected? (I know it wasn't helpful, but I've voted to reopen, so don't just say "it introduced tags that are not helpful".) – Erik the Outgolfer – 2016-05-25T13:43:47.143
1Who is the first to submit BF?
:)
– VisioN – 2014-03-01T15:34:44.5933@VisioN - I would consider BF not really obfuscated... – TheDoctor – 2014-03-01T15:38:31.543
3http://www.dangermouse.net/esoteric/piet/hw1-11.gif is a Hello World program in Piet. More information: http://www.dangermouse.net/esoteric/piet.html – MatrixFrog – 2014-03-01T15:47:06.507
Do you consider a single char as a string? – ProgramFOX – 2014-03-01T15:50:42.410
@ProgramFOX - no – TheDoctor – 2014-03-01T15:52:42.130
3
"That one was [tag:code-golf]" doesn't make it not a duplicate. The rules do seem to exclude copying the answers from the older question, but principally because they exclude all answers: there's no program which can't be obfuscated more.
– Peter Taylor – 2014-03-01T16:29:57.0336I disagree that they are duplicates, on different grounds than simply "The other one was a code-golf". The code-golf one required that a specific subset of characters never be used in the source code, whether it be in a string or not. There should be no matches in any of those entries against the following regex:
/[dehlorw01]/
. Also, length was graded. In this, it just requires no usage of strings (and probably nochar[][]
, wither). Length isn't counted, but creativity is the main decisive factor, thus the [tag:popularity-contest] tag. – Isiah Meadows – 2014-03-01T19:53:45.220Alas, my 100 rep bonus (for my StackOverflow rep) apparently doesn't qualify as having earned 10+ rep on codegolf, so I can't provide my .NET version as an answer. – Edmund Schweppe – 2014-03-03T16:39:13.283
@EdmundSchweppe Association bonus does not counts to the purpose of protected questions, but I don't know why this one was protected. Anyway, getting one upvote in some other question here and get the 10 reputation poins is not hard, and then you may post your answer to this question. – Victor Stafusa – 2014-03-03T17:28:52.230
No string literals or no strings at all? – Sebastian Negraszus – 2014-03-03T19:11:38.100
@Victor I'll confess surprise that the association bonus wouldn't count towards protected questions; however, as you say, getting one upvote elsewhere isn't that hard. – Edmund Schweppe – 2014-03-03T19:26:08.067
@EdmundSchweppe Yeah, you are not the first one here to get surprised by that SE rule. – Victor Stafusa – 2014-03-03T19:37:38.657