A joint project between Chip Gracey and Stephen M Moraco. We are re-implemting Pnut for Windows in a platform agnostic language.
On this Page:
- Simplified project goals
- Accomplishments of this port effort
- Possible Futures
- Typescript References - good references for studying TypeScript
- Extensions for viewing X86 code - during the project we are porting x86 code. These extensions help us view the x86 code
- Repository Configuration - more about this Repo.
Additional pages:
- Repository README - top level page
- Pnut-TS Command-line - command line reference
- Pnut-TS Preprocessor - conditional compilation support
- PNut-TS repository notes - how to build, run tests, etc.
- PNut-TS coverage notes - latest coverage status, how to run coverage, etc.
- P2_PNut_Public - Pnut (for Windows) source is currently found in the Parallax Repo
Question? This will only be a p2 compiler, right?
-
Yes, this will be P2 at initial release.
-
Replace all use of Delphi/Pascal, x86 assembly, and SmallBASIC with pure typescript.
-
Produce a command line tool (command line options may be slightly different)
-
Omit editor component - this is a command line compiler only
-
Be listing, object and binary compatible with PNut of same version. (PNut v43, initially, upgraded to PNut v45 before formal release.)
- Remove internal table-size-limits (or make easy to adjust table limits)
- Simplify the file handling
- Provide opportunity to generate more reports and/or info about each loadable image build
- Provide opportunity to add light-weight preprocessor
Now that we have a compiler, how much more would it take to port? (We are not committing to doing these, just mentioning these as they are the next most beneficial steps, we think.)
- The debug display serial port listener that interprets the serial data and presents the debug windows and terms.
- The Debugger itself.
- Port the P1 compiler, auto selecting it from this compiler when asked to process .spin files.
I'm usually learning as I go. I'm searching the web for best patterns of how to do "such and such". Here are a couple of quick links for getting good answers and for finding reference docs along with a few more that look to be useful:
- This is my go-to for most "remind me how to..." questions: W3 Typescript Tutorial
- Huh? it says this is a free course (codeacademy.com): Master Typescript - Learn by Doing - could be good.
- The TypeScript Doc site TypeScript Documentation
- If you looking for a book "O'Reilly - Learning TypeScript" seems to be a good one Book Website - this website provides links to bying the book and provides accompanying exercises
I'm using the following extensions which make the viewing of the .asm Pnut .asm file more readable.
Download these extensions then close all VSCode instances then open VSCode and they'll be working.
This project is configured to run in a docker instance. Docker is essentially a way to run stuff in a local sandboxed environment. The environment is specified by a docker image, and its main component is a snapshot of all files that are needed to run.
Wanting to clone the PNut_TS repository locally and run regression tests, or even maybe contribute to this compiler? Then start with Installing Docker Desktop to your machine. See Overview of Docker Desktop at the Docker website.
In general if you've not used docker before you'll follow these steps to get up and running:
- Install docker desktop - see install links on left panel
- Clone our repository
- Open the repo in VSCode (also shown in above "clone..." page)
VSCode will tell docker what image needs to be downloaded and then it will start the container and then ask you to [Reopen in Container]. Once you do reopen VSCode will then install the NPM packages to get your local copy ready to build and run.
Linting and formatting of TypeScript is setup using Prettier formatter and ESLint. See How to use Prettier with ESLint and TypeScript in VSCode
If you like my work and/or this has helped you in some way then feel free to help me out for a couple of ☕'s or 🍕 slices or support my work by contributing at Patreon!
Licensed under the MIT License.
Follow these links for more information: