text:
How long is your (language) snake?
Following on from the third order quine challenge, your task is to write an Ouroboros program that uses as many languages as possible.
That is, in language A, write a program pA which outputs program pB in language B. Program pB should output program pC in language C, and so on until eventually a program outputs the original program pA in language A.
No two languages in your loop can be the same or subsets or supersets of each other. None of the programs in the loop may be identical.
The longest chain of languages win. The length of the source code will be the tie-breaker.
Here is an example solution of length 3 given by Ventero.
s='print q<puts %%q{s=%r;print s%%s}>';print s%s

with Python generates this Perl snippet
print q<puts %q{s='print q<puts %%q{s=%r;print s%%s}>';print s%s}>

which generates the following Ruby code
puts %q{s='print q<puts %%q{s=%r;print s%%s}>';print s%s}

which then prints the original Python snippet:
s='print q<puts %%q{s=%r;print s%%s}>';print s%s

Relevant: a 50-language "Ouroboros".

Very similar (closed): Create a chain of programs in different languages

@Ypnypn It's not a duplicate of that is it? I mean this is to make the loop as long as possible with a tie-breaker of the source code length. No one has ever had the chance to post a length 4 Ouroborous before :) Also a loop is different from a chain.

It's actually very similar to this one, but that didn't require the sequence to loop around, so there was no quine component.

The 50 languages beast seems to be a winner before we even started.

@kuroineko He hasn't entered it and we have no idea how he did it. I think we can safely ignore it (and it would be cheating to copy it). I suspect an entry with 4 languages would probably win here.

And did you notice that the 50-language Ouroboros is in alphabetical order?

Yusuke Endoh created a quine of length 50! Details and git are found here: Quine Relay

Here's a loop of 4 languages:
C -> Bash -> Batch -> Python -> C
C
main(){char *c="echo %cecho print %cmain(){char *c=%c%c%s%c%c;printf(c,34,39,92,34,c,92,34,39,34);}%c%c";printf(c,34,39,92,34,c,92,34,39,34);}

Bash
echo "echo print 'main(){char *c=\"echo %cecho print %cmain(){char *c=%c%c%s%c%c;printf(c,34,39,92,34,c,92,34,39,34);}%c%c\";printf(c,34,39,92,34,c,92,34,39,34);}'"

Batch
echo print 'main(){char *c="echo %cecho print %cmain(){char *c=%c%c%s%c%c;printf(c,34,39,92,34,c,92,34,39,34);}%c%c";printf(c,34,39,92,34,c,92,34,39,34);}'

Python
print 'main(){char *c="echo %cecho print %cmain(){char *c=%c%c%s%c%c;printf(c,34,39,92,34,c,92,34,39,34);}%c%c";printf(c,34,39,92,34,c,92,34,39,34);}'

Very impressive!


text:
Sort a list and write some English!
Your boss managed to read the secret hidden message. He didn't end up firing you, though, he just made you a secretary and forbade you from writing code.
But you're a programmer. You need to write code. You must code.
Therefore, your code needs to look as similar to English as possible, make sense, and look as little like code as possible. Your code should take a list of integers (either in a function, or STDIN), and return that list sorted (returning it, or STDOUT).
Any language can be used, but I'm looking for the most creative solution, (kudos if your code looks like a business letter).
This is a popularity contest!

whitespace to the rescue?

Or SPL.

I thought of SPL too, but Chef may be fun as well :P

@Dennis That would be nearly impossible to figure out.

Funny.. there are no ruby submissions yet! :P

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.

@NateKerkhofs You could always store an arbitrarily long list in the exponents of the prime factors of a single number, right? ;-)

@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.

@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 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.

@NateKerkhofs They have stacks, though. And it just takes two stacks to simulate a potentially infinite tape.

GolfScript

Dear Boss Man.
It came to my attention that my keyboard needs replacement; the keys required  to write the
symbols ~ $ ` . and } are not functioning properly.
It's very difficult to work like this! Please instruct the IT department to exchange the faulty
keyboard as soon as possible.
Sincerely,
Dennis

Try it online!
How it works

 Undefined tokens (e.g., most English words) are noops in GolfScript.

 . ; duplicates the input string and discards the copy.

 ~ $ evaluates the input string and sorts the resulting array.

 ` inspects the array (for pretty printing).

 . and duplicates the output string and discards the copy.

 } is a "super comment" since it is unmatched; everything following it is ignored.

I'm guessing you wrote this on your other keyboard?

Perhaps he wrote it with the mouse keyboard hidden in the accessibility gaboodle?

It's an inline comment... it's a block comment... it's a SUPER-COMMENT!

@Geobits: Let's assume that "are not functioning properly" translates to "requires multiple attempts to eventually get the characters on the screen"

Or he used Character Map.

Which keyboard layout are you using? \`` and ~` are the same key on mine.

@user23013: For the purpose of this contest, let's say the British layout.

PHP
Defines a function called item that will sort an array that you pass it.
Dear Boss,
I have successfully discovered all brackets.
The ones marked with question marks are the ones which I am not sure about.
The ones marked with asterisks can be used both as an opening and closing delimiter.
(
)
{
}
[
]
>?
<?
/*
'*
"*

Thank you for reading my memo. In other news, the */ function item (#12 in the list of things that have an asterisk before them) was discovered recently, which I read on a local news site.
#12 is my favorite function item! Just thought you'd be interested. Sorry if this is too off-topic; here's some business stuff. Imagine that you had some (let's say you have a combination of $10
& $money) # of dollars (i.e. you have $10 + $money). Now, here's the important part. It's so important, I'll separate it from the rest of this message with the brackets I discovered:

{
#10 in my personal list of things to remember about money management is that you have to be careful. I still haven't been able to
sort #9 out yet (I bought the manual from someone else), but #9 also seems to be about being careful. You also have to guard the dollars
($money); #13 says that if you don't protect them by putting them in a bank or something, they might be stolen.
}

   //-----------------------\\
  //   Signed,               \\
  //   Your great employee   \\
   //-----------------------\\

It looks much better if you paste it into a text editor and resize the window so that you can see the entire thing on your screen at once.

"I have successfully discovered all brackets." Someone's going for employee of the month!

-1: You missed « and ». (In seriousness, +1.)

Wow man. :D Can't stop laughing

Python 2
'''''''''''''''''''''''''''''''''''''''''''''
One of the phones in the office seems to be broken, so it needs to be fixed.

''''''''''''''''''''
This memo was made while testing the functionality of its buttons since
some of them didn't seem to work.
''''''''
1 (no alphabets) working with no problem
''''''''
abc working with no problem
'''''''''
def working (partially):
 please                                              =( 'o" :\
 at least I figured out that this was a problem!     :')
 # list (phone number list) was missing as well, so I need to:

 #1
 print (please, sorted (partially)) [1] # list, and [2] the memo
 #2
 return
 #3
 check (making-sure, ghi-jkl-etc. works)

''''''''''''''''''

+1 love how you snuck in def to mean 'the letters on phone key 3'.

Python 2
'''
                        5th of September 2014

Dear Boss,

I  am writing    this Mail because     i want to discuss
 the recent   incident.
I am Thankful    that you did not fire   me, and gave me a secretary position instead.
I dont have any    experience in being a     sec retary and I am not very. good at   writing mail,
so please   excuse any spelling,   grammar or   formating   errors  in     this mail.

I will       certainly     try to improve  and do   my best in my new job      and will'''
'from now on strictly ';exec'''ute your orders.   =
Firstly      i want to    sincerly        apologize my   dumb behaviour,it was  idiotic ( and childish ).
I   really  ;apologize  to you. it  wont  .happen again, sir. If   i   could
 only   reverse   the  timeline       (to undo it all). Then i would;
I   really   promise to never  write  code in any form

Can i talk about that   in   a   meeting with  you?
  Maybe    today at'''[4::15]#in the afternoon?

Finding the right words was a real pain.
Input:  [1,7,4,3]
Output: [1,3,4,7]

This looks like those emails I get from Nigeria lol

@ChrisCirefice Well, these mails probably contain hidden code as well ;) The spacing and somewhat poor wording in my code is because every 15th character of the string after the exec forms a new string which is then executed. So the whole program is basically exec"y=input();y.sort();print y"

The ''' multiline string at the top is a dead giveaway, sadly, but +1 for "from now on strictly ';exec'''ute your orders." and good effort :p

NetLogo
To Manager [IT]

Let Sue sort it; then
show Sue the end to the end

With indentation and capitalization changes, the code becomes clear(er). This defines a function called manager which takes a list as input and prints the list sorted.
to manager [IT]
  let sue sort IT; then (semicolons introduce a comment)
  show sue
  the
end

to the
end

Definitely doesn't look like code.

I like this one a lot.

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];
}

+1 for preprocessor abuse. Of course with that sort of thing you could arguably make it read like any piece of code you want.

You should have given meaning to keywords and variables and only used the preprocessor for special characters like braces. You didn't even make an effort.

@bebe the more insolent the abuse, the better, IMHO :).

Next codegolf is to make this "source" compile to an implementation of Conway's Game of Life. -D golf!

@fluffy I love preprocessor abuse in obfuscated C. You can make almost anything in it valid C code with enough #define/-Ds.

@slebetman If I knew more about C than someone who programmed in it for only a week, I would actually be interested in a new genre like that.

Python 2 & 3
Unfortunately, the employees of today just can't stop using hashtags all over the place...
#WritingALetter #Business    Dear Boss,
#SecondLine    I found this scrap of paper on the floor. It said "

def sortl(l):        # define a function
    return sorted(l) # returns the list, sorted "

#ScrapOfPaper    Just thought I should let you know.
#Honesty    From Laurence

[Worth a try, I guess?]

Great excuse for using comments, but unfortunately it contains actual code

Add print "hello" at the end

Dogescript
It's basically English, right?
shh oooot! my  keyybr oad is brokn. i ne ed neew 1.
such fixs much keys
keys dose sort
wow keys

translates to:
// oooot! my keyybr oad is brokn. i ne ed neew 1.
function fixs(keys) {
    keys.sort();
    return keys;
}

I think your boss will fire you if you write like this...

Detour
Dear Boss Man
I thought I had put your recovered files on drive z.
In reality it was downloaded to the main drive, C://users/boss/recovery. Sorry for the confusion!

Interpreter Permalink
How it works:

 The only important part is ://, and the line above it, z..
: means "put input here", the first / reflects it up to z, which is sort; it then goes up, wraps across the top, keeps going up from the bottom, then hits  / from below, which bounces it left to the other /, which does the same thing, except this time wrapping around to  ., or output.

Simplified version:
Detour
Dear Boss Man
             z.
            ://

Try it online!

Brainfuck
Hey boss! This is the public key that you asked!

>,[[-[>>+<<-]>+>]<[<<]>,]+>[>+<-]>[>[>+<<->-]<[<<.>>-]<<[>>+<<-]>>+>>]

Pretty cool huh?

Copyright note:

Note: I copy pasted it from here. As far as I know, that codes from site are has copyright cc by-sa 3.0 with attribution. If this method is illegal, let me know and I will try to delete this.

"Your code needs to look as little as code as possible."

It's a public key for encryption! Not code! Different!

@Realdeo Don't forget the , on the second line will read more input after the program ran

Good catch! Editing it

With brainfuck it should be much easier to just incorporate the code in plain text. > for example can be used for quotes (that's how it works in emails) and so on.

JavaScript
I'm not sure if I can outsmart him, but I can throw him off my trail!
/*Hello Bossman
I feel the need to alert you to a pressing matter.
Nothing Dan from Marketing's head seems to be */function/*ing anymore.
I have a lot of evidence, but not enough time to */sort/* through it.
Should I just send it to you directly */(/*although I'm sure you have about a thou*/s/*and other things to do*/)/*?
Nah, here's it in a summary:

Dan seems to be overly facinated by the */{/* key on his keyboard, and presses it many times a minute.
He */return/*ed his new Galaxy */s/*4, after trying to eat it, multiple times.*/.

/*When Dan was tasked to */sort/* through the Haberson account, he attempted to stab his computer multiple times with a ruler */(/*he was eventually deterred by Jenny)
Everyone backed off for a few days, but we all remembered.
Later, we approached him about the incident, he claimed hostile working conditions and that he was unable to */function(/*.
I think he m*/a/*y need to see a psychatrist.

None of us feel safe to approach him on the topic again*/, b/*rining up conflict is something most of us like to avoid. (except Jenny*/)
{/*Dan was then moved to a different spot in the building, in an attempt to give him a new environment.
Despite the move he */return/*ed to his old desk every day, and wrote */a - b/* on the walls of the new spot.
We all just sort of accepted that and the layout planner gave up after a week or two.

One week we got a new employee in the office. When she went to say Hi to Dan, he screamed a - b over and over.
Not sure what his fascination is there. b-c is a much superior algorithm.

We're not really sure what caused this, but one day he switched from the { key to the */}
/*key. Dan switched back the next day.

There is an ongoing betting pool on what will happen next (general categories mostly*/)
/*Currently the betting for him stabbing an actual person is at almost $20,000.

Please do something about Dan. If anything start a reality TV show from the security tapes.

On a completely unrelated note, I love this new */}/* key, it's really neat looking. Did my keyboard always have this?
Sincerely,
Zeke*/

 function sort(s) { return s.sort(function(a,b) { return a-b }); }

Comment abuse kinda renders this more obvious.

Although it's really obvious what's happening, I love the "Dan" story. I hope it is not based on actual events :p

I kinda used your technique for my answer (uncommenting some parts to create the function)

Vyxal
Dear Boss,

Quite worryingly, the printer has stopped working. Please bring a hammer, a battleaxe and a potentiometer.

Sincerely,
Joe

Try it Online!
By some miracle, Dear Bo leaves the original input on top. ss sorts it twice, , outputs, Q, halts the program, then the rest is unexecuted.

I'm sorry, but who is Joe?

@exedraj JOE MAMA LMFAO

LiveScript
Try figuring this one out...Been sending him emails like this the whole time to allow for easy, more versatile copy-paste.
# Mr. Boss,
#
#     So, I'm done with this job. It is driving
#     me crazy. We aren't allowed to have *any*
      fun =#(. I am planning on leaving this
#     company while you all poorly attempt to
#     sort all this out. Also, I would like to
#     mention that a specific single bit in the
       sort # for your in-house algorithm gets
#     inverted. Happy hunting while I have fun
#     programming for another company far more
#     grateful than yours.
#
# Best regards,
# Your handy little programmer-turned-secretary.

 1. Its standard library, Prelude.ls, has a native sort function.

 2. Note the two missing hashes (comments). The first is far more obvious than the second.

 It parses as this: "fun = sort", and compiles to this: "var fun; fun = sort;"

By the way, the syntax highlighter is a fail. One of the comments isn't parsed correctly.

JavaScript (ES6)
      (a) => /*----------*\ <= (a)
       |      Announcement      |
  .   (a)    \*----------*/    (a)   .

 sort (/* YOUR DOCUMENTS BEFORE 2/5 )*/

     ($,_) => /*--------*\ <= (_,$)
      |         Warnings         |
 //  (_-$)    \*--------*/    ($-_)  //

      /*( NO SMOKING IN OFFICE */)

Try it online!
Yes, I know the boss likes fancy decorations in his notices so I capitalized the texts and surrounded the texts with fancy symbols :)
PS. Why is the office still using TELNET?

 Actually, removing comments and redundant blanks makes the stuff into (a)=>(a).sort(($,_)=>($-_)), and that's what the stuff intends ;P

05AB1E
Dear Boss‚

I hope I{qualify for this new function. I once again want to sincerely apologize for my earlier secret message.
Thank you for giving me the opportunity to work at this department instead.
I must admit it's hard to resist the urge to write code, but I'll do my best.

Thank you.

Kind regards from your new secretary,
Kevin Cruijssen

Try it online. (TIO uses the legacy version which is a bit faster. Works the same as the new 05AB1E version, though.)
Explanation:
05AB1E code ignores newlines and spaces outside of strings or compressed string/numbers (except when using the (if-)else-statement I just found out in an earlier attempt of making this program.. >.>), so let's do the same in this explanation.
DearBoss‚Ihope # These are all no-ops; they do execute, but won't affect the output:
D              #  Duplicates the (implicit) input-list
 e             #  Calculates the number of permutations of each item in the list
               #  (NOTE: this might time-out depending on the values in the input-list)
  a            #  Check if these numbers are letters (becomes a list of 0s / falsey values)
   r           #  Reverse the items on the stack
    B          #  Base conversion
     o         #  Raise 2 to the power of each number
      s        #  Swap the top two items on the stack
       s       #  Swap the top two items on the stack
        ‚      #  Pair the top two items
               #  (NOTE: This is not a regular comma (,), since that would print the top of
               #   the stack to STDOUT, which we of course don't want here.)
         I     #  Push the input-list again
          h    #  Convert each value to hexadecimal
           o   #  Raise 2 to the power of each integer value
            p  #  Check for each if it's a prime
             e #  Calculate the number of permutations of each item again

I{q            # Then the actual program comes:
I              #  Push the input-list
 {             #  Sort it
  q            #  Stop the program
               #   This makes everything that comes after it no-ops
               #   And will output the top of the stack implicitly as result

Try it online with added debugger-mode to see all this in action.

+1 for being natural.

JavaScript (Node.js)
Attachment => (

`Date: 2019/5/30

