Skip to content

Instantly share code, notes, and snippets.

View jolby's full-sized avatar

Joel Boehland jolby

View GitHub Profile
@ap29600
ap29600 / primer.txt
Created June 26, 2025 21:28
a couple notes on the codebase of growler/k
not yet described in this note: memory management, parsing, bytecode, printing
C types
[UW] [48]byte unsigned
[GHIL] [1248]byte int
C 1-byte char
S string
F 8-byte double
A generic value
A[1234] A (*f)(A x[, A y[, A z[, ...]]])
@rodydavis
rodydavis / main.dart
Last active March 17, 2025 15:14
SQLite CRDT + Session Extension
import 'dart:ffi';
import 'dart:io';
import 'dart:typed_data';
import 'package:sqlite3/sqlite3.dart';
import 'package:sqlite3/src/ffi/implementation.dart';
void main() {
final lib = DynamicLibrary.open('cr-sqlite/core/dist/sqlite3');
final sqlite3 = FfiSqlite3(lib);
@dbreunig
dbreunig / jekyll_glossary_generator.py
Last active May 11, 2025 23:10
A script to generate a glossary of key terms from your Jekyll posts. We're using DSPy to handle LLM interactions; it helps with boilerplate prompt context and parsing responses into Pydantic objects. To run this, put this script in a folder named 'scripts' (or whatever) in your Jekyll site directory. Then plug in your Anthropic API key (or point…
from pathlib import Path
import re
import dspy
from typing import TypedDict, List
import yaml
# Set up DSPy and the LM
lm = dspy.LM('anthropic/claude-3-5-haiku-latest', api_key='YOUR_API_KEY')
dspy.configure(lm=lm)
  1. Every atomic object has a timeline (TL) of writes:

    • A write is either a store or a read-modify-write (RMW): it read latest write & pushed new one.
    • A write is either tagged Relaxed, Release, or SeqCst.
    • A read observes some write on the timeline:
      • On the same thread, future reads can't go backwards on the timeline.
      • A read is either tagged Relaxed, Acquire, or SeqCst.
      • RMWs can also be tagged Acquire (or AcqRel). If so, the Acquire refers to the "read" portion of "RMW".
  2. Each thread has its own view of the world:

  • Shared write timelines but each thread could be reading at different points.
@emilyliu7321
emilyliu7321 / bluesky-comments.tsx
Created November 25, 2024 05:39
Integrate Bluesky replies as your blog's comment section
"use client";
/* eslint-disable @next/next/no-img-element */
import Link from "next/link";
import { useState, useEffect } from 'react';
import {
AppBskyFeedDefs,
AppBskyFeedPost,
type AppBskyFeedGetPostThread,
} from "@atproto/api";
@SequentialDesign
SequentialDesign / install lem.txt
Created November 11, 2024 10:51
how to install lem on linux (garuda (arch))
installing lem
go here and click on the right download. mine was under AMD64 and across from linux
https://www.sbcl.org/platform-table.html
cd to the folder you downloaded it to
cd Downloads/
decompress the file you downloaded. it has the sbcl binary
bzip2 -cd sbcl-2.4.10-x86-64-linux-binary.tar.bz2 | tar xvf -
@debasishg
debasishg / dod.md
Last active May 7, 2025 14:59
Data oriented design, hardware awareness, cache awareness in data structures & algorithms
@wiseman
wiseman / example.md
Last active August 21, 2024 02:55
Get store hours from images
$ python hours.py image.jpg
{
  "day_hours": [
    {
      "day": "Mon - Fri",
      "hours": "7 AM - 5 PM"
    },
    {
 "day": "Saturday",
(defun map-csv-file (fun file)
(declare (optimize speed)
(function fun))
(let ((buffer (make-string 4096)))
(with-open-file (stream file)
(let (fields
(read 0)
(start 0)
concat
escaping)
@thesamesam
thesamesam / xz-backdoor.md
Last active July 29, 2025 15:49
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background