This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // "Spreadsheet" is a minimal reactive programming library for JavaScript. | |
| // A spreadsheet is made up of cells, each holding a single value. A cell can be | |
| // watched, such that a callback is invoked whenever its value changes. | |
| // Breaking from tradition, cells are not arranged in rows and columns with | |
| // predictable addresses. Instead, a cell can be accessed only if its object | |
| // reference is known. This makes it possible to safely partition a spreadsheet | |
| // across trust boundaries. Untrusted code can be given access only to those | |
| // cells needed to do its work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Generates a password from a supply of (presumably random) bytes. | |
| // The makeup of the password is described by the 'constraints' parameter, | |
| // which is an array of constraint objects. The ordering of constraints does | |
| // not matter. | |
| // Each constraint has an "alphabet" property containing a string of allowed | |
| // characters to choose from. | |
| // A constraint's "position" property controls placement of a single character. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The "pool" requestor runs a dynamic collection of requestors in parallel. | |
| // It is like parseq.parallel, except that instead of providing any array of | |
| // requestors up front, they are added wun at a time. | |
| // The 'pool' function takes an optional 'throttle' parameter that limits how | |
| // many requestors are run at wunce. | |
| // It returns an object with two methods: | |
| // add(requestor, initial_value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // capability_sealer.js | |
| // James Diacono | |
| // 2023-02-11 | |
| // Public Domain | |
| // A capability sealer is a two-way mapping between strings and opaque object | |
| // references. A capability's string representation is suitable for transmission | |
| // over the network, whereas its object representation is suitable for use | |
| // within a single memory address space. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Translates DEC64's Windows-compatible MASM on stdin to | |
| # UNIX-compatible NASM on stdout. Not general purpose. | |
| # 0. Use the UNIX calling convention. | |
| # 1. Replace equ with %define. | |
| # 2. Replace public with global. | |
| # 3. Replace unary macro with %macro. | |
| # 4. Replace nullary macro with %macro. |