Dear my Majestic Boss,

Re: Business Trip to Japan

I'm writing to confirm itinerary for the next trip to Japan will be as follows:

`? (Tennoji, Osaka) => ("Shinsaibashi Tower", Osaka)

|| // Day 1

Tennoji [Osaka, "sort"]
(Hotel = (JPY$14112, Taxed) => `So I will stay here for one night, and I will be charged this price:

`? JPY$14112 + (0 - Taxed)
:`This is the total price and what I will claim afterwards.`

):0) (Attachment)

|| // Day 2

"Shinsaibashi Tower" [Conference, `NOT FOR SHOPPING`]

`I will be coming back on Day 2, so the trip will not cost too much hopefully.

Best regards,
The-former-programmer`

Try it online!
Okay this is an itinerary apparently. Another answer in different direction after one year.

 The really important part is Attachment => (Tennoji => Tennoji["sort"]((JPY$14112, Taxed) => JPY$14112 - Taxed))(Attachment)

Very clever answer, +1

I love how you used a tagged template call at the end.

CJam

Hi; Isaq

\~O~/
 (1)
 @O@
/   \*

*~50 Times!

;;  WINNINGS  ;;
;;            ;;
;;]  $10000O  ;;

p1 is "where Kings sit', according to Shakesphere or someone. All I know is that after 4 straight years
of earning second in the national clown contest, it sure feels great to be on top for once. My clown
ASCII art could use some work, but hopefully I did a solid representation of our troupe. I can't believe
this was the one year you were sick, but we went and earned the $100k in your absence.

See you Monday,

Ethan

'I remain just one thing, and one thing only, and that is a clown." -

Try it online
Apparently my job is at a clown troupe that just won the grand prize, my boss's name is Isaq, and my signature didn't work and forgot to credit Charlie Chaplin.
Notes:

 This was afwul. CJam throws an error on any character that isn't a command or whitespace, or when we try to take input but there isn't any, or you try to do a command but the stack's empty, etc. This means that knruvxylqo is unusable for the actual code (except the one q at the start to load in the array), and emth are also notably difficult. So of the famous rstlne from Wheel of Fortune, we have left... s. English is going to be hard. I'll be explaining what happens on each character, but not really why because there's so much to go through, especially with the clown. (also I don't know why a couple of the things work shh...)

Explanation:

 I tried a few greetings to open us off (Greetings, Hello, etc.) and Hi was the only viable one. The others either threw errors or consumed input. Hi just pushes 17 and makes sure it's an int. The ; then throws that 17 away.

 Isaq gives us ["18"] by pushing 18, stringifying it, and putting it in an array. q then gives us our input array as a string.

 Row one of the clown: \ swaps our two elements. ~ takes "18" out of the array. O pushes an empty string. ~ makes it disappear. / throws away "18" but puts our input string into an array.

 Row two: ( takes our input out of the array, but leaves an empty string before it on the stack. 1 pushes 1. ) increments that 1.

 Row three I brute-forced after writing row 5, because I knew kinda what I needed it to do. @ rotates our array so the input is on bottom and empty string on top, O adds another empty string, and @ rotates it so 2 is on top.

 Row four: / gets rid of the 2, \ swaps the identical empty strings, and * gets rid of one of them.

 Out of the clown now. The next * gets rid of our other empty string, leaving just the input string. Finally, we parse it into a bunch of numbers with ~. 50 Times! ends up just pushing a 50 and a 0 when all is said and done.

 Now into the winnings block. ;; gets rid of our 50 and 0. WINNINGS takes advantage of the fact that CJam doesn't yell at you if you scream at it because capital letters are variables. Unfortunately, that means it also pushes a bunch of junk. The next 8 ;s take care of that.

 We're just back to our input numbers now. We'll use a not-so-sneaky ] to turn them into an array and $ to sort them. We just need to output with p now, but unfortunately for it to make sense we need some money first. We push 10000, plus an O because we need two things for the upcoming semicolons to destroy.

 After a simple p, we've printed our sorted array! It's not much of a letter though. 1 and is are harmless. We start a quote with ", then end it with ' to let us write in English unimpeded. We do the inverse with a quote at the end to close up, and the -throws what we have left on the stack away so it doesn't automatically output. This way, it looks like we intended to attribute the quote, but forgot.

The only person here who knows the name of their boss. :)

Jelly, 91 bytes
Gee Boss,
Go to Starbuck. Whoops, forgot the (sorry for the dot, my keyboard's messed up)
Ṣ

Try it online!

Groovy
'Dear Bossman,
I finally found the formula to calculate the salary for the new employees.
In the salary software just enter the following:'
print "${(args.toList()*.toInteger()).sort()}"'
Sincerely,
Employee'

You're not supposed to be writing code. That's code.

@ZekeSonxx I thought the question was to hide the code either in plain sight or in the text, right ? :)

I quite like this one. It's just hiding the code in plain sight.

@kuroineko The idea was to make it look like MS Excel's formula. :)

LOL you should put "I've found the Excel formula" then. Though I'm quite familiar with Excel, the reference never crossed my mind.

@kuroineko Excel formulas dont have such a programmy syntax, do they?

Well not really, but who says your boss knows what they look like? :)

8 upvotes and 9 downvotes? Wow; this is controversial.

Oh my god someone else uses groovy here, now we can lose together :)

@Ypnypn it's now at +12/-12

+12 -12 now. wow.

Excel
=LET( me, say that I understand your decision.  I was hoping to work our issues, out, B4#,
things, got so out of control. I hope we can as Boss and, Programmer, SORT(out), our,
issues and work better together in the future,

Sincerely,
John Smith, Programmer)

Zsh
I don't know whether the code or the creative writing was harder.
: RE: The state of the evaluation process; eval `#problems'

: While I appreciate your enthusiasm, going to `print `
: this for the world to see isn't helpful in the long run.
: Please, don't make any more enemies than you already have.
:
: > People seem to just want that `'$'`: It's a big problem
: > which needs to be resolved. People need to buy into the
: > company's team-based philosophy `'{'`: ... ''}''
:
: While I do not deny that people "just want that '$'",
: I absolutely disagree that it's a _bad_ thing. Employees
: should not be guilty for wanting to leave for greener
: pastures, so you should try and provide _some_ incentive
: to stay.
:
: > And yet everyone want's to just check "(y)" or `'(n)'`
: > without giving _any_ further feedback... You're too LAZY!
:
: I want to stop you here. Accusations like this against my
: team are _not_ to be tolerated. We do a _lot_ behind the
: scenes which you _clearly_ aren't aware of. Please refrain
: from `'@-ing'' any of my team, and think with a bit more
: empathy next time, thank you.

-- Gamma :-}'

Try it online!

 Note: This will create files named "People" and "without" in the directory it is run from.

 From the first line, you can see the eval, followed by backticks.

 # comments continue to end-of-line, stopping quotes or backticks from being resolved, so we use : no-ops to indent.

 The standard pattern we make use of throughout this is

`: lots of filler text....
: more filler text, then an important `'X'`
: back to the garbage

 At the end is one exception: Everything from @-ing to the last } is not no-op'd.

 When the substitution has finished, it reads: eval print $'${(n)@-ing any of my team, and think with a bit more\n: empathy next time, thank you.\n\n-- Gamma :-}' The garbage after the @ does nothing, so this is equivalent to print ${(n)@}, which is simply a numeric sort of the parameters.

Ly
Dear BOss Ma&n.

    That jOb P&uts me in one of the best
    emotions that I've ever had!

    As for my recent incident, I promise that I
    will never touch code ever again. Thanks a
    lot for allowing me to be a secretary instead
    of firing me!

Your faithful secretary,
petStorm

Try it online!

JavaScript

/*
I always start my letters with /* because it means "slashstar", a great name for a weapon.
So in case you forgot what an asterisk was, */asterisk/*is used as a sidenote in papers, and the function it serves */=/*is to get on your nerves when I write */papers/*. You made me a secretary */=>/* I really enjoy my job. Now, I need to sort the */papers/* in order because you like neat and tidy things. So I made a method */./* A guide to */sort/*ing follows: Start by finding the first paper */(/*the one on top), and then find the next one, */(/*wh*/a/*tever follows*/,/* nothing else.
Then compar*/e/* them and place the longer one on top.
Next, repeat (the process I told you before*/)/* */=>/* you should already see a clear pattern emerging. One of the best ways to compare, if you like automation, is */a-e/*, this returns the difference in characters.
In the end, (having gone through all the papers*/)/*, you should have a sorted pile of papers.

Regards,
Secretary ;(
*/

A secretary who seems to enjoy his job on the outside gives his boss a method of sorting his messy pile of papers in an attempt to get his coding job back.

Hmmm... mystery: the snippet worked when I posted the answer but now it gives an error...

