text:
Play a Song for Me
Challenge
Given guitar tablature you must output the song represented by the tab. This may be to the speakers of your computer or to an audio file (.wav, .mp3, .midi, .aiff, etc.). There will also be a second input for timing.
The tabs may be input via a file or straight to STDIN. The tab will be in ASCII form.
Spec
All tabs are for 6 six string guitars with standard E tuning: E2 (82.41 Hz), A2 (110.00 Hz), D3 (146.83 Hz), G3 (196.00 Hz), B3 (246.94 Hz), E4 (329.63 Hz).
The only techniques (besides normal picking) you have to cater for are:

Bending (this will always be a half tone bend)
Hammering on
Pulling off
Sliding up/down

Since you cannot synthesise the sound of a muted string, treat x as a -.
When  bending, output the full transition from unbent to string to bent to unbent again.
The second input will be the time that each symbol on the tab represents in seconds. For example:
For input:
e|---
B|---
G|---
D|---
A|---
E|---

With timing 0.5, because there are 3 columns of symbols (but no notes), the outputted audio file is (3*0.5=1.5) 1.5 seconds of silence.
Example tabs
1 - The Weight (Jack White, Jimmy Page + The Edge edition)
e|----3-----3---3----2---------3--------------------|
B|----3-----3---3----3--1-1----3--------------------|
G|----0-----0---0----2--0-0----0--------------------|
D|----0-----0---2-------2-2----0--------------------|
A|----2-----0---2-------3-3----2--------------------|
E|----3-----2---x----2--x-x----3--------------------|

2 - Smells Like Teen Spirit
e|--------------|---------------|-------------|-------------|
B|--------------|---------------|-------------|-------------|
G|-----8h10-----|-8-8b----6--5--|-6--5--------|-------------|
D|-10--------6--|---------------|-------8-6-8-|-8b----6--5--|
A|--------------|---------------|-------------|-------------|
E|--------------|---------------|-------------|-------------|

3 - Star Spangled Banner
e|---0-------2-5---9-7-5-----------9-7-5-4-2-4-5------|
B|-----2---2-------------2-4-5---5---------------5-2--|
G|-------2-------------------------------------------2|
D|----------------------------------------------------|
A|----------------------------------------------------|
E|----------------------------------------------------|

I added a few more decimal places to your frequencies. Given that one semitone = 1 fret is a ratio of 1.059463:1 (i.e. a difference of about 6%) tuning to the nearest 1Hz is not precise enough to get a good in-tune sound. Of course being a popularity contest, poor tuning may be admissible but it won't win.

