Skip to content

Instantly share code, notes, and snippets.

View jmanuel1's full-sized avatar
:atom:
tip tap on the keyboard

Jason Manuel jmanuel1

:atom:
tip tap on the keyboard
View GitHub Profile
@AndrasKovacs
AndrasKovacs / HOASOnly.hs
Last active April 11, 2025 20:56
HOAS-only lambda calculus
{-# language BlockArguments, LambdaCase, Strict, UnicodeSyntax #-}
{-|
Minimal dependent lambda caluclus with:
- HOAS-only representation
- Lossless printing
- Bidirectional checking
- Efficient evaluation & conversion checking
Inspired by https://gist.github.com/Hirrolot/27e6b02a051df333811a23b97c375196
@hirrolot
hirrolot / CoC.ml
Last active March 14, 2026 04:04
How to implement dependent types in 80 lines of code
type term =
| Lam of (term -> term)
| Pi of term * (term -> term)
| Appl of term * term
| Ann of term * term
| FreeVar of int
| Star
| Box
let unfurl lvl f = f (FreeVar lvl)
@ghosty141
ghosty141 / Buttery_Smooth_Emacs.md
Created February 13, 2023 17:51
Buttery Smooth Emacs - Mirror of Daniel Colasciones great blog post about emacs' inner workings

original url - https://www.facebook.com/notes/daniel-colascione/buttery-smooth-emacs/10155313440066102/

Buttery Smooth Emacs

30 October 2016

Public Emacs has flickered for 30 years. Now, it should be flicker-free. I’ve just landed support for double-buffered rendering for the X11 port. Now you should be able to edit, resize, and introduce bugs in your awful codebase without seeing a partially-rendered buffer or being incited to murder by barely-perceptible white flashes while editing that

@hirrolot
hirrolot / tagless-final.rs
Last active December 2, 2024 20:28
Tagless-final encoding of a simple arithmetic language in Rust
trait Interp {
type Repr<T>;
fn lit(i: i32) -> Self::Repr<i32>;
fn add(a: Self::Repr<i32>, b: Self::Repr<i32>) -> Self::Repr<i32>;
}
struct Eval;
impl Interp for Eval {
```
OCaml compilation pipeline
┌────────────────┐
│ │
│ Source code │
@hirrolot
hirrolot / CoC.ml
Last active December 30, 2025 06:47
Barebones lambda cube in OCaml
(* The syntax of our calculus. Notice that types are represented in the same way
as terms, which is the essence of CoC. *)
type term =
| Var of string
| Appl of term * term
| Binder of binder * string * term * term
| Star
| Box
and binder = Lam | Pi
@Russoul
Russoul / DepPath.idr
Last active August 7, 2023 02:09
Dependent rewriting
module Data.DepPath
import Data.Nat
import Data.Vect
||| Equivalent to the built-in `replace`.
public export
transport1 : (0 a0 : Type)
-> (0 a1 : a0 -> Type)
-> (0 x0 : a0)
@ferenczy
ferenczy / atom-get-lost-unsaved-buffers.js
Last active May 29, 2024 21:09
Get lost unsaved buffers in Atom editor: Load text content of all unsaved buffers stored by Atom for any project and print it to Developers tools console
/**
* Get lost unsaved buffers in Atom editor
*
* Load text content of all unsaved buffers stored by Atom for any project in IndexedDB and print it to Developers tools console
*
* Author: David Ferenczy Rogožan (https://ferenczy.cz)
*
* Instructions:
*
* 1. Start Atom
module Container
%default total
record Container where
constructor MkContainer
shape : Type
position : shape -> Type
container : Container -> Type -> Type
@seanh
seanh / html_tags_you_can_use_on_github.md
Last active January 24, 2026 03:23
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai