https://github.com/raganwald/fractran
Code to accompany “ Remembering John Conway's FRACTRAN, a ridiculous, yet surprisingly deep language”
https://github.com/raganwald/fractran
conway fractran mathematics
Last synced: 3 months ago
JSON representation
Code to accompany “ Remembering John Conway's FRACTRAN, a ridiculous, yet surprisingly deep language”
- Host: GitHub
- URL: https://github.com/raganwald/fractran
- Owner: raganwald
- License: mit
- Created: 2020-04-19T13:11:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-07T21:19:04.000Z (about 5 years ago)
- Last Synced: 2025-03-20T14:48:10.861Z (3 months ago)
- Topics: conway, fractran, mathematics
- Language: JavaScript
- Homepage: http://raganwald.com/2020/05/03/fractran.html
- Size: 30.4 MB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FRACTRAN

A FRACTRAN interpreter, in honour of [John Horton Conway](https://www.math.princeton.edu/people/john-conway).
### setup and running the examples
Prerequisites:
- A recent-ish installaction of node.
- Babel (if you prefer) https://babeljs.io/docs/en/usageInstalling Babel to compile ES-whatever to node-whatever:
```bash
npm install --save-dev @babel/core @babel/cli @babel/preset-env
npm install --save @babel/polyfill
```Print an infinite list of primes using a big integer implementation:
```bash
npx babel src --out-dir lib && node ./lib/integer-primes.js
=> 2
3
5
7
11
13
17
19
23
29
...
```Or limit the number of primes:
```bash
npx babel src --out-dir lib && node ./lib/integer-primes.js 7
=> 2
3
5
7
11
13
17
```Or compute an arbitrary fibonacci number:
```bash
npx babel src --out-dir lib && node ./lib/integer-fib.js 7
=> fib(7) = 13
```## More...
[](https://malisper.me/building-fizzbuzz-fractran-bottom/)
[](http://raganwald.com/hashlife/)
[](https://github.com/raganwald/cafeaulife)