for challenges where the primary part is generating (probably valid) code.
18
votes
1answer
242 views
Convert Brainfuck to MarioLANG
MarioLANG is a two-dimensional programming language where the source code resembles a Super Mario Bros. level. Furthermore, its instruction set is very similar to Brainfuck's. This means that ...
1
vote
2answers
336 views
Quit Whining; Start Quining
Quit Whining; Start Quining
Goal:
Write a function or program that, given an integer n, will output a program in the same language that is a quine with a period of n.
Description of Output Program:
...
1
vote
1answer
200 views
Quine permutation group
Write a program or function which, when run, outputs another program or function which is valid in the same language as the original program, and which itself will output another program or function ...
14
votes
2answers
616 views
Translate RoboCritters into Brainf***
RoboCritters (etymology) is a brand new esoteric programming language (don't bother searching for it, I just invented it). It's a variant of Brainfuck (BF), slightly more complex than the usual ...
4
votes
6answers
609 views
Convert Brainfuck to a Non-Golfing Language
Input:
Any Brainfuck program. This includes brainfuck programs with comments such as +++COMMENT[>+++<-]..
Output:
A program in one of the below languages that produces the same output as the ...
0
votes
1answer
76 views
Pythy Finite Ordinals [duplicate]
Write a program in any language that takes a single natural number n as input and generates a Pyth program that, in turn, produces, using nested lists, the nested set given by S(n), where:
S(0) = ...
15
votes
4answers
964 views
Make the largest infinity that you can!
The ordinal number system is a system with infinite numbers. A lot of infinite numbers. So many infinite numbers that it literally does not have an infinity to represent its own infiniteness. The ...
15
votes
2answers
720 views
String to Image
A bit of background:
When I first learned about Brainf*ck, one of the first things I did was to write a Java application that would take in a string and create a, somewhat, optimized program to print ...
6
votes
2answers
360 views
Implement multiplication by a constant with addition and bit shifts
While looking at the ARM instruction set, you notice that the ADD instruction has the so-called "Flexible second operand", which can be abused for quick multiplication. For example, the following ...
11
votes
4answers
444 views
Encoding an URL in brainfuck
Inspired by this question, your goal today is to encode an URL in brainfuck.
My browser has been hacked! The location bar has been turned into a brainfuck interpreter. I need a program that turns an ...
8
votes
3answers
657 views
Self-shortening Prime Tester
Let's get right in to it.
Your challenge is to make a program that does these things depending on its input:
If the input is a number, output "Prime" if the number is a prime number and "Not prime" ...
11
votes
7answers
597 views
Generate a Brainf_ck program that outputs a string of given length
Your friend is trying to break into a vault that has a peculiar locking system: it requires a certain number of gentle knocks in a particular spot. Your friend discovered the number (which is in the ...
15
votes
5answers
795 views
Make any number by repeatedly adding 2 numbers
You are given a machine with two 16-bit registers, x and y. The registers are initialized x=1 and y=0. The only operation the machine can do is addition modulo 65536. That is:
x+=y - x is replaced ...
11
votes
2answers
376 views
Generalized Quine Generator
The Challenge
In this challenge, you specify a source language S and a target language T. Your task is to write the following program P in the language S. If a valid program Q in the language T is ...
6
votes
4answers
776 views
Create a FizzBuzz compiler
Welcome to the world of compiler golf. Your task is to write a program that generates another program to play a variant of FizzBuzz on spec.
Your compiler
Write a compiler that generates variants of ...
12
votes
6answers
1k views
Fibonacci program lengths
Write a program with length n that outputs another program whose length is the next Fibonacci number after n. The new program must do the same thing - output another program whose length is the next ...
2
votes
2answers
258 views
Generate code in another language [duplicate]
Write a program in language A which outputs a program in language B where:
Language A != Language B
The output is itself a solution to this question.
This is a popularity contest. If you want ...
7
votes
2answers
557 views
Create self-extractor script (relaxed rules)
This is the target language-relaxed version of Generate a self-extractor application
Create a program in any language, that takes an arbitrary binary input, and generates a valid program (also in any ...
4
votes
2answers
404 views
Generate a self-extractor application
Create a program in any language, that takes an arbitrary binary input, and generates a valid C++11 program, which when compiled and run will print this binary input.
So you could do this (on linux ...
15
votes
4answers
1k views
Convert Fractran into Brainfuck
Background
Fractran is an esoteric Turing-complete programming language invented by John Conway. A Fractran program consists of an ordered list of fractions. The program starts by taking a single ...