Very creative contest! After I looked at the link to ASCII form, I could understand example 2 (since I've heard the song), but because I don't know guitar, I think the challenge has a high learning curve. I also have little experience with audio manipulation other than basic usage of Audacity.

Does MIDI count as an 'audio file'?

@orlp Yes, it does

I clearly failed. I should have googled guitar tablature before I made my program. I thought that the numbers meant how long the note lasted.

@GrantDavis I tried that for Smells Like Teen Spirit but all I could hear was clicks every time the cursor moved...

@BetaDecay Strange. It works on my Computer. Either way, I will be updating the program, now that I have learned more about guitar tabs.

@GrantDavis Hm maybe it was because I was using Firefox on Ubuntu... Anyway, do you think I should add something about the numbers on the tab itself into the question?

Well for future reference: v*(2^(f/12))=x; v=frequency of string; f=Fret (the number on the tab); x=frequency played; Tabs also do not tell you the length of a note; your program need to be smart.

@GrantDavis I expect you not to consider the length of the note, that's just based upon the player's judgement as to whether it sounds right or not

MATLAB
This is sort of unfinished.  I used a quick and dirty method to make the audio as easily as possible.  The method I used made it difficult to implement the bending/hammering (I also had never heard those words in this context before).
Having said all of that, this script will read in a text file called "inputs.txt" containing the ascii-tab as required and play the song.

%timing
t=0.25;  %of course, this line could be 't=input('timing: ');
        %if you make t a wonky value such that t*8192 is not an integer, some
        %stuff will fail
%frequencies and extra variables to allow some laziness later
e = 329.63;eN = 1;
B = 246.94;BN = 2;
G = 196.00;GN = 3;
D = 146.83;DN = 4;
A = 110.00;AN = 5;
E = 82.41;EN = 6;
%this will store the song in a more computer friendly way
song = zeros(1,6);
%function to get frequency from v=frequency and f=fret
w=@(v,f)v*(2^(f/12));
%get input and start the big loop
file = fopen('input.txt');
line = fgetl(file);
while ischar(line)
    %the first character of the line will give us the the line frequency
    lfreqv = eval(line(1));         %frequency
    lfreqN = eval([line(1),'N']);   %horizontal index of frequency
    %start the small loop over each line
    for k = 3:(numel(line))-1
        if (strcmp(line(k),'-'))||(strcmp(line(k),'|'))||(strcmp(line(k),'h'))||(strcmp(line(k),'b'))
            song(k-2,lfreqN) = 0;
        else
            song(k-2,lfreqN) = w(lfreqv,double(line(k)));
        end
    end
    line = fgetl(file);
end
fclose(file);
%this will hold the song
tune = [];
vols = zeros(1,6);
playf = zeros(1,6);
for songIndex = 1:size(song,1)
    ctune = [];
    for k=1:6
        if song(songIndex,k) == 0
            vols(k) = 2*vols(k)/4;
        else
            vols(k) = 1;
            playf(k) = song(songIndex,k);
        end
        ctune(k,1:t*8192)=vols(k)*sin(0.5*pi*playf(k)*(1:(t*8192))/8192);
    end
    tune = [tune ctune];
end
soundsc(sum(tune));

Here is a link to the sound of the first test input.
Here is a link to the sound of the third test input. (Star Spangled Banner or Ice Cream Truck?)
The second test input sounded pretty bad to me, but that may be because it uses a lot of bs and hs which the script ignores.
As you can hear, the output is not quite the same quality as the original.  It sort of sounds like there's a metronome playing in the background.  I think these tunes have character.

Wow, that sounds like a music box... Really nice!

Python 3
I had to try this one.
This converts a tab to a midi file as played by a piano.
I have no idea how to do a string bending on a piano, so it can't do that, but hammer-on's and pull-off's are straightforward.
I generated the test files like so: $ python3 tab.py The-weight.txt 0.14 where 0.14 is the length of a single note in seconds.
from midiutil.MidiFile3 import MIDIFile
import sys

# Read the relevant lines of the file
lines = []
if len(sys.argv) > 1:
    filename = sys.argv[1]
    try:
        beats_per_minute = 60 / float(sys.argv[2])
    except:
        beats_per_minute = 756
else:
    filename = 'mattys-tune.txt'
    beats_per_minute = 756
with open(filename) as f:
    for line in f:
        if len(line) > 3 and (line[1] == '|' or line[2] == '|'):
            line = line.replace('\n', '')
            lines.append(line)
assert len(lines) % 6 == 0

# Initialize the MIDIFile object (with 1 track)
time = 0
duration = 10
volume = 100
song = MIDIFile(1)
song.addTrackName(0, time, "pianized_guitar_tab.")
song.addTempo(0, time, beats_per_minute)

# The root-pitches of the guitar
guitar = list(reversed([52, 57, 62, 67, 71, 76])) # Assume EADGBe tuning
def add_note(string, fret):
    song.addNote(0, string, guitar[string] + fret, time, duration, volume)

# Process the entire tab
for current in range(0, len(lines), 6):  # The current base string
    for i in range(len(lines[current])): # The position in the current string
        time += 1
        for s in range(6):               # The number of the string
            c = lines[current + s][i]
            try: next_char = lines[current + s][i + 1]
            except: next_char = ''
            if c in '-x\\/bhp':
                # Ignore these characters for now
                continue
            elif c.isdigit():
                # Special case for fret 10 and higher
                if next_char.isdigit():
                    c += next_char
                    lines[current + s] = lines[current + s][:i+1] + '-' + lines[current + s][i+2:]
                # It's a note, play it!
                add_note(s, int(c))
            else:
                # Awww
                time -= 1
                break

# And write it to disk.
def save():
    binfile = open('song.mid', 'wb')
    song.writeFile(binfile)
    binfile.close()
    print('Done')
try:
    save()
except:
    print('Error writing to song.mid, try again.')
    input()
    try:
        save()
    except:
        print('Failed!')

The code is on github too, https://github.com/Mattias1/ascii-tab, where I also uploaded the result of the examples provided by the OP.
I also tried it on some of my own tabs. It's quite weird to hear a piano play it, but it's not bad.
Examples:
I added some direct links, but not sure how long they stay, so I'll keep the old download links as well.

The weight, or play
Smells like teen spirit, or play
Star sprangled banner, or play
Matty's tune, or play
dm tune, or play

And the tab from Matty's tune (my favourite) below:
    Am/C        Am            F          G             Am/C        Am
e |------------------------|----------------0-------|------------------------|
B |-1--------1--1--------1-|-1--------1--3-----3----|-1--------1--1--------1-|
G |-2-----2-----2-----2----|-2-----2--------------0-|-2-----2-----2-----2----|
D |----2-----------2-------|----2-------------------|----2-----------2-------|
A |-3-----2-----0----------|-------0--------0--2----|-3-----------0----------|
E |-------------------3----|-1-----------3----------|------------------------|

    F        G               Am/C        Am           F           G
e |------------------------|------------------------|----------------0-------|
B |-1--------3-------------|-1--------1--1--------1-|-1--------1--3-----3----|
G |----------4-------------|-2-----2-----2-----2----|-2-----2--------------0-|
D |-------3--5-------------|----2-----------2-------|----2-------------------|
A |----3-----5--------0--2-|-3-----2-----0----------|-------0--------0--2----|
E |-1--------3-----3-------|-------------------3----|-1-----------3----------|

    Am/C        Am           F        G
e |------------------------|------------------------|
B |-1--------1--1--------1-|-1----------3-----------|
G |-2-----2-----2-----2----|------------4-----------|
D |----2-----------2-------|-------3---5------------|
A |-3-----------0----------|----3------5------------|
E |------------------------|-1--------3-------------|

Woah, 756 BPM?! I hope that's not the final beat...

Haha, well, I cheat a little bit. 2/3 of those 'beats' are in fact dashes.

Woah, Matty's tune sounds pretty cool. What's it like on a guitar?

Thanks @BetaDecay, it's a tune I once made, (the baseline) inspired by Tommy Emmanuel's blue moon (https://www.youtube.com/watch?v=v0IY3Ax2PkY). But it doesn't sound half as good as how he does it.

JavaScript
Note: Uses Web Development Audio Kit; This is way out of IE's League; Tested in Google Chrome
You can put the tabs in the textarea. IE you could put Matty's tune from Matty's post in the textarea (with the letters over the notes) and it will still parse correctly.
Click to Run Program
JavaScript:
context = new AudioContext;
gainNode = context.createGain();
gainNode.connect(context.destination);

gain= 2;

function getValue(i) {
    return document.getElementById(i).value;
}

function addValue(i, d) {
    document.getElementById(i).value += d;
}

function setValue(i, d) {
    document.getElementById(i).value = d;
}

document.getElementById("tada").onclick = updateLines;

function updateLines(){
    var e=getValue("ta").replace(/[^-0-9\n]/g,'').replace("\n\n","\n").split("\n");
    for(var l=0;l<e.length;l+=6){
        try{
        addValue("littleE",e[l]);
        addValue("B",e[l+1]);
        addValue("G",e[l+2]);
        addValue("D",e[l+3]);
        addValue("A",e[l+4]);
        addValue("E",e[l+5]);
        }catch(err){}
    }
    updateDash();
}

document.getElementById("littleE").oninput = updateDash;
document.getElementById("B").oninput = updateDash;
document.getElementById("G").oninput = updateDash;
document.getElementById("D").oninput = updateDash;
document.getElementById("A").oninput = updateDash;
document.getElementById("E").oninput = updateDash;

function updateDash() {
    max = 10;
    findDashMax("littleE");
    findDashMax("B");
    findDashMax("G");
    findDashMax("D");
    findDashMax("A");
    findDashMax("E");
    applyMax();
    i = "littleE";
    dash = new Array();
    for (var l = 0; l < getValue(i).length; l++) {
        if (getValue(i).charCodeAt(l) == 45) {
            dash[l] = true;
        } else {
            dash[l] = false;
        }
    }
    /*applyDash("B");
    applyDash("G");
    applyDash("D");
    applyDash("A");
    applyDash("E");*/
}

function findDashMax(i) {
    if (getValue(i).length > max) {
        max = getValue(i).length;
    }
}

function applyMax() {
    if (max < 50) {
        document.getElementById("stepe").size = 50;
        document.getElementById("littleE").size = 50;
        document.getElementById("B").size = 50;
        document.getElementById("G").size = 50;
        document.getElementById("D").size = 50;
        document.getElementById("A").size = 50;
        document.getElementById("E").size = 50;
    } else {
        document.getElementById("stepe").size = max + 1;
        document.getElementById("littleE").size = max + 1;
        document.getElementById("B").size = max + 1;
        document.getElementById("G").size = max + 1;
        document.getElementById("D").size = max + 1;
        document.getElementById("A").size = max + 1;
        document.getElementById("E").size = max + 1;
    }
}

function applyDash(i) {
    var old = getValue(i);
    setValue(i, "");
    for (var l = 0; l < old.length || dash[l] == true; l++) {
        if (dash[l] == true) {
            addValue(i, "-");
        } else {
            if (old.charCodeAt(l) != 45) {
                addValue(i, old.charAt(l));
            }
        }
    }
}
document.getElementById("next").onclick = begin;

function addDash(i) {
    while (getValue(i).length < max) {
        addValue(i, "-");
    }
}

function begin() {
    setValue("littleE",getValue("littleE").replace(/[^-0-9]/g,''));
    setValue("B",getValue("B").replace(/[^-0-9]/g,''));
    setValue("G",getValue("G").replace(/[^-0-9]/g,''));
    setValue("D",getValue("D").replace(/[^-0-9]/g,''));
    setValue("A",getValue("A").replace(/[^-0-9]/g,''));
    setValue("E",getValue("E").replace(/[^-0-9]/g,''));
    addDash("littleE");
    addDash("B");
    addDash("G");
    addDash("D");
    addDash("A");
    addDash("E");
    setValue("next", "Stop");
    //playing = true;
    findLength();
    document.getElementById("next").onclick = function () {
        clearInterval(playingID);
        oscillator["littleE"].stop(0);
        oscillator["B"].stop(0);
        oscillator["G"].stop(0);
        oscillator["D"].stop(0);
        oscillator["A"].stop(0);
        oscillator["E"].stop(0);
        setValue("next", "Play");
        document.getElementById("next").onclick = begin;
    }
    step = -1;
    playingID = setInterval(function () {
        step++;
        setValue("stepe", "");
        for (var l = 0; l < step; l++) {
            addValue("stepe", " ");
        }
        addValue("stepe", "V");
        if (lg[step]) {
            oscillator["littleE"].stop(0);
            oscillator["B"].stop(0);
            oscillator["G"].stop(0);
            oscillator["D"].stop(0);
            oscillator["A"].stop(0);
            oscillator["E"].stop(0);
        }
        qw=0
        doSound("littleE");
        doSound("B");
        doSound("G");
        doSound("D");
        doSound("A");
        doSound("E");

    }, getValue("s") * 1000);
}

function doSound(i) {
    switch (getValue(i).charAt(step)) {
        case ("-"):
        case ("x"):
        case (""):
        case (" "):
            break;
        default:
            qw++;
            makeSound(fretToHz(getHz(i), getValue(i).charAt(step)), i);

    }
    checkTop();
}

function checkTop(){
    switch(qw){
        case 0:
            break;
        case 1:
            gain=2;
            break;
        case 2:
            gain=1;
            break;
        case 3:
            gain=.5;
            break;
        default:
            gain=.3;
            break;
    }
}

function getHz(i) {
    switch (i) {
        case "littleE":
            return 329.63;
        case "B":
            return 246.94;
        case "G":
            return 196;
        case "D":
            return 146.83;
        case "A":
            return 110;
        case "E":
            return 82.41;
    }
}

function fretToHz(v, f) {
    return v * (Math.pow(2, (f / 12)));
}

/*function getTime() {
    var u = 1;
    while (lg[step + u] == false) {
        u++;
    }
    return u;
}*/

function findLength() {
    lg = new Array();
    for (var h = 0; h < getValue("littleE").length; h++) {
        lg[h] = false;
        fl(h, "littleE");
        fl(h, "B");
        fl(h, "G");
        fl(h, "D");
        fl(h, "A");
        fl(h, "E");
    }
    console.table(lg);
}

function fl(h, i) {
    var l = getValue(i).charAt(h);
    switch (l) {
        case "-":
        case "|":
            break;
        default:
            lg[h] = true;
    }
}

oscillator = new Array();

function makeSound(hz, i) {
    console.log("playing " + hz + " Hz" + i);
    oscillator[i] = context.createOscillator();
    oscillator[i].connect(gainNode);
    oscillator[i].frequency.value = hz;
    oscillator[i].start(0);
}

soundInit("littleE");
soundInit("B");
soundInit("G");
soundInit("D");
soundInit("A");
soundInit("E");

function soundInit(i) {
    makeSound(440, i);
    oscillator[i].stop(0);
}
setInterval(function () {
    gainNode.gain.value = .5 * getValue("v") * gain;
    document.getElementById("q").innerHTML = "Volume:" + Math.round(getValue("v") * 100) + "%";
}, 100);

Can you Identify this song?

It crashes on characters like | / b h p. Why not just do a little string parsing to replace them with -? That'll sound quite ok and it works.
(And maybe split on newlines using one input box.). That'll make this a fun script to play with.

That what I was planning on doing, I just never got around to it.

I agree, the different line for each string is a pain  but otherwise it sounds good

Oops forgot to login before editing the post.

I recognise the tune but I can't put a name to it... Sounds cool though

It does sound "cool"... It is Let it go from Frozen

Java
This program converts a tablature to 16-bit WAV format.
Firstly, I wrote a whole bunch of tablature parsing code. I'm not sure if my parsing is entirely correct, but I think it's okay. Also, it could use more validation for data.
After that, I made the code to generate the audio. Each string is generated separately. The program keeps track of the current frequency, amplitude and phase. It then generates 10 overtones for the frequency with made-up relative amplitudes, and adds them up. Finally, the strings are combined and the result is normalized. The result is saved as WAV audio, which I chose for its ultra-simple format (no libraries used).
It "supports" hammering (h) and pulling (p) by ignoring them since I really didn't have the time to make them sound too different. The result sounds a bit like a guitar, though (spent some hours spectrum analyzing my guitar in Audacity).
Also, it supports bending (b), releasing (r) and sliding (/ and \, interchangeable). x is implemented as muting the string.
You can try tweaking the constants in the start of the code. Especially lowering silenceRate often leads to better quality.
Example results

The Weight
Smells Like Teen Spirit (sounds weird, I blame the tab :D)
The Star Spangled Banner (modified tab for rhythm)
Matty's Tune (from this answer)

The code
I want to warn any Java beginners: do not try to learn anything from this code, it's terribly written. Also, it was written quickly and in 2 sessions and it was not meant to be used ever again so it has no comments. (Might add some later :P)
import java.io.*;
import java.util.*;

public class TablatureSong {

    public static final int sampleRate = 44100;

    public static final double silenceRate = .4;

    public static final int harmonies = 10;
    public static final double harmonyMultiplier = 0.3;

    public static final double bendDuration = 0.25;

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("Output file:");
        String outfile = in.nextLine();
        System.out.println("Enter tablature:");
        Tab tab = parseTablature(in);
        System.out.println("Enter tempo:");
        int tempo = in.nextInt();
        in.close();

        int samples = (int) (60.0 / tempo * tab.length * sampleRate);
        double[][] strings = new double[6][];
        for (int i = 0; i < 6; i++) {
            System.out.printf("Generating string %d/6...\n", i + 1);
            strings[i] = generateString(tab.actions.get(i), tempo, samples);
        }

        System.out.println("Combining...");
        double[] combined = new double[samples];
        for (int i = 0; i < samples; i++)
            for (int j = 0; j < 6; j++)
                combined[i] += strings[j][i];

        System.out.println("Normalizing...");
        double max = 0;
        for (int i = 0; i < combined.length; i++)
            max = Math.max(max, combined[i]);
        for (int i = 0; i < combined.length; i++)
            combined[i] = Math.min(1, combined[i] / max);

        System.out.println("Writing file...");
        writeWaveFile(combined, outfile);
        System.out.println("Done");
    }

    private static double[] generateString(List<Action> actions, int tempo, int samples) {
        double[] harmonyPowers = new double[harmonies];
        for (int harmony = 0; harmony < harmonyPowers.length; harmony++) {
            if (Integer.toBinaryString(harmony).replaceAll("[^1]", "").length() == 1)
                harmonyPowers[harmony] = 2 * Math.pow(harmonyMultiplier, harmony);
            else
                harmonyPowers[harmony] = Math.pow(harmonyMultiplier, harmony);
        }
        double actualSilenceRate = Math.pow(silenceRate, 1.0 / sampleRate);

        double[] data = new double[samples];

        double phase = 0.0, amplitude = 0.0;
        double slidePos = 0.0, slideLength = 0.0;
        double startFreq = 0.0, endFreq = 0.0, thisFreq = 440.0;
        double bendModifier = 0.0;
        Iterator<Action> iterator = actions.iterator();
        Action next = iterator.hasNext() ? iterator.next() : new Action(Action.Type.NONE, Integer.MAX_VALUE);

        for (int sample = 0; sample < samples; sample++) {
            while (sample >= toSamples(next.startTime, tempo)) {
                switch (next.type) {
                case NONE:
                    break;
                case NOTE:
                    amplitude = 1.0;
                    startFreq = endFreq = thisFreq = next.value;
                    bendModifier = 0.0;
                    slidePos = 0.0;
                    slideLength = 0;
                    break;
                case BEND:
                    startFreq = addHalfSteps(thisFreq, bendModifier);
                    bendModifier = next.value;
                    slidePos = 0.0;
                    slideLength = toSamples(bendDuration);
                    endFreq = addHalfSteps(thisFreq, bendModifier);
                    break;
                case SLIDE:
                    slidePos = 0.0;
                    slideLength = toSamples(next.endTime - next.startTime, tempo);
                    startFreq = thisFreq;
                    endFreq = thisFreq = next.value;
                    break;
                case MUTE:
                    amplitude = 0.0;
                    break;
                }
                next = iterator.hasNext() ? iterator.next() : new Action(Action.Type.NONE, Integer.MAX_VALUE);
            }

            double currentFreq;
            if (slidePos >= slideLength || slideLength == 0)
                currentFreq = endFreq;
            else
                currentFreq = startFreq + (endFreq - startFreq) * (slidePos / slideLength);

            data[sample] = 0.0;
            for (int harmony = 1; harmony <= harmonyPowers.length; harmony++) {
                double phaseVolume = Math.sin(2 * Math.PI * phase * harmony);
                data[sample] += phaseVolume * harmonyPowers[harmony - 1];
            }

            data[sample] *= amplitude;
            amplitude *= actualSilenceRate;
            phase += currentFreq / sampleRate;
            slidePos++;
        }
        return data;
    }

    private static int toSamples(double seconds) {
        return (int) (sampleRate * seconds);
    }

    private static int toSamples(double beats, int tempo) {
        return (int) (sampleRate * beats * 60.0 / tempo);
    }

    private static void writeWaveFile(double[] data, String outfile) {
        try (OutputStream out = new FileOutputStream(new File(outfile))) {
            out.write(new byte[] { 0x52, 0x49, 0x46, 0x46 }); // Header: "RIFF"
            write32Bit(out, 44 + 2 * data.length, false); // Total size
            out.write(new byte[] { 0x57, 0x41, 0x56, 0x45 }); // Header: "WAVE"
            out.write(new byte[] { 0x66, 0x6d, 0x74, 0x20 }); // Header: "fmt "
            write32Bit(out, 16, false); // Subchunk1Size: 16
            write16Bit(out, 1, false); // Format: 1 (PCM)
            write16Bit(out, 1, false); // Channels: 1
            write32Bit(out, 44100, false); // Sample rate: 44100
            write32Bit(out, 44100 * 1 * 2, false); // Sample rate * channels *
                                                    // bytes per sample
            write16Bit(out, 1 * 2, false); // Channels * bytes per sample
            write16Bit(out, 16, false); // Bits per sample
            out.write(new byte[] { 0x64, 0x61, 0x74, 0x61 }); // Header: "data"
            write32Bit(out, 2 * data.length, false); // Data size
            for (int i = 0; i < data.length; i++) {
                write16Bit(out, (int) (data[i] * Short.MAX_VALUE), false); // Data
            }
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private static void write16Bit(OutputStream stream, int val, boolean bigEndian) throws IOException {
        int a = (val & 0xFF00) >> 8;
        int b = val & 0xFF;
        if (bigEndian) {
            stream.write(a);
            stream.write(b);
        } else {
            stream.write(b);
            stream.write(a);
        }
    }

    private static void write32Bit(OutputStream stream, int val, boolean bigEndian) throws IOException {
        int a = (val & 0xFF000000) >> 24;
        int b = (val & 0xFF0000) >> 16;
        int c = (val & 0xFF00) >> 8;
        int d = val & 0xFF;
        if (bigEndian) {
            stream.write(a);
            stream.write(b);
            stream.write(c);
            stream.write(d);
        } else {
            stream.write(d);
            stream.write(c);
            stream.write(b);
            stream.write(a);
        }
    }

    private static double[] strings = new double[] { 82.41, 110.00, 146.83, 196.00, 246.94, 329.63 };

    private static Tab parseTablature(Scanner in) {
        String[] lines = new String[6];
        List<List<Action>> result = new ArrayList<>();
        int longest = 0;
        for (int i = 0; i < 6; i++) {
            lines[i] = in.nextLine().trim().substring(2);
            longest = Math.max(longest, lines[i].length());
        }
        int skipped = 0;
        for (int i = 0; i < 6; i++) {
            StringIterator iterator = new StringIterator(lines[i]);
            List<Action> actions = new ArrayList<Action>();
            while (iterator.index() < longest) {
                if (iterator.get() < '0' || iterator.get() > '9') {
                    switch (iterator.get()) {
                    case 'b':
                        actions.add(new Action(Action.Type.BEND, 1, iterator.index(), iterator.index()));
                        iterator.next();
                        break;
                    case 'r':
                        actions.add(new Action(Action.Type.BEND, 0, iterator.index(), iterator.index()));
                        iterator.next();
                        break;
                    case '/':
                    case '\\':
                        int startTime = iterator.index();
                        iterator.findNumber();
                        int endTime = iterator.index();
                        int endFret = iterator.readNumber();
                        actions.add(new Action(Action.Type.SLIDE, addHalfSteps(strings[5 - i], endFret), startTime,
                                endTime));
                        break;
                    case 'x':
                        actions.add(new Action(Action.Type.MUTE, iterator.index()));
                        iterator.next();
                        break;
                    case '|':
                        iterator.skip(1);
                        iterator.next();
                        break;
                    case 'h':
                    case 'p':
                    case '-':
                        iterator.next();
                        break;
                    default:
                        throw new RuntimeException(String.format("Unrecognized character: '%c'", iterator.get()));
                    }
                } else {
                    StringBuilder number = new StringBuilder();
                    int startIndex = iterator.index();
                    while (iterator.get() >= '0' && iterator.get() <= '9') {
                        number.append(iterator.get());
                        iterator.next();
                    }
                    int fret = Integer.parseInt(number.toString());
                    double freq = addHalfSteps(strings[5 - i], fret);
                    actions.add(new Action(Action.Type.NOTE, freq, startIndex, startIndex));
                }
            }
            result.add(actions);
            skipped = iterator.skipped();
        }
        return new Tab(result, longest - skipped);
    }

    private static double addHalfSteps(double freq, double halfSteps) {
        return freq * Math.pow(2, halfSteps / 12.0);
    }

}

class StringIterator {
    private String string;
    private int index, skipped;

    public StringIterator(String string) {
        this.string = string;
        index = 0;
        skipped = 0;
    }

    public boolean hasNext() {
        return index < string.length() - 1;
    }

    public void next() {
        index++;
    }

    public void skip(int length) {
        skipped += length;
    }

    public char get() {
        if (index < string.length())
            return string.charAt(index);
        return '-';
    }

    public int index() {
        return index - skipped;
    }

    public int skipped() {
        return skipped;
    }

    public boolean findNumber() {
        while (hasNext() && (get() < '0' || get() > '9'))
            next();
        return get() >= '0' && get() <= '9';
    }

    public int readNumber() {
        StringBuilder number = new StringBuilder();
        while (get() >= '0' && get() <= '9') {
            number.append(get());
            next();
        }
        return Integer.parseInt(number.toString());
    }
}

class Action {
    public static enum Type {
        NONE, NOTE, BEND, SLIDE, MUTE;
    }

    public Type type;
    public double value;
    public int startTime, endTime;

    public Action(Type type, int time) {
        this(type, time, time);
    }

    public Action(Type type, int startTime, int endTime) {
        this(type, 0, startTime, endTime);
    }

    public Action(Type type, double value, int startTime, int endTime) {
        this.type = type;
        this.value = value;
        this.startTime = startTime;
        this.endTime = endTime;
    }
}

class Tab {
    public List<List<Action>> actions;
    public int length;

    public Tab(List<List<Action>> actions, int length) {
        this.actions = actions;
        this.length = length;
    }
}

I know I haven't specified it, but could you post some test cases that people can listen to like in the other answers?

@BetaDecay Updated my answer, now has a bunch of tests

Those links don't work :/

@BetaDecay I double checked on another connection in incognito mode of a browser I don't use. They work for me, at least.

Nice, I like your version of Mattys tune a lot, although the base is sometimes hard to hear.


text:
Print n-z characters of Unicode table
The challenge is to write a program which outputs all characters of the Unicode table from n to z range.
For code "0000" is the first in order and you must skip all blank Unicode combinations.
For example, let n = 134 and z = 300, you must save or print all unicode characters between 0134 and 0300.
The output of the program does not HAVE to output them, for example using std::cout can be used but if you have an array with all the saved characters then that still qualifies.(You don't have to print them out)
The shortest program in bytes wins.

What exactly do you mean by n-z range?

I'm a little confused. The program should output all Unicode characters but don't print them?

@AlexA. maybe he means it can be either function or stdout?

I mean you have to create some sort of list from "n" - "z"
For example given n=134, that would be the 134 character in Unicode or "0134"and z=300 so you would print all unicode characters between "0134" through "0300". You would then have to skip all blank characters and save them in some way.

What is meant by blank characters? Unprintables?

Any unicode character which you cannot print or don't represent any character or symbol, newline and blank spaces don't qualify, I had to change that rule once I saw a loophole...

You might want to clarify this more, especially the title.  At first I thought you were literally asking for echo {n..z}, e.g. "n o p q r s t u v w x y z"

I'm not sure what you mean by 0134. A number with a leading zero generally signals base 8, but U+0134 uses base 16.

Adding some examples of input and its associated output would be helpful to clarify your intent.

Pyth - 16 bytes
Maps Char-of over the range, and detects unprintables by if the string "\x" is inside its repr because that is how python represents unprintables like \x00.
f!}"\\x"`TCMrQvw

Try it here online.

This is correct and the winner!

source: Stack Exchange

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

sort: votes


text:
The very weird word counter
INPUT: Any string consisting exclusively of lowercase letters via function argument, command line argument, STDIN, or similar.
OUTPUT: Print or return a number that will represent the sum of the distances of the letters according to the following metric:
You take the first and second letter and count the distance between them. The distance is defined by the QWERTY keyboard layout, where every adjacent letter in the same row has distance 1 and every adjacent letter in the same column has distance 2. To measure the distance between letters that aren't adjacent, you take the shortest path between the two.
Examples:
q->w is 1 distance apart
q->e is 2 distance
q->a is 2 distance
q->s is 3 distance (q->a->s or q->w->s)
q->m is 10 distance

Then you take the second and third letter, then the third and fourth, etc., until you reach the end of the input. The output is the sum of all those distances.
Example input and output:
INPUT: qwer
OUTPUT: 3

INPUT: qsx
OUTPUT: 5

INPUT: qmq
OUTPUT: 20

INPUT: tttt
OUTPUT: 0

Here is an image showing which letters are in the same column:

This is code golf, so the shortest code in bytes wins!

I think q->m is only 8 keys...

if you go down one row it counts as 2 distance, you dont count the key distance

its up there too :)

Can we assume that the input string will always be nonempty?

This is quite similar to http://codegolf.stackexchange.com/questions/50722/clarence-the-slow-typist. Except that this uses letters, while the other one used numbers.

Can we assume that there will be at least two letters?

Yea lets say there will always be atleast 2 letters

CJam, 50 bytes
r{i",ÙZ°^ªýx´|"257b27b=A+Ab}%2ew::.-::z2fb:+

Note that the code contains unprintable characters.
Try it online in the CJam interpreter. If the permalink doesn't work, copy the code from this paste.
Background
We start assigning positions 0 to 9 to the letters on the top row, 10 to 18 to the letters on the home row and 20 to 26 to the letters on the bottom row.
The positions of all 26 letters, in alphabetical order, are
[10 24 22 12 2 13 14 15 7 16 17 18 26 25 8 9 0 3 11 4 6 23 1 21 5 20]

This is an array of length 26. Since arrays wrap around in CJam, and the code point of the letter h is 104 = 4 × 26, we rotate the array 7 units to the left, so that each letter's position can be accessed by its code point.
[15 7 16 17 18 26 25 8 9 0 3 11 4 6 23 1 21 5 20 10 24 22 12 2 13 14]

Now we encode this array by considering its elements digits of a base 27 number and convert the resulting integer to base 257.
[6 153 44 8 217 90 176 156 94 24 170 253 147 120 180 124]

By replacing each integers by the corresponding Unicode character, we obtain the string from the source code.
How it works
r              e# Read a whitespace separated token from STDIN.
{              e# For each character:
  i            e#   Push its code point.
  ",ÙZ°^ªýx´|" e#   Push that string.
  257b27b      e#   Convert from base 257 to base 27.
  A+Ab         e#   Add 10 and convert to base 10.
               e#   Examples: 7 -> [1 7], 24 -> [3 4]
}%             e#
2ew            e# Push all overlapping slices of length 2.
::.-           e# Subtract the corresponding components of the pairs in each slice.
::z            e# Apply absolute value to the results.
2fb            e# Convert each to integer (base 2).
               e# Example: [2 5] -> 2 × 2 + 5 = 9
:+             e# Add the distances.

man how does that even work

@Vajura Dennis usually gets around to adding explanations, if you wait he'll probably add one :) If you want a more vague/basic explanation, usandfriends made a CJam explainer which you can use here.

@Vajura: I've edited my answer.

Python 2, 220 ... 124 119 Bytes
Huge thanks to Sp3000 for saving a lot of bytes.
f='qwertyuiopasdfghjkl zxcvbnm'.find
g=lambda i:sum(abs(f(x)%10-f(y)%10)+2*abs(f(x)/10-f(y)/10)for x,y in zip(i,i[1:]))

Usage:
g("tttt") -> 0

Check it out here.
Slightly ungolfed + explanation:
f='qwertyuiopasdfghjkl zxcvbnm'.find  # Defining keyboard rows and aliasing find
g=lambda i:                           # Defining a function g which takes variable i
    sum(                              # Sum of
        abs(f(x)%10-f(y)%10)          # horizontal distance, and
        + 2*abs(f(x)/10-f(y)/10)      # vertical distance,
        for x,y in zip(i,i[1:]))      # for each pair in the zipped list

# Example of zipping for those unaware:
# Let i = asksis, therefore i[1:] = sksis, and zip would make
# the list of pairs [(a,s),(s,k),(k,s),(s,i),(i,s)].

Java, 266 bytes
int c(String q){String[]r={"qwertyuiop","asdfghjkl","zxcvbnm"};int v=0,l=q.length();int[][]p=new int[l][2];for(int i=0;i<l;i++){while(p[i][0]<1)p[i][0]=r[p[i][1]++].indexOf(q.charAt(i))+1;v+=i<1?0:Math.abs(p[i][0]-p[i-1][0])+2*Math.abs(p[i][1]-p[i-1][1]);}return v;}

Ungolfed version:
int c(String q) {
    String[] r = {
        "qwertyuiop",
        "asdfghjkl",
        "zxcvbnm"
    };
    int v = 0, l = q.length(); // v=return value, l = a shorter way to refer to input length
    int[][] p = new int[l][2]; // an array containing two values for each
                               // letter in the input: first its position
                               // within the row, then its row number (both
                               // 1 indexed for golfy reasons)
    for(int i = 0; i<l; i++) { // loops through each letter of the input
        while (p[i][0] < 1) // this loop populates both values of p[i]
            p[i][0] = r[p[i][1]++].indexOf(q.charAt(i))+1;
        v += (i<1) ? 0 : Math.abs(p[i][0]-p[i-1][0])+2*Math.abs(p[i][1]-p[i-1][1]); // adds onto return value
    }
    return v;
}

You can save a few bytes by using int v=0,l=q.length(),p[][]=new int[l][2];

SWI-prolog, 162 bytes
a(A):-a(A,0).
a([A,B|C],T):-Z=`qwertyuiopasdfghjkl0zxcvbnm`,nth0(X,Z,A),nth0(Y,Z,B),R is T+(2*abs(Y//10-X//10)+abs(Y mod 10-X mod 10)),(C=[],print(R);a([B|C],R)).

Example: a(`qmq`) outputs 20 (And true after it but there's nothing I can do about that).
Edit: had to use 3 more bytes. My original program passed the test cases given but was actually incorrect (absolute values were misplaced/missing)
Note: if you want to use it on say Ideone, you have to replace all backquotes ` to double quotes ". Backquotes in my case (which is the current standard in SWI-Prolog) represent codes list for strings, and double-quotes character strings, but this is different in older versions of SWI-Prolog.

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


text:
Leap for Leap Seconds!
Since today marks the occasion of the 26th leap second ever to occur, your challenge will be to output the date and time of every leap second in GMT or UTC that has occurred so far, as well as the one to occur today.
Input
There is no input.
Output
1972-06-30 23:59:60
1972-12-31 23:59:60
1973-12-31 23:59:60
1974-12-31 23:59:60
1975-12-31 23:59:60
1976-12-31 23:59:60
1977-12-31 23:59:60
1978-12-31 23:59:60
1979-12-31 23:59:60
1981-06-30 23:59:60
1982-06-30 23:59:60
1983-06-30 23:59:60
1985-06-30 23:59:60
1987-12-31 23:59:60
1989-12-31 23:59:60
1990-12-31 23:59:60
1992-06-30 23:59:60
1993-06-30 23:59:60
1994-06-30 23:59:60
1995-12-31 23:59:60
1997-06-30 23:59:60
1998-12-31 23:59:60
2005-12-31 23:59:60
2008-12-31 23:59:60
2012-06-30 23:59:60
2015-06-30 23:59:60

Rules
Since I doubt there are many built-ins that allow leap-seconds, I'll allow them.
Standard loopholes are disallowed.
Shortest code wins.
Date format must have a zero-padded month and a 4-digit year, as well as military time and a space separating the time from the date. Putting UTC at the end is optional. Your choice of dashes or slashes.
EDIT: Yep as predicted, this became an encoding challenge. If only encoding could fix the leap second problem, ...then all our code would be much more practical. Maybe we need some ideas for more fun challenges with practical uses?

Is the output required to have that exact distribution, or it can have any distribution as long as the 26 dates are there?

@IsmaelMiguel They need to be in this order.

Off topic, but looking at the list, I'm left wondering why we need fewer leap seconds these days than we did in the previous century.

@MrLister View the linked Wikipedia article. I think it has to do with Earth's changing rotational speed.

CJam, 72 70 69 64 bytes
26,"~g¼K&Béx¸¦Ø"240bFbf{<1b2md\1972+'-@6X$4*-'-Z3$" 23:59:60"N}

Try it online in the CJam interpreter.
Idea
We start by encoding each leap second as 2 * (Y - 1972) + D, where D is 1 if it occurs in December and 0 otherwise.
The array of all encoded leap seconds is:
[0 1 3 5 7 9 11 13 15 18 20 22 26 31 35 37 40 42 44 47 50 53 67 73 80 86]

Let's call this array L.
Since the array is in ascending order, we can store the consecutive differences instead of the actual numbers:
[1 2 2 2 2 2 2 2 3 2 2 4 5 4 2 3 2 2 3 3 3 14 6 7 6]

Treating this array as the digits of a base 15 number, we obtain the integer
19238985373462115979359619336

which digits in base 240 (cast to characters) are
~g¼K&Béx¸¦Ø

Code
26,             e# Push I := [0 ... 25].
"~g¼K&Béx¸¦Ø"   e# Push the string from above.
240bFb          e# Convert from base 250 to base 15 to push L.
f{              e# For each J in I:
                e#   Push L.
  <             e#   Replace L with L[:J].
  1b            e#   Push the sum S of the integers in L[:J].
  2md           e#   Push (S / 2) and (S % 2).
  \1972+        e#   Add 1972 to (S / 2).
  '-@           e#   Push '-' and rotate (S % 2) on top.
  6X$4*-        e#   Compute (6 - 4 * (S % 2)).
  '-Z           e#   Push '-' and 3.
  3$            e#   Push a copy of (S % 2).
  " 23:59:60"   e#   Push that string.
  N             e#   Push a linefeed.
}

That feeling when you have a built in that almost entirely solves the problem and yet the manual solution in CJam is shorter.

@AlexA. There are some built-ins in Mathematica which I can reimplement in fewer bytes in Mathematica.

@MartinBüttner: Brutal.

R, 78 75 bytes
Built-ins, you say? Well...
message(paste(as.Date(.leap.seconds)-1,"23:59:60\n"),"2015-06-30 23:59:60")

R has an automatic variable .leap.seconds which contains the date and time of each leap second insertion, given in the system's local time. As of R version 3.2.0, this does not include today, so I've added that manually.
Ungolfed + explanation:
# Convert the datetime values to UTC dates. These will be a day past the
# expected output, so we can subtract 1 to get what we want.
dates <- as.Date(.leap.second) - 1

# Paste the UTC time and a newline onto the end of each date
datetimes <- paste(dates, "23:59:60\n")

# Print each time, including today, on its own line
message(datetimes, "2015-06-30 23:59:60")

You can try it online!

if you can assign "23:59:60" to a variable, you might save some chars

@NotthatCharles: I had thought about that, but R's method of combining strings is not concise enough to make constructing today's date and time shorter. Thanks for the input though!

HTML, 594 bytes
1972-06-30 23:59:60
1972-12-31 23:59:60
1973-12-31 23:59:60
1974-12-31 23:59:60
1975-12-31 23:59:60
1976-12-31 23:59:60
1977-12-31 23:59:60
1978-12-31 23:59:60
1979-12-31 23:59:60
1981-06-30 23:59:60
1982-06-30 23:59:60
1983-06-30 23:59:60
1985-06-30 23:59:60
1987-12-31 23:59:60
1989-12-31 23:59:60
1990-12-31 23:59:60
1992-06-30 23:59:60
1993-06-30 23:59:60
1994-06-30 23:59:60
1995-12-31 23:59:60
1997-06-30 23:59:60
1998-12-31 23:59:60
2005-12-31 23:59:60
2008-12-31 23:59:60
2012-06-30 23:59:60
2015-06-30 23:59:60

¯\_(ツ)_/¯

@Vioz- This question is tagged [tag:kolmogorov-complexity] and so this is a perfectly legal answer.  Not likely to win though...

But how about a curl command to extract the answer from this page?

@mlepage That's one of the "standard loopholes".

@Voitcus save in file, open in a browser. It's a working html code

@edc65 Just because some browsers make it work, doesn't make it valid. According the W3C validation tool, this is not valid.

@AntonyD'Andrea Yeah, so what? Vailidity is not requested in code golf challenges.

You could replace
 with \n. You'll need to view source, but it does save bytes. And the validness depends on which htmlversion you use. There are versions where this is valid

Technically, you are hardcoding the output which is one of the loopholes!

@Mhmd basically everybody is hardcoding the output, except the R solution, which uses a built-in function, which some might also consider a loophole.

According to the META (http://meta.codegolf.stackexchange.com/a/2073/14732), this is not a programming language since it failt on Point 4.

@PeterOlson: Built-ins in this case were explicitly allowed by the OP. And since this is [tag:kolmogorov-complexity], hard-coding the output is pretty much expected.

@Voitcus The smallest HTML5 document that validates  is <!DOCTYPE html><title>x</title>. There is no need for a ,  or even an .

It most definitely is HTML, just not valid HTML. Also, using the
 element would have saved some characters.

@JacobRaihle I see that now after checking the rules. :-)

-1: "program" size is larger than expected output - this is not fun for [kolmogorov-complexity]

@anatolyg YOU'RE not fun for [kolmogorov-complexity]

@Voitcus This is Code Golf not Code Review... The code doesn't need to be valid.

I still don't understand this answer. Save the question text with normal returns as a plain text file, you can still open it in a browser, and you would save 75 bytes. Anyway, Voitcus has quite some rep in the PHP tag in SO, so I can only assume he knows about optional start tags. Ergo he's trolling.

@MrLister I was not trolling, I'm sorry if you took me wrong. I am quite new on this site and maybe did not understand something - please excuse me. I have deleted all my comments in this thread.

Why the hell is this at +23? It's not even funny.

@ThomasKwa TIL humor is objective

@VijayRamamurthy You're right, but if the votes for this started at +0/-2 I guarantee you we'd all be piling downvotes on it.

Yeah, you're right... I too am surprised at the feedback this answer got

C, 160 146 141 140 bytes
First time posting, not sure what "standard loopholes" are. I have printf warnings of course.
160 bytes:
The original idea is to encode leap seconds using two bits per year: one for June and one for December. The encoding is consumed one bit at a time by the inner while loop. Without a 128-bit integer, the outer while loop is necessary. The rest is all bookkeeping and math. :-)
int main(){long long X=0x2495288454AAAB,Y=1972,Z=1;while(Y<2000){while(X){if(X&1)printf("%d-%02d-%d 23:59:60\n",Y,6*(2-Z),31-Z);Y+=Z^=1;X>>=1;}X=0x104082000;}}

141 bytes:
Applying the suggested tips gets it down to 146 bytes. Then I found a way to simplify the outer while condition (from Y<2000 to just Z), bringing it down to 141 bytes. So close to a tweet!
main(Z){long long X=0x2495288454AAAB,Y=1972;while(Z){while(X)X&1?printf("%d-%02d-%d 23:59:60\n",Y,12-6*Z,31-Z):1,Y+=Z^=1,X/=2;X=4362608640;}}

140 bytes:
I noticed the dash in the date could be eliminated by making the day negative. Can't do it with the month as well due to leading zero in June. But at least it fits in a tweet now!
main(Z){long long X=0x2495288454AAAB,Y=1972;while(Z){while(X)X&1?printf("%d-%02d%d 23:59:60\n",Y,12-6*Z,Z-31):1,Y+=Z^=1,X/=2;X=4362608640;}}

Pretty version:
main(Z) {
    long long X = 0x2495288454AAAB, Y = 1972;
    while (Z) {
        while (X)
            X&1 ? printf("%d-%02d%d 23:59:60\n", Y, 12-6*Z, Z-31) : 1,
            Y += Z ^= 1,
            X /= 2;
        X = 4362608640;
    }
}

Bonus version:
I eliminated the outer loop by bit-shifting one 64-bit integer into another, but it's 150 bytes, due to the rather long "unsigned long long"; if I could use something like "uint64" it would be 138 bytes.
main(Z) {
    unsigned long long Y = 1972, X = 0x2495288454AAAB, W = 8520720;
    while (X)
        X&1 ? printf("%d-%02d-%d 23:59:60\n", Y, 12-6*Z, 31-Z) : 1,
        Y += Z^= 1,
        X = X/2 | (W>>=1)<<63;
}

Welcome to PPCG. "Standard loopholes" refers to this post, but generally it just means "use common sense and don't cheat". :)

I think using a for loop will save some bytes. BTW, int main() --> main(). You might find this very helpful.

Also: X>>=1 is the same as X/=2, 6*(2-Z) is the same as 12-6*Z, and 4362608640 is one byte shorter than 0x104082000. The int in front of main() is unnecessary, and if you change main() to main(Z) then you can remove the declaration Z=1.

Really nice solution- another thing to think about- you can change if(X&1)printf(...); with X&1?printf(...):1; which saves 1 byte

and rather than while(X){...} use commas so you can remove the braces- while(X)X&1?printf("%d-%02d-%d 23:59:60\n",Y,6*(2-Z),31-Z):1,Y+=Z^=1,X>>=1; saving another 2 bytes

Thanks for all those tips. I wondered about things like ternary and commas but it was late and I was happy just to get it working. I will check out the links.

on most 64-bit Unix-like systems you can use just long instead of long long

Python 3, 91
Uses the encoding and string formatting by Sp3000, but stores the values in a Python 3 bytes object rather than a magic number.
for n in b'()+-/1357:<>BGKMPRTWZ]kqx~':print('%d-%02d-3%d 23:59:60'%(1952+n/2,n%2*6+6,n%2))

The encoding only needs 86 of the 256 possible values of a bytes, so a range of printable characters is used to make it look nicer.

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

You can run it on this online interpreter.

Python 2, 111 104 bytes
n=0x6697f252225354422533333330;y=1972
while n:print'%d-%02d-3%d 23:59:60'%(y,n%2*6+6,n%2);y+=n/2%8;n/=16

Base encoding and more base encoding.

GNU sed+date: 112
Common Linux distributions have the leap seconds built-in, too.  Using GNU sed and date:
sed -n 's/^\([0-9]\+\).*/1899-12-31 \1sec/p' /usr/share/zoneinfo/leap-seconds.list|date -f- +"%Y-%m-%d 23:59:60"

GNU sed+date: 90
Safing a few characters by cutting the path:
sed -n 's/^\([0-9]\+\).*/1899-12-31 \1sec/p' /u*/s*/z*/leap*|date -f- +'%Y-%m-%d 23:59:60'

GNU sed+date tuned by Toby Speight: 84
Deeply golfed version proposed in the comments:
sed -nr 's/^([0-9]+).*/date -d "1899-12-31 \1sec" "+%F 23:59:60"/ep' /u*/s*/z*/leap*

Thanks for teaching me where to find the leap-seconds data.  Unfortunately, my date (GNU 8.23) displays those as the first second of the next minute.  What are you using that understands the 60-second minute?

With GNU coreutils, I got it down to 76, shaving bytes with the -r flag, substituting date in with the s///e modifier, and replacing %Y-%m-%d with %F in date:  TZ=UTC sed -nr 's/^([0-9]+).*/date -d "1900-1-1 \1sec" "+%F %T"/ep' /u*/s*/z*/leap*

I knew I missed something. Seems there is no way around specifying this manually, at least not worse than most of the other solutions do. Let's see if somebody comes up with some date library to fiddle the numbers properly supporting those seconds.

I got there by using 1899-12-31 \1sec for the date, and hardcoding 23:59:60 as the time: sed -nr 's/^([0-9]+).*/date -d "1899-12-31 \1sec" "+%F 23:59:60"/ep' /u*/s*/z*/leap*

JavaScript (ES6) 125
The newline inside `` is significant and counted.
To test, run the snippet below (being EcmaScript 6, Firefox only)

alert([..."09:;=DEFIX[01234567?ABGJQS"].map((c,i)=>c.charCodeAt()+1924+(i>10?'-12-31':'-06-30')+' 23:59:60').sort().join`
`)

8086 machine code + DOS, 92 bytes
Hexdump of the code:
BE 3A 01 B1 57 D1 E0 75 03 AD EB F9 72 09 50 BA
47 01 B4 09 CD 21 58 BB 50 01 81 77 FC 01 04 80
37 01 80 3F 31 74 10 83 EB 05 4B FE 07 80 3F 3A
75 05 C6 07 30 EB F3 E2 CC C3 AA 2A 77 B5 6A DD
DF B6 BE FF 7D BF 31 39 37 32 2D 30 36 2D 33 30
20 32 33 3A 35 39 3A 36 30 0D 0A 24

To run, write the 92 bytes into a com-file and run under 32-bit Windows or DOSBox.
The code uses a bitmap with 87 bits, one per half a year. The bits are arranged into groups of 16, starting from MSB.
Decoding the bitmap:
                 ; when the program starts, ax=0 (tested on DOSBox)
myloop:
    shl ax, 1    ; shift the MSB left into the carry flag
    jnz mywork   ; if some bits are left in the register, work normally
    lodsw        ; if all bits were shifted out, load the next 16 bits
    jmp myloop   ; and check the MSB again

Because of the code's structure, some bits are lost during decoding, so I had to repeat them. This repeating doesn't bloat the bitmap because I had to pad 87 bits to 96 bits anyway.
After printing (or not printing) the leap second, the code increases the date by half a year, using manipulations on the ASCII codes of the output message.
Source code (can be assembled with tasm):
    mov si, offset mydata
    mov cl, 57h ; number of iterations

myloop:
    shl ax, 1   ; shift the MSB left into the carry flag
    jnz mywork  ; if some bits are left in the register, work normally
    lodsw       ; if all bits were shifted out, load the next 16 bits
    jmp myloop  ; and check the MSB again
mywork:
    jc myinc_date ; shifted bit 1? - skip printing the message

    push ax
    mov dx, offset mymsg
    mov ah, 9
    int 21h     ; print the message
    pop ax

myinc_date:
    mov bx, offset mymsg + 9 ; pointer to the middle of the message
    xor word ptr [bx - 4], 401h ; change month 06<->12
    xor byte ptr [bx], 1 ; change day 30<->31
    cmp byte ptr [bx], '1'
    je myloop_end ; if 31 December, no need to increase the year
    sub bx, 5 ; pointer beyond the last digit of the year

myinc_year:
    dec bx
    inc byte ptr [bx] ; increase the digit
    cmp byte ptr [bx], '0' + 10
    jne myloop_end ; if the digit was less than 9, done
    mov byte ptr [bx], '0' ; set the digit to 0
    jmp myinc_year ; continue increasing other digits

myloop_end:
    loop myloop
    ret ; terminate the program

; In the following bitmap, the spaces before some LSBs
; show that the least significant 1-bit and all
; following 0-bits are lost during decoding.
mydata:
    dw 02aaah ; 00101010101010     10
    dw 0b577h ; 101101010111011    1
    dw 0dd6ah ; 11011101011010     10
    dw 0b6dfh ; 101101101101111    1
    dw 0ffbeh ; 11111111101111     10
    dw 0bf7dh ; 101111110111110    1

mymsg:
    db '1972-06-30 23:59:60',13,10,'$'

I would like to test this, but I can't seem to find a single editor anywhere that allows you to paste hex and save it to a binary file.

@MrLister any normal hex editor should do that for you.

PHP, 198 bytes
foreach([.5,1,2,3,4,5,6,7,8,9.5,10.5,11.5,13.5,16,18,19,20.5,21.5,22.5,24,25.5,27,34,37,40.5,43.5] as$d){$h=(int)$d-ceil($d);echo date("Y-m-d 23:59:60",mktime(0,0,0,-6*$h,31+$h,(int)$d+1972))."\n";}

Unfortunately, I don't know if I can insert \n in the date function. If so, this is 3 bytes less because of ."".

You can strip both (int) and remove some whitespace. Date throws an error, if the default timezone is not set, silence it with an @.
187 bytes:
foreach([.5,1,2,3,4,5,6,7,8,9.5,10.5,11.5,13.5,16,18,19,20.5,21.5,22.5,24,25.5,27,34,37,40.5,43.5]as$d){$h=$d-ceil($d);echo@date("Y-m-d 23:59:60",mktime(0,0,0,-6*$h,31+$h,$d+1972))."\n";}

PHP, 164 bytes
foreach([.5,1,2,3,4,5,6,7,8,9.5,10.5,11.5,13.5,16,18,19,20.5,21.5,22.5,24,25.5,27,34,37,40.5,43.5]as$d){echo(ceil($d)+1971).($d%2?'-12-31':'-06-30')." 23:59:60\n";}

This is just a few modification on @Voitcus's idea

Python 2, 123 121 116 114 111
I've managed to get it pretty short, but I'm not sure how much shorter it can get. I tried using exec, but the formatting gets to be too costly.
I used a base 16 encoding of the table from the linked Wikipedia page.
Edit: Using hex encoding is shorter than base 36 (see the less golfed version.)
Try it here
n=0x410208002495288454aaab
for i in range(88):
    if n%2:print"%d-%02d-3%d 23:59:60"%(1972+i/2,i%2*6+6,i%2)
    n/=2

Less golfed:
s=bin(int('WELD24ZDGIMBWWLFM',36))[2:]
for i in range(44):
    t,s=int(s[0]),s[1:]
    if t:print"%d-06-30 23:59:60"%(i+1972)
    t,s=int(s[0]),s[1:]
    if t:print"%d-12-31 23:59:60"%(i+1972)

Pyth - 88 84 bytes
Converts to char to compress the data and saves the 06-30 versus 12-31 data as binary number.
jbm++-2047ed?"-06-30"hd"-12-31"" 23:59:60"C,j33678243 2CM"KKJIHGFEDBA@><:9765421*'#

(there is a space there at the end)
Try it here online.

Python, 204 201
e,g,h=0,1972,0
for i in range(1,27):e,g,h={2:1,9:2,10:1,12:2,15:1,16:2,17:1,20:2,21:1,22:7,23:3,24:4,25:3}.get(i,e),g+e,(h,1-h)[i in[2,10,14,17,20,21,22,25]];print`g`+("-06-30","-12-31")[h]+" 23:59:60"

You can play with it on repl.it.
Edit: Thoroughly beaten! The compression answers are amazingly short.

Surprisingly, my PHP anwser is shorter, using similar algorithm. I've always expected Python be more compact. Maybe you could golf it a little more?

I'll take a look.  I think the best route is compression though, and others have already done that

q/kdb+, 95 94 93 bytes
asc 1_" "0:([]raze("DEFGHIJKSUV[^eh";"DMNOQXYZ]lo"){("d"$"m"$-12*95-6h$x)-y}'1 185;`23:59:60)

Explanation
For each year + 1, encode for years since 1905 as an ASCII character, e.g.:
1972 -> 1973 -> 68 -> D

6h$x turns "D" back to 68. Since q's date epoch is 2000.01.01, we subtract 95 and perform the integers-to-date conversion "d"$"m"$-12*95-6h$x.
The reason we + 1 above is to subtract the number of days from the start of next year to get the actual year's 31st December or 30th June, namely 1 or 185 days. Therefore, "DEFGHIJKSUV[^eh" represents the years with a leap second in December, and "DMNOQXYZ]lo" for those in June. The pairing-subtraction is done via (a;b){x-y}'(c;d), where a and b are years that will be subtracted by c and d number of days respectively.
" "0:([]...) prepares the results to give us the correct formatting, with a small caveat that a column header will be generated. 1_ drops that header and finally apply asc to get the ordering correct.
edit: 're-base' to subtracting 95 years instead of 100 (saving 1 character).
edit 2: re-ordering the operands' positioning inside the integers-to-date conversion function.

C, 155 149 147 bytes
Here's another approach in C, using strings and run length encoding. Not quite as terse as my other C solution, but maybe it can be improved?
155 bytes:
Using a string to hold the month/day.
main(Y){Y=1972;char*M="06-3012-31",*B="#@DGCDF7D3daTdS#!",b,c;while(b=*B++-33){c=b>>1&7;while(c--)printf("%d-%.5s 23:59:60\n",Y++,M+b%2*5);Y+=(b>>4&7)-1;}}

149 bytes:
Eliminating the month/day string.
main(Y){Y=1972;char*B="#@DGCDF7D3daTdS#!",b,c;while(b=*B++-33){c=b>>1&7;while(c--)printf("%d-%02d-%d 23:59:60\n",Y++,6+b%2*6,30+b%2);Y+=(b>>4&7)-1;}}

147 bytes:
Eliminating the year initialization.
main(Y){char*B="#@DGCDF7D3daTdS#!",b,c;while(b=*B++-33){c=b>>1&7;while(c--)printf("%d-%02d-%d 23:59:60\n",1971+Y++,6+b%2*6,30+b%2);Y+=(b>>4&7)-1;}}

144 bytes:
If I reencoded the buffer to make the skip count apply before (not after) the run, then I could reorder the statements in the outer while loop, use the comma operator, and eliminate the braces, saving 2 bytes.
I can save another byte by making the day negative (as in my other solution).
Pretty:
main(Y) {
    char *B = "#@DGCDF7D3daTdS#!", // buffer of bytes encoding runs
         b, // current byte
         c; // current count
    while (b = *B++-33) { // get byte
        c = b>>1&7; // get count
        while (c--) printf("%d-%02d-%d 23:59:60\n", 1971+Y++, 6+b%2*6, 30+b%2); // run
        Y += (b>>4&7)-1; // skip years
    }
}

Explanation:
Runs are encoded in bytes. Each byte has one bit to say whether it's June or December, 3 bits for a length count, 3 bits for a skip count, and 1 unused high bit.
The skip count is the number of years to skip after a run; it's offset by -1 to allow for two leap seconds in 1972. The length is how many years in a run; it probably could be offset by +1 but it isn't currently.
So a byte means: "Do LENGTH years of JUNE (or DECEMBER) years of leap seconds, then skip SKIP-1 years" before moving to the next byte.
The bytes are offset by 33 to make them readable and avoid fancy encoding.
This means although we have enough skip bits to cover 1998-2005, we're out of ASCII range, so we have an extra zero length run. Also, 1979 appears on its own because the length 1972-1979 is one too long.
There's enough bits in the bytes, so those issues might be fixable ultimately.

Python, 221 217
def d(x):
 q=x%10
 if x%2==0:
  p,r=q/2,"06-30"
 else:
  p,r=(q-1)/2,"12-31"
 return"%d%d-%s 23:59:60"%(p+197,x/10,r)
for x in [20,21,31,41,51,61,71,81,91,12,22,32,52,73,93,5,24,34,44,55,74,85,57,87,28,58]:print(d(x))

Some Insights
Basically, d(x) decompresses a vector of 3 integers from a single 2-digit integer. d(x) is constructed as the inverse function (over the 26 leap seconds datetimes) of c(v), which in turn is a compression function that turns a 3-uple such as (1998,12,31) into a number like 85. To derive the list [20,21...28,58] I designed another algorithm to verify that the compression function is bijective over the domain. That is, I made sure that the following program doesn't produce duplicates, and I used its output as the list of the program above.
dates = [(1972,06,30),
    (1972,12,31),
    (1973,12,31),
    (1974,12,31),
    (1975,12,31),
    (1976,12,31),
    (1977,12,31),
    (1978,12,31),
    (1979,12,31),
    (1981,06,30),
    (1982,06,30),
    (1983,06,30),
    (1985,06,30),
    (1987,12,31),
    (1989,12,31),
    (1990,12,31),
    (1992,06,30),
    (1993,06,30),
    (1994,06,30),
    (1995,12,31),
    (1997,06,30),
    (1998,12,31),
    (2005,12,31),
    (2008,12,31),
    (2012,06,30),
    (2015,06,30)]

def c(v):
    x = (v[0] % 10) * 10
    x += v[2] % 30
    x += 2 * (int(v[0] / 10) - 197)
    return x

for v in dates:
    print(c(v))

The compression function c(v) was designed to be bijective by using a very simple scheme. Let's take as an example (1998,12,31).

The expression (v[0] % 10) * 10 selects the units of the year (e.g. 1 9 9 8 --> 8) and makes it the tenths digit of the output (now x=80).
There are only two month-day combination in which the leap second thing happens, so I decided to use the day component to distinguish between the 06,30 case and the 12,31 case. The expression v[2] % 30 is 0 if the day is 30, and is 1 if the day is 31. In our example, we add 1 to x (hence, now x=81).
Finally, I observed that this puzzle involves only 5 decades; hence if I map the first decade (the seventies) to 0 and the last decade (the 2010s) to 4 I can do cool stuff. More specifically, if instead of mapping to 0,1,2,3,4 I map to 0,2,4,6,8 I can add this value to the units of x, which due to the previous rule is either 0 or 1. So in the end we have that also this last step doesn't screw the bijection, and we get that the units of a 06,30 case are one of 0,2,4,6,8 and that the units of a 12,31 case are one of 1,3,5,7,9. Hence the bijection is obvious. In our example, 1998 is in the third decade (70s->0, 80s->1, 90s->2) so we add 2*2=4. So we get x=85.

I wrote the program to verify that this is true, and then I defined d(x) as the inverse of c(v). In our example, c((1998,12,31)) is 85 and d(85) correctly prints 1998-12-31 23:59:60.

Remove q=x%10 and replace q with x%10 everywhere. It's shorter. I also give a helpful description of some additional golfing on your program here. I recommend viewing the Tips for Golfing in Python page.

This is code-golf, so you should try to shorten the length of your code in any way possible.

gzip, 114 bytes
Hexdump:
1f8b080853f9975502006c006dd04b0a80300c84e1bde01dbc40218fa6697aff8309e2a6fa6f3f86cc10adb426a3b95ce62b6a0d398f07d59aeb8e4ed80983701026e1242cc0a9307e1aa11306615211b59710527b3961270cba9994fc7fc944829092faeedc313e7803993cfafb20020000
Create a file with the bytes described above.
Extract using gunzip or another decompression program to get a new file named "l". This file contains the desired output.


text:
Tokenize a String
Write a program or function that takes in a string through STDIN or function parameters, tokenizes it by parenthesis, and outputs the tokens on different lines.  If the string contains a parentheses error, the program/function must output a falsey value or error message.
Examples:
Input: abc(def)ghi
Output:

abc   ghi
   def

Input: abc(def(ghi))jklm(n)op((q))rs
Output:

abc      jklm op rs
   def       n
      ghi       q

Input: blah(blah)(blah
Output:

Error

Notes:

The falsey value or error message must be generated by program, and the program must terminate successfully.  A built in error message due to a crash does not count.
This is code golf. I will accept the shortest answer in bytes one month from today (July 30th).
No standard loopholes.

There's no point putting something in the sandbox for 1 hour before you post it. Give it a couple of days so that people have time to see it and give feedback.

Will do next time

Cobra - 238
def f(s='')
    x,y,l=0,0,for n in (r=s.count('('))get' '.repeat(s.length-2*r)
    try
        for c in s,branch c
            on c'(',y+=1
            on c')',y-=1
            else,l[y]=l[y][:x]+'[c]'+l[y][x+=1:]
        assert y==0
    catch
        print'Error'
    success,print l.join('\n')


text:
Staircase writing
Write a program or a function that will output a given string in a staircase fashion, writing each part of a word that starts with a vowel one line below the previous part.
For example:
Input: Programming Puzzles and Code Golf

Output: Pr          P           C    G
          ogr        uzzl   and  od   olf
             amm         es        e
                ing

Input
A string containing nothing but letters and spaces.
The string can be passed via STDIN or function arguments or anything equivalent.
Letters can be lowercase or uppercase.
Inputs are always assumed to follow those rules, you don't need to check for incorrect inputs.
Output
Each time a vowel (that is, a, e, i, o, u or y) is encountered in a word, you must output the rest of the word on the next line (the encountered vowel included), at the correct horizontal position. This rule is recursive, which means that if there are n vowels in the word, it will be written on n+1 lines.

The vowel should be written at the beginning of the next line, and not at the end of the previous line when one is encountered.
Each word starts on the first line, and should thus be formatted independently from other words. Two words are separated by a space.
If a word starts with a vowel, you have to write it starting on the second line.

Test cases

Input: Programming Puzzles and Code Golf

Output:
Pr          P           C    G
  ogr        uzzl   and  od   olf
     amm         es        e
        ing

Input: The quick brown fox jumps over the lazy dog

Output:
Th  q     br    f   j          th  l    d
  e  u      own  ox  umps ov     e  az   og
      ick                   er        y

Input: aeiouy

Output:

a
 e
  i
   o
    u
     y

Input: YEAh UppErcAsE VOwEls

Output:
               V
Y    Upp        Ow
 E      Erc       Els
  Ah       As
             E

Input: If you only knew the power of the Dark Side

Output:
            kn   th  p        th  D    S
If y   onl    ew   e  ow   of   e  ark  id
    o     y             er                e
     u

Scoring
This is code-golf, so the shortest code wins.

The third output example seems inconsistent with the rule "If a word starts with a vowel, you have to write it starting on the second line."

Y is Y a vowel ?

@JohnE indeed it was, I fixed it. Thanks.

@Optimizer Y is used as both in English, so I say it is a vowel in this challenge

Related. Related.

The vowel should be written at the beginning of the next line, and not at the end of the previous line when one is encountered. After some thought, I understand that this means that the move to the next line should happen before the vowel is printed, not after, but it might be worth wording this in a way that is instantly understandable - it took me a while.

Is trailing newlines / spaces allowed?

@Loovjo There shouldn't be any unnecessary empty lines. so no. There can be extra spaces at the end of lines as long as it does not make the line longer than the longest line (for instance on  the first example, you can have extra spaces on the first line up to the f at the end of the second line)

Btw, the UppErcAsE VOwEls are missing backticks.

@Loovjo Fixed, thanks.

Retina, 50 44 34 (+10) 32 30 bytes
Thanks to Dennis for saving 14 bytes by using actual control characters.
i`[aeiouy]
<VT>$0#
+`#(\S*)
$1<ESC>[A

Based on this answer, I'm using ANSI escape codes to move the terminal cursor vertically. The <ESC> should be replaced with the control character 0x1B, and <VT> with the vertical tab 0x0B. For simpler testing, you can also replace <ESC> with \e, <VT> with \v and feed the output through printf.
For counting purposes, each line goes in a separate file. However, for convenience it's simpler to just paste the code into a single file and invoke Retina with the -s option.
The first replacement surrounds each vowel in \v...#, where the \v shifts the cursor downward and the # is a marker for the second step. The i` is Retina's notation for case-insensitive matching.
The second step then repeatedly (+`) removes a # from a word and puts a e\[A at the end of the word which shifts the cursor upward. This stops once the string stops changing, i.e. when there are no more # markers in the string.

You don't need printf. Just replace \e with the ESC byte (0x1b).

@Dennis Oh, that's much better, thank you.

This is so awesome!!!

This answer is why no one takes Retina seriously ;)

@ChristopherWirt Please elaborate :) (Although I would actually be terrified if anyone took Retina seriously.)

CJam, 39 36 bytes
0000000: 6c 7b 5f 65 6c 22 61 65 69 6f 75 79 22  l{_el"aeiouy"
000000d: 26 7b 22 1b 5b 41 22 27 0b 6f 5c 7d 26  &{".[A"'.o\}&
000001a: 5f 53 26 7b 5d 7d 26 6f 7d 2f           _S&{]}&o}/

The above is a reversible xxd dump, since the source code contains the unprintable character VT (code point 0x0b) and ESC (code point 0x1b).
Like this answer, it uses vertical tabs and ANSI escape sequences.
This requires a supporting video text terminal, which includes most non-Windows terminal emulators.
Test run
Before executing the actual code, we'll disable the prompt and clear the screen.
$ PS1save="$PS1"
$ unset PS1
$ clear

This makes sure the output is shown properly.
echo -n Programming Puzzles and Code Golf | cjam <(xxd -ps -r <<< 6c7b5f656c226165696f757922267b221b5b4122270b6f5c7d265f53267b5d7d266f7d2f)
Pr          P           C    G
  ogr        uzzl   and  od   olf
     amm         es        e
        ing

To restore the prompt, execute this:
PS1="$PS1save"

How it works
We insert a vertical tab before each vowel to move the cursor down and sufficient copies of the byte sequence 1b 5b 41 ("\e[A") after each space to move the cursor back to the first row.
l           e# Read a line from STDIN.
{           e# For each character C:
  _el       e#   Push lowercase(C).
  "aeiouy"& e#   Intersect with "aeiouy".
  {         e#   If the intersection is non-empty:
    ".[A"   e#     Push "\e[A" (will be printed later).
    '.o     e#     Print "\v".
    \       e#     Swap "\e[A" with C.
  }&        e#
  _S&       e#   Intersect C with " ".
  {         e#   If the intersection is non-empty:
    ]       e#     Wrap the entire stack in an array.
  }&
  o         e#   Print C or the entire stack.
}/          e#

Don't forget to unset PS1save afterwards.

Java, 428 bytes
void s(String s){int l=s.length(),m=0;char[][]c=new char[l][];for(int i=0;i<c.length;java.util.Arrays.fill(c[i++],' '))c[i]=new char[l];String v="aeiouyAEIOUY";String[]a=s.split(" ");for(int r=0,p=0;r<a.length;r++){String u=a[r]+" ";int o=v.indexOf(u.charAt(0))>=0?1:0,x=p;for(;x<u.length()-1+p;o+=v.indexOf(u.charAt(x++-~-p))>=0?1:0)c[o][x]=u.charAt(x-p);p+=u.length();m=m<o?o:m;}for(int i=0;i<=m;i++)System.out.println(c[i]);}

I know, it's horrible. There's probably some chars that can be shaved of, but I'm too lazy to do that.

You can probably declare many of your int variables (namely i, r, p, o, and x) where you initialize l and m since they'll be given values later. You can also do String v="...",a[]=...; and do the same as above for String u. That should lower your score quite a bit.

I like the x++-~-p

Perl, 31 bytes
0000000: 24 5c 3d 22 1b 5b 41 22 78 20 73 2f 5b 61  $\=".[A"x s/[a
000000e: 65 69 6f 75 79 5d 2f 0b 24 26 2f 67 69     eiouy]/.$&/gi

The above is a reversible xxd dump, since the source code contains the unprintable character VT (code point 0x0b) and ESC (code point 0x1b).
The code is 27 bytes long and requires the switches 040p (4 bytes).
The program requires a video text terminal that supports vertical tabs and  ANSI escape sequences, which includes most non-Windows terminal emulators.
Test run
Before executing the actual code, we'll disable the prompt and clear the screen.
$ PS1save="$PS1"
$ unset PS1
$ clear

This makes sure the output is shown properly.
echo -n Programming Puzzles and Code Golf | perl -040pe "$(xxd -ps -r <<< 245c3d221b5b41227820732f5b6165696f75795d2f0b24262f6769)"
Pr          P           C    G
  ogr        uzzl   and  od   olf
     amm         es        e
        ing

To restore the prompt, execute this:
PS1="$PS1save"

How it works

perl -040p automatically reads the input as space-separated tokens (-040), saves each token in $_ (-p) and executes the program.
s/[aeiouy]/.$&/gi performs a global, case-insensitive search in $_ for vowels and replaces each vowel by the control character VT (moves the cursor down), followed by the vowel itself.
s returns the number of replacements it made, so $\=".[A"x s... saves multiple copies of the byte sequence 1b 5b 41 (moves the cursor up) in $\, one for each vowel.
At the end of the program, Perl automatically prints "$_$\", because of the -p switch.

C, 200 190 bytes
i,j,k,l,M;f(char*s){M=strlen(s)+1;char t[M*M];for(;i<M*M;++i)t[i]=(i+1)%M?32:10;for(i=0;i<M-1;++i)k=(strspn(s+i,"aeiouyAEIOUY")?++j:s[i]==32?j=0:j)*M+i,l<k?l=k:0,t[k]=s[i];t[l+1]=0;puts(t);}

Ungolfed:
i,j,k,l,M;
f(char *s){
    M = strlen(s)+1;
    char t[M*M];
    for(; i<M*M; ++i) t[i] = (i+1)%M ? 32 : 10;
    for(i=0; i<M-1; ++i)
        k = (strspn(s+i,"aeiouyAEIOUY") ? ++j : s[i]==32 ? j=0 : j) * M + i,
        l<k ? l=k : 0,
        t[k] = s[i];
    t[l+1]=0;
    puts(t);
}

It allocates a rectangular buffer (actually square), fills it with spaces and newlines, then traverses the given string. At the end it adds a null character to prevent trailing newlines.
Technically it's not a function since it contains globals; in fact it can't be called more than once (j and l must be 0 at the start). To comply, i,j,k,l,M; could be moved to int i,j=0,k,l=0,M; at the start of the function.

char*t=malloc(M*M); --> char t[M*M]; and for(i=0;i<M*M;++i) --> for(;i<M*M;++i)

Good catches, edited.

Isn't this C99 only due to char t[M*M]?

CJam, 47
Yeah, it's a bit long, but it's not "cheating" with ANSI codes :)
q_{_S&!\el"aeiouy"-!U+*:U}%_0|$])\zff{~@-S@?}N*

Try it online
The idea is to calculate a line number for each character (starting at 0, incrementing at vowels and jumping back to 0 at space), and then for each line, repeat the string but replace the characters that have a different line number with a space.

K, 81 72 70 66 bytes
Well, it's a start:
`0:{+{(-z)!y,x#" "}[|/s].'x,'s:,/{+\{12>"aeiouyAEIOUY"?x}'x}'(0,&~{"  "?x}'x)_ x}

Usage Examples:
  `0:{+{(-z)!y,x#" "}[|/s].'x,'s:,/{+\{12>"aeiouyAEIOUY"?x}'x}'(0,&~{"  "?x}'x)_ x} "Programming Puzzles and Code Golf"
Pr          P           C    G
  ogr        uzzl   and  od   olf
     amm         es        e
        ing
  `0:{+{(-z)!y,x#" "}[|/s].'x,'s:,/{+\{12>"aeiouyAEIOUY"?x}'x}'(0,&~{"  "?x}'x)_ x} "YEAh UppErcAsE VOwEls"
               V
Y    Upp        Ow
 E      Erc       Els
  Ah       As
             E

Edit 1:
Better. Made some surface level improvements:
`0:{+{(-z)!y,x#" "}[|/s].'x,'s:,/{+\{12>"aeiouyAEIOUY"?x}'x}'(0,&~{"  "?x}'x)_ x}
`0:{+{(-z)!y,x#" "}[|/s].'x,'s:,/(+\12>?["aeiouyAEIOUY"]')'_[0,&" "=x]x}

Notably, I inverted the arguments for ? when I perform the vowel search and thus eliminated the need for a lambda, did the same inversion with _ where I split words on whitespace, and I realized that ~{"  "?x}'x is a really silly, overcomplicated way of saying " "=x.
Edit 2:
Another surface level tweak- negate s before applying it to the lambda, saving parens inside:
`0:{+{(-z)!y,x#" "}[|/s].'x,'s:,/(+\12>?["aeiouyAEIOUY"]')'_[0,&" "=x]x}
`0:{+{z!y,x#" "}[|/s].'x,'-s:,/(+\12>?["aeiouyAEIOUY"]')'_[0,&" "=x]x}

Edit 3:
OK, let's take a different approach to calculating the offset for each character. Instead of splitting the sequence at spaces and calculating a running sum (+\) of the positions of vowels, we can operate on the whole input string in one pass, multiplying the running sum by 0 whenever we encounter a space. I need the negation of this sequence, so I can subtract instead of adding as I scan and use number-of-distinct (#?) instead of max (|/) when I calculate the amount of vertical padding.
`0:{+{z!y,x#" "}[|/s].'x,'-s:,/(+\12>?["aeiouyAEIOUY"]')'_[0,&" "=x]x}
`0:{+{z!y,x#" "}[#?s].'x,'s:1_0{(~" "=y)*x-12>"aeiouyAEIOUY"?y}\x}

That saves another 4 characters. Phew!

Ruby: 135 131 124 115 112 characters
a=[]
y=l=0
gets.split(r=/(?=[aeiouy ])/i).map{|w|w=~r&&y+=1
w<?A&&y=0
a[y]='%*s%s'%[-l,a[y],w]
l+=w.size}
puts a

Sample run:
bash-4.3$ ruby staircase.rb <<< 'Programming Puzzles and Code Golf'
Pr          P           C    G
  ogr        uzzl   and  od   olf
     amm         es        e
        ing

If I'm not mistaken, you can shorten your regex to /(?=[aeiouy ])/i.

Ah, you are right @AlexA. The space as separate word was only important for an earlier theory. Thanks.

GNU Sed, 151 + 1
(+1 as it needs the -r flag)
s/^/ /;h;s/[aoeuiy]/_/ig;:a;s/_[^ _]/__/;ta;y/_/ /;g;:x;:b;s/ [^ aoeuiy]/  /i;tb;h;s/([^ ])[aoeuiy]/\1_/ig;:c;s/_[^ _]/__/;tc;y/_/ /;g;s/ [^ ]/  /ig;tx

I thought that sed would be the tool for this job, but found it surprisingly hard.
Readable version:
#!/bin/sed -rf

# make sure the string starts with a space
s/^/ /
h

# print leading consonants, if any
s/[aoeuiy]/_/ig
:a
s/_[^ _]/__/
ta
y/_/ /
p
g

:x
# strip the consonants just printed
:b
s/ [^ aoeuiy]/  /i
tb
h

s/([^ ])[aoeuiy]/\1_/ig
:c
s/_[^ _]/__/
tc
y/_/ /
p
g
# remove leading vowel of each word
s/ [^ ]/  /ig
tx

I'm afraid, that should be 128 characters. The one-line version is missing a p, so it outputs nothing. A small issue is that outputs starts with an extra space. A huge issue is that first piece of text starting with vowel disappears.

I'm sure it was working earlier.  I'll have a look and see what I've broken.  Thanks for the heads-up, @manatwork!

I was wrong to jump into loop c, due to the line just before tx.  I've reinstated an earlier version with its similar loop, and I'll have another attempt later.

C, 192 bytes
f(char*s){int l=0,r=1,v,c;for(;r;l=1){v=l;r=0;char*p;for(p=s;*p;++p){c=*p;if(c==' ')v=l,putchar(c);else if((strchr("aoeuiyAOEUIY",c)?--v:v)<0)r=1,putchar(' ');else*p=' ',putchar(c);}puts(p);}}

This iterates through the string, blanking characters as it prints them.  It repeats until there are no non-space characters left to print.  It's portable C, making no assumptions about character encoding.
Readable version
f(char *s) {
    int l=0,       /* true if we've done the first line (no vowels) */
        r=1,       /* true if characters remain in buffer */
        v,         /* how many vowels to print from current word */
        c;         /* current character value */
    for (l=0; r; l=1) {
        v = l;
        r = 0;
        char *p;
        for (p=s;*p;++p) {
            c=*p;
            if (c==' ') {       /* a space - reset vowel counter */
                v=l;
                putchar(c);
            } else if ((strchr("aoeuiyAOEUIY",c)?--v:v)<0) {
                /* vowel conter exceeded - print a space */
                putchar(' ');
                r=1;
            } else {
                /* print it, and obliterate it from next line of output */
                putchar(c);
                *p=' ';
            }
        }
        puts(p); /* p points at the NUL, so this just prints a newline */
    }
}

' ' --> 32 and f(char*s){int l=0,r=1,v,c; --> l,r=1,v,c;f(char*s){

@Cool - ' ' may be 32, but it depends on the character encoding, and as I said, I made this portable C.  Dropping the explicit int is great, though - not sure why I forgot that!

Python 2, 145 142 Bytes
Probably isn't as competitive as some other methods, but I thought this was a cool way of using regex.
import re;s=I=input()[::-1]+" ";i=0
while s.strip()or i<2:s=re.sub("(?!([^aeiouy ]*[aeiouy]){%s}[^aeiouy]* )."%i," ",I,0,2)[::-1];print s;i+=1

The regex (?!([^aeiouy ]*[aeiouy]){N}[^aeiouy]* ). matches any single character not within the N-th group of letters from the end of a word. Since it counts from the end of the world I reverse the string before and afterward, and I also have to add a space at the end, but after that it becomes a simple matter of using re.sub to replace every instance of these characters with a space. It does this for every value of N until the string is empty.

As nice and readable it is to use re.I, you can save 3 bytes by substituting the appropriate flag value, i.e. 2.

@Sp3000 Only in code-golf do  have negative associations with "nice and readable"

Python 3, 265 207 202 185 177 characters
i=input()
w,e=i.split(" "),lambda:[[" "]*len(i)]
o,x=e(),0
for p in w:
    y=0
    for c in p:
        if c in"AEIOUYaeiouy":o+=e();y+=1
        o[y][x],x=c,x+1
    x+=1
for l in o:print("".join(l))

This is terrible and I'm not proud. I know this can be made shorter, but I thought I'd post anyway.
Inspired by the C version, it creates a list which is then filled while traversing the input string.

Octave, 132 129 characters
p=1;x=[];y=input(0);for j=1:numel(y);if regexpi(y(j),'[aeiouy]');p+=1;elseif y(j)==" ";p=1;end;x(p,j)=y(j);end;x(x==0)=32;char(x)

Test
Input: "YEAh UppErcAsE VOwEls"
Output:

               V
Y    Upp        Ow
 E      Erc       Els
  Ah       As
             E

Gema: 53 48 characters
/[aeiouyAEIOUY]/=@append{u;^[[A}^K$1
 = $u@set{u;}

Note that ^[ (x1b) and ^K (x0b) are single characters. (In the below sample run I use their copy-paste friendly \e and \v equivalents, in case you want to try it out.)
Sample run:
bash-4.3$ gema '/[aeiouyAEIOUY]/=@append{u;\e[A}\v$1; = $u@set{u;}' <<< 'Programming Puzzles and Code Golf'
Pr          P           C    G
  ogr        uzzl   and  od   olf
     amm         es        e
        ing

Jelly, 42 bytes
Ḳµe€Øyœṗ⁸⁶ṁ$;¥\z⁶Zµ€µḷ/⁶ṁW⁸;ḣ®µ€L€Ṁ©$¡ZK€Y

Try it online!
Why Jelly, why? :-(

Longer than CJam seems weird

@Fatalize It's because Jelly just doesn't go with strings...usually. Also you can't really compare different programming paradigms (cjam is stack-based, jelly is tacit).

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


text:
The GOLF CPU Golfing Challenge: Prime Partitions
This challenge is the first of a series of fewest-operations problems that should be written in the GOLF CPU.  You can find the next one here
A partition of a number, N, is a list of numbers that add up to N.  A prime partition is a list of prime numbers that add up to N.
For this challenge, you are given a single integer N ≥ 2.  You need generate the shortest possible prime partition for N.  If there are multiple possible partitions, you can print any of them.
Examples:
9: [2, 7]
12: [5, 7]
95: [89, 3, 3]
337: [337]
1023749: [1023733, 13, 3]
20831531: [20831323, 197, 11]

Your program should be written in GOLF CPU.  For input/output you can either use STDIO or the registers.  The list can be in any order, and if you are using STDOUT, can be separated by whitespace or commas (no brackets needed).  Obviously, hardcoding the solutions isn't allowed, nor is hardcoding more than the first few primes.
This is a fewest-operations problem, so the answer that solves the examples above with the fewest amount of cycles wins!

Time for me to promote GOLF-C, which offers a faster way to run .golf programs.. and maybe to work on it some more

@Claudiu Golf-C would certainly be allowed here

Is there a size limit?

I suspect the Goldbach and Levy conjectures will come in handy here...

@ThomasKwa no, no size limit, but no hard coding primes (beyond the first couple)

@NathanMerrill could you add an example requiring at least 2 primes, where all the primes are large (> 10000)?

@Tyilo That would require a distance of more than 10000 between two adjacent primes.  I don't think anybody knows of such a prime (although it most likely exists)

@NathanMerrill maybe I'm missing something, but why do the primes have to be adjacent?

@Tyilo a large prime is either the sum of 3 odd primes or 1 odd prime and 2.  When given a prime you take the difference between the it and the next lowest prime (which is even), and then find two primes to add up to that number), unless the difference is 2.

@NathanMerrill oh that makes sense, thanks. Do you think you could lower the maximum value N can have, so my second solution is valid? Do you have a specific reason why 2^63-1 must be supported?

@Tyilo sounds reasonable. As long as you can run the examples listed above, I'd be willing to accept the answer.

159,326,251 cycles
Input is n, output is r, s, and t (ignoring zeros).
# Input in register n
# Outputs in registers r, s, t
# (I use the return value as a debug parameter)

# hardcoded case n=2
cmp c, n, 2
jz skip_n2, c
  mov r, 2
  halt 0
skip_n2:
# hardcoded case n=4
cmp c, n, 4
jz skip_n4, c
  mov r, 2
  mov s, 2
  halt 0
skip_n4:

# Sieve of Eratosthenes
mov i, 1
sieve_loop:
  add i, i, 2
  lb a, i
  jnz sieve_loop, a

  mulu j, k, i, i
  geu c, j, n
  jnz end_sieve_loop, c

  sieve_inner_loop:
    sb j, 1
    add j, j, i
    lequ c, j, n
    jnz sieve_inner_loop, c

  jmp sieve_loop

end_sieve_loop:

lb a, n

# if n is even, skip to search
and c, n, 1
jz search, c

# if n is prime, the partition is simply [n]
jnz not_prime, a
  mov r, n
  halt 1
not_prime:

# if n is odd, check n-2
sub i, n, 2
lb a, i

jnz sub_3, a
# if n-2 is prime, the partition is [2, n-2]
mov r, 2
mov s, i
halt 2

sub_3:
# otherwise the partition is [3] + partition(n-3)
mov t, 3
sub n, n, 3

search:
mov i, 1
sub n, n, 1

search_loop:
  add i, i, 2
  sub n, n, 2
  lb a, i
  jnz search_loop, a
  lb a, n
  jnz search_loop, a
  mov r, i
  mov s, n
  halt 3

Testcases:
robert@unity:~/golf-cpu$ ./assemble.py partition.golf
robert@unity:~/golf-cpu$ ./golf.py -p r,s,t partition.bin n=9
2, 7, 0
Execution terminated after 51 cycles with exit code 2.
robert@unity:~/golf-cpu$ ./golf.py -p r,s,t partition.bin n=12
5, 7, 0
Execution terminated after 77 cycles with exit code 3.
robert@unity:~/golf-cpu$ ./golf.py -p r,s,t partition.bin n=95
3, 89, 3
Execution terminated after 302 cycles with exit code 3.
robert@unity:~/golf-cpu$ ./golf.py -p r,s,t partition.bin n=337
337, 0, 0
Execution terminated after 1122 cycles with exit code 1.
robert@unity:~/golf-cpu$ ./golf.py -p r,s,t partition.bin n=1023749
13, 1023733, 3
Execution terminated after 6654139 cycles with exit code 3.
robert@unity:~/golf-cpu$ ./golf.py -p r,s,t partition.bin n=20831531
229, 20831299, 3
Execution terminated after 152670560 cycles with exit code 3.
robert@unity:~/golf-cpu$

Total cycles for examples: 477,918,603
Update 1: Updated to use Lemoine's conjecture.
Update 2: Updated to use the Sieve of Eratosthenes instead of naively finding the primes.
Run with:
python3 assemble.py 52489-prime-partitions.golf
python3 golf.py 52489-prime-partitions.bin x=<INPUT>

Example run:
$ python3 golf.py 52489-prime-partitions.bin x=10233
5
5
10223
Execution terminated after 194500 cycles with exit code 0.

Cycle count for example input:
Input    Cycles
9        191
12       282
95       1,666
337      5,792
1023749  21,429,225
20831531 456,481,447

We consider the first (N+1)*8 bytes of the heap, to be an array containing N+1 64-bit values. (As the heap is limited in size, this will only work for N < 2^57). The value of the entry at i*8 indicates wether i is a prime:
Value Description
-1    Not a prime
0     Unknown
1     The largest prime found
n > 1 This is a prime and the next prime is n

When we are done building the array it will look like [-1, -1, 3, 5, -1, 7, -1, 11, -1, -1, -1, 13, ...].
We use the Sieve of Eratosthenes to build the array.
Next the program does the following in pseudo-code:
if is_prime(x):
    print x
else:
    if is_even(x):
        for p in primes:
            if is_prime(x - p):
                print p, x - p
                exit
    else:
        if is_prime(x - 2):
            print 2, x - 2
        else:
            for p in primes:
                if is_prime(x - 2 * p):
                    print p, p, 2 * p
                    exit

This is guaranteed to work because of Lemoine's conjecture and Goldbach's weak conjecture. Lemoine's conjecture hasn't be proven yet, but it's probably true for numbers below 2^57.
    call build_primes

    mov q, x
    call is_prime

    jnz print_prime, a

    and b, x, 1
    jz find_pair, b

    # Check if x - 2 is a prime
    sub q, x, 2
    call is_prime
    jnz print_prime_odd2, a

# Input: x, b
find_pair:
    mov p, 2
find_pair_loop:
    mov d, p
    jz find_pair_even, b

    add d, d, p

find_pair_even:
    sub q, x, d

    call is_prime
    jnz print_prime2_or_3, a

    shl i, p, 3
    lw p, i
    jmp find_pair_loop

print_prime2_or_3:
    jz print_prime2, b

    mov x, p
    call write_int_ln

print_prime2:
    mov x, p
    call write_int_ln

    mov x, q
    call print_prime

print_prime_odd2:
    mov p, 2
    call print_prime2

print_prime:
    call write_int_ln
    halt 0

# Input: x
# Memory layout: [-1, -1, 3, 5, -1, 7, -1, 11, ...]
# x: max integer
# p: current prime
# y: pointer to last found prime
# i: current integer
build_primes:
    sw 0, -1
    sw 8, -1
    sw 16, 1
    mov y, 16

    mov p, 2

build_primes_outer:
    mulu i, r, p, p
    jnz build_primes_final, r

    geu a, i, x
    jnz build_primes_final, a

build_primes_inner:
    shl m, i, 3
    sw m, -1

    add i, i, p

    geu a, i, x
    jz build_primes_inner, a

build_primes_next:
    inc p
    shl m, p, 3
    lw a, m
    jnz build_primes_next, a

    sw y, p
    mov y, m
    sw y, 1

    jmp build_primes_outer

build_primes_final:
    inc p
    geu a, p, x
    jnz build_primes_ret, a

    shl m, p, 3
    lw a, m
    jnz build_primes_final, a

    sw y, p
    mov y, m
    sw y, 1

    jmp build_primes_final

build_primes_ret:
    ret

# Input: q
# Output: a
is_prime:
    shl m, q, 3
    lw a, m
    neq a, a, -1
    ret a

write_int:
    divu x, m, x, 10
    jz write_int_done, x
    call write_int
write_int_done:
    add m, m, ord("0")
    sw -1, m
    ret

write_int_ln:
    call write_int
    mov m, ord("\n")
    sw -1, m
    ret

Can you print the number of cycles for the numbers listed in the example?

@NathanMerrill Done.