Questions tagged [interpreter]

An interpreter is a computer program which directly executes instructions written in a programming language.

Filter by
Sorted by
Tagged with
43
votes
1answer
3k views

Charmander Brainfuck interpreter in Haskell

I just started learning Haskell and this is my first big project (ie not factorials, fibonacci or graphers). This is kind of a gift for somebody so the language is a bit different. The program works, ...
5
votes
1answer
185 views

Termios/Xterm line editor for APL interpreter

As an interesting sub-part of an interpreter -- just the Read part of the REPL -- I present my raw-mode line-oriented editor that I intend to use for my APL interpreter. (The Eval part has been posted ...
5
votes
2answers
1k views

BrainFuck Interpreter in C++

Generic Headers #include <vector> #include <string> #include <iostream> #include <fstream> typedef std::string const BFProgram; ...
23
votes
1answer
1k views

Brainfuck interpreter in JavaScript

Just what it says on the tin: a brainfuck interpreter in JavaScript. ...
6
votes
3answers
309 views

Brainfuck Interpreter in JavaScript 3

I have this Brainfuck interpreter: ...
11
votes
1answer
319 views

Brainfuck interpreter in JavaScript, take 2

The previous version is here. This version takes suggestions from that review into account: brainfuck is now an object instead of a function, and ...
7
votes
1answer
320 views

Brainfuck Interpreter: Slower than a Snail?

Inspired by FizzBuzz by Brainfuck, I decided to write an interpreter for Brainfuck. It: Removes all non-command characters Optimizes commands (removing +- and <...
6
votes
1answer
164 views

Encoding data into integer handles for language interpreter

As an integral part (pun intended) of my APL interpreter (previous questions: 1 2 3 4), this suite of functions converts any data into integer handles. APL operates on arrays of data cells, so with ...
2
votes
1answer
103 views

Haskell Brainf*ck interpreter: runtime error handling

I have designed a Brainf*ck interpreter in Haskell. I would appreciate the code review, especially any tips related to error handling (e.g. parsing errors, runtime errors, etc.). ...
73
votes
2answers
8k views

Brainfuck Interpreter written in x86 Assembly

Story time: A week ago I found a question about optimizing Assembly code, then I remembered how awesome Brainfuck was, and the match was made very quickly. I decided to write a Brainfuck Interpreter ...
11
votes
1answer
68 views

Local source control

I've written my own local "source control". Rather than using a commit-based system, when you're ready to release a version, you can run a command which will create a ...
15
votes
2answers
172 views

Interactive Brainfuck interpreter in Haskell

Last week I started learning Haskell, and since I have some experience with Brainfuck already, I decided it would be a great idea to implement an interactive Brainfuck interpreter in Haskell. I'll ...
12
votes
2answers
3k views

Brainfuck interpreter in C

This is my bare-bones Brainfuck interpreter in C using lots of unixisms. What improvements can I make (with respect to the clarity of code, or obvious features to add)? ...
11
votes
3answers
524 views

“Nothing” interpreter/compiler

This is an implementation of the Nothing programming language. The language spec is as follows: Design philosophy In the current software industry focus lays on solving complex problems by ...
8
votes
2answers
159 views

Brainfuck interpreter in C 3

I created my brainfuck interpreter and I would like to know what can be done better and is the code clear and readable. I will be very thankful for opinions and suggestions. Here is the code: ...
7
votes
1answer
419 views

Befunge-93 interpreter in Python

I was doing some CodeFights and had alot of fun with this Befunge challange Problem statement While exploring the ruins of a golden lost city, you discovered an ancient manuscript containing ...
7
votes
1answer
502 views

Basic BrainFuck interpreter

I was bored, so I wrote a BrainFuck interpreter in Python. It essentially takes input for the amount of cells, then parses the inputted code through a series of if ...
5
votes
2answers
2k views

Basic Brainfuck Interpreter in C

I have written a small Brainfuck interpreter in C. More recent version hosted here. I have found it very hard to test my interpreter because writing a program in Brainfuck is somewhat hard (or at ...
18
votes
3answers
263 views

Brainfuck interpreter (with emphasis on robustness)

While writing a review of @MotokoKusanagi's Brainfuck interpreter, I decided to write my own implementation to illustrate a few points. In particular, I'd like it to be robust to malformed programs, ...
10
votes
1answer
1k views

Read stdin like a dictator

Rags. Introduction All too often I find myself wanting to allow only a certain list of characters to be written to stdin, and only recently did I actually bother ...
6
votes
1answer
99 views

Yet another BrainF*** Interpretter in Haskell

I wrote a BrainF*** interpretter in Haskell. A general review would be helpful and especially, a suggestion with a better way to deal with the IO (IO Memory, IO ()) ...
5
votes
2answers
345 views

BF interpreter in Python that uses recursion to handle loops

I wrote a Brainfuck interpreter in Python and I'm wondering how to simplify it. I handle separately loop commands and the others. A recursive function deals with loops. ...
4
votes
1answer
52 views

Local source control - Part 2

I've refactored the previous version of my local source control, and revised a few things. It's mostly the same, but there are a few minor differences, like the argument separator, one new command, ...
4
votes
2answers
630 views

BF interpreter written in C#

I have recently written a Brainfuck interpreter in C#. I tested it with the examples given on EsoLang website. It does not handle errors right now. Questions: Even that it can run only one program ...
3
votes
1answer
68 views

Binary Bayes network classifier in Java - Part I/II - follow-up

TERMINOLOGY We are given a directed acyclic graph (dag) \$G = (V, A)\$, where \$V\$ is the set of nodes and \$A \subseteq V \times V\$ is the set of directed arcs, and a weight function \$p \colon V \...
2
votes
1answer
109 views

Meta-circular interpreter for lambda calculus in Haskell

For learning purpose, I've written a simple lambda calculus interpreter (plus 'Add'). I would like it to be the cleanest and most idiomatic possible. Bonus question: how would you use ...
2
votes
1answer
105 views

Small stack based language in Rust

I made a small stack-oriented language in Rust. It tries to run anything it is given. To elaborate: Division by zero gives zero. If there is nothing on the stack and a request is made that involves ...
2
votes
1answer
219 views

Arbitrary-dimensional arrays with transpose and slice

This is the primary module for my APL interpreter. The general idea is motivated by my two Stack Overflow questions, but the details I fear are easy to get wrong and I suspect there are a few corners ...