[Question]
      [
A [man from the stars](https://codegolf.stackexchange.com/users/12914/elendia-starman) has come to Earth! Luckily the president of the United States, Donald Trump, has an infinity-sided die. Using this die, he can conjure up a number which *you*, the mayor of [Podunk](http://earthbound.wikia.com/wiki/Podunk), must use to determine who should be sent to stop the invader! But be careful, you can only send a limited amount of bytes on the back of your [frog](http://earthbound.wikia.com/wiki/Save_Frog)!
Given a user input (which will be a positive integer), you must return a string depending on what category the number is in.
* If the number is a [**Fibonacci number**](https://en.wikipedia.org/wiki/Fibonacci_number), you must output [***Ness***](http://earthbound.wikia.com/wiki/Ness).
* If the number is a [**Lucas number**](https://en.wikipedia.org/wiki/Lucas_number), you must output [***Lucas***](http://earthbound.wikia.com/wiki/Lucas).
* If the number is *both* a **Lucas number** and a **Fibonacci number**, you must output [***Travis***](http://www.mother4game.com/).
* If the number is *neither* a a **Lucas number** nor a **Fibonacci number**, you must output [***Pippi***](http://earthbound.wikia.com/wiki/Pippi).
## Examples
Here are a bunch of test cases:
```
1 => Travis
2 => Travis
3 => Travis
4 => Lucas
5 => Ness
6 => Pippi
7 => Lucas
8 => Ness
610 => Ness
722 => Pippi
843 => Lucas
```
## Rules
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), the shortest answer in bytes wins.
* You program may be a full program or a(n anonymous) function.
## Bonuses
There are a couple bonuses that you can use to help your frog get the data to President Trump faster:
* **For `-15` bytes:** If the input number is `2016`, you must output `Trump`, as he is at the peak of his presidency.

[Answer]
# Julia, ~~146~~ ~~142~~ ~~121~~ 120 bytes
```
n->split("Pippi Lucas Ness Travis")[2any(isinteger,sqrt([5n^2+4,5n^2-4]))+(n∈[2;[(g=golden)^i+(-g)^-i for i=1:n]])+1]
```
This creates an unnamed function that returns a boolean. To call it, give it a name, e.g. `f=n->...`.
Ungolfed:
```
function trump(n::Integer)
    # Determine if n is a Fibonacci number by checking whether
    # 5n^2 ± 4 is a perfect square
    F = any(isinteger, sqrt([5n^2 + 4, 5n^2 - 4]))
    # Determine if n is a Lucas number by generating Lucas
    # numbers and testing for membership
    # golden is a built-in constant containing the golden ratio
    L = n ∈ [2; [golden^i + (-golden)^-i for i = 1:n]]
    # Select the appropriate Earthbound charater using array
    # indexing on a string split into an array on spaces
    return split("Pippi Lucas Ness Travis")[2F+L+1]
end
```
Fixed an issue and saved 7 bytes thanks to Glen O!
[Answer]
# Mathematica ~~143~~ 156 - 15 (bonus) = 141 bytes
With 2 bytes saved thanks to LegionMammal978.
```
t_~g~l_:=(r=1<0;n=1;While[(z=l@n)<=t,If[z==t,r=1>0];n++];r);a=g[k=Input[],LucasL];
b=k~g~Fibonacci;Which[k==2016,Trump,a&&b,Travis,a,Lucas,b,Ness,2<3,Pippi]
```
[Answer]
# Mathematica, ~~92~~ 87 bytes
Inspired by [Sp3000's answer](https://codegolf.stackexchange.com/a/64484/9288).
```
Travis[Ness,Lucas,Pippi][[{2,1}.Product[Abs@Sign[{Fibonacci@n,LucasL@n}-#],{n,0,2#}]]]&
```
[Answer]
# Pyth, 59 - 15 = 44 bytes
*or 42 bytes after a bug was fixed*
```
&Qr@c."av�a�(s��kW�С��"\b?q2016Q4/hMst*2.uL,eNsNQ_BS2Q4
```
Hexdump:
```
0000000: 2651 7240 632e 2261 7601 c061 15dc 2873  &Qr@c."av..a..(s
0000010: fde0 6b57 8bd0 a1ed ed0f 225c 623f 7132  ..kW......"\b?q2
0000020: 3031 3651 342f 684d 7374 2a32 2e75 4c2c  016Q4/hMst*2.uL,
0000030: 654e 734e 515f 4253 3251 34              eNsNQ_BS2Q4
```
The first two characters (`&Q`) are necessary because of a Pyth parsing bug that makes `Q` after `."` fail. Fix has been applied. If the post-bugfix interpreter is allowed, -2 bytes.
---
Without unreadable string compression:
# Pyth, 63 - 15 = 48 bytes
*49 bytes without Trump*
```
@c"Pippi Ness Lucas Travis Trump")?nQ2016/hMst*2.uL,eNsNQ_BS2Q4
```
[Test Suite](https://pyth.herokuapp.com/?code=%40c%22Pippi+Ness+Lucas+Travis+Trump%22%29%3FnQ2016%2FhMst%2a2.uL%2CeNsNQ_BS2Q4&input=843&test_suite=1&test_suite_input=1%0A2%0A3%0A4%0A5%0A6%0A7%0A8%0A610%0A722%0A843%0A2016&debug=0)
Pretty straightforward, just generate the sequences, duplicate one and check for membership.
Sequences are generated by starting with `[1, 2]` and `[2, 1]`, and then applying the fibonacci rule.
[Answer]
## Python 2, 107
```
f=lambda i,n=input():abs(5*n*n+i)**.5%1>0
print["Travis","Lucas","Ness","Pippi"][f(4)*f(-4)+2*f(20)*f(-20)]
```
The key is two purely arithmetical checks for Fibonacci and Lucas numbers:
* `n` is a Fibonacci number exactly if `5*n*n+4` or `5*n*n-4` is a perfect square
* `n` is a Lucas number exactly if `5*n*n+20` or `5*n*n-20` is a perfect square
[This site has proof sketches](https://web.archive.org/web/20170303035519/http://hubpages.com/education/How-to-Tell-if-a-Number-is-a-Fibonacci-Number).
So, the output depends on the values of `5*n*n+i` for `i` in `{4,-4,20,-20}`. The function `f` tests a value of `i`, by checking if the corresponding value *does not* have a whole-number square root The `abs` is there just to avoid an error of taking the root of a negative for `n=1, i=-20`.
The function `f` takes the value of the number `n` to test from STDIN. Python only evaluates this once, not once per function call.
Whether the number is not Fibonacci is evaluated as `f(4)*f(-4)` using the implicit boolean to number conversion and similarly for not Lucas, and the corresponding string is taken. If trailing spaces were allowed, string interleaving would be shorter.
[Answer]
## Python 2, 117 bytes
```
F=[1]
L=[2,1]
n=input()
exec 2*n*"F,L=L+[sum(L[-2:])],F;"
print["Pippi","Lucas","Ness","Travis"][(n in F)*2+(n in L)]
```
For the string list, `"Pippi Lucas Ness Travis".split()` is the same length.
[Answer]
## CJam, ~~58~~ ~~55~~ 54 bytes
```
ri5Zbe!f{1${_-2>:++}*&!}2b"Travis Ness Lucas Pippi"S/=
```
Naïve approach of generating the Fibonacci and Lucas numbers then counting occurences in both, converting to binary, and picking the appropriate string.
[Try it online](http://cjam.aditsu.net/#code=ri5Zbe!f%7B1%24%7B_-2%3E%3A%2B%2B%7D*%26!%7D2b%22Travis%20Ness%20Lucas%20Pippi%22S%2F%3D&input=843).
[Answer]
## Perl, ~~133~~ ~~(146-15=)131~~ ~~(144-15=)129~~ (136-15=)121 bytes
+1 byte for the `-n` flag.
```
$a=$d=1;$b=$c=2;$f+=$_==$a,$l+=$_==$c,($a,$b,$c,$d)=($b,$a+$b,$d,$c+$d)while$a<$_*9;say$_-2016?(Pippi,Ness,Lucas,Travis)[$f+$l*2]:Trump
```
With newlines after semicolons, for readability:
```
$a=$d=1;$b=$c=2;
$f+=$_==$a,$l+=$_==$c,($a,$b,$c,$d)=($b,$a+$b,$d,$c+$d)while$a<$_*9;
say$_-2016?(Pippi,Ness,Lucas,Travis)[$f+$l*2]:Trump
```
Demo:
```
llama@llama:...code/perl/ppcg64476trump$ for x in 1 2 3 4 5 6 7 8 610 722 843 2016; do echo -n "$x => "; echo $x | perl -n trump.pl; done
1 => Travis
2 => Travis
3 => Travis
4 => Lucas
5 => Ness
6 => Pippi
7 => Lucas
8 => Ness
610 => Ness
722 => Pippi
843 => Lucas
2016 => Trump
```
Tricks:
* ~~You might be wondering why my variables are named `$a`, `$b`, `$%`, and `$d`. That is an excellent question! In fact, it allows me to save a byte.~~
```
(stuff) ... ,$l+=$_==$%while$a<$_
```
is one byte shorter than
```
(stuff) ... ,$l+=$_==$c while $a<$_
```
 This no longer applies because I golfed my code by rearranging things, causing the variable name change to no longer save bytes. I changed it back so that variable names make sense again.
* ~~`$_-2?$f+$l*2:3` is mildly interesting. Basically, I had to special-case `2` for Lucas numbers because my program checks whether a number is a Lucas number *after* "updating" the Fibonacci and Lucas numbers. So `2` was considered a not-Lucas number. `$_-2?foo:bar` is a char shorter than `$_==2?bar:foo`. Same thing is used for the `2016` test.~~
This is also no longer true because I was able to restructure the program to not require special-casing `2`. But I still use `$_-2016?stuff:Trump` instead of `$_==2016?Trump:stuff`, which is one byte longer.
* Speaking of which, you may be wondering how I did this restructuring. I just made the program do 9 times more iterations than necessary, which only costs 2 bytes (`*9`) but allows me to make assumptions elsewhere that help golf stuff down.
* Because variables default to zero,
```
$f+=$_==$a
```
is shorter than
```
$f=1if$_==$a
```
* Perl supports barewords, so I don't have to quote any of my strings (\o/).
[Answer]
# Seriously, 69 bytes
```
,;;r`;F@2+F+`M2@q@#"%d="%£MΣ@f0≤2*+["Pippi","Lucas","Ness","Travis"]E
```
Before this challenge, Seriously had the builtin `f` (index in Fibonacci numbers, -1 if not a Fibonacci number)... but not index in a list or "is in list"! (It's since been added as `í`.)
As a result, this is what I spend finding if the input is a Fibonacci number:
```
,                              f0≤
```
This is what I spend generating a list of Lucas numbers:
```
  ;r`;F@2+F+`M2@q
```
And this is what I spend finding if the input is in the list of Lucas numbers:
```
 ;                @#":%d:="%£MΣ
```
That's a string being formatted using Python's % notation into something like `:610:=`, and converted to a function, which is then mapped over the array and summed. (The Lucas numbers are unique, so the sum is always 0 or 1.)
Thanks to @Mego for that last bit with the string formatting.
[Answer]
# Julia, ~~101~~ 100 bytes
```
n->split("Pippi Lucas Ness Travis")[[2;1]⋅(sum(i->[i[];trace(i)].==n,Any[[1 1;1 0]].^(0:n)).>0)+1]
```
Ungolfed:
```
function f(n)
  k=Any[[1 1;1 0]].^(0:n) # Produces characteristic matrices of Fibonacci
                          # numbers from 0 to n
  F=sum(i->i[]==n,k)      # Check if n is a Fibonacci number by checking
                          # the first value in each matrix for n
  L=sum(i->trace(i)==n,k) # Check if n is a Lucas number by checking
                          # the trace of each matrix for n
  I=[2;1]⋅[F;L]+1         # Calculate 2F+L+1, which is the index for the next step
  S=split("Pippi Lucas Ness Travis") # Creates array with four strings
                          # saves a byte compared with directly creating array
  return S[I]
      # This uses the above calculations to determine which of the four to return
end
```
[Answer]
# Octave, 93 bytes
```
@(n){'Pippi','Lucas','Ness','Travis'}{(1:2)*any(~rem(real(sqrt(5*n^2+[-20,-4;20,4])),1)).'+1}
```
This approach is similar to [my MATLAB answer](https://codegolf.stackexchange.com/a/76849/51939) with the exception that Octave allows you to index directly into a fresh array:
```
{'a', 'b', 'c'}{2}    %// b
```
[Answer]
# MATL, ~~57~~ ~~55~~ ~~54~~ (67-15) = 52 bytes
```
20Kht_vi2^5*+X^Xj1\~a2:*sG2016=-'Lucas Ness Travis Trump Pippi'Ybw)
```
[**Try it Online!**](http://matl.tryitonline.net/#code=MjBLaHRfdmkyXjUqK1heWGoxXH5hMjoqc0cyMDE2PS0nTHVjYXMgTmVzcyBUcmF2aXMgVHJ1bXAgUGlwcGknWWJ3KQ&input=MjAxNg)
**Explanation**
Again, similar logic to my other answers [here](https://codegolf.stackexchange.com/a/76851/51939) and [here](https://codegolf.stackexchange.com/a/76849/51939).
```
20      % Number literal
K       % Retrieve the number 4 from the K clipboard (the default value)
h       % Horizontal concatenation to produce [20 4]
t       % Duplicate elements
_v      % Negate and vertically append elements (yields [20, 4; -20 -4])
i2^     % Explicitly grab the input and square it
5*      % Multiply by 5
+       % Add this to the matrix ([20, 4; -20 -4])
X^      % Take the square root
Xj      % Ensure that the result is a real number
1\      % Get the decimal component
~       % Create a logical arrays where we have TRUE when no remainder
a       % For each column determine if any element is TRUE
2:      % Create the array 1:2
*       % Perform element-wise multiplication with boolean
s       % Sum the result to yield an index
G       % Explicitly grab the input (again)
2016=   % Check to see if it is 2016 (yields TRUE (1) if equal)
-       % Then subtract the boolean from the index. Since 2016 is NOT a
        % Fibonacci or Lucas number, the original index is 0. Subtracting
        % this boolean, will make this index now -1. For all other non-2016
        % numbers this will have no effect on the index.
'Lucas Ness Travis Trump Pippi' % Create the possible strings values
        % Note: the 0 index wraps around to the end hence Pippi being at the end.
        % The next to last entry ('Trump') is ONLY accessible via a -1 index as
        % discussed above
Yb      % Split at the spaces to create a cell array
w       % Flip the top two stack elements
)       % Retrieve the desired value from the cell array
```
[Answer]
# C++11, 176 + 15 (#include) = 191
```
#include<mutex>
[](int n){std::function<int(int,int)>c=[&](int f,int s){return f-s>n?0:s-n?c(s,f+s):1;};int l=c(2,1),f=c(1,1);l&f?puts("Travis"):l?puts("Lucas"):f?puts("Ness"):puts("Pippi");}
```
Ungolfed with usage. I can add explanation if requested tomorrow, gtg to bed now!
```
#include <functional>
#include <cstdio>
int main()
{
    auto r = [](int n)
    {
        std::function<int(int, int)> c = [&](int f, int s)
        {
            return f - s > n ? 0 : f - n ? c(s, f + s) : 1;
        };
        int l = c(2, 1), f = c(1, 1);
        l & f ? puts("Travis") : l ? puts("Lucas") : f ? puts("Ness") : puts("Pippi");
    };
    for (int i : { 1, 2, 3, 4, 5, 6, 7, 8, 610, 722, 843 })
    {
        printf("%i - ", i); r(i);
    }
}
```
[Answer]
# Javascript (ES6), 108 bytes
```
x=>(f=(a,x,y)=>a==y||a==x?1:a<y?0:f(a,y,x+y),b=f(x,0,1),c=f(x,2,1),b&&c?'Travis':b?'Ness':c?'Lucas':'Pippi')
```
Same function for Fibonnacci and Lucas. It's a recursive function that takes the first two values as init.
[Answer]
# Java, 151 bytes
You could argue that Trump would never outsource this crucial decision, so we wouldn't have to make the method public, saving another 7 bytes.
```
public String t(int n){return"Pippi,Lucas,Ness,Travis".split(",")[2*f(n,1,1)+f(n,2,1)];}int f(int a,int x,int y){return a==x||a==y?1:a<y?0:f(a,y,x+y);}
```
Ungolfed including test-main invocation
```
public class Trump {
    //Test Invokation
    public static void main(String[] args) {
        int[] n = {1, 2, 3, 4, 5, 6, 7, 8, 610, 722, 843, 2016 };
        for(int i = 0; i < n.length; ++i) {
            System.out.println(""+ n[i] + " => " + new Trump().t(n[i]));
        }
    }
    public String t(int n) {
        return "Pippi,Lucas,Ness,Travis".split(",")[2*f(n,1,1)+f(n,2,1)];
    }
    int f(int a,int x,int y) {
        return a==x||a==y?1:a<y?0:f(a,y,x+y);
    }
}
```
I found no way so far to test for 2016 and return "Trump" in code that's less than 15 bytes in code.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~39~~ 37 (52 - 15 bonus) [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
2016Qi.•ªb‚•ë>ÅG¹å_¹ÅF¹åi.•F_ïk|»9•ë.•?®B'5n•}2äsè}™
```
[Try it online](https://tio.run/##yy9OTMpM/f/fyMDQLDBT71HDokOrkh41zAIyDq@2O9zqfmjn4aXxQKLVDcQCq3CLP7w@u@bQbkuwIpCI/aF1TuqmeUBWrdHhJcWHV9Q@alkEMdQAAA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9TVmmvpPCobZKCkn1l5X8jA0OzwEy9Rw2LDq1KetQwC8g4vNrucKt75eGl8ZWHW92ANFjaLf7w@uyaQ7stwSpAIvaH1jmpm@YBWbVGh5cUH15R@6hl0X@d/4ZcRlzGXCZcplxmXOZcFlxmhgZc5kZGXBYmxlwg6wA).
**Explanation:**
```
2016Qi                # If the input equals 2016:
      .•ªb‚•          #  Push "trump" to the stack
ë                     # Else:
 >ÅG                  #  List of Lucas numbers up to and including the input+1
    ¹å                #  Check if the input is in this list (1 if truthy; 0 if falsey)
      _               #  Invert the boolean (0→1 and 1→0)
 ¹ÅF                  #  List of Fibonacci numbers up to and including the input
    ¹åi               #  If the input is in this list:
       .•F_ïk|»9•     #   Push string "travisnessi" to the stack
    ë                 #  Else:
     .•?®B'5n•        #   Push string "pippilucas" to the stack
    }                 #  Close the inner if-else
     2ä               #  Split the string into two parts
                      #   i.e. "travisnessi" → ["travis","nessi"]
                      #   i.e. "pippilucas" → ["pippi","lucas"]
       sè             #  Index the Lucas result into the list of two strings
}                     # Close the outer if-else
 ™                    # And output the top of the stack in title-case
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~128~~ ~~120~~ ~~116~~ 110 bytes
```
a;b;o;f(n){for(o=b=0,a=1;a<=n;b=a+b,a=b-a)o|=(b==n)+2*(2*a+b==n);n=o?o-1?o-2?"Travis":"Lucas":"Ness":"Pippi";}
```
[Try it online!](https://tio.run/##ZY7BbsIwDIbvfYooElICrUSzwtA8wwtMsANHLk6hUw4kVQtcoM/eJeIEPlj2//n/LdfFX12PI4GFAI3y@t6ETgW0OM8JS6Bv9GCRZjZKW5AOD1QW0euZmSozjYskwGPYhKKMZTZy39HN9fJL/lxrSn176lP7dW3rJAzjLbijaDvnL1s6n3aNipNwWtyfsFFyUh0FrsWkP3iZuzw6tAYxZFlynsl5Fd2ZeDlSangjhpEPRipGFowsGflkZMVT5ZznDP9pVaWvhvEf "C (gcc) – Try It Online")
# Explanation
Let's name `F(n)` the n-th Fibonacci number, and `L(n)` the n-th Lucas number.
`a`, `b` are `F(n-1)`, `F(n)` respectively.
Then we can calculate `L(n) == F(n-1)+F(n+1) == 2*F(n-1) + F(n) == 2*a+b`
This function will successively calculate Fibonacci and Lucas numbers, up to `n`, and check if `n` is any of them.
If `n` is a Fibonacci number, the 1st bit of `o` will be set to `1`
If `n` is a Lucas number, the 2nd bit of `o` will be set to `1`
`o` will then be used to determine which name to output
# Edit
* Saved 8 bytes by golfing the condition of the for-loop : starting at second iteration, we have `a<b<c` and `a<a+c=L(n)`, so `( b<=n || a+c<=n ) => a<n`. I actually needed `a<=n` to handle correctly `n=1`
* Saved 4 bytes thanks to ceilingcat ! (also corrected a mistake, my code was outputting "2 => Ness")
* Saved 6 bytes:
	+ 2 thanks to ceilingcat again
	+ 4 by removing the variable `c`, equal to `F(n+1)`, which was useless since we can already calculate `F(n+1)` with `a` and `b`
[Answer]
## Perl 5.10, 119 - 15 (bonus) = 104 bytes
```
$_=<>;$j=1;($i,$j)=($j,$i+$j)while$_>$i;say$_-2016?(Pippi,Lucas,Ness,Travis)[($_==$i)*2|$_==3*$j-4*$i|$_-1>>1==0]:Trump
```
Ungolfed:
```
# Read line from stdin
$_ = <>;
# Find first Fibonacci number greater than or equal to input.
# Store this number in $i and the next Fibonacci number in $j.
$j = 1;
($i, $j) = ($j, $i + $j) while $_ > $i;
say $_ - 2016
  ? (Pippi,Lucas,Ness,Travis)[
      ($_ == $i) * 2 |          # Bitwise OR with 2 if Fibonacci number
      $_ == 3 * $j - 4 * $i |   # Bitwise OR with 1 if Lucas number >= 3
      $_ - 1 >> 1 == 0          # Bitwise OR with 1 if Lucas number <= 2
    ]
  : Trump
```
This exploits the fact that
```
L(n-2) = 3 * F(n+1) - 4 * F(n)
```
is the greatest Lucas number lower to or equal than F(n).
[Answer]
# Groovy, 149 bytes
```
f={i->g={m,s->while(s[-2]<=m)s<<s[-2]+s[-1];s}
println(["Pippi","Ness","Lucas","Travis"][(g(i,[1,1]).contains(i)?1:0)+(g(i,[2,1]).contains(i)?2:0)])}
```
Test code:
```
[1,2,3,4,5,6,7,8,610,722,843].each {
    print "$it => "
    f(it)
}
```
`g` is a closure that generates a list of numbers based on a seed (`s`) and a max value (`m`). `(g(i,[1,1]).contains(i)?1:0)+(g(i,[2,1]).contains(i)?2:0)` finds the index to use based on the number being lucas or fibonacci.
[Answer]
# MATLAB, ~~122~~ 119 bytes
```
@(n)subsref({'Pippi','Lucas','Ness','Travis'},substruct('{}',{(1:2)*any(~rem(real(sqrt(5*n^2+[-20,-4;20,4])),1)).'+1}))
```
**Brief Explanation**
We first create a cell array containing the values to print: `{'Pippi', 'Lucas', 'Ness', 'Travis'}`. Then to figure out which value to display, we check to see whether `n` is a Fibonacci or Lucas number.
For Fibonnaci, we use the following formula:
```
any(~rem(sqrt(5*n^2 + [-4 4]), 1))
```
This checks to see if either `5*n^2 + 4` or `5*n^2 - 4` are a perfect square. If `any` of them are, then it is a Fibonacci number.
The formula for a Lucas number is *very* similar with the exception that we use +/- 20 instead of 4:
```
any(~rem(sqrt(5*n^2 + [-20 20]), 1))
```
In this solution I combined these two cases into one by using the matrix:
```
M = [-20 -4
      20  4]

```
By applying the same equation as those above, but force `any` to consider only the first dimension, I get a two element logical array where if the first element is `true`, then it is a Lucas number and if the second element is `true`, it is a fibonacci number.
```
any(~rem(sqrt(5*n^2 + [-20 -4;20 4]), 1))
```
Then to compute the index into my initial cell array, I treat this as a binary sequence by performing element-wise multiplication of this boolean with `[2^0, 2^1]` or simply `[1,2]`. And sum the elements. Obviously I have to add 1 because of MATLAB's one-based indexing.
```
index = (1:2) * any(~rem(real(sqrt(5*n^2+[-20,-4;20,4])),1)).' + 1;
```
Then I have to use `subsref` and `substruct` to index into the initial cell array to obtain the final result.
[Answer]
## JavaScript (ES6), 97 bytes
```
x=>[['Pippi','Lucas'],['Ness','Travis'],f=(a,x,y=1)=>a>x?f(a,y,x+y):a==x||a==1][+f(x,0)][+f(x,2)]
```
The `a==1` check is needed otherwise I don't notice that 1 is a Lucas number.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 47 bytes - 15 = 32
```
+2ḶÆḞ⁸eð+ị“©ḤʠhMṂƁÞḄṭAƓ»Ḳ¤µ2+Ð¡-⁸eḤ
“¡Ỵ¦»Ç⁼?⁽¥Ð
```
[Try it online!](https://tio.run/##AW8AkP9qZWxsef//KzLhuLbDhuG4nuKBuGXDsCvhu4vigJzCqeG4pMqgaE3huYLGgcOe4biE4bmtQcaTwrvhuLLCpMK1MivDkMKhLeKBuGXhuKQK4oCcwqHhu7TCpsK7w4figbw/4oG9wqXDkP///zIwMTY "Jelly – Try It Online")
]


[Question]
      [
We all know that if you google the word "google" it will break the internet.
Your task is to create a function that accepts one string and returns its length, in the fewest possible Unicode characters.
However, if the given string is `google` (lowercase), it will cause an error.
For example, `g('bing')` will return `4` but `g('google')` will cause an error.
Please provide an example of usage, and the error if possible.

[Answer]
# Powershell 34 Bytes
```
param($a)$a.length*($a-ne'google')
```
Multiply length by 0,1 boolean value of `not-equal` google.
Gives `0` if `google` (not case-sensitive), length otherwise.
[Answer]
# ùîºùïäùïÑùïöùïü, 15 chars / 21 bytes (noncompetitive)
```
√Ø‚âî`google`?$:√ØÍùà
```
`[Try it here (Firefox only).](http://molarmanful.github.io/ESMin/interpreter.html?eval=false&input=bing&code=%C3%AF%E2%89%94%60google%60%3F%24%3A%C3%AF%EA%9D%88)`
[Answer]
# [‡≤†\_‡≤†](https://github.com/molarmanful/-_-), 110 bytes (noncompetitive)
```
‡≤†_‡≤†
‡≤†google‡≤†
‡≤†=‡≤†
‡≤†"‡≤†
‡≤†$‡≤†
‡≤†$‡≤†
‡≤†11‡≤†
‡≤†13‡≤†
‡≤†(‡≤†
‡≤†?‡≤†
‡≤†_‡≤†
‡≤†#‡≤†
‡≤†^‡≤†
```
[Try it here.](http://codepen.io/molarmanful/debug/gajxjX)
[Answer]
# Game Maker Language, 60 bytes
```
a=argument0;if a="google"a=1/0show_message(string_length(a))
```
[Answer]
# Factor, ~~55~~ ~~53~~ 49 bytes
```
: g ( s -- l ) dup length swap "google" = not / ;
```
~~Throws the string "google". `throw` happens to be the same length as `0 0 /`. Or I could just divide a string by a number...~~ Or I could just divide the length of the string by if it's not `google`...
Example use:
```
cat @ mint-kitty : ~/projects/factor/factor(master??!) $ ./factor -run=listener
Factor 0.98 x86.64 (1742, heads/master-0bb3228063, Tue Mar 15 14:18:40 2016)
[Clang (GCC 4.2.1 Compatible Ubuntu Clang 3.6.2 (tags/RELEASE_362/final))] on linux
IN: scratchpad : dont-google ( str -- int ) dup "google" = [ throw ] [ length ] if ;
IN: scratchpad "bing" dont-google
--- Data stack:
4
IN: scratchpad "google" dont-google
google
Type :help for debugging help.
--- Data stack:
4
IN: scratchpad
```
The error in the UI:
[![enter image description here](https://i.stack.imgur.com/51S2V.png)](https://i.stack.imgur.com/51S2V.png)
[Answer]
# Scratch, 16 bytes
[![Script](https://i.cubeupload.com/utmUzk.png)](https://i.cubeupload.com/utmUzk.png)
([scoring used](http://meta.codegolf.stackexchange.com/questions/673/golfing-in-scratch))
Stopping the project is the closest thing to an error that I can get.
[Answer]
# C++, 77 Bytes
```
#include <string>
int G(std::string S){1/int(S!="google");return S.length();}
```
[Answer]
# [Syms](https://github.com/CatsAreFluffy/syms), 18 bytes
```
{[#~{google}=!1/]}
```
[Try it online!](https://tio.run/##K67MLf5fXWvzvzpaua46PT8/PSe11lbRUD@29r@m3X@wAAA "Syms ‚Äì Try It Online")
[Answer]
# [shortC](//github.com/aaronryank/shortC), 21 bytes
```
Df(s)Ss)/Ms,"google")
```
* `Df(s)` defines a function `f` that takes one argument `s`.
* `Ss)` calculates the length of `s`.
* `Ms,"google)` compares `s` to "google".
* `Ss)/Ms,"google")` divides the length of `s` by `0` if the strings are equal. This throws `floating point exception` if they're equal.
[Try it online!](https://tio.run/##K87ILypJ/v/fJU2jWDO4WFPft1hHKT0/Pz0nVUnz/38A)
[Answer]
# Excel VBA, 52 Bytes
Subroutine that take input `a` as unassigned/variant of expected type variant/String and outputs to the VBE Immediates window. If `a` = "google" throws `Run-time error '3': Return without GoSub` else outputs the length of the input `a`.
```
Sub g(a)
If a="google"Then Return
Debug.?Len(a)
End Sub
```
[Answer]
# Bash
```
[ $1 == google ]; return $((${#1}/$?))
```
[Answer]
# GameMaker Language, 46 bytes
```
x=argument0
return string_length(x)/x!=google
```
Uses the same logic as [this Python answer](https://codegolf.stackexchange.com/a/58896/82488), abusing GMLs type coercion making the function divide by zero if the string equals google
I also haven't and can't test this because I currently don't have GameMaker installed, just made this from memory
[Answer]
# [Keg](https://github.com/JonoCode9374/Keg), 16 bytes
```
:`google`=[0/|√∑!
```
[Try it online!](https://tio.run/##y05N///fKiE9Pz89JzXBNtpAv@bwdsX//5My89L/62YUAQA "Keg ‚Äì Try It Online")
Attempt ruined by the fact that `google` isn't in Keg's dictionary. That's why I use DuckDuckGo, which at least has parts of it's name in the dictionary!
[Answer]
# [Lua](https://www.lua.org/), 35 bytes
```
load'return #(...=="google"or ...)'
```
[Try it online!](https://tio.run/##NY7NCsIwEITP9imWetgESkDBY97CuwTz08CSLZsUD@Kzx0jx9s0MMwztrhM/HUEEO8h5lNB2KXBWxhhr58ScKMwsMLTGHgc9ltoEcoG8uSz1jWvGBXANRAwvFvI/eTTxA56n0ya5NIX3UFsuacRjQf/tbRwgFQ9TT6H43i/X2xc "Lua ‚Äì Try It Online")
Idea is like one in [@QuertyKeyboard's answer](https://codegolf.stackexchange.com/a/70582/59169), but better optimized: `load` is used to create function and inverting check for "googleness" allows us to save one byte by replacing `and` with `or`.
Again, if full programs are allowed, we can cut down to **29** bytes!
# [Lua](https://www.lua.org/), 29 bytes
```
print(#(...=="google"or ...))
```
[Try it online!](https://tio.run/##yylN/P@/oCgzr0RDWUNPT8/WVik9Pz89J1Upv0gByNfU/P//P0QEAA "Lua ‚Äì Try It Online")
[Answer]
# VBScript, 47 bytes
```
sub f(x)
msgbox len(x)/abs(x<>"google")
end sub
```
VBScript will return `-1` for `True`, so we have to `abs()` it. And attempts to divide it by the length, like the python answer.
[Answer]
# [Knight](https://github.com/knight-lang/knight-lang), 17 bytes
```
O/L=gP!?g"google"
```
[Try it online!](https://tio.run/##rVn/U9vKEf/Z/isOZ8CSLQdZ0Jk3NrInXyDDlAAPkr7OAA1CPtuaJ0uqJENoQv/00t29LzrZJm3ax0ws6@6ze7uf29vdc8LeLAyfX0VJGC8n/KAoJ1H6ej5qmiNxdFcbCsvHjK@A8iiZ1YbKaCEwEz6NEs7imMVpMqOPph79dPr5I@tXr5efLphXvf7lzQXbr16PTt@xX6rXi8@sX4GPTi4N7OnnEwP6@fTjm8s/W4XNLPzYYf/s/8nWs28uYVkxGc6DnHXsSsBEga1axWjE9qu508PfcDKBSfLoO8PvBwcrGFyGMOgmYOLYRmAN8/bs7IRA@DEmJwfom2HIxQcBAHnD1vsgXnLbvkpu7GaT/IBdubphPrtoHZ4dWc9nuyf@7HxrPGvN0nQW89azDeOtoQB3AM2DBcDhy7DZBN1ZkBfcstm3ZiNKShYNmw0YpXUc1pkukxBGSDiE93KROUWWXHk3/jfXcZ9ARyMCdYSHp4sDu7uoPsrYwzwqeZEFIW824HvMLRgHcUuY4bDWdXmdXE@vc/bt6erGsgevWjaZ0oimzNLW@qz9qm0zoUKNbsHodQLD3a4YATsbPC64OfAkzAnnPPydTdOcJcvFHc8LaQ@zomISzaJSaYXV0Z2@oz0Szw7ru6zLOtLybtdmPdZ227AEWhrZLOflMk@YigwhRsExXLXhPsij4C7mygowIk4feG6FsJ4yhH3/zpRxIb2FRMSXti3piTa4Hvl9B/bI18Mr1uFZkzEJkGSyzCzcUiY57TF4WzdYnPxCaBNmXLfblU2tttg0EAYPtFEMlECmgO9gWRYUJSvnHJQFeQlguQEdxShuaGijJ8pY4wC9aCx89m3a6EZFBpmPoVtGaQJmY8S6eEhCxUixzDIk3FZRpUZM@s34A9oNslGHCuUsgTiGrIWRKy0XrHxq66MtBo5wADPYADMXmqmCjJKecNVCu9HUII7T0Np3nb6NDuKwdoIcTJZxHOSPpqPV/lwY23Pe1pbRglJ@maxI0xJ9XEImhU2eHr59d/vr1sn7M8NfU@tdtFGtt652q6b3w/HlCxpLnpPKIJmwvy8D9Ypq780l9taXEP5/aGsqjjdQQcL7deE65okyZb5McIOGMvF2yrSwVKqk@IfILqOQ0ezdcnrl7d9IO8Q@71B20AYUGZyqcmoBFPzfjuNJS6UdKjwOKllVAGdCKxAlTaxfwx2w/l7dT3QeQ3HMWmW@5C0IQT2OEQnj0wASCE60MLBaFQnoJ/ouaw/R8eVtmsYwc1dn4EVfK7d@5FDn5z0yzbxbMzNGG5M/1EYI2jKNY8s01WGuAwXifzA5WTMZi/DHN@enDpZiEWjwenzVd10XwglcgVf1VkT/4F9Kho@hEaOGt8gAvDn44dHnnt9XFR0THBZ1fNCnJx57ADg6PjnssCnkxmFDh7ZcD7NwGGROzBNqAAyuVGskOINz9xIZq4JYmrCyYb2xImoloBQfEBdDqCkRTuq8ES6ylR0gkqKbKoUgTdENLlM8RGU4tzrAzFonhRyFWJ8gYw6UqOz0csg4lr3jfp3iH@6uQJ63B01W/YE5ZO6MlzG0btYOsbqDXGGtmkSJPWRNrEjRV5bl6SIrWcyDeyipLOEPKAMd9RQaP3Z@cfbx/NOXo@O/mgtEU4t2Bat6OM8xHzvU@thit3zoul7xZBJNm5UD1O2WORZNeNhU1IX5h@Co7gPxcGOviUVGuY9BJFNh5fTbih6B1zPvqhmUxH9SY4W5BQxuLoSTn6UZTyxjYaeVt6jwg1X@QtQ9CC/fc/d/oXHZKliiv5iC6RN0ChoyiEAHuzWAQydAb7gGLK2ixYJB1vWpscEDCEhbbhnoobVov1BDx2ee2YFUNFae/Aqe8K/QlOHhXfNzqxZE1OZvYWJaA56sRRusEtd5MeDvIeSkPxS4vsmyTmSyoLROqcm1sKTYqqaMRvt21SauZTclekmtnrVdoKB5wjYJA53QyJjrQmK0WxVUTWC14EEi1b5UkWQJMndApgrJwlnFAp4ucY1B0sR@1qhjOzt0N@r1EHojmtZrap4byqzt150C7LHgzWbqvOaG@cuyULuvY0J0bsKgrjaI0h6kP8ywGFrG9ojeuFHfbXHRRDR08UzFkif2HLtZOgxiAwiFw3jafeWlZ28O1TAo1UP2kP1uRZOtvqMuG3pLh56lzBHSr95adBrRjo133V4h1Kl2ZwMLq9V2Aw@dNR7Evm5iYbHBtQ5hfFMJCUBJsShT@u1ruLIhaNjrkT5JFFXA1Y0WjJa107/7Q2J2NxOz/UOh7c1CfyM2aw6JiwCNeaaXQ0m7YN1nvb5mmbBAfR/OWa8PZ6xvgr2fRB9AeqxhfR@htO5AjbiKciLaG7mSa8@m7qPjE//N1QNBk@QKVEpKsFhi4DveAOY85@2CJSm0xFFcRgl7CB6BNzZJ4YZZ8hnPQSZLE56UUYCXAjjJKXvgbB7ccwBKRQgv2SJIlhA@j69xFL27Q8aBCmKiWMYl/gRAi@uEpyA9E6OWXKHMlNOQFfWo72Wk@7IhGnZQQ7l02w5irI2P4HUyifmE3VZm32ot3/Cb6LOMRSpnRqis11PvNsEbEtoxTH/SefCAgnWl8GHSq@VFv54Vx8w8/AfmMUDRgfwJbYcJwJjV@j4adJiRDVGHKyRVyfVEHUDslg/VxuiCRnAoMbTSSTpgC74IMwyzhI1ux/@vK6M/wJWRcmVrgy@@9EW6Mn6ZfbHqBpNxesxqAE8jPFVAtzbZWb1o91TmMRVo83aq9Ie@bKoNY1NSphIt//2/kZc5yFCj5YftgYmutbmrWL/KuvXpn76XqN62upggrlG7nOhUSBjUeOPXpI00iRKI6Ha1mDD5N3BP/IZlNpo175jZu0ix43rXjlBDfuwN9gxaPogrg290WF2zALG1LiSRFw9Hn4W9WkN7KYheUTpcLXneppK3Z@s@wNPS@zT4HxoiNAyfuBWhbv51O2T2Rh54iKt2@9gkUYMg4l9M0oMQXXkSYHW4wgWQJMEz1WFGCUxGE/pNKAhLKFPt7bCNPSeO2OyFSykq0zUQukH5u8AiiBJsVlmQz0KHlHY68P3exl@f6LqK/yNjuWRN/Rr39Cz@Q@Bf4TQOZsVz73112fw3 "C (gcc) ‚Äì Try It Online")
Requires a patch to fix an errata in the """golfed""" C interpreter, where it will leave a newline in the input from `PROMPT`. This matches the behavior of the AST interpreter and the wording of the spec.
This is the simple division by zero method.
```
# print length(g = prompt()) / (g != "google")
OUTPUT / (LENGTH(= g PROMPT)) (! (? g "google"))
```
Relies on division by zero throwing an exception. The AST interpreter will always throw an exception in software, but for the golfed interpreter, it requires the x86 behavior of throwing an exception on the hardware level.
]


[Question]
      [
This serves as a catalog for tips related to golfing in [Burlesque](http://esolangs.org/wiki/Burlesque).
Burlesque is a lazy, esoteric programming language. It's mostly used on anarchy golf while popularity on Codegolf is not as high. However, this catalog is intended to be used by people golfing on anarchy golf as well.
Please only mention tricks and not obvious shortcuts. An obvious shortcut is for example using `r\` instead of `r@\[` because the built-in `r\` is defined to be `r@\[` and is stated as such in the documentation and is thus just an obvious shortcut.

[Answer]
## Using `".. .."wd` instead of `{".."".."}`
If you need a Block of Strings such as `{"abc" "def"}` it is shorter to use the *words* built-in: `"abc def"wd`.
## Using `ra` to parse *fail-safe*
`ps` will fail if the input is not properly formated or might produce unwanted results. In such cases, using `ra` is better.
```
blsq ) "5,"ra
5
blsq ) "5,"ps
{5 ,}
blsq ) "5a"ps
{ERROR: (line 1, column 3):
unexpected end of input}
blsq ) "5a"ra
5
```
## Using `,` to drop stdin
`,` is defined as a pop instruction if and only if there is exactly one element on the stack. It's used to pop STDIN from the stack when it's not needed but there (such as for example is the case on anarchy golf).
## Abusing the way `mo` is defined
`mo` is defined as `1R@\/?*` and is used to generate a Block containing multiples of N:
```
blsq ) 3mo9.+
{3 6 9 12 15 18 21 24 27}
```
Yet due to side effects of `?*` you can do some nasty things with it if you don't provide a number:
```
blsq ) "1"mo9.+
{"11" "21" "31" "41" "51" "61" "71" "81" "91"}
blsq ) {1 2 3 4}mo9.+
{1 4 9 16}
```
]


[Question]
      [
Write a program that counts up forever, starting from one.
Rules:
* Your program must log to `STDOUT` or an acceptable alternative, if `STDOUT` is not available.
* Your program must be a full, runnable program, and not a function or snippet.
* Your program must output each number with a separating character in between (a newline, space, tab or comma), but this must be consistent for all numbers.
* You may print the numbers in decimal, [in unary](http://meta.codegolf.stackexchange.com/questions/5343/can-numeric-input-output-be-in-unary) or in [base 256 where each digit is represented by a byte value](http://meta.codegolf.stackexchange.com/questions/4708/can-numeric-input-output-be-in-the-form-of-byte-values).
* Your program must count at least as far as 2128 (inclusive) without problems and without running out of memory on a reasonable desktop PC. In particular, this means if you're using unary, you cannot store a unary representation of the current number in memory.
* Unlike our usual rules, feel free to use a language (or language version) even if it's newer than this challenge. Languages specifically written to submit a 0-byte answer to this challenge are fair game but not particularly interesting.
Note that there must be an interpreter so the submission can be tested. It is allowed (and even encouraged) to write this interpreter yourself for a previously unimplemented language.
* This is not about finding the language with the shortest solution for this (there are some where the empty program does the trick) - this is about finding the shortest solution in every language. Therefore, no answer will be marked as accepted.
### Catalogue
The Stack Snippet at the bottom of this post generates the catalogue from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
```
## Language Name, N bytes
```
where `N` is the size of your submission. If you improve your score, you *can* keep old scores in the headline, by striking them through. For instance:
```
## Ruby, <s>104</s> <s>101</s> 96 bytes
```
If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the *last* number in the header:
```
## Perl, 43 + 2 (-p flag) = 45 bytes
```
You can also make the language name a link which will then show up in the snippet:
```
## [><>](http://esolangs.org/wiki/Fish), 121 bytes
```
```
<style>body { text-align: left !important} #answer-list { padding: 10px; width: 290px; float: left; } #language-list { padding: 10px; width: 290px; float: left; } table thead { font-weight: bold; } table td { padding: 5px; }</style><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="language-list"> <h2>Shortest Solution by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr> </thead> <tbody id="languages"> </tbody> </table> </div> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr> </thead> <tbody id="answers"> </tbody> </table> </div> <table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr> </tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr> </tbody> </table><script>var QUESTION_ID = 63834; var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe"; var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk"; var OVERRIDE_USER = 39069; var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page; function answersUrl(index) { return "//api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER; } function commentUrl(index, answers) { return "//api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER; } function getAnswers() { jQuery.ajax({ url: answersUrl(answer_page++), method: "get", dataType: "jsonp", crossDomain: true, success: function (data) { answers.push.apply(answers, data.items); answers_hash = []; answer_ids = []; data.items.forEach(function(a) { a.comments = []; var id = +a.share_link.match(/\d+/); answer_ids.push(id); answers_hash[id] = a; }); if (!data.has_more) more_answers = false; comment_page = 1; getComments(); } }); } function getComments() { jQuery.ajax({ url: commentUrl(comment_page++, answer_ids), method: "get", dataType: "jsonp", crossDomain: true, success: function (data) { data.items.forEach(function(c) { if (c.owner.user_id === OVERRIDE_USER) answers_hash[c.post_id].comments.push(c); }); if (data.has_more) getComments(); else if (more_answers) getAnswers(); else process(); } }); } getAnswers(); var SCORE_REG = /<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/; var OVERRIDE_REG = /^Override\s*header:\s*/i; function getAuthorName(a) { return a.owner.display_name; } function process() { var valid = []; answers.forEach(function(a) { var body = a.body; a.comments.forEach(function(c) { if(OVERRIDE_REG.test(c.body)) body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>'; }); var match = body.match(SCORE_REG); if (match) valid.push({ user: getAuthorName(a), size: +match[2], language: match[1], link: a.share_link, }); else console.log(body); }); valid.sort(function (a, b) { var aB = a.size, bB = b.size; return aB - bB }); var languages = {}; var place = 1; var lastSize = null; var lastPlace = 1; valid.forEach(function (a) { if (a.size != lastSize) lastPlace = place; lastSize = a.size; ++place; var answer = jQuery("#answer-template").html(); answer = answer.replace("{{PLACE}}", lastPlace + ".") .replace("{{NAME}}", a.user) .replace("{{LANGUAGE}}", a.language) .replace("{{SIZE}}", a.size) .replace("{{LINK}}", a.link); answer = jQuery(answer); jQuery("#answers").append(answer); var lang = a.language; lang = jQuery('<a>'+lang+'</a>').text(); languages[lang] = languages[lang] || {lang: a.language, lang_raw: lang.toLowerCase(42), user: a.user, size: a.size, link: a.link}; }); var langs = []; for (var lang in languages) if (languages.hasOwnProperty(lang)) langs.push(languages[lang]); langs.sort(function (a, b) { if (a.lang_raw > b.lang_raw) return 1; if (a.lang_raw < b.lang_raw) return -1; return 0; }); for (var i = 0; i < langs.length; ++i) { var language = jQuery("#language-template").html(); var lang = langs[i]; language = language.replace("{{LANGUAGE}}", lang.lang) .replace("{{NAME}}", lang.user) .replace("{{SIZE}}", lang.size) .replace("{{LINK}}", lang.link); language = jQuery(language); jQuery("#languages").append(language); } }</script>
```

[Answer]
## [Labyrinth](https://github.com/mbuettner/labyrinth), 5 bytes
```
):
\!
```
♫ The IP in the code goes round and round ♫
Relevant instructions:
```
)       Increment top of stack (stack has infinite zeroes at bottom)
:       Duplicate top of stack
!       Output top of stack
\       Output newline
```
[Answer]
# [><>](http://esolangs.org/wiki/Fish), 8 bytes
```
01+:nao!
```
Steps:
* Push 0 on the stack
* Add 1 to the top stack element
* Duplicate top stack element
* Output the top of the stack as number
* Output a newline
* Go to step 2 by wrapping around and jumping the next instruction (step 11)
*(A less memory efficient (hence invalid) program is `llnao`.)*
[Answer]
# C (64-bit architecture only), 53 bytes
Relies on pointers being at least 64 bits and prints them in hex using the `%p` specifier. The program would return right when it hits 2^128.
```
char*a,*b;main(){for(;++b||++a;)printf("%p%p ",a,b);}
```
[Answer]
## Haskell, 21 bytes
```
main=mapM_ print[1..]
```
Arbitrary-precision integers and infinite lists make this easy :-)
Luckily `mapM_` is in the Prelude. If `Data.Traversable` was as well, we even could shrink it to 19 bytes:
```
main=for_[1..]print
```
[Answer]
# [Gol><>](https://golfish.herokuapp.com/), 3 bytes
```
P:N
```
Steps:
* Add 1 to the top stack element (at start it is an implicit 0)
* Duplicate top stack element
* Pop and output the top of the stack as number and a newline
* Wrap around to step 1 as we reached the end of the line
[Answer]
# [Marbelous](https://github.com/marbelous-lang/marbelous.py), ~~11450~~ 4632 bytes
Printing decimals is a pain!!
Definitely not winning with this one, but I thought I'd give it a shot. I hope it's ok that it pads the output to 40 zeros (to fit 2^128).
```
00@0..@1..@2..@3..@4..@5..@6..@7..@8..@9..@A..@B..@C..@D..@E..@F..@G..@H..@I..@J
\\++..00..00..00..00..00..00..00..00..00..00..00..00..00..00..00..00..00..00..00
..EhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhunEhun
....AddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddtAddt
..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7..&7\/
../\&8..........................................................................
....@0..........................................................................
....../\&8......................................................................
....//..@1......................................................................
........../\&8..................................................................
......////..@2..................................................................
............../\&8..............................................................
........//////..@3..............................................................
................../\&8..........................................................
..........////////..@4..........................................................
....................../\&8......................................................
............//////////..@5......................................................
........................../\&8..................................................
..............////////////..@6..................................................
............................../\&8..............................................
................//////////////..@7..............................................
................................../\&8..........................................
..................////////////////..@8..........................................
....................................../\&8......................................
....................//////////////////..@9......................................
........................................../\&8..................................
......................////////////////////..@A..................................
............................................../\&8..............................
........................//////////////////////..@B..............................
................................................../\&8..........................
..........................////////////////////////..@C..........................
....................................................../\&8......................
............................//////////////////////////..@D......................
........................................................../\&8..................
..............................////////////////////////////..@E..................
............................................................../\&8..............
................................//////////////////////////////..@F..............
................................................................../\&8..........
..................................////////////////////////////////..@G..........
....................................................................../\&8......
....................................//////////////////////////////////..@H......
........................................................................../\&8..
......................................////////////////////////////////////..@I..
............................................................................../\&8
........................................//////////////////////////////////////..@J
&9&9&9&9&9&9&9&9&9&9&9&9&9&9&9&9&9&9&9&9
Sixteenbytedecimalprintermodulewitharegi
:Sixteenbytedecimalprintermodulewitharegi
}J}J}I}I}H}H}G}G}F}F}E}E}D}D}C}C}B}B}A}A}9}9}8}8}7}7}6}6}5}5}4}4}3}3}2}2}1}1}0}00A
/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A/A%A
%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..%A..
+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O..
+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O+O..
:/A
..}0..}0..
..>>}0....
..>>>>\\..
....//..//
../\>>\\..
....>>..//
....>>\\..
....>>....
\\>>//....
..>>......
..>>......
../\......
..../\<<..
......<<..
..\\<<//..
....~~....
....++....
....\\..//
\\....>9\/
..\\..?0..
......++..
....\\....
......{0..
:%A
@0..
}0..
<A-A
{0@0
:Eg
}0}0}0}0}0}0}0}0
^7^6^5^4^3^2^1^0
~~....~~~~..~~~~
^0^0^0^0^0^0^0^0
{0{0{0{0{0{0{0{0
:Ehun
}0..}0
Eg..&0
=8&0{0
&1\/00
0100&0
&1&1{1
{1{0
:Addt
}0}1
{1{1
```
[Answer]
## [Hexagony](https://github.com/mbuettner/hexagony), ~~12~~ ~~11~~ ~~10~~ 7 bytes
*Thanks to alephalpha for fitting the code into side-length 2.*
```
10})!';
```
Unfolded:
```
 1 0
} ) !
 ' ;
```
This one is fairly simple. `10` writes a 10, i.e. a linefeed to the initial memory edge. Then `})!';` is repeatedly executed in a loop:
* `}` move to the next memory edge.
* `)` increment it.
* `!` print it as an integer.
* `'` move back to the 10.
* `;` print it as a character.
I believe that this is optimal (although by far not unique). I've let the brute force script I wrote [for this answer](https://codegolf.stackexchange.com/a/62812/8478) search for 6-byte solutions under the assumption that it would have to contain at least one each of `;` and `!` and either `(` or `)`, and would not contain `?`, `,` or `@`, and it didn't find any solutions.
[Answer]
# bc, 10
```
for(;;)++i
```
Unusual that `bc` is shorter than [`dc`](https://codegolf.stackexchange.com/a/63861/11259).
From `man bc`:
>
> DESCRIPTION
>
>
> bc is a language that supports arbitrary precision numbers
>
>
>
[Answer]
# Pyth, 4 bytes
```
.V1b
```
### Explanation:
```
.V1    for b in range(1 to infinity):
   b      print b
```
[Answer]
# Java, ~~139~~ ~~138~~ ~~127~~ 123 bytes
```
class K{public static void main(String[]a){java.math.BigInteger b=null;for(b=b.ZERO;;)System.out.println(b=b.add(b.ONE));}}
```
[Answer]
# Mathematica, 22 bytes
```
i=0;While[Echo[++i]>0]
```
[`Echo`](http://reference.wolfram.com/language/ref/Echo.html) is a new function in Mathematica 10.3.
[Answer]
# Python 3, ~~33~~ 25 bytes
As far as I understand, Pythons integers are arbitrary precision, and `print()` automatically produces newlines.
Thanks for @Jakub and @Sp3000 and @wnnmaw! I really don't know much python, the only think I knew was that it supports arbitrary size integers=)
```
k=1
while 1:print(k);k+=1
```
[Answer]
# Ruby, ~~15~~ 12 bytes
```
loop{p$.+=1}
```
* `p`, when given an integer, prints the integer as-is (courtesy of [@philomory](https://codegolf.stackexchange.com/users/47276/philomory))
* `$.` is a magical variable holding the number of lines read from stdin. It is obviously initialized to 0, and also assignable :)
[Answer]
# [Samau](https://github.com/AlephAlpha/Samau), 2 bytes
```
N)
```
Explanation:
```
N     push the infinite list [0 1 2 ...] onto the stack
 )    increase by 1
```
When the output of a program is a list, the outmost brackets are omitted.
[Answer]
# [Microsoft PowerPoint](https://www.youtube.com/watch?v=uNjxe8ShM-8) (33 Slides, 512 shapes to meet minimum requirements)
Storage representation is in hexadecimal.
## Directions
* Click the blue square to advance the counter (or propagate the carry), or make an AutoHotKey Script to click it for you.
* You can view the number's digits at any time using the green buttons. (It causes unintended behavior if you click the blue buttons after viewing another digit.) This is just for a better UX. It still counts up as normal as long as you keep clicking the blue button. In other words, no user decision is required.
* If you reach the end, it displays a congratulatory message.
You can get the PPTX [here](https://drive.google.com/open?id=1JTbg0fSnWV2ig7PYYb1jB5kWCteW9XgU). Requires PowerPoint to run.
Before you comment that Microsoft PowerPoint is not a programming language, it has been shown that PowerPoint is Turing complete (in the same sense that conventional languages such as C are Turing complete). A brief discussion is given [here](https://www.andrew.cmu.edu/user/twildenh/PowerPointTM/Paper.pdf).
[Answer]
# [makina](https://github.com/GingerIndustries/makina), 22 bytes
```
v
>Pv
^>OC
^Uu>n0;
^O<
```
I AM REAL HUMAN YOU SHOULD TRUST ME AND DO WHAT I SAY
[Answer]
# Matlab, 132 bytes
```
a=0;while 1;b=a==9;n=find(cumsum(b)-(1:numel(b)),1);a(n)=a(n)+1;a(1:n-1)=0;if ~numel(n);a=[0*a,1];end;disp([a(end:-1:1)+'0','']);end
```
Ok, I think this is the *first serious* answer that accomplishes this task without a trivial builtin abitrary size integer. This program implements an arbitrary size integer as an array of integers. Each integer is always between 0 and 9, so each array element represents one decimal digit. The array size wil be increased by one as soon as we are at e.g. `999`. The memory size is no problem here, as `2^128` only requires an array of length 39.
```
a=0;
while 1
    b=a==9;
    %first number that is not maxed out
    n=find(cumsum(b)-(1:numel(b)),1);
    %increase that number, and sett all maxed out numbers to zero
    a(n)=a(n)+1;
    a(1:n-1)=0;
    if ~numel(n) %if we maxed out all entries, add another digit
        a=[0*a,1];
    end
    disp([a(end:-1:1)+'0',''])%print all digits
end
```
[Answer]
# [Processing](http://www.processing.org), ~~95~~ ~~85~~ 71 bytes
```
java.math.BigInteger i;{i=i.ZERO;}void draw(){println(i=i.add(i.ONE));}
```
I tried something with a while loop but it causes all of Processing to crash, so I'll stick with this for now.
(Thanks to @SuperJedi224 and @TWiStErRob for suggestions.)
[Answer]
# JavaScript (ES6), ~~99~~ ~~94~~ 67 bytes
```
for(n=[i=0];;)(n[i]=-~n[i++]%10)&&alert([...n].reverse(i=0).join``)
```
`alert` is the generally accepted `STDOUT` equivalent for JavaScript but using it means that consecutive numbers are automatically separated. I've assumed that outputting a character after the number is not necessary because of this.
[Answer]
## C++, ~~146~~ ~~141~~ 138 bytes
Using a standard bigint library is perhaps the *most* boring way of answering this question, but someone had to do it.
```
#include<stdio.h>
#include<boost/multiprecision/cpp_int.hpp>
int main(){for(boost::multiprecision::uint512_t i=1;;){printf("%u\n",i++);}}
```
Ungolfed:
```
#include<cstdio>
#include<boost/multiprecision/cpp_int.hpp>
int main()
{
    for(boost::multiprecision::uint512_t i=1;;)
    {
        std::printf("%u\n", i++);
    }
}
```
The reason the golfed version uses `stdio.h` and not `cstdio` is to avoid having to use the `std::` namespace.
This is my first time golfing in C++, let me know if there's any tricks to shorten this further.
[Answer]
## Intel 8086+ Assembly, 19 bytes
```
68 00 b8 1f b9 08 00 31 ff f9 83 15 00 47 47 e2 f9 eb f1
```
Here's a breakdown:
```
68 00 b8                push   0xb800             # CGA video memory
1f                      pop    ds                 # data segment
b9 08 00           L1:  mov    cx, 8              # loop count
31 ff                   xor    di, di             # ds:di = address of number
f9                      stc                       # set carry
83 15 00           L2:  adc    word ptr [di], 0   # add with carry
47                      inc    di
47                      inc    di
e2 f9                   loop   L2
eb f1                   jmp    L1
```
It outputs the 128 bit number on the top-left 8 screen positions. Each screen position holds a 8-bit ASCII character and two 4 bit colors.
*Note: it wraps around at 2128; simply change the `8` in`mov cx, 8` to `9` to show a 144 bit number, or even `80*25` to show numbers up to 232000.*
## Running
### 1.44Mb bzip2 compressed, base64 encoded bootable floppy Image
Generate the floppy image by copy-pasting the following
```
QlpoOTFBWSZTWX9j1uwALTNvecBAAgCgAACAAgAAQAgAQAAAEABgEEggKKAAVDKGgAaZBFSMJgQa
fPsBBBFMciogikZcWgKIIprHJDS9ZFh2kUZ3QgggEEh/i7kinChIP7HrdgA=
```
into this commandline:
```
base64 -d | bunzip2 > floppy.img
```
and run with, for instance, `qemu -fda floppy.img -boot a`
### 1.8Mb bootable ISO
This is a base64 encoded bzip2 compressed ISO image. Generate the iso by pasting
```
QlpoOTFBWSZTWZxLYpUAAMN/2//fp/3WY/+oP//f4LvnjARo5AAQAGkAEBBKoijAApcDbNgWGgqa
mmyQPU0HqGCZDQB6mQ0wTQ0ZADQaAMmTaQBqekyEEwQaFA0AA0AxBoAAA9Q0GgNAGg40NDQ0A0Bi
BoDIAANNAA0AyAAABhFJNIJiPSmnpMQDJpp6nqeo0ZDQaAANB6IA0NAGj1EfIBbtMewRV0acjr8u
b8yz7cCM6gUUEbDKcCdYh4IIu9C6EIBehb8FVUgEtMIAuvACCiO7l2C0KFaFVABcpglEDCLmQqCA
LTCAQ5EgnwJLyfntUzNzcooggr6EnTje1SsFYLFNW/k+2BFABdH4c4vMy1et4ZjYii1FbDgpCcGl
mhZtl6zX+ky2GDOu3anJB0YtOv04YISUQ0JshGzAZ/3kORdb6BkTDZiYdBAoztZA1N3W0LJhITAI
2kSalUBQh60i3flrmBh7xv4TCMEHTIOM8lIurifMNJ2aXr0QUuLDvv6b9HkTQbKYVSohRPsTOGHi
isDdB+cODOsdh31Vy4bZL6mnTAVvQyMO08VoYYcRDC4nUaGGT7rpZy+J6ZxRb1b4lfdhtDmNwuzl
E3bZGU3JTdLNz1uEiRjud6oZ5kAwqwhYDok9xaVgf0m5jV4mmGcEagviVntDZOKGJeLjyY4ounyN
CWXXWpBPcwSfNOKm8yid4CuocONE1mNqbd1NtFQ9z9YLg2cSsGQV5G3EhhMXKLVC2c9qlqwLRlw4
8pp2QkMAMIhSZaSMS4hGb8Bgyrf4LMM5Su9ZnKoqELyQTaMAlqyQ3lzY7i6kjaGsHyAndc4iKVym
SEMxZGG8xOOOBmtNNiLOFECKHzEU2hJF7GERK8QuCekBUBdCCVx4SDO0x/vxSNk8gKrZg/o7UQ33
Fg0ad37mh/buZAbhiCIAeeDwUYjrZGV0GECBAr4QVYaP0PxP1TQZJjwT/EynlkfyKI6MWK/Gxf3H
V2MdlUQAWgx9z/i7kinChITiWxSo
```
into
```
base64 -d bunzip2 > cdrom.iso
```
and configure a virtual machine to boot from it.
### DOS .COM
This is a base64 encoded [DOS .COM](https://en.wikipedia.org/wiki/COM_file) executable:
```
aAC4H7kIADH/+YMVAEdH4vnr8Q==
```
Generate a .COM file using
```
/bin/echo -n aAC4H7kIADH/+YMVAEdH4vnr8Q== | base64 -d > COUNTUP.COM
```
and run it in (Free)DOS.
[Answer]
## sed, ~~116~~ ~~92~~ 83 bytes
```
:
/^9*$/s/^/0/
s/.9*$/_&/
h
s/.*_//
y/0123456789/1234567890/
x
s/_.*//
G
s/\n//p
b
```
**Usage:**
Sed operates on text input and it *needs* input do anything. To run the script, feed it with just one empty line:
```
$ echo | sed -f forever.sed
```
**Explanation:**
To increment a number, the current number is split up into a prefix and a suffix where the suffix is of the form `[^9]9*`. Each digit in the suffix is then incremented individually, and the two parts are glued back together. If the current number consists of `9` digits only, a `0` digit is appended, which will immediately incremented to a `1`.
[Answer]
## Clojure, 17 bytes
```
(map prn (range))
```
Lazy sequences and arbitrary precision integers make this easy (as for Haskell and CL). `prn` saves me a few bytes since I don't need to print a format string. `doseq` would probably be more idiomatic since here we're only dealing with side effects; `map` doesn't make a lot of sense to use since it will create a sequence of `nil` (which is the return value of each `prn` call.
Assuming I count forever, the null pointer sequence which results from this operation never gets returned.
[Answer]
## C# .NET 4.0, ~~111~~ ~~103~~ ~~102~~ 97 bytes
```
class C{static void Main(){System.Numerics.BigInteger b=1;for(;;)System.Console.WriteLine(b++);}}
```
I didn't find any C# answer here, so I just had to write one.
.NET 4.0 is required, because it's the first version that includes [BigInteger](https://msdn.microsoft.com/library/system.numerics.biginteger(v=vs.100).aspx). You have to reference [System.Numerics.dll](https://msdn.microsoft.com/en-us/library/system.numerics(v=vs.100).aspx) though.
With indentation:
```
class C
{
    static void Main()
    {
        System.Numerics.BigInteger b = 1;
        for (;;)
            System.Console.WriteLine(b++);
    }
}
```
*Thanks to sweerpotato, Kvam, Berend for saving some bytes*
[Answer]
# [MarioLANG](http://esolangs.org/wiki/MarioLANG), 11 bytes
```
+<
:"
>!
=#
```
Inspired by [Martin Büttner's answer in another question](https://codegolf.stackexchange.com/questions/62230/simple-cat-program/62425#62425).
[Answer]
## CJam, 7 bytes
```
0{)_p}h
```
Explanation:
```
0         e# Push a zero to the stack
 {        e# Start a block
  )         e# Increment top of stack
   _        e# Duplicate top of stack
    p       e# Print top of stack
     }    e# End block
      h   e# Do-while loop that leaves the condition on the stack
```
Note: Must use Java interpreter.
[Answer]
## C, 89 bytes
A new approach (implementing a bitwise incrementer) in C:
```
b[999],c,i;main(){for(;;)for(i=c=0,puts(b);i++<998;)putchar(48+(c?b[i]:(b[i]=c=!b[i])));}
```
**Less golfed**
```
int b[999], c, i;
main() {
  for(;;)
    for(i=c=0, puts(b); i++ < 998;)
      putchar(48 + (c ? b[i] : (b[i] = c = !b[i])));
}
```
**Terminate**
This version has the slight flaw, that it does not terminate (which isn't a requirement at the moment). To do this you would have to add 3 characters:
```
b[129],c=1,i;main(){for(;c;)for(i=c=0,puts(b);i++<128;)putchar(48+(c?b[i]:(b[i]=c=!b[i])));}
```
[Answer]
# [Foo](http://esolangs.org/wiki/Foo), 6 bytes
```
(+1$i)
```
---
### Explanation
```
(    )    Loop
 +1       Add one to current element
   $i     Output current element as a decimal integer
```
[Answer]
# [Acc!](https://codegolf.stackexchange.com/a/62404), ~~64~~ 65 bytes
Also works in [*Acc!!*](https://codegolf.stackexchange.com/a/62493).
```
Count q while 1 {
Count x while q-x+1 {
Write 7
}
Write 9
}
```
This prints the numbers out in unary using [Bell characters](https://en.wikipedia.org/wiki/Bell_character) seperated by tabs. If I have to use a more standard character, that would make the program **66 bytes**.
The Acc! interpreter provided in the linked answer translates Acc! to Python, which does support arbritrary-precision integers.
[Answer]
## [Minkolang](https://github.com/elendiastarman/Minkolang), 4 bytes
```
1+dN
```
[Try it here.](http://play.starmaninnovations.com/minkolang/?code=1%2BdN) (Well, actually, be careful. 3 seconds of run time was enough to get up to ~40,000.)
`1+` adds 1 to the top of stack, `d` duplicates it, and `N` outputs the top of stack as an integer with a trailing space. This loops because Minkolang is toroidal, so when the program counter goes off the right edge, it reappears on the left.
]


[Question]
      [
Write the shortest program that takes one input (n) from STDIN (or equivalent) and outputs a simple incrementing function with one argument (x) that returns x + n but the function must be in a different language. Pretty simple!
**This is code-golf, normal rules apply, shortest program wins.**
Example: ><> to Python (Ungolfed)
```
!v"def i(x):"a"    return x+"ir!
 >l?!;o
```
Input:
```
3
```
Output:
```
def i(x):
    return x+3
```
EDIT: Anonymous functions and lambda expressions are allowed!

[Answer]
# [GS2](https://github.com/nooodl/gs2) → K, 2 bytes
```
•+
```
This prints a tacit, monadic function. The source code uses the [CP437](https://en.wikipedia.org/w/index.php?title=Code_page_437&oldid=565442465#Characters) encoding. [Try it online!](http://gs2.tryitonline.net/#code=4oCiKw&input=NDI)
## Test run
```
$ xxd -c 2 -g 1 sum-func.gs2
00000000: 07 2b  .+
$ printf 42 | gs2 sum-func.gs2
42+
$ kona
K Console - Enter \ for help
  (42+) 69
111
  f : 42+
42+
  f 69
111
```
## How it works
### GS2
* GS2 automatically reads from STDIN and pushes the input on the stack.
* `•` indicates that the next byte is a singleton string literal.
* Before exiting, GS2 prints all stack items.
### K
Left argument currying is automatic in K.
Here, `n+` turns the dyadic function `+` into a monadic function by setting its left argument to `n`.
[Answer]
# [ShapeScript](https://github.com/DennisMitchell/ShapeScript) → J, 4 bytes
```
"&+"
```
This prints a tacit, monadic verb. Try it online: [ShapeScript](http://shapescript.tryitonline.net/#code=IiYrIg==&input=NDI=), [J](https://a296a8f7c5110b2ece73921ddc2abbaaa3c90d10.googledrive.com/host/0B3cbLoy-_9Dbb0NaSk9MRGE5UEU/index.html#code=42%26%2B%2069)
## Test run
```
$ cat sum-func.shape; echo
"&+"
$ printf 42 | shapescript sum-func.shape; echo
42&+
$ j64-804/jconsole.sh
   42&+ 69
111
   f =: 42&+
   f 69
111
```
## How it works
### ShapeScript
* ShapeScript automatically reads from STDIN and pushes the input on the stack.
* `"&+"` pushes that string on the stack.
* Before exiting, ShapeScript prints all stack items.
### J
`&` performs argument currying.
Here, `n&+` turns the dyadic verb `+` into a monadic verb by setting its left argument to `n`.
[Answer]
# GolfScript → CJam, 4 bytes
```
{+}+
```
This prints a code block (anonymous function). Try it online: [GolfScript](http://golfscript.apphb.com/?c=IjQyIiAjIFNpbXVsYXRlIGlucHV0IGZyb20gU1RESU4uCgp7K30r), [CJam](http://cjam.aditsu.net/#code=69%20%7B42%20%2B%7D%20~&input=42)
## Test run
```
$ cat sum-func.gs; echo
{+}+
$ printf 42 | golfscript sum-func.gs
{42 +}
$ cjam
> 69 {42 +} ~
111
> {42 +}:F; 69F
111
```
## How it works
### GolfScript
* GolfScript automatically reads from STDIN and pushes the input on the stack.
* `{+}` pushes that block on the stack.
* `+` performs concatenation, which happily concatenates a string and a block.
* Before exiting, GolfScript prints all stack items.
### CJam
`{n +}` is a code block that, when executed, first pushes `n` on the stack, then executes `+`, which pops two integers from the stack and pushes their sum.
[Answer]
# BrainF\*\*\* to JavaScript ES6, 57 bytes
```
----[-->+++<]>--.[-->+<]>+.+.--[->++<]>.[--->+<]>+++.[,.]
```
(Assumes that the input is composed of numeric characters)
Say `1337` is your input. Then, this would compile to:
```
x=>x+1337
```
[Answer]
# R to Julia, 19 bytes
```
cat("x->x+",scan())
```
This reads an integer from STDIN using `scan()` and writes an unnamed Julia function to STDOUT using `cat()`. The Julia function is simply `x->x+n`, where `n` comes from the R program.
[Answer]
# Rotor to K, 2 bytes
```
'+
```
Might as well jump in on the K bandwagon.
[Answer]
# [Malbolge](http://zb3.github.io/malbolge-tools/#interpreter) to JavaScript ES6, 71 bytes
```
('&%@9]!~}43Wyxwvutsr)Mon+HGi4~fBBdR->=_]:[875t4rT}0/Pf,d*((II%GEE!Y}Az
```
It's always fun to generate Malbolge code.
[Answer]
# Minecraft 1.8.7 to K, ~~7~~ 6 + 33 + 27 + 62 = ~~129~~ 128 Bytes
This is using [this version of byte counting](http://meta.codegolf.stackexchange.com/a/7397/44713).
[![the system](https://i.stack.imgur.com/Y7fFE.png)](https://i.stack.imgur.com/Y7fFE.png)
Command blocks (going from left to right):
```
scoreboard objectives add K dummy
```
```
scoreboard players set J K <input>
```
```
tellraw @a {score:{name:"J",objective:"K"},extra:[{text:"+"}]}
```
This could probably be golfed a little more, but it's fairly simple: generate a variable `J` with the objective `K` and set its score for that objective to the input (there is no STDIN - I figured this was close enough). Then, after a tick, output the score of the variable `J` for the objective `K` followed by a `+`. Easy peasy.
[Answer]
# [O](https://github.com/phase/o) to K, 5 bytes
```
i'++o
```
Thanks to **[@kirbyfan64sos](https://codegolf.stackexchange.com/users/21009/kirbyfan64sos)**
Another version using features added after the challenge was created.
```
i'+
```
* Gets input, pushes to stack
* Pushes '+' as a string
* Outputs stack contents
[Answer]
## [Seriously](https://github.com/Mego/Seriously) to Python, 15 bytes
`,"lambda n:n+"+`
Expects input to be in string form, i.e. `"3"`
Explanation:
```
,: read value from input
"lambda n:n+": push this literal string
+: concatenate top two values on stack
```
[Try it online](http://seriouslylang.herokuapp.com/link/code=2c226c616d626461206e3a6e2b222b&input=%223%22) (you will have to manually enter the input because the permalinks don't like quotes)
[Answer]
# Pyth to APL, ~~7~~ 5 bytes
```
+z"--
```
The Pyth code simply concatenates the input (`z`) with the string `"--"`. This creates an unnamed monadic train in APL with the form `n--`, where `n` comes from Pyth. When calling it in APL, `(n--)x` for some argument `x` computes `n--x = n-(-x) = n+x`.
Try: [Pyth](https://pyth.herokuapp.com/?code=%2Bz%22--&input=3&debug=0), [APL](http://tryapl.org/?a=f%u21903--%u22C4f%202&run)
Saved 2 bytes thanks to Dennis!
[Answer]
# rs -> K, 2 bytes
```
/+
```
[Live demo.](http://kirbyfan64.github.io/rs/index.html?script=%2F%2B&input=2)
[Answer]
## [><>](https://esolangs.org/wiki/Fish) to Python, 25 + 3 = 28 bytes
```
"v+x:x adbmal
o/?(3l
;>~n
```
Takes input via the `-v` flag, e.g.
```
py -3 fish.py add.fish -v 27
```
and outputs a Python lambda, e.g. `lambda x:x+27`.
For a bonus, here's an STDIN input version for 30 bytes:
```
i:0(?v
x+"r~/"lambda x:
o;!?l<
```
[Answer]
# [Mouse](http://en.wikipedia.org/wiki/Mouse_(programming_language)) to Ruby, 19 bytes
```
?N:"->x{x+"N.!"}"$
```
Ungolfed:
```
? N:       ~ Read an integer from STDIN, store in N
"->x{x+"   ~ Write that string to STOUT
N. !       ~ Write N
"}"$       ~ Close bracket, end of program
```
This creates an unnamed Ruby function of the form `->x{x+n}` where `n` comes from Mouse.
[Answer]
# Haskell to Mathematica, 14 bytes
```
(++"+#&").show
```
[Answer]
# Mathematica to C#, 22 bytes
```
"x=>x+"<>InputString[]
```
Outputs a C# `Func<int, int>` of form
```
x=>x+n
```
[Answer]
# Pyth -> K, 4 bytes
```
+z\+
```
K is really easy to abuse here...
[Live demo.](https://pyth.herokuapp.com/?code=%2Bz%5C%2B&input=2&debug=0)
[Answer]
# Brainfuck to Java, 273
```
+[----->+++++.+++++.++++++.[---->++++.+[->++++.-[->+++-.-----[->+++.+++++.++++++.[---->++++.-[--->++-.[----->++-.[->+++.---------.-------------.[--->+---.+.---.----.-[->+++++-.-[--->++-.[----->+++.,[.,]+[--------->+++.-[--->+++.
```
Outputs a method like `int d(int i){return i+42;}` (which doesn't *look* like a Java method, but... Java!)
[Answer]
# POSIX shell to Haskell, 19 bytes
```
read n;echo "($n+)"
```
Anonymous functions being allowed, Haskell is a good output choice with the operator sections.
[Answer]
# PHP → JavaScript (ES6), 20 ~~24~~ bytes
Reading from *STDIN* is always expensive in PHP. It looks a bit strange:
```
x=>x+<?fgets(STDIN);
```
It prints `x=>x+` and waits for user input to complete the string, terminates with the complete anonymous JavaScript function, e.g. `x=>x+2`.
**First version (24 bytes**)
```
<?='x=>x+'.fgets(STDIN);
```
[Answer]
# [Retina](https://github.com/mbuettner/retina) to [Pip](https://github.com/dloscutoff/pip), 4 bytes
Uses one file for each of these lines + 1 penalty byte; or, put both lines in a single file and use the `-s` flag.
```
$
+_
```
Matches the end of the input with `$` and puts `+_` there. This results in something of the form `3+_`, which is an anonymous function in Pip.
[Answer]
# Bash → C/C++/C#/Java, 33 bytes
and maybe others
```
echo "int f(int a){return a+$1;}"
```
[Answer]
## [Tiny Lisp](https://codegolf.stackexchange.com/q/62886/2338) to [Ceylon](http://ceylon-lang.org/), ~~68~~ 61
```
(d u(q((n)(c(q(Integer x))(c(q =>)(c(c(q x+)(c n()))()))))))
```
Tiny Lisp doesn't have real input and output – it just has expression evaluation.
This code above creates a function and binds it to `u`.
You can then call `u` with the argument `n` like this: `(u 7)`, which will evaluate to this Tiny Lisp value:
```
((Integer x) => (x+ 7))
```
This is a valid Ceylon expression, for an anonymous function which adds 7 to an arbitrary integer.
*Thanks to DLosc for an improvement of 7 bytes.*
[Answer]
# JavaScript to [Lambda Calculus](http://www.ics.uci.edu/~lopes/teaching/inf212W12/readings/lambda-calculus-handout2.pdf), 39 bytes
(This uses the linked document as a basis.)
```
alert((x=>`λa(${x}(add a))`)(prompt()))
```
Say input is `5`. Then this becomes:
```
"λa(5(add a))"
```
[Answer]
# Python 2 to CJam, ~~18~~ 20 bytes
*Thanks to LegionMammal978 for correcting the functionality.*
```
print"{%f+}"%input()
```
The Python does a basic string format. `%f` is the code for a float, and since I wouldn't lose any bytes for handling floats, I went ahead and did so.
The CJam is much the same as the Golfscript->CJam answer. It looks something like this:
```
{7.4+}
```
or:
```
{23+}
```
It's a block that takes the top value off the stack, pushes the special number, then adds them.
[Answer]
# [Microscript II](http://esolangs.org/wiki/Microscript_II) to Javascript ES6, 9 bytes
```
"x=>x+"pF
```
[Answer]
# GNU sed to C, 46 bytes
```
sed -r 's/^([0-9]+)$/f(int x){return x+\1;}/'
```
[Answer]
# Vitsy to K, 5 Bytes
\o/ K will be being used very soon if it can do this.
```
N'+'Z
```
or maybe...
```
N'+'O
```
If the input is taken as a string (only for 0-9 input)...
```
i'+'Z
```
All of these, for input 2, will output:
```
2+
```
[Answer]
## [Ceylon](http://ceylon-lang.org/) to [Tiny lisp](https://codegolf.stackexchange.com/q/62886/2338), 76
```
shared void run(){print("(q((x)(s ``process.readLine()else""``(s 0 x))))");}
```
This produces (after reading a line of input) output like `(q((x)(s 5(s 0 x))))`, which evaluates in Tiny Lisp to `((x) (s 5 (s 0 x)))`, a function which takes an argument `x`, subtracts it from 0, and subtracts the result from 5. (Yeah, this is how one adds in Tiny Lisp, there is only a subtraction function build in. Of course, one could define an addition function first, but this would be longer.)
You can use it like this as an anonymous function:
```
((q((x)(s 5(s 0 x)))) 7)
```
(This will evaluate to 12.)
Or you can give it a name:
```
(d p5 (q((x)(s 5(s 0 x)))))
(p5 7)
```
*Corrections and Golfing Hints from DLosc, the author of Tiny Lisp.*
[Answer]
# [Japt](https://github.com/ETHproductions/Japt) → [TeaScript](https://github.com/vihanb/TeaScript), 5 bytes
```
U+"+x
```
This is pretty simple.
---
### Explanation
```
U+     // Input added to the string...
  "+x  // This is the string
```
]


[Question]
      [
Lots of people like to play music for fun and entertainment. Unfortunately, music is pretty difficult sometimes. That is why you're here!
## Task
It's your job to make reading music much easier for those struggling with it. You need to write a program or function that takes as input a musical staff, and outputs the names of the notes written on that staff.
## Staff, clef, and notes
A [musical staff](https://en.wikipedia.org/wiki/Staff_(music)) , or stave, is five horizontal lines, inbetween which are four spaces. Each line or space represents a different note (pitch), depending on the clef.
There are a fair few different musical clefs to choose from, but we'll only be dealing with one for now: the [treble clef](https://en.wikipedia.org/wiki/Clef#Treble_clef). On the treble clef, the notes are represented on the staff as follows:
```
Lines
F  ----------
D  ----------
B  ----------
G  ----------
E  ----------
```
```
Spaces
   ----------
E
   ----------
C
   ----------
A
   ----------
F
   ----------
```
## Formatting of the input
Input will be given as a single string, as follows:
```
---------------

---------------

---------------

---------------

---------------
```
The five lines and four spaces of the staff are constructed out of nine rows of characters. Lines of the staff are constructed with `-` (hyphen) characters, and spaces with  (space). Each row is separated from the next by a single newline character, eg:
`-----\n \n-----\n \n-----\n \n-----\n \n-----\n`
The rows are of arbitrary length (to a reasonable amount that can be handled by your programming language), and each row is exactly the same length in characters as the others. Also note that the rows will always be of a length that is divisible by three (to fit the pattern of one note followed by two columns without a note).
Notes are placed on this staff by replacing the appropriate `-` or  character with `o`. Notes can also be raised (sharp) or lowered (flat) in pitch by a semitone (about half the frequency difference between a note and its adjacent notes). This will be represented by the characters `#` and `b`, respectively, in place of the `o`. Each note will be separated from the next by exactly two `-` characters, and the first note will always occur on the first "column" of `-` and  (space) characters.
When outputting note names, your program should always use the capitalised letters (`A B C D E F G`) corresponding to the note given on the staff. For sharp (`#`) and flat (`b`) notes, your program needs to append `#` and `b`, respectively, to the letter corresponding to the note. For a natural note that is not sharp or flat, a  (space) should be appended instead.
## Example
Input:
```
---------------------o--
                  o
---------------o--------
            o
---------b--------------
      o
---o--------------------
o
------------------------
```
\*note all "empty space" in this example is actually  (space character).
In this case (a simple F major scale), your program should output this:
```
F  G  A  Bb C  D  E  F
```
Note the spacing between the characters of the output should be exactly as shown above, to fit correctly with the notes on the staff. Between all the note names there are two  (space) characters, except between the `Bb` and `C`. The `b` here replaces one of the  (space) characters.
Another example
Input:
```
------------------------
                     o
------------------#-----
               #
------------o-----------
         o
------#-----------------
   #
o-----------------------
```
Output:
`E F# G# A B C# D# E`
One more example for good luck
Input:
```
---------------------
o  o  o     o
---------------------
         o
---------------------

---------------o--o--

---------------------
```
Output:
`E E E C E G G`
## Rules
* Notes will only ever be given in the five line staff range of E flat up to F sharp (except for the challenges, see below)
* Any note could be sharp or flat, not just those seen commonly in music (eg. despite B# actually just being played as C in reality, B# can still occur in the input)
* You can assume there will be exactly one note per 3 columns (so there will be no chords or anything like that, and no rests either)
* You can assume the last note will be followed by two columns with no notes
* You can assume even the last line of the staff will be followed by a single newline character
* Input should be taken from STDIN (or language equivalent) or as function parameter
* Output should be to STDOUT (or language equivalent) or as a return result if your program is a function
* Standard loopholes and built-ins are allowed! Music is about experimenting and playing around. Go ahead and have fun with your language (although recognise that exploiting a loophole may not produce the most interesting program)
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest program in bytes wins
## Bonus challenges
* -10% if your program can also successfully process the space above the top line of the staff (G, G#, Gb).
* -10% if your program can also successfully process the space below the bottom line of the staff (D, D#, Db)
* In these cases your program would take as input an additional row at the start and end; these rows should be treated exactly the same as the other nine rows

[Answer]
## CJam (40 37 \* 0.8 = 29.6 points)
```
qN/z3%{_{iD%6>}#_~'H,65>=@@=+'oSerS}%
```
[Online demo](http://cjam.aditsu.net/#code=qN%2Fz3%25%7B_%7BiD%256%3E%7D%23_~'H%2C65%3E%3D%40%40%3D%2B'oSerS%7D%25&input=%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20o%20%20%20%20%20%0A---------------------o--------%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20o%20%20%20%20%20%20%20%20%20%20%20%0A---------------o--------------%0A%20%20%20%20%20%20%20%20%20%20%20%20%23%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A---------b--------------------%0A%20%20%20%20%20%20o%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A---o--------------------------%0Ao%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A------------------------------%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20%20)
Thanks to [indeed](https://codegolf.stackexchange.com/users/47009/indeed) for pointing out some pre-defined variables which I'd forgotten about.
[Answer]
# Ruby, 106 bytes \*0.8 = 84.8
```
->s{a=' '*l=s.index('
')+1
s.size.times{|i|s[i].ord&34>33&&(a[i%l,2]='GFEDCBA'[i/l%7]+s[i].tr(?o,' '))}
a}
```
Ungolfed in test program
```
f=->s{a=' '*l=s.index('
')+1                                 #l = length of first row, initialize string a to l spaces
  s.size.times{|i|                   #for each character in s
  s[i].ord&34>33&&                   #if ASCII code for ob#
   (a[i%l,2]=                        #change 2 bytes in a to the following string
   'GFEDCBA'[i/l%7]+s[i].tr(?o,' '))}#note letter, and copy of symbol ob# (transcribe to space if o)
a}                                   #return a
t='
---------------------o--
                  o
---------------o--------
            o
---------b--------------
      o
---o--------------------
o
------------------------

'
u='
------------------------
                     o
------------------#-----
               #
------------o-----------
         o
------#-----------------
   #
o-----------------------

'
v='
---------------------
o  o  o     o
---------------------
         o
---------------------

---------------o--o--

---------------------

'
puts f[t]
puts f[u]
puts f[v]
```
[Answer]
# JavaScript (ES6), 144 bytes - 20% = 115.2
```
f=s=>(n=[],l=s.indexOf(`
`)+1,[...s].map((v,i)=>(x=i%l,h=v.match(/[ob#]/),n[x]=h?"GFEDCBAGFED"[i/l|0]:n[x]||" ",h&&v!="o"?n[x+1]=v:0)),n.join``)
```
## Explanation
```
f=s=>(
  n=[],                      // n = array of note letters
  l=s.indexOf(`
`)+1,                        // l = line length
  [...s].map((v,i)=>(        // iterate through each character
    x=i%l,                   // x = position within current line
    h=v.match(/[ob#]/),      // h = character is note
    n[x]=                    // set current note letter to:
      h?"GFEDCBAGFED"[i/l|0] //     if it is a note, the letter
      :n[x]||" ",            //     if not, the current value or space if null
    h&&v!="o"?n[x+1]=v:0     // put the sharp/flat symbol at the next position
  )),
  n.join``                   // return the note letters as a string
)
```
## Test
Remember to add a line above the staff that is the exact length of the other lines because this solution includes parsing the lines above and below the staff.
```
f=s=>(n=[],l=s.indexOf(`
`)+1,[...s].map((v,i)=>(x=i%l,h=v.match(/[ob#]/),n[x]=h?"GFEDCBAGFED"[i/l|0]:n[x]||" ",h&&v!="o"?n[x+1]=v:0)),n.join``)
```
```
<textarea id="input" style="float:left;width:200px;height:175px">
---------------------o--
                  o
---------------o--------
            o
---------b--------------
      o
---o--------------------
o
------------------------
                        </textarea>
<div style="float:left">
  <button onclick="results.innerHTML=f(input.value)">Test</button>
  <pre id="results"></pre>
</div>
```
]