Fixed now........

Pyth
Dang those bounce back emails, I've been broke ever since the boss started charging us for every mistype. And he wonders why I wanted to quit in the first place...
De$tination_unreachable:"Reason message:\
Couldn't find the address theboss@company.xom\
Company email servers charge for wasted electricity on bounce back emails:\
In this case, the charge was " $ 596.42; "\
Remember, this charge is employee specific, so make sure it doesn't happen again :3\
Please be more careful when typing your email addresses in the future.\

If you would like to refute this charge, your transaction ID is: " pSSQhaYk ";

Javascript
s=/*  <k6cM   L    zE0        2]B^   cyF   #hq%  m(xg
[   ; u      e &  &   V       1   + T   H h     =
$   T }cJF* H7Yj} *&P8        n^D>  N   ;  0O+   [G{
<   s >     w   < S  8        (   Q !   2     9     2    {
Ya8u  qf]?H Z   J 6   5       sRvz   **/  x=>x  //yE    c

.sort         (   (   a         ,          be)   =>a   -be   )/*(  DM@    r   E   v ]   9 g0$wh  QBD
  0          { 1  3x EK        $ f        D   9 a   I 3   D P     @   !  > *  %6 hd I{ 9D {     *   %
  P         )Di!D N x #       h%8>f       rM;5  }2d]  @   b g  =+ hTJ}  $;yC? H z s V S 1 U{zBV ;SRV
  i         a   s G   4       Q   {       3     G  T  c   H z   l r  8  Z   | a   0 *   T C     S  9     p
+0oUy       1   I t   8       B   ^       w     h   +  O?P   #%4  {   ] l   Z D   M [   W LPTIx L   *   K

r   ]  ffv  ]3DUs         p          0u1l Q-*:a  -E{   ssD  0uLoS Aw@77   j    ^QU  V   @
sF  G 6   1   f          A J        n     n     &   * +   I m       L    n 5  y   O  % h
C x N !   j   k         =)fy9        g]Y  ;fvcN V     R;0D  (1wy+   d   QrXc7 +@c}    X
{  f+ o   W   z         |   5           } -     r   P $  %  J       t   B   1 C  z    C
>   f  cVR    l         1   K       [5Vw  mvQ2g  j[K  +   # g2G-)   -   W   L f   (   J     H

WhA|F        6fi  }   F 0T4AI jmx#I       e   D  <tG  O   z
  H         W   ( I   4   W     M         TZ  Z *   r z   e
  ]         g k W <   q   X     1         { Y r p   } t   Z
  9         M  (  a   i   G     e         >  s{ 4   ^ 2 9 n
Y9S=y        xc $  1P|  gOnp*   Q         0   b  s#P   [*/

Maybe he likes art? I mean, it's almost readable...

 When comments and whitespace are removed you get s=x=>x.sort((a,be)=>a-be) and that's all that matters.

Jelly
Dear Boss,
    One of the apps on the electronic is not working. I need this to be fixed ASAP.

Thanks,
    MarṢ

Try it online!

C#
// Dear Boss Man,
/*i have a */public/*shed a*/ List /*of*/ <string>/*s
to*/ Sort /*for you on our internal website
please take a look at the */(List /*of*/ <string>/*s and*/ check){
/*them for company restrictions. please also */check /*the */.Sort();/*ing of the     list*/
/*furthermore could you please */return /*an email to me in which you state your */check/*ing state*/;}

// sincerely your slave Rob

My god that's hard to read...

Looks too codey.

Obvious comments :) The first line reads public List <String>, without a lot of hassle :)

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Hotter or Colder: Find the Treasure
A certain children's game, often called "Huckle Buckle Beanstalk", is played with two players. Here is a brief description of how the game is played:

One player is designated the "hider", and the other the "seeker".
The seeker goes out of the room while the hider hides a small, pre-selected object, the "treasure".
The hider then attempts to look for the object while the seeker gives them helpful hints:

If the seeker is approaching the treasure, the hider will call out "warmer!"
If the seeker is moving away from the treasure, the hider will call out "cooler!"

Once the seeker finds the treasure, they announce that they have found it.

Your children want you to play this game with them, however, you are very busy answering questions on codegolf.SE instead. So, you decide to write a program to play the game with them. However, you want to use as little time as possible typing, so you try to make the program as little characters as possible.
We can define the room in which the game is played as a two dimensional toroidal square field. The coordinate 0,0 is the bottom left corner, and the coordinate 99,99 is the top right corner. The treasure is placed at some position n,m where n and m are both positive integers between 0 and 99 inclusive.
Your program will obtain input from the player using its inbuilt user input function (e.g. prompt(), raw_input(), etc.) If your chosen language does not have a user input function, take input from STDIN instead. The game will work as follows:

The program "hides" the treasure at a position n,m.
The program prompts the seeker to input an initial searching position. The input will come in the form x y where x and y are positive integers.
The program outputs "correct" if the initial searching position x,y is equal to the treasure's position n,m and terminates. Otherwise:
The program will prompt the seeker to move. The input comes in the form a b where a and b are integers that may be negative. This represents the direction vector that the seeker is moving in (a is the x direction and b is the y direction).
If the resultant position of the seeker is at the treasure, the program outputs "correct" and terminates. Otherwise:
The program outputs "cooler" if the seeker is moving away from the treasure, or "hotter" if they are moving towards the treasure.
Go to step 4.

The words "moving away" and "moving towards" may be ambigious. For this challenge, if the resultant position of the seeker after moving is closer to the treasure than their position before they were moving, they are moving towards the treasure. Otherwise, they are moving away. (Yes, this does mean that if the resultant and previous position are the same distance away, the program should output "cooler").
This is code golf, so shortest code wins. Ask questions if the specification is not clear.

Do the input prompts need to contain any text/question? If so, please specify it.

I've seen this game played many times on TV and have done it a few times myself, but never have I heard the term "Huckle Buckle Beanstalk".

@Martin No, there doesn't need to be any text.

What norm should we use to determine distance?

@COTO Magnitude of the vector between the two positions.

And are n and m determined randomly at the start of the program, or are they inputted by the user as well?

@COTO n and m are random.

Does the magnitude need to be determined exactly? i.e. do we need to use rational numbers or equivalent maths, or is it fine if we accidentally report "hotter" due to floating point inaccuracies?

@MartinBüttner: I don't think that's possible with a 100x100 grid. All possible distances are either exactly equal or sufficiently far apart to be immune to floating point error. Plus, you can compare the magnitude squared of vectors, which doesn't require any non-integer operations.

@Martin Floating point is fine.

@COTO I was thinking you might get problems because you can get the same distance with different coordinate pairs, but since the squared distance is determined in integers that's not a problem either.

@MartinBüttner The question is whether there exists some set of grid points x,y,w,z where x^2 + y^2 <> w^2 + z^2 but sqrt(x^2+y^2)-sqrt(w^2+z^2) < 1 ulp. I don't believe there's any such set for a 100x100 grid. It would make an interesting mathematical challenged to find out the smallest grid where such a set did exist. ;)

What should happen when the user tries to move out of bounds?

@ipi The field is toroidal, i.e. they'll wrap around to the other side of the field.

See http://stackoverflow.com/questions/8631238/how-to-make-a-toroidal-array

Also regarding the input, I'm confused by your use of the word direction. If x = 10 would a = 5 result in x = 15 or x = 11? i.e. does the player only move a maximum of one space upon an axis?

@ipi x = 10 + 5 = 15

The moves wrap around, but what about the distance computation? Is the distance between (0,0) and (99,99) equal to 1 or 99·√2?

@Tobia Either system is acceptable.

Javascript, 275 279
Not a winner by any means, but this should get things started. Uses a trick with eval() and defining 100 as a "constant" to shave off a few bytes. Ungolfed version below.
function D(){return Math.sqrt((x-n)*(x-n)+(y-m)*(y-m))}
H=100;
n=~~(Math.random()*H);m=~~(Math.random()*H);
P="s=prompt().split(' ')";
eval(P);
x=~~s[0];y=~~s[1];i=0;
while(x!=n||y!=m)
{
    if(i)alert(i>j?"hotter":"colder");
    i=D();
    eval(P);
    x=(x+~~s[0])%H;
    y=(y+~~s[1])%H;
    j=D()
}
alert("correct")

Edit: I fell victim to Javascript's string + number operations, hence why D() wasn't working properly. I also fixed a bug where "hotter" was displayed before "correct". This adds 4 bytes.

why use semicolons?

If n and m are both set to zero (for testing purposes), and 0 1 is entered as the initial position, both 0 -1 and 0 1 return colder.

In the for loop why do you have new lines? Put all of the code on one line and you can save 22 characters (maybe more).

This is the ungolfed version. The original version is all on one line (275 characters long).

