text:
Calculate the partitions of N
Your challenge is simple: GIven an integer N, ouput every list of positive integers that sums to N. For example, if the input was 5, you should output
[1, 1, 1, 1, 1]
[1, 1, 1, 2]
[1, 1, 3]
[1, 2, 2]
[1, 4]
[2, 3]
[5]

These lists do not have to be output in any particular order, nor do the numbers inside each list. For example, this would also be an acceptable output for '5':
[1, 1, 1, 2]
[5]
[3, 1, 1]
[2, 1, 2]
[4, 1]
[1, 1, 1, 1, 1]
[2, 3]

You can safely assume that the input will be a positive integer, and you can take this number in any reasonable format.
You may NOT use any builtin functions that do this.
If your program either fails or takes too long for large N this is OK, but you must at the very least produce the correct output for the first 15.
Standard loopholes apply, and the shortest answer in bytes wins!
Test IO
1:
[[1]]

2:
[[1, 1], [2]]

3:
[[1, 1, 1], [1, 2], [3]]

4:
[[1, 1, 1, 1], [1, 1, 2], [1, 3], [2, 2], [4]]

5:
[[1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 1, 3], [1, 2, 2], [1, 4], [2, 3], [5]]

7:
[[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 3], [1, 1, 1, 2, 2], [1, 1, 1, 4], [1, 1, 2, 3], [1, 1, 5], [1, 2, 2, 2], [1, 2, 4], [1, 3, 3], [1, 6], [2, 2, 3], [2, 5], [3, 4], [7]]

10:
[[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1, 3], [1, 1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 4], [1, 1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 1, 5], [1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 2, 4], [1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 6], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 5], [1, 1, 1, 3, 4], [1, 1, 1, 7], [1, 1, 2, 2, 2, 2], [1, 1, 2, 2, 4], [1, 1, 2, 3, 3], [1, 1, 2, 6], [1, 1, 3, 5], [1, 1, 4, 4], [1, 1, 8], [1, 2, 2, 2, 3], [1, 2, 2, 5], [1, 2, 3, 4], [1, 2, 7], [1, 3, 3, 3], [1, 3, 6], [1, 4, 5], [1, 9], [2, 2, 2, 2, 2], [2, 2, 2, 4], [2, 2, 3, 3], [2, 2, 6], [2, 3, 5], [2, 4, 4], [2, 8], [3, 3, 4], [3, 7], [4, 6], [5, 5], [10]]

Super large test case: 15 should output this
[[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 7], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 2, 2, 4], [1, 1, 1, 1, 1, 1, 1, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 2, 6], [1, 1, 1, 1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 1, 1, 1, 4, 4], [1, 1, 1, 1, 1, 1, 1, 8], [1, 1, 1, 1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 2, 2, 5], [1, 1, 1, 1, 1, 1, 2, 3, 4], [1, 1, 1, 1, 1, 1, 2, 7], [1, 1, 1, 1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 1, 1, 3, 6], [1, 1, 1, 1, 1, 1, 4, 5], [1, 1, 1, 1, 1, 1, 9], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 2, 2, 2, 4], [1, 1, 1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 1, 1, 2, 2, 6], [1, 1, 1, 1, 1, 2, 3, 5], [1, 1, 1, 1, 1, 2, 4, 4], [1, 1, 1, 1, 1, 2, 8], [1, 1, 1, 1, 1, 3, 3, 4], [1, 1, 1, 1, 1, 3, 7], [1, 1, 1, 1, 1, 4, 6], [1, 1, 1, 1, 1, 5, 5], [1, 1, 1, 1, 1, 10], [1, 1, 1, 1, 2, 2, 2, 2, 3], [1, 1, 1, 1, 2, 2, 2, 5], [1, 1, 1, 1, 2, 2, 3, 4], [1, 1, 1, 1, 2, 2, 7], [1, 1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 1, 2, 3, 6], [1, 1, 1, 1, 2, 4, 5], [1, 1, 1, 1, 2, 9], [1, 1, 1, 1, 3, 3, 5], [1, 1, 1, 1, 3, 4, 4], [1, 1, 1, 1, 3, 8], [1, 1, 1, 1, 4, 7], [1, 1, 1, 1, 5, 6], [1, 1, 1, 1, 11], [1, 1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 2, 4], [1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 6], [1, 1, 1, 2, 2, 3, 5], [1, 1, 1, 2, 2, 4, 4], [1, 1, 1, 2, 2, 8], [1, 1, 1, 2, 3, 3, 4], [1, 1, 1, 2, 3, 7], [1, 1, 1, 2, 4, 6], [1, 1, 1, 2, 5, 5], [1, 1, 1, 2, 10], [1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 3, 3, 6], [1, 1, 1, 3, 4, 5], [1, 1, 1, 3, 9], [1, 1, 1, 4, 4, 4], [1, 1, 1, 4, 8], [1, 1, 1, 5, 7], [1, 1, 1, 6, 6], [1, 1, 1, 12], [1, 1, 2, 2, 2, 2, 2, 3], [1, 1, 2, 2, 2, 2, 5], [1, 1, 2, 2, 2, 3, 4], [1, 1, 2, 2, 2, 7], [1, 1, 2, 2, 3, 3, 3], [1, 1, 2, 2, 3, 6], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 9], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 8], [1, 1, 2, 4, 7], [1, 1, 2, 5, 6], [1, 1, 2, 11], [1, 1, 3, 3, 3, 4], [1, 1, 3, 3, 7], [1, 1, 3, 4, 6], [1, 1, 3, 5, 5], [1, 1, 3, 10], [1, 1, 4, 4, 5], [1, 1, 4, 9], [1, 1, 5, 8], [1, 1, 6, 7], [1, 1, 13], [1, 2, 2, 2, 2, 2, 2, 2], [1, 2, 2, 2, 2, 2, 4], [1, 2, 2, 2, 2, 3, 3], [1, 2, 2, 2, 2, 6], [1, 2, 2, 2, 3, 5], [1, 2, 2, 2, 4, 4], [1, 2, 2, 2, 8], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 7], [1, 2, 2, 4, 6], [1, 2, 2, 5, 5], [1, 2, 2, 10], [1, 2, 3, 3, 3, 3], [1, 2, 3, 3, 6], [1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 4, 4], [1, 2, 4, 8], [1, 2, 5, 7], [1, 2, 6, 6], [1, 2, 12], [1, 3, 3, 3, 5], [1, 3, 3, 4, 4], [1, 3, 3, 8], [1, 3, 4, 7], [1, 3, 5, 6], [1, 3, 11], [1, 4, 4, 6], [1, 4, 5, 5], [1, 4, 10], [1, 5, 9], [1, 6, 8], [1, 7, 7], [1, 14], [2, 2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2, 5], [2, 2, 2, 2, 3, 4], [2, 2, 2, 2, 7], [2, 2, 2, 3, 3, 3], [2, 2, 2, 3, 6], [2, 2, 2, 4, 5], [2, 2, 2, 9], [2, 2, 3, 3, 5], [2, 2, 3, 4, 4], [2, 2, 3, 8], [2, 2, 4, 7], [2, 2, 5, 6], [2, 2, 11], [2, 3, 3, 3, 4], [2, 3, 3, 7], [2, 3, 4, 6], [2, 3, 5, 5], [2, 3, 10], [2, 4, 4, 5], [2, 4, 9], [2, 5, 8], [2, 6, 7], [2, 13], [3, 3, 3, 3, 3], [3, 3, 3, 6], [3, 3, 4, 5], [3, 3, 9], [3, 4, 4, 4], [3, 4, 8], [3, 5, 7], [3, 6, 6], [3, 12], [4, 4, 7], [4, 5, 6], [4, 11], [5, 5, 5], [5, 10], [6, 9], [7, 8], [15]]

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

 <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

Related: http://codegolf.stackexchange.com/questions/46991/random-golf-of-the-day-3-integer-partitions

Could you clarify what you mean by handle?

@flawr I disagree - finding all partitions is sufficiently different from finding strict partitions. However, this one might be a dupe target.

I think looking for unordered partitions and not limiting the number of parts makes this different enough.

Can you clarify what you mean by buitin?

@LeakyNun If your language has a function that takes an integer N and returns all lists that sum to N, you may not use this function.

How about 0's, can we pad the  list with 0's say up to the length of N?

@MickyT I'm gonna say no. Your outputs should match mine. (Although the order can be different)

Are duplicate lists allowed in the output?

@Zgarb no, that is not allowed.

the no dupes makes it really annoying..

