text:
Read a crossword
Inspired by this question about packing into this format.
Occasionally I see a completed crossword and being as I am, I can't be bothered to find out what the solutions to the clues actually were.
Input:

A 2D string (any format, newline separated, 2d list etc.)
Blank squares will be represented with a  (space character)
Every other square will be in the lower case alphabet.
You may assume that the input will be padded with spaces to form a rectangle

Output:

Each word found

You must search for words along and down
Words will be at least two letters long
If there are duplicate words, you have to output them for each time they appear

You don't have to do any validation
Words may be outputted in any order
No strict formatting rules

Test cases:
word
e e
step
t d

word, step, west, reed
---
pies
 not
  no
wasp

pies, not, no, wasp, in, eons, stop
---
igloo
    n
word

igloo, word, on

Pyth - 11 10 8 7 bytes
saved one bytes thanks to @issacg.
t#cjsCB

Try it online here.
t#               Filter by if len > 1
 c               Chop by whitespace by default
  j              Join by newlines
   sCB           Input, implicit and its transpose in one list

@Maltysen Wonderful.

Pyth wins. As always.

You can save one byte by removing the d, which makes j join on newlines, which are still chopped by c ... )

@isaacg that's really cool, thanks

CJam, 14 bytes
{_z+S*S%{,(},}

An unnamed block that expects a list of (padded) strings on top of the stack and leaves a list of words instead.
Test it here.
Explanation
_z    e# Duplicate and transpose the grid.
+     e# Append the transpose to the original grid.
S*    e# Join all lines by spaces to ensure that we don't get words
      e# spanning multiple lines.
S%    e# Split around spaces, discarding empty segments.
{,(}, e# Filter: keep only those strings with length 2 or greater.

05AB1E, 9 bytes
ø«€#J˜ʒ¦Ā

Input as a character matrix.
Try it online or verify all test cases.
Explanation:
ø          # Zip/transpose the (implicit) input-matrix; swapping rows/columns
 «         # Merge this list of lists to the (implicit) input list of lists
  €        # For each inner list:
   #       #  Split them on spaces
    J      # Join each innermost list together to a single string
     ˜     # Flatten the entire list
      ʒ    # Filter the strings by:
       ¦   #  Remove the first character of the string (no-op if it's already empty)
        Ā  #  And check that it's non-empty
           # (after which the result is output implicitly)

Typo in title ?

JavaScript (ES6), 83 bytes
s=>(s+` `+[...(t=s.split`
`)[0]].map((_,i)=>t.map(t=>t[i]).join``)).match(/\w\w+/g)

T-SQL, 322 bytes
I can't prove that this works, but feel free to test it in Microsoft SQL server Management Studio sql server 2017+
DECLARE @ varchar(max)=
('MICROWAVE
U       S
M OCEAN C
M  OWL  A
I SWELL P
E       E
SCHEDULES');

WITH C as(SELECT 1x,@ a UNION ALL SELECT
iif(ascii(a)=13,0,x+1),stuff(a,1,1,'')FROM C
WHERE''<a)SELECT w FROM(SELECT(SELECT left(a,1)FROM
c WHERE x=t.x for xml path(''),type).value('.','char(99)')a
FROM c t GROUP BY x UNION ALL SELECT @)r
CROSS APPLY(SELECT*FROM string_split(translate(a,'
','  '),' '))g(w)WHERE len(w)>1

This script will return
MUMMIES
COW
EWE
ALL
ESCAPES
MICROWAVE
OCEAN
OWL
SWELL
SCHEDULES

J, 30 bytes
[:(#~1<#&>)@,' '<;._1"1@,.],|:

Try it online!

 C++14, 209207201 bytes
Ridiculously high amount of bytes... but oh well. Transpose matrix, split string. Easy. Too bad no native function for transposing
[](vector<string>; m){auto t=m;int C=size(m[0]),j=0;for(;++j<C*C;)t[j%C][j/C]=m[j/C][j%C];for(j=0;++j<C+C;){stringstream Z(j<C?m[j]:t[j-C]);string s;while(getline(Z,s,' '))cout<<(size(s)>1?s+' ':"");}}

Ungolfed:
using S=vector<string>;
[](S m){
  S t=m;
  int C=size(m[0]),j=0;
  for(;j<C*C;++j)t[j%C][j/C]=m[j/C][j%C]; // Transpose
  for(j=0;j<C+C;++j){ // since rectangle matrix, we can iterate like so
    stringstream Z(j<C?m[j]:t[j-C]); // Get string from m or t
    string s;
    while(getline(Z,s,' '))
      cout<<(size(s)>1?s+' ':"");
  }
}

How to use it (note you must enforce padding as the question states):
using S = vector<string>;[](S m) { ... }({"pies", " not", "  no", "wasp"});

Pyke, 9 bytes
,+Fdc#t(s

Try it here!
Or 7 bytes prettified
,+Fdc#t

Try it here!

Pyth, 18 bytes
Lm:d"\S\S+"1byQyCQ

Try it online!
Sample input:
["pies"," not","  no","wasp"," t  "]

Sample output:
[['pies'], ['not'], ['no'], ['wasp'], []]
[[], ['in', 'at'], ['eons'], ['stop']]

How it works:
Lm:d"\S\S+"1byQyCQ                                 The "1" here is mode
                    assign('Q',eval_input())       "1" which means show
                    @memoized                      all matches
L                   def y(b):                               v
 m:d"\S\S+"1b           return map(lambda d:regex(d,"\S\S+",1),b)
             yQ     imp_print(y(Q))
               yCQ  imp_print(y(transpose(Q)))

Haskell, 58 bytes
import Data.List
f x=[w|w@(_:_:_)<-words=<<x++transpose x]

Usage example: f ["pies"," not","  no","wasp"] -> ["pies", "not", "no", "wasp", "in", "eons", "stop"].
How it works: split each of the lines of the input and the transposition of it at spaces it into a single list words. Keep those that match (_:_:_), i.e. have at least two letters.

Japt, 8 bytes
Takes input as an array of lines.
cUy)c¸fÅ

Try it (includes all test cases)
If we could include a leading and/or trailing newline in the input then this could be 7 bytes, taking input as a multi-line string.
pÕ·c¸fÅ

Try it
cUy)c¸fÅ     :Implicit input of array U
c            :Concatenate
 Uy          :  U transposed
   )         :End concat
    c        :Flat map
     ¸       :  Split on spaces
      f      :Filter elements that return true after
       Å     :  Slicing off the first character, resulting in the (falsey) empty string when length is <2

pÕ·c¸fÅ       :Implicit input of multi-line string
p             :Append
 Õ            :  The transposition
  ·           :Split on newlines
   c¸fÅ       :As above


text:
Highest score on the field
Introduction
Let a field be a rectangle filled with only the characters - and [0-9]. An example of a field is:
11-011123
111-010--
0010---01
111-01234

You see that this field has been separated into three smaller areas:

To calculate the score of a smaller area, we just add all numbers up. For example:
11
111
0010
111

1 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 = 9

The total score for this area is 9. We now do the same thing for the second area:
   011123
    010

0 + 1 + 1 + 1 + 2 + 3 + 0 + 1 + 0 = 9

The total score is also 9. Now we have to examine the last area:
       01
    01234

0 + 1 + 0 + 1 + 2 + 3 + 4 = 11

This has a total score of 11. The highest score on the field is 11, so this is what we need to output.
The Task
Given a field (in the form of a 2D string, an array, etc.), output the highest score on the field. You may assume that the given fields will always contain at least 1 digit. This is code-golf, so the submission with the least amount of bytes wins!
Test cases
Test case 1:
Input:
1

Output:
1

Test case 2:
Input:
1-1-1-1
-1-1-1-
2-1-1-1
-1-1-1-

Output:
2

Test case 3:
Input:
12-45-
4-65-9
87-654
12-487
45----
684764

Output:
69

Test case 4:
Input:
111-12
------
21--10

Output:
3

Wow...nice challenge.

"0010---01" isn't that ["0010", "", "", "01"] instead?

also "111-01234", why isn't that ["111", "01234"]?

I don't understand. I thought the - separated the areas? Can you make the "what defines an area" part clearer, please?

can you please reword the challenge to explain that?

MATL, 54 51 49 bytes
n:"G~1@(2Y6Z+leG45>1e*5M@)*]vtz:"otY*g]G48-X:*sX>

Input is a 2D char array in MATL(AB) format, with ; as row separator. The inputs in the example and in the test cases are respectively:
['11-011123';'111-010--';'0010---01';'111-01234']
['1']
['1-1-1-1';'-1-1-1-';'2-1-1-1';'-1-1-1-']
['12-45-';'4-65-9';'87-654';'12-487';'45----';'684764']
['111-12';'------';'21--10']

Try it online!
Explanation
This works by building an adjacency matrix of the graph defined by the relation "being connected". As an example, consider the 3×4 field
52-4
15-8
3-72

Entries in a 2D array are easily described in MATL using (column-major) linear indexing. In the 3×4 case, the linear index of each entry is given as
1  4  7 10
2  5  8 11
3  6  9 12

The adjacency matrix is built in steps using matrix multiplication. In the first step, immediate neighbours are considered. For example, the point indexed 3 is neighbour of itself and of that with index 2. It's not a neighbour of 6 because that point doesn't contain a number according to the field. In this example the adjacency matrix of the relation  "immediate-neighbour" is the 12×12 matrix L given as
1 1 0 1 0 0 0 0 0 0 0 0
1 1 1 0 1 0 0 0 0 0 0 0
0 1 1 0 0 0 0 0 0 0 0 0
1 0 0 1 1 0 0 0 0 0 0 0
0 1 0 1 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 1
0 0 0 0 0 0 0 0 0 1 1 0
0 0 0 0 0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 0 1 0 1 1

(It can seen that column 3 has value 1 at rows 2 and 3.) This matrix is always symmetric and its diagonal has value 1 for points that don't contain -.
The next step would be the adjacency matrix of the relation "connected with at most one point in between". To obtain it, it suffices to multiply L by itself and set nonzero entries to 1. In general, the adjacency matrix of the relation "connected by some path", M, is obtained by raising L to an exponent (in matrix sense) that represents the maximum possible path length. An upper bound of the maximum path length is the number of nonzero entries in L.
Computing the matrix power directly may cause overflow, because large numbers quickly occur. So it's better to gradually multiply by the same matrix, converting nonzero entries into 1 after each step to prevent large numbers from building up.
Column i of M represents the points that are connected (by any path) with point i. Now, the level field can be reduced to a column vector c in linear order, where each entry contains the corresponding number or an undefined value for -. So in this case c would be
5
1
3
2
5
-
-
-
7
4
8
2

Mutiplying each column of M by c element-wise and computing the sum of each column gives, for each point i, the total score of the area point i belongs to. An area is defined by all points that are mutually connected. Note that many columns will give the same result; namely, columns i and j will give the same sum if points i and j are connected (belong to the same area). The final result is the maximum of those sums.
        % Implicitly take input: 2D char array
n:      % Range [1,...,N], where N is number of entries in the input
"       % For loop. Each iteration builds a row of matrix L
  G     %   Push input again
  ~     %   Logical negate: transform into matrix of zeros
  1     %   Push 1, to be written into a matrix entry
  @     %   Iteration index. Ranges from 1 to N
  (     %   Write that 1 into the N-th entry (linear order)
  2Y6   %   Push array [0 1 0; 1 1 1; 0 1 0]: mask of immediate neighbours
  Z+    %   Convolve and keep same-size result
  le    %   Linearize into row array
  G45>  %   Array of same size as the input that contains 1 for numbers, 0 for '-'
  1e    %   Linearize into row array
  *     %   Multiply element-wise
  5M    %   Push last array again: 1 for numbers, 0 for '-'
  @)    %   Get 0 or 1 value of that array corresponding to current iteration
  *     %   Multiply. This is to give a row of zeros for non-numbers
]       % End. We have all rows of L in the stack
v       % Concatenate all rows into a matrix: L.
tz:     % Duplicate. Range [1,...,K], where K is the number of nonzeros in L
"       % For loop. Repear K times. This loop computes the 0/1 matrix power
  o     %   Convert matrix entries to double
  tY*   %   Duplicate and matrix-multiply
  g     %   Convert to logical values, that is, nonzero values become 1
]       % End. We have matrix M
G48-    % Convert input chars to the corresponding numbers by subtractig 48
X:      % Linearize into column array. This is vector c
*       % Element-wise multiplication with broadcast (implicit repetition)
s       % Sum of each column. Gives a row array
X>      % Maximum of that row array
        % Implicitly display

JavaScript (ES6), 157 bytes
s=>[...o=s].map((n,i)=>o=n<'.'|(a=[...s]).map(_=>a.map((c,j)=>c>'-'&c<10&(a[j+1]|a[j-1]|a[j+l]|a[j-l])>90?a[n-=-c,j]=99:0),a[i]=99)|o>n?o:n,l=~s.search`
`)|o

Explanation
Takes an input field as a string. For each number in the field, sums all numbers in the area. It does this by iterating over each number in the field multiple times, adding the number to the score if an adjacent cell contains a previously counted number. Counted numbers that are part of the area are represented by setting them to 99 so that they are not counted again. Outputs the highest score as a number.

var solution =

s=>
  [...o=s].map((n,i)=>o=n<'.'|             // for each number on the field
                                           // n = area score
      (a=[...s])                           // a = array of each field character
      .map(_=>                             // loop to ensure whole area is found
        a.map((c,j)=>                      // for each cell c at index j
          c>'-'&c<10&                      // if the current cell is a number
          (a[j+1]|a[j-1]|a[j+l]|a[j-l])>90 // and an adjacent cells is in the area
          ?a[n-=-c,j]=99:0                 // add the cell to the area
        ),                                 // and the number to the score
        a[i]=99                            // mark the starting cell as counted
      )
      |o>n?o:n,                            // o = output (max of o and n)
    l=~s.search`
`                                          // l = line length of field
  )
  |o                                       // return o
<textarea id="input" rows="6" cols="40">12-45-
4-65-9
87-654
12-487
45----
684764</textarea>

<button onclick="result.textContent=solution(input.value)">Go</button>

Pyth, 93 bytes
A,hlh.zjJ\-.zKsm?qdJd\#HD'b=KXKbJR+i@HbTsm?&&gd0<dlKq@Kd\#'d0[tbhb-bG+bG;Wh=NxK\#=+Y'N)h.MZY

Try it online!
How it works

First step: read the input
A,hlh.zjJ\-.zKsm?qdJd\#H
A,                           Assign the following to G and H:
  hlh.z                          G = increment(length(first(all_input())))
       jJ\-.z                    H = join(J="-",all_input())
                m       H    for d in H:
                 ?qdJ            if equal(d,J):
                     d               add d to the list
                                 else:
                      \#             add "#" to the list
                             end
               s             sum the list
              K              assign to K

Sample input:
11-011123
111-010--
0010---01
111-01234

G = 10
H = "11-011123-111-010---0010---01-111-01234" (note the extra dashes connecting each line)
J = "-"
K = "##-######-###-###---####---##-###-#####"

Second step: define a function to evaluate one area
D'b=KXKbJR+i@HbTsm?&&gd0<dlKq@Kd\#'d0[tbhb-bG+bG;
D'b                                             ;  def quote(b):
   =KXKbJ                                              K[b] = J
         R+                                            return the sum of A and B, where:
           i@HbT                                         A = to_integer(H[b],10)

                 m                   [tbhb-bG+bG         for d in {dec(b), inc(b), minus(b,G), add(b,G)}:
                  ?&&                                      if .... and ........ and ............... :
                     gd0                                      d>=0
                        <dlK                                           d<len(K)
                            q@Kd\#                                                  equal(K[d],"#")
                                  'd                           add quote(d) to temp_list
                                                           else:
                                    0                          add 0 to temp_list
                s                                        B = sum(temp_list)

Basically, this function (quote) is given a starting
point (b), and then recursively find its neighbour and
add their values to the output.

Third step: read all the areas and find the rqeuired maximum
Wh=NxK\#=+Y'N)h.MZY
Wh=NxK\#     )         while inc(N=find(K,"#")):   --while K still has "#"
        =+Y'N              Y+= quote(N)
               .MZY    find the maximum of Y,
              h        then print the first.

source: Stack Exchange

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

sort: votes


text:
Clean the muddy quartata-fish
This challenge is in honor of the Rookie of the Year category winners of Best of PPCG 2015: muddyfish (for I'm not the language you're looking for!) and quartata (for Implement a Truth-Machine).
Congratulations!
Background
In the deepest trenches of the ocean, there lives a rare and elusive square-shaped fish called the quartata-fish.
It looks like the glider from the Game of Life cellular automaton.
Here are two quartata-fish of different sizes:
-o-
--o
ooo

--oo--
--oo--
----oo
----oo
oooooo
oooooo

You have managed to snap a photo of the quartata-fish, but the fish is rather hard to see since it's covered in mud.
Now you'll have to write a program to clean up the photo.
Input
Your input is a rectangular 2D grid of the characters .-o#, given as a newline-separated string.
If you want, you can use pipes | instead of newlines as the separators, and you may assume one trailing and/or preceding separator.
The input will contain exactly one quartata-fish of some side-length 3*n, where n ≥ 1 is a positive integer, surrounded by periods . that represent the ocean floor.
The fish will always be in the orientation depicted above.
Overlaid on this grid, there will be exactly one non-empty rectangular region of hashes #, which represents a blob of mud.
The blob may cover the quartata-fish partially or entirely.
An example input would be
............
..--oo--....
..--oo--....
..---#####..
..---#####..
..ooo#####..
..oooooo....

Output
Your output shall be generated from the input by replacing all the hashes with the characters .-o, so that the grid contains exactly one quartata-fish.
There will always be a unique way to perform this replacement properly; in particular, the blob of mud will cover the fish entirely only if its size is 3×3.
The output shall use the same separator as the input.
For the above input, the correct output would be
............
..--oo--....
..--oo--....
..----oo....
..----oo....
..oooooo....
..oooooo....

Rules and scoring
You can write a full program or a function.
The lowest byte count wins, and standard loopholes are disallowed.
There are no time bounds: if your submission would eventually halt given unlimited time and resources, you're fine.
Test cases
Input:
.......
...-o-.
...--o.
##.ooo.
##.....
Output:
.......
...-o-.
...--o.
...ooo.
.......

Input:
...-o-.
...-#o.
...ooo.
.......
Output:
...-o-.
...--o.
...ooo.
.......

Input:
.........
.###.....
.###.....
.ooo.....
Output:
.........
.-o-.....
.--o.....
.ooo.....

Input:
.....
.###.
.###.
.###.
Output:
.....
.-o-.
.--o.
.ooo.

Input:
......
......
......
...###
...###
...###
Output:
......
......
......
...-o-
...--o
...ooo

Input:
###o--....
###o--....
###-oo....
###-oo....
###ooo....
###ooo....
###.......
Output:
--oo--....
--oo--....
----oo....
----oo....
oooooo....
oooooo....
..........

Input:
............
..--oo--....
..--oo--....
..---#####..
..---#####..
..ooo#####..
..oooooo....
Output:
............
..--oo--....
..--oo--....
..----oo....
..----oo....
..oooooo....
..oooooo....

Input:
...--oo--....
.#########...
.#########...
.#########...
...oooooo....
...oooooo....
.............
.............
Output:
...--oo--....
...--oo--....
...----oo....
...----oo....
...oooooo....
...oooooo....
.............
.............

Input:
..............
..............
.########.....
.########.....
.########-....
.########-....
.########o....
.########o....
.########o....
.########o....
.########.....
..............
Output:
..............
..............
..............
..............
....--oo--....
....--oo--....
....----oo....
....----oo....
....oooooo....
....oooooo....
..............
..............

Input:
.................
.................
..---ooo---......
..--#########....
..--#########....
..--#########....
..--#########....
..--#########....
..oo#########....
..oo#########....
..oo#########....
....#########....
Output:
.................
.................
..---ooo---......
..---ooo---......
..---ooo---......
..------ooo......
..------ooo......
..------ooo......
..ooooooooo......
..ooooooooo......
..ooooooooo......
.................

Input:
.........................
.........................
....----oooo----.........
....----########.........
....----########.........
....----########.........
....----########.........
....----########.........
....----########.........
....----########.........
....oooo########.........
....oooo########.........
....oooooooooooo.........
....oooooooooooo.........
.........................
Output:
.........................
.........................
....----oooo----.........
....----oooo----.........
....----oooo----.........
....----oooo----.........
....--------oooo.........
....--------oooo.........
....--------oooo.........
....--------oooo.........
....oooooooooooo.........
....oooooooooooo.........
....oooooooooooo.........
....oooooooooooo.........
.........................

Is it ok if the entry has a probability it won't finish (bad randomness) even though the chances of that are extremely low? Also are you allowed to change characters other than the single newline-pipe?

@muddyfish Yes to first question (it must eventually finish with probability 1, assuming perfect randomness, but may theoretically run forever), no to second (the characters are fixed).

so is a probability of 0.9 recurring ok?

@muddyfish If you're generating random grids in a loop until one fits, that's ok.

Important test case: ......|......|......|...###|...###|...### (in case a solution tries all possible top-left coordinates, and tries to fit a 6x6 over the area)

@Sp3000 Thanks, I'll edit that in when I get the chance.

Python 2, 433 411 bytes
import re;i,o,l,j=input(),range,lambda s,r:s.replace(*r),"".join;i=l(l(l(i,".1"),"#."),"| ");s=o(len(i))
for x in s:
 for y in s:
    for q in s:
     r=map(list,l(l(i,"o."),"-.").split(" "))
     try:
        for v in o(q):r[x+v][y:y+q]=["".join(c*(q/3)for c in b)for b in["-o-","--o","ooo"]][3*v/q]
        m=re.match(i," ".join(j(i)for i in r))
     except:0
     if sum("-"in p for p in r)and m:print"|".join(l(j(i),"1.")for i in r);_

Exits with a NameError. Takes input pipe separated.
I'm mixing tabs and spaces here. SE doesn't render tabs properly.
'###o--....|###o--....|###-oo....|###-oo....|###ooo....|###ooo....|###.......'
 --oo--....|--oo--....|----oo....|----oo....|oooooo....|oooooo....|..........

'.....|.###.|.###.|.###.'
 .....|.-o-.|.--o.|.ooo.

'...-o-.|...-#o.|...ooo.|.......'
 ...-o-.|...--o.|...ooo.|.......

(Note extra spaces at the start are for prettiness only and aren't actually printed)

You can get rid of the extra tabs in your code and replace them with single spaces to cut down on a few bytes (that is, if you took the white space into consideration when counting the bytes in your code).

JavaScript (ES6), 291 bytes
g=>eval('w=g.search`\n`;h=g.length/w|0;for(n=(w<h?w:h)/3|0;s=n*3;n--)for(x=w+1-s;x--;)for(y=h+1-s;y--;[...g].every((c,i)=>c==o[i]|c=="#")?z=p:0)for(p="",i=h;i--;)p=(l=[,"-o-","--o","ooo"][(i-y)/n+1|0],l?"."[t="repeat"](x)+l.replace(/./g,c=>c[t](n))+"."[t](w-x-s):"."[t](w))+(p?`\n`:"")+p;z')

Explanation
Takes input grid as a newline separated string. Not completely golfed, will do more when I get time.
It works by:

Getting every possible position and size of a fish in the bounds of the input grid.
For each position/size, it builds a grid string with a fish in that position.
Checks if this is the correct output by iterating over every character. If each character either matches or is a hash, it outputs the built string.

var solution =

g=>
  eval(`

    // Get size of input grid
    w=g.search\`\n\`;
    h=g.length/w|0;

    // Check every possible size (n) and position (x and y) of fish
    for(n=(w<h?w:h)/3|0;s=n*3;n--)
      for(x=w+1-s;x--;)
        for(y=h+1-s;y--;

          // Check if possible solution matches input grid
          [...g].every((c,i)=>c==p[i]|c=="#")?z=p:0
        )

          // Create possible solution grid
          for(p="",i=h;i--;)
            p=(
              l=[,"-o-","--o","ooo"][(i-y)/n+1|0],
              l?
                "."[t="repeat"](x)+
                l.replace(/./g,c=>c[t](n))+
                "."[t](w-x-s)
              :"."[t](w)
            )+(p?\`\n\`:"")+p;
    z
  `)
<textarea id="input" rows="6" cols="40">..............
..............
.########.....
.########.....
.########-....
.########-....
.########o....
.########o....
.########o....
.########o....
.########.....
..............</textarea>

<button onclick="result.textContent=solution(input.value)">Go</button>

Python 2, 325 bytes
def f(s):
 s=map(list,s.split());R=range;L=len(s);M=len(s[0])
 for h in R(L/3*3,0,-3):
  for x in R(M-h+1):
   for y in R(L-h+1):
    if all(s[v%L][v/L]in".-#o #"[0<=v%L-y<h>v/L-x>=0::2]for v in R(L*M)):
     for k in R(h*h):s[y+k/h][x+k%h]="-o"[482>>k/h*3/h*3+k%h*3/h&1]
     return'\n'.join(map(''.join,s)).replace('#','.')

A badly golfed solution for now – the for .. in range(...)s are an utter train wreck. Inputs/outputs newline separated strings.
The byte count currently assumes space indents only – I'll switch to mixed tabs/spaces later when I'm done golfing, if necessary.

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


text:
The plus-minus sequence
The plus-minus sequence
The plus-minus sequence is one that starts with two seeds, a(0) and b(0). Each iteration of this sequence is the addition and subtraction of the previous two members of the sequence. That is, a(N) = a(N-1) + b(N-1) and b(N) = a(N-1) - b(N-1).
Objective Produce the plus-minus sequence, in infinitude or the first K steps given K. You may do this using an infinite output program, a generator, or a function/program that gives the first K steps. The output order does not matter, so long as it is consistent. (I.e., b(K) a(K) or a(K) b(K), with some non-numeric, non-newline separator in between.) The output must start with the input.
Test cases
For inputs 10 2 (of a(0) b(0), this is a possible output for the first K approach (or a subsection of the infinite approach):
10     2
12     8
20     4
24     16
40     8
48     32
80     16
96     64
160    32
192    128
320    64
384    256
640    128
768    512
1280   256
1536   1024
2560   512
3072   2048
5120   1024
6144   4096
10240  2048
12288  8192
20480  4096
24576  16384
40960  8192
49152  32768
81920  16384
98304  65536

For inputs 2 20 10 (a(0) b(0) k):
2     20
22   -18
4     40
44   -36
8     80
88   -72
16    160
176  -144
32    320
352  -288

This is a code-golf, so the shortest program in bytes wins.
Catalog
The Stack Snippet at the bottom of this post generates the catalog from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
## Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:
## Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:
## [><>](http://esolangs.org/wiki/Fish), 121 bytes

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

I notice a(2n) = a(0)·2ⁿ and b(2n) = n(0)·2ⁿ, but that's probably not useful here.

Can the non-numeric separator between a and b be a newline?

@Suever No, it cannot.

@CᴏɴᴏʀO'Bʀɪᴇɴ Thanks for the clarification!

@Suever Always my pleasure :)

We need to output the input?

@msh210 Yes, you do.

Can I output the terms in a list as [a,b]?

@EasterlyIrk Yes, you can.

Does the order of the input seeds matter? For example, could I take input as b(0) a(0)?

@Mego that's fine

It's notable that both of these sequences have standalone generation functions! WolframAlpha will even tell you what they are if you just copy paste the sequence in haha. Granted, those generation functions can be quite a few bytes. Here's one for the second column in your example. http://www.wolframalpha.com/input/?i=Table%5B%5B%2F%2Fmath:2%5E(x%2F2-1%2F2)+(1-(-1)%5Ex%2B2+sqrt(2)%2B2+(-1)%5Ex+sqrt(2))%2F%2F%5D,%7Bx,%5B%2F%2Fmath:1%2F%2F%5D,%5B%2F%2Fmath:15%2F%2F%5D,%5B%2F%2Fmath:1%2F%2F%5D%7D%5D

I'm a bit confused on requirements based on comments.  Do we have to output a string, or is just returning a sequence of paired values acceptable?

Returning a sequence is fine @guifa

Jelly, 5 bytes
ṄI;Sß

This is a recursive approach. Due to tail call optimization, the only limit is the ability to fit both integers into memory. Output is one list per line.
Try it online!
How it works
ṄI;Sß  Main link. Argument: [b[n], a[n]] (n = 0 for original input)

Ṅ      Print [b[n], a[n]] to STDOUT.
 I     Compute the increments of the list, i.e., [a[n] - [b[n]].
   S   Compute the sum of the list, i.e., b[n] + a[n].
  ;    Concatenate the results to the left and to the right.
    ß  Recursively call the main link.

Wow. That is quite impressive.

What does Main link actually mean?

@cat It's like C's main function. Every line defines a different function/link, but the last one gets called automatically when the program is executed.

Jelly programs consist of up to 257 different Unicode characters.
Isn't there 256 bits in a byte?

@MarkWright ¶ and linefeeds can be used interchangeably. You can use both in UTF-8 mode, but there's only \x7f to represent them in Jelly's code page.

So, the interpreter can read your file stored as 5 bytes?

@MarkWright Yes, and I wouldn't claim a score of 5 otherwise. With the custom encoding, the source code consists of the bytes c9 49 3b 53 15.

Ah, I see, thanks.

Haskell, 19 bytes
a#b=a:b:(a+b)#(a-b)

Produces an infinite sequence of numbers. Usage example:
Prelude> take 20 $ 2#20

[2,20,22,-18,4,40,44,-36,8,80,88,-72,16,160,176,-144,32,320,352,-288]

Python 2, 31 bytes
def f(a,b):print a,b;f(a+b,a-b)

Prints forever. Well, eventually you exceed the recursion limit, but that's a system limitation.

How long do you think this can go on for before a recursion error is raised?

@R.Kap it is ~1000. You can set this limit to whatever you want via sys.setrecursionlimit

@R.Kap It takes about 10 seconds on my machine.

10 seconds before raising a recursion error? Wow. In Python 3, I let mine go on for 30 minutes straight, and no error was raised whatsoever. I was able to print over 2000 digits for one of the numbers! I guess a while loop behaves differently than what you're doing.

I tried using this with a lambda but it took more bytes (f=lambda a,b:print(a,b)or f(a+b,a-b))

MATL, 10 bytes
`tDtswPdhT

This version will  output an infinite number of elements in the plus-minus sequence.
Try it Online!
(stop it after running due to infinite loop)
Explanation
    % Implicitly grab input as a two-element array [a,b]
`   % do...while loop
tD  % Duplicate and display the top of the stack
ts  % Duplicate [a,b] and add them together
w   % Swap the top two elements on the stack
P   % Swap the order of b and a in preparation for diff
d   % Compute the difference between b and a
h   % Horizontally concatenate [a+b, a-b]
T   % Explicit TRUE to make it an infinite loop
    % Implicit end of the do...while loop

Does this automatically convert all very large numbers into scientific notation?

@R.Kap It looks like it does. That doesn't appear to be explicitly forbidden in the original problem statement.

Wow, that's pretty cool. In Python, if you have very big numbers, it still prints out all the digits, one at a time, so it gets a bit tedious looking at all that. I just thought that most other languages did that too, but it looks like Python is the unique one in this case.

Well so in MATLAB (which MATL uses under the hood), you can change the  output format to be whatever you want. The default of MATL is to display up to 15 numbers before switching to scientific notation.

OOPS my bad, sorry, deleted ;)

You can save a byte using a for loop, :"ttswPdh so you can use the implicit display.

@David Luis and I had played with that a little bit but the issue is that when you specify k=5, you get the first 6 elements rather than 5 due to the seed. This is different than the example in the problem statement. You would have to add a q to the beginning bring it back to 10 bytes.

Ahh didn't notice that, sorry.

Julia, 25 bytes
a<|b=[a b]|>show<a+b<|a-b

Maximum syntax abuse. Julia is weird. Try it online!
Alternate version, 29 bytes
Note that the output will eventually overflow unless you call <| on a BigInt. Unfortunately, show will prefix each array with BigInt in this case. At the cost of four more bytes, we can generated whitespace-separated output for all numeric types.
a<|b="$a $b
"|>print<a+b<|a-b

Try it online!
How it works
We define the binary operator <| for out purposes. It is undefined in recent versions of Julia, but still recognized as an operator by the parser. While \ (not explicitly defined for integers) is one byte shorter, its high precedence would require replacing a+b<|a-b with (a+b)\(a-b) (+3 bytes) or \(a+b,a-b) (+2 bytes).
When a<|b is executed, it starts by calling show to print [a b] to STDOUT. Then, a+b<|a-b recursively calls <| on the sum or the difference.
Since the recursion is (supposed to be) infinite, the comparison < is never performed; it sole purpose is chaining the two parts of the code. This saves two bytes over the more straightforward alternative ([a b]|>show;a+b<|a-b).

Pyth, 10 9 bytes
Thanks to @isaacg for 1 byte.
#=Q,s
Q-F

Prints an infinite sequence of pairs.
$ pyth plusminus.p <<< "[10,2]" | head -n 15
[10, 2]
[12, 8]
[20, 4]
[24, 16]
[40, 8]
[48, 32]
[80, 16]
[96, 64]
[160, 32]
[192, 128]
[320, 64]
[384, 256]
[640, 128]
[768, 512]
[1280, 256]

The first and last Qs can be removed - Pyth will fill them in implicitly.

@isaacg So that got implemented then? Cool. I tried removing the first one, but that didn't work.

That's strange, removing the first one worked on my machine.

05AB1E, 7 bytes
Uses the first-k method. Input in the following for:
k
[a, b]

Code:
FD=OsÆ‚

Explanation:
F        # For N in range(0, k).
 D=      # Duplicate top of the stack and print without popping.
   O     # Sum up the array.
    sÆ   # Swap and perform a reduced subtraction.
      ‚  # Pair the top two elements. a, b --> [a, b]

Uses the CP-1252 encoding. Try it online!

The code is vaguely reminiscent of the language name...

@CᴏɴᴏʀO'Bʀɪᴇɴ Hahaha, both unreadable

C, 81 bytes
a,b;main(c){for(scanf("%d%d%d",&a,&b,&c);c--;a+=b,b=a-b-b)printf("%d %d\n",a,b);}

k, 12
{(+;-).\:x}\

.
k){(+;-).\:x}\[10;10 2]
10  2
12  8
20  4
24  16
40  8
48  32
80  16
96  64
160 32
192 128
320 64

Could also be called in the form of
k)10{(+;-).\:x}\10 2

11 bytes

APL, 37 chars
{⍺←3⊃3↑⍵⋄⎕←z←2↑⍵⋄⍺=1:⋄(⍺-1)∇(+/,-/)z}

Can be used as
    {⍺←3⊃3↑⍵⋄⎕←z←2↑⍵⋄⍺=1:⋄(⍺-1)∇(+/,-/)z} 10 2
10 2
12 8
20 4
24 16
40 8
48 32
80 16
[...]

or
      {⍺←3⊃3↑⍵⋄⎕←z←2↑⍵⋄⍺=1:⋄(⍺-1)∇(+/,-/)z} 10 2 6
10 2
12 8
20 4
24 16
40 8
48 32

MathGolf, 8 bytes
ô`αp‼+-∟

Try it online!
Takes input in reverse order, but that's simply because that's how they are pushed onto the stack. Otherwise it'd be 1 byte longer. 2-3 bytes comes from the output. Without the need of actually printing one pair per line, the program could be æ`‼+-∟ (fills the stack with the elements of the sequence indefinitely), or É‼+-∟ (prints all elements of the sequence except the first one to debug, as long as -d flag is active).
Explanation
ô      ∟   do-while-true
 `         duplicate the top two items
  αp       wrap last two elements in array and print
    ‼      apply next two operators to the top stack elements
     +     pop a, b : push(a+b)
      -    pop a, b : push(a-b)

Hi Max. Not sure since when, but currently the MathGolf version on TIO doesn't accept string input at all anymore.. Doesn't matter what builtin I use, even without any code for the program at all, if a string input is given like for example ABC, I get an error on line stdin = StdIn(line) in the Python code..

@KevinCruijssen Hi! String input should be given as 'ABC' or "ABC". Internally, ast.literal_eval is used to parse the input. There are still some quirks that need to be ironed out, but you should be able to do this.

Ah ok, that makes sense. Btw, is there a builtin to split a string/number into parts of certain size or some amount of equal-sized parts? I.e. ABCDEF to [AB, CD, EF]?

Nvm, apparently there isn't, but I've been able to find a way to do so: 2ô_2<\1>] (hard-coded to input-length 6 and split into parts of size 2, since that was what I needed, but should probably be modifiable to work for generic input-sizes and part-sizes).

Perhaps you have overlooked the behavior of the division operator for strings? / does exactly what you say, split into chunks of $n$ characters. Check it out

Oh, I have indeed looked past that. -7 bytes right there, thanks. :)

Reng v.3.2, 9 bytes  (self-answer, non-competing)
ii¤ææö±2.

Takes two inputs (a b) and outputs b a. Try it here!
i takes input twice, ¤ duplicates the stack, æ prints a number and a space (and does so twice, there being two), ö prints a newline, ± does what you might expect, and 2. skips the next two characters, wrapping around the input getting characters.

Hmm, would you mind explaining what each of those hieroglyphics do to a newb like me? :)

@KevinCruijssen I have explained the mystery. :)

Batch, 54 bytes
@echo %1 %2
@set/aa=%1+%2
@set/ab=%1-%2
@%0 %a% %b%

Note that CMD.EXE is limited to 32-bit signed integers, so it will quickly overflow and print garbage and error messages.

Always love to see a batch answer around here! :D

@CᴏɴᴏʀO'Bʀɪᴇɴ I wrote it especially for you.

Python 3.5, 55 43 bytes:
def q(a,b):
 while 1:print(a,b);a,b=a+b,a-b

Prints out the correct sequence seemingly forever. I have been able to let this go on for about 30 minutes without any error being raised, and the program had printed out 2301 digits for the first number, and 1150 digits for the second! Based on this, I guessing that, being provided sufficient hardware to run on, this can go on for WAY longer and print out WAY more digits, and also has theoretically no recursion limit, courtesy of the while loop!

I think you're supposed to print out the current values at the beginning of the loop, so that the first output is the same as the input. Also, as this is code golf, you should optimise away the parentheses and intermediate variables. Finally, as a style nit, I think you should consider naming the variables a and b to match the question.

@Neil Thanks for the tips. :)

I'm confused; you've got both a while and a recursive call now...

@Neil Yeah, I did not notice that. Now it's fixed, and just a while loop, with theoretically no limits whatsoever.

Python 2.7, 56, 42 bytes:
a,b=input()
while 1:print a,b;a,b=a+b,a-b

Simple loop that either prints forever(ish).

You can use a single space for the indent level to save bytes. Also, you do not have to do both methods, just one or the other, so you can remove the default parameter.

Oh damn didn't notice notepad was making my tab into 4 spaces, and sure thing i'll restrict it to one, Thanks.

If you make this a program by changing the first line to a,b=input(), you can remove the indent.

@xnor Thanks, only saves 1 byte but it's not ugly anymore!

Perl 6, 23 bytes (infinite)
Edit: thanks to JoKing, the sequence version is now the shortest (also removed .say per clarification from OP:
{@_,{.sum,[-] |$_}...*}

TIO:InfiniteSeq
Old functional answer
->\a,\b {(a,b).say;f(a+b,a -b)}

TIO:InfiniteFunc
Note that Perl 6 has no per se recursion limit, it is purely based upon memory available, so this will reach the millions before bombing out.

23 bytes for infinite

@Joking: Nice! I feel rather silly for not thinking of .sum .  I think the requirements obligate outputing in the function (I've asked for clarification, but most others seem to have that, that gives 28 with https://tio.run/##K0gtyjH7n1upoJamYPu/2iFep1qvOLHSWq@4NFcnWjdWoUYlvlZPT0@r9j9QWCFNw9BAx0gzOs7QIPY/AA )

Rust, 78 bytes
|a,b,k|{let mut x=(a,b);for _ in 0..k{println!("{:?}",x);x=(x.0+x.1,x.0-x.1)}}

Try it online!
For fun, here's also an iterator that'll give you this sequence:
|a,b|(0..).scan((a,b),|x,_|{let i=*x;*x=(x.0+x.1,x.0-x.1);Some(i)})

The iterator should also be an acceptable answer, FWIW! Seems to be shorter too if it does indeed generate the sequence "in infinitude" as per the question

Factor, 62 bytes
:: f ( a b -- x ) a b "%s %s" printf a b + a b - f ; recursive

recursive, or else the callstack runs out too quickly.

Ruby, 25 bytes
Based on xnor's Python solution. Perhaps I'll make a generator in another answer, but this will print a, then b, then the new a, then the new b, ad infinitum.
f=->a,b{p a,b;f[a+b,a-b]}

Python 3, 42 bytes
I wanted to write a generator for this function, and so I did.
def f(a,b):
 while 1:yield a,b;a,b=a+b,a-b

In Python 3, the sequence is generated in this way:
>>> gen = f(2, 20)
>>> next(gen)
(2, 20)
>>> next(gen)
(22, -18)
>>> next(gen)
(4, 40)
>>> next(gen)
(44, -36)
>>> next(gen)
(8, 80)

Common Lisp, 57
(lambda(a b)(loop(print`(,a,b))(psetf a(+ a b)b(- a b))))

