Skip to content

Instantly share code, notes, and snippets.

Thinking about "syntax families", and how to ~categorize them.

My broad thinking is that all syntax can be usefully flattened into "atoms" and "collections" (delimited & separated sequences of atoms and collectiosn), and then a language's syntax can be characterized by "what kinds of atoms are there" and "what kinds of collections are there". The structured editor that I'm building then works at the level of those atoms and collections (the 'reader' phase, in lisp), providing in my opinion a sweet spot of "just enough structure to be powerful & useful with out being overly restrictive & annoying".

Here's how I would describe various syntaxes:

Programming languages

Forth:

@jaredly
jaredly / ignores.js
Created November 28, 2023 23:05
ignore eslint errors
const fs = require('fs');
const log = fs.readFileSync('./log.txt', 'utf-8').split('\n');
const ok = {};
let name;
log.forEach((line) => {
if (!line.trim()) {
return;
const as64 = (n) => BigInt.asUintN(64, n);
const murmur_m = BigInt('0xc6a4a7935bd1e995')
const murmur_r = 47n
const defaultSeed = BigInt('0xdeadbeef');
const hash64End = (h) => {
let h1 = xor(h, shiftR(h, murmur_r)),
h2 = as64(h1 * murmur_m),
h3 = xor(h2, shiftR(h2, murmur_r));
(Design File: )
(stockMin:0.00mm, 0.00mm, -9.98mm)
(stockMax:177.80mm, 177.80mm, 0.00mm)
(STOCK/BLOCK,177.80, 177.80, 9.98,0.00, 0.00, 9.98)
G90
G21
(Move to safe Z to avoid workholding)
G53G0Z-5.000
(Toolpath. Contour Toolpath 1)
M05
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
inkscape:version="1.3-dev (77bc73e, 2022-05-18)"
sodipodi:docname="marble escalator.svg"
id="svg1"
version="1.1"
viewBox="0 0 279.40001 215.90001"
height="8.5in"
@jaredly
jaredly / Readme.md
Last active October 20, 2022 15:40
Kolam Tiles

Kolam Tiles GCode

Inspired by https://kolamtiles.com/, these tiles are made on a CNC router, using a 1/8" bit. The stock should be 12mm thick, and at least 310mm wide by 120mm tall.

First run kolam-24-back.nc, which cuts the holes in the back for 6mmx2mm rare-earth magnets, as well as 4 corner holes for registration. Then flip the piece over, and kolam-24.nc starts out by doing a quick drill on the 4 corner holes, so you can line up the stock correctly on the other side.

Finish the tiles with some sandpaper & stain the tops, and hot glue magents onto the back. Then you're done!

@jaredly
jaredly / cors-proxy.js
Created June 4, 2022 03:31
cloudflare worker CORS proxy
/**
* Usage:
* https://worker-name.myusername.workers.dev/?url=http://google.com
*/
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.