text:
Path of exile map combinations
This question will feature a mechanic from the game "Path Of Exile" in this game there are things called MAPS they are items that you can use to open high level areas, you can also combine 3 of them to get a upgraded one which will be the task of this challenge. The upgrade combinations are as follow:
A Crypt Map 68 -> Sewer Map
E Dungeon Map 68 -> Channel Map
I Grotto Map 68 -> Thicket Map
O Dunes Map 68 -> Mountain Ledge Map
U Pit Map 68 -> Cemetery Map
T Tropical Island Map 68 -> Arcade Map
N Desert Map 68 -> Wharf Map
S Sewer Map 69 -> Ghetto Map
H Channel Map 69 -> Spider Lair Map
R Thicket Map 69 -> Vaal Pyramid Map
D Mountain Ledge Map 69 -> Reef Map
L Cemetery Map 69 -> Quarry Map
C Arcade Map 69 -> Mud Geyser Map
M Wharf Map 69 -> Museum Map
W Ghetto Map 70 -> Arena Map
F Spider Lair Map 70 -> Overgrown Shrine Map
G Vaal Pyramid Map 70 -> Tunnel Map
Y Reef Map 70 -> Shore Map
P Quarry Map 70 -> Spider Forest Map
B Mud Geyser Map 70 -> Promenade Map
V Museum Map 70 -> Arena Map
K Arena Map 71 -> Underground Sea Map
J Overgrown Shrine Map 71 -> Pier Map
X Tunnel Map 71 -> Bog Map
Q Shore Map 71 -> Graveyard Map
Z Spider Forest Map 71 -> Coves Map
Ó Promenade Map 71 -> Villa Map
É Underground Sea Map 72 -> Temple Map
Á Pier Map 72 -> Arachnid Nest Map
Í Bog Map 72 -> Strand Map
Ú Graveyard Map 72 -> Dry Woods Map
Ü Coves Map 72 -> Colonnade Map
Ö Villa Map 72 -> Catacomb Map
Ä Temple Map 73 -> Torture Chamber Map
Ë Arachnid Nest Map 73 -> Waste Pool Map
Ï Strand Map 73 -> Mine Map
Æ Dry Woods Map 73 -> Jungle Valley Map
Œ Colonnade Map 73 -> Labyrinth Map
Ñ Catacomb Map 73 -> Torture Chamber Map
Ÿ Torture Chamber Map 74 -> Cells Map
1 Waste Pool Map 74 -> Canyon Map
2 Mine Map 74 -> Dark Forest
3 Jungle Valley Map 74 -> Dry Peninsula Map
4 Labyrinth Map 74 -> Orchard Map
5 Cells Map 75 -> Underground River Map
6 Canyon Map 75 -> Arid Lake Map
7 Dark Forest Map 75 -> Gorge Map
8 Dry Peninsula Map 75 -> Residence Map
9 Orchard Map 75 -> Underground River Map
0 Underground River Map 76 -> Necropolis Map
? Arid Lake Map 76 -> Plateau Map
! Gorge Map 76 -> Bazaar Map
( Residence Map 76 -> Volcano Map
) Necropolis Map 77 -> Crematorium Map
- Plateau Map 77 -> Precinct Map
/ Bazaar Map 77 -> Academy Map
\ Volcano Map 77 -> Springs Map
| Crematorium Map 78 -> Shipyard Map
= Precinct Map 78 -> Overgrown Ruin Map
* Academy Map 78 -> Village Ruin Map
† Springs Map 78 -> Arsenal Map
‡ Shipyard Map 79 -> Wasteland Map
§ Overgrown Ruin Map 79 -> Courtyard Map
[ Village Ruin Map 79 -> Excavation Map
] Arsenal Map 79 -> Waterways Map
_ Wasteland Map 80 -> Palace Map
~ Courtyard Map 80 -> Shrine Map
{ Excavation Map 80 -> Maze Map
} Waterways Map 80 -> Palace Map
© Palace Map 81 -> Abyss Map
€ Shrine Map 81 -> Abyss Map
< Maze Map 81 -> Colosseum Map
> Vaal Temple Map 81 -> Colosseum Map
µ Abyss Map 82
» Colosseum Map 82

These lines follow this sheme:
Symbol of the map | Name of the map | Level of the map | Map received from combining

Note that the abyss and colosseum map dont combine into higher level ones since they are the highest level.
INPUT:
Your input will be a a string of Symbols which correspond to the map symbols, example AAAEE which would mean 3 x crypt map and 2 x dungeon map.
OUTPUT:
The output will be again a string of symbols which would represent the highest possible combination of the input maps. Any combination of output is allowed as long as it features every map.
EXAMPLES:
INPUT: A
OUTPUT: A

INPUT: AAA
OUTPUT: S

INPUT: AAAEEEIII
OUTPUT: SHR or HRS or RHS or SRH

INPUT: AAAAAAAAAE
OUTPUT: WE or EW

INPUT: »»»»»
OUTPUT: »»»»»

SCORING:
Your score will be calculated through this formula, which is also actualy used in the game to calculate damage reduction:
POINTS = 1000 - (ByteCount / (ByteCount + 1000) * 1000);

BONUS POINTS:

If you add runlenght encoding to both the input and output then multiply your points by 1.2, example 3A input instead of AAA. You can omit the standard input if your answer will support this.
If your program will allow the actual map names as input/output then multiply your points by 1.5, you can ommit the "map" part of the map name so as a example input "crypt crypt crypt" and output "sewer" is ok. Your script also doesnt need to understand the standard input anymore if you use this method. This method also requires a space between names in both the input and output.
If your output string goes from lowest level map to highest then multiply your points by 1.08, maps with the same level dont need to be sorted in any particular way.

You can combine all 3 bonus points.
ANSWER WITH THE MOST POINTS WINS!

Can we assume that, in the input, the same type of map will be next to each other? For example, in test case 3 we don't have to deal with something like AEIAEIAEI?

No the input will always be random, i will bumb up the bonus points for that part now that i think about it

Find your own way inland, exile! :^P

If the input is random then how does the runlength bonus work? Can we get inputs like 2AEA for AAEA? Or will it be 3AE?

Huh, I don't get it ._.

How come input AAA would result S?

@OverCoder Because A Crypt Map 68 -> Sewer Map and the Sewer map is S Sewer Map. 3 maps combine into a upgraded map. So read that as 3xCrypt Map->Sewer Map or A->S.

@Dorus Wow, such a hard challenge, thanks for the explanation

@Fatalize if you use runlenght then the input will be 3AE or 3A1E it wont be 2A1AE etc

How does having multiplier numbers in the input work if 0-9 are all valid input chars on their own? E.g. 3A would currently work as both 3, A and AAA. May we assume that input numbers will always be preceded by a one or similar number, e.g. 13A = 3, A, and that double-digit numbers will never be used in this way?

Since the maps is always a 1 digit number and in run lenght encoding a map is always preceded by a number you will always know what means what, so 13A will be 13xA 131 will be 13x1 etc.

Haskell, 306 bytes, points = 766 * 1.2 * 1.08 = 992.343
import Control.Arrow;main=print=<<(\x->unwords.map(\(x,y)->show x++[y]).filter((>0).fst).g=<<(read***head)<$>(lex=<<words x))<$>getLine;g z@(x,y)|x<3=[z]|1<2=maybe[z](\w->(x`mod`3,y):g(x`div`3,w)).lookup y$words"ASWKÉÄŸ50)|‡_©µ EHFJÁË16?-=§~€µ IRGXÍÏ27!/*[{<» ULPZÜŒ490 TCBÓÖÑŸ NMVK >»">>= \x->zip x$tail x

I could squeeze out a few more bytes should anyone beat me, but for now I'm going to leave it as is.
Haskell, 284 bytes, points = 779 * 1.2 * 1.08 = 1009.346
import Control.Arrow;main=interact$show.(\x->unwords[show a++[b]|(a,b)<-g=<<second head<$>(reads=<<words x),a>0]);g z@(x,y)|x<3=[z]|1<2=maybe[z](\w->(x`mod`3,y):g(x`div`3,w)).lookup y$words"ASWKÉÄŸ50)|‡_©µ EHFJÁË16?-=§~€µ IRGXÍÏ27!/*[{<» ULPZÜŒ490 TCBÓÖÑŸ NMVK >»">>=(flip zip=<<tail)

I did squeeze out a few more bytes regardless.
Haskell, 248 bytes, points = 801 * 1.2 * 1.08 = 1038.462
main=interact$ \x->unwords[show a++b|(a,b)<-(reads=<<words x)>>=g,a>0];g z@(x,y)|x<3=[z]|1<2=maybe[z](\w->(x`mod`3,y):g(x`div`3,w))$pure<$>lookup(head y)(zip<*>tail=<<words"ASWKÉÄŸ50)|‡_©µ EHFJÁË16?-=§~€µ IRGXÍÏ27!/*[{<» ULPZÜŒ490 TCBÓÖÑŸ NMVK >»")