Uses psetf, which affects values to variables in parallel, and the simple loop syntax.

bash + GNU coreutils, 75 bytes
a=$1
b=$2
for i in `seq $3`;{ echo -e "$a\t$b";c=$a;a=$((c+b));b=$((c-b));}

Invocation:
./codegolf.sh 2 10 5

CP/M 8080, 47 bytes
z80 mnemonics but nothing the 8080 doesn't have, source commented once I decided to count the output rather than the input but terse function names retained, hand assembled so forgive the 'xx's where I know the number of bytes but haven't worked out the output addresses or offsets:
# setup
ld c, 2     0e 02

# loop
.s

# update H (temporarily in B)
ld a, h     7c
add l       85
daa         27
ld b, a     46

# update L
ld a, h     7c
sub l       95
daa         27
ld l, a     6f

# copy B back to H, output H
ld h, b     60
call +o     cd xx xx

# output L
ld b, l     45
call +o     cd xx xx

# repeat
jr -s       18 xx

# output a two-digit BCD value followed by a space
.o

# output high digit
ld a, b     78
rra         1f
rra         1f
rra         1f
rra         1f
call +ob    cd xx xx

# output low digit
ld a, b     78
call +ob    cd xx xx

# output a space
ld e, #$20  1e 20
call 5      cd 00 05

