560 blogs tracked4,950 posts indexed

#interpreters

10 posts · 1 company · newest first

1

Implementing Co, a Small Language With Coroutines #5: Adding Sleep (opens on the source site)

In the previous post, we added channels to Co, the small language we are implementing in this series of posts. In this post, we add the sleep primitive to it, enabling time-based coroutine scheduling. We then use sleep to build a simulation of digital logic circuits.

programming-languagesinterpretersexcerpt only · body stays at the source
From the web
2

A Fast Bytecode VM for Arithmetic: The Virtual Machine (opens on the source site)

In this series of posts, we write a fast bytecode compiler and a virtual machine for arithmetic in Haskell. We explore the following topics: Parsing arithmetic expressions to Abstract Syntax Trees (ASTs). Unit testing for our parser. Interpreting ASTs. Compiling ASTs to bytecode. Disassembling and decompiling bytecode. Unit testing for our compiler. Property-based testing for our compiler. Efficiently executing bytecode in a virtual machine (VM). Unit testing and property-based testing for our VM. Benchmarking our code to see how the different passes perform. All the while keeping an eye on…

interpretersvirtual-machinesexcerpt only · body stays at the source
From the web
3

A Fast Bytecode VM for Arithmetic: The Parser (opens on the source site)

In this series of posts, we write a fast bytecode compiler and a virtual machine for arithmetic in Haskell. We explore the following topics: Parsing arithmetic expressions to Abstract Syntax Trees (ASTs). Unit testing for our parser. Interpreting ASTs. Compiling ASTs to bytecode. Disassembling and decompiling bytecode. Unit testing for our compiler. Property-based testing for our compiler. Efficiently executing bytecode in a virtual machine (VM). Unit testing and property-based testing for our VM. Benchmarking our code to see how the different passes perform. All the while keeping an eye on…

parsersinterpretersexcerpt only · body stays at the source
From the web
5

Going REPLing with Haskeline (opens on the source site)

So you went ahead and created a new programming language, with an AST, a parser, and an interpreter. And now you hate how you have to write the programs in your new language in files to run them? You need a REPL! In this post, we’ll create a shiny REPL with lots of nice features using the Haskeline library to go along with your new PL that you implemented in Haskell.

programming-languagesinterpretersexcerpt only · body stays at the source
From the web
8

Implementing Co, a Small Language With Coroutines #3: Adding Coroutines (opens on the source site)

In the previous post, we wrote the interpreter for basic features of Co, the small language we are building in this series of posts. In this post, we explore and implement what makes Co really interesting: support for lightweight concurrency using Coroutines.

programming-languagesinterpretersexcerpt only · body stays at the source
From the web
10

Implementing Co, a Small Language With Coroutines #2: The Interpreter (opens on the source site)

In the previous post, we wrote the parser for Co, the small language we are building in this series of posts. The previous post was all about the syntax of Co. In this post we dive into the semantics of Co, and write an interpreter for its basic features.

programming-languagesinterpretersexcerpt only · body stays at the source
From the web
10 shown

Privacy choices

Reading never requires analytics. These choices last 90 days on this browser.

Essential sign-in and security storage always stays on. Read the privacy notice.