I am also going to leave a few tables I made for others to use:
68   AS EH IR OD UL TC NM
69   SW HF RG DY LP CB MV
70   WK FJ GX YQ PZ BÓ VK
71   KÉ JÁ XÍ QÚ ZÜ ÓÖ
72   ÉÄ ÁË ÍÏ ÚÆ ÜŒ ÖÑ
73   ÄŸ Ë1 Ï2 Æ3 Œ4 ÑŸ
74   Ÿ5 16 27 38 49
75   50 6? 7! 8( 90
76   0) ?- !/ (\
77   )| -= /* \†
78   |‡ =§ *[ †]
79   ‡_ §~ [{ ]}
80   _© ~€ {< }©
81   ©µ €µ <»
82   µ  µ  »

     >»

You read it from top to bottom, two letters at a time (or ignore odd columns). Three A's make a S, Three S-es makes a W and so on. Chains that end simply wrap around to the first column on the next line. No three maps makes a >.
Here are the chains of maps you can make with no repeats:
ASWKÉÄŸ50)|‡_©µ
EHFJÁË16?-=§~€µ
IRGXÍÏ27!/*[{<»
ULPZÜŒ490
TCBÓÖÑŸ
NMVK
>»

C#, 364 361 bytes, points = 734.754 x 1.08 = 793.534
Might as well get the ball rolling with a big one...
string F(string s){var m=@"AEIOUTNSHRDLCMWFGYPBVKJXQZÓÉÁÍÚÜÖÄËÏÆŒÑŸ1234567890?!()-/\|=*†‡§[]_~{}©€<>µ»";var g=new int[75];foreach(int a in s.Select(c=>m.IndexOf(c)))g[a]++;int i=0;for(;i<73;){g[m.IndexOf(@"SHRDLCMWFGYPBVKJXQZÓKÉÁÍÚÜÖÄËÏÆŒÑŸ1234Ÿ567890?!(0)-/\|=*†‡§[]_~{}©€<©µµ»»"[i])]+=g[i]/3;g[i++]%=3;}return string.Join("",g.Zip(m,(x,l)=>"".PadLeft(x,l)));}

I've yet to think of a clever way of mapping the seemingly random encoded characters to their relative worth, so I've used a brute force method for now.
This implements bonus feature 3 by virtue of the method of grouping, which nets me a cool 58ish points.
Edit: Rewrote output loop into join/zip

SWI-Prolog, 354 bytes, points = 738.552 * 1.08 = 797.64
a(A,Z):-msort(A,S),b(S,[],B),(msort(B,S),string_codes(Z,S);a(B,Z)).
b(X,R,Z):-(X=[A,A,A|T],nth0(I,`AEIOUTNSHRDLCMWFGYPBVKJXQZÓÉÁÍÚÜÖÄËÏÆŒÑŸ1234567890?!()-/\\|=*†‡§[]_~{}©€<>`,A),nth0(I,`SHRDLCMWFGYPBVKJXQZÓKÉÁÍÚÜÖÄËÏÆŒÑŸ1234Ÿ567890?!(0)-/\\|=*†‡§[]_~{}©€<©µµ»»`,B),b(T,[B|R],Z);X=[A|T],b(T,[A|R],Z);Z=R).

Expects inputs as codes strings, for example a(`AAAEEEIII`,Z). will output Z = "SRH".
I'll see what I can do about the other two bonuses...

Javascript, 432 bytes, points = 698.32 * 1.08 * 1.2 = 905.02
function g(r){for(var n="AEIOUTNSHRDLCMWFGYPBVKJXQZÓÉÁÍÚÜÖÄËÏÆŒÑŸ1234567890?!()-/|=*†‡§[]_~{}©€<>",t="SHRDLCMWFGYPBVKJXQZÓKÉÁÍÚÜÖÄËÏÆŒÑŸ1234Ÿ567890?!(0)-/|=*†‡§[]_~{}©€<©µµ»»",a=/([^»µ])\1{2}/,c=/\d+/,e=/\d+(.)/,f=0;0!==(f=r.match(c)-0);)r=r.replace(c,Array(f).join(r.match(e)[1]));for(;null!==(f=r.match(a));)r=r.replace(a,t.charAt(n.search(f[1])));return r.split("").sort(function(r,t){return n.indexOf(r)-n.indexOf(t)}).join("")}

ECMAScript 6, 417 bytes, points = 705.72 * 1.08 * 1.2 = 914.61
No online minifier  version: (last version was passed through a minifier)
let F=s=>{for(var m="AEIOUTNSHRDLCMWFGYPBVKJXQZÓÉÁÍÚÜÖÄËÏÆŒÑŸ1234567890?!()-/\|=*†‡§[]_~{}©€<>",r="SHRDLCMWFGYPBVKJXQZÓKÉÁÍÚÜÖÄËÏÆŒÑŸ1234Ÿ567890?!(0)-/\|=*†‡§[]_~{}©€<©µµ»»",x=/([^»µ])\1{2}/,y=/\d+/,z=/\d+(.)/,p=0;(p=s.match(y)-0)!==0;)s=s.replace(y,Array(p).join(s.match(z)[1]));for(;(p=s.match(x))!==null;)s=s.replace(x,r.charAt(m.search(p[1])));return s.split('').sort((a,b)=>m.indexOf(a)-m.indexOf(b)).join('');};

Run with Babel

Tested with the following inputs:

AAA
AAAEEEIII
3A3E3I
»»»»»
5»

 General solution
Basically using regex whenever possible
var m = "AEIOUTNSHRDLCMWFGYPBVKJXQZÓÉÁÍÚÜÖÄËÏÆŒÑŸ1234567890?!()-/\|=*†‡§[]_~{}©€<>";
var r = "SHRDLCMWFGYPBVKJXQZÓKÉÁÍÚÜÖÄËÏÆŒÑŸ1234Ÿ567890?!(0)-/\|=*†‡§[]_~{}©€<©µµ»»";
var x = /([^»µ])\1{2}/;

while((p=s.match(x))!==null){
    s=s.replace(x,r.charAt(m.search(p[1])));
}

Nothing fancy here, just replacing a match for the respective output.
For the 1.2 Bonus
Regexing the numbers and the following letter, readable code goes like this:
// variable 's' is the input string

var y = /\d+/;
var z = /\d+(.)/;

var p = 0;

while((p=s.match(y)-0) !== 0) {
    s=s.replace(y,Array(p).join(s.match(z)[1]));
}

As you can see, s.match(y) - 0, the matched string is subtracted by 0, that's to force a parse int without actually calling parseInt().
Also Array(p).join(s.match(z)[1]) basically joins an array of p empty elements, with the character found in the match, that's an easy way to print a letter (let's say E) p amount of times.
 For the 1.08 Bonus
Sorting algorithm:
s.split('').sort(function(a,b) {
    return m.indexOf(a) - m.indexOf(b);
}).join('');

I don't see how you can possibly get a base score of 999.999 with 432 bytes. I get 698.324 with the given formula.

My bad, I must have typed the formula wrongly, I'll fix it

Javascript (ES6), 389 bytes, points = 719.942 * 1.08 * 1.2 = 933.045
In the lead, at least for now...
a=>{a=a.replace(/(\d)(.)/g,(m,A,B)=>B.repeat(A)),x='AEIOUTNSHRDLCMWFGYPBVKJXQZÓÉÁÍÚÜÖÄËÏÆŒÑŸ1234567890?!()-/\\|=*†‡§[]_~{}©€<>',y='SHRDLCMWFGYPBVKJXQZÓKÉÁÍÚÜÖÄËÏÆŒÑŸ1234Ÿ567890?!(0)-/\\|=*†‡§[]_~{}©€<©µµ»»',s=_=>(a=[...a].sort((a,b)=>x[I='indexOf'](a)-x[I](b)).join``);s();for(i=0;i<x.length;i++){a=a.replace(new RegExp(`[${('\\|'[I](h=x[i])<0?'':'\\')+h}]{3}`,'g'),y[i]);s()}return a}

Try it here:

F=a=>{a=a.replace(/(\d)(.)/g,(m,A,B)=>B.repeat(A)),x='AEIOUTNSHRDLCMWFGYPBVKJXQZÓÉÁÍÚÜÖÄËÏÆŒÑŸ1234567890?!()-/\\|=*†‡§[]_~{}©€<>',y='SHRDLCMWFGYPBVKJXQZÓKÉÁÍÚÜÖÄËÏÆŒÑŸ1234Ÿ567890?!(0)-/\\|=*†‡§[]_~{}©€<©µµ»»',s=_=>(a=[...a].sort((a,b)=>x[I='indexOf'](a)-x[I](b)).join``);s();for(i=0;i<x.length;i++){a=a.replace(new RegExp(`[${('\\|'[I](h=x[i])<0?'':'\\')+h}]{3}`,'g'),y[i]);s()}return a};

input=document.getElementById("input");
p=document.getElementById("a");
input.addEventListener("keydown", function(){
  setTimeout(function(){p.innerHTML = F(input.value);},10);
})
<form>Type your text here: <input type="text" id="input" value="3A"/></form>

Output:

S

The 1.2 bonus is somewhat tricky in its formatting. If you want to input a regular number, place a 1 before it.
Basically, this scans through every character that has an upgrade (all except µ and »), then finds all sets of three of this character and replaces them with the upgraded char. Sorting after each .replace was the best way to make sure this always works properly, so that was an automatic bonus. The 1.2 bonus was a little harder, but I got it sorted out in 45 bytes. The 1.5 bonus is just not worth it at all, as it requires a ton more encoding and would at least double the length.
As always, suggestions are very welcome!


text:
Accentuated abjad English (ōcćnt̮ōt̖d ōbj̄d óngḷsh)
An Abjad is a writing system where each symbol stands for a consonant, and where vowels are omitted. An impure Abjad is an abjad in which there are additionals symbols for vowels, usually diacritics.
Write a program or function that, given a string of lowercase text (i.e. nothing but ASCII letters from a to z, commas and spaces), outputs a corresponding impure abjad English transcript with the following rules:
Representation of vowels
Each vowel (i.e. a e i o u) is represented as an accent on the immediately preceding consonant. For instance, assuming the accent representing the vowel e is ́, the word wet will be transcribed as ẃt.
If a vowel is not preceded by a consonant (two or more vowels in a row, or a word starting with a vowel), the symbol o is used as a "blank consonant". For example, the word peep will be transcribed as ṕóp
Accent placement
Consonants that have ascenders are unpleasant to read when accentuated. Therefore, for those consonants, the symmetric accent will be displayed below the symbol instead of above. For instance, the letter combination te will be written t̖ rather than ́t
Those consonants are b d f h k l t.
Accents for vowels
We are using Unicode combining characters to display accents on every consonant possible. The combining characters used can be found here. Combining accents are placed directly after the symbol they are to be put on.
The accents are presented on arbitrary consonants in this list.

a
Above accent: U+0x0304, example: c̄
Below accent: U+0x0320, example: d̠
e
Above accent: U+0x0301, example: ć
Below accent: U+0x0316, example: d̖
i
Above accent: U+0x0307, example: ċ
Below accent: U+0x0323, example: ḍ
o
Above accent: U+0x030c, example: č
Below accent: U+0x032d, example: ḓ
u
Above accent: U+0x0311, example: c̑
Below accent: U+0x032e, example: d̮

Here is the list of all possible characters:
b̠ b̖ ḅ b̭ b̮
c̄ ć ċ č c̑
d̠ d̖ ḍ ḓ d̮
f̠ f̖ f̣ f̭ f̮
ḡ ǵ ġ ǧ g̑
h̠ h̖ ḥ h̭ ḫ
j̄ j́ j̇ ǰ j̑
k̠ k̖ ḳ k̭ k̮
l̠ l̖ ḷ ḽ l̮
m̄ ḿ ṁ m̌ m̑
n̄ ń ṅ ň n̑
p̄ ṕ ṗ p̌ p̑
q̄ q́ q̇ q̌ q̑
r̄ ŕ ṙ ř ȓ
s̄ ś ṡ š s̑
t̠ t̖ ṭ ṱ t̮
v̄ v́ v̇ v̌ v̑
w̄ ẃ ẇ w̌ w̑
x̄ x́ ẋ x̌ x̑
ȳ ý ẏ y̌ y̑
z̄ ź ż ž z̑
ō ó ȯ ǒ ȏ

Test cases

Input: programming puzzles and code golf

Output: přgr̄mṁng p̑zzl̖s ōnd čd̖ ǧlf

Input: the quick brown fox jumps over the lazy dog

Output: th̖ q̑ȯck břwn f̭x j̑mps ǒv́r th̖ l̠zy ḓg

Input: beautiful

Outpu: b̖ōȏṭf̮l

Input: one ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them

Output: ǒń ṙng ṱ ȓl̖ th̖m ōll, ǒń ṙng ṱ f̣nd th̖m, ǒń ṙng ṱ bṙng th̖m ōll ōnd ȯn th̖ d̠rkńss ḅnd th̖m
Scoring
This is code-golf, so the shortest program or function in bytes wins.

And suddenly reminded of why I chose not to try to learn Arabic.

I think the hard part is using the Unicode..

Just to make it clear, you simply want a letter-to-accent-sign conversion, ignoring the actual pronunciation of the English words?

@PaŭloEbermann Yes. There are no real consistent rules to english pronunciation anyway.

@Fatalize: It can be understood through tough thorough thought, though.

CJam, 63 62 bytes
Qq{_"aeiou"#:I){;___eu='o*\"bdfhklt"&"F<IST""*'-27"?I=730+}&}/

Try it online in the CJam interpreter.
How it works
Qq             e# Push an empty string and read from STDIN.
{              e# For each character in the input:
               e#   Push a copy of the character.
  "aeiou"#     e#   Find its index in "aeiou" (-1 for not found).
  :I)          e#   Save in I and add 1.
  {            e#   If I + 1 != 0:
    ;          e#     Discard the character.
    ___        e#     Copy the previous character (or the empty array) three times.
    eu=        e#     Convert the last copy to uppercase and check for equality.
               e#     This pushes 1 for non-letters and 0 for letters.
    'o*        e#     Push a string of that many o's.
    \          e#     Swap the last copy with the string of o's.
    "bdfhklt"& e#     Intersect with that string.
    "F<IST"    e#     Push that string.
    "*'-27"    e#     Push that string.
    ?          e#     Select the first iff the intersection is non-empty.
    I=         e#     Retrieve the character at index I.
    730+       e#     Add 730 to its code point.
  }&           e#
}/             e#

A full 206 bytes shorter than my solution. Nice. :)

GNU sed, 168 158 134 105 98 85 byt̖s
ǒr 75 ch̠rs (b̭th ȯncl̮ḍng +1 f̭r th̖ -r fl̠g).
s/([bdfhklt])([aeiou])/\1\u\2/g;y/aeiouAEIOU/̠̖̣̭̮̄́̇̌̑/;s/\B[^ ,a-z]/o&/g

óxpl̠n̄ṭǒn
Wó s̄v́ ō ḅt ȏṡng th̖ čnstr̄ȯnt th̠t ȯnp̑t ȯs ōll ḽẃr-c̄ś.  Wó ȏpc̄ś ōny v̌ẃl f̭lḽẇng ō čnšn̄nt, b̖f̭ŕ čnv́rṭng ōll v̌ẃls ṱ ōcćnts.
#!/bin/sed -rf

s/([bdfhklt])([aeiou])/\1\u\2/g  # upcase vowel following ascender
y/aeiouAEIOU/̠̖̣̭̮̄́̇̌̑/
s/\B[^ ,a-z]/o&/g                # precede with 'o' if needed

Th̖ ǒdd-ḽǒḳng ch̠r̄ct̖rs ōŕ // čnt̠ȯṅng ōll t̖n ōcćnts (/̠̖̣̭̮̄́̇̌̑/).  óxp̄nd̖d ǒȏt ẇth sp̄ćs, th̖y w̌ȏld ḽǒk ḷk̖ / ̄ ́ ̇ ̌ ̑  ̠ ̖ ̣ ̭ ̮ /.
ǒȏtp̑t

přgr̄mṁng p̑zzl̖s ōnd čd̖ ǧlf
th̖ q̑ȯck břwn f̭x j̑mps ǒv́r th̖ l̠zy ḓg
b̖ōȏṭf̮l
ǒń ṙng ṱ ȓl̖ th̖m ōll, ǒń ṙng ṱ f̣nd th̖m, ǒń ṙng ṱ bṙng th̖m ōll ōnd ȯn th̖ d̠rkńss ḅnd th̖m

The output of the first test case is wrong. Looping is not the same as appending g to each s since the last five commands may replace digits after underscores. If you loop only over the first five and use y for the rest, you shorten and correct the code at the same time. 2. You can save more bytes by doing s/([ ,aeiou])([aeiou])/\1~\2/g at the beginning and replacing ~ with o in the transliteration.

Thanks for your observation (1) - fix pending.  I didn't think that y would work with multi-byte characters, but I've now tried it and it does - I should have tested to begin with.  Your suggestion (2) fails with the last example which would need (^|[ ,aeiou]) instead of ([ ,aeiou]) - I tried something like that and lost (actually it was (^|[ ,1-5]) after the first y).

I've now updated - and now I know that y works by character rather than by byte, I replace with accents immediately.  Thanks @Dennis for prompting my improvements.  I now remember why inserting o with a single step didn't work (e.g. suggestion to use s/([ ,aeiou])([aeiou])/\1~\2/g) - this only makes one replacement when there's two consecutive vowels, leading to b̖ō̑ṭf̮l for testcase 3.  So I've stuck with inserting too many o and removing the unnecessary ones afterward.

I cannot copy and paste your golfed code. A lot of characters are missing. Copying the ungolfed code works just fine, but I count only 104 bytes. Not sure if I'm still missing one. 2. [^ ,a-z] is shorter and should work fine in the last substitution.

@Dennis - 1. I printed the reduced code to xterm and then pasted that; perhaps xterm converted to precomposed or something? I'll try doing it directly within emacs. And did you count 1 for -r?  2. I still don't see how [^ ,a-z] will create the initial o in the last testcase.  Edit: I see what you mean - shorter than the ten accents in the second group.  Even better, [^ -~] will work, to save a further 2.

Yes, I forgot about the flag... I was going to suggest [^ -z], but that doesn't work for me. [^ -~] enters an infinite loop. I have no idea why.

@Dennis - I just tried it and found the same - I think it's because our collation orders include the one or more accents between   and ~.  It works in an environment with LC_COLLATE=C but I think I'd have to add 12 or 13 for that.

Ŕṭn̄ 0.8.2, 71 byt̖s
T`aei\ou`̄́̇̌̑
T`̄́̇̌̑`̠̖̣̭̮`[bdfhklt]*.
+`([^a-z])([̠̖̣̭̮̄́̇̌̑])
$1o$2

Try ȯt ǒnḷń!
Óxpl̠n̄ṭǒn
T`aei\ou`̄́̇̌̑          ŕpl̠ćs th̖ ch̠r̄ct̖rs aeiou ẇth th̖ črŕsp̌nṡng ḍōcṙṭcs ōb̭v́.
T`̄́̇̌̑`̠̖̣̭̮`[bdfhklt]+.    ŕpl̠ćs th̖ ḍōcṙṭcs ōb̭v́ ẇth ḍōcṙṭcs b̖ḽw ȯf pŕćd̖d by ǒń ǒr śv́r̄l ch̠r̄ct̖rs ẇth ōsćnd̖rs.
+`([^a-z])([̠̖̣̭̮̄́̇̌̑])     ȏnṭl th̖ ȯnp̑t sṱps ch̠nġng, ŕpl̠ć óv́ry ḍōcṙṭc ňt pŕćd̖d by ō l̖tt̖r...
$1o$2              ...ẇth th̖ s̄ḿ ch̠r̄ct̖rs b̮t ẇth ōn o b̖tẃón th̖m.

Julia, 269 bytes
This is really long and can probably be golfed further, but I'm just psyched that I was able to come up with a working solution at all!
s->(u=700+[72,69,75,80,85];l=800+[0,-10,3,13,14];R=replace;r(m)=(i=findin("aeiou",m[2])[1];j=m[1]∈"bdfhklt"?l[i]:u[i];string(m[1],char(j)));t(m)=string("o",char(u[findin("aeiou",m)[1]]));R(R(R(s,r"(?![eiou])[b-z][aeiou]",r),r"(?<=^| )[aeiou]",t),r"(?<=\S)[aeiou]",r))

This creates an unnamed function that accepts a string and returns a string.
Ungolfed + explanation:
function f(s)
    # Construct arrays of integers representing the unicode accents
    # u is for the upper accents and l is for the lower
    u = 700 + [72,69,75,80,85]
    l = 800 + [0,-10,3,13,14]

    # Define a function to accent consonants followed by vowels
    r(m) = begin
        # m is the consonant-vowel pair from the regex match
        i = findin("aeiou", m[2])[1]
        j = m[1] ∈ "bdfhklt" ? l[i] : u[i]
        string(m[1], char(j))
    end

    # Define a function to accent vowels
    t(m) = string("o", char(u[findin("aeiou", m)[1]]))

    # Accent consonants
    rep1 = replace(s, r"(?![eiou])[b-z][aeiou]", r)

    # Accent vowels at the start of a string or before a space
    rep2 = replace(rep1, r"(?<=^| )[aeiou]", t)

    # Accent remaining unaccented vowels
    rep3 = replace(rep2, r"(?<=\S)[aeiou]", t)

    # Return
    rep3
end

Examples:
julia> println(f("beautiful"))
b̖ōȏṭf̮l

julia> println(f("programming puzzles and code golf"))
přgr̄mṁng p̑zzl̖s ōnd čd̖ ǧlf

Note that if you look at the raw text in the post, the "t" in the first example is accented correctly but for some reason it doesn't display that way in the rendered markdown, at least for me.

As long as it displays correctly in your examples for me (and it does), it's good

@Fatalize Oh I'm glad it displays correctly for you. I wonder why it doesn't for me. Regardless, nice challenge, glad I could participate!

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:
"Talos Principle" Tetris Puzzle Generator
In Talos Principle, from time to time player has to solve a puzzle that looks like this:

Source: http://uk.ign.com/wikis/the-talos-principle/File%3A20141108_134749.jpg
This puzzle is already solved - the blue slots on the right are the list of the possible blocks the user could use. They were placed in the grid so that they don't overlap and all spaces are filled.
The goal is to create a random puzzle generator that assumes that the grid is 8x8 and lists available puzzles (16 letters as output). All blocks from Tetris are allowed (I, L, J, O, T, S and Z) and we assume that the player can rotate them. In the screenshot, the matrix is 4x7 and the program would say that the player has to use two I blocks, two T blocks, two Z blocks and one L block (rotated). The program should generate a puzzle in a reasonable time (let's say a minute on a 1Ghz processor with 8 gigabytes of RAM)
Winning Criteria : shortest source code and running within reasonable time, explained above.

Related challenge

What are the winning criteria?

Also, here is another very similar challenge: http://codegolf.stackexchange.com/questions/30306/solving-a-ubongo-puzzle?rq=1

@ESultanik: Added winning criteria, does that sound sane? As for the puzzle, mine is about generation.

Yes, sounds good.

How random is random? Is it that every possible combo needs to have a non-zero chance? Or is it uniform?

It doesn't have to be uniform and I'd say that some combos might be excluded.

It would be useful if, in addition to showing what the puzzle looks like, you explained what the puzzle is.

@PeterTaylor: are you asking because it's actually not clear to you?

What's the desired output? 16 letters?

@RetoKoradi: Yes, given that each tetromino takes four blocks and the matrix is 8x8, it should be 16 letters.

But if all don't have to be possible what's stopping me from doing print "IIIIIIIIIIIIIIII"?

It turns out I'd guessed right, but a good spec shouldn't leave me guessing.

@Maltysen: nothing, but it's not random. If it's just one possible answer, it's okay.

Fine but that's not what I meant, what about random_choose("I"*16, "Other hardcoded puzzle that I cant think of at the moment")

@Maltysen: I would say that this is still against this one: http://meta.codegolf.stackexchange.com/a/1063/17159

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


text:
Golf Practice: Pyth
This is a challenge about the the tricks and optimizations that can be used when golfing in Pyth. Pyth golfers may recognize many of the tricks involved. However, unfamiliar approaches and constructs may  be involved, so take a look at the Pyth Tips as well as the Pyth Character Reference if you get stuck. Solutions may be tested here.
Goal: There are 8 problems, each with a Pyth snippet for you to optimize. Your goal is to create something equivalent but shorter. The reference solutions total 80 bytes. Your goal is to beat that by as much as possible.
The winner will go to the submission that solves all 8 problems with the  smallest total number of bytes. Tiebreaker is earlier post.
Answering: Please spoiler your entire answer, except for your total score. It is intended that you do not look at other people's answers before submitting your own.
Each submission should answer every problem and give the corresponding byte count, but feel free to use the reference implementation if you cannot improve it.
Details: If the question calls for a certain value or output, q equality is desired, so 1 and !0 are equivalent. If the question calls for testing whether a condition is true, the output must be truthy if the condition is true and falsy if the condition is false, but is unconstrained beyond that. You may not swap true for false and false for true. If the question calls for something to be printed, nothing else may be printed except a trailing newline.
All answers must be valid for the most recent Pyth commit as of this question's posting.
Problem 1: Given a set in Q, output a list containing the elements of Q in any order.
; 3 bytes
f1Q

Problem 2: Output the list [1, 1, 0, 0, 1, 1, 0].
; 9 bytes
[J1JZZJJZ

Problem 3: Given a positive integer in Q, test whether all of Q's digits are positive (not zero).
; 7 bytes
!f!TjQT

Problem 4: Given a string in z, test whether z contains any quotation marks - " or '.
; 9 bytes
|}\'z}\"z

Problem 5: Map Q=1 to 'Win', Q=0 to 'Tie' and Q=-1 to 'Lose'.
; 20 bytes
@["Tie""Win""Lose")Q

Problem 6: Print 0123456789.
; 6 bytes
sm`dUT

Problem 7: Given a string in z, count the number of inversions.
(Indexes i and j form an inversion if i < j but z[i] > z[j]).
; 17 bytes
ssmm>@zd@zkrdlzUz

Problem 8: Given a list in z, count the number of repeated adjacent elements.
; 9 bytes
lfqFT.:z2

@user1737909 That answer is correct. f1Q filters Q on a function that is always true, so it always outputs every element of the set. f outputs a list, which meets the objective in that question.

I'm closing this question as off-topic because multi-part challenges with no interaction between the parts are disallowed. http://meta.codegolf.stackexchange.com/a/8464/45941

This post is for the accumulation of the best solutions across all answers. Please edit in the solution and the answerer who first found that solution if there any improvements.
48 bytes

 1. SQ - 2 bytes, first posted by @orlp
 2. jC\f2 - 5 bytes, first posted by @Maltysen
 3. -0`Q - 4 bytes, first posted by @Jakube
 4. @z`N - 4 bytes, mixture of @xnor and @Jakube, but not in any answers yet.  (I didn't see it when writing the question, either)
 5. @c3"LoseTieWin"hQ - 17 bytes, first posted by @orlp
 6. pMT - 3 bytes, first posted by @Jakube
 7. s>M.cz2 - 7 bytes, first posted by @orlp
 8. sqVtzz - 6 bytes, first posted by @Maltysen

are we restricting to Pyth versions from before the question ?

"All answers must be valid for the most recent Pyth commit as of this question's posting." Put I'd be interested to hear what you were thinking of. @Optimizer

Pyth is ever evolving, right ? (at a much faster pace than other golfing languages). So its very likely that this number (48) will easily go sub 40 in near future. And since this is a practice challenge, you would ideally want to practice using the latest Pyth version for newer challenges.

52 bytes

 Problem 1: 2 bytes
    SQ
Problem 2: 5 bytes
    jC\f2
Problem 3: 4 bytes
    -0`Q
Problem 4: 6 bytes
    @z+N\'
Problem 5: 17 bytes
    %3>"LTWoiisene"hQ
 or
     @c3"LoseTieWin"hQ
Problem 6: 3 bytes
    pMT
Problem 7: 9 bytes
    s>R_d.cz2
Problem 8: 6 bytes
    sqVztz

 Combining @xnor's solution for problem 4 with mine (both 6 bytes) gives a nice 4 bytes solution. So 48 bytes are possible.

You can't combine your solution with xnor's, because xnor's is invalid (see my comment on his answer).

@orlp *combining everything but the invalid stuff ;-) Added the solution in my post.

Ah, I see now :) Guess I was 6 bytes (and counting) worse than optimal.

aaah! thanks! hadn't realized :). I'll remove that.

54 bytes

 Task 1, 2 bytes: SQ
Task 2, 6 bytes: j102 2
Task 3, 5 bytes: *FjQT
Task 4, 6 bytes: @z"'\"
Task 5, 17 bytes: @c3"LoseTieWin"hQ
Task 6, 4 bytes: jkUT
Task 7, 7 bytes: s>M.cz2
Task 8, 7 bytes: sqM.:z2

Nicely golfed :-)

is you answer for task 4 valid since on falsey it just prints a blank line?

@Maltysen Yes, because the truthy value of "" is False because not "" is True.

58 bytes

 Task 1, 2 bytes: SQ
Task 2, 5 bytes: jC\f2
Task 3, 6 bytes: !}ZQ
Task 4, 8 bytes: |}\'z}Nz
Task 5, 18 bytes: @c"Tie\nWin\nLose"bQ
Task 6, 4 bytes: jkUT
Task 7, 9 bytes: lf>FT.cz2
Task 8, 6 bytes: sqVtzz

I didn't know about V (although I still don't fully understand it, since you're doing vector operations on inequal length operands), so I'm excused for that one, but I really should've thought of C\f =/

@orlp V automatically truncates unequal inputs

57 bytes

 1. (2) SQ Sort.
 2. (5) jC\f2  Convert f to ASCII val then base 2.
 3. (5) /`Q`0 Count '0' in the number string.
 4. (5) @z`\' Takes the set intersection of the string with "'".
 5. (18) @c"Tie Win Lose"dQ Makes the list with split. I didn't get slicing to work.
 6. (4) jkUT Join range(10). Apparently converts to a string automatically.
 7. (9) sm>d_d.:zCounts substrings that are greater than their reverse.
 8. (9) l@C,zz.:z Length of intersection of sublists of the list and pairs of elements in the list. Same length as reference solution.

Your solution for #4 is invalid. For example the string te\\st is a false positive.

@orlp Replaced it with different, shorter solution.


text:
Backwards Long Addition
The standard long addition method:

The standard algorithm for adding multidigit numbers is to align the addends vertically and add the columns, starting from the ones column on the right. If a column exceeds ten, the extra digit is "carried" into the next column. (wikipedia)

A long addition example:
 145
+ 98
-----
 243

Backwards long addition is similar but you start adding from the leftmost column and carry to the next column (on it's right). If the last (ones) column produces a carry you write it behind the current sum in the next column. If there is no carry in the last column no extra column is needed.
 145
+ 98
-----
 1341

Explanation for the above example by columns, left to right: 1 = 1; 4+9 = 10(carried) + 3; 5+8+1(carry) = 10(carried) + 4; 1(carry) = 1
You should write a program or function which receives two positive integers as input and returns their sum using backwards long addition.
Input

Two positive integers.

Output

An integer, the sum of the two input numbers using backwards long addition.
There should be no leading zeros. (Consider 5+5=1 or 73+33=7.)

Examples
Format is Input => Output.
1 3 => 4
5 5 => 1
8 9 => 71
22 58 => 701
73 33 => 7
145 98 => 1341
999 1 => 9901
5729 7812 => 26411

May I assume an upper bound on the decimal length of the numbers, at, say, 99 digits?

@xnor No. Your datatype can limit the largest number you can handle but your algorithm should work for arbitrary large numbers.

How would you rule on Python 2's adding an L for numbers greater than 2**31 that don't fit in an int, and so messing up the method of string reversing?

@xnor The datatype you use can represent numbers greater than 2**31 numbers so you have to deal with their representation.

Pyth, 16 bytes
Still new to Pyth, but this looks promising..
s_`smvs.[_d0lzcz

The idea here is simple. To do backwards addition, you need backwards numbers. We take the input, reverse it, make sure that it has same number of digits be adding trailing 0, sum the two numbers, reverse it again and make sure no leading zero exists.
Code expansion
              cz          # Take the input and Python split it. Splits on space automatically
    m                     # Now we map over these two strings
         _d               # Reverse the string
       .[  0lz            # Pad it with 0 on right so that its length is same as input length
     vs                   # We have array of character and number, stringify and eval
   s                      # Sum the numbers in array
  `                       # Stringify
 _                        # Reverse
s                         # Convert back to number, removing leading 0

Try it online here

Careful, CJam is going to get jealous.

Don't worry, I am still writing in CJam and then translating. CJam will always be my first ;)

Oh good, I was really worried there for a minute!

CJam, 22 bytes
q:QS/{W%Q,0e]s~}/+sW%~

This is pretty much the same algorithm as the Pyth answer, just a bit longer due to different syntax.
Code expansion
q:Q                     e# Read the input and store it in Q
   S/                   e# Split the input on space.
     {         }/       e# Now we map over the two values in the array
      W%                e# Reverse the number treating it like a string
        Q,0e]           e# Right pad it with enough 0 to make its length same as input
             s~         e# Convert to string and evaluate to get integer
                 +s     e# Sum the two numbers and convert the sum to string
                   W%~  e# Reverse the sum as a string and evaluate to remove leading 0

Try it online here

21 bytes with command-line arguments: ea{W%eas,0e]s~}/+sW%~

Python 2, 80 78 Bytes
I didn't intend to have to reverse at the end, but apparently I need to.. I will fix this (maybe)!
Thanks to Alex A. for saving 2 bytes, and flornquake for saving 3 bytes!

a,b=input();s=0
while a+b:s=s*10+a%10+b%10;a/=10;b/=10
print int(str(s)[::-1])

Input like so: num1, num2.

a or b can be turned into a+b.

@randomra Simple fix is to use str(s) instead of \s``

@randomra fixed.

CJam, 26 bytes
This is the first time I'm using CJam, I don't know many operators yet so it's surely sub-optimal. Gotta start somewhere :)
l~]$~s_,@s\0e[sW%i\W%i+sW%

Try it online.
Ungolfed:
l~    e# Takes input
]$~   e# Wrap in array, sort and unwrap
s_,   e# Convert highest to string, push length
@s\   e# Setup stack for padding (["hi" "lo" len])
0e[s  e# Left pad with zeroes and convert to string
W%i\  e# Reverse digits, convert to int, swap stack
W%i+  e# Reverse digits, convert to int, sum
sW%   e# Convert result to string and reverse digits
      e# Stack is automatically printed

Nice solution, but particularly impressive given that it's your first time with CJam.

Bash + coreutils, 62
Not sure if this counts or not, but it does give the right answers (for 32-bit integers):
r()(printf %09d#01 $1|rev)
rev<<<$[`r $1`+`r $2`]|sed s/^0\*//