# return
ret         c9

# output a single BCD digit
.ob
and #$f     e6 0f
add #$30    c6 30
ld e, a     5f
call 5      cd 00 05
ret         c9

Clojure, 44 bytes
#(iterate(fn[[a b]][(+ a b)(- a b)])[%1 %2])

Function that produces an infinite lazy sequence.

Perl 5, 40 bytes
requires -E (free)
sub a{say"@_";($c,$d)=@_;a($c+$d,$c-$d)}

or (same length)
$_=<>;{say;/ /;$_=$`+$'.$".($`-$');redo}

(I struck through the latter because it should have rounding errors for some iterations.)
Hat-tip.
But I suspect there must be a shorter Perl 5 solution.

If there is a shorter solution, Ton Hospel will find it. :P

Took a while, but I found a shorter way:

RETURN, 21 bytes
[¤.' ,$.'
,¤¤+2ª-F]=F

Try it here.
Recursive operator-lambda. Usage:
[¤.' ,$.'
,¤¤+2ª-F]=F10 2F

Explanation
[                 ]=F  declare function F for recursion
 ¤.' ,$.'␊,            output top 2 stack items along with trailing newline
           ¤¤+2ª-      get plus and minus of top 2 stack items
                 F     recurse!

><>, 26 bytes
:?!;1-r:n48*o:@@:nao:@+}-$

