C
Input as space-separated list through STDIN, output as space-separated list through STDOUT.
Dear Boss,
I have made for you a decision about my employment a t your company. At about noon
a letter explaining this shall be presented to you, as I am a lazy person. As you
are a fool, I will say no more. And I look forward to never seeing you again.
Insincerely,
Steward Pitt
This should be compiled with:
gcc bossletter.c -o bossletter -Dam='+++' -Dwill='---' -Dthis='{' -Dhave=';'
-Ddecision=',' -Dquit='*' -Dfor='(' -Dmy=')' -Dbrain='}' -Dlie=']' -Dnoon='-quit'
-DD='' -Dto='D' -Dyou='D' -Dfool='you' -Das='to' -Dday='D' -Dno='fool' -Dcake='Pitt'
-Dlook='you' -DPitt='the' -Dthe='as' -DBoss='a[9999 lie' -DAs='a have' -Dlazy='my'
-Dperson='lazy have company' -Dyour='this' -DInsincerely='a' -Dcompany='b'
-Demployment='int quit' -DDear='struct this employment a have brain b have'
-Dbe='scanf for' -Dis='I[' -Dnever='for presented " " decision' -Dthat='4 decision'
-Dagain="my have b" -Dt='decision quit about have' -Dshall='while for'
-Dpresented='"%" to "d"' -Dletter='have brain' -DAt='a have return quit'
-Dmore='have b' -DAnd='a have shall' -Dare='qsort for' -Dforward='--my printf'
-Dexplaining='main for my'
-Dsay='1 decision that made my day'
-DSteward='Boss have no brain'
-Dseeing='the cake is a lie'
The code expands to:
struct{ int *a; } b;
a[9999], I;
made(a, about) int *a, *about; {
b.a;
return *about - *a;
}
main(){
while(scanf("%d", I++ + a));
b.a;
qsort(a, I-- - 1, 4, made);
b.a;
while(I--) printf("%d ", I[a]);
b.a, a[9999];
}
14whitespace to the rescue? – kaine – 2014-09-05T19:26:32.493
19
Or SPL.
– Dennis – 2014-09-05T20:06:06.8574
I thought of SPL too, but Chef may be fun as well :P
– Adriweb – 2014-09-07T00:12:28.237@Dennis That would be nearly impossible to figure out. – Isiah Meadows – 2014-09-08T21:43:04.017
Funny.. there are no ruby submissions yet! :P – Gaurav Agarwal – 2014-09-09T08:22:33.033
SPL might be possible, but it's severely limited on how big the list may be. I might attempt it at home tonight. Would be a really weird business letter to read though. – Nzall – 2014-09-10T11:50:50.610
@NateKerkhofs You could always store an arbitrarily long list in the exponents of the prime factors of a single number, right? ;-) – Angew is no longer proud of SO – 2014-09-11T06:56:42.517
@Angew The problem is that SPL is really crazy on handling integers. it's one of the most verbose languages out there, involving syntactically valid English, different results based on what nouns you use, power towers,... The biggest problem is that it's a very basic language, and not turing complete. You need to use the SPL version of GOTO often. – Nzall – 2014-09-11T08:05:22.820
@NateKerkhofs I understand there have been attempts at writing a Brainfk interpreter (at least one capable of interpreting a Brainfk interpreter) in SPL. Do you have a reference for SPL not being Turing-complete? – Angew is no longer proud of SO – 2014-09-11T08:15:24.827
@Angew It's right there on the website. It does not have infinite storage space, because you need to name your variables after a Shakespeare character that's in the spec, of which there are only about 100. – Nzall – 2014-09-11T08:16:53.227
@NateKerkhofs They have stacks, though. And it just takes two stacks to simulate a potentially infinite tape. – Angew is no longer proud of SO – 2014-09-11T08:28:52.950