Skip to content

Commit

Permalink
Add instructions for running Web IDE.
Browse files Browse the repository at this point in the history
Also update a few things in the README that seem no longer correct.
  • Loading branch information
Edward Palmer committed Jan 7, 2025
1 parent cd2963f commit 82a2595
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Javascript reimplementation of the software suite described in www.nand2tetris.org and in "The Elements of Computing Systems" by Nisan and Schocken, MIT Press (2nd edition, 2021). The repo also includes the project files described in the website and in the book.

Presently the implementation focuses on the Hardware Simulator (projects 1, 2, 3, 5). The CPU and the VM Emulators will be next. The goal is to allow students complete the projects using modern, web-based tools, without having to download code to their computers.
The goal is to allow students complete the projects using modern, web-based tools, without having to download code to their computers.

Users can work with the tools via a web IDE, or via a VS Code extension. Both are described below.

Expand All @@ -18,6 +18,7 @@ The parts of the user guide that describe the UI may be out of sync with the cod

Install the CLI tool:

npm install
npm run build && npm i -g ./cli

Run the CLI:
Expand All @@ -31,6 +32,15 @@ Run the CLI with a nand2tetris Java install:
cd nand2tetris/project/01
nand2tetris grade --java_ide=${HOME}/nand2tetris

### Web IDE

Build the web IDE:

npm install
npm run build && npm run start

It will print the URL to the console. Any changes will automatically trigger a rebuild.

## Architecture

NAND2Tetris kit is a monorepo with several projects.
Expand All @@ -52,7 +62,7 @@ Simulator objects are also independant of language, and serve equally well to ru

Languages are parsed using [Ohm](https://ohmjs.org/), a parser combinator library.
Ohm works well for simple cases, but does not handle error recovery well.
Replacing or augmenting this to handle a number of errors, rather than only the first, w
Replacing or augmenting this to handle a number of errors, rather than only the first, is a possible future improvement.

### Web

Expand All @@ -66,7 +76,7 @@ Pages should use semantic blocks as much as possible, with special attention on

#### React

The user interface is written in react, using functional components and vanilla hooks as much as possible.
The user interface is written in React, using functional components and vanilla hooks as much as possible.
Pages are routable things, usually with a store connecting it to the appropriate simulation.
Components are reusable pieces of UI, which take props to update their interface.

Expand Down

0 comments on commit 82a2595

Please sign in to comment.