Call with a, b, n on the stack, where n is the number of turns or a negative value for infinite output. Outputs a and b separated by a space.
As an explanation, here is how the stack evolves during runtime :
abn
nba
nbaa
naab
naabb
nabab
nab+
+nab
+n-
+-n

You can try it on the online interpreter with a positive amount of turns but you will need to use the official python interpreter to test the infinite mode.

$ python fish.py -c ':?!;1-r:n48*o:@@:nao:@+}-$' -t 0.01 -v 10 2 -1
10 2
12 8
20 4
24 16
40 8
48 32
80 16
96 64
160 32
192 128
320 64
384 256
640 128
768 512
1280 256
1536 1024
2560 512
3072 2048
5120 1024
6144 4096
10240 2048
12288 8192
20480 4096
24576 16384
40960 8192
49152 32768
81920 16384
98304 65536
163840 32768
196608 131072
327680 65536
393216 262144
655360 131072
786432 524288
1310720 262144
[...]

Fuzzy Octo Guacamole, 17 16 bytes
^^(:C.Zs.aZ.s.-)

This was hard to make, due to client-side errors. But I got it!
Walkthrough:
^^                # Get input twice, pushes it to the stack.
  (               # Start a infinite loop.
   :              # Prints the stack, and since it has [a,b] is just the output.
    C             # Copy the active stack to the inactive stack.
     .            # Shift the active stack.
      Z           # Reverse the stack.
       s          # Move the top item on the active stack to the top of the inactive.
        .         # Switch stacks again.
         a        # Add the top 2 items, giving the first new item.
          Z       # Reverse the stack, so we keep the 'a' safe and prepare for the 'b'.
           .      # Switch stacks.
            s     # Move the top item on the active stack to the top of the inactive stack.
             .    # Switch stacks.
              -   # Minus the top 2 items, giving 'b'.
               )  # End infinite loop.

I don't know FOG all that well, but can't you move the : to the beginning of the loop and eliminate the need for printing twice?

oooooh @CᴏɴᴏʀO'Bʀɪᴇɴ thanks.

Don't forget to update the explanation ;)

@CᴏɴᴏʀO'Bʀɪᴇɴ whadda ya mean? :P

Seriously, 12 bytes
,,1WX■@│+)-1

Outputs an infinite stream, format is b(n) a(n), one pair of outputs per line.
No online link because TryItOnline doesn't do so well with infinite loops.
Explanation:
,,1WX■@│+)-1
,,1           push a(0), push b(0), push 1
   W          while loop:
    X           discard the 1 (only used to make sure the while loop always runs)
     ■          print all stack elements, separated by spaces, without popping
      @│        swap, duplicate entire stack
        +)      push a(n) + b(n) (a(n+1)) and move it to the bottom of the stack
          -     push a(n) - b(n) (b(n+1))
           1    push 1 to make sure the loop continues

J, 16 12 bytes
0&(]+/,-/)~<

Produces only the first k values for the sequence based on the given seeds.
Saved 4 bytes using the trick (or syntactic sugar) shown by @randomra in this comment.
Usage
   f =: 0&(]+/,-/)~<
   2 20 f 10
  2   20
 22  _18
  4   40
 44  _36
  8   80
 88  _72
 16  160
176 _144
 32  320
352 _288

C#, 50 bytes
f=(a,b)=>{Console.WriteLine(a+" "+b);f(a+b,a-b);};

Full source, including test case:
using System;
using System.Numerics;

namespace PlusMinusSequence
{
    class Program
    {
        static void Main(string[] args)
        {
            Action<BigInteger,BigInteger>f=null;
            f=(a,b)=>{Console.WriteLine(a+" "+b);f(a+b,a-b);};
            BigInteger x=10, y=2;
            f(x,y);
        }
    }
}

The BigInteger data type is used so the numbers don't overflow and become 0.
However, since it is a recursive solution, expect a stack overflow.

R, 41 bytes
The recursive solution, based on xnor's python solution:
f=function(a,b){cat(a,b,"\n");f(a+b,a-b)}

For the first-k method, the code size doubles to 82 bytes:
function(a,b,k=Inf,i=1){cat(a,b,"\n");while(i<k){cat(a<-a+b,b<-a-b*2,"\n");i=i+1}}

This function takes a and b as input, plus optionally k. If k is unspecified, it continues forever. (Well, until i overflows, which is a very big number, much larger than the recursion limit.)

Perl 5 -a, 41 bytes
@F=($F[0]+$F[1],$F[0]-$F[1])while say"@F"