Test output:
$ for t in "1 3" "5 5" "8 9" "22 58" "73 33" "145 98" "999 1" "5729 7812"
do ./backlongadd.sh $t; done
4
1
71
701
7
1341
9901
26411
$

@randomra my implementation of the algorithm felt a little cheaty - basically rev( rev(a) + rev(b) ) with some carefully placed zeroes - instead of doing all the carries and whatnot manually).  But if its OK with you, then its OK with me :)

That's perfectly fine. Just the output matters, not the method. My wording probably wasn't the best but haven't found better.

Java, 337 312 bytes
Not quite a golfed language or solution, but it at least works and was fun to write. There's quite a few byte penalties to this approach, but I'm mostly happy with it.
void g(int a,int b){String p=(a>b?a:b)+"",o=(a>b?b:a)+"",s="";int m=p.length(),i=0,c=0,t;for(;i++<m;)o=(o.length()==m?"":"0")+o;for(i=-1;i++<m-1;){t=Integer.parseInt(p.charAt(i)+"")+Integer.parseInt(o.charAt(i)+"")+c;c=0;if(t>9){c=1;t=Integer.parseInt((t+"").charAt(1)+"");}s+=t;}System.out.print(s+(c>0?c:""));}

Input/Output:
g(8,9)    --> 71
g(145,98) --> 1341
g(999,1)  --> 9901