javascript joke colder == cooler

Groovy - 278 266 262
Golfed:
def x,y,n,m,d,D=999,S=100,r=newScanner(System.in);n=Math.floor(Math.random()*S);m=Math.floor(Math.random()*S);while(true){x=r.nextInt();y=r.nextInt();d=Math.sqrt((x-n)**2+(y-m)**2);if(d==0){print"Correct";break;}else if(d<D){print"Cooler"}else{print"Hotter"}D=d}

Ungolfed:
def x,y,n,m,d
def dist = 99999
def r = new Scanner(System.in)
def S = 100
n = Math.floor(Math.random()*S)
m = Math.floor(Math.random()*S)
println "Treasure is at: $n $m"
while(true){
    x = r.nextInt()
    y = r.nextInt()
    d = Math.sqrt((x-n)**2+(y-m)**2)
    if(d == 0){print "Correct"; break;}
    else if(d > dist){print "Hotter" }
    else{print "Cooler"}
    dist = d
}

Trial:
-1 -1
Cooler 12 12
Cooler 14 14
Cooler 13 13
Hotter 15 15
Cooler 90 55
Cooler 95 -100
Hotter 95 83
Correct

Can you please document some sample runs of this solution in action? I believe Math.sqrt((x-n2)+(y-m2)) returns NaN when x<n, y<m .

Yes, sure. As soon as I get home :)

Cool... Note: as I understand the OP, the initial input is an absolute position, and subsequent inputs are relative. Also, the grid wraps around (toroidal). I don't see how this works, as-is, and am surprised it received an upvote.

@MichaelEaster Please check the edit. Let me know if I have done anything wrong :)

I've posted my solution, as I understand the problem. I can't comment on yours but will let the voters decide :)

Python 3 - 238 bytes

Code:
from random import*
r=randint;a=100;X=r(0,a);Y=r(0,a);d=0;F=lambda:((X-x%a)**2+(Y-y%a)**2)**0.5;i=lambda:map(int,input().split());x,y=i()
while F():
 if d:print(["cooler","hotter"][d<D])
 D=F();Z,K=i();x+=Z+a;y+=K+a;d=F()
print("correct")

Ungolfed:
from random import*

treasure_x = random.randint(0,100)
treasure_y = random.randint(0,100)
distance = lambda:((treasure_x - x % 100) ** 2 + (treasure_y - y % 100) ** 2) ** 0.5
x, y = map(int, input("Coordinates in the form x y: ").split())
new_distance = 0

while distance():
    if new_distance:
        if new_distance < prev_distance:
            print("hotter")
        else:
            print("cooler")
    prev_distance = distance()
    dx, dy = map(int, input("Move in the form dx dy: ").split())
    x = (dx + x) % 100
    y = (dy + y) % 100
    new_distance = distance()

print("correct")

Sample run:
$ python hotter_colder.py
50 50
10 0
cooler
-10 0
hotter
-10 0
hotter
-10 0
hotter
-10 0
hotter
-10 0
cooler
5 0
hotter
1 0
hotter
1 0
hotter
1 0
hotter
1 0
hotter
1 0
cooler
-1 0
hotter
0 10
cooler
0 -10
hotter
0 -10
hotter
0 -10
cooler
0 5
hotter
0 1
hotter
0 1
correct

I won't say that my strategy in finding the treasure is particularity fast...

Groovy - 343 chars
Derived somewhat from LittleChild's answer.
Golfed:
z=100
f={Math.floor(Math.random()*z)}
h={println it}
r=new Scanner(System.in)
i={r.nextInt()}
n=f();m=f();x=i();y=i();p=z;a=0;b=0
g={(Math.abs(it))**2};o={i,j->(j<0)?(((i+j)<0)?(((i+j)+z)%z):(i+j)):(i+j)%z};u={Math.sqrt g(n-x)+g(m-y)};d=u()
while(d>0.1){if(d<p){h "Hotter"}else{h "Cooler"};a=i();b=i();x=o(x,a);y=o(y,b);p=d;d=u()}
h "Correct"

Ungolfed:
z=100
f={Math.floor(Math.random()*z)}
h={println it}
r=new Scanner(System.in)
i={r.nextInt()}

n=f();m=f()
x=i();y=i()
p=z;a=0;b=0

g = {(Math.abs(it))**2}
o = {i,j->(j<0)?(((i+j)<0)?(((i+j)+z)%z):(i+j)):(i+j)%z}
u = {Math.sqrt g(n-x)+g(m-y)};d=u()

while (d>0.1) {
    if (d<p) { h "Hotter" } else { h "Cooler" }
    a=i();b=i()
    x=o(x,a);y=o(y,b)
    p=d;d=u()
}
h "Correct"

Sample run, where program emits the target for illustration. From my understanding of OP, the initial input is absolute, and subsequent inputs are relative. Also, the grid wraps around.
run A:
bash$ groovy X.groovy
goal 98.0 19.0
1 19
Hotter
-1 0
Cooler
-1 0
Hotter
-1 0
Correct

run B:
bash$ groovy X.groovy
goal 93.0 20.0
90 16
Hotter
2 2
Hotter
1 0
Hotter
0 -18
Cooler
0 -1
Cooler
0 -1
Hotter
0 -79
Hotter
0 1
Correct

Glad that my code be of use to you! thumbs up :)

APL, 86 chars
h←?2⍴s←100⋄1{h≡n←s|s+⍵+⎕:⎕←"correct"⋄⍺:0∇n⋄⎕←(</+/⊃×⍨n⍵-¨⊂h)⌷"cooler" "hotter"⋄0∇n}0 0

Distance computation doesn't wrap around, but moves do.
Ungolfed:
h←?2⍴s←100                  ⍝ generate random starting point
1{                          ⍝ loop starting with ⍺←1 (1 if first loop) and ⍵←0 0 (position)
    n←s|s+⍵+⎕               ⍝ n←new position, ⍵ plus the move read from input, modulo 100
    n≡h: ⎕←"correct"        ⍝ check for end condition
    ⍺: 0∇n                  ⍝ if first loop, skip the rest and ask for a move again
    t←</+/⊃×⍨n⍵-¨⊂h         ⍝ t←1 if n is closer to h than ⍵ (squared distance)
    ⎕←t⌷"cooler" "hotter"   ⍝ output thermal gradient label
    0∇n                     ⍝ loop with new position
}0 0

Example:
⎕:
      22 33
⎕:
      2 6
hotter
⎕:
      0 1
cooler
⎕:
      0 ¯3
correct

Python 2.7, 227
from random import*
r=randint
h=100
n=r(0,h)
m=r(0,h)
i=lambda:map(int,raw_input().split())
x,y=i()
d=lambda:(x%h-n)**2+(y%h-m)**2
e=d()
while e:
 p=e;a,b=i();x+=a;y+=b;e=d()
 if e:print e<p and'hotter'or'cooler'
print'correct'

I got the input function and the idea of applying the modulo in the distance calculation rather than the location update from matsjoyce's answer.
We only need distances for comparisions: Are we at the exact location? Are we closer than before? For both of these, we get the same result comparing the squares of the distances as we would comparing the distances. The square-root calculation required to get the actual distance is unnecessary.
Ungolfed:
import random

h = 100 # height (and width) of the square grid

# location of item
n = random.randint(0, h)
m = random.randint(0, h)

def input_pair():
    return map(int, raw_input().split())

x,y = input_pair()

def distance_squared():
    return (x % h - n)**2 + (y % h - m)**2

er = distance_squared()
while er:
    previous_er = er
    a,b = input_pair()
    x += a
    y += b
    er = distance_squared()
    if er:
        print 'hotter' if er < previous_er else 'cooler'
print 'correct'

Sample run:
50 50
20 0
hotter
20 0
cooler
-20 0
hotter
10 0
cooler
-10 0
hotter
-1 0
hotter
-1 0
hotter
-5 0
cooler
5 0
hotter
-1 0
cooler
1 0
hotter
1 0
cooler
-1 0
hotter
0 10
hotter
0 10
hotter
0 10
cooler
0 -5
hotter
0 -1
hotter
0 -1
hotter
0 -1
correct

The trick with the squares, ignoring the square root step, is very clever. +1

ECMAScript 6, 262
Z=100;A=Math.abs;P=(a,b)=>(q=Math.min(A(a-b),Z-A(a-b)),q*q);G=_=>prompt().split(' ');R=_=>new Date%Z;V=_=>P(X,I)+P(Y,J);I=R();L=G();X=+L[0];Y=+L[1];J=R();for(D=V();D;D=N)T=G(),X=(+T[0]+Z+X)%Z,Y=(+T[1]+Z+Y)%Z,N=V(),N&&alert(N<D?"hotter":"cooler");alert("correct")

Ungolfed:

