The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [interpreter]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
36 views

User defined function call on a stack based interpreter for concatenative language

I would like to receive some advice on how to improve a small concatenative stack-based interpreter, executing a joy-like programming language. It is really minimal, and is in fact a subset of a ...
11
votes
1answer
186 views

Portable BrainFuck Interpreter in ANSI C89

I wrote this BrainFuck interpreter in ANSI C89: ...
4
votes
1answer
58 views

Meta-circular interpreter for lambda calculus in Python

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. Can we make it as neat as the Haskell version? <...
2
votes
1answer
103 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 ...
4
votes
0answers
93 views

Brainfuck interpreter written in Rust

I'm learning Rust at the moment by reading the book (currently on chapter 17). I wrote this simple Brainfuck interpreter, because I think that it's always a fun exercise. The program consists of ...
2
votes
0answers
56 views

Program to draw ASCII art based on commands

I want to know how to improve the design of Canvas drawing implementation. Canvas Drawing This solution is to implement a console-based canvas drawing application. Problem Statement Description ...
6
votes
2answers
152 views

115 line brainfuck interpreter written in C++

This is a simple brainfuck interpreter I've written in C++. It takes a path to a brainfuck source file as a command line argument. The program uses a tape size of 30000 and cell size of one byte. ...
3
votes
1answer
62 views

Verbose Brainfuck Interpreter in C

I decided to try and write a Brainfuck interpreter in C as an exercise. This could have been written in one file, but I decided to split it up into a State "class" and an some interpreter methods. An ...
2
votes
1answer
44 views

Convert Tail-Call Recursive Code to Loop [closed]

So, I'm in the midst of writing a programming language interpreter in Python, and one of the problems I'm concerned about is that since I've been using a lot of recursions to implement the interpreter,...
7
votes
0answers
92 views

(Lisp in (Rust))

I loved Norvig's Lispy, and made the first version of it in Rust, to learn Rust. I would love your thoughts :) A few specific questions: Is there a way to write ...
2
votes
2answers
32 views

Brainfuck interpreter improvement

I created a brainfuck interpreter in javascript. It works good to me as I have seen no bugs in my compiler. I like to get a suggestion and review from you to what should this compiler improve. Here'...
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: ...
2
votes
1answer
105 views

Simple Brainfuck Interpreter in Rust

Not a long time ago, I got into Rust and I made a simple Brainfuck Interpreter. Now I want to get back to Rust and I would like some comments on my code: Just in case it's hard to read code from post:...
2
votes
1answer
84 views

Second take at a stack based langauge

I recently asked for a review of a stack based language I made in Rust. I made a lot of changes since then and a lot has changed. Hopefully I haven't gone backwards in progress. Most notably: I ...
5
votes
1answer
84 views

JIT-based programming language

I'm working on JIT-based programming language using DynASM (before I was generating instructions directly). Review of the code would be really appreciated - It's my first time fiddling with DynASM. ...
2
votes
0answers
67 views

RPN calculator in Chicken Scheme

My first attempt at Scheme (Chicken Scheme) - a simple RPN calculator. Please comment on exception handling as well as the general coding style. Here is the code: ...
2
votes
1answer
104 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 ...
7
votes
1answer
155 views

Peter Norvigs' lis.py in c++17

I wanted to try convert Peter Norvigs' Python Scheme interpreter to C++. I had tried this a few years before and failed abysmally but I saw that the latest C++ standard includes several features ...
4
votes
1answer
135 views

Main loop in assembly for a Brainfuck interpreter

I have written 2 Brainfuck interpreters, one in C++, then another in C++ with Assembly inner loop. My interpreter code can be found here (C++/ASM, requires MSVC and MASM) and here (C++). Both are ...
5
votes
1answer
115 views

Simple interpreter written in Rust

I'd like to improve how ownership is handled within a simple interpreter written in Rust. The interpreter takes simple calculator like expressions and returns either a string of the AST or a number ...
7
votes
1answer
204 views

A simple brainf*** interpreter in Haskell

I am very new to Haskell and come from languages like C++, although I do have some experience with Scheme. Here, I wrote a simple brainf*** interpreter, which so far is my largest project. I followed ...
5
votes
1answer
67 views

Interactive complete Brainfuck Interpreter

This is another Brainfuck interpreter in Python. I personaly think this is better than most of the other once you find online, because it keeps a bracket_map, which ...
6
votes
1answer
82 views

TinCan (Esolang) Interpreter in Haskell

Haskell newbie here. Wanted to improve my skills by re-implementing an esolang I designed back in 2011 called TinCan. If there are things that are perhaps badly coded or unclear things due to my ...
8
votes
2answers
137 views

