Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c75d6bcced | ||
|
|
10ba6b0acc | ||
|
|
7ad8aeba78 | ||
|
|
4596b8bd37 | ||
|
|
c5e0f6b82b | ||
|
|
c987bc9f2e | ||
|
|
9eb5261fa2 |
@@ -2,13 +2,16 @@
|
|||||||
|
|
||||||
This is a port of [Janet](https://janet-lang.org) programming language to x86 DOS systems. Currently ported version is 1.41.2.
|
This is a port of [Janet](https://janet-lang.org) programming language to x86 DOS systems. Currently ported version is 1.41.2.
|
||||||
|
|
||||||
|
See the "Releases" section for ready-made DOS binaries (and a bootable FreeDOS image). Building your own binary from source is always recommended.
|
||||||
|
|
||||||
## Functionality missing from the original
|
## Functionality missing from the original
|
||||||
|
|
||||||
* Multithreading
|
* Multithreading
|
||||||
* Networking
|
* Networking
|
||||||
|
* FFI and dynamic module loading
|
||||||
* Some mathematical functions (`math/erf`, `math/erfc`, `math/gamma`, `math/log-gamma`, `math/nextafter`)
|
* Some mathematical functions (`math/erf`, `math/erfc`, `math/gamma`, `math/log-gamma`, `math/nextafter`)
|
||||||
* Secure RNG source (`os/cryptorand`)
|
* Secure RNG source (`os/cryptorand`)
|
||||||
* Full terminal editing features (you can compile with them, but the REPL will crash often)
|
* Full terminal editing features (you can compile with them, but the REPL will crash upon any long string output)
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
@@ -17,6 +20,38 @@ This is a port of [Janet](https://janet-lang.org) programming language to x86 DO
|
|||||||
3. Run `make`.
|
3. Run `make`.
|
||||||
4. Copy the contents of `bin` directory (`janet.exe` and `CWSDPMI.EXE`) to your DOS system.
|
4. Copy the contents of `bin` directory (`janet.exe` and `CWSDPMI.EXE`) to your DOS system.
|
||||||
|
|
||||||
|
For best usage experience with colors etc, an `ANSI.SYS`-compatible DOS driver is recommended.
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
### Why?
|
||||||
|
|
||||||
|
Janet already is an extremely portable language that can run "as is" on a lot of systems and architectures, but DOS still was on the list of missing targets. Meanwhile, retro x86 hardware could benefit from running a modern, practical Lisp system, even if it would be fully offline and single-threaded.
|
||||||
|
|
||||||
|
### Why amalgamated source code?
|
||||||
|
|
||||||
|
Because it was easier to write my own Makefile for.
|
||||||
|
|
||||||
|
### Can the same source code be used for building Janet for other platforms?
|
||||||
|
|
||||||
|
Yes, but you will have to re-enable "standard" features in `janet.h` by commenting out corresponding `#define` directives, and also update the Makefile accordingly.
|
||||||
|
|
||||||
|
### Was genAI used for porting?
|
||||||
|
|
||||||
|
As the codebase is quite long, genAI was used for identifying some problematic bits within it and some intermediate experimentation, but all final patches were fully hand-written.
|
||||||
|
|
||||||
|
### Will you submit your patches as a PR to the upstream Janet repo?
|
||||||
|
|
||||||
|
Maybe.
|
||||||
|
|
||||||
|
### Can this build be used on a bootable DOS floppy?
|
||||||
|
|
||||||
|
Yes, both binaries (janet.exe and CWSDPMI.EXE) combined are under 900K in size. This leaves plenty of room for essential DOS system files and your custom source code in Janet.
|
||||||
|
|
||||||
|
As a proof of concept, a bootable FreeDOS floppy image with Janet 1.41.2 has been included in the "Releases" section along with an adaptation of Scoundrel roguelike card game port to Janet. To run the game, boot the disk, exit the REPL and type `janet scndrl.jan` while staying in the `EXAMPLES` directory.
|
||||||
|
|
||||||
|
The image also contains a minimum viable DOS system, including an editor and disk formatter, so it can also be used as a rescue floppy for other DOS-based machines.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
Original copyright by Calvin Rose et al.
|
Original copyright by Calvin Rose et al.
|
||||||
|
|||||||
Reference in New Issue
Block a user