An interpreter is a computer program which directly executes instructions written in a programming language.
5
votes
2answers
95 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.
...
-3
votes
1answer
69 views
JavaScript Brainfuck interpreter [closed]
I wrote a Brainfuck interpreter in JavaScript, however it is quite buggy and I can't figure out what I'm doing wrong. It works for programs I've written, but fails on most programs I find on the ...
4
votes
1answer
56 views
Fuzzy Octo Guacamole interpreter
This is my code that interprets my own golfing and esoteric language, Fuzzy-Octo-Guacamole.
It has 2 stacks to store information in, and various operations can be performed on each stack, or both at ...
7
votes
3answers
186 views
4
votes
2answers
72 views
MS-DOS style OS
This is a very basic text-based operating system I've been working on. I started working with python a few weeks ago and this project only a few days ago, so there are probably better ways I can do ...
8
votes
1answer
67 views
Implementing Multi-File Programs in Vitsy
I'm the proud owner of the Vitsy programming language, which I've been working on for some time (except recently, because high school). It's only been used in PPCG so far, but I hope to expand it to ...
6
votes
1answer
89 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 ...
17
votes
1answer
147 views
Golf some Code with A-Ray
For some of those in The 2nd Monitor, you know that I was creating a new golfing language. For one or two (@Quill), you have heard from me how tough it is.
A-Ray (that's what it's called) is a ...
6
votes
1answer
93 views
Roman numerals with ANTLR
I've written a simple interpreter with ANTLR for evaluating Roman numerals. Here's the contents of the grammar file (Roman.g4):
...
5
votes
1answer
73 views
Constructing a simple shell from scratch
I'm actually doing my whole shell in C from scratch from a Linux computer.
The thing is that I think we all do our best from creating the simplest things that can be explained easily. And I'm not sure ...
2
votes
0answers
52 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 ...
6
votes
1answer
62 views
BF Interpreter, Follow-up: ++;++; is now +=2;
Follow-up to: Brainfuck Interpreter: Slower than a Snail?
Many improvements have been added, including:
Remembering where the matching [ and ...
14
votes
3answers
453 views
BF#: Round 2 (Fight!)
So I've completely changed how BrainfuckSharp does things, and added some features. This is obviously a follow up to: Interpreting Brainfuck code to C#, then compiling to a .exe
It now features an ...
8
votes
1answer
213 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 ...
7
votes
3answers
105 views
Simple interpreter for a golfing language
This is the seconds version of an interpreter yesterday. It's supposed to be used for code golf, but it currently can't do much.
...
2
votes
1answer
122 views
Very simple interpreter
I created a very simple interpreter in Python. It's capable of doing basic math (unfortunately with only two numbers), creating quines and printing text.
...
4
votes
1answer
117 views
Dynamic Language Interpreter in C#
This code interprets an abstract syntax tree generated by a recursive descent parser for a dynamic scripting language called Hassium. The syntax of this language looks like this
...
3
votes
1answer
53 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 ...
7
votes
1answer
112 views
Mini BF interpreter
Many Brainfuck implementations I've come across generally are obtuse, verbose or over-the-top. But I've always seen Brainfuck as "easy to implement", especially for beginners.
My original need for ...
11
votes
3answers
488 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 ...
4
votes
2answers
98 views
Reverse Polish Notation in F#
In my question to learn F#, I've decided to get one step closer to creating a programming language, and implement this simple Reverse Polish Notation "interpreter" of sorts.
It does not allow for ...
4
votes
1answer
33 views
Simple 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, ...
10
votes
1answer
53 views
Simple 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 ...
6
votes
1answer
66 views
Brainfuck interpreter in Clojure
I'm currently learning Clojure to try to get a good understanding of functionnal programming, so I wrote this brainfuck interpreter that takes a filename on the command line. I tried to make it as ...
12
votes
2answers
281 views
Abstract syntax tree for simple Lisp-like interpreter
A week or so ago, I wrote a binary expression calculator with the hope of better understanding how interpreters and compilers work. In the same vein, I've tried to write a lisp like language ...
15
votes
3answers
150 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, ...
9
votes
0answers
225 views
Rust Brainfuck interpreter
I took the code from kostyas benchmarks for the Rust Brainfuck interpreter and tried to optimize it. There is also a discussion on Reddit about the poor performance of Rust in the Benchmark.
Before ...
11
votes
1answer
136 views
Reference Implementation for Honey Badger programming language
I've been working on my own dynamically-typed, dynamically-scoped, imperative programming language called Honey Badger and feel that it's reached a stable enough state that I want someone else's eyes ...
15
votes
1answer
657 views
JediScript - May the 4th be with you
In honor of Star Wars day, I've put together this small Python program I'm calling JediScript. JediScript is essentially a scrapped-down version of BrainFuck without input or looping. Here are the ...
11
votes
1answer
135 views
NotBF - A Brainfuck-ish like “language”
I've made an interpreted language that's like Brainfuck except it has keywords instead of characters. Here's an explanation of the commands, and how to run it.
...
4
votes
1answer
297 views
Drawing the appropriate shapes onto JFrames
To write a Java class that reads through a text file of drawing commands and draws the appropriate shapes onto JFrames, I have input instructions as follows:
...
8
votes
1answer
209 views
Brainfuck interpreter in F#
I have some concerns, like the updateValue function. I was trying to follow the functional paradigm, but I wonder if I could use another approach or something.
My ...
5
votes
2answers
482 views
BrainFuck Interpreter in C++
Generic Headers
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
typedef std::string const BFProgram;
...
18
votes
3answers
2k views
Brainfuck on-the-fly interpreter in C++
I was bored yesterday morning, so I wrote a brainfuck interpreter.
I know there are a lot, but this one is different. Why? Because it evaluates brainfuck code on the fly, reading from the input file, ...
5
votes
2answers
83 views
Another Brainfuck interpreter in Haskell
I came up with the following Brainfuck interpreter in Haskell after thinking about how to represent the program and the memory functionally using zippers to represent current location. This works ...
10
votes
3answers
204 views
Brainf*** Interpreter in C
I posted a question on Stack Overflow regarding this program. I ended up pretty much rewriting everything to get what is posted here. This turned into a two-day long project. I've been using Python ...
7
votes
2answers
312 views
Brainfuck interpreter in Haskell
Okay, so I just started learning Haskell around a week ago and this is my first real program that I worked on all of yesterday with a lot of help from IRC. I know that using indicies and arrays is not ...
5
votes
1answer
153 views
Simple evaluator of Scheme-like expressions in Haskell
This is my first nontrivial Haskell program:
...
16
votes
2answers
1k views
Brainfuck Interpreter in Java
Description
To increase the awareness of my previous brainfuck question here's also a brainfuck interpreter.
This is written with Java 8
Class Summary (298 lines in 4 files, making a total of 7409 ...
5
votes
1answer
97 views
Random “programming language”
I decided to write my own programming language, of sorts. Essentially, you write code into a text file and the program will run the code inside the text file. The file is provided through a script ...
4
votes
3answers
443 views
Basic math interpreter
Essentially what I've done here is written an Interpreter that takes in Python math, such as this, 23 ** 374748, and prints out the result. This program relies on ...
4
votes
2answers
458 views
Basic Brainfuck interpreter (part 2)
I have this obsession with esoteric programming languages. So I decided to spiff up my previous Brainfuck interpreter.
...
11
votes
1answer
235 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 ...
15
votes
1answer
522 views
Brainfuck interpreter in JavaScript
Just what it says on the tin: a brainfuck interpreter in JavaScript.
...
7
votes
1answer
406 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 ...
7
votes
1answer
71 views
Primitive stack-based code interpreter
I've written an interpreter for a simple assembly-like language and it's performing slower than I would like.
It's split into 3 files: the Parser that converts the source to a vector of ints, the VM ...
10
votes
2answers
654 views
Four-function expression evaluator
I've been making an interpreter for my own programming language that I've been working on as a hobby. I made an expression evaluator that can evaluate simple mathematical expressions.
It understands ...
4
votes
2answers
270 views
Calculator with significant figures
I'm writing a small scientific programming language, and I thought my first step would be to write a calculator with built in significant figures. I wrote this with JParsec for the lexing and parsing. ...
10
votes
2answers
496 views
Virtual machine using RPython and PyPy
I'm writing a virtual machine in Python using RPython and the PyPy toolchain. The RPython will still work in the ordinary Python 2 interpreter; it's just a bit slow unless it's compiled to C code with ...
16
votes
2answers
955 views
Making my own programming language
This question is really to help me decide on something. I have started development of my own programming language that I am calling DeliciousWaffle (or maybe samscript).
So far it looks pretty cool. ...