Pyth, 10 9 bytes
{SMlMM./U

Not too sure if this isn't cheating, but the rules only said one cannot use integer partition (it's not stated clearly in the question itself, but a comment by OP in the question says integer partition). I'm using string list partition, which makes slices of the list that concatenate up to the "mother" list. I believe I have to thank @Maltysen for the idea of using lists rather than strings.
n=15 takes less than one second on my machine.
In dataflow pseudocode:
              input       // initial data
        U     range       // makes a list of length equal to input
      ./      partition   // partitions string
   lMM        length      // length of each substring in each way to partition
 SM           sort        // sort each way to partition
{             deduplicate // removes all duplicate after sorting
              print       // implicit, output final result

Try it online here.

{mSlMd./*N saves a byte

You can go for 7 bytes if you use list partitioning instead of string partition: http://pyth.herokuapp.com/?code=sMM.%2Fm1&input=5&debug=0

@LeakyNun Well I actually tried and it didn't save a byte. When I saw your comment tho, I found out that my answer was actually 10 bytes, so I actually miscounted (forgot gedit blocks start from 1).

@Maltysen You need to sort each sub-list, and then deduplicate.

@Maltysen You were right, using lists does shorten it. I tried adding sort and deduplicate to the code you linked to and it didn't help, but it's all thanks to you that I got the idea of replacing *N with U. Thanks!

Pyth, 18 bytes
L?b{SM+R-bsdsyMb]Y

Try it online! (The y at the end is used to call the function)
This is fairly quick.
This uses recursion. If the input is b, my method will generate the partitions from 0 to b-1, and then generate the correct partitions from each.
For example, when b=4:

b=0 gives [[]]
b=1 gives [[1]]
b=2 gives [[2], [1, 1]]
b=3 gives [[3], [1, 2], [1, 1, 1]]

Then, to each partition in b=0, append 4 (to make the sum 4); to each partition in b=1, append 3 (to make the sum 4); etc.
This is mainly how it works.
L?b{SM+R-bsdsyMb]Y

L                    define a function called "y" which takes an argument: "b"
 ?b                  test for truthiness of b (in this case, test if b>0).

   {SM+R-bsdsyMb     if truthy:

             yMb         call this function from 0 to b-1.
            s            unpack each list of partitions, generating only partitions.
      +R                 to each partition (d), append:
        -                    the difference of
         b                   b (the argument) and
          sd                 the sum of d (the partition).
    SM                   sort each partition.
   {                     remove duplicates.

                ]Y   if falsey:

                 Y       yield [].
                ]        yield [[]].

Haskell, 53 bytes
p=[[]]:[map(1:)q++[a+1:b|a:b<-q,all(a<)b]|q<-p]
(p!!)

MATL, 20 bytes
:"0Gq:@XNG3$Yc!dS!Xu

Try it online!
For input 15 it takes about 2 seconds in the online compiler.
Explanation
This works by generating partition points and then converting to partition lengths. What I mean by this is the following. Given input N = 5, a possible partition is [2 2 1]. This is represented by partition points [0 2 4 5], such that consecutive differences (or lengths) of the partition points give the resulting partition of the input number.
All arrays of partition points start with 0 and end with N. The number k of intermediate points  varies from 0 to N-1. For N and k given, the intermediate points can be generated as a combination of the numbers [1, 2, ..., N-1] taken k at a time.
Several arrays of partition points may give rise to the same result in a different order. For example, partition points [0 1 3 5] would give the partition lengths [1 2 2], i.e. the same as the previous [2 2 1] only in a different order. This has to be taken into account by sorting each array of partition lengths and removing duplicates.
:        % Implicitly input N. Push [1 2 ... N]. These are the possible values of k,
         % except with N instead of 0
"        % For each
  0      %   Push 0
  Gq:    %   Push [1 ... N-1]. These the possible intermediate points
  @XN    %   Push k and produce the combinations. Each k produces a 2D array with
         %   each combination on a row. The value k=N produces an empty array
  G      %   Push N
  3$Yc   %   Prepend a column of zeros and append a column of N to the array
  !d     %   Transpose. Consecutive differences of each column
  S!     %   Sort each column. Transpose
  Xu     %   Keep only unique rows
         % Implicitly end for and display all arrays in the stack

Nice, the concept of partition points is a very clever way to solve this.

@Nick Thank you! And welcome to (being active in) this site! :-)

J, 49 42 36 35 32 bytes
a:1&([:~.@,(,;}./:~@,(+{.))&>)~]

It's tacit now!
Builds the integer partition of n by constructing the integer partitions from 1 to n. Computes the result for n = 15 in a millisecond.
Starting with the initial integer partition [[1]] which corresponds to n = 1, construct the next integer partition by joining the results from two operations: appending a 1 to each partition; incrementing the smallest value by 1 in each partition. Of course, duplicate partitions will be removed. To get the integer partition n = 2 and onwards,
Partition for n = 1
[[1]]

Partition for n = 2
[[1, 1]] join [[2]]
= [[1, 1], [2]]

Partition for n = 3
[[1, 2], [1, 1, 1]] join [[3], [1, 2]]
= [[3], [1, 2], [1, 1, 1]]

... and so on

Usage
   f =: a:1&([:~.@,(,;}./:~@,(+{.))&>)~]
   f 1
┌─┐
│1│
└─┘
   f 2
┌───┬─┐
│1 1│2│
└───┴─┘
   f 3
┌─────┬───┬─┐
│1 1 1│1 2│3│
└─────┴───┴─┘
   f 5
┌─────────┬───────┬─────┬───┬─────┬───┬─┐
│1 1 1 1 1│1 1 1 2│1 2 2│2 3│1 1 3│1 4│5│
└─────────┴───────┴─────┴───┴─────┴───┴─┘
   # f 15
176

Explanation
Since J does not support ragged arrays, each partition has to be boxed so they they won't be zero padded when appended to other partitions.
a:1&([:~.@,(,;}./:~@,(+{.))&>)~]  Input: n
a:                                The empty box
                               ]  Get the input n
  1&(                        )~   Repeat n times with an initial array of one empty box
           (              )&>       Operate on each partition
                     (   )            Hook a partition
                       {.               Get its head (the smallest value)
  1                   +                 Add 1 to it
  1           }.                      Drop the first value in each partition
                    ,                 Join the previous two results
                /:~@                  Sort it
  1         ,                         Prepend a 1 to the initial partition
             ;                        Box the last two results and join them
     [:   ,                         Flatten the pairs of boxes
       ~.@                          Remove duplicates and return
                                  Return the final result where each box
                                  is a partition of n

Python, 65 bytes
Python 3
def f(n,i=1,l=[]):n or print(l);i>n or[f(n-i,i,[i]+l),f(n,i+1,l)]

This function accumulates a partition and prints the outputs, branching on choices. It decides how many 1's to put in the partition, how many 2's, and so on. For each value i, it either

Adds a part of size i, and decreases n to n-i, or
Moves on to i+1

If i>n, then no more parts can be made, so it stops. If n falls to 0, the partition is successful and so is printed.
Python 2
f=lambda n,i=1:n/i and[l+[i]for l in f(n-i,i)]+f(n,i+1)or[[]][n:]

A recursive method that outputs a list of partitions. As with the Python 3 code, it counts up the part size i and decides at each step whether to add another part of size i or stop.
Both of these do n=15 almost instantly.

Javascript, 194 bytes
p=n=>{var a=[];for(var i=1;i<=n-i;i+=1){for(v of p(n-i)){v.push(i);a.push(v.sort())}}a.push([n]);return a};n=5;s=p(n).map(v=>JSON.stringify(v));s=s.filter((v,i)=>s.indexOf(v)==i);console.log(s);

Non-minified
Finding uniques by sorting and comparing to a string is quite a hack, but probably saves space.
p = n => {
    var a = [];

    for (var i = 1; i <= n-i; i++)
    {
        for (v of p(n-i)) {
            v.push(i);
            a.push(v.sort());
        }
    }

    a.push([n]);

    return a;
}

n = 5;
s = p(n).map(v =>  JSON.stringify(v));
s = s.filter((v,i) => s.indexOf(v) == i);
console.log(s);

Quite a hack but saves space That's exactly what this site is about. :D

Haskell, 44 bytes
0%m=[[]]
n%m=[j:r|j<-[m..n],r<-(n-j)%j]
(%1)

The auxiliary function n%m gives the partitions of n into parts ≥m, with the main function using m=1. It branches of each first entry j with m≤j≤n, recursing on the remaining partition of n-j into parts that are at least j. The base case n==0 gives just the empty partition.

Python 3.5, 82 72 bytes
f=lambda n:{(*sorted([*p,i]),)for i in range(1,n)for p in f(n-i)}|{(n,)}

Returns a set of tuples. n = 15 finishes instantly.
Test it on repl.it.

Brachylog, 33 bytes (Non-competing)
:1f:oad.
:1eI,.##lI,.:{.>0}a+?,.=

This is non-competing because of a bug fix.
This takes about 1 second for 15 on my machine. For 20 and greater this crashes with an Out of global stack exception.
Explanation
This uses no partitioning built-in of any kind, and instead uses the fact that + works both ways through constraints propagation.

Main predicate:
:1f                       Find the list of all valid outputs of predicate 1
   :oa                    Sort each element of that list
      d.                  Output is that list of sorted lists minus all duplicates

Predicate 1:
:1eI                      I is an integer between Input and 1
    .##lI,                Output is a list of length I
          .:{.>0}a        Elements of Output are integers greater than 0
                  +?,     The sum of the elements of Output is Input
                     .=   Assign values to the elements of Output

Mathematica, 62 54 bytes
Inner[#2~Table~#&,FrobeniusSolve[r=Range@#,#],r,Join]&

The partitions of an integer n can be found by solving for n-tuples of non-negative integers (c1, c2, ..., cn) such that c1 + 2 c2 + ... + n cn = n. FrobeniusSolve is able to find all solutions to this equation which are used to create that many copies of their respective values in order to find all integer partitions of n.

... and how is this not a built-in?

@LeakyNun FrobeniusSolve does not find integer partitions, it finds all solutions of non-negative integers x1 ... xN to equations of the form a1 x1 + a2 x2 + ... aN xN = b given a1 ... aN and b.

Pyth, 17 bytes
L|{SMs+LVrb0yMb]Y

Defines a function named y.  Try it online.

Jelly, 9 bytes
b1ŒṖḅ1Ṣ€Q

Try it online!
How it works
b1ŒṖḅ1Ṣ€Q  Main link. Argument: n (integer)

b1         Convert n to unary, i.e., a list A of n 1's.
  ŒṖ       Generate all partitions of the list A.
    ḅ1     Convert each flat list from unary to integer.
      Ṣ€   Sort each resulting list.
        Q  Unique; deduplicate the lists.

J, 39 bytes
[:~.i.<@\:~@(#;.1~"1 0)1,@{@;(<1 0)#~<:

This is a monadic verb that takes an integer and returns an array of boxed arrays. Try it here. Usage:
   p =: [:~.i.<@\:~@(#;.1~"1 0)1,@{@;(<1 0)#~<:
   p 3
+-----+---+-+
|1 1 1|2 1|3|
+-----+---+-+

On input 15, it runs for about a second on my machine.
Explanation
This challenge immediately looked like a job for Catalogue ({) and Cut (;.).
The outline of the algorithm is:

Produce all 0-1 arrays of length n.
For each of them, cut a dummy length-n array along the 1s, and list the lengths of each part.
Sort the lengths, and remove duplicate arrays from the result.

Apparently, Luis Mendo had the same idea too.
Explanation of code:
[:~.i.<@\:~@(#;.1~"1 0)1,@{@;(<1 0)#~<:   Input is n.
                                     <:   n-1
                                   #~     copies of
                             (<1 0)       the boxed array [1 0].
                       1    ;             Prepend the boxed array [1].
                          {@              Catalog: produces all combinations of taking one
                                          item from each box, in a high-dimensional matrix.
                        ,@                Flatten the matrix. This results in a list of all
                                          boxed 0-1 arrays of length n that begin with a 1.
    i.                                    The array A =: 0, 1, ..., n-1.
            (     "1 0)                   For each of the boxed arrays B:
              ;.1~                          cut A along the occurrences of 1s in B,
             #                              take the length of each part,
        \:~@                                sort the lengths,
      <@                                    and put the result in a box.
[:~.                                      Remove duplicate boxes.

Very nice use of cut ;. again.

Vyxal, 7 bytes
ɾÞ×'∑?=

Try it Online!
ɾÞ×'∑?=
ɾ       # Get a list in the range [1, input]
 Þ×     # Get all combinations (with replacement) of all lengths
   '    # Filter for:
    ∑?= #  Sum equals the input

JavaScript (Firefox 30-57) 79 ES6, 65 bytes
f=(n,m=1,a=[])=>n?m>n?[]:[...f(n-m,m,[...a,m]),...f(n,m+1,a)]:[a]

Port of @xnor's Python solution. (If only I'd noticed that you could recurse over m as well as n...)

05AB1E, 8 bytes
Å1.œO€{ê

Outputs as a list of lists, from n amount of 1s to [n], where each inner list is sorted (I know the rules allow them to be unsorted, but it's necessary for the uniquify of lists).
Try it online or verify the first 15 result.
If builtins were allowed, this would be 2 bytes instead (with the same exact results):
Åœ - Try it online or verify the first 15 results.
Explanation:
Å1        # Push a list with the (implicit) input amount of 1s
  .œ      # Get all partitions of this list
    O     # Sum each inner-most list
     €{   # Sort each inner list
       ê  # Sorted uniquify the list of lists
          # (after which the result is output implicitly)

Minor note: ê (sorted uniquify) could also just be Ù (uniquify) for the same result, but with the added sort it's a lot faster in this case.

Apparently it's the exact same approach as @Dennis' Jelly answer I now notice. I came up with it independently just yet, but it's not too surprising we're using the same straight-forward approach, being codegolf languages with these builtins available.

Curry (PAKCS), 44 bytes
(1!)
_!0=[]
a!n=anyOf[a ..n]#n
a#n=a:a!(n-a)

Try it online!

Scala, 117 bytes
Port of @Dennis's Python answer in Scala.

Golfed version. Try it online!
def f(n:Int):Set[Seq[Int]]=if(n==1)Set(Seq(1))else(1 until n).flatMap(i=>f(n-i).map(_:+i).map(_.sorted)).toSet+Seq(n)

Ungolfed version. Try it online!
object Main extends App{
  def f(n: Int): Set[List[Int]] = {
    if (n == 1) {
      Set(List(1))
    } else {
      (1 until n).flatMap { i =>
        f(n - i).map { p =>
          (p :+ i).sorted
        }
      }.toSet + List(n)
    }
  }
  println(f(15));
}


text:
Golf me an HQ9+ Compiler
Your task is "simple" should you choose to accept it.
Write an HQ9+ compiler in a language of your choice.
HQ9+ has four commands (as you may be able to tell) H prints "Hello, World!" Q prints out the source code (this can either be the compiled source or HQ9+ source for the purpose of this challenge),9 prints out the lyrics to 99 bottles of beer on the wall, and + is essentially a noop.
Your submission should be written in some language X, and should take input of HQ9+ source and output a program in X.
Wait, I know what you're thinking. This is not a duplicate of Creating a HQ9+ interpreter as it should not run HQ9+ code, but rather compile it. It should output a fully functional program.

Rules

Language X should satisfy the traditional definition of a language
Standard loopholes disallowed
This is code golf (shortest program in bytes wins)
Your solution must be testable
X cannot be HQ9+ or an extension of HQ9+

Clarifications
There has been some confusion as to what the q command should do. I had originally thought that it would output the compiled code (i.e code in langauge X), but my reference implementation outputs the hq9+ code. I would like to see either one depending on your golfing preferences.

What would HH produce?

Hello, World!Hello, World!@LeakyNun

@LeakyNun Presumably Hello, World!\nHello, World!\n

can the output language be HQ9+?

No, adding that to the specs

This would be a perhaps better challenge for languages X and Y to be the same.

Perhaps but its too late now

It's not too late. There's only one valid answer currently (mine), and it wouldn't be invalidated by that rule change. Additionally, banning extensions of HQ9+ (like those found in the "See Also" section of this page) is probably a good idea.

Ok altering the challenge

Dr Green Eggs. It is not I talked about how it is not an interpeter it is different because it is a compiler.

@RohanJhunjhunwala Yes I know, but I think the difference is pretty small. I could write print "print" at the beginning of the python answer and copy the rest. Although FWIW, it'll take 3 other users to agree with me, so the question might stay open anyway.

IT is fairly similar of a challenge I guess, but I would say that it does open itself to some interesting variations, and it does actually fit HQ9+'s spec of ingnore extraneous characters.

Should Q output the source of the input program, or the compiled program?

@CᴏɴᴏʀO'Bʀɪᴇɴ I would think the compiled program - otherwise it wouldn't really be a quine.

@Mego I don't know... a C quine doesn't output its compiled binary either.

The post would benefit from the inclusion of HQ9+ specs.

@MartinEnder A C Quine outputs its own source code. C doesn't have to be compiled (though the interpreters admittedly don't work well).

@Mego But a C quine still outputs its C source code even if it is compiled. HQ9+ doesn't need to be compiled either. I really don't see why you want to treat one differently from the other.

@MartinEnder Fair enough. I guess clarification from the OP would be helpful. I interpreted it as "write a program that outputs an equivalent program to the HQ9+ input program in your language", meaning a quine should output the compiled program and not the input program.

My reference implementation has q print out the hq9+ source as opposed to the compiled source, but it would be interesting to make it be the compiled source

The accepted answer is the one that wins the challenge. Though you are not obligated to accept an answer, if you do, the consensus on meta is that you should accept the answer with the best score - for code golf, that's the shortest answer in bytes.

@Mego ok I guess I can accept the smallest program.

This should stay closed. If you can interpret HQ9, then all you have to do is stringify the commands used in your code and output them at the correct moments.

Actually, 17 bytes
"HQ9"∩εj'N'9(t'.j

Try it online!
This program compiles HQ9+ to Actually.
Actually is (almost) a superset of HQ9+ - the only difference is that the 9 command in HQ9+ is N in Actually. Because + is a NOP in HQ9+ (the accumulator is never actually used or displayed, and thus many implementations treat it as a NOP), it is stripped out.
Explanation:
"HQ9"∩εj'N'9(t'.j
"HQ9"∩εj           strip all characters not in "HQ9", preserving order
        'N'9(t     replace all occurrences of "9" with "N"
              '.j  insert a "." between every pair of characters

-1 byte from Christian Irwin

You... you are good.

Impressed! Only 533 more bytes of golf needed on my java solution!

Superset for the win! I've been watching your language for some time, quite interesting xD

Isn't Actually a variant of HQ9+, since it contains commands that do all of HQ9+'s specification?

@VTCAKAVSMoACE Actually contains the HW, Quine, and NNBB commands, but does not have an "increment accumulator" command. Additionally, since the NNBB command is N instead of 9, it's not quite an extension/variant/superset. The need to explicitly print with . between every command further differentiates Actually from HQ9+ (since H and N don't do the HW and NNBB commands if the stack is not empty).

@Mego ¯\(ツ)/¯ It just feels weird for this to be feasible in 17 bytes.

This doesn't work for a program with two occurances of 9.

Java only 551 bytes
Joined in on the fun! This is a java compiler which compilers HQ9+ to java.Java is not verbose at all. Some code shamelssly stolen borrowed from "99 Bottles of Beer".

public class a{public static void main(String[]a){System.out.printf("public class a{public static void main(String[]z){String p=\"%s\";for(char a:p.toCharArray()){if(a=='H')p(\"Hello, World\\n\");if(a=='Q')p(p);if(a=='9'){String b=\" of beer\",c=\" on the wall\",n=\".\\n\",s;for(int i=100;i-->1;){s=\" bottle\"+(i>1?\"s\":\"\");p(i+s+b+c+\", \"+i+s+b+n+(i<2?\"Go to the store and buy some more, 99\":\"Take one down and pass it around, \"+(i-1))+\" bottle\"+(i!=2?\"s\":\"\")+b+c+n);}}}}public static void p(String s){System.out.print(s);}}",a[0]);}}

Mathematica, 453 bytes
"("<>#~StringReplace~{"H"->"Print[\"Hello, world!\"]; ","Q"->"Print[ToString[#0, InputForm]]; ","9"->"a = StringJoin[ToString[#1], {\" bottle\", If[#1 < 2, \"\", \"s\"], \" of beer\"}] & ; b = StringJoin[a[#1], \" on the wall\"] & ; Do[Print[b[i], \", \", a[i], c = \".\n\", If[i < 2, StringJoin[\"Go to the store and buy some more, \", b[99], \".\"], StringJoin[\"Take one down and pass it around, \", b[i - 1], c]]], {i, 99, 1, -1}]; ",_->""}<>") & "&

"99 Bottles" code adapted from @alephalpha's program. Outputs a function that, when run, will print the output. (Could probably still find a less verbose quine method.)

Looks like you missed the rule change - solutions must compile HQ9+ to the same language as the compiler.

@Mego Fixed that

Haskell, 383 bytes
    s#'Q'="putStrLn\""++s++"\"\n"
    s#'H'="putStr\"Hello, World\\n\"\n"
    s#'9'="f\n"
    s#_=""
    c s="o=\" of beer on the wall\"\na 1=\"1 bottle\" \na n=shows n\" bottles\"\nb 1=\"Go to the store and buy some more, \"++a 99\nb n=\"Take one down and pass it around, \"++a(n-1)\nf=putStr$[99,98..1]>>= \\n->[a n,o,\", \",a n,\" of beer.\\n\",b n,o,\".\\n\\n\"]>>=id\nmain=do\n"++(concat.map(s#)$s)

Thanks to nimi for the beer.
Sample outout
o=" of beer on the wall"
a 1="1 bottle"
a n=shows n" bottles"
b 1="Go to the store and buy some more, "++a 99
b n="Take one down and pass it around, "++a(n-1)
f=putStr$[99,98..1]>>= \n->[a n,o,", ",a n," of beer.\n",b n,o,".\n\n"]>>=id
main=do
putStr"Hello, World\n"
putStrLn"HQ9+"
f

Dyalog APL, 244
H P
h←'''hello, world'''
q←M,(P/⍨1+P=M),M←''''
n←'∊{z←8↑k←'' of beer on the wall''⋄r←{r←'' bottles''↑⍨8-⍵=1⋄⍵=0:''No'',r⋄r,⍨⍕⍵}⋄m,k,g,(m←r⍵),z,g,''Take one down and pass it around'',z,g,(r⍵-1),k,g,g←3⌷⎕tc}¨⌽⍳99'
⎕FX'F',h h q q n''['HhQq9'⍳P]

This is a tfn H, which takes a HQ9+ program as its input and defines in the workspace a tfn F, which runs that program.
Example:
      H 'QhqH' ⍝ compile 'QhqH'
      F ⍝ run compiled function F
QhqH
hello, world
QhqH
hello, world
      ⎕CR 'F' ⍝ source code for function F
 F
 'QhqH'
 'hello, world'
 'QhqH'
 'hello, world'

source: Stack Exchange

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

sort: votes


text:
Recursion bracketed; or Dyck words generation
We already have challenges to check if a string of brackets is fully matched and to count the number of balanced strings. It remains for us to generate these strings, but it will not be so easy…
A Dyck word is a string, of length 2n, consisting of n opening and n closing parentheses (( and )) fully matched (that is to say: for all prefixes of the string, the number of opening parentheses is greater than or equal to the number of closing ones).
It is interesting to note that the number of different Dyck words of length 2n is equal to the (n + 1)-th Catalan number.
It’s pretty straightforward to write a program that generates these words with a recursive function. But the goal here is to do the same thing without.
Challenge
Write a full program or function that takes a positive integer, n, using stdin or an acceptable alternative, and outputs all the different Dyck words of length 2n. The words can appear in any order and each must be separated from each other by a line break. Moreover, your program should not use recursive functions (see details below).
Rules

The output of your program should only contain Dyck words of length 2n, separated by line breaks. Each word must appear only once.
Your program must work at minimum for inputs 0 to 15.
You may not write recursive functions, neither direct (a function that calls itself) nor indirect (e.g. a function f that calls another function g that calls function f). That being said, you can still use the standard functions of your language without worry of how they work internally.
Similarly, your program should not call itself.
You may not use non-standard librairies.
Your program may not read or write files.
Your program must be able to run in a reasonable time for 0 ≤ n ≤ 15 (hence, naively generate all arrangements is probably not a good idea). Let’s say less than 20 minutes with a memory limit of 4 GB (my reference implementation in C manages n = 15 in less than 5 seconds).
All standard loopholes are forbidden.

As usual in code-golf, the shortest code in bytes wins. But if you have found an interesting way to achieve this challenge in your language, please do not hesitate.
Test I/O
For this input:
3

The output could be (any other order is correct too):
((()))
()()()
(()())
(())()
()(())

I think you need to define recursion better. You can easily build your own function with goto statements, stacks in loops, etc. I don't think this kind of exclusion will ever work nicely for a challenge, as any approach to do this could be argued to be some form of implementing recursion yourself?

This is a very interesting challenge. but most of the rules make it worse. For example You may not write recursive functions Why not? Similarly, your program should not call itself. Why not? Your program may not read or write files. Submissions are unlikely to, but why not? That also goes against our default allowed IO methods. Also, it is standard to allow functions rather than just full programs.

@FryAmTheEggman Yes, it is still possible to emulate the recursion. But it is penalized by the place that takes this “emulation”. The goal is not to prohibit all forms of recursion, just make it more difficult (bracket it ;-]). So I see two valid approaches: circumvent the ban, or do completely differently.

@DrGreenEggsandIronMan As I said, the goal is to make harder to use a recursive principle. Although, as noted above, it is still possible. All cited rules are designed with that in mind. Regarding the remark on functions rather than full programs, it seems perfectly acceptable, I will add it.

I think you may be falling into the trap of assuming languages are all similar. I think as it stands this challenge is too broad, as I will be totally uncertain as to what would count as valid "emulation" of recursion vs the banned actual recursion, in say stack based languages.

@FryAmTheEggman It came to my mind while writing the challenge. That's why the challenge does not prohibit all forms of recursion. It just does not allow to write recursive functions. If the concept of functions does not exist in the selected language, or if recursion is underlying, the answer seems valid to me.

Using an approach which builds the strings one character at a time and then filters them (so it generates at most twice as many strings as Dyke paths), I'm running out of memory with a 2GB heap for n=15. I can get n=14 in 3m41s with a 2GB heap.

@FryAmTheEggman, doubling the time taken is only reasonable if the reference implementation is in a slow high-level language, unless the intention is to exclude high-level languages. See e.g. my question on practical numbers for an example of what I consider reasonable: that allowed taking 250 times as long as my reference Java answer, and 10 times as long as my reference Python answer.

@mlpo Oh, whoops, don't mind me I'm bad at using my calculator :P Anyway, then how long does it take? Try using Peter's guidelines along with your own solution to come up with something reasonable.

@FryAmTheEggman With an old PC, my solution takes less than 5 seconds in C.

@PeterTaylor Thanks for your advices. I have set the limit at 20 minutes.

@PeterTaylor My solution has a small memory footprint, but I do not want to disqualify other approaches. I increased the limit to 4 GB.

This challenge hits too many things to avoid: Needless fluff with the extra conditions, Do X without Y and disadvantaging functional languages by patching out recursion, chameleon challenges with the minor-seeming time/space requirement actually being a big limitation.

For a first challenge, I think you're off to a good start, but in the future I recommend less micromanaging requirements.

It appears no one has pointed out the sandbox yet. For future challenges, I recommend giving it a try: you post a challenge specification there instead of here and can get feedback and iron out some of the details before the challenge goes live and people start working on/answering it. That can help avoid a lot of frustration for everyone and often results in an overall better challenge.

Thank you both for your constructive comments. I did not know the sandbox, thank you for the information, I’ll use it next time.

Pyth, 26 23 bytes
jeuaGsMs*VjRL`()_GGQ]]k

Try it online
                    ]]k   starting at G=[['']],
  u                Q      repeat the given number of times:
                _G          reversed G
          jRL`()            parenthesize each level-2 element
        *V        G         take Cartesian products of corresponding
                              elements of that and G
       s                    concatenate, yielding a list of pairs
     sM                     concatenate each resulting pair
   aG                       append the resulting list to G
je                        finally, join the last result on newlines

This directly follows the Catalan recurrence (with a non-recursive dynamic programming implementation) and doesn’t use any filtering.  On my laptop, it runs in 55 seconds using 2.67 GiB RAM for n = 15.
Pyth, 33 bytes, O(n) memory
=S*Q`()Wn2J+3x
Q"(()"=+.<S<QJ1>QJ

Try it online
  *Q`()                  build a string with Q copies of "()"
 S                       sort it
=                        assign it to Q

       W                 while the following is true:
(newline)                  print Q
Q
             x             take the index of the first occurrence of "(()"
 "(()"
           +3              add 3
          J                assign to J
        n2                 is this not equal to 2 (i.e. was "(()" found)?
                         do the following:
           <QJ             take the first J characters of Q
          S                sort them
        .<    1            cyclically shift them left by 1
       +       >QJ         add the remaining characters of Q
      =                    assign to Q

This algorithm outputs all Dyck words in a stream, with each word being generated from the previous one and no additional state.  On my laptop, it runs in 170 seconds using basically no RAM for n = 15.
As an example illustrating how it works:
()()()()((()()(())))(())
         ^^^               becomes
(((((()))))(()(())))(())

Similarly computing the words in the reverse of this order also takes 33 bytes:
=*QK`()WJhx
Q_K=+t.iFc2_<QJ+K>QhJ

Try it online

Nice answer! Well done for the generation of a word from the previous one, it was also the spirit of my solution.

C99, 105 bytes
i,j,s;f(n){for(char a[31]={};++i%(1<<2*n);s||puts(a))for(j=s=0;~s&&j<2*n;)s+=1-(a[j]=40+(i>>j++)%2)%2*2;}

Iterates over all strings of 2n parentheses.
With piped output and compiler flag -O3, input n = 15 takes roughly 15.5 seconds on my machine. Memory consumption is 1.2 MB.
Test it on Ideone.

It takes a bit more than 1 minute here. This answer seems valid. It is possible to have a more efficient approach than generate all arrangements, but I'm not sure that it is shorter to write.

Well, I precisely chose C because I thought I could get away with a brute-force approach, and I wasn't disappointed. The last edit (125 to 124) doubles the run time by the way.

Breaking out of the inner loop as soon as there's an unmatched ) lowered the run time to one fourth and reduced the byte count.

CJam (48 bytes)
ri"()"*${_p_,{1$>_)-,\(-,<},_{W=/(\s$1m>+}{&}?}h

Online demo. This effectively takes one obvious recursive solution and makes it iterative. Instead of actually simulating the steps back up the stack, it applies a successor rule:

Find the last ( which starts a suffix with strictly more ) than (; sort that suffix, and rotate once.

Note that this is deliberately designed to avoid keeping the full list of solutions in memory, because I don't think it fits (at least, not if run on a 64-bit machine. It might on a 32-bit machine). There are 9694845 Dyck paths for n=15, so that's 30*9694845 characters, and 92*9694845 = 891925740 bytes of memory just for the (Java) String objects. But then the List holding the objects probably wraps an array with space for 16777216 elements, which is a further 256MB, and the CJam interpreter itself seems to add quite a bit of overhead.

(42 bytes)
Ma{{_'(+\')+}%{"()"\f{\-,}I+_$=},}ri:I2**,

This builds the strings up one character at a time, filtering to ensure that no string has more than n opening parentheses or more closing than opening parentheses. However, it runs out of memory with 3GB for n=15.
The same idea at 39 bytes, but this runs out of memory earlier.
Ma{"()":Sm*::+{S\f{\-,}I+_$=},}ri:I2**`

Online demo

(24 bytes)
My original answer, now disqualified by rule changes.
{"()"*e!{0\+{~_}*]1&!},}

This is an anonymous function which takes input on the stack. Online demo.
It works by the obvious approach of taking all permutations of n pairs of parentheses and filtering for those which are balanced.

Unless I am mistaken, this answer does not meet the seventh rule. I can not run the code in a reasonable time for n ≥ 10.

@mlpo "Reasonable" is extremely subjective. To make that rule enforcable, you should specify time and memory limits.

@Dennis Yes indeed, done. But anyway, I can not get any output for n ≥ 10, even after 10 minutes, which is logical, the algorithm is exponential.

@mlpo, online demos are always only for really small test cases. Running it locally on my 4-year-old computer, it computes n=12 in 3m13s, although it does run out of memory with a 1GB heap on n=13. I'm currently testing an alternative approach which seems like it should be less brute force but is actually turning out to be much slower. I'm not entirely sure what to make of "the algorithm is exponential". The output is exponential. No sub-exponential answer could meet spec!

@PeterTaylor Yes, it is certain that we can go further with something else than a JavaScript interpreter ;-). Regarding the complexity, yes the algorithm is necessarily exponential (as the output). Thus, we must find a way to limit the number of operations performed, generate all the arrangements is not a good idea to do that ;-).

@PeterTaylor I'm not too sure n=12 in 3m13s means fulfilling the criteria. My solution in pyth ran n=12 in 22s on my machine, but n=15 about 18minutes.

@busukxuan, yes, but that version was written before the criteria, and it took me a while to beat the criteria and update the answer.

ri"()"*${_p_"(()"#)_{2+/($(+\+s}{*}?}h (port of Anders' Pyth implementation which uses a mirror-image successor rule)

JavaScript (ES6), 125 bytes
n=>{for(i=m=1<<n+n-1;i&m;i++){for(j=m,z=o=0;o>=z;j>>=1)i&j?o++:z++;o-n||console.log(i.toString(2).replace(/./g,d=>")("[d]))}}

Actually printing the results slows things down horribly, but with console.log set to ()=>{} this takes my machine about 7 seconds for n=12, which presumably translates to 7 minutes for n=15. If that's not fast enough, you can replace i++ with i+=2 or even i+=j||2 but that made only a few percent difference in my testing. Works by generating all 2n-digit binary numbers and checking whether they represent a Dyck word. Ungolfed:
function dyck(n) {
    // Don't bother generating words that begin with ),
    // so start half-way though 4 ** n.
    for (var i = 4 ** n / 2; i < 4 ** n; i += 2) {
        // Convert to the string of ()s.
        var word = i.toString(2);
        word = word.replace(/1/g, "(");
        word = word.replace(/0/g, ")");
        // Count the (s and )s separately.
        var left = 0;
        var right = 0;
        for (var j = 0; j < n + n; j++) {
            if (word[j] == "(") left++;
            else right++;
            // Abort if there are too many )s
            if (right > left) break;
        }
        // If we got exactly n (s then it's a Dyck word.
        if (left == n) console.log(word);
    }
}

C, 748 746 651 bytes
#define C(v,n) for(v=n==D;v<=(n<=D);v++)
void p(Z){unsigned long long R,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D=Z*2,E,F;C(C,30)C(B,29)C(A,28)C(z,27)C(y,26)C(x,25)C(w,24)C(v,23)C(u,22)C(t,21)C(s,20)C(r,19)C(q,18)C(p,17)C(o,16)C(n,15)C(m,14)C(l,13)C(k,12)C(j,11)C(i,10)C(h,9)C(g,8)C(f,7)C(e,6)C(d,5)C(c,4)C(b,3)C(a,2){R=C<<29|B<<28|A<<27|z<<26|y<<25|x<<24|w<<23|v<<22|u<<21|t<<20|s<<19|r<<18|q<<17|p<<16|o<<15|n<<14|m<<13|l<<12|k<<11|j<<10|i<<9|h<<8|g<<7|f<<6|e<<5|d<<4|c<<3|b<<2|a<<1;if(__builtin_popcount(R)!=Z)goto X;F=0;for(E=D-1;E;E--)if(R&1<<E)F++;else if(F)F--;else goto X;for(;E<D;E++)putchar(40+!(R&1<<D-E-1));puts("");X:;}}

At a whopping >600 bytes, this isn't really much of a contender...but it's pretty fast and memory efficient.
Works by encoding the parentheses strings as integers, with a set bit representing ( and an unset bit representing ). For instance, (()) would be 1100. I made the following observations:

All permutations must begin with ( and end with ); otherwise, it won't be valid.
Every valid permutation must have n left parentheses and n right parentheses, where n is the input number. I used __builtin_popcount for this.

When built via icc -march=native -O3, it takes 17s on my computer, though others have reported better times (~3-7s) on their (presumably faster) computers. In addition, it uses around 1.5 KB of memory.
Here's the code with explanatory comments:
// Z is the input number.
void p(Z){
    // All the variables.
    // R is the resulting paren number, with 1 bits for open parens and 0s for closed ones.
    // a-C are used to hold the state of each paren (1 if open, 0 if closed).
    // D holds Z*2, or the total length of the paren string.
    // E and F are used later on.
    unsigned long long R,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D=Z*2,E,F;
    /* Each loop performs a basic check. If D is equal to the corresponding
       number, then the variable will start at 1 (since the first paren must
       always be open). If D is greater than or equal to the number, then the loop
       will only be run once with the variable set to 0, and a later check will
       cause the variable to be ignored. Otherwise, it will loop twice; one for a
       closed paren (0), and one for an open one (1). Of course, if D == the
       number, then it will only loop for the open paren (as stated above). */
    for (C = (D == 30); C <= (30 <= D); C++)
    for (B = (D == 29); B <= (29 <= D); B++)
    for (A = (D == 28); A <= (28 <= D); A++)
    for (z = (D == 27); z <= (27 <= D); z++)
    for (y = (D == 26); y <= (26 <= D); y++)
    for (x = (D == 25); x <= (25 <= D); x++)
    for (w = (D == 24); w <= (24 <= D); w++)
    for (v = (D == 23); v <= (23 <= D); v++)
    for (u = (D == 22); u <= (22 <= D); u++)
    for (t = (D == 21); t <= (21 <= D); t++)
    for (s = (D == 20); s <= (20 <= D); s++)
    for (r = (D == 19); r <= (19 <= D); r++)
    for (q = (D == 18); q <= (18 <= D); q++)
    for (p = (D == 17); p <= (17 <= D); p++)
    for (o = (D == 16); o <= (16 <= D); o++)
    for (n = (D == 15); n <= (15 <= D); n++)
    for (m = (D == 14); m <= (14 <= D); m++)
    for (l = (D == 13); l <= (13 <= D); l++)
    for (k = (D == 12); k <= (12 <= D); k++)
    for (j = (D == 11); j <= (11 <= D); j++)
    for (i = (D == 10); i <= (10 <= D); i++)
    for (h = (D == 9); h <= (9 <= D); h++)
    for (g = (D == 8); g <= (8 <= D); g++)
    for (f = (D == 7); f <= (7 <= D); f++)
    for (e = (D == 6); e <= (6 <= D); e++)
    for (d = (D == 5); d <= (5 <= D); d++)
    for (c = (D == 4); c <= (4 <= D); c++)
    for (b = (D == 3); b <= (3 <= D); b++)
    for (a = (D == 2); a <= (2 <= D); a++) {
        /* R is the result here. Each variable is shifted and bitwise-ORd with the
           others to generate a number representing the string.

           For instance, (()) would be 1100, and ()(()) would be 101100. */
        R=C<<29|B<<28|A<<27|z<<26|y<<25|x<<24|w<<23|v<<22|u<<21|t<<20|s<<19|r<<18|
          q<<17|p<<16|o<<15|n<<14|m<<13|l<<12|k<<11|j<<10|i<<9|h<<8|g<<7|f<<6|
          e<<5|d<<4|c<<3|b<<2|a<<1;
        // If there is an uneven balance of parens, then just jump to the loop end.
        if(__builtin_popcount(R)!=Z) goto X;
        // F here is the number of opening parens.
        F=0;
        // E is a counter used to extract each bit.
        for(E=D-1;E;E--)
            // If the bit is set, then increment the number of open parens.
            if(R&1<<E) F++;
            // If the bit wasn't set, then decrement the number of open parens...
            else if(F) F--;
            // ...but, if there were no open parens, then it's unbalanced; jump to the end
            else goto X;
        // E (the bit counter) is already 0.
        // Loop through each bit...
        for(;E<D;E++)
            /* ...and print it out. 40 is the ASCII code for `(`. If the bit
               is set, the ! will negate it, and 0 will be added to the `(`.
               Otherwise, it will turn the left paren into a right paren. */
            putchar(40+!(R&1<<D-E-1));
        // Newline.
        puts("");
        // End of loop.
        X:;
    }
}

746-byte version
#define C(v,n) for(v=(n==D);v<=(n<=D);v++){
void p(Z){unsigned long long R,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D=Z*2,E,F;C(C,30)C(B,29)C(A,28)C(z,27)C(y,26)C(x,25)C(w,24)C(v,23)C(u,22)C(t,21)C(s,20)C(r,19)C(q,18)C(p,17)C(o,16)C(n,15)C(m,14)C(l,13)C(k,12)C(j,11)C(i,10)C(h,9)C(g,8)C(f,7)C(e,6)C(d,5)C(c,4)C(b,3)C(a,2)R=(C<<29)|(B<<28)|(A<<27)|(z<<26)|(y<<25)|(x<<24)|(w<<23)|(v<<22)|(u<<21)|(t<<20)|(s<<19)|(r<<18)|(q<<17)|(p<<16)|(o<<15)|(n<<14)|(m<<13)|(l<<12)|(k<<11)|(j<<10)|(i<<9)|(h<<8)|(g<<7)|(f<<6)|(e<<5)|(d<<4)|(c<<3)|(b<<2)|(a<<1);if(__builtin_popcount(R)!=Z)continue;F=0;for(E=D-1;E;E--)if(R&(1<<E))F++;else if(F)F--;else goto X;for(;E<D;E++)putchar('('+!(R&(1<<D-E-1)));puts("");X:;}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

Nice. 7 seconds here with gcc -O3 -march=native -ffast-math -DNDEBUG.

This is quite fast (3.5 seconds on my machine) and memory-friendly (time says 1.3 MB), but I'm not sure it is a serious contender in a code golf competition...

You can easily save 100 bytes by removing the { from the marco (only the inner loop needs it), removing the parens around the bitshifts (|'s predence is lower) and (with a speed hit) declaring the variables in the global scope where they'll default to int.

Re speed difference: Depending on which OS you use, gcc could be a lot faster (or slower) than icc.

No big deal, My JS answer ported to C is about 220, bytes 5 seconds and begligible ram use

@Dennis Thanks! I updated the code. On my computer, Clang and GCC are actually slower than Intel. What options did you use on your computer to compile it?

Just -O3 -march=native.

JavaScript (ES6), 203
Implementing this algorithm (point 3, totally iterative)
Within the limits of script executing in Firefox, I managed to have the 200K console output for input 12 in about 1.5 minutes
n=>{
for(b=[...Array(n)].map((_,i)=>1+2*i),z=0;!z;)
for(c=[...'('.repeat(n+n)],b.map(n=>c[n]=')'),console.log(c.join``),z=i=n;i--&&z;)
if(b[i]<n+i)for(z=0,b[j=i]++;++j<n-1;)b[j]=Math.max(b[j-1],2*j)+1
}

Less golfed
n=>{
  b=[...Array(n)].map((_,i)=>1+2*i)
  q=0
  for(z=0;!z;)
  {
    c=[...'('.repeat(n+n)],
    b.map(n=>c[n]=')'),
    console.log(++q,c.join``)
    for(z=i=n;i--&&z;)
      if(b[i]<n+i)
        for(z=0,b[j=i]++;++j<n-1;)
          b[j]=Math.max(b[j-1],2*j)+1
  }
}

Ported to C just for fun, run in 5 secs for input 15 (it compiles and works without #includes)
f(n){int i,j,z,b[49];char c[99];
for(i=n;i--;)b[i]=2*i+1;
for(z=0;!z;){memset(c,40,n+n);c[n+n]=0;
for(i=n;i--;)c[b[i]]=41;puts(c);
for(z=i=n;i--&&z;)if(b[i]<n+i)for(z=0,b[j=i]++;++j<n;)b[j]=(b[j-1]>2*j?b[j-1]:2*j)+1;
}}

Test generating all output but do not display it, just counting output rows
I got 90 sec for input 15

F=n=>{
for(b=[...Array(n)].map((_,i)=>1+2*i),z=0;!z;)
for(c=[...'('.repeat(n+n)],b.map(n=>c[n]=')'),console.log(c.join``),z=i=n;i--&&z;)
if(b[i]<n+i)for(z=0,b[j=i]++;++j<n-1;)b[j]=Math.max(b[j-1],2*j)+1
}

console.log=x=>o++ // console.log display no output, just count rows

function test() {
  n=+I.value,o=0,t=+new Date
  O.textContent='...wait...'
  setTimeout(_=>(F(n),O.textContent=['rows='+o,'time sec '+(new Date-t)/1000]), 10)

}

test()
N:<input id=I value=12 type=number max=20><button onclick='test()'>go</button>
<pre id=O></pre>

Really interesting solution, it may be possible to handle n = 15 by using another approach.

In fact, I can run this function in less than 7 minutes on my machine using node. So, you just have to replace console.log(++q,c.join``) by console.log(c.join``) to have valid output and your answer is valid.

Python 2, 117 116 bytes
def f(n):r='',;exec"r=[s+c for s in r for t in[s.count('(')]for c in')('[t+t==len(s):2-t/n]];"*2*n;print'\n'.join(r)

This builds the strings character by character, without filtering.
With piped output and input n = 15, this takes roughly 39 seconds with CPython and 7.5 seconds with PyPy on my machine. Memory consumption is 1.6 GB with CPython and 2.5 GB with PyPy.
Test it on Ideone.

J, 97 70 69 68 60 59 bytes
'()'{~(,:'')((((>:#-+/)*(]#>:2*+/))"1#]),.&0,,.&1)^:(2*[)~]

Now tacit!
This is a monad that uses binary digits to create pairs of parentheses. In order to meet the requirements, a non-recursive approach is used along with optimization by use of certain primitives to ensure that mostly boolean (1 byte) values are used to keep memory requirements low.
On my computer, using an i7-4770k, it takes about 50 seconds to compute the result for n = 15 and uses about 1.5 GB of memory.
In the interests of maximizing speed, this version with 70 bytes computes the result for n = 15 in 0.5 seconds while using about 800 MB of memory. It's also tacit!
'()'{~[:;@(<@([:,/],"1/0=|."1)/.~+/"1)<:1&(],(+/<:#-+/)"1@,.~#,.~)1$0:

Usage
   f =: '()'{~(,:'')((((>:#-+/)*(]#>:2*+/))"1#]),.&0,,.&1)^:(2*[)~]
   timer =: 6!:2
   f 3
()()()
(())()
()(())
(()())
((()))
   10 timer 'r =: f 15'  NB. Average time over 10 runs
49.9951
   # r
9694845

Pyth, 47 bytes
                                                               <-empty line
Musm?<J/d\(Q?>-J/d\)0,+d\(+d\)]+d\(]+d\)G*2Q]k

Took 18 minutes on my machine, and over 2GB RAM.
In pythonic pseudocode:
// newline means "print"
M                                              map(print,
 u                                               reduce(lambda G,H:
  sm                                               sum(map(lambda d:
                     ,+d\(+d\)                       ([d+"(",d+")"] if
            ?>-J/d\)0                                   J-d.count(")") > 0
                              ]+d\(                     else [d+"("]) if
    ?<J/d\(Q                                           (J=d.count("(") < Q
                                   ]+d\)               else [d+")"],
                                        G              G)),
                                         *2Q]k     2*input(),[""]))

In words:

create a function that maps any string to a list of strings that can be formed by adding "(" or ")"
if the parentheses are already matched, only "(" can be added; if there are already n "(", only ")" can be added; otherwise a pair is returned
create a new function that maps the old function over its param, and then sum up the map, so that it takes a list of strings, maps to a list of lists of strings, and then de-nests it back into a list of strings
each call essentially "grows" its params by one ( or )
reduce this new function over range(2*input()), with [""] as base case
essentially just passing [""] through the new function 2n times
map print over the return value of reduce to print each string in new lines

Haskell, 111 105 bytes
import Data.Function
id=<<fix(\h a z->id=<<[('(':)<$>h(a-1)z|a>0]++[(')':)<$>h a(z-1)|a<z]++[[""]|a+z<1])

Usage example: id=<<fix(\h a z->id=<<[('(':)<$>h(a-1)z|a>0]++[(')':)<$>h a(z-1)|a<z]++[[""]|a+z<1]) $ 3 -> ["((()))","(()())","(())()","()(())","()()()"].
The Dyck word building algorithm used here expressed in a classic recursive way looks like
dyck a z =                    -- take two numbers, `a` (the number of `(` to use)
                              -- and `z` (the number of `)` to use)
                 [[""]|a+z<1] -- base case if both numbers are 0, the result
                              -- is an empty word
    [('(':)<$>dyck(a-1)z|a>0] -- if there are `(` left, prepend one to every result
                              -- from a recursive call with one `(` less
   [(')':)<$>dyck a(z-1)|a<z] -- same for `)` if there are more than `(`.
id=<<  ...  ++  ...  ++       -- combine those results in to a flat list

As recursion is not allowed, we pass the function to call as a third parameter h (and use a lambda instead of a named function):
\h a z ->   ....  h(a-1)z  ....  h a(z-1)

and let the fixpoint combinator fix create this function for us:
fix(\h a z ...)

finally, the leftmost id=<< duplicates the input parameter: (id=<<) f n is f n n, so when the whole function is called, the parameter n is used as a and z.
For input 15 it takes about 3min within ghci (25s when compiled) and a few MB on my 5 year old laptop.

Sorry for the unnecessary edit, I wanted to add the syntax highlighting tag to understand better what's going on, but it did not seem to work =/

Haskell, 140 132 bytes
Thanks @nimi for saving a few bytes!
import Data.List
h s|m<-length s=nub[k|l<-s!!0,k<-('(':l++")"):[u++v|n<-[0..m-2],u<-s!!n,v<-s!!(m-2-n)]]:s
f n=iterate h[[""]]!!n!!0

First of all: iterate does create a recursion sequecnce of h, but this is a builtin, and by the rules we may use builtins that use recursion.
This is just a very simple recursive approach, we can generate the n-Dyck-words by putting (n-1)-Dyck-words between paranthesis, or by concatenating from shorter Dyck words. This approach however does generate duplicates, that is why we filter for unique elements using nub.
As Haskell is a functional language, it is almost impossible to do this without recursion. There is an even more direct approach, but that one is banned under the current rules.

I was not aware of that, thank you, I updated my answer accordingly.

A few bytes to save: f n=iterate h[[""]]!!n!!0, l<-s!!0, '(':l++")".

@nimi Thank you very much!

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


text:
Write a AZERTY to QWERTY converter
Your task is to create a program will transform each letter of a text typed on a AZERTY keyboard to the equivalent on a QWERTY keyboard, using the same keystrokes.
Example: Hello; Zorld1 => Hello, World!
List of character to convert:

A <=> Q
Z <=> W
, => m
? => M
M => :
1 => !
9 => (
; => ,
§ => ?
0 => )
) => -
ù => '

QWERTY keyboard:

AZERTY keyboard:

Test cases:
Input: This is q text zritten zith q QWERTY keyboqrd:
Output: This is a text written with a AZERTY keyboard.

Input: Hello zorld in PythonM print9ùHello; Zorld1ù0
Output: Hello world in Python: print('Hello, World!')

Input: Zikipediq is q free online enciclopediq
Output: Wikipedia is a free online enciclopedia

Input: Progrq,,ing puwwles qnd code)golf
Output: Programming puzzles and code-golf

Input: Zhy ,y lqyout hqve szitched to QWERTY §
Output: Why my layout have switched to AZERTY ?

This is code golf, so the answer with the shortest byte count win.

Could you please explicitly list which character should be replaced by which?

@flawr Every character, i'll add this

He means an explicit list. Like, A => Q, W => Z, etc.

@TùxCräftîñg Can you please add that list?

How is this a duplicate? This has a fixed substitution set, the other has a variable one!

@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ it would seem that valid answers to that challenge would  work for this one with minor changes then. So I would agree that it is a dupe. HOWEVER, the other challenge has a lot of restrictions that this one does not. One might argue that this challenge is open to entries from more languages which would be in favor of reopening.

@Liam I second this; the other one is harsh! You can vote to reopen this, comments do not vote by themselves!!!

Python 3, 70 132 bytes
My first try in code-golfing, so please be kind :):
print(input().translate(str.maketrans('azqwAZQW&é"\'(-è_çà)^$Mù,?;:!§1234567890','qwazQWAZ1234567890-[]:\'mM,./?!@#$%^&*()')))

Try it online!

; is converted to m, and numbers should also be handled. Oh and put your code in a code element (`code`), not a blockquote ;)

Should be better now :).

you can prolly save with a lambda instead of print/input.

ValueError: the first two maketrans arguments must have equal length

No such error on my local installation. I have just added a 'try it online' link.

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


text:
It's Life, Jim, but not as we know it
You probably know Conway's Game of Life, the famous cellular automaton invented by mathematician John Conway. Life is a set of rules that, together, allow you to simulate a two-dimensional board of cells. The rules decide which cells on the board live and  which ones die. With some imagination, you could say that Life is a zero-player game: a game with the objective to find patterns with interesting behavior, like the famous glider.

A zero-player game... Until today. You are to write a program that plays the Game of Life - and plays it to win, King of the Hill-style. Your opponent (singular) of course tries to do the same. The winner is either the last bot with any live cells, or the player with the most live cells after 10000 generations.
Game rules
The rules are almost the same as normal (B3/S23) Life:

A live cell with fewer than two friendly neighbors dies from starvation.
A live cell with two or three friendly neighbors survives.
A live cell with more than three friendly neighbors dies from overpopulation.
A dead cell with exactly three neighbors of the same player comes alive to fight for that player provided there are no enemy neighbors.

...but after each generation, both you and your opponent get the opportunity to intervene. You can awake up to a maximum of 30 cells to fight for you. (Who goes first is decided by the server.)
The board is a (x,y) cells square. All squares are initially dead. The borders do not wrap around (this is not a torus-shaped world) and are permanently dead.
This is is a contest in the spirit of Battlebots and Core Wars. There is a central server that will run bots and it can be found here
Protocol
The arena server speaks a simple JSON protocol communicated through argv
Where Values is a JSON encoded string

y_size: the maximum y coords of tiles before they vanish
x_size: the maximum x coords of tiles before they vanish
tick_id: the current tick number
board: a dictionary with keys in the form '(y,x)' and values in the form bot_id (int)
bot_id: tiles in the board with this id are yours

Example:
 {"y_size":2000,"x_size":2000,"board":{},"bot_id":1,"tick_id":1}

Telling the server your choice:

Send the server a list of tiles to turn to your colour.
Only those that are empty will be changed
Nested coords list format

[[0,0], [0,1], [100,22]...]

NOTE: Your bot doesn't have to update the tiles at all - the server does the updating itself
Competition rules

If your implementation fails to follow the protocol, the turn it does will be forfeited; The server will assume no change in state
You are not allowed to willfully take advantage of a fault in the arena server.
Have your AI decide on moves in a sane time. Please send your next move as  fast as reasonably possible.
Finally, please be nice to the server. It's there for your enjoyment.
Not following these rules can lead to disqualification.
In the event of a tie, both players have 1 win added to their total

Running the controller yourself
The source for the controller can be found here. There are 2 ways of running the controller:

Competition mode (terminal)

Setup with python3 get_answers.py
Run an all v all competition with each bot pitting it against every other.

Testing mode (GUI)

Run python3 nice_gui.py
Click Pull Answers
If you want to add your own answer to try it before posting, click File -> Add manual answer and find the file and choose the language it's written in.
If your language isn't present ping me and I'll try to get it installed on the server I will run it on (installation and running instructions would be nice too!)
Choose 2 bots to pit against each other
Click Run
Watch the game...

Installation

Requires python3
get_answers requires bs4 and html5lib
controller requires a way of running .sh files (MinGW on windows)

Scoring
The bot with the most wins starting from 12/07/2016 (12th July) 14/07/2016 (14th July, couldn't work out how to run a bot) wins.

Help with the controller/gui can be asked in this chat room

This question has been in development since 2014 and was the most upvoted question in the sandbox. Special Thanks goes to Wander Nauta (original author and concept), PPCG Chat (comments and help) and anyone who commented in the sandbox post (more comments).

Huh, I thought this would never make it out of the sandbox. Great!

Typo: 12/06/2016 (12th July)

so you didn't use my server?

@muddyfish sorry- this seems like tech support, but the gui is blank, and the get_answers does not return anything for me.

Is the bot id garunteed to be a single character?

@RohanJhunjhunwala the bot id will be either 1 or 2

@Magenta Did you press the pull answers button in the gui and click yes? That should fill it with answers

There is a bug where bots timing out (my Ruby bot was timing out a lot) cause crashes in the server code. I've sent a pull request to fix it.

@muddyfish when i pull answers, that works, and the different bots can be selected. However, the rest of the gui is blank.

You need to click run? Try moving the window about if that doesn't work, if stuff starts miraculously appearing I have no idea how to fix it

What is the exact format of the "dictionary" in the board

Is it {'(y1,x1)',id1,'(y2,x2)',id2,(y3,x3),id3} etc...

If my bot tries to activate more than 30 cells what happens?

Are additional cells ignored or do i lose a turn?

+1. You deserve the AED award for bringing this great question out of the sandbox!

@RohanJhunjhunwala the dictionary format can be found in the chat link in the question, additional cells get filtered out. agtoever Thanks!

Sorry I am so needy, but if someone would like to take a look at the "Troll Bot", and run it. I would like to see it tested so I can optimize it. The client arena wont work as I'm on a windows machine and the hardcoded command limit will prevent me from seeing the whole game.  If anyone would let me know if it worked for them. That would be great!

@RohanJhunjhunwala why won't it work on windows?

@EᴀsᴛᴇʀʟʏIʀᴋ Windows commandline commands have a hardcoded limit of 8191 (to my knowledge, there might be a shell that beats the limit). The input to these programs is a command line argument, and considering the 1000x1000 board the input passed in (which is formatted to list every single active cell) can easily fly past that limit

@KevinLau-notKenny oh, okay. Can you run a command in a file?

If I try to activate a cell thats already activated is that ignored?

Rohan, yes. It still counts as one of the 30 though

@muddyfish if you are having trouble running all the bots together you could probably get a cloud9 partition and run it from there? I'm just sad that my bot is the only one that uses a strategy based on the opponent's board state instead of dropping things wherever

The problem's been fixed, just testing now.

It's a real shame that there weren't too many bots for this one... I feel like the Windows problem was a big issue, but there's nothing that can be done about that now

@muddyfish You should select mark the winning bot as accepted and post the scores if the competition is indeed over as of July 14th.

I'm not accepting yet because I'm waiting on trollbot. I still can't run it

@muddyfish When are the scores going to be up?

@Magenta When I get them (I'd completely forgotten about this even though it's been in a constantly open tab), I'm running it now

Python 3, Exploder
Puts small exploders around the place, with no regard to whether there is already a block there.
from random import randint
import sys,json,copy
q=json.loads(sys.argv[1])
x=q["x_size"];y=q["y_size"];F=[[0,1],[1,0],[1,1],[1,2],[2,0],[2,2]];D=[]
for g in [0]*5:
 X=randint(0,x);Y=randint(0,y);A=copy.deepcopy(F)
 for C in A:C[0]+=Y;C[1]+=X
 D+=A
print(D)

I can't believe that after all my work setting up block-making switches for indefinite growth and a system specifically built to demolish growth structures, a simple exploder-based system bested mine in combat :o

I don't know how it does either, because I can't run the controller for whatever reason.

Ruby, InterruptingBlockMaker
Instead of initializing gliders like the TrainingBot, it tries to create a 5x5 block-making switch machine as mentioned on Wikipedia at a random point in the maze. Then, with its remaining activations, it just finds enemy points and tries to pepper the nearby area with your cells in an attempt to interrupt them from growing and possibly messing up their patterns. Your cells will die in the next generation, but maybe they also stopped some growth to slow down your opponent!
v2: Optimized slightly (?) to try to minimize timeouts.
v3: Optimized interruption code to pre-sample a subset of active blocks before rejecting our own cell locations, to prevent timeouts further at the cost of some effectiveness in the interrupt cell attacks.
require 'json'

class Range
  def product range2
    self.to_a.product range2.to_a
  end
end

args = JSON.parse(ARGV[0])
bot_id = args["bot_id"]
width  = args["x_size"]
height = args["y_size"]
board  = args["board"]

generator = [[2,2], [2,3], [2,6], [3,2], [3,5], [4,2], [4,5], [4,6], [5,4], [6,2], [6,4], [6,5], [6,6]]

targets = []

iterations = 50
gen_location = nil
while !gen_location && iterations > 0
  y = rand height - 9
  x = rand width  - 9
  temp = (0...9).product(0...9).map{|_y, _x| [y + _y, x + _x]}
  if temp.all?{|_y,_x| !board["(#{y},#{x})"]}
    gen_location = temp
    targets += generator.map{|_y, _x| [y + _y, x + _x]}
  end

  iterations -= 1
end

enemies = board.keys.sample(100).reject {|k| board[k] == bot_id}
interrupts = []
enemies.each do |location|
  y, x = location.scan(/\d+/).map &:to_i
  interrupts |= ((y-1)..(y+1)).product((x-1)..(x+1)).reject{|y, x| gen_location.include?([y,x]) || board["(#{y},#{x})"]}
end

targets += interrupts.sample(30 - targets.size)

puts JSON.dump(targets)

@muddyfish thanks, that fixed it! Now the only issue is that Windows command line commands have a hardcoded limit of 8191, which means that at a certain point in the simulation the bots will crash from being unable to parse the truncated JSON string. It's an OS issue, so I guess I have have to look into a Linux cloud box or something in order to test my bot~

@muddyfish I already mentioned that Windows has problems because of the command line limit, that last error was on Cloud9 which is ostensibly a Linux box. How does my bot fare on your Linux box (since you implied that you had one)?

Turns out I hadn't committed it but the numbers in bot_score show how many wins each bot has against other bots

All right, thanks! Unfortunately, Cloud9 indeed does not have a GUI and Windows still can't run the simulation without breaking its command limit eventually, but at least I got a brief look into how the bots fare against each other. Also, I get to see my bot fight against itself to the end some times because they keep attacking each other and preventing enough growth to break the character limit, although it does time out occasionally...

Python 2, TrainingBot
Because everyone needs one of these!
import random, copy
import sys, json

args = json.loads(sys.argv[1])
bot_id = args["bot_id"]
x_size = args["x_size"]
y_size = args["y_size"]
cur_tick = args["tick_id"]
board = args["board"]

glider = [[1,2],[2,1],[0,0],[0,1],[0,2]]

x_add = random.randrange(x_size)
y_add = random.randrange(y_size)
new_glider = copy.deepcopy(glider)
for coord in new_glider:
    coord[0]+=y_add
    coord[1]+=x_add
move = new_glider
print json.dumps(move)

Java, Troll Bot
Troll Bot has thought about it, and he realizes he does NOT care about the enemy. In fact he just spams these factories to produce more of his guys randomly all over the map. After a while he realized that any additional cells are best used in clumps. These blocks of four cells will stick together and stop gliders in their tracks! He does not think he just fights. Also he is a big supporter of verbose object oriented programming. The troll also assumes that coords are in the format y,x, and he is asking to be tested. Just put him in a file called "TrollBot.java", and he'll be set!
package trollbot;

/**
 *
 * @author Rohans
 */
public class TrollBot{
public static class coord{
    public int x;
    public int y;
    public coord(int inX,int inY){
        x = inX;
        y = inY;
    }
    @Override
    public String toString(){
        return"["+x+","+y+"]";
    }
}
    /**
     * Input the JSON as the first cla
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       String JSON="{\"bot_id\":1,\"y_size\":1000,\"x_size\":1000,\"board\":{}}";
    String[] JArray=args[0].split(",");
       int botId=Integer.parseInt(JSON.charAt(10)+"");
    int xSize=Integer.parseInt(JArray[2].substring(JArray[2].indexOf(":")+1));
    int ySize=Integer.parseInt(JArray[1].substring(JArray[1].indexOf(":")+1));
    int[][] board = new int[xSize][ySize];//0 indexed
//todo: parse the board to get an idea of state
    String soldiers="[";
//for now just ignore whats on the board and put some troll cells on
    //Attempts to create 3 10 cells factories of cells, hoping it does not place it on top of allies
    //Then puts random 2/2 blocks
  boolean[][] blockspam=new boolean[10][8];
  blockspam[7][1]=true;
  blockspam[5][2]=true;
  blockspam[7][2]=true;
  blockspam[8][2]=true;
  blockspam[5][3]=true;
  blockspam[7][3]=true;
  blockspam[5][4]=true;
  blockspam[3][5]=true;
  blockspam[1][6]=true;
  blockspam[3][6]=true;
  for(int z=0;z<3;z++){
     int xOffSet=(int) (Math.random()*(xSize-11));
     int yOffSet=(int) (Math.random()*(ySize-9));
     //stay away from edges to avoid odd interactions
     for(int i=0;i<blockspam.length;i++){
         for(int j=0;j<blockspam[i].length;j++){
             if(blockspam[i][j])
             soldiers+=new coord(j+yOffSet,i+xOffSet).toString()+",";
         }
     }
  }
  soldiers=soldiers.substring(0,soldiers.length()-1);
  for(int i=0;i<8;i++){
            int y=(int ) (Math.random()*(ySize-1));
            int x = (int) (Math.random()*(xSize-1));
      soldiers+=new coord(y,x).toString()+",";
                          soldiers+=new coord(y+1,x).toString()+",";
                          soldiers+=new coord(y,x+1).toString()+",";
                          soldiers+=new coord(y+1,x).toString()+",";

  }
  soldiers+="\b]";

  System.out.println(soldiers);
  //GO GO GO! Lets rule the board
    }

}

Python, GuyWithAGun
He's a guy, he's got a gun; he's mad. He just dumps glider guns everywhere with no regard to what anyone else is doing
import random, copy
import sys, json

args = json.loads(sys.argv[1])
bot_id = args["bot_id"]
x_size = args["x_size"]
y_size = args["y_size"]
tick_id = args["tick_id"]
board = args["board"]

start_squares = [[0,5],[2,5],[1,6],[2,6],
                 [35,3],[36,3],[35,4],[36,4]]
gun = [[11,5],[11,6],[11,7],
       [12,4],[12,8],
       [13,3],[13,9],
       [14,3],[14,9],
       [15,6],
       [16,4],[16,8],
       [17,5],[17,6],[17,7],
       [18,6],
       [21,3],[21,4],[21,5],
       [22,3],[22,4],[22,5],
       [23,2],[23,6],
       [25,1],[25,2],[25,6],[25,7]]

templates = [start_squares, gun]

def add_squares(pos, coords):
    new_squares = copy.deepcopy(coords)
    for coord in new_squares:
        coord[0]+=pos[0]
        coord[1]+=pos[1]
    return new_squares

def get_latest_pos():
    seed, template_id = divmod(tick_id, 2)
    random.seed(seed)
    cur_pos = [random.randrange(y_size),
               random.randrange(x_size)]
    cur_template = templates[template_id]
    try:
        return add_squares(cur_pos, cur_template)
    except IndexError:
        return []

move = get_latest_pos()

print json.dumps(move)

Python 3, RandomBot
This bot has trouble making intelligent decisions, but it at least knows not to try to place things on top of other things.  It'll randomly create gliders, boats, C/2 Orthagonals, and 2x2 blocks with various orientations, ensuring that when they're placed they're not overlapping with something else, ally or enemy.
This bot wasn't tested, seeing as I'm receiving all sorts of errors when I try to run the GUI.  Also, I used the TrainingBot as the base and just edit, so any similarities in code is probably because of that.
import random, copy
import sys, json
args = json.loads(sys.argv[1])
bot_id = args["bot_id"]
x_size = args["x_size"]
y_size = args["y_size"]
board = args["board"]
occupied = [tuple(key) for key,value in iter(board.items())]
cellsleft=30
move=[]
choices = [[[1,2],[2,1],[0,0],[0,1],[0,2]],
           [[0,0],[0,1],[1,1],[1,0]],
           [[0,1],[1,0],[0,2],[0,3],[1,3],[2,3],[3,3],[4,3],[5,2],[5,0]],
           [[0,0],[1,0],[0,1],[2,1],[2,2]]]
while cellsleft>0:
    x_add = random.randrange(x_size)
    y_add = random.randrange(y_size)
    new_glider = copy.deepcopy(random.choice(choices))
    randomdirection = random.choice([[1,1],[1,-1],[-1,1],[-1,-1]])
    maxy=max([y[0] for y in new_glider])
    maxx=max([x[1] for x in new_glider])
    for coord in new_glider:
        coord[0]=coord[0]*randomdirection[0]+y_add
        coord[1]=coord[1]*randomdirection[1]+x_add
        cellsleft-=1
    set([tuple(x) for x in new_glider])
    if not set([tuple(x) for x in new_glider]) & (set(occupied)|set([tuple(x) for x in move])) and cellsleft>0:
        if min(y[0] for y in new_glider)<0: new_glider = [[y[0]+maxy,y[1]] for y in new_glider]
        if min(y[1] for y in new_glider)<0: new_glider = [[y[0],y[1]+maxx] for y in new_glider]
        move += new_glider
    elif set([tuple(x) for x in new_glider]) & (set(occupied)|set([tuple(x) for x in move])):
        cellsleft+=len(new_glider)

print(json.dumps(move))

The GUI is most likely failing because of your print(sys.argv[1]) on line 3, which messes up the output (the simulator expects only the string of coordinates you want to wake up). Also, the last line of your program is missing a closing paren.

@KevinLau-notKenny  The GUI was failing on the training bot and the Ruby bot as well.  I removed that line, though, and added back in the closing paren (I think that latter one was a copy-paste error).

What operating system are you on, and what errors appear in the command line when you run it? Currently it's a known bug that Windows cannot properly run the sim because of arguments passed through command line being truncated when they exceed the command line character limit of around 8000.

@KevinLau-notKenny I'm using Windows 10, and I've gotten... well, a lot of errors.  The first thing was BeautifulSoup not wanting to find html5lib, then not finding the folder containing all the bots (I had to change the code for both of these), and since then the running of either Python bot has resulted in a non-0 return code 1.

Windows still can't run the code if there are too many active cells on the screen... But as for your other errors, it might be because TrainingBot wants Python 2?

@KevinLau-notKenny Might be it.  I'll try it with your bot and see if that helps things at all.

Let us continue this discussion in chat.

Python 3, SquareBot
Puts squares everywhere- maybe
Squares are static objects in Life- they do not move. So if I place enough inert objects around the place, the gliders and explosions that others create will possibly be blocked, or at least dampened.
-Adapted from TrainingBot
from random import randint
import sys,json,copy
args=json.loads(sys.argv[1])
x=args["x_size"];y=args["y_size"]
square=[[0,0],[0,1],[1,0],[1,1]];D=[]
for g in range(7):
 X=randint(0,x);Y=randint(0,y)
 A=copy.deepcopy(square)
 for C in A:C[0]+=Y;C[1]+=X
 D+=A
print(D)

Although I am having trouble testing it

You might be able to get some help from this chat discussion on the RandomBot.

I can confirm that this bot does in fact do what it's meant to - and it helped me find and fix a bug in the controller


text:
Golf bit weaving
Note: the first half of this challenge comes from Martin Ender's previous challenge, Visualize Bit Weaving.
The esoteric programming language evil has an interesting operation on byte values which it calls "weaving".
It is essentially a permutation of the eight bits of the byte (it doesn't matter which end we start counting from, as the pattern is symmetric):

Bit 0 is moved to bit 2
Bit 1 is moved to bit 0
Bit 2 is moved to bit 4
Bit 3 is moved to bit 1
Bit 4 is moved to bit 6
Bit 5 is moved to bit 3
Bit 6 is moved to bit 7
Bit 7 is moved to bit 5

For convenience, here are three other representations of the permutation. As a cycle:
(02467531)

As a mapping:
57361402 -> 76543210 -> 64725031

And as a list of pairs of the mapping:
[[0,2], [1,0], [2,4], [3,1], [4,6], [5,3], [6,7], [7,5]]

After 8 weavings, the byte is essentially reset.
For example, weaving the number 10011101 (which is 157 in base 10) will produce 01110110 (which is 118 in base 10).
Input
There are only 256 valid inputs, namely all the integers between 0 and 255 inclusive. That may be taken in any base, but it must be consistent and you must specify it if the base you choose is not base ten.
You may not zero-pad your inputs.
Output
You should output the result of the bit weaving, in any base, which must also be consistent and specified if not base ten.
You may zero-pad your outputs.

Related: Visualize Bit Weaving

Fun fact: this is the challenge I wanted to post originally. Then I drew up the ASCII art to visualise the permutation, and then Sp3000 suggested that rendering that would make a better challenge. ;)

Can output base be different from input base? When you say "consistent" I understand that as "every possible input in the same base"

I think that the representation as a cycle would be more useful than the mapping representation.

I have to say the ASCII art is definitely more fun.

This could really use some more test cases.

Would taking input as a singleton list (i.e. [1] in Python instead of 1) be acceptable?

@Mego I don't like trick questions but yes.

@LuisMendo Yes, and yes.

Where it says, "You may not zero-pad your inputs," that means 00000001 is invalid (should be 1), correct?

@SirBidenXVII Correct.

Python 2.7, 44 -> 36 bytes
lambda x:x/4&42|x*2&128|x*4&84|x/2&1

Great first answer, welcome to PPCG! :)

If you use | instead of + and mask after shifting then you can shave 8 bytes by removing parentheses.

Since you're new, I'll point out that you can take @PellMell's suggestion to improve your golf and then use <strike></strike> around your old byte score to indicate the progress :-)

Crossed out 44 is still regular 44. :(

Evil, 3 characters
rew

Try it online!
Input is in base 256, (e.g. ASCII), e.g. to enter the digit 63, enter ASCII 63 which is ?.
Explanation:
r          #Read a character
 e         #Weave it
  w        #Display it

This so feels like cheating.

ASCII isn't base 256, it's base 128. What encoding is used for ordinals 128-255? Edit: It looks like it just uses the system encoding.

CJam, 15 12 bytes
Thanks to FryAmTheEggman for saving 3 bytes.
l8Te[m!6532=

Input in base 2. Output also in base 2, padded to 8 bits with zeros.
Test it here.
Explanation
l      e# Read the input.
8Te[   e# Left-pad it to 8 elements with zeros.
m!     e# Generate all permutations (with duplicates, i.e. treating equal elements
       e# in different positions distinctly).
6532=  e# Select the 6533rd, which happens to permute the elements like [1 3 0 5 2 7 4 6].

MATL, 14 bytes
&8B[2K1B3D5C])

Input is in decimal. Output is zero-padded binary.
Try it online!
Explanation
&8B         % Take input number implicitly. Convert to binary array with 8 digits
[2K1B3D5C]  % Push array [2 4 1 6 3 8 5 7]
)           % Index first array with second array. Implicitly display

Jelly, 11 bytes
+⁹BḊŒ!6533ị

Translation of Martin’s CJam answer. Try it here.
+⁹BḊ          Translate (x+256) to binary and chop off the MSB.
              This essentially zero-pads the list to 8 bits.
    Œ!        Generate all permutations of this list.
      6533ị   Index the 6533rd one.

I like the zero padding trick.  Elegant.

JavaScript (ES6), 30 bytes
f=n=>n*4&84|n*2&128|n/2&1|n/4&42

Nice abuse of precedence!

Surely precedence was designed to work this way! It would even work with the bit shifts, but they're longer.

x86 machine code, 20 bytes
In hex:
89C22455C1E002D0E0D1E880E2AAC0EA0211D0C3

It's a procedure taking input and returning result via AL register
Disassembly
89 c2                   mov    edx,eax
24 55                   and    al,0x55  ;Clear odd bits
c1 e0 02                shl    eax,0x2  ;Shift left, bit 6 goes to AH...
d0 e0                   shl    al,1     ;...and doesn't affected by this shift
d1 e8                   shr    eax,1    ;Shift bits to their's target positions
80 e2 aa                and    dl,0xaa  ;Clear even bits
c0 ea 02                shr    dl,0x2   ;Shift right, bit 1 goes to CF
11 d0                   adc    eax,edx  ;EAX=EAX+EDX+CF
c3                      ret

C (unsafe macro), 39 bytes
#define w(v)v*4&84|v*2&128|v/2&1|v/4&42

C (function), 41 bytes
w(v){return v*4&84|v*2&128|v/2&1|v/4&42;}

C (full program), 59 bytes
main(v){scanf("%d",&v);return v*4&84|v*2&128|v/2&1|v/4&42;}

(returns via exit code, so invoke with echo "157" | ./weave;echo $?)
C (standards-compliant full program), 86 bytes
#include<stdio.h>
int main(){int v;scanf("%d",&v);return v*4&84|v*2&128|v/2&1|v/4&42;}

C (standards-compliant full program with no compiler warnings), 95 bytes
#include<stdio.h>
int main(){int v;scanf("%d",&v);return (v*4&84)|(v*2&128)|(v/2&1)|(v/4&42);}

C (standards-compliant full program with no compiler warnings which can read from arguments or stdin and includes error/range checking), 262 bytes
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
int main(int v,char**p){v=v<2?isatty(0)&&puts("Value?"),scanf("%d",&v)?v:-1:strtol(p[1],p,10);exit(*p==p[1]||v&255^v?fprintf(stderr,"Invalid value\n"):!printf("%d\n",(v*4&84)|(v*2&128)|(v/2&1)|(v/4&42)));}

Breakdown
Pretty much the same as a lot of existing answers: bit-shift all the bits into place by using <<2 (*4), <<1 (*2), >>1 (/2) and >>2 (/4), then | it all together.
The rest is nothing but different flavours of boiler-plate.

J, 12 bytes
6532 A._8&{.

Uses the permute builtin A. with permutation index 6532 which corresponds to the bit-weaving operation.
Usage
Input is a list of binary digits. Output is a zero-padded list of 8 binary digits.
   f =: 6532 A._8&{.
   f 1 0 0 1 1 1 0 1
0 1 1 1 0 1 1 0
   f 1 1 1 0 1 1 0
1 1 0 1 1 0 0 1

Explanation
6532 A._8&{.  Input: s
       _8&{.  Takes the list 8 values from the list, filling with zeros at the front
              if the length(s) is less than 8
6532          The permutation index for bit-weaving
     A.       permute the list of digits by that index and return

Retina, 39 bytes
+`^(?!.{8})
0
(.)(.)
$2$1
\B(.)(.)
$2$1

Input and output in base 2, output is left-padded.
Try it online!
Explanation
+`^(?!.{8})
0

This just left-pads the input with zeros. The + indicates that this stage is repeated until the string stops changing. It matches the beginning of the string as long as there are less than 8 characters in it, and inserts a 0 in that position.
Now for the actual permutation. The straight-forward solution is this:
(.)(.)(.)(.)(.)(.)(.)(.)
$2$4$1$6$3$8$5$7

However that's painfully long and redundant. I found a different formulation of the permutation that is much easier to implement in Retina (X represents a swap of adjacent bits):
1 2 3 4 5 6 7 8
 X   X   X   X
2 1 4 3 6 5 8 7
   X   X   X
2 4 1 6 3 8 5 7

Now that's much easier to implement:
(.)(.)
$2$1

This simply matches two characters and swaps them. Since matches don't overlap, this swaps all four pairs.
\B(.)(.)
$2$1

Now we want to do the same thing again, but we want to skip the first character. The easiest way to do so is to require that the match doesn't start at a word boundary with \B.

Mathematica, 34 bytes
PadLeft[#,8][[{2,4,1,6,3,8,5,7}]]&

Anonymous function. Takes a list of binary digits, and outputs a padded list of 8 binary digits.

Matlab, 49 48 44 bytes
s=sprintf('%08s',input(''));s('24163857'-48)

Takes input as string of binary values. Output padded.
4 bytes saved thanks to @Luis Mendo.
Explanation:
input('')             -- takes input
s=sprintf('%08s',...) -- pads with zeros to obtain 8 digits
s('24163857'-48)      -- takes positions [2 4 1 6 3 8 5 7] from s (48 is code for '0')

05AB1E, 14 12 bytes
žz+b¦œ6532èJ

Explanation
žz+b¦           # convert to binary padded with 0's to 8 digits
     œ6532è     # get the 6532th permutation of the binary number
           J    # join and implicitly print

Input is in base 10.
Output is in base 2.
Borrows the permutation trick from MartinEnder's CJam answer
Try it online

PowerShell v2+, 34 bytes
("{0:D8}"-f$args)[1,3,0,5,2,7,4,6]

Translation of @LegionMammal978's answer. Full program. Takes input via command-line argument as a binary number, outputs as a binary array, zero-padded.
The "{0:D8}"-f portion uses standard numeric format strings to prepend 0 to the input $args. Since the -f operator supports taking an array as input, and we've explicitly said to use the first element {0:, we don't need to do the usual $args[0]. We encapsulate that string in parens, then index into it [1,3,0,5,2,7,4,6] with the weaving. The resultant array is left on the pipeline and output is implicit.
Examples
(the default .ToString() for an array has the separator as `n, so that's why the output is newline separated here)
PS C:\Tools\Scripts\golfing> .\golf-bit-weaving.ps1 10011101
0
1
1
1
0
1
1
0

PS C:\Tools\Scripts\golfing> .\golf-bit-weaving.ps1 1111
0
0
0
1
0
1
1
1

V, 17 bytes
8é0$7hd|òxplò2|@q

Try it online!
This takes input and output in binary. Most of the byte count comes from padding it with 0's. If padding the input was allowed, we could just do:
òxplò2|@q

Thanks to Martin's solution for the method of swapping characters, e.g:
1 2 3 4 5 6 7 8
 X   X   X   X
2 1 4 3 6 5 8 7
   X   X   X
2 4 1 6 3 8 5 7

Explanation:
8é0                 "Insert 8 '0' characters
   $                "Move to the end of the current line
    7h              "Move 7 characters back
      d|            "Delete until the first character
        ò   ò       "Recursively:
         xp         "Swap 2 characters
           l        "And move to the right
             2|     "Move to the second column
               @q   "And repeat our last recursive command.

Labyrinth, 27 26 bytes
_1@
&,)}}}=}}=}}=}!{!!{{!"

Input and output in base 2. Output is padded.
Try it online!

Pyth, 19 characters
s[@z1.it%2tzP%2z@z6

Input and output are base 2.
Far from a Pyth expert, but since no one else has answered with it yet I gave it a shot.
Explanation:
s[                # combine the 3 parts to a collection and then join them
  @z1             # bit 1 goes to bit 0
  .i              # interleave the next two collections
    t%2tz         # bits 3,5,7; t is used before z to offset the index by 1
    P%2z          # bits 0,2,4
  @z6             # bit 6 goes to bit 7

This is invalid as this assumed a zero-padded input.

vi, 27 bytes
8I0<ESC>$7hc0lxp<ESC>l"qd0xp3@q03@q

Where <ESC> represents the Escape character. I/O is in binary, output is padded. 24 bytes in vim:
8I0<ESC>$7hd0xpqqlxpq2@q03@q

<ESC> needs backticks around it. I'd edit, but I can't figure out 4 more bytes to change...

@SirBidenXVII Thanks, fixed.

UGL, 50 bytes
cuuRir/r/r/r/r/r/r/%@@%@@%@@%@@@%@@%@@%@@@oooooooo

Try it online!
Repeatedly div-mod by 2, and then % swap and @ roll to get them in the right order.
Input in base-ten, output in base-two.

Actually, 27 bytes
'08*+7~@tñiWi┐W13052746k♂└Σ

Try it online!
This program does input and output as a binary string (output is zero-padded to 8 bits).
Explanation:
'08*+7~@tñiWi┐W13052746k♂└Σ
'08*+                        prepend 8 zeroes
     7~@t                    last 8 characters (a[:~7])
         ñi                  enumerate, flatten
           Wi┐W              for each (i, v) pair: push v to register i
               13052746k     push [1,3,0,5,2,7,4,6] (the permutation order, zero-indexed)
                        ♂└   for each value: push the value in that register
                          Σ  concatenate the strings

JavaScript, 98 Bytes
Input is taken in base-2 as a string, output is also base-2 as a string
n=>(n.length<8?n="0".repeat(8-n.length)+n:0,a="13052746",t=n,n.split``.map((e,i)=>t[a[i]]).join``)

Japt, 11 bytes
I/O as binary strings
ùT8 á g6532

Try it - header & footer convert from and to decimal.