Z=100;
M=Math.min;
A=Math.abs;
S=a=>a*a;
P=(a,b)=>S(M(A(a-b),Z-A(a-b)));
G=_=>prompt().split(' ');
R=_=>new Date%Z;
V=_=>P(X,I)+P(Y,J);
I=R();
L=G();
X=+L[0],Y=+L[1];
J=R();
for(D=V();D;D=N)
    T=G(),
    X=(+T[0]+Z+X)%Z,Y=(+T[1]+Z+Y)%Z,
    N=V(),
    N&&alert(N<D?"hotter":"cooler");
alert("correct")

JavaScript ES6, Latest Firefox, 177 173 164 characters
Obviously, this cannot beat the APL one. That language is crazy! Maybe developed solely for code-golf questions :D :P
But here goes my solution in ES6 JavaScript. Run it in latest Firefox Nightly (or may be release version too) in the Web Console or Scratchpad.
A=a=>a*a;a=alert;g=v=>[x,y]=prompt().split(" ");r=v=>Math.random()*100|0;n=r(m=r(d=0));D=v=>A(n-x)+A(m-y);while(d=D(g(l=d)))l&&a(l<d?"hotter":"cooler");a("correct")

I'd like to skip the ungolfed version for now. Comment if you want to see the ungolfed version :)
EDIT : Golfed a lot! reduced 9 characters. Still seeing if further scope of golfing.

C 193 176 171
#define F x*x+y*y
x,y,a,b,d;main(){srand(time(0));x=rand();y=rand();while(scanf("%d %d",&a,&b),x-=a,x%=100,y-=b,y%=100,puts(F?F<d?"hotter":d?"cooler":"":"correct"),d=F);}

I'm sure there must be savings on the random number generation.  Apart from that the key point is that reading in x & y is just treated as an offset from 0, so I only need one scanf.  It does mean that I have to suppress printing hotter or cooler on the first iteration though.
Changes:
Put the location into x & y directly and then shift this back to (0,0) rather than put it in m & n and use x & y to search for it.
I realised that I was printing "hotter" and "correct" so I had to add an extra three characters here.
Rewritten the printing to put all conditions in it, saving an extra call to puts().

Python 226
from random import randint as r
x=r(0,100)
y=r(0,100)
l=9**9
while True:
    i,j=map(int,raw_input().split())
    if x==i and y==j:
        print 'correct'
        break
    c=(x-i)**2+(y-j)**2
    if c<l:print 'warmer'
    elif c>l:print 'colder'
    l=c

That import looks really long and stupid, but it actually saves me 8 chars. :D
Example game:
50 50
warmer
50 75
colder
50 25
warmer
50 13
colder
50 37
colder
50 20
warmer
50 21
warmer
50 22
warmer
50 23
warmer
50 24
warmer
50 26
colder
50 25
warmer
25 25
colder
75 25
warmer
74 25
warmer
62 25
warmer
61 25
warmer
55 25
colder
56 25
warmer
57 25
warmer
58 25
warmer
59 25
warmer
60 25
warmer
61 25
warmer
62 25
colder
61 25
warmer
61 24
correct

194 bytes

Sinclair /ZX Spectrum BASIC - 305 bytes
10 RANDOMIZE:LET o=99:LET a=INT(RND*99)+1:LET b=INT(RND*99)+1:PRINT a,b
20 INPUT "sx,sy:";c,d
30 LET g=SQR(ABS(a-c)^2+ABS(b-d)^2)
40 PRINT g'c,d
60 IF g=0 THEN PRINT "Found!":STOP
70 INPUT "mx,my:";x,y:LET c=c+x:let d=d+y
80 PRINT ("hotter" AND g<o)+("colder" AND g>o)
90 LET o=g:GOTO 30

As the Spectrum stores each keyword as one byte, it helps keep the size down.
After it's been entered, found out the size with
print "bytes:";peek 23641+256*peek 23642-(peek 23635+256*peek 23636)+1

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Drawing in Slashes
Write a program that takes in a rectangular block of text made up of X's and .'s, such as this rough A:
......
..XX..
.X..X.
.XXXX.
.X..X.
.X..X.

Output a representation of this grid rotated 45 degrees counterclockwise by drawing a slash — forward or backward depending on context — everywhere an X borders a . or the side of the grid (with spaces filling in the rest):
 /\/\
/ /\ \
\/ /  \
/\/ /\ \
\  /  \/
 \ \
  \ \
   \/

The number of trailing and leading spaces (and newlines) doesn't matter as long as the shape of the X's in the input is maintained by the slashes. It's ok to trim extra rows or columns of .'s.
For I/O you may use any combination of stdin/stdout/files/command line parameters. For example your script might take in a file name of the X. pattern and rewrite the file with the slash pattern. Or your script might take in the X. pattern from stdin line by line (pressing d when done) and output the result to stdout.
The input may be arbitrarily large, but you may assume it is always well formatted.
No characters besides / \ and newlines should be in any output.
Scoring
The shortest code in bytes wins. Use https://mothereff.in/byte-counter as a byte counter if you use non-ASCII characters.
Bonus: Minus 50 bytes if you can change (replace, not remove) one character in your program so it outputs the slash grid rotated 45 degrees clockwise, e.g.:
   /\/\
  / /\ \
 /  \ \/
/ /\ \/\
\/  \  /
    / /
   / /
   \/

Input Samples
XXXXXXXXX
X.......X
X.XXXXX.X
X.X...X.X
X.X.X.X.X
X.X...X.X
X.XXXXX.X
X.......X
XXXXXXXXX

XXX...XXX....XXX...XXX
X..X..X..X..X.....X...
XXX...XXX...X.....X.XX
X.....X.....X.....X..X
X.....X......XXX...XXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...X
X...X...............X...............X...........X...................X...X
X...X...XXXXXXXXX...X...XXXXX...XXXXXXXXX...XXXXX...XXXXX...XXXXX...X...X
X...............X.......X...X...........X...........X...X...X.......X...X
XXXXXXXXX...X...XXXXXXXXX...XXXXXXXXX...XXXXX...X...X...X...XXXXXXXXX...X
X.......X...X...............X...........X...X...X...X...X...........X...X
X...X...XXXXXXXXXXXXX...X...X...XXXXXXXXX...XXXXX...X...XXXXXXXXX...X...X
X...X...............X...X...X.......X...........X...........X.......X...X
X...XXXXXXXXXXXXX...XXXXX...XXXXX...X...XXXXX...XXXXXXXXX...X...XXXXX...X
X...........X.......X...X.......X...X.......X...........X...X...........X
X...XXXXX...XXXXX...X...XXXXX...X...XXXXXXXXX...X...X...X...XXXXXXXXXXXXX
X.......X.......X...X...X.......X.......X.......X...X...X.......X.......X
XXXXXXXXXXXXX...X...X...X...XXXXXXXXX...X...XXXXX...X...XXXXX...XXXXX...X
X...........X...X...........X.......X...X.......X...X.......X...........X
X...XXXXX...X...XXXXXXXXX...XXXXX...X...XXXXX...XXXXX...XXXXXXXXXXXXX...X
X...X.......X...........X...........X.......X...X...X...............X...X
X...X...XXXXXXXXX...X...XXXXX...XXXXXXXXX...X...X...XXXXXXXXXXXXX...X...X
X...X...........X...X...X...X...X...........X...............X...X.......X
X...XXXXXXXXX...X...X...X...XXXXX...XXXXXXXXX...XXXXXXXXX...X...XXXXXXXXX
X...X.......X...X...X...........X...........X...X.......X...............X
X...X...XXXXX...XXXXX...XXXXX...XXXXXXXXX...XXXXX...X...XXXXXXXXX...X...X
X...X...................X...........X...............X...............X...X
X...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

(maze source)
Related Questions:
Draw the Hilbert curve using slashes
Align a horizontally-aligned, right-angled ASCII shape along a diagonal

Is replacing the single character with a whitespace character (or a whitespace to a symbol) acceptable?

@hexafraction Sure

What we need is someone to answer this in itflabtijtslwi. Then we'd have "Drawing in Slashes in Slashes."

Python 2 - 236, 228, 226, 221, 250, 248 246 - 50 = 196
s=input().split()
s=zip(*s[::-1])
X=len(s[0])+2
d=('.',)
B=[d*X]
s=B+[d+tuple(l)+d for l in s]+B
Y=len(s)
for x in range(X,-Y,-1):print' '*abs(x)+''.join(' \\'[s[y-1][x+y-1]!=s[y-1][x+y]]+' /'[s[y-1][x+y]!=s[y][x+y]]for y in range(1,Y)if 0<x+y<X)

