Skip to content

Instantly share code, notes, and snippets.

@neongreen
neongreen / merge.hs
Created April 18, 2025 16:13
merge scribbles
-- reading the code is hard so i tried to imagine what a formalization would look like i was implementing it
-- Notation: big letters = patch sequences, small letters = patches
--
-- In reality operations are freey.
-- We don't evaluate as we go, but instead construct a tree and then have an evaluator for that tree.
-- This way we can decide in which order we will evaluate the patch sequence operations.
(+) : List Patch -> List Patch -> List Patch -- ignore for now
(-) : List Patch -> List Patch -> List Patch -- also
@neongreen
neongreen / rust-lang + jj.md
Created April 2, 2025 21:38
jj users in the wild
pnpm --silent start --owner rust-lang --include-prs

Loaded cache from disk. Use --force-refresh to ignore cache.
Using cached repositories for rust-lang (225 repos)
Found 225 repositories to process
Using cached repositories for rust-lang (225 repos)
Found 225 repositories to process
Using cached branches for 225 repositories, fetching for 0 repositories.
stages:
- notify
notify_codeowners:
stage: notify
script:
- |
cat > notify_codeowners.py <<'EOF'
import os, sys, json, fnmatch, urllib.request, urllib.parse
namespace X -- to avoid clashes with the stdlib List
-- Define our own List type
inductive List (α : Type u)
| nil : List α
| cons : α → List α → List α
infixr:70 " :: " => List.cons
open List
@neongreen
neongreen / View.hs
Last active November 11, 2021 10:14
Integrating Tiptap with IHP. See https://windofchange.me/ShowCard?cardId=1d4e2e31-f319-4d01-9798-f775e321fdb1 for latest updates.
-- Example of a form using tiptap
renderForm :: CardUpdate -> Html
renderForm cardUpdate = formFor cardUpdate [hsx|
{(textareaField #content) {
disableLabel = True,
fieldClass = "use-tiptap"
}
}
{submitButton {label = "Save"}}
let List/map =
https://prelude.dhall-lang.org/List/map sha256:dd845ffb4568d40327f2a817eb42d1c6138b929ca758d50bc33112ef3c885680
let Text/concat =
https://prelude.dhall-lang.org/Text/concat sha256:731265b0288e8a905ecff95c97333ee2db614c39d69f1514cb8eed9259745fc0
let Optional/fold =
https://prelude.dhall-lang.org/Optional/fold
sha256:c5b9d72f6f62bdaa0e196ac1c742cc175cd67a717b880fb8aec1333a5a4132cf
// skypack pinned URLs can be obtained by visiting links like 'https://cdn.skypack.dev/@tiptap/core'
import { Editor, Extension } from 'https://cdn.skypack.dev/pin/@tiptap/[email protected]/mode=imports,min/optimized/@tiptap/core.js';
import StarterKit from 'https://cdn.skypack.dev/pin/@tiptap/[email protected]/mode=imports,min/optimized/@tiptap/starter-kit.js';
import Typography from 'https://cdn.skypack.dev/pin/@tiptap/[email protected]/mode=imports,min/optimized/@tiptap/extension-typography.js';
import HardBreak from './tiptap-hard-break.js';
import CodeBlock from './tiptap-code-block.js';
import Link from './tiptap-link.js';
import TurndownService from 'https://cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/turndown.js';
import * as commonmark from 'https://cdn.skypack.dev/pin/[email protected]/mode=imports,min/optimized/commonmark.js';
@neongreen
neongreen / artyom.css
Last active January 3, 2021 03:59
Themes
/* artyom.brick.do */
@import url('https://fonts.googleapis.com/css2?family=Carter+One&family=Averia+Serif+Libre:ital,wght@0,400;0,700;1,400;1,700&display=swap');
figure {
border: 1px solid #aaa;
border-bottom: none;
}
figcaption {