Starting point for a collaboratively developed golfing language interpreted in Python

Over on Code Golf, we've decided, for once, to write some readable code! However, we're obviously not very good at that, so we need your help to make it even better. I've proposed this challenge on ...
3
votes
1answer
100 views

AST-based Brainfuck interpreter in Haskell

Since implementing my Interactive Brainfuck interpreter in Haskell I figured that it would be a good idea to build upon an Abstract Syntax Tree. I have also decided to drop replacing the ...
15
votes
2answers
171 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 ...
3
votes
1answer
172 views

Virtual Machine in C to run C

Basically ANOTHER follow up to this review here but I've set about in completing the software project. Changes from the previous review is that I've added a complete script format with embedding API, ...
1
vote
0answers
65 views

Brain-flak interpreter

I'm learning Go, so I decided to make a Brain-flak interpreter for practice. ...
5
votes
1answer
151 views

Brainfuck interpreter in F# (by a C# developer)

I'm a C# developer learning F#. I have a lot of questions about practices and principles within the code. I would like to know what a "native" F# developer would've done differently. ...
7
votes
1answer
399 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 ...
5
votes
1answer
235 views

Axiomatic Lisp interpreter in C

This is not obfuscated. Or at least, that's not the intent. Let me try to address that concern straightaway. The goal here is brevity in the vein of Strunk&White. Nor is this codegolf, although ...
1
vote
1answer
64 views

Performs calculation with operators given in an unknown order

Problem Statement Write a simple interpreter which understands "+", "-", and "*" operations. Apply the operations with the correct order of operations (i.e. ...
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.). ...
5
votes
2answers
2k views

Writing an interpreter for a toy language in Java

I am working on a project that involves me writing an interpreter for a small toy language in Java, and while I intend to build it into a fully featured programming language at some point, it is ...
3
votes
1answer
379 views

Lisp Interpreter written in JavaScript

I had a task to reduce my Lisp Interpreter from 400 lines to 120 lines. I was able to bring it down to 255 lines without including newline after every function. I'm not able to figure out where I can ...
7
votes
3answers
442 views

Reverse Polish Notation shell interpreter with one variable in C

I wrote an RPN shell stack-based interpreter. It supports following operators: +, -, *, <...
12
votes
2answers
958 views

Repetitive unit tests for a programming language

I've got a recreational regex-based programming language called Retina. Before the next big refactoring of the interpreter, I want to rework how I test the code. The interpreter class works such that ...
6
votes
1answer
106 views

Brain Flak implementation in Haskell

I'm a beginner to Haskell and functional programming as a whole and as a first project I've written a Brain-Flak implementation in Haskell. I wanted to get some feedback on this implementation ...
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 ()) ...
3
votes
1answer
88 views

Python Brainf*ck interpreter

What do you think of my Brainf*ck interpreter? What else can be done to increase speed? ...
3
votes
1answer
146 views

Bytecode Interpreter for a custom programming language

Over the past week, I've been working on a project that works as an interpreter of sorts for bytecodes in a custom language that would run in a "live" environment. It works, in a sense (I don't have a ...
5
votes
0answers
86 views

Clojure BrainF*** Interpreter

Since I want to try writing my own language at some point, I wanted to have some experience writing an interpreter. BrainFuck is the simplest language I (kind of) know, so I decided to try writing an ...
3
votes
1answer
85 views

What's so bad about HODOR?

I am writing a recreational language based off the speech pattern of Hodor from Game of Thrones. Basically the only commands are Hodor. You can find the complete ...
5
votes
0answers
96 views

brainF*** interperter in lua

For a personal project I may need to load and execute something that will basically be a very simple programming language. Though I am not at all close to this part of the project yet and I can most ...
3
votes
1answer
154 views

Brainfuck interpreter using interpreter and composite patterns

I wrote this brainfuck interpreter in C++ using interpreter and composite patterns. I would like to make this code more scalable. Indeed, if we need to add a extra command, we'll have to add a new ...
4
votes
1answer
89 views

Brainf**k interpreter in Ruby

I wrote this interpreter for a code challenge. Can this be written any cleaner/smaller? Could I reduce the amount of nested conditional/loops? ...
3
votes
1answer
128 views

YABI: Yet Another Brainfuck Interpreter written in C

Syntax is ./bf-interpreter <program.bf>. ...
72
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 ...
7
votes
1answer
451 views

Object-oriented Brainfuck interpreter

Inspired by this question, I decided to give it a try and implemented a brainfuck interpreter myself. It includes various improvements: It's object-oriented and modular Unlimited tape size It ...
4
votes
2answers
625 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 ...