Try it online!
Outputs the sequence infinitely.

dc, 27 bytes
rfr[rd3Rd_3R+p_3R-plxx]dsxx

Try it online!

JavaScript - 4438/120 Bytes
38 Bytes from n = 0 to infinity
f=(a,b)=>{console.log(a,b);f(a+b,a-b)}

Try it online!
120 Bytes from n = 0 to n = k

f(10,2,20);
f(2,20,20);

function f(a,b,k){for(o=[[a,b]],i=1;i<k;i++)o.push([o[i-1][0]+o[i-1][1],o[i-1][0]-o[i-1][1]]);console.log(o.join("\n"))}

Pascal - 71 70 Bytes
program A;

procedure F(a:integer;b:integer);begin WriteLn(a,' ',b);F(a+b,a-b)end;

begin { main program }
   F(10,2);
   F(2,20);
end.

Try it online!

Forth (gforth), 46 bytes
: f 0 do 2dup swap . . cr 2dup + -rot - loop ;

Takes in A(0) B(0) and K
Try it online!
Code Explanation
: f           \ start a new word definition
  0 do        \ loop from 0 to k-1 (inclusive)
    2dup      \ duplicate A(n) and B(n)
    swap . .  \ print them out (swap the order so we get A(n) first)
    cr        \ print a newline
    2dup      \ duplicate A(n) and B(n) again
    + -rot -  \ Add A(n) and B(n), move the result, then subtract B(n) from A(n)
  loop        \ end the counted loop
;             \ end the word definition

Stax, 8 bytes
≈└i≈√=æ`

Run and debug it
Takes input in the form a(0) b(0) k.

Appleseed, 36 bytes
(def S(q(P(cons P(S(sum P)(apply - P

A function that takes two arguments and returns an infinite list. Try it online!
Explanation
(def S               Define S to be
 (q                  the following list, which can be treated as a function
  (P                 where P is the argument list (or in this case, pair):
   (cons              Construct a list
    P                 consisting of P
    (S                followed by the result of a recursive call with arguments:
     (sum P)           Sum of the pair of arguments
     (apply - P)))))   The first argument minus the second

Vyxal, 6 bytes
‡÷₍+-Ḟ

Try it Online! Outputs an infinite list.
     Ḟ # Create an infinite list by repeatedly calling on the input...
‡      # A function
 ÷₍    # Push each  value, and wrap...
   +-  # Their sum and difference

Mathcad, 52 bytes
Two versions: one uses Mathcad's range variables (a form of iterator) and the second uses a for-loop inside a function.

The Mathcad user interface is a 2D "whiteboard", wherein expressions (which may be equations, text, plots or results) are evaluated in left-to-right, top-to-bottom order.  Identifier names are usually typed letter-by-letter, but there are also many combinations that allow the user to enter Mathcad specific operators.  For example, typing "=" will enter the definition operator (:=) and ";" will enter the range operator (..).  Typing ctl-m brings up the matrix dialog, and typing the number of row and columns will create a matrix of that size.  For golfing purposes, a Mathcad "byte" is taken to be the number of keyboard characters necessary to enter a letter/number/operator.
{the augment function is just there to make the display more table like but doesn't count to the byte total}

JavaScript (Node.js), 44 bytes, finite
k=>F=(a,b)=>k--&&F(a+b,a-b,console.log(a,b))

Try it online!
The function should be called with currying syntax (k)(a,b).

C (gcc), 62 bytes
int f(int a,int b){for(;1;b=(a+=b)-2*b)printf("%d %d\n",a,b);}

Try it online!
Theoretically outputs indefinitely, however, it only outputs the sequence until integer overflow occurs.

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


text:
Double-duty quine: quine!dlroW ,olleH
Write a program that will output its own source code when run, and nothing else. Seems easy, right?
The catch is that when the source code is reversed, your program must output "Hello, World!" exactly, without the quotes.
This is code-golf, so lowest byte count wins.
Edit: Your quine must be a proper quine.

This is one of the things to avoid when writing challenges

@Mego to be fair, this isn't the kind of generalised quine I'm talking about there, since this isn't "print function X of your source code". That said it probably won't play out very differently from the other "when you reverse the program..." challenges we have.

@MartinBüttner It's similar enough to the challenges you described that I feel the same reasoning applies.

Y, 19 bytes
Upxp"!dlroW ,olleH"

U captures a string with U at the beginning until the next U is met, in this case, the source code. p prints the item, and x is a termination link. When reversed, this looks like:
"Hello, World!"pxpU

This captures the string and prints it with p, again terminating the program with x.
Try it here!

U pushes U implicitly? ಠ_ಠ

@Sp3000 It's made so that the program can modify itself. More technically, the U command is the "chain link capture command". It's not made for quining, but that won't stop me from using it for quining. :P

I'm not sure this counts as a proper quine. Our definition requires a section of the program which encodes a different part of the program, but U... just encodes U....

@Dennis define encodes? I thought the p bit did the output, which was part of the encoding.

I took encode as something that generates the output, so p and x wouldn't count. For example, the shortest SMBF quine is still considered a cheating quine, even though the code has to print it. Might be worth asking Martin for clarification though.

JavaScript (ES6), 42 38 bytes
f=_=>/\//g&&"f="+f||"!dlroW ,olleH">=_

Reversed
_=>"Hello, World!"||f+"=f"&&g//\/>=_=f

Explanation
When reversed, it becomes an anonymous function that returns the string Hello, World!.
The regex /\//g becomes a comment when it is reversed, which allows the syntactically invalid >=_=f to be commented out in the reversed code.

This is very smart. :) I wouldn't have thought of this.

+1 just for the shifty-eyes: =_=.

JavaScript (ES6), 71 bytes
trela=a=>alert("trela="+trela+"\ntrela\n``")//
`!dlroW ,olleH`
trela
``

How it Works:
Line 1 defines function trela that when run outputs the program's source code. Line 2 is an unassigned string, does nothing. Lines 3 and 4 call trela abusing the template string syntax.
Reversed:
``
alert
`Hello, World!`
//)"``n\alertn\"+alert+"=alert"(trela>=a=alert

How it Works:
Line 1 is an unassigned string, does nothing. Lines 2 and 3 abuse the template string syntax to print Hello, World!. Line 4 is a comment.

I see that JavaScript seems to have some leeway with its syntax. Well, at least more than Python does. That's nice.

Is the empty \`` unnecessary?

@EasterlyIrk No, it is necessary to call the trela function (which prints the quine) in the forwards version

@jrich oh, I didn't realize that the \`` was the arguments. Cool.

I feel like I should be getting used to see trela around here... >_>

GolfScript, 33 bytes
Forwards
{`".;1$~]"}"!dlroW ,olleH".;1$~]

Try it online!
Backwards

]~$1;."Hello, World!"}"]~$1;."`{

Try it online!

GolfScript, 29 28 bytes
"`'.~]'#\"!dlroW ,olleH".~]

It has one trailing newline. Try it here.
Reversed:

]~."Hello, World!"\#']~.'`"

Try it here.

RETURN, 94 bytes
"34¤¤,,,,,,,,,,,,,% 'H'e'l'l'o',' 'w'o'r'l'd'!'"34¤¤,,,,,,,,,,,,,% 'H'e'l'l'o',' 'w'o'r'l'd'!'

Reversed:
'!'d'l'r'o'w' ','o'l'l'e'H' %,,,,,,,,,,,,,¤¤43"'!'d'l'r'o'w' ','o'l'l'e'H' %,,,,,,,,,,,,,¤¤43"

Try it here.
Outputs to STDOUT. Until I find a better quine framework, this will have to do for now.
Explanation
"34¤¤,,,,,,,,,,,,,% 'H'e'l'l'o',' 'w'o'r'l'd'!'"

This contains the quine string. In reverse, this is pushed to the stack but not outputted.
34¤¤,,,,,,,,,,,,,

This pushes a quote char to the stack and outputs the result twice until there is nothing left to output. In reverse, this will print the charcodes already on the stack.
% 'H'e'l'l'o',' 'w'o'r'l'd'!'

