Skip to content

Instantly share code, notes, and snippets.

@sogaiu
sogaiu / notes-on-gists.md
Created March 7, 2025 03:33
notes on gists
  • when window is narrower than a certain width, certain features appear inaccessible (e.g. edit button does not appear visible)
@sogaiu
sogaiu / effective-situated-programs-tidbits.md
Last active March 8, 2025 10:16
effective situated programs tidbits

0:44 What Happened Across Ten Years

Effective Programs

Ten years ago, Clojure was released, and there's no possible way I could have imagined this. >

@sogaiu
sogaiu / sample.md
Last active March 5, 2025 07:39
DS can be negative

ds-negative-2

2025-02-28

2025-02-27

@sogaiu
sogaiu / gist:a0f2fcd6fe3ba7c2e482695bfa88def5
Created March 3, 2025 09:12
adding stuff to PATH for various shells
https://jvns.ca/blog/2025/02/13/how-to-add-a-directory-to-your-path/
https://blog.flowblok.id.au/2013-02/shell-startup-scripts.html
#lang typed/racket
(struct pt ([x : Real] [y : Real]))
 
;; the form on the next line is a type annotation
(: distance (-> pt pt Real))
(define (distance p1 p2)
  (sqrt (+ (sqr (- (pt-x p2) (pt-x p1)))
           (sqr (- (pt-y p2) (pt-y p1))))))
@sogaiu
sogaiu / list-of-parsers-purpose-draft.md
Last active March 1, 2025 12:04
list of parsers purpose draft

TLDR

This list collects parsers for use with tree-sitter (ABI >= 12).

Rationale

To have a single list that can be checked for likely usable parsers for:

  • devs to study
  • compute various stats (e.g. percent adopting a certain abi level)
@sogaiu
sogaiu / data-in-clojure-and-janet-vs-most-other-places.md
Last active March 19, 2025 10:35
data in clojure and janet vs most other places

> Imagine that we have a set of data types and a set of operations that act on these types. Sometimes we need to add more operations and make sure they work properly on all types; sometimes we need to add more types and make sure all operations work properly on them. Sometimes, however, we need to add both - and herein lies the problem. Most of the mainstream programming languages don't provide good tools to add both new types and new operations to an existing system without having to change existing code. This is called the "expression problem". Studying the problem and its possible sol