Spaced and tabbed out:
void g(int a,int b){

    String p=(a>b?a:b)+"",
      o=(a>b?b:a)+"",
      s="";

    int m=p.length(),
      i=0,
      c=0,
      t;

    for(;i++<m;)
      o=(o.length()==m?"":"0")+o;

    for(i=-1;i++<m-1;){
      t=Integer.parseInt(p.charAt(i)+"")+Integer.parseInt(o.charAt(i)+"")+c;
      c=0;
      if(t>9){
        c=1;
        t=Integer.parseInt((t+"").charAt(1)+"");
      }
      s+=t;
    }
    System.out.print(s+(c>0?c:""));
  }

Tips: 1) You can save a few on Math.min/max by using a ternary like (a>b?a:b)+""; instead. 2) static is not generally required for functions here, unless you're doing something odd where it really does need to be static. 3) Get rid of the braces on the first for block, they're not needed for a single statement. 4) I don't think you need to initialize t in the declaration, since it's never used before initialization. 5) You can lose the parentheses around c>0 in the return and o.length()==m above. 6) I don't think you need a newline, so just use print instead of println.

@Geobits Thank you! I hadn't even thought of using ternary ops, always wondered about the static deceleration, and glad you caught the other stuff

O, 22 bytes
ii`\`e@e@\-{0+}d#\#+`o
Padding zeros, can be golfed a lot.

Julia, 190 173 163 160 bytes
f(a,b)=(n=ndigits;d=digits;m=max(n(a),n(b));C=reverse([0,d(a,10,m).+d(b,10,m)]);for i=1:m C[i+1]+=C[i]÷10;C[i]=C[i]%10end;c=join(C);int(c[end]=='0'?chop(c):c))

This creates a function f that accepts two integers and returns an integer.
Ungolfed + explanation:
function f(a,b)
    # Determine the maximum number of digits between a and b
    m = max(ndigits(a), ndigits(b))

    # Create an array as the elementwise sum of the digits of
    # a and b with a single trailing 0, where the digit arrays
    # are left padded with zeros to each have length m
    C = reverse([0, digits(a, 10, m) .+ digits(b, 10, m)])

    # Carry digits as necessary
    for i = 1:m
        C[i+1] += C[i] ÷ 10
        C[i] = C[i] % 10
    end

    # Join the array into a string
    c = join(C)

    # If the string has a trailing zero, lop it off, then
    # convert the string to an integer and return it
    int(c[end] == '0' ? chop(c) : c)
end

