https://github.com/elliottcable/pratchett.js
A JavaScript interpreter for Paws.
https://github.com/elliottcable/pratchett.js
distributed-systems javascript parallel-computing programming-language
Last synced: 9 months ago
JSON representation
A JavaScript interpreter for Paws.
- Host: GitHub
- URL: https://github.com/elliottcable/pratchett.js
- Owner: ELLIOTTCABLE
- Created: 2009-12-29T18:23:14.000Z (about 16 years ago)
- Default Branch: stable
- Last Pushed: 2022-01-03T01:27:49.000Z (about 4 years ago)
- Last Synced: 2025-03-27T13:11:10.484Z (10 months ago)
- Topics: distributed-systems, javascript, parallel-computing, programming-language
- Language: CoffeeScript
- Homepage:
- Size: 1.61 MB
- Stars: 31
- Watchers: 6
- Forks: 5
- Open Issues: 12
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README














----
A [major rewrite][] of this project started in 2014, and never got merged; if you're curious where
this project ended up, **you should probably go look at the [queueless][] branch. (=**
----
**Hello, friend.** This is a JavaScript implementation of the Paws machine, intended both to be included
into client-side code executed by browsers, and to be embedded into [Node.js][] projects.
**“What's a Paws,”** you ask? [Paws][] could be seen either as a *type* of programming language, or
as a design for a VM *on which* languages of that type can be run. Paws is a project sitting
somewhere between a pure VM for language development (think: the JVM), and a family of languages
(think: the LISPs.)
Paws lends itself well to highly *asynchronous* programming, meaning it's designed for things
involving the network requests (by design, web applications), and other tasks where concurrency is
desirable. In addition, things built on top of Paws can *distribute* themselves across multiple
environments and machines (this means your database, and your user's browsers, can all talk amongst
one-another.) Finally, Paws is designed from the ground-up to be *concurrency*-aware, ensuring tasks
can parallelize when they won't affect eachother negatively.
**“Cool! Can I use it?”** Probably not, I'm afraid, although it's adorable that you ask.
Unfortunately, this project is basically just a VM, with some excruciatingly-primative primatives
with which one can construct abstractions. (Writing code that will run on this machine is
approximately analogous to writing raw assembler.) Before this project will be useful to you,
somebody'll need to write some abstractions (basically, a language) on top of it!
To boot, the Paws system as a whole is still under heavy design and development; lots of things are
still likely to change. Although there's a [specification for the current version,][spec] lots of
relatively fundamental aspects of the machine's semantics are still subject to evolution. In fact,
some of the neatest features of the design aren't nailed down into the specification yet (nor are
they implemented in this codebase); so anybody trying to write those abstractions for you is
probably going to have some of their work invalidated in the future. **tl;dr: the Paws design isn't
stable, yet!**
**“Okay, well, I like language design. Can I write stuff on top of this machine?”** I'm so glad you
asked! You're my favourite kind of person! Assuming you understand the caveat mentioned above (that
this project is in flux), you can *absolutely* start experimenting with abstractions on top of the
Paws machine.
If you want to learn more, you should definitely make a Discord account, and join the chatroom where
we discuss Paws (as well as entirely-too-much other stuff! Well, mostly dogs, if I'm being honest.)
All newcomers are welcome, and contribution is hugely appreciated!
## Join `#ELLIOTTCABLE` on Discord:
https://discord.gg/Mst2T9wnUY
[major rewrite]:
"You know, *never* a bad idea. Right? ... um ... right??"
[queueless]:
[Node.js]: "A server-side JavaScript platform"
[Paws]: "An asynch-heavy distributed platform for concurrent programming"
[spec]: "Specification for the 10th iteration of the Paws design"
Using
-----
This implementation of a Paws machine can be used in two ways: interactively, at the command-line;
or directly, via its embedding API. More information about command-line usage can be acquired by
querying the executable at the command-line:
npm install # (Must be run before the executable can be used)
./Executables/paws.js --help
./Executables/paws.js interact # Example, opens an interactive ‘REPL’ to play with
As for embedding the `Paws.js` API, you'll have to dive into the code and poke around a bit, for the
moment. I'm also happy to give you a quick overview, if you join our Discord and ask!
*(I swear, API documentation is coming soon! `:P` )*
Contributing
------------
I consistently put a lot of effort into ensuring that this codebase is easy to spelunk. Hell, I
reduced myself to using [CoffeeScript][], to make everything easier to read! `(=`
Any and all [issues / pull-requests][issues] are welcome. There's a rather comprehensive test-suite
for the reactor itself; it's appreciated if any changes are contributed with passing test-cases, of
course.
After `git clone`'ing the codebase, you should immediately `npm run-script hi`; this will help you
set up your local copy for hacking.
More specific information can be found in the [CONTRIBUTING][] file.
[CoffeeScript]: "A little language that transpiles into JavaScript"
[issues]: "Issue-tracker for Paws.js"
[CONTRIBUTING]: <./blob/current+/CONTRIBUTING.markdown>
"CONTRIBUTING.markdown on the current+ branch"
----