This one pops the top stack item (in reverse, this would pop a space char) and pushes a series of charcodes to the stack (in reverse, these charcodes would later be printed by the series of ,'s).

I can't tell if this is really crazy RETURN code, or just normal RETURN code ._.

Both ;_; I cry everytiem

Fission 2, 42 bytes
Shameless adaptation of a excellent quine by @MartinBüttner in this answer
'!+O!'!d'!l'!r'!o'!W'! '!,'!o'!!l'!e'!H'R"

Try it online
And reversed
"R'H!'e!'l!!'o!',!' !'W!'o!'r!'l!'d!'!O+!'

Try it online
In the quine version the atom starts at the R heading right.  The "starts print mode which wraps to the next " (itself).  This prints everything out except the ".  '!+ set the atom to char ".  O prints it out and destroys the atom ending the program.
The reversed version starts at the R again and for each character in Hello, World set the atom and prints ! it out without destroying the atom.  For the final character ! the print O destroys the atom.

Javascript ES6, 55 bytes
$=_=>`$=${$};$()//"!dlroW ,olleH"`;$()//"!dlroW ,olleH"

Quite simple, really.

Python 2, 60 bytes / Python 3.8 (pre-release), 64 bytes
Python 2: (60 bytes)

Normal :

a="print'a=%r;exec a#\\42'%a#'!dlroW ,olleH'tnirp;";exec a#"

Reversed:

"#a cexe;";print'Hello, World!'#a%'24\\#a cexe;r%=a'tnirp"=a

Try it online!
Python 3: (64 bytes)

Normal:

exec(a:="print('exec(a:=%r)#\\42'%a)#)'!dlroW ,olleH'(tnirp;")#"

Reversed:

"#)";print('Hello, World!')#)a%'24\\#)r%=:a(cexe'(tnirp"=:a(cexe

Try it online!
Explanation :

I used a modification of the quine a="print'a=%r;exec a'%a";exec a adding some comments # to isolate the "hello world" part.
I also used \\42 to get the char " without breaking my strings or having some slashes \ at the printing

Thanks to the previous comments and a few well placed quotes, the reversed program is very straight forward

Python 2, 131 bytes
Forward:
print(lambda x:x+repr(x)+")#'!dlroW ,olleH' tnirp")('print(lambda x:x+repr(x)+")#\'!dlroW ,olleH\' tnirp")(')#'!dlroW ,olleH' tnirp

Reverse:
print 'Hello, World!'#)'()"print '\Hello, World!'\#)"+)x(rper+x:x adbmal(tnirp'()"print 'Hello, World!'#)"+)x(rper+x:x adbmal(tnirp

The first half is a one-line quine, followed by a # to form a comment separating the first half from the simpler second half.

Adapting this Python quine gives _='_=%r;print _%%_#"!dlroW ,olleH"tnirp';print _%_#"!dlroW ,olleH"tnirp

C, 108 bytes
char*s="char*s=%c%s%c;main(){printf(s,34,s,34);}";main(){printf(s,34,s,34);}//};)"!dlroW ,olleH"(stup{)(niam

C99 I assume?

Python 2, 70 bytes
_='_=%r;print _%%_#"dlroW ,olleH"tnirp';print _%_#"!dlroW ,olleH"tnirp

><> (Fish), 25 bytes
"r00g>o<o>'Hello, World!'

Try it
Reversed
'!dlroW ,olleH'>o<o>g00r"

Try it

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


text:
Make a Strawpoll

Moderator note: https://strawpoll.me has officially shut down, and the linked API no longer appears to work or provide data. Therefore, new answers cannot actually do the task and so the challenge has been closed to prevent any new answers.

Strawpolls are great, and we use them in chat all the time for getting opinions on things. But they're kinda annoying to make since you need a webbrowser to make them, and everyone knows that I access PPCG only through SE APIs and curl. So I want you to write some code that uses Strawpoll's API to make a strawpoll with the given options.
Specs
Take as input a list in any reasonable format of options as strings, and a title which is also a string. Then use the API to make a strawpoll with that title and those options and output the url.
Multiples should not be allowed, duplicate checking should be enforced, and captchas should not be necessary.
Example
"My Awesome Poll"
["option 1", "I like pies", "I also like cakes"]

Output: http://strawpoll.me/7275997
This is code-golf, so shortest code in bytes wins!

(Just to help everyone) TL;DR: do this: https://strawpoll.me/api/v2/polls{"title":"This is a test poll.","options":["Option #1","Option #2"],"multi": true}

"NOTE: You must specify a "Content-Type: application/json" header in your request."

The API sort of doesn't work, or at least it doesn't work like the docs say it does

https://strawpoll.me/api/v2/polls always responds with http 400

Are you required to return the strawpoll in http://? Can I return in https:// instead?

@KevinLau sure.

I can't get the API to respond properly with Factor or Python. @KevinLau have you tested yours?

I have, and it returns a correct response that I can use to get the strawpoll link.

I’ve closed this question because https://strawpoll.me has officially shut down, along with it's API, and so future answers to this are impossible

Factor, 257 262 bytes
TUPLE: p title options dupcheck ;
[ command-line rest [ first ] [ rest ] bi "normal" p boa >json "https://strawpoll.me/api/v2/polls" <post-request> "application/json" "Content-Type" set-header http-request nip json> id>> 10 base> "http://strawpoll.me/" prepend ]

Expects a name as the first command-line arg, then options after that.
Requires com-auto-use.
Ungolfed:
TUPLE: poll
  title options dupcheck ;

: post-json ( post-data url -- response data )
  <post-request>
    "application/json" "Content-Type" set-header
  http-request ;

: strawpoll-main ( -- )
  command-line rest [ first ] [ rest ] bi "normal" poll boa
  >json "https://strawpoll.me/api/v2/polls" post-json nip
  json> id>> 10 base> "http://strawpoll.me/" prepend print ;

Ruby 2.2.4 + HTTParty: 129 bytes
Anonymous function; returns a string with the strawpoll URL. Remember to install the HTTParty gem before running.
->q,a{require'httparty';s="http%s://strawpoll.me/%s"
s%[p,HTTParty.post(s%[?s,"api/v2/polls"],body:{title:q,options:a},verify:p)["id"]]}

If the URL can be returned with https:// instead of http://, 126 bytes:
->q,a{require'httparty';s="https://strawpoll.me/%s"
s%HTTParty.post(s%"api/v2/polls",body:{title:q,options:a},verify:p)["id"]}

Did you set the Content-Type: application/json header?

I got a proper response back, so I'd assume that HTTParty does that for me already.

This gem won't install, which is really annoying since I'd like to figure out why I keep getting HTTP 400.

What's your Ruby version? I updated mine to the version I have, and the gem says it needs 1.9.3+

Python, 145 bytes
lambda t,o:post('https://api.strawpoll.com/v3/polls',json={"title":t,"poll_options":[{"value":x}for x in o]}).json()["url"]
from requests import*

A function which takes in a string for the title and set of strings for the options and returns the URL. I am not including an ATO/TIO link because you aren't able to do requests from those platforms.
In the intervening years since this question was asked, the original strawpoll API has become defunct, so I'm using the newer API, which is unfortunately more verbose.


text:
Help me sort my socks!
I have a pile of clean socks that I want to sort into pairs. Unfortunately, I can only take socks from either end of the pile, not the middle. Further, I can only remove socks from the pile a matching pair at a time. My strategy is to first split the pile into one or more smaller piles. I think some examples will make this clear. I'll represent each sock as a positive integer (matching integers indicate equal socks).
If the initial pile of socks is
1 2 3 3 2 1

then I don't have to do any splitting. I can remove both 1 socks, then both 2 socks, then both 3 socks.
If instead the initial pile is
1 2 3 2 3 1

then I have to split it first because I won't be able to pair all the socks by just removing them from the end. One possibility is to split it into the two piles
1 2 3 and 2 3 1

Now I can remove the 1 socks, leaving 2 3 and 2 3, followed by the 3 socks, leaving 2 and 2, and finally the 2 socks.
Your Job
Given the initial pile of socks, write a program that will split it into smaller piles that will allow me to sort the socks. Your program should split the pile into the fewest number of piles possible (if there are multiple best solutions, you need only find one).
The input will be given as a list, delimited string, or other convenient form. It will contain only integers between 1 and some maximum value n, with each integer occurring exactly twice.
The output should consist of the input list split into smaller lists, given in any convenient form.
Examples
Input             Sample Output
1 1               1 1
1 2 1 2           1; 2 1 2
1 3 2 4 3 2 1 4   1 3 2; 4 3 2 1 4
1 2 3 4 3 4 1 2   1; 2 3; 4 3 4 1 2
1 1 2 2 3 3       1 1 2; 2 3 3
4 3 4 2 2 1 1 3   4 3 4 2; 2 1 1 3

Note that this isn't the only allowed output for most of these inputs. For the second case, for example, the outputs 1 2; 1 2 or 1 2 1; 2 would also be accepted.
Thanks to Sp3000 for some test suggestions!
I hate spending a long time sorting my clothes, so make your code as short as possible. Shortest answer in bytes wins!
Notes

I don't want to have to look behind a sock to see if its matching pair is there, so taking both socks in a pair from the same end is not allowed. E.g. if the pile is 1 1 2 2 then you wouldn't be able to leave it as one pile and take both 1 socks from the left end.

May I say welcome to PPCG Carmeister. This is a very good first challenge +1.

Welcome to PPCG! This is a very good first question. Though this question doesn't appear to have any major issues, we encourage users to use the Sandbox to receive feedback on their challenges before posting them.

So 123213 could be split into 1; 23; 213 (1; 23; 213 -> 1; 2; 21 -> ; 2; 2)?

@Mego Thanks! I'll be sure to do that in the future.
@R.Kap That would be a valid way to split it, but the answer should give a splitting that splits it into the smallest number of piles possible. Since it's possible to split 123213 using only two piles, your answer would have to give one of two-pile splits.

"either end of the pile" either the start of the end?

@ven I'm not entirely sure I understand your question, but the socks available to take are those at the beginning of each pile and those at the end of each pile.

Pyth, 25 bytes
hf!u #-R.-F{BhMs_BMGGT)./

Test suite
Explanation:
hf!u #-R.-F{BhMs_BMGGT)./
                       ./    Form all partitions (implicitly) of the input.
 f                           Filter the permutations on
   u                 T)      Run the following function on the partition
                             until it reaches a fixed point:
                _BMG         Bifurcate the lists on reversal
               s             Concatenate
             hM              Take the first element of each list.
                             These elements are all the ones on the ends of lists.
           {B                Bifurcate on deduplication
        .-F                  Bagwise subtraction.
                             Only elements repeated in ends of lists remain.
      -R            G        Remove these elements from each list.
   ' #'                      Filter out empty lists.
  !                          Negate. Only an empty list as fixed point succeeds.
h                            Output the first successful partition.

JavaScript (ES6), 329
Not an easy task for a language that has no combinatorics builtins.
Probably sligthly more golfable.
Note: all partition are at least of size 2, as a partition with a single element is always less useful.
Example: [1] [2 3 4] // can take 1 or 2 or 4
Better: [1 2] [3 4] // can take 3 too

a=>{G=(v,i,u=v)=>{if(i--){for(;r[i]=--u;)if(G(u,i))return 1;}else for(w=[...r,n=l].map((x,i)=>a.slice(z,z=x-~i),z=0),y=w.join`;`;w.map(b=>[0,1].map(q=>(x=b[q*=~-b.length])&&(t[x]?([c,p]=t[x],n-=2,p?c.pop():c.shift(),q?b.pop():b.shift()):t[x]=[b,q])),c=0,t=[]),c;)if(!n)return 1};for(l=a.length,r=[],k=0;!G(l-k-1,k);k++);return y}

Explanation in parts
(it's overly verbose, but I found it tough to explain - eventually skip to "put it all together")
A recursive function to enumerate all possible splits of an array
// v: array length
// i number of splits
// fill the global array r that must exists
G=(v,i,u=v)=>
{
  if(i--)
  {
    for(;r[i]=--u;)
      G(u,i)
  }
  else
  {
    // the current split position are in r, ready to use
    // for instance...
    parts = [...r,a.length].map(x=>a.slice(z,z=x),z=0)
    console.log(r, parts)
  }
};

r=[]
a=['A','B','C','D']
G(4, 2)

// output in console (firebug)
[2, 3] [["A", "B"], ["C"], ["D"]]
[1, 3] [["A"], ["B", "C"], ["D"]]
[1, 2] [["A"], ["B"], ["C", "D"]]

Now, I need partitions of size 2 or more, so I must use this function with sligtly different parameters. The parameter v is "array size - number of desired partitions - 1". Then I must build the partitions in a slightly different way.
// Same call (4,2), same r, but the array b is of size 7
part = [...r,b.length].map((x,i)=>
          b.slice(z,z=x+i+1) // add 1 more element to each partition
       ,z=0))
// output in console (firebug)
[2, 3] [["A", "B", "C"], ["D", "E"], ["F", "G"]]
[1, 3] [["A", "B"], ["C", "D", "E"], ["F", "G"]]
[1, 2] [["A", "B"], ["C", "D"], ["E", "F", "G"]]

So, I can enumerate the list of partitions for no split, 1 split, 2 splits and so on. When I find a working partition I will stop and output the result found.
To check, scan the partition list, note the values at start and end of each, if found a repated value then remove it. Repeat until nothing can be removed, at last: if all pairs were removed then this partition is good.
t = []; // array to note the repeated values
// t[x] == [
//           subarray holding value x,
//           position of value x (I care zero or nonzero)
//         ]
n = a.length // counter start, must reach 0
// remember part just in case, because this check will destroy it
result = part.join(';') // a string representation for return value
do
{
  // in the golfed code there is a forr loop
  // all this body is inside the for condition
  c = 0; // init c to a falsy, if a pair is found c becomes truthy
  part.forEach(b=> // b: array, current partition
    [0,1].forEach(q=> ( // exec for 0 (start), 1 (end)
      q *= b.length-1, // now q is the correct index
      x = b[q]) // x is the value at start or end
      x && ( // b could be empty, check that x is not 'undefined'
        t[x] ? // is there a value in t at position x?
           ( // yes, remove the pair
             n-=2, // pair found, decrement counter
             [c, p] = t[x], // get stored array and position
             p ? c.pop() : c.shift(), // remove from c at start or end
             q ? b.pop() : b.shift()  // remove twin value from b
           )
           : // no, remember the value in t
             t[x] = [b, q]
    )) // end [0,1].forEach
  ) // end part.forEach
}
while (c) // repeat until nothing can be removed
if(!n) return 1 // wow, result found (in 'result' variable)

Then, the missing part is just a loop caling the G function increasing the partition count. The loop exit when a result is found.
Put it all together
F=a=>{
  G=(v,i,u=v)=>{
    if (i--)
    {
      for(; r[i]=--u; )
        if (G(u,i))
          return 1;
    }
    else
    {
      w = [...r,n=l].map((x,i)=>a.slice(z, z = x-~i), z = 0);
      y = w.join`;`;
      for(; // almost all the for body is inside the condition
        w.map(b=>
          [0,1].map(q=>
            (x=b[q*=~-b.length])
             &&(t[x]
                ?([c,p]=t[x],n-=2,
                   p?c.pop():c.shift(),
                   q?b.pop():b.shift())
                :t[x]=[b,q])) // end [0,1].map
          ,c=0,t=[] // init variables for w.map
        ),c; // the loop condition is on c
      )
        if(!n)return 1 // this is the for body
    }
  };
  for(l = a.length, r = [], k = 0; !G(l-k-1, k); k++);
  return y
}

Test

F=a=>{G=(v,i,u=v)=>{if(i--){for(;r[i]=--u;)if(G(u,i))return 1;}else for(w=[...r,n=l].map((x,i)=>a.slice(z,z=x-~i),z=0),y=w.join`;`;w.map(b=>[0,1].map(q=>(x=b[q*=~-b.length])&&(t[x]?([c,p]=t[x],n-=2,p?c.pop():c.shift(),q?b.pop():b.shift()):t[x]=[b,q])),c=0,t=[]),c;)if(!n)return 1};for(l=a.length,r=[],k=0;!G(l-k-1,k);k++);return y}

console.log=x=>O.textContent+=x+'\n'

TestData=[[1,1],[1,2,1,2],[1,3,2,4,3,2,1,4],[1,2,3,4,3,4,1,2],[1,1,2,2,3,3],[4,3,4,2,2,1,1,3]]

TestData.forEach(t=>console.log(t+' -> '+F(t)))

function RandomTest() {
  var l=I.value*2
  var a=[...Array(l)].map((_,i)=>1+i/2|0)
  a.map((v,i)=>a[a[i]=a[j=0|i+Math.random()*(a.length-i)],j]=v) // shuffle
  Q.textContent=a+''+'\n\n'+F(a).replace(/;/g, ';\n') // better readability
}
Base test

Random test. Number of pairs: <input id=I value=15><button onclick="RandomTest()">-></button>


text:
Stretch the word
The input is a word of lowercase letters not separated by whitespace. A newline at the end is optional.
The same word must be output in a modified version: For each character, double it the second time it appears in the original word, triple it the third time etc.
Example input:
bonobo

Example output:
bonoobbooo

Standard I/O rules apply. The shortest code in bytes wins.
Tests provided by @Neil :
tutu -> tuttuu
queue -> queuuee
bookkeeper -> boookkkeeepeeer
repetitive -> repeetittiiveee
uncopyrightables -> uncopyrightables
abracadabra -> abraacaaadaaaabbrraaaaa
mississippi -> misssiisssssssiiipppiiii

Jelly, 4 bytes
;\f"

Try it online!
How it works
;\f"  Main link. Argument: S (string)

;\    Cumulatively reduce by concatenation.
      This yields the array of all prefixes of S.
  f"  Vectorized filter.
      Keep only occurrences of the nth letter in the nth prefix.

Well then... rip Pyth.

This site is becoming a competition for the best general-purpose golfing language... not that that's a bad thing.

@shelvacu The latter is debatable, 2 friends I've shown PPCG to have said something along the lines of "all the top answers are just using golf languages" as a first impression.

@Insane there is/ are. Code golf is a pretty common thing. So languages are put together for that purpose, exclusively.

How does this.... work?

Pyth, 6 bytes
Thanks to @Doorknob for taking off 1 byte.
Thanks to @Maltysen for taking off 5 bytes.
s@VQ._

Try it online!
How it works

For example, take the string "bonobo".
._ makes a list: ['b', 'bo', 'bon', 'bono', 'bonob', 'bonobo']
VQ._ means "the preceding function vectorized (applied in parallel) over Q and ._", which means Q (the input evaluated) will be treated as a list: ['b', 'o', 'n', 'o', 'b', 'o'], and then they will be paired by the @ like this:
     Q      ._         @ (intersect)
0:  'b'     'b'       'b'
1:  'o'     'bo'      'o'
2:  'n'     'bon'     'n'
3:  'o'     'bono'    'oo'
4:  'b'     'bonob'   'bb'
5:  'o'     'bonobo'  'ooo'

Therefore, @VQ._ will produce ['b', 'o', 'n', 'oo', 'bb', 'ooo'].
The s then joins them all together, creating a string 'bonoobbooo', which is then implicitly printed out to become bonoobbooo.

Kenny, your explanation is wrong. VQ only means for N in Q when it is not inside a function. In this case, what's actually going on is that @V means the @ function vectorized (applied in parallel) over its next two arguments, Q and ._. This is missing from the docs, so I'll fix it.

Retina, 34 19 bytes
Saved 15 bytes by taking some inspiration from isaacg's solution.
Byte count assumes ISO 8859-1 encoding.

$`¶
(\D)(?!.*\1¶)

The leading and trailing empty lines are significant.
Try it online!
Explanation

$`¶

This is a replace stage which matches the empty regex (i.e. every zero-width position in the string) and substitutes $`¶ for it, where $` is the prefix of the match and ¶ inserts a linefeed. This basically computes all the prefixes and puts them on a separate line together with the last character of that prefix:
bb
obo
oboo
kbook
kbookk
ebookke
ebookkee
pbookkeep
ebookkeepe
rbookkeeper

There will be some leading and trailing linefeeds, but we can ignore them.
From each of these prefixes we want to keep the characters that are equal to the last character. For that we use another replace stage:
(\D)(?!.*\1¶)

This matches everything we don't want to keep and replaces it with a nothing. We match any character (using \D since we know there won't be digits in the input) and then make sure that there isn't another copy of that character at the end of the line.

