Coder Social home page Coder Social logo

akihirotajima / nand2tetris Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fhightower/nand2tetris

0.0 0.0 0.0 897 KB

License: GNU General Public License v3.0

Shell 1.27% Assembly 63.03% Scilab 23.44% Hack 0.16% HTML 11.09% Batchfile 0.94% Dockerfile 0.07%

nand2tetris's Introduction

nand2tetris

Intro

This repo contains scripts and content to interactively read the nand2tetris book (a.k.a. "The Elements of Computing Systems") while running the scripts and programs in a docker container.

Setup

This setup is designed for users on MacOS; users on other OS-es will have to do analogous steps with different commands.

brew install socat
brew install xquartz

# log out and back in
open -a Xquartz
# update preferences as defined here: https://cntnr.io/running-guis-with-docker-on-mac-os-x-a14df6a76efc#:~:text=Now%20open%20up%20the%20preferences%20from%20the%20top%20menu%20and%20go%20to%20the%20last%20tab%20%E2%80%98security%E2%80%99.

Usage

Run socat in a terminal window "to create a tunnel from an open X11 port (6000) through to the local UNIX socket where XQuartz is listening for connections" (source). Socat will block, so you'll need to open another window after running this command:

socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

Now, in another window, run this:

ifconfig en0 | grep "inet " | cut -d' ' -f2

Finally, we are ready to run our docker container (replacing <YOUR-LOCAL-IP-HERE> with the $LOCAL_IP from the previous code block):

docker-compose run --rm dev
export DISPLAY=<YOUR-LOCAL-IP-HERE>:0
bash nand2tetris/tools/HardwareSimulator.sh

Credits

nand2tetris's People

Contributors

fhightower avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.