I added the optional bonus feature that switches the direction from clockwise to counterclockwise. Basically, the second line simply rotates the input by 90 degrees. To switch between both options, replace s=zip(...) by something like S=zip(...) (i.e. assign to a variable that won't be used again).
.XX.X....X...XX.X.X
X...X...X.X.X...X.X
.X..X...XXX..X..XXX
..X.X...X.X...X.X.X
XX..XXX.X.X.XX..X.X

                 /\           /\/\
                 \ \          \/\ \
               /\ \ \         /\ \/
               \ \/  \     /\ \/   /\
             /\ \  /\ \    \ \/\  / /
            / /  \ \ \/     \/\/ / /
            \/    \ \           / /
            /\/\/\ \/          / /
            \/\/\/             \ \    /\/\
        /\/\    /\              \ \  / /\/
        \/\ \  / /               \/ /  \/\
        /\/  \ \/                  / /\  /
        \  /\ \                    \/ / / /\/\
         \ \ \/                      / /  \/\ \
   /\     \ \                        \/   /\ \/
   \ \     \/                          /\ \/   /\
 /\ \ \  /\                            \ \/\  / /
/ /  \ \/ /                             \/\/ / / /\
\/    \  /                                  /  \/ /
/\/\/\ \/                                  / /\  /
\/\/\/                                     \/ / /
    /\                                       / /
   / /                                       \/
   \/

You could save 5bytes by sandwiching s with B by s=B+s+B.

@BeetDemGuise: Thanks! That's so much easier! :)

MATLAB - 286 - 50 = 236
Minified:
S=input('');x=rot90(reshape(input('','s'),S),1);S=size(x);D=sum(S);[r,c]=ind2sub(S,find(x==88));A=zeros(D);f=@(o,p)sub2ind([D D],r+c+o-1,c-r+S(1)+p);A(f(1,1))=1;t=f(0,0);A(t)=A(t)+1;A(f(1,0))=3;t=f(0,1);A(t)=A(t)+3;fprintf('%s',char([(1-mod(A,2))*32+(A==1)*47+(A==3)*92,ones(D,1)*13]'))

Expanded:
S = input('');
x = rot90( reshape( input('','s'), S ), 1 );
S = size( x );
D = sum( S );
[r,c] = ind2sub( S, find( x==88 ) );
A = zeros( D );
f = @(o,p) sub2ind( [D D], r+c+o-1, c-r+S(1)+p );

A(f(1,1)) = 1;
t = f(0,0); A(t) = A(t)+1;
A(f(1,0)) = 3;
t = f(0,1); A(t) = A(t)+3;

fprintf( '%s', char( [(1-mod( A, 2 ))*32 + (A==1)*47 + (A==3)*92, ones( D, 1 )*13]' ) )

The code can be further reduced by 6 characters (to tie the current lead) by eliminating the cast to type char, but this results in a warning from MATLAB, and I wasn't sure if that was allowed.
It can be reduced by an additional 13 characters if the input is required to have a "marked up" format such as ['X..';'.X.';'..X'], but I didn't figure this was allowed either. Currently the script just accepts two numbers (row and column dimensions) and then reads in a single string of grid characters.
Bonus
By changing the 1 in the call x = rot90( ..., 1 ); to a 0, the transformation changes from a CCW 45° rotation to a CW 45° rotation. In fact, all possible 45° + n·90° rotations are possible by stepping this parameter from 0 to 3.
Sample Outputs:
XXX...XXX....XXX...XXX
X..X..X..X..X.....X...
XXX...XXX...X.....X.XX
X.....X.....X.....X..X
X.....X......XXX...XXX

                     /\
                    / /
                   / / /\
                   \/ /  \
                   /\ \/\ \
                   \ \  / /
               /\   \ \/ /
              / /    \/\/
             / /
             \/
             /\    /\
             \ \  / /
              \ \/ /
        /\/\   \/\/
       / /\/
      / / /\
      \ \/ /
       \  /
        \ \
  /\/\   \ \
 / /\/    \/
/ / /\
\ \/ /
 \  /
  \ \
   \ \
    \/

    /\
   /  \
  / /\ \
 /  \ \/
/ /\ \/\
\/  \/\/
          /\
         /  \
        / /\ \
       /  \ \/
      / /\ \/\
      \/  \/\/

               /\/\
              / /\ \
             / /  \ \
             \/    \/
             /\
             \ \
              \ \    /\/\
               \/   / /\ \
                   / /  \ \
                   \/ /\ \/
                   /\ \ \
                   \ \/ /
                    \  /
                     \/

Perl - 409
while(<>){$a[$.]=[/./g]}$l=$#a<($g=@{$a[1]})?$#a:$g;$r=$#a+$g-1;for$d(1..$r){for$e(1..$l){if(($b=$a[$c=($d>$g?$d-$g:0)+$e][$n=-($d-$c+1)])&&$n<0){$h[$d][$e]=$b;}}$h[$d]=[(0)x(($l-{@$h[$d]})/2),@{$h[$d]}];}sub z{"\0"x((reverse(1..$g),(2..$r-$g+1))[int($q++/2)-1]).join'',map{$_ eq'X'?($q%2?'/\\':'\/'):"\0\0"}@_}@i="\0"x2x$l;for$f(@h){$i[$#i]=(z@$f)^$i[$#i];$i[$#i+1]=z@$f}for$j(@i){print$j=~s/[\0s]/ /gr."\n"}

Reads from stdin and prints to stdout.
Example outputs:
XXX
X..
XXX
..X
XXX

     /\
    / /
   / / /\
   \ \/  \
    \  /\ \
     \/ / /
       / /
       \/

XXXXXXXXX
X........
X.XXXXXXX
X.X.....X
X.X..X..X
X.XXXX..X
X...X...X
XXXXXXXXX
           /\
          / /
         / / /\
        / / /  \
       / / / /\ \
      / / / /  \ \
     / / / /    \ \
    / / / / /\   \ \
   / / / /  \ \  / /
   \ \ \ \  / / / /
    \ \ \ \/  \/ /
     \ \ \  /\  /
      \ \ \/ / /
       \ \  / /
        \ \/ /
         \  /
          \/


text:
Shortest code to throw IllegalArgumentException in Java
Okey, we all know the normal way to throw a IllegalArgumentException in Java:
throw new IllegalArgumentException(); // 37 characters

But there must be a shorter (as in less characters) ways to do so.
How can we produce a java.lang.IllegalArgumentException with even less code?

The code fragment has to compile and run in java 7.
No imports/external packages (e.g. not using java.util.Arrays.toString() )

only exception: java.lang because it is automatically imported.

You can add own
methods/classes.
It must throw a java.lang.IllegalArgumentException

Edit: the error output (stacktrace) must name it java.lang.IllegalArgumentException, so no subclasses of it.

To have a base to start from:
class Titled {
    public static void main(String[] args) {
        throw new IllegalArgumentException();
    }
}

These were all found by grepping the source code in the package java.lang.
All of them result in a "pure" IllegalArgumentException (i.e. not a subclass of it).
The ones marked * only work if you add " throws Exception" (18 characters) to your main declaration, as they throw a checked exception of some kind.
12 (30?) characters*
"".wait(-1);

This will result in:
java.lang.IllegalArgumentException: timeout value is negative

22 (40?) characters*
new Thread().join(-1);

22 characters
Character.toChars(-1);

30 characters
Character.UnicodeBlock.of(-1);

No, it will not compile because it can throw a InterruptedException.

The compiler will error: unreported exception InterruptedException; must be caught or declared to be thrown

@luckydonald Hm, it does? I tested it on Ideone and it seemed to work.

Whoops, Ideone automatically adds throws Exception to the main method. I've added a note in my post.

Ideone tends to automatically add  throws java.lang.Exception which will allow the InterruptedException to pass the compiler. (Also Ideone imports java.util.* and java.io.*)

Mwhahaha! I managed to find my IllegalArgumentException by memory. No need for tools like grep. Except the changed rules make it invalid. :-(

@Quincunx sorry about that. But it is still an nice way.

Is 1.wait(-1) legal in Java? In C# it is.

@usr No; primitives aren't objects in Java.

You can get to eleven characters by renaming args to a and using a.wait(-1) instead.

I thought it was illegal to wait on an object unless you owned the object's monitor, via synchronized. (In this case, it could actually matter, too, since the object representing "" is actually the same object representing every other empty string literal.)

Here's a nice short way to do it, in 17 13 chars:
new Long("");

It throws a NumberFormatException, which is an IllegalArgumentException. This and this verify it.
Equivalently, one could do
new Byte("");

Sorry, clearified what I am looking for: I am looking a for 'clean' IllegalArgumentException. It should name it so.

@luckydonald what do you mean by "naming"? The type given in the stacktrace? If so, would an exception-with-cause be acceptable if the IllegalArgumentException was passed internally as the cause to another exception?

The purpose is to replace the normal throw new IAE(). The code, when executed in a static (main) method has to fail Exception in thread "main" java.lang.IllegalArgumentException at Untitled.main(Titled.java:4). Were it fails (line, file, stacktrace) doesn't matter.

22 characters:
Character.toChars(-1);

Running example
Javadoc: java.lang.Character.toChars(int)
Some nice looking variants:
Character.toChars(~4); // 22 characters, number can be any non-negative (and -0)

Character.toChars(1<<7); // 24 characters

~i is the same as -1 * (i+1) because it inverts the bits. So we will get a illegal parameter, because it is smaller then 0.
1<<7 will create a too high number by shifting the 1 seven times. (same as multiply it 7 times with 2). The last accepted Value seems to be 1114111, 1114112 will fail. Note: this might change depending on your environment, and could be not always reliable.
See the Oracle Docs "Bitwise and Bit Shift Operators" and "Primitive Data Types"
28 characters:
And if you don't like using the character class in a character count competition*:
Enum.valueOf(Enum.class,""); // 28 characters

*) Just to make this pun.

Doesn't need to be any positive; you can do any non-negative (ie ~0 works too)

I thought about 0 as a positive because it has no minus. But your right, and even Character.toChars(~-0);  works.

~0 is -1.  Not sure what ~-0 does for you, besides requiring an additional character.

It looks funnier xD

21 characters:
System.getProperty("");

As per the documentation, getProperty and setProperty throw IllegalArgumentException if the key is empty.

25 Characters
Creates a vector with an invalid (negative) length:
new java.util.Vector(-1);

Displays:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal Capacity: -1
    at java.util.Vector.<init>(Vector.java:129)
    at java.util.Vector.<init>(Vector.java:144)
    at Titled.main(Titled.java:3)

Here's 24 characters:
System.out.printf("%z");

This will throw an IllegalFormatException, which is an IllegalArgumentException.

19 characters:
String.format("%");

Throws java.util.UnknownFormatConversionException, which inherits from  IllegalFormatException, which, in turn, inherits from IllegalArgumentException;

14 Characters
this.wait(-1);

17 Characters
Thread.sleep(-1);

As far as code that directly throws IllegalArgumentException, these will do it.
From documentation:
Thread.sleep(int millis):
Throws:IllegalArgumentException - if the value of millis is negative
InterruptedException - if any thread has interrupted the current thread.

so direct code is 17 chars, if you're being a super stickler and counting the chars to add a throws clause for the interupted exception you can shorten it by just throwing the raw Exception class

this.wait(-1) does not work in the main function, due to main being static.

Thread.sleep(-1) requires you to add a throws declaration to the function, so it gets longer again. error: unreported exception InterruptedException; must be caught or declared to be thrown


text:
Decompose words into other words (e.g., “afterglow” = “aft” + “erg” + “low”)
Here's one for all you wordsmiths out there! Write a program or function which takes a list of words and produces a list of all possible concatenative decompositions for each word. For example:
(Note: This is only a small sampling for illustrative purposes. Actual output is far more voluminous.)
afterglow = after + glow
afterglow = aft + erg + low
alienation = a + lie + nation
alienation = a + lien + at + i + on
alienation = a + lien + at + ion
alienation = alien + at + i + on
alienation = alien + at + ion
archer = arc + her
assassinate = ass + as + sin + ate
assassinate = ass + ass + in + ate
assassinate = assassin + ate
backpedalled = back + pedal + led
backpedalled = back + pedalled
backpedalled = backpedal + led
goatskin = go + at + skin
goatskin = goat + skin
goatskin = goats + kin
hospitable = ho + spit + able
temporally = tempo + rally
windowed = win + do + wed
windowed = wind + owed
weatherproof = we + at + her + pro + of
yeasty = ye + a + sty

Ok, you get the idea. :-)
Rules

Use any programming language of your choosing. Shortest code by character count for each language wins. This means there is one winner for each language used. The overall winner will be simply the shortest code of all submitted.
The input list can be a text file, standard input, or any list structure your language provides (list, array, dictionary, set, etc.). The words can be English or any other natural language. (If the list is English words, you'll want to ignore or pre-filter-out single-letter items except for "a" and "i". Similarly, for other languages, you'll want to ignore nonsensical items if they appear in the file.)
The output list can be a text file, standard output, or any list structure your language uses.
You can use any input dictionary you like, but you'll probably want to use one that provides sensible words rather than one that provides too many obscure, arcane, or obnubilated words. This the file I used: The Corncob list of more than 58000 English words

Questions
This challenge is primarily about writing the code to accomplish the task, but it's also fun to comb through the results...

What subwords occur most commonly?
What word can be decomposed into the greatest number of subwords?
What word can be decomposed the most different ways?
What words are composed of the largest subwords?
What decompositions did you find that were the most amusing?

@Geobits — Ah, thank you! I missed two decompositions of alienation when I cut & pasted that. Fixed now. In terms of the others, the list above is only a small sampling. My test program generated tens of thousands of answers when given the Corncob list.

"What subwords occurmost commonly?"
Gonna throw a wild guess out there and say 'a' might be near the top.

@SebastianLamerichs — I dunno... Might be, might not be. :)

@ToddLehman that sentence contains exactly 0 subwords, so 'a' is still equal first :P

@SebastianLamerichs if you were referring to Todd's response to you, "dunno" can be split into "dun" + "no". ;)

@ialarmedalien Is "dunno" in the word list, though? It doesn't count if it's not a word itself.

@SebastianLamerichs I dunno. Depends on the word list used!

What if I use Chinese as input text…

@Ray — I suppose that might result in very few decompositions... unless you figure out a way to decompose the glyphs!

Python 186
a=open(raw_input()).read().split()
def W(r):
 if r:
    for i in range(1,len(r)+1):
     if r[:i]in a:
        for w in W(r[i:]):yield[r[:i]]+w
 else:yield[]
while 1:
 for f in W(raw_input()):print f

Not particularly efficient but actually not terrible slow. It just naively (I suppose it's possible, though I think unlikely that python does some clever optimizations) checks that sub-words are in the corncob dictionary and recursively finds as many words as it can. Of course this dictionary is pretty extensive and you could try one which doesn't include various abbreviations and acronyms (leading to things like bedridden: be dr id den). Also the linked dictionary did not seem to have 'A' or 'I' listed as words so I manually added them in.
Edit:
Now the first input is the filename of the dictionary to use, and every additional one is a word.

It's worth stating that this is Python 2, because the code does not run in Python 3, because print f should be print(f)

Also, how do I run this? echo archer|python2 filename.py outputs an EOFError for the last line

Some things you could still change (I haven't tested these, but I'm pretty sure it would work): for f in W(raw_input()):print f => ''.join(W(raw_input()) ; a=open('c').read().split('\n') => a=open('c').readlines()

@ɐɔıʇǝɥʇuʎs Your first one would work but readlines keeps the newline characters at the end of lines which is why I did it like I did.

@ɐɔıʇǝɥʇuʎs Oh actually it seems join requires all the elements to be strings and I can't get it in a form smaller than what I already have.

Scala, 132 129
Edit: slightly shorter as a loop reading from stdin than a function
while(true)print(readLine.:\(Seq(List(""))){(c,l)=>l.flatMap{m=>Seq(c+""::m,c+m.head::m.tail)}}filter(_.forall(args contains _)))

run as
scala decompose.scala aft after erg glow low

(or use a longer word list :) )
Original:
def f(s:Seq[String])=s.map{_.:\(Seq(List(""))){(c,l)=>l.flatMap{m=>Seq(c+""::m,c+m.head::m.tail)}}filter(_.forall(args contains _))}

Function from Seq[String] to Seq[Seq[List[String]]]. Takes dictionary as the command line arguments.
Ungolfed:
def decompose(wordList: Seq[String]) =
  wordList.map{ word =>                              // for each word
    word.foldRight(Seq(List(""))){ (char, accum) =>  // for each character
      accum.flatMap{list =>
        Seq(char+""::list,char+list.head::list.tail) // add it as both a new list and
      }                                              // the to start of the first list
    }.filter(_.forall(args contains _))              // filter out lists w/ invalid words
  }

Approach is to generate all the possible lists of substrings and filter out those that contain a string not in the dictionary. Note that some of the substrings generated contain an extra empty string, I assume the empty string will not be in the dictionary (there's no way to pass it in on the command line anyways).

Cobra - 160
sig Z(x,y)
def f(b)
    c as Z=do(x,y)
        if x.length<1,print y
        for z in File.readLines('t'),if z==x[:e=z.length].toLower,c(x[e:],y+' '+z)
    for t in b,c(t,'[t]:')

This is a function (sort-of two functions) that takes a List<of String>* and prints the strings containing the possible sub-word arrangements for each string in the argument list.
* the type is actually List<of dynamic?>, but providing anything other than List<of String> will probably break it.