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. |