JavaScript (ES6), 112 bytes
g=(a,b,r=z=>+[...z].reverse().join``,x=(ar(r(y=(a+[...z].reverse().join``,x=(ar(r(y=(a X.innerHTML += x + '\n';

console.log(g(1,3));
console.log(g(5,5))
console.log(g(8,9))
console.log(g(22,58))
console.log(g(73,33))
console.log(g(145,98))
console.log(g(999,1))
console.log(g(5729,7812))

<output id=X></output>

PHP, 112 bytes
Same algorithm as my JavaScript answer. It's sad that PHP has the same amount of chars (unless my other answer can be golfed further). Then again, the built-in string functions and implicit conversions really helped.
function g($a,$b,$r='strrev'){echo$r($r($y=max($a,$b))+$r(str_pad($x=min($a,$b),strlen($y)-strlen($x),0,0)))+0;}

Unminified:
function g($a, $b) {
    $y = max($a,$b);
    $x = min($a,$b);
    echo strrev(strrev($y) + strrev(str_pad($x, strlen($y) - strlen($x), 0, STR_PAD_LEFT))) + 0;
}

Python 3, 92 bytes
For what it's worth (if anything), this function accepts an arbitrary number of inputs and adds them all.
r=lambda *a:int(str(sum(map(int,(format(n,'0>'+str(len(str(max(a)))))[::-1]for
n in a))))[::-1])

Ungolfed version:
def rsum(*summands):
    l = len(str(max(summands)))
    fmt = '0>' + str(l)
    reverse_summands = (format(n, fmt)[::-1] for n in summands)
    reverse_sum = sum(int(nrev) for nrev in reverse_summands)
    return int(str(reverse_sum)[::-1])

It's the same approach as Digital Trauma's answer: pad the shorter number with leading zeroes, reverse them, add them, and reverse the sum. The bulk of the code is int-to-string-to-int-to... conversion.

Pyth, 17 bytes
s_`isM.TmsMdc_z)T

An alternative method without 0 padding.


text:
Remove common leading spaces
When coding in Python, sometimes you want a multiline string within a function, e.g.
def f():
    s = """\
    Line 1
    Line 2
    Line 3"""

(The backslash is to remove a leading newline)
If you try to actually print out s, however, you'll get
    Line 1
    Line 2
    Line 3

That's not what we want at all! There's too much leading whitespace!
The challenge
Given a multiline string consisting of only alphanumeric characters, spaces and newlines, remove all common spaces from the beginning of each line. Each line is guaranteed to have at least one non-space character, and will have no trailing spaces. The output may not have extraneous whitespace, whether it be before or after the entire output or an individual line (with the exception of a single optional trailing newline).
Input may be via STDIN or function argument, and output may be via STDOUT or function return value. You cannot use any builtins which are designed to dedent multiline strings or perform this exact task, e.g. Python's textwrap.dedent.
This is code-golf, so the solution in the fewest bytes wins. Standard loopholes apply.
Test cases
"a"                                  ->   "a"
"   abc"                             ->   "abc"
"   abc\n def\n  ghi"                ->   "  abc\ndef\n ghi"
"    a\n    b\n    c"                ->   "a\nb\nc"
"    a\n    b\n    c\nd"             ->   "    a\n    b\n    c\nd"
"   a   b\n     c     d\n    e f"    ->   "a   b\n  c     d\n e f"

For example, the last test case is
   a   b
     c     d
    e f

and should look like this after stripping leading spaces:
a   b
  c     d
 e f

May the output have trailing whitespace?

@orlp No it may not, will clarify.

CJam, 20 14 bytes
qN/_z{S-}#f>N*

Algorithm:

We first split the input on newlines and take a copy (qN/_)
Then the smallest column with non space character is calculated by transposing the newline separated array and then simply looking for the index of the first non-all-space row (z{S-}#)
Then we simply remove that many characters away from each line (f>)
Finally, we join by newline again (N*)

Code Expansion
qN/               e# Read the entire input and split it on newline
   _z             e# Take a copy and transpose rows with columns.
                  e# Now we would have a bunch of all space rows. These rows are the ones
                  e# we want to remove (in form of columns)
     {  }#        e# Get the index of the first item from the transposed array that returns
                  e# true for this block
      S-          e# From each part, remove spaces. If the part is all-space, it will return
                  e# an empty string, which is false in CJam. We finally will get the index
                  e# of the first non-all-space row (or column)
          f>      e# We take that index and remove that many characters from starting of each
                  e# row of the initial newline separated input
            N*    e# Join the array back using newlines and automatically print the result

Try it online here

sed - 26 bytes
:;/(^|\n)\S/q;s/^ //mg;b

run with -rz
Pretty straightforward:
  /(^|\n)\S/q;           - quit if there is a line that starts with non-space
              s/^ //mg;  - remove exactly one space in each line
:;                     b - repeat

-r option turns on extended regexps, -z reads whole input as a single string (actually uses NUL-byte as line delimiter)

Don't you need :;N;$!b or similar to begin with, to gather the input lines into a single pattern space?  Edit: no you don't; that's what the -z flag is for.

You can golf this to :;/^\S/M!s/^ //mg;t, now not requiring -r

Pyth, 19 18 17 14 bytes
jbu>R!rhCG6G.z

The implementation is pretty cool.

u    .z grabs all lines of stdin in an array, puts it in G. Then it evaluates the inner body, puts the result in G, and keeps doing this until it no longer changes (fixed point).

!rhCG6 transposes G, gets the first element of the transposed array (the first column), strips it of any whitespace, and checks if there are any non-whitespace characters left.

The value from 2 is a boolean, which can be seen as an int 0 or 1. >R      G grabs this number and slices off that many characters off the left of each line in G. Step 1, 2 and 3 combined basically means that it will keep stripping off columns of whitespace until there is no pure whitespace column left.

jb joins the array of lines by newlines and prints it.

Can you please give a small explanation to this? This is very weird to me!

@bobbel Explanation added.

Really great, thanks! Never heard about it! To try this online I found: https://pyth.herokuapp.com/?code=jbu%3ER!rhCG6G.z&input=+++a+++b%0A+++++c+++++d%0A++++e+f&debug=1

SWI-Prolog, 233 223 217 bytes
a(A):-b(A,0,0,0,N),w(A,N,0).
b([A|T],P,K,M,N):-P=1,(A=10,b(T,0,0,M,N);b(T,1,0,M,N));A\=32,(M=0;K<M),b(T,1,0,K,N);I=K+1,b(T,0,I,M,N).
b(_,_,_,N,N).
w([A|T],N,P):-P<N,A=32,Q=P+1,w(T,N,Q);put(A),A=10,w(T,N,0);w(T,N,P);!.

Edit: Completely changed my answer. It now uses character codes instead of strings.
An example of calling this would be a(`   a   b\n     c     d\n    e f`)., with backquotes. You may need to use double quotes " instead if you have an old SWI-Prolog distrib.

Julia, 93 92 81 bytes
Saved 10 bytes thanks to Glen O.
s->for i=(p=split(s,"\n")) println(i[min([search(j,r"\S")[1]for j=p]...):end])end

This creates an unnamed function that accepts a string and prints to stdout.
Ungolfed + explanation:
function f(s)
    # Split s into an array on newlines
    p = split(s, "\n")

    # Get the smallest amount of leading space by finding the
    # position of the first non-space character on each line
    # and taking the minimum
    m = min([search(j, r"\S")[1] for j in p]...)

    # Print each line starting after m
    for i in p
        println(i[m:end])
    end
end

You can save some space by looking for the first non-space, rather than counting the number of spaces. Rather than minimum([length(search(j, r"^ +")) for j in p])+1, use minimum([search(j,r"[^ ]")[1]for j=p]). Since the challenge states that all lines will have non-space text, it's safe, and saves you 9 bytes (including 3 saved by using = instead of in). Still looking to see if more can be saved. (I wish I could drop the [1], but search produces an enumerator array of type Any, while minimum requires an Int type)

Excuse the mistake above - apparently, I've used up my edits - it's not 9 bytes, but 6, because I failed to note that you'd used = in the golfed form. Anyway, I can save two more characters by defining p in starting the for loop: s->for i=(p=split(s,"\n")) println(i[minimum([search(j,r"[^ ]")[1]for j=p]):end])end

OK, here's another one to shave a bit more - rather than using minimum(x) when x is an array, use min(x...), for one extra byte saved (I'm going to add this one to my list of Julia golfing tips).

@GlenO Nice, thanks for the suggestions. Also, since Julia uses PCRE, non-space characters can be matched with \S rather than [^ ], which saves a byte.

Hey, thanks for mentioning that - I'm not good with regex, but it turned out that \S is useful for my solution, too.

Java, 159
Because there's a conspicuous lack of Java...
void f(String...a){int s=1<<30,b;a=a[0].split("\n");for(String x:a)s=(b=x.length()-x.trim().length())<s?b:s;for(String x:a)System.out.println(x.substring(s));}

It's just loops comparing length to trimmed length, then spitting out substrings. Nothing too fancy. For the scrollbar-impaired:
void f(String...a){
    int s=1<<30,b;
    a=a[0].split("\n");
    for(String x:a)
        s=(b=x.length()-x.trim().length())<s?b:s;
    for(String x:a)
        System.out.println(x.substring(s));
}

Perl, 47 33
Thanks @ThisSuitIsBlackNot for suggestion to use Perl's implicit loop
#!/usr/bin/perl -00p
/^( +).*(\n\1.*)*$/&&s/^$1//mg

The above is scored as 30 bytes for the line of code + 3 for 00p flags.
Original version, as a function:
sub f{$_=@_[0];/^( +).*(\n\1.*)*$/&&s/^$1//mgr}

This puts the argument into $_, then attempts to greedily match whitespace that's present on all lines with /^( +).*(\n\1.*)*$/ - if successful, $1 now contains the longest common prefix, and we execute the replacement s/^$1//mgr to delete it from the beginning of every line and return the resulting string.
Test
$ cat 53219.data
   a   b
     c     d
    e f
$ ./53219.pl <53219.data
a   b
  c     d
 e f

Very cool. You can shave off some bytes by running on the command line: perl -00pe '/^( +).*(\n\1.*)*$/&&s/^$1//mg' (30 bytes + 3 for 00p).

/me heads off to look up -00p; thanks @ThisSuit

Python 2, 86 79 75 Bytes
This can almost definitely be shortened some more, but right now it's not bad.
Thanks to xnor for saving 4 bytes!
s=input().split('\n')
for k in s:print k[min(x.find(x.strip())for x in s):]

A slightly shorter way to count leading spaces is x.find(x.strip()).

@xnor good call, thanks! I've been waiting for a 60 byte solution from you all day ;P

input() in Python 2 would choke on this data.

@StevenRumbalski, I assume that input is surrounded by quotes. I used to add 2 to the byte count to account for this, but multiple people have said that I don't need to.

This program is sad: ):

Ruby: 77 73 70 66 65 58 57 40 characters
f=->t{t.gsub /^#{t.scan(/^ */).min}/,""}

Sample run:
irb(main):001:0> f=->t{t.gsub /^#{t.scan(/^ */).min}/,""}
=> #<Proc:0x00000001855948@(irb):1 (lambda)>

irb(main):002:0> puts f["   a   b\n     c     d\n    e f"]
a   b
  c     d
 e f
=> nil

irb(main):003:0> f["   a   b\n     c     d\n    e f"] == "a   b\n  c     d\n e f"
=> true

How about f=->t{t.gsub /^#{t.scan(/^ */).min}/,""}?

That's great, @Ventero. Thank you.

C#, 18 + 145 = 163 bytes
Requires (18 bytes):
using System.Linq;

Method (145 bytes):
string R(string s){var l=s.Split('\n');return string.Join("\n",l.Select(x=>string.Concat(x.Skip(l.Select(z=>z.Length-z.Trim().Length).Min()))));}

The method calculates the lowest amount of leading spaces on the lines and creates a new string built of all lines, with N chars skipped (where N is the previously calculated number).

C#, 149 bytes total
Practically the same solution as ProgramFOX's, although the number of characters to trim is calculated manually.
using System.Linq;

And the function itself:
string D(string s){var l=s.Split('\n');int i=0;while(l.All(a=>a[i]==' '))i++;return string.Join("\n",l.Select(b=>b.Substring(i)));}

@ProgramFOX I hadn't seen your solution until after I refreshed the page btw :o)

bash + sed + coreutils, 74, 56, 55
Test data
s="\
   a   b
     c     d
    e f"

Answer
cut -c$[`grep -o '^ *'<<<"$s"|sort|line|wc -c`]-<<<"$s"

Output
a   b
  c     d
 e f

A few simple golf changes brings this down to 56 in my count: cut -c$[\grep -o '^ *'<<<"$s"|sort|sed q|wc -c`]-<<<"$s"`

@DigitalTrauma: Nice, I forgot about $[] arithmetic. Using cut for column selection is much better. I have never seen sed q as an alternative to head -n1, it is a good golfing trick. Thanks!

Regarding head -n1 vs sed q, there is a line tool in the util-linux package.

@manatwork: That saves one character, I will use it. Note that it is deprecated and might disappear in the future, this is from deprecated.txt in util-linux's source tree: "Why:  useless, nobody uses this command, head(1) is better".

Python 3, 100
def f(s):t=s.split("\n");return"\n".join([c[min([len(c)-len(c.lstrip(" "))for c in t]):]for c in t])

JavaScript, ES6, 89 86 bytes
This one is totally using just RegEx matching and substitutions.

f=x=>eval(`x.replace(/(^|\\n) {${--`
${x}`.match(/\n */g).sort()[0].length}}/g,"$1")`)

// Snippet related stuff
B.onclick=x=>P.innerHTML=f(T.value)
<textarea id=T></textarea>

<button id=B>Trim</button>

As always, Firefox only, since ES6. Will add ES5 version later.

It seems like it'd be shorter to write a Regular Expression literal as a string and then eval it

@vihan1086 you might be right. Let me give it a try.

K, 31 bytes
{`0:(&/{(0;#*=x)@*x}'" "=x)_'x}

Takes input a list of strings and prints the result to stdout.

Haskell, 52 bytes
unlines.until(any(/=' ').map head)(map tail).lines

Usage example: unlines.until(any(/=' ').map head)(map tail).lines $ "   abc\n def\n  ghi" -> "  abc\ndef\n ghi\n"
How it works:
                                           lines    -- split the input at newlines into a list of lines
        until                                       -- repeat the 2nd argument, i.e.
                                 map tails          -- cut off the heads of all lines
                                                    -- until the the first argument returns "True", i.e.
             any(/=' ').map head                    -- the list of heads contains at least one non-space
unlines                                             -- transform back to a single string with newlines in-between

Python, 94/95
lambda (94 bytes):
f=lambda s:'\n'.join(l[min(l.find(l.strip()) for l in s.split('\n')):] for l in s.split('\n'))

def (95 bytes)
def f(s):l=s.split('\n');m=min(i.find(i.strip())for i in l);return '\n'.join(i[m:] for i in l);

R, 118 111 bytes
Using the wonderful string functions of R :)
This is similar/same to other solutions already posted.  Input is through STDIN and cats to STDOUT.
cat(substring(a<-scan(,'',sep='|'),Reduce(min,lapply(strsplit(a,' '),function(x)min(which(x>''))-1))),sep='\n')

Test and explanation
> cat(substring(a<-scan(,'',sep='|'),Reduce(min,lapply(strsplit(a,' '),function(x)min(which(x>''))-1))),sep='\n')
1:                  a<-scan(,'',sep='|') # get the input lines
2:                                                         strsplit(a,' ') # split lines on spaces
3:                                                  lapply(                ,function(x)min(which(x>''))-1) # get min index - 1 for non space of each line
4:                                      ,Reduce(min,                                                      ) # get the min of those
5:        substring(                                                                                ) # trim it off
6:    cat(                                                                                ,sep='\n') # output each line
7:
Read 6 items
              a<-scan(,'',sep='|') # get the input lines
                                                     strsplit(a,' ') # split lines on spaces
                                              lapply(                ,function(x)min(which(x>''))-1) # get min index - 1 for non space of each line
                                  ,Reduce(min,                                                      ) # get the min of those
    substring(                                                                                ) # trim it off
cat(                                                                                ,sep='\n') # output each line
>

Hey, congrats on 3k rep!

@AlexA. Cheers, didn't think it was important to me ... but :)

You mean your life doesn't revolve around fake Internet points? :P

@AlexA. Hopefully not :) congrats on 6k

Julia, 72 62 61 57 54 49 bytes
g=s->ismatch(r"^\S"m,s)?s:g(replace(s,r"^ "m,""))

Ungolfed:
g(s)=
if ismatch(r"^\S"m,s)       # Determines if there's a newline followed by something other than a space
                            # Note: the m in r"^ "m says to work in multiline mode.
    s                       # If there is, return the string as the final result.
else                        # otherwise...
    m=replace(s,r"^ "m,"")  # Remove first space after each newline, and space at start of string.
    g(m)                    # Feed back into the function for recursion
end

Older solution (57 bytes):
g(s)=ismatch(r"
\S","
"s)?s:g(replace(s,"
 ","
")[2:end])

Original solution (72 bytes):
g(s)=all([i[1]<33for i=split(s,"\n")])?g(replace(s,"\n ","\n")[2:end]):s

k (24 bytes)
Takes a string as an argument and returns a string (with trailing new-line).
{`/:(&//&:'~^s)_'s:`\:x}

Example:
k) f:{`/:(&//&:'~^s)_'s:`\:x};
k) f"   a   b\n     c     d\n    e f"
"a   b\n  c     d\n e f\n

05AB1E, 10 bytes
|©ζ®gð*Ûζ»

Try it online!

Wait, * repeats the string b a amount of times?.. Didn't knew about that feature of *. I usually do s∍ (swap and lengthen) when I want to repeat a certain character.

Yes, indeed, that works for strings, mainly because vectorization doesn't quite make sense in the case of strings and и yields a list of characters.

JavaScript (ES6) 56
Recursive, trying to remove one space at a time from each row until a non-space is found.
Test running the snippet below - being ES6, Firefox only

f=s=>(r=s.replace(/^./gm,x=>(k|=x>' ',''),k=0),k?s:f(r))

// Test
test=
[[ "a", "a" ]
,["   abc", "abc" ]
,["   abc\n def\n  ghi", "  abc\ndef\n ghi" ]
,["    a\n    b\n    c", "a\nb\nc" ]
,["    a\n    b\n    c\nd", "    a\n    b\n    c\nd" ]
,["   a   b\n     c     d\n    e f","a   b\n  c     d\n e f" ]]

var tb=''
test.forEach(t=>{
  t[2]=f(t[0])
  t[3]=t[2]==t[1]?'OK':'FAIL'
  tb+='
'+t.join('	')+'
'
})
B.innerHTML=tb
td { white-space: pre; font-family: monospace; border: 1px solid#444; vertical-align:top}
#I,#O { height:100px; width: 200px }
Your test:

<textarea id=I></textarea>
<button onclick='O.innerHTML=f(I.value)'>-></button>

Test cases:

Input	Expected	Output	Result

Gawk, 101 100
{match($0,/^( +)/,t);if(t[1]<s||s==""){s=t[1]};z[NR]=$0;}END{for(r in z){sub(s,"",z[r]);print z[r]}}

For example...
cat input.txt | gawk '{match($0,/^( +)/,t);if(t[1]<s||s==""){s=t[1]};z[NR]=$0;}END{for(r in z){sub(s,"",z[r]);print z[r]}}'

Output...
a   b
  c     d
 e f

Just barely tested hints: don't capture /^( +)/ → /^ +/ (then you will have the needed value in t[0] instead of t[1]); change s=="" → !s; remove the { and } around the code after if; remove the ; before }; using Gawk-specific function to be able to remove the { and } around the code after for: {sub(s,"",z[r]);print z[r]} → print gensub(s,"",1,z[r]).

Sorry to say, but both your original code and the one with my size optimization are failing on input with an unindented line, other than the last one. (For example "␠one\nzero\n␠one\n␠␠two".)

Stacked, noncompeting, 43 bytes
:lines'^ +'match$#'"!MIN' '*0# '^'\+''mrepl

Try it online!
This works by finding the amount of spaces at the beginning of each line ('^ +'match$#'"!), getting the minimum, repeat a space that many times, and replacing that with nothing on each line.

Vim, 33, 31 bytes
qq/\v%^(\s.*\n?)*%$
:%s/.
@qq@q## Heading ##

Try it online!
Old version:
qq:g/\v%^(\s.*\n?)*%$/%s/.
n@qq@q

Stax, 9 bytes
ü═≤+Σî║┘`

Run and debug it

Python 3, 63 bytes
def f(s):return '\n'.join([l.strip() for l in s.splitlines()]);

Welcome to CGCC. For the last test case (for example), your code doesn't give the correct output. It looks like it's removing all spaces at the beginning of lines, not common spaces as required.

CoffeeScript, 112 bytes
f=(x)->(a=x.split "\n").map((v)->v[Math.min.apply(null,a.map((v)->(r=/^ +/.exec v)&&r[0].length))...]).join "\n"

JavaScript (ES6), 106 98 bytes
The newlines are necessary and are counted as 1 byte each:
f=x=>(a=x.split`
`).map(v=>v.slice(Math.min(...a.map(v=>(r=/^ +/.exec(v))&&r[0].length)))).join`
`

Demo
As with other ES6 answers, they only work in Firefox at the moment.

f=x=>(a=x.split`
`).map(v=>v.slice(Math.min(...a.map(v=>(r=/^ +/.exec(v))&&r[0].length)))).join`
`

// For demonstration purposes
console.log = x => X.innerHTML += x + `\n<hr>`;

console.log(f("a"));
console.log(f("   abc"));
console.log(f("   abc\n def\n  ghi"));
console.log(f("    a\n    b\n    c"));
console.log(f("    a\n    b\n    c\nd"));
console.log(f("   a   b\n     c     d\n    e f"));

It would be great if the downvoter could explain…

JavaScript ES6, 85 bytes
s=>s.split`
`.map(z=>z.slice(Math.min(...s.match(/^ */gm).map(l=>l.length)))).join`
`

The new lines are significant
ES5 Demo:

function t(s) {
  return s.split("\n").map(function(z) {
    return z.slice(Math.min.apply(0, s.match(/^ */gm).map(function(l) {
      return l.length;
    })));
  }).join('');
}

// Demo
document.getElementById('go').onclick = function() {
  document.getElementById('r').innerHTML = t(document.getElementById('t').value)
};
Input:

<textarea id="t"></textarea>

<button id="go">Run</button>

Output:


text:
Number of valid mazes
Given a WxH grid, how many possible mazes are there?
Things you know about the maze:

The grid is exactly H squares high and W squares wide.
There are three types of squares: Start, Finish, and Empty.  Your maze must contain exactly 1 Start and 1 Finish, and all remaining squares are Empty.
There are walls surrounding the entire maze.
Walls can exist on the edge between any two squares, unless it breaks the below rule:
There must exist a path from the Start square to the Finish square.

Therefore, given two numbers, W and H, you must return a single number representing the number of possible square/wall configurations.  You are guaranteed that W*H > 1
For example, the 2x2 maze has exactly 100 different possible configurations.
This is a code-golf so the shortest answer wins!

Are there any constraints on size and/or runtime? Unless somebody finds an algorithm that can calculate the count efficiently (which looks tough), I expect that most solutions will have exponential runtime. Meaning, that they will implode at even moderate sizes.

@RetoKoradi no, no runtime constraints.  I'm not sure if constraints would make the problem impossible or not.

Python 2, 329 310 bytes
from itertools import*
w,h=input()
R=range(w*h)
p=product
n=0
Z=[(x,y)for x,y in p(R,R)if abs(x%w-y%w)+abs(x/w-y/w)<2]
for s,f,W in p(R,R,p(*[((),z)for z in Z if z[0]<z[1]])):
 V={s};C=[s];v=0
 while C:
  c=C.pop();v|=c==f!=s;V|={c}
  for o,q in Z:C+=(c==o)*len({q,(o,q),(q,o)}-(V|set(W)))/3*[q]
 n+=v
print n

This is the golfed (and much more inefficient) version of the program I was using while discussing the problem with @Nathan. I can save a few bytes by replacing some space indents with tabs, but I'll save that for later.
The algorithm is simply generate every maze, then flood fill from the start, seeing if we pass the finish at some point or not.


text:
Optimizing SKI compiler
The SKI calculus is a variant of the Lambda calculus that doesn't use lambda expressions. Instead, only application and the combinators S, K, and I are used. In this challenge, your task is to translate SKI terms into Lambda terms in β normal form.

Input Specification
The input is an SKI term in the following textual representation. You may choose to receive an optional trailing newline. The input is composed of the characters S, K, I, (, and ) and satisfies the following grammar (in ABNF form) with sterm being the start symbol:
sterm = sterm combinator     ; application
sterm = combinator           ;
sterm = '(' sterm ')'        ; grouping
combinator = 'S' | 'K' | 'I' ; primitives

Output Specification
The output is a lambda term with no free variables in the following textual representation. You may choose to output an optional trailing newline. The output shall satisfy the following grammar in ABNF form with lterm being the start symbol:
lterm   = lterm operand     ; application
lterm   = ALPHA '.' lterm   ; lambda
lterm   = operand
operand = '(' lterm ')'     ; grouping
operand = ALPHA             ; variable (a letter)

Constraints
You may assume that the input has a β normal form. You may assume that the β normal form uses at most 26 different variables. You may assume that both input and output are representable in 79 characters.
Sample inputs
Here are a couple of sample inputs. The output is one possible output for the given input.
input                        output
I                            a.a
SKK                          a.a
KSK                          a.b.c.ac(bc)
SII                          a.aa

Scoring
The shortest solution in octets wins. Common loopholes are prohibited.

+1 because I assume this is a cool challenge; I didn't understand a word of it.

Ah, I should golf my ski.aditsu.net :)

You should probably state that both sterm and lterm use left-associativity when brackets are missing.

@PeterTaylor Better this way?

No, I think that's actually wrong: following that changed grammar I would parse SKI as S(KI).

@PeterTaylor That's right. Let me fix it once again.

Shouldn't the rule for lambdas in the output grammar be lterm   = ALPHA '.' lterm? I don't think (ab).c should be valid.

@Mauris You are right. Grammar is my weak spot.

Do you also accept lterm = ALPHA or operand = '(' ALPHA ')' ? Or are they invalid?

@aditsu Yes. I fixed the grammar.

Haskell, 232 bytes
data T s=T{a::T s->T s,(%)::s}
i d=T(i. \x v->d v++'(':x%v++")")d
l f=f`T`\v->v:'.':f(i(\_->[v]))%succ v
b"S"x=l$l.(a.a x<*>).a
b"K"x=l(\_->x)
b"I"x=x
p?'('=l id:p
(p:q:r)?')'=a q p:r
(p:q)?v=a p(l$b[v]):q
((%'a')=<<).foldl(?)[l id]

Try it online!
How it works
This is a different parser frontend to my answer to “Write an interpreter for the untyped lambda calculus”, which also has an ungolfed version with documentation.
Briefly, Term = T (Char -> String) is the type of lambda calculus terms, which know how to apply themselves to other terms (a :: Term -> Term -> Term) and how to display themselves as a String ((%) :: Term -> Char -> String), given an initial fresh variable as a Char.  We can convert a function on terms to a term with l :: (Term -> Term) -> Term, and because application of the resulting term simply calls the function (a (l f) == f), terms are automatically reduced to normal form when displayed.

Python 2, 674
exec u"""import sys
$ V#):%=V.c;V.c+=1
 c=97;p!,v,t:[s,t.u({})][v==s];r!:s;u!,d:d.get(s,s);s!:chr(%)
 def m(s,x):%=min(%,x);-(%==x)+x
$ A#,*x):%,&=x
 C='()';p!,x,y:s.__$__(%.p/,&.p/);m!,x:&.m(%.m(x));u!,d:A(%.u(d),&.u(d));s!:%.s()+s.C[0]+&.s()+s.C[1:]
 def r(s):x=%.r();y=&.r();-x.b.p(x.a,y).r()if'L'in`x`else s.__$__/
$ L(A):C='.';u!,d:L(d.setdefault(%,V()),&.u(d))
x=V();y=V();z=V()
I=L(x,x)
K=L(y,L/)
S=L(x,L(z,L(y,A(A/,A(z,y)))))
def E():
 t=I
 while 1:
    q=sys.stdin.read(1)
    if q in')\\n':-t
    t=A(t,eval(max(q,'E()')).u({}))
t=E().r()
t.m(97)
print t.s()""".translate({33:u'=lambda s',35:u':\n def __init__(s',36:u'class',37:u's.a',38:u's.b',45:u'return ',47:u'(x,y)'})

Note: after while 1:, 3 lines are indented with a tab character.
This is basically the code behind http://ski.aditsu.net/ , translated to python, greatly simplified and heavily golfed.
Reference: (this is probably less useful now that the code is compressed)
V = variable term
A = application term
L = lambda term
c = variable counter
p = replace variable with term
r = reduce
m = final variable renumbering
u = internal variable renumbering (for duplicated terms)
s = string conversion
(parameter s = self)
C = separator character(s) for string conversion
I,K,S: combinators
E = parse
Examples:
python ski.py <<< "KSK"
a.b.c.a(c)(b(c))
python ski.py <<< "SII"
a.a(a)
python ski.py <<< "SS(SS)(SS)"
a.b.a(b)(c.b(c)(a(b)(c)))(a(d.a(d)(e.d(e)(a(d)(e))))(b))
python ski.py <<< "S(K(SI))K"
a.b.b(a)
python ski.py <<< "S(S(KS)K)I"
a.b.a(a(b))
python ski.py <<< "S(S(KS)K)(S(S(KS)K)I)"
a.b.a(a(a(b)))
python ski.py <<< "K(K(K(KK)))"
a.b.c.d.e.f.e
python ski.py <<< "SII(SII)"
[...]
RuntimeError: maximum recursion depth exceeded

(this ↑ is expected because SII(SII) is irreducible)
Thanks Mauris and Sp3000 for helping to kill a bunch of bytes :)

I'm pretty sure you can turn def m(a,b,c):return foo into m=lambda a,b,c:foo even inside classes, which might save you lots of bytes.

@Mauris thanks for the tip :)

I fail to read a.b.c.a(c)(b(c)) as a valid lambda expression: what is (c)?

@coredump it's an operand with unnecessary grouping... and you're right, it doesn't exactly match the OP's grammar rules. I wonder how important it is; I'll ask.

@coredump It should be ok now with the updated grammar.

Ruby, 323 bytes
I can't believe this piece of crap works at all:
h={};f=96;z=gets.chop
{?S=>'s0.t0.u0.s0u0(t0u0)',?K=>'k0.l0.k0',?I=>'i0.i0'}.each{|k,v|z.gsub!k,?(+v+?)}
loop{z=~/\((?<V>\w1*0)\.(?<A>(?<B>\w1*0|[^()]|\(\g<B>+\))+)\)(?<X>\g<B>)/
s=$`;t=$';abort z.gsub(/\w1*0/){|x|h[x]=h[x]||(f+=1).chr}if !t
z=$`+?(+$~[?A].gsub($~[?V],$~[?X].gsub(/\w1*0/){|a|s[a]?a:a.gsub(?0,'10')})+?)+t}

Using regex substitution to perform β-reduction on raw strings is some Tony-the-Pony stuff. Nonetheless, its output looks correct at least for easy testcases:
$ echo 'I' | ruby ski.rb
(a.a)
$ echo 'SKK' | ruby ski.rb
(a.(a))
$ echo 'KSK' | ruby ski.rb
((a.b.c.ac(bc)))
$ echo 'SII' | ruby ski.rb
(a.(a)((a)))

Here's it handling K(K(K(KK))) with some debug output, which takes about 7 seconds on my laptop, because regular expression recursion is slow. You can see its α-conversion in action!
$ echo 'K(K(K(KK)))' | ruby ski.rb
"(l0.((k10.l10.k10)((k10.l10.k10)((k10.l10.k10)(k10.l10.k10)))))"
"(l0.((l10.((k110.l110.k110)((k110.l110.k110)(k110.l110.k110))))))"
"(l0.((l10.((l110.((k1110.l1110.k1110)(k1110.l1110.k1110)))))))"
"(l0.((l10.((l110.((l1110.(k11110.l11110.k11110))))))))"
(a.((b.((c.((d.(e.f.e))))))))

I get: ski.rb:4:in `gsub': wrong argument type nil (expected Regexp) (TypeError) with the 'I' example

Should be fixed now! I had already corrected it locally, but forgot to edit my post.

Ok, it's s........l.......................o...........w, but it seems to work.... eventually :) I think the result for S(K(SI))K is not correct though.

Common Lisp, 560 bytes
"Finally, I found a use for PROGV."
(macrolet((w(S Z G #1=&optional(J Z))`(if(symbolp,S),Z(destructuring-bind(a b #1#c),S(if(eq a'L),G,J)))))(labels((r(S #1#(N 97))(w S(symbol-value s)(let((v(make-symbol(coerce`(,(code-char N))'string))))(progv`(,b,v)`(,v,v)`(L,v,(r c(1+ n)))))(let((F(r a N))(U(r b N)))(w F`(,F,U)(progv`(,b)`(,U)(r c N))))))(p()(do((c()(read-char()()#\)))q u)((eql c #\))u)(setf q(case c(#\S'(L x(L y(L z((x z)(y z))))))(#\K'(L x(L u x)))(#\I'(L a a))(#\((p)))u(if u`(,u,q)q))))(o(S)(w S(symbol-name S)(#2=format()"~A.~A"b(o c))(#2#()"~A(~A)"(o a)(o b)))))(lambda()(o(r(p))))))

Ungolfed
;; Bind S, K and I symbols to their lambda-calculus equivalent.
;;
;; L means lambda, and thus:
;;
;; -  (L x S) is variable binding, i.e. "x.S"
;; -  (F x)   is function application

(define-symbol-macro S '(L x (L y (L z ((x z) (y z))))))
(define-symbol-macro K '(L x (L u x)))
(define-symbol-macro I '(L x x))

;; helper macro: used twice in R and once in O

(defmacro w (S sf lf &optional(af sf))
  `(if (symbolp ,S) ,sf
       (destructuring-bind(a b &optional c) ,S
         (if (eq a 'L)
             ,lf
             ,af))))

;; R : beta-reduction

(defun r (S &optional (N 97))
  (w S
      (symbol-value s)
      (let ((v(make-symbol(make-string 1 :initial-element(code-char N)))))
        (progv`(,b,v)`(,v,v)
              `(L ,v ,(r c (1+ n)))))
      (let ((F (r a N))
            (U (r b N)))
        (w F`(,F,U)(progv`(,b)`(,U)(r c N))))))

;; P : parse from stream to lambda tree

(defun p (&optional (stream *standard-output*))
  (loop for c = (read-char stream nil #\))
        until (eql c #\))
        for q = (case c (#\S S) (#\K K) (#\I I) (#\( (p stream)))
        for u = q then `(,u ,q)
        finally (return u)))

;; O : output lambda forms as strings

(defun o (S)
  (w S
      (princ-to-string S)
      (format nil "~A.~A" b (o c))
      (format nil (w b "(~A~A)" "(~A(~A))") (o a) (o b))))

Beta-reduction
Variables are dynamically bound during reduction with PROGV to new Common Lisp symbols, using MAKE-SYMBOL. This allows to nicely avoid naming collisions (e.g. undesired shadowing of bound variables). I could have used GENSYM, but we want to have user-friendly names for symbols. That is why symbols are named with letters from a to z (as allowed by the question). N represents the character code of the next available letter in current scope and starts with 97, a.k.a. a.
Here is a more readable version of R (without the W macro):
(defun beta-reduce (S &optional (N 97))
  (if (symbolp s)
      (symbol-value s)
      (if (eq (car s) 'L)
          ;; lambda
          (let ((v (make-symbol (make-string 1 :initial-element (code-char N)))))
            (progv (list (second s) v)(list v v)
              `(L ,v ,(beta-reduce (third s) (1+ n)))))
          (let ((fn (beta-reduce (first s) N))
                (arg (beta-reduce (second s) N)))
            (if (and(consp fn)(eq'L(car fn)))
                (progv (list (second fn)) (list arg)
                  (beta-reduce (third fn) N))
                `(,fn ,arg))))))

Intermediate results
Parse from string:
CL-USER> (p (make-string-input-stream "K(K(K(KK)))"))
((L X (L U X)) ((L X (L U X)) ((L X (L U X)) ((L X (L U X)) (L X (L U X))))))

Reduce:
CL-USER> (r *)
(L #:|a| (L #:|a| (L #:|a| (L #:|a| (L #:|a| (L #:|b| #:|a|))))))

(See trace of execution)
Pretty-print:
CL-USER> (o *)
"a.a.a.a.a.b.a"

Tests
I reuse the same test suite as the Python answer:
        Input                    Output              Python output (for comparison)

   1.   KSK                      a.b.c.a(c)(b(c))    a.b.c.a(c)(b(c))
   2.   SII                      a.a(a)              a.a(a)
   3.   S(K(SI))K                a.b.b(a)            a.b.b(a)
   4.   S(S(KS)K)I               a.b.a(a(b))         a.b.a(a(b))
   5.   S(S(KS)K)(S(S(KS)K)I)    a.b.a(a(a(b)))      a.b.a(a(a(b)))
   6.   K(K(K(KK)))              a.a.a.a.a.b.a       a.b.c.d.e.f.e
   7.   SII(SII)                 ERROR               ERROR

The 8th test example is too large for the table above:
8.      SS(SS)(SS)
CL      a.b.a(b)(c.b(c)(a(b)(c)))(a(b.a(b)(c.b(c)(a(b)(c))))(b))
Python  a.b.a(b)(c.b(c)(a(b)(c)))(a(d.a(d)(e.d(e)(a(d)(e))))(b))

EDIT I updated my answer in order to have the same grouping behavior as in aditsu's answer, because it costs less bytes to write.
The remaining difference can be seen for tests 6 and 8. The result a.a.a.a.a.b.a is correct and does not use as much letters as the Python answer, where bindings to a, b, c and d are not referenced.

Performance
Looping over the 7 passing tests above and collecting the results is immediate (SBCL output):
Evaluation took:
  0.000 seconds of real time
  0.000000 seconds of total run time (0.000000 user, 0.000000 system)
  100.00% CPU
  310,837 processor cycles
  129,792 bytes consed

Doing the same test a hundred of times lead to ... "Thread local storage  exhausted" on SBCL, due to a known limitation regarding special variables. With CCL, calling the same test suite 10000 times takes 3.33 seconds.

That's a neat solution!


text:
Convert Chevrons to Soliduses
Write a program that takes in a string containing only spaces, newlines, and angle brackets: <, > (chevrons). Output a string of spaces, newlines, and slashes: /, \ (soliduses) whose shapes correspond to the input, but rotated a quarter turn clockwise, with a column of spaces inserted between each row of the original input (for aesthetics).
For example, if the input is this:
<>

The output would be this:
/\
\/

If the input is this:
><<<>
 <><

The output would be this:
   \/
/\ /\
\/ /\
/\ /\
   \/

If the input is this:
>>  <<
<>  <>
  <
  ><

The output would be this:
      /\ \/
      \/ \/
\/ /\
/\
      /\ /\
      \/ /\

Notice how there is a single column of spaces between the original input rows in the last two examples.
You may write a full program that takes the input in any usual way (command line, stdin) and prints the output, or you may write a function with a string argument, that prints or returns the output.
Empty leading and trailing rows or columns of whitespace in the input do not need to be present in the output. Additionally, there may be any amount of leading and/or trailing spaces and/or newlines in the output, in any locations, as long as the resulting shapes are correct. In other words, the translation of the ascii art does not matter, only the shapes and their relation to one another do.
You may optionally assume the input has a trailing newline.
The shortest code in bytes wins.

May we assume the input is rectangular, and has trailing whitespace?

@orlp No. You can assume a trailing newline, but it's not necessarily rectangular.

CJam, 35 bytes
qN/_s,S*f+{iD%[S3*" \/"_$]=}f%W%zN*

Try it online here

I had almost exactly the same code, but without that clever $ trick, it was still 37 bytes long...

That $ trick has saved my life a lot of times already ;)

Python 2, 105 bytes
def f(s):
 for row in map(None,*s.split("\n")):print" ".join("\/ /\ "[1-cmp(c,"<")::3]for c in row[::-1])

For all the wrong reasons, this has got to be one of the nicest uses of map(None, ...) I've had so far. The output even pads to perfect rectangle.
Let's take the second example:
><<<>
 <><

map(None,*s.split("\n")) performs a poor man's zip_longest, giving:
[('>', ' '), ('<', '<'), ('<', '>'), ('<', '<'), ('>', None)]

Notice how the second line is shorter than the first, so we get a None at the end. Normally this would be a problem, but for some reason almost everything is comparable in Python 2, and in particular
>>> None < ""
True

This means that the expression 1-cmp(c,"<") returns 0, 1, 2 for ">", "<", None respectively, allowing us to use the string slicing trick to extract one of "\/", "/\", "  ". Using this, we print the output line by line, joining the 2-char groups with spaces.

+1 This is the solution I saw in my head when I read the question, shouldn't be surprised it was already here :P

Jelly, 19 bytes
Ỵz⁶UµOHØ^ṙaf⁶;`$)€G

Try it online!
While I was writing this, it tormented me to no end that the whole mess with af⁶;`$ could just be «, if the codepoint of backslash were somewhere closer to the ballpark of its forward companion. This can definitely be golfed further.
Ỵ                       Split the input on newlines.
 z⁶                     Transpose with space as filler.
   U                    Reverse each row.
    µ            )€     For each character in each row:
       Ø^ṙ              rotate "/\" by
      H                 half of
     O                  the character's codepoint;
          a             vectorizing logical and with
             ;          concatenate
           f⁶  $        the character filtered to spaces
              `         to itself.
          a             (The slashes are unaffected if the filter removes everything.)
                   G    Grid format: this builtin can do a lot of things,
                        but in this case it joins each row on spaces
                        then joins the rows on newlines.

CJam, 37 bytes
qN/_z,S*f{+"< >""/\    \/ "3/er}W%zN*

Try it online in the CJam interpreter.
How it works
qN/                                   e# Read from STDIN and split at linefeeds.
   _z,                                e# Zip a copy and push the results length.
                                      e# This computes the maximum line length.
      S*                              e# Repeat " " that many times.
        f{                     }      e# For each line:
                                      e#   Push the string of spaces.
          +                           e#   Append it to the line.

           "< >""/\    \/ "3/         e#   Push "< >" and ["/\ " "   " "\/ "].
                             er       e#   Perform transliteration.
                                W%z   e# Reverse the lines and zip.
                                      e# This rotates by 90 degrees.
                                   N* e# Join, separating by linefeeds.

Vyxal, 21 bytes
ƛ`<> `k/m6↲ǒĿð+;Ṙ∩øɽ⁋

Try it Online!
ƛ              ;      # For each line
            Ŀ         # Replace
 `<> `                # Each of "<> "
      k/m6↲ǒ          # with corresponding elements of "/\", "\/", "  "
             ð+       # Append a space to each
                Ṙ∩    # Rotate 90°
                  øɽ⁋ # Right align and join by newlines

"You can assume a trailing newline, but it's not necessarily rectangular."

@UnrelatedString Ok, the second one then.

vyxal jar! vyxal jar!

@lyxal I'm glad you approve.

Husk, 30 bytes
mȯσ" ""  "σ"<""/¦"σ">""¦/"T' ↔

Try it online!
I made the clunkiest possible solution.

Stax, 19 bytes
Çºòî@f┬U☺≥•:Γ_ƒ←⌠Φô

Run and debug it

Scala, 201 188 180 characters
(s:String)⇒(Seq("")→0/:s.lines.flatMap(l⇒Seq(l,l))){case((v,i),l)⇒(l.map(c⇒if(Set('>','<')(c))if(c%4==i)'/'else'\\'else c)+:v,2-i)}._1.init.transpose.map(_.mkString).mkString("\n")

note:
this only works if the provided string has all lines with equal length (i.e. padded with spaces)
explanation:
I'm using fold with initial value of tuple of a Seq[String] and an Int (instead of writing Seq.empty[String] im writing the shorter Seq("") and .init after the fold), the fold operates on a collection of strings, each string is a line in the original input, and every line is doubled. the trick here was to test for modulo of the char. since '<' value is 60, and '>' value is 62, testing for modulo 4, will yield 0 or 2. that's why the fold also carry a flipping Int set to 0. and flipped between 0 and 2 with 2-i. every odd line should map '>' to '/' and '<' to '\\', and every even line should map '>' to '\\' and '<' to '/'. this is why i test for c%4==i and hit 2 birds with 1 stone. the fold "rebuilds" the initial sequence of strings in reverse, and then (after dropping the last line), I transpose the sequence (this is why all strings must be of exact same length). because of the implicits involved, I need to _.mkString on each line (previously column), and then mkString("\n") for the final output.

Perl - 119
@l=map[/./g],reverse<>;do{print;$_=join(' ',map({'<'=>'/\\','>'=>'\/'}->{$_->[$b]}||'  ',@l))."\n";$b++;}while(/[^
]/)

First, @l is assigned as a list of lists representing the characters on each line of input with lines in reverse order. Then it loops through the columns of characters, replacing the angle brackets with the corresponding slashes, joining the elements with spaces, and printing the joined slashes as a line.


text:
ASCII art compression
The following challenge is basically a simpler version of the one proposed by Dennis (Lossy ASCII art compression). I found the idea super interesting but a bit too convulted, and seeing as it didn't seem to be getting much attention I decided to modify it a little bit.
You'll be downloading 5 ASCII art text files, each of them composed only of the following characters:
@#+';:,.`

Each char represents a different brightness level (1-10 from @ to the whitespace).
Given a quality ratio q, which varies from 0.5 to 0.9 in 0.1 increments, your job is to output a compressed version of each ASCII file, while making those files able to decompress themselves.
That is to say, ImageX.txt is compressed by Program.py into CompImageX-xx.cpp (xx being the quality of the compressed image). Once CompImageX-xx.c is executed, a final decompressed image ImageX-xx.txt is created.
The .py and .c extensions are just an example, you can write the compressor and compressed images in any language that you want (doesn't have to be the same language for both, but you can't use different languages for different images).
The quality changes the image output in a relatively simple way. We'll call the array of usable chars Arr. Each char of ImageX becomes Arr[RoundHalfDown((Arr.Index(char)*q))], with the exception of the whitespace which remains the same no matter the quality.
RoundHalfDown(0.6) = RoundHalfDown(0.7) = RoundHalfDown(1) = 1

RoundHalfDown(0.5) = RoundHalfDown(0.4) = RoundHalfDown(0) = 0

For a short example:
 '#;@

at q=0.5 would become
 #@+@`

You have to implement your own compressor, can't use any libraries that handle it for you.
You can view the images here and download them from here.
Your score is the square root of the size of your compressor, multiplied by the sum of the size of all the compressed files --> sqrt(c)*sum(f). Lowest score wins.
USER                    LANGUAGE                    SCORE
Dennis                  CJam                        1046877

If I'm correctly interpreting it, Arr[RoundHalfDown((Arr.Index(char)*q))] is hideous. With q=0.4 you're mapping 1 2 3 4 5 6 7 8 9 10 to 1 2 2 3 3 3 4 4 5 10. You would actually get a better quality reduction by mapping them to 1 1 4 4 4 7 7 7 10 10, which uses fewer output values but spaces them evenly across the brightness. Unless you're assuming a crazy gamma value in the input images?

Arrays are zero indexed.

CJam → CJam, score 1046877.4413
I'm not going to participate in my own challenge, but since this one doesn't contain its core part (figuring out the optimal transformation to make the original image more compressible), here I go:
q"@#+';:,.` ":P9,easdf*.4f+:iPf=S+er_N/z,:L;N-__&W%:Pf#2f+e`{(2b1>}%
e_P,2+b256b:c`P`":P,2+\256b\b{_2,#)_(@a?)+}%{(2-a\2b)*}%e_Pf="L"/N*"

The linefeed is for "readability" only.
It should be possible to improve the score by improving or simplifying the compression.
Summary
e# Read the input and modify the palette according to the quality.

q"@#+';:,.` ":P9,easdf*.4f+:iPf=S+er

e# Compute the line length and the unique characters of the palette.

_N/z,:L;N-__&W%:P

e# Replace each character by its index in the palette, plus two.

f#2f+

e# Perform run-length ecnoding, saving the runs using bijective base-2 numeration.
e# All related code has been adapted from this answer:
e# http://codegolf.stackexchange.com/a/53065

e`{(2b1>}%

e# Convert from base length(palette)+2 to byte array (string).

e_P,2+b256b:c`

e# Push the palette and the code for the decoder.

P`":P,2+\256b\b{_2,#)_(@a?)+}%{(2-a\2b)*}%e_Pf="L"/N*"

Score
$ LANG=en_US
$ for i in {1..5}; do for q in 0.{5..9}; do
> cjam comp.cjam $q < image$i.txt > image-$i-$q.cjam
> done; done
$ wc -c comp.cjam
136 comp.cjam
$ wc -c image*.cjam
 2131 image-1-0.5.cjam
 2248 image-1-0.6.cjam
 2346 image-1-0.7.cjam
 2350 image-1-0.8.cjam
 2446 image-1-0.9.cjam
 3006 image-2-0.5.cjam
 3718 image-2-0.6.cjam
 3894 image-2-0.7.cjam
 3356 image-2-0.8.cjam
 4064 image-2-0.9.cjam
 2949 image-3-0.5.cjam
 2947 image-3-0.6.cjam
 3582 image-3-0.7.cjam
 3784 image-3-0.8.cjam
 3745 image-3-0.9.cjam
 2879 image-4-0.5.cjam
 2887 image-4-0.6.cjam
 3379 image-4-0.7.cjam
 3615 image-4-0.8.cjam
 3537 image-4-0.9.cjam
 4427 image-5-0.5.cjam
 4802 image-5-0.6.cjam
 5536 image-5-0.7.cjam
 6030 image-5-0.8.cjam
 6111 image-5-0.9.cjam
89769 total


text:
Convert a string representation of a number to int[] in C#
What is the shortest C# statement that will convert a string representation of a number to an int[] that contains each digit?
string number = "1234";
number.Array.ConvertAll(line.ToCharArray(), c => Int32.Parse(c.ToString()));
number.ToCharArray().Select(i => Convert.ToInt32(i.ToString())).ToArray();
number.Select(i => Int32.Parse(i.ToString())).ToArray();
number.Select(i => i - '0').ToArray();

Can anyone beat my last approach?

You might want to not specify the language, as this is CodeGolf.

@phase you have to be kidding me. the language is in the title and the tag.

@phase's comment refers to the fact that 99% of the "questions" on this site are actually programming contests. However, the community has decided that language-specific "tips" questions like this one are also on topic.

@Dennis thx for the advice. first post on this site, would normally post on stackoverflow, but that community considers code-golf off topic

@Dennis I was just about to search meta for that! I do think this would be a nice golf question, if it hasn't been asked already.

Substract from unicode: https://ideone.com/Z5S43e :D (http://ru.stackoverflow.com/q/446764/178988)

28 bytes
You can make your last approach a bit shorter by replacing the '0' by 48. You can also strip all unnecessary spaces and use 1-char variable names (for example, number -> n):
n.Select(i=>i-48).ToArray();

Fantastic - really nails the fact that a Char handles arithmatic operators as a Short http://stackoverflow.com/a/1516639/26877

The subtraction could also be replaced by &15 for the same character count.

C# without LINQ, 97 86 82 bytes
var n=Console.ReadLine();int i=n.Length;var o=new int[i];while(i>0)o[--i]=n[i]-48;

I've been hanging in the shadows for a while and wanted to try this out. I'm no golfer, or even that experienced with C#, but I wanted to see how small I could get it on my own, without using LINQ.
It's nothing special, but at least I had my fun.
I wasn't planning on posting this at first, since it's much longer than any good LINQ solution and doesn't really belong here, but I'm kinda curious if there is a shorter way to do it without LINQ.
Edit 1: Instead of int.Parse it now substracts 48 from the char's ASCII code. Well, that's already much better.
2: Now with var instead of string and int[].

Using var instead of string and int[] also saves 4.

76 bytes
number.ToCharArray().Select(var=>Convert.ToInt32(var.ToString())).ToArray();


text:
ASCII Borromean Rings
The Borromean rings are a curious set of three circles, linked such that the removal of any one of them will unlink the other two:

You can make a set for yourself with a couple rubber bands and a binder ring. With more rubber bands, it's easy to make any Brunnian link.
Write a program or function that outputs (prints or returns) this ascii-art representation of Borromean rings:
    +-----+
    |     |
+-----+   |
|   | |   |
| +-|---+ |
| | | | | |
| | +-|---+
| |   | |
+-|---+ |
  |     |
  +-----+

The lines may have trailing spaces and there may be a trailing newline.
The shortest code in bytes wins.

I have to say that this is a pretty hard challenge because of how simple the expected output is

I'm a little disappointed. Thought the challenge would be to take an integer size and output rings of that size.

yeah, I thought so too (program takes int as an input and then draws Brunnian Link with that many components, but that is not unique, maybe a number of crossings?). That kind of program would have to actually do search (or at least trial and error - do these rings interlock and if I remove one, do the go free?) instead of just drawing a fixed picture...

CJam, 53 51 50 49 bytes
Plain old base conversion...
"FÓîÞ¤ÛYËB[¢O²êÍÓ
}²|äG"299b4b"+ -|"f=B/N*

All characters are well in extended ASCII range (ASCII code 1 to 255), so number of characters == number of bytes.
Try it online here and get the original code here

Just curious, where is the newline in your lookup?

@Maltysen I don't have it. B/N* splits by 11 characters and joins be newline

that's coooool.

Pyth - 51 bytes
I'm sure someone's gonna beat this quick, but just a base compression answer cuz I'm feeling lazy. I'll try to write a serious answer soon.
s@L"
 +-|"jC" zB²;¶Ê ¿ïÁ»#-ÌClHõy%|ap"5

Try it here online.
s              Reduce on string concatenation
 @L            Map second arg to index first arg
  "..."        String of all chars (Pyth allows literal newlines)
  j            Base conversion to list
   C           Base conversion 256 -> 10
    "..."      Base 256 string
   5           To Base 5

Pyth, 49 bytes
jbc11s@L"+ -|"jC"Tª]UÊ¨WÕÝ_K¨}ÝÝ÷K¨Ý]Òê]UÕ*¡"4

Demonstration.
This uses base 4 encoding, and chops the string into elevenths, then rejoins them on newlines.

Ruby, 110
-2.upto(8){|i|s=" "*(i%6)+"+-----+"*(1-i%2)+" "*9
6.times{|j|"@d me?K[RR@"[i+2].ord>>j&1>0&&s[j*2]=?|}
puts s}

Something different from straight base conversion.
Ungolfed:
-2.upto(8){|i|                                           #for each line
  s=" "*(i%6)+"+-----+"*(1-i%2)+" "*9                    #load s with "+-----+" (if required!) padded appropriately with leading spaces and with nine trailing spaces.
  6.times{|j|"@d me?K[RR@"[i+2].ord>>j&1>0&&s[j*2]=?|}   #replace characters with | as necessary, according to the 6-bit number encoded by each character in the magic string.
  puts s}                                                #print the line.

Ruby, 117 bytes
Not winning, but I thought it was a cute approach:
puts'    --
    |     |
--  |
|   | |   |
| -||
| | | | | |
| | -|
| |   | |
-||
  |     |
  --'.gsub /-./,'+\0---+ '

BrainFuck, 361 bytes
Here is a little BrainFuck program, only printing char by char.
+++++++++[->>>>++++++++++++++<+++++<+++++<++++<]>----....>--.>.....>-->++++++++++<<<.>>>.<<<<....>>>.<<<.....>>>.>.<<<.>.....<.<...>>>.>.<.<<<...>>>.<<<.>>>.<<<...>>>.>.<.<<<.>.>.>.<...<.<.>>>.>.<.<<<.>>>.<<<.>>>.<<<.>>>.<<<.>>>.<<<.>>>.>.<.<<<.>>>.<<<.>.>.>.<...<.>>>.<.<<<.>>>.<<<...>>>.<<<.>>>.>.<<<.>.>.<...<.<.>>>.>.<<<<..>>>.<<<.....>>>.>.<<<<..>.>.....<.

brainfuck, 282 280 271 bytes
+++++++++++[>++++>+++>+++++++++++>+<<<<-]>->-....<.++.....--.>>>-.<<....>+++.<.....>.>.<<<.++.....--.>...>.>.<.<...>.<.>.<...>.>[.<]>++.>>.<<...--[.>]+++++[<<.<.>>>-]<<.>.<.<.>.<.<.++.>>.<<...--.>>>.<.<.>.<...>.<.>.>.<<<.++.>>.<<...--[.>]<<<..>.<.....>.>.<<..<.++.....--.

Try it online!

Vyxal j, 43 bytes
»⟑|Ḃṗ=›ḟL«w_¬⌊†⁰÷↳ḋ≈∑Ġ«Ṅ⁽ǔ7₇ÞyΠj»`-+| `τ11/

Try it Online!
»...»           # Base-255 compressed number
     `-+| `τ    # Decompress using key `-+| `
            11/ # Divide into 11 pieces
                # join by newlines

Staq, 109 chars
&iiiqi{1" "}{211}{c"| "}{fcc}{o"+-|"}{p"+--"}{r"---+"}{ec;}22pr;22c22epr21ec2f2ecor1effcefor;f2ceor1e2c22e2pr

output:
Executing D:\codegolf\Staq borromean rings.txt

    +-----+
    |     |
+-----+   |
|   | |   |
| +-|---+ |
| | | | | |
| | +-|---+
| |   | |
+-|---+ |
  |     |
  +-----+

Execution complete.
>

Charcoal, 31 bytes
Ｂ⁷¦⁷Ｍ±⁴¦²Ｂ⁷¦⁷Ｍ²¦²Ｂ⁷¦⁷Ｍ²→|Ｍ³¦²¦¹

Try it online!
Link is to verbose version of code.
It's pretty fun to have a box function.
Basically draws three boxes at the required location, and patches the required places.

Haskell, 79 bytes
"]O|f]S]S6|g[:[S[VO1g$S)S*)O1f)])61g&S]RZ|x">>=(mapM(:"|\n -")"+++"!!).fromEnum

Try it online!
A base-5 decompression technique. Each ASCII value in the string is used as an index into the list of parts ["+++", "++|", "++\n", ..., "---"] created by mapM.
Approach
See this tip for Cartesian product with mapM.
At first, I used mapM(\_->"......")"123" to create the decoding list, with some permutation of " +-|\n" in place of the dots. The best permutations (yielding the shortest encoded string literals) gave 83-byte solutions:
">:]P>H>F+]%FpHpFob[FrHrFr:vPr>r\bvRfH>F=][">>=(mapM(\_->"\n+ -|")"123"!!).fromEnum
">;|i>C>A1|%AWCWAVwyAXCXAX;ciX>X\tckMC>A=|y">>=(mapM(\_->"\n+ |-")"123"!!).fromEnum
"]R>7]b]_%>+_vbv_tH=_wbw_wRp7w]w\ap:gb]_[>=">>=(mapM(\_->"\n+- |")"123"!!).fromEnum
"|k>7|w|s%>1scwcs`C=sbwbsbkW7b|b\aW;Ow|sy>=">>=(mapM(\_->"\n+-| ")"123"!!).fromEnum
"]T|i]X]U1|+UDXDUBryUCXCUCTJiC]C\tJl5X]U[|y">>=(mapM(\_->"\n+| -")"123"!!).fromEnum
"|l]P|r|n+]1nJrJnGX[nHrHnHlDPH|H\bDT6r|ny][">>=(mapM(\_->"\n+|- ")"123"!!).fromEnum

Each contains one low-ASCII byte, \b or \t or \a.
Then I realized I could write mapM(\_->"\n+ -|")"123" as mapM(:"+ -|")"\n\n\n" to save two bytes. But maybe I could save even more bytes if I used a permutation not starting with \n, because "\n\n\n" is pretty long.
Sadly, the permutations not starting with \n yielded bad values making the string literal longer. The best programs are all still 81 bytes:
">6|g>9>:\24|\f:%9%:#mx:$9$:$61g$>$O1f*9>:<|x">>=(mapM(:"| \n-")"+++"!!).fromEnum
">5]O>9>;\18]\f;%9%;#SZ;$9$;$5+O$>$g+M/9>;<]Z">>=(mapM(:"| -\n")"+++"!!).fromEnum
"|f>5|m|l\f>\24l1m1l-9<l.m.l.f%5.|.M%6,m|lx><">>=(mapM(:"|-\n ")"+++"!!).fromEnum
"]M>6]S]T\f>\18T+S+T(9<T)S)T)M%6)])f%50S]TZ><">>=(mapM(:"|- \n")"+++"!!).fromEnum

However, I had another trick up my sleeve: the problem statement allows for trailing spaces on each line, and maybe I could insert 3 trailing spaces in such a way that the string literal becomes one "actual character" longer, but ends up not having stuff like \24 and \f in it.
So I ran a brute force search for all positions to add such trailing spaces. And indeed, adding a trailing space on lines 2, 4, and 6 lets us write the above 79-byte program, where the encoded string is fully printable ASCII.
There are many other permutation-space-placement pairs that tie this one. Here are just a few:
"]O|f]S]SU|x]$])]$O1g$S)S*)O1f)])61g&S]RZ|x" (44,"+|\n -",[1,1,5])
"|g]M|m|m5]Oyz1m1k-SZk.m.k.g+M.|.5+O'm|kx]Z" (44,"+|\n- ",[1,2,2])
">6|fW=>=A|x>)>$>)61f&$9$:$61g$>$O1f*9>:<|x" (44,"+| \n-",[0,1,4])
">5]Mp=>=g]M=G>$>.5+M.9$9'$5+O$>$g+M/9>;<]Z" (44,"+| -\n",[0,2,5])
"|f>5|m|ms><|)|.|)f%60.m.l.f%5.|.M%6,m|lx><" (44,"+|-\n ",[1,1,4])
"]M>5b]+]-><],+S+T(9<T)S)T)M%6)])f%50S]TZ><" (44,"+|- \n",[0,0,2])

I tried a few other things
I tried a few other things. If you pad each line in the target string to "11 characters followed by a newline", then the newlines will only occur at indices ≡ 3 mod 4. In fact, if you look at each k mod 4 and count the unique characters there, they group themselves quite nicely:
target!!k `elem` " +-|"   when k ≡ 0 mod 4.
target!!k `elem` " -"     when k ≡ 1 mod 4.
target!!k `elem` " +-|"   when k ≡ 2 mod 4.
target!!k `elem` " -\n"   when k ≡ 3 mod 4.

So a mixed-base approach is tempting.
Of course, something like mapM id[" +-|"," -"," +-|"," -\n"] is too long, but I played with mapM(`drop`"+|\n- ")[0,3,0,2]. Sadly, the strings just aren't great. The best I could get out of this was 93 bytes.
"³F{³;¥F}¥;/¥1(K//-/={/§9=}9§³9©\130W">>=(mapM(`drop`"||+\n- ")[0,4,1,3]!!).fromEnum

Alternatively, you could try a base-4 approach with different alphabets for each k mod 4. This is easy to express with mapM. I got this 84 byte solution, which would be 70 bytes if Haskell programs used some ANSI encoding rather than UTF-8.
"ÿJ¤ÿ?ðJ§ð?3ð6*p3303B¤3ó<B§<óÿ<öª|">>=(mapM(:"+- ")"|-|\n"!!).fromEnum

Python 3, 139 bytes
This is the closest I can get to printing it directly (which would be 134 bytes) without actually doing so.... I'm not sure how to shorten it any more.
a='+-----+'
b='+-|---+'
c=' '*4
d='| '
e=c+d
print(c+a,e*2,a+e[1:],"|   | "*2,d+b+" |",d*6,d+d+b,"| |   "*2,b+" |",e[2:]+e,"  "+a,sep='\n')