Skip to main content

Questions tagged [compiler]

Tasks involving writing compilers for various languages or formalisms.

Filter by
Sorted by
Tagged with
1 vote
1 answer
156 views

I would like to create a language that is specifically designed for compiling/translating to another Turing tarpit language. I want to make the program of the target language to be as short as ...
Fmbalbuena's user avatar
  • 5,105
7 votes
3 answers
925 views

There was a prior question about golfing an HQ9+ compiler that translates HQ9+ code into the language it is written in, but that was closed as a duplicate of the interpreter challenge because ...
Someone's user avatar
  • 1,252
10 votes
4 answers
2k views

the goal Build an optimizing Brainfuck implementation. Whether it is a compiler, an interpreter, a JIT compiler, or whatever else is up to you. scoring A reference implementation (...
xiver77's user avatar
  • 2,395
8 votes
5 answers
556 views

This is the robbers' challenge. To post a cop, go here. In this challenge, cops will invent a (likely simple) programming language, and write an interpreter, transpiler, or compiler that allows you to ...
rydwolf's user avatar
  • 19.3k
15 votes
9 answers
1k views

This is the cops' challenge. To post a robber, go here. In this challenge, cops will invent a (likely simple) programming language, and write an interpreter, transpiler, or compiler that allows you to ...
rydwolf's user avatar
  • 19.3k
13 votes
2 answers
537 views

Write a program that translates an arithmetic expression to a Brainfuck program which evaluates the expression and prints the result in decimal numbers. For example, this arithmetic expression, ...
xiver77's user avatar
  • 2,395
10 votes
1 answer
365 views

In this challenge you will remove one of my least favorite features, operator precedence from traditional math notation, to acheive the syntax of one of my favorite languages, APL. The APL subset we ...
Wezl's user avatar
  • 1,496
22 votes
12 answers
2k views

Background Roman numeral is a simple number system with the following properties: Each symbol in the system maps to a specific value. (e.g. ...
Wezl's user avatar
  • 1,496
12 votes
1 answer
436 views

Background There are self-extracting .ZIP files. Typically they have the extension .EXE (and by executing the file they will be ...
Martin Rosenau's user avatar
6 votes
1 answer
229 views

Quarterstaff repo here with additional quarterbf interpreter: rather bereft of documentation, however, but it does contain the two interpreters you can go to https://tio.run/#quarterstaff to run ...
Destructible Lemon's user avatar
26 votes
5 answers
2k views

Note: This challenge only allows answers in compiled languages Task Your task is pretty simple, make two different programs that when compiled result in the same output. Scoring Here is where the ...
Wheat Wizard's user avatar
  • 103k
6 votes
1 answer
325 views

Just curious if someone can provide a short example of code that causes a compiler's optimizer to behave incorrectly: without optimization (or at lower optimization), code takes X seconds to run with ...
Jason S's user avatar
  • 187
3 votes
0 answers
276 views

Not an interpreter. Arguably a compiler. But I'm talking about a transpiler. It can be in any language, but it must return js-valid arrow notation code. The λ-calculus string would be passed as an ...
towc's user avatar
  • 344
8 votes
5 answers
1k views

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 ...
Rohan Jhunjhunwala's user avatar
9 votes
1 answer
215 views

A fun programming exercise is to write a program that quizzes the user from a set list of questions and answers. However, this task goes a level beyond that. Your task Write a program/func/etc. that ...
Maltysen's user avatar
  • 25.8k
16 votes
10 answers
2k views

A language that is very useful in restricted source and other such challenges is Unary, a brainfuck derivative in which programs are written in with only one character. Your job is to write a program ...
Maltysen's user avatar
  • 25.8k
17 votes
13 answers
2k views

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 ...
billpg's user avatar
  • 2,045
13 votes
3 answers
2k views

Write a program that takes a brainfuck program and compiles it to executable machine code. You can target x86, x86_64, jvm (java bytecode) or armv6, and use one of the following executable formats: ...
aditsu quit because SE is EVIL's user avatar
38 votes
7 answers
4k views

This is based on a talk on compilers I listened to a while back, but I, unfortunately, can't remember when or where. Create the shortest compiler in any language that can compile itself. Target any ...
Hoa Long Tam's user avatar
  • 2,142