2,676 karma · joined Nov 28, 2019 (7y ago) · 1,131 submissions
comment 3y ago · link · parent
Easier still is UserLAnd. Don't even need root. Works pretty well. http://www.davidgoffredo.com/phone-server
comment 3y ago · link · parent
There are what look like "supernodes" for LinkNYC near the park, and somebody set up receiver hardware on my roof for the other network, but I haven't yet figured out who.
comment 3y ago · link · parent
I wonder if the codec could use python's lexer (assuming it's exposed) to parse the for loops and nothing else. Then replace the loops with a placeholder, and then replace the placeholder in the AST after a parse. Might be cleaner than source->source transform by the codec, maybe not.
comment 3y ago · link · parent
It's meant to shame, then. "Don't forget to flush!" would have been infantilizing but probably effective. Instead, it's "Remember that one time I was embarrassed? We don't know who it was, but I will try to control all of you even here."
comment 3y ago · link · parent
const thrush = (value, func, ...funcs) =>
func ? thrush(func(value), ...funcs) : value;
// no new syntax required
thrush(
envars,
Object.entries,
x => x.map(([key, val]) => `${key}=${val}`),
x => x.join(' '),
x => chalk.dim('$ ' + x, 'node', args.join(' ')),
console.log);
[1]: http://www.davidgoffredo.com/thrush.htmlcomment 3y ago · link · parent
[1]: https://www.gnu.org/philosophy/who-does-that-server-really-s...
comment 3y ago · link · parent
Yes you could. I agree that YAML is hard to parse, but a moment's reflection reveals that "steps" is an array of things, and "node-version" is a property of "with", which is a property of the second element of "steps" (along with "uses").
The thing that has tripped me up about YAML the most is the question of when I have to indent, and by how much.
Generating configuration for a system is a pain in the ass and carries all the ills of a build system, but a loud comment saying "this is generated from X!" and a Makefile do well enough most of the time.
Some ideas for configuration formats:
- .js file that evaluates to a JSON-compatible value
- [EDN][1] and other s-expressions
- a file system tree
There are two extremes. On the "no code" side there are gigantic reams of JSON/XML/YAML whose overall structure is all but impossible to understand. On the "all code" side there is a bespoke program that concisely produces the configuration but that can't be understood without already knowing the output.
I aim for the middle.