Python, 56 bytes
I seem to be stuck with two answers of the same length:
f=lambda x,*y:x and-~y.count(x[0])*x[0]+f(x[1:],x[0],*y)
f=lambda x,y=0:x[y:]and-~x[:y].count(x[y])*x[y]+f(x,y+1)

Edit: See @pacholik's answer for a shorter, alternative Python approach.

I'm not used to beating you with my ><> answers, I'm waiting for a Gol><> answer to fix that ;)

@Aaron Too bad, I was actually going to beat you back with ><> :P

Line noise in Python? What heresy!

What does -~ do? I know it's bitwise NOT followed by negation, but what are you trying to do that it saves a few bytes on?

@QPaysTaxes It's increment +1 with high enough precedence so that parens aren't necessary

@Q Similarly, ~- will decrement.

Haskell, 39 bytes
f""=""
f x=f(init x)++filter(==last x)x

Usage example: f "bonobo" -> "bonoobbooo".
Different enough from @Damien's answer. Builds the string from the right by extracting all occurrences of the last character from the string and prepending a recursive call with all but the last character.

JavaScript (ES6), 48 45 bytes
s=>s.replace(n=/./g,c=>c.repeat(n[c]=-~n[c]))

Edit: Saved 3 bytes thanks to @user81655.

><>, 27 bytes
>i:0g1+:\
:{-1v!?:<}o
/p${/

Requires the official interpreter which exits with an error when trying to print code point -1. Try it online!
The code reads input one char at a time and uses the first row of the codebox as a large array which stores the number of times each char has been seen so far (><> initialises non-program cells to 0). The second row is a loop for outputting a char multiple times.
Alternatively, here's a version which exits cleanly (37 bytes, not properly golfed):
>i:0(?;:0g1+:\
}o:{-1v!?:   <
v  p${<

Damn that's good ! I should stop relying so heavily on the online interpreter, I would never have thought about simply using such a huge codebox, and I didn't even knew the official interpreter exited on -1 print

@Aaron Yeah, it's a corollary of Python erroring when trying to do chr(-1). The animated interpreter's great for visualisations, but unfortunately some of the discrepancies with the official interpreter are a bit annoying :/

Haskell, 50 42 41 bytes
Saved 8 bytes thanks to Lynn
f t=[c|(i,c)<-zip[1..]t,x<-take i t,c==x]

How about: f t=[c|(i,c)<-zip[0..]t,j<-[0..i],c==t!!j]

MATL, 8 bytes
tt!=RsY"

Try it online! Or verify all test cases at once.
Explanation
t    % take input string implictly. Duplicate
t!   % duplicate and transpose into a column
=    % test for equality with broadcast. Gives an NxN array, where N is
     % input string length
R    % upper triangular part: set entries below the diagonal to 0
s    % sum of each column. For each postion in the input, gives how many
     % times that letter has appeared up to that position
Y"   % replicate elements (run-length decoding). Display implicitly

Labyrinth, 54 25 bytes
<#; "#: ={},>
 }=}(.);("@

Another collab with @MartinBüttner, who actually did most almost all of the golfing for this one. By revamping the algorithm, we've managed to cut down the program size by quite a bit!
Try it online!
Explanation
A quick Labrinth primer:

Labyrinth is a stack-based 2D  language. There are two stacks, a main and auxiliary stack, and popping from an empty stack yields zero.
At each junction, where there are multiple paths for the instruction pointer to move down, the top of the main stack is  checked to see  where to go next. Negative is turn left, zero is straight ahead and positive is turn right.

The two stacks of arbitrary-precision integers isn't much flexibility in terms of memory options. To perform the counting, this program actually uses the two stacks as a tape, with shifting a value from one stack to the other being akin to moving a memory pointer left/right by a cell. It's not quite the same as that though, since we need to drag a loop counter with us on the way up.

First off, the < and > on either end pop an offset and rotate the row of code that offset away by one either left or right. This mechanism is used to make the code run in a loop - the < pops a zero and rotates the current row left, putting the IP at the right of the code, and the > pops another zero and fixes the row back.
Here's what happens each iteration, in relation to the diagram above:
[Section 1]
,}    Read char of input and shift to aux - the char will be used as a counter
      to determine how many elements to shift

[Section 2 - shift loop]
{     Shift counter from aux
"     No-op at a junction: turn left to [Section 3] if char was EOF (-1), otherwise
      turn right
(     Decrement counter; go forward to [Section 4] if zero, otherwise turn right
=     Swap tops of main and aux - we've pulled a value from aux and moved the
      decremented counter to aux, ready for the next loop iteration

[Section 3]
@     Terminate

[Section 4]
;     Pop the zeroed counter
)     Increment the top of the main stack, updating the count of the number of times
      we've seen the read char
:     Copy the count, to determine how many chars to output

[Section 5 - output loop]
#.    Output (number of elements on stack) as a char
(     Decrement the count of how many chars to output; go forward to [Section 6]
      if zero, otherwise turn right
"     No-op

[Section 6]
}     Shift the zeroed counter to aux

[Section 7a]
This section is meant to shift one element at a time from main to aux until the main
stack is empty, but the first iteration actually traverses the loop the wrong way!

Suppose the stack state is [... a b c | 0 d e ...].

=     Swap tops of main and aux               [... a b 0 | c d e ...]
}     Move top of main to aux                 [... a b | 0 c d e ...]
#;    Push stack depth and pop it (no-op)
=     Swap tops of main and aux               [... a 0 | b c d e ...]
      Top is 0 at a junction - can't move
      forwards so we bounce back
;     Pop the top 0                           [... a | b c d e ... ]

The net result is that we've shifted two chars from main to aux and popped the
extraneous zero. From here the loop is traversed anticlockwise as intended.

[Section 7b - unshift loop]

#     Push stack depth; if zero, move forward to the <, else turn left
}=    Move to aux and swap main and aux, thus moving the char below (stack depth)
      to aux
;     Pop the stack depth

Perl, 17
(16 bytes code, +1 for -p)
s/./${$&}.=$&/ge

Usage:
perl -pe 's/./${$&}.=$&/ge' <<< 'bonobo'
bonoobbooo

Pyth, 7 bytes
s@Led._

Test suite
Test suite thanks to DenkerAffe
Explanation:
s@Led._
     ._    All prefixes, implicitly applied to the input.
 @L        Filter each prefix for characters equal to
   ed      the last character of the prefix
s          Concatenate and implicitly print.

Python 3, 52
def f(s):*s,x=s;return s and f(s)+x+x*s.count(x)or x

Ah, going from the end makes so much more sense! You can do this shorter in a lambda, without the need for Python 3 specifically: f=lambda s:s and f(s[:-1])+s[-1]*s.count(s[-1])

I though it could be done that way. But I don't like subscripting in Python :P

PowerShell v2+, 52 47 bytes
$b=@{};-join([char[]]$args[0]|%{"$_"*++$b[$_]})

Constructs an empty hashtable, stores it in $b. This is our "counter" of what letters we've seen. We then take input $args[0], cast it as a char-array, and send it through a loop. Each iteration, we take the current character "$_" and multiply it by the pre-incremented counter at the given value, which will make the first occurrence be multiplied by 1, the second by 2 and so on. We encapsulate that with a -join so it's all one word being output.
Saved 5 bytes thanks to TessellatingHeckler by using a hashtable instead of an array, so we didn't need to decrement the ASCII character by 97 to reach the appropriate index. This works because pre-incrementing the hash index implicitly calls .Add() in the background if that index doesn't exist, since hashtables are mutable.
PS C:\Tools\Scripts\golfing> .\stretch-the-word.ps1 tessellatingheckler
tessseelllattingheeeckllleeeer

Dyalog APL, 6 bytes
∊,\∩¨⊢

TryAPL!
4 functions is an atop (2-train) of a fork (3-train):
┌──┴──┐
∊ ┌───┼─┐
  \   ¨ ⊢
┌─┘ ┌─┘
,   ∩

First ⊢ (right – a no-op) on the given string, giving 'bonobo'
Then ,\ (concatenation scan) on the string, giving 'b' 'bo' 'bon' 'bono' 'bonob' 'bonobo'
The two are forked together with (given as right and left arguments to) ∩¨ (intersection each), i.e. ('b'∩'b') ('bo'∩'o') ('bon'∩'n') ('bono'∩'o') ('bonob'∩'b') ('bonobo'∩'o'), which is 'b' 'o' 'n' 'oo' 'bb' 'ooo'
Finally, ∊ (enlist) is applied to the result to flatten it, giving 'bonoobbooo'
Hey, at least it matches Pyth! Obviously Jelly is shorter as it is a golf version of J, which in turn is an advanced 2-character-per-function dialect of APL.

Pyth, 11 bytes
s.e*b/<Qhkb

Try it here!
Explanation

s.e*b/<Qhkb    # Q = input

 .e            # map over input with b as value and k as index (Q get appended at the end inplicitly)
      <Qhk     # take the first k+1 chars of Q
     /    b    # count occurences of b in there
   *b          # repeat b that many times
s              # join resulting list into one string

05AB1E, 10 bytes
Code:
$vy«Dy¢y×?

Explanation:
$           # Push the number 1 and input
 v          # Map over the input string
  y«        # Concat the letter to the previous string (initial 1)
    D       # Duplicate this string
     y¢     # Count the occurences of the current character in the string
       y×   # Multiply this number with the current character
         ?  # Pop and print without a newline

Uses the CP-1252 encoding. Try it online!

J, 11 bytes
#~+/@(={:)\

This is a monadic verb. Try it here. Usage:
   f =: #~+/@(={:)\
   f 'tutu'
'tuttuu'

Explanation
#~+/@(={:)\
     (   )\  For each non-empty prefix:
       {:      Take last element,
      =        compare for equality to the others and itself
  +/@          and take sum (number of matches).
#~           Replicate original elements wrt the resulting array.

CJam, 14
q:A,{)A<_)--}/

Try it online
Explanation:
q:A      read the input and store in A
,        get the string length
{…}/     for each number from 0 to length-1
  )      increment the number
  A<     get the prefix of A with that length
  _      duplicate it
  )      separate the last character
  -      remove it from the rest of the prefix
  -      remove all the remaining characters (different from the last one)
          from the prefix

Perl 6, 37 bytes
{.split('').map({$_ x++%.{$_}}).join}

PHP, 54 51 50 47 bytes
for(;$C=$argn[$X++];)echo str_repeat($C,++$$C);

Run like this:
echo abracadabra | php -nR 'for(;$C=$argn[$X++];)echo str_repeat($C,++$$C); echo"\n";'

Tweaks

Saved 3 bytes by using variable variables. Changed used variables to uppercase to prevent collision
Saved a byte by removing type cast null to int for string offset, as string offset is cast to int anyway
Saved 3 bytes by using $argn instead of $argv (thx Titus)

Use $argn with -R to save three more bytes.

Oh, and -n should do the same as your -d error_reporting: n stands for no config file, and notices are off in the default config; so -nr (respectively -nR) should suffice.

@Titus 2 year old answer, but thx anyway :)

><>, 52 bytes
i:0(?;&l:?!v1-$:&:&=?\}70.>
6f+0.00o:&~/         \:o

It stacks every letter read, prints them once and once again for every similar letter in the stack.
It uses the & register, because having to handle 3 variables on the stack (current read letter, position in the stack, letter at this position) is a pain.
You can try it here!

Rust, 176 Bytes
fn s(w:&str)->String{let mut m=std::collections::HashMap::new();w.chars().map(|c|{let mut s=m.remove(&c).unwrap_or(String::new());s.push(c);m.insert(c,s.clone());s}).collect()}

This uses a map to store a string for every character in the input. For each character, the string will be removed from the map, concatenated with the character, inserted back into the map and appended to the output.
I would have liked to use get(...) instead of remove(...), but the borrow checker had me change my mind.

Javascript ES6 44 bytes
q=>q.replace(/./g,a=>x[a]=(x[a]||'')+a,x=[])

old answer
Javascript ES6 46 bytes
q=>(x=[...q]).map(a=>x[a]=(x[a]||'')+a).join``

//thanks user81655 for -1 byte

You could save a byte by moving x to the input array -> q=>(x=[...q]).map(a=>x[a]=(x[a]||'')+a).join\``

Mathcad, 66 bytes
Unfortunately, Mathcad doesn't have particularly good string handling, so I've converted the input string to a vector and then used a (character code indexed) vector to keep track of the number of times a character is encountered, adding the character that number of times to a result vector.  Finally, the result vector is converted back to a string.  Quite lenghty unfortunately.

Note that Mathcad uses a 2D "whiteboard" interface, with a mix of normal text and operators; operators are normally entered via a toolbar or keyboard shortcut; for example, ctl-# enters the for loop operator, which comprises the keyword for, the element-of symbol and 3 empty "placeholders" for the iteration variable, range and body expressions respectively.   Typing [ after a variable name enters array index mode, Typing ' enters a matched pair of parentheses (mostly ... there are exceptions depending upon what else is in the surrounding expression)

Ruby, 35 bytes
->s{s.gsub(/./){$&*-~$`.count($&)}}

It's an anonymous function using regex and some magical variables. Usage:
->s{s.gsub(/./){$&*-~$`.count($&)}}["bonobo"]
=> "bonoobbooo"

Julia, 38 35 bytes
!s=[]==s?s:[!s[1:end-1];s∩s[end]]

I/O is in the from of character arrays. Try it online!
How it works
We (re)define the monadic operator ! for our purposes.
When ! is called, it checks if its argument s is empty. If it is, it returns its argument.
If s is non-empty, we intersect s with its last character (s[end]), which yields all occurrences of that character in s. This result is concatenated with the return value of a recursive call to ! with s minus its last character (s[1:end-1]) as argument.

Mathematica, 57 bytes
StringReplace[Clear@c;c@_=0;#,x_:>x~StringRepeat~++c[x]]&

We use c[x] as a lookup table of how often character x has already occurred. This is incremented each time it's retrieved in x~StringRepeat~++c[x]. Unfortunately, to make the function reusable, we need to reset the lookup table each time with Clear@c;c@_=0;, which is quite expensive.

awk, 72 bytes
BEGIN{FS=""}{for(i=1;i<=NF;i++){a[$i]++;for(j=0;j<a[$i];j++)printf $i}}

The idea is to store the count of the appearing character in an associative array and print the character this count times.

Python, 66 62 bytes
Try it here
Golfed
def s(w,o=[],n=""):
 for x in w:o+=x;n+=x*o.count(x)
 return n

Ungolfed
def stretch(word):
    occurrences = []
    newWord = ""
    for w in word:
        occurrences.append(w)
        newWord += w * occurrences.count(w)
    return newWord

Beam, 32 33 42 bytes
This should have been smaller, but I lost some bytes initializing the memory slots to 0.  Swapping some flow directions managed to eliminate a lot of empty space.
 >+\
vus/
>rnH
  >g'\
(@v's/
^`<

Try it in this snippet
General explanation.

Set all the memory slots from 0-255 to 0
Read in the input ascii value into the beam
If beam is 0 halt (beam = store)
Get the memory[beam] value into the store, increment it and save back
Decrement the store to 0 printing out the beam character
Repeat

BQN, 7 6 bytes
⊢/˜1+⊒

Anonymous tacit function. Try it at BQN online!
Explanation
⊢/˜1+⊒
     ⊒   For each character, how many times has it appeared previously?
   1+    Add 1 to each
 /˜      Replicate that many times the elements of
⊢        The original input

Vyxal sr, 4 bytes
¦¨£↔

Try it Online!

Knight, 77 bytes
;=x=yP;Wx;E++"=x"A Ax" 0"=xSxF1""Wy;E++++"O+*A Ay=x"=aA Ay"+1x"a"'\'"=ySyF1""

Try it online!
Ungolfed:
; = x (= y PROMPT)
; WHILE x
    ; EVAL (+ (+ "=x" (ASCII (ASCII x))) " 0")
    : = x (SUBSTITUTE x 0 1 "")
: WHILE y
    ; EVAL (+ (+ (+ (+ "O+*A Ay=x" (= a (ASCII (ASCII y)))) "+1x") a) "'\'")
    : = y (SUBSTITUTE y 0 1 "")

Ruby, 50 48 bytes
Anonymous function.
->s{i=0
s.chars.map{|c|c*s[0,i+=1].count(c)}*''}

Go, 142 bytes
No awards, but a neat exercise.
import(."fmt"
."strings")
func f(s string){m:=map[rune]int{}
for _,c:=range s{if _,ok:=m[c];!ok{m[c]=1}
Print(Repeat(string(c),m[c]))
m[c]++}}

You can save 1 byte by changing for _,c to for i,c and changing string(c) to s[i:i+1], but then it works only with ASCII.

Factor, 120 bytes
[ dup dup length iota [ head* ] with map reverse zip [ first2 over [ = ] curry count swap <array> >string ] map concat ]

Ungolfed, explained:
! "bonobo" -> { "b" "bo" "bon" "bono" "bonob" "bonobo" }
: ascend-string ( string -- string ascending-seq )
    dup dup length iota [ head* ] with map reverse ;

: stretch-word ( string -- stretched )
    ascend-string zip        ! zip string with ascending version of itself
    [
        first2 over          ! get each string index and its ascended version
        [ = ] curry count    ! count how many times this letter has appeared
        swap <array> >string ! >string
    ] map concat ;           ! "" join

Translation of: @KennyLau's Pyth answer.

Java 10, 220 94 bytes
s->{var m=new int[123];for(var c:s.toCharArray())for(int i=++m[c];i-->0;System.out.print(c));}

Try it online.
Explanation:
s->{                   // Method with String parameter and no return-type
  var m=new int[123];  //  Integer-array containing 123 zeros
  for(var c:s.toCharArray())
                       //  Loop over the characters of the input-String
    for(int i=++m[c];  //   Increase the count of the current character in the array first,
                       //   and set `i` to this count
        i-->0;         //   Inner loop that many times
      System.out.print(c));}
                       //    And print that many times the current character `c`

Swift, 134 bytes
var c = NSCountedSet(),n = ""
i.characters.forEach({var s = String($0);c.addObject(s);for _ in 0..<c.countForObject(s){n.append($0)}})

Assumes Foundation has been implicitly imported.  i is the input of type String, n is the output of type String.
I'm falling back on Foundation classes here as NSCountedSet gives the the character count lookup behavior we want.  The problem with mixing Swift and Objective-C types is that Swift structs do not conform to NSObjectProtocol.  We see this issue when trying to store a Swift Character (String.CharacterView) in an NSCountedSet, which is expecting objects of type AnyObject (or NSObject).  I lose around 17 bytes having to create a String from each Character in the input string.
I also lose some bytes having to create a for loop to append the new characters based on their count in the set.  I can't use forEach here since the return type of countForObject is an Int, not a collection type.  There is room for improvement here.
Swift String types are immutable, so I can't explicitly mutate the input.  There may be room for improvement by using an NSMutableString, but the characters lost by explicitly declaring the input of that type and calling the appendString method may add more characters to the program.

PHP, 46 bytes
for(;--$X||($C=$argn[$K++])&&$X=++$$C;)echo$C;

Run as pipe with -nR or try it online.
These 42 bytes print the same, but the loop is infinite (which results in a timeout error):
for(;--$X||$X=++${$C=$argn[$K++]};)echo$C;

printf solution, 47 bytes:
for(;$C=$argn[$K++];)printf("%'$C".++$$C.s,"");

Side note: PHP used to yield notices for undefined constants and cast them to string for decades. PHP 7.2 yields warnings with a hint that, in future versions, they will throw fatal errors.
End of an era. :-/ I wonder if they will do the same to undefined variables.

Kotlin, 60 bytes
{s:String->s.fold(""){a,c->a+"$c".repeat(a.count{it==c}+1)}}

Try it online!

This isn't quite valid; you aren't supposed to double each time the letter reappears, but just increase the number of repetitions by 1. So aaa should become aaaaaa ([a] [aa] [aaa]), whereas yours outputs aaaaaaa ([a] [aa] [aaaa]).

brev, 46 bytes
(with(ct*'a 0)(as-list flatten(over(it x x))))

If output like ("m" "i" "s" "ss" "ii" "sss" "ssss" "iii" "p" "pp" "iiii") were legal you could cut out the as list flatten for seventeen bytes.