Skip to content

Instantly share code, notes, and snippets.

@VictorTaelin
VictorTaelin / hoc_historical_overview.md
Last active July 30, 2024 11:58
Higher Order Company: Complete Historical Overview - WIP

Higher-Order Company: Complete Historical Overview

This document is a complete historical overview of the Higher Order Company. If you want to learn anything about our background, a good way to do so is to feed this Gist into an AI (like Sonnet-3.5) and ask it any question!

My Search for a Perfect Language

It all started around 2015. I was an ambitious 21-year-old CS student who, somehow, had been programming for the last 10 years, and I had a clear goal:

I want to become the greatest programmer alive

@VictorTaelin
VictorTaelin / towards_an_optimal_computer.md
Last active July 30, 2024 11:58
Higher-Order Company: Towards an Optimal Computer

Higher-Order Company: Towards an Optimal Computer

What is the true nature of computation?

A hundred years ago, humanity answered that very question, twice. In 1936, Alan invented the Turing Machine, which, highly inspired by the mechanical trend of the 20th century, distillated the common components of early computers into a single universal machine that, despite its simplicity, was capable of performing every computation conceivable. From simple numerical calculations to entire

@VictorTaelin
VictorTaelin / sic.hvml
Created January 20, 2024 21:33
Symmetric Interaction Calculus in HVM2
// COMPUTATION RULES
// ===================================================
// APP | ((λx body) arg)
// X | ---------------------------------------------
// LAM | x ~ arg; body
// ===================================================
// APP | ({fst snd} arg)
// X | ---------------------------------------------
// SUP | dup #L{a,b} = arg; {(fst a) (snd b)}
// ===================================================
@VictorTaelin
VictorTaelin / sat.md
Last active July 30, 2024 11:58
Simple SAT Solver via superpositions

Solving SAT via interaction net superpositions

I've recently been amazed, if not mind-blown, by how a very simple, "one-line" SAT solver on Interaction Nets can outperform brute-force by orders of magnitude by exploiting "superposed booleans" and optimal evaluation of λ-expressions. In this brief note, I'll provide some background for you to understand how this works, and then I'll present a simple code you can run in your own computer to observe and replicate this effect. Note this is a new observation, so I know little about how this algorithm behaves asymptotically, but I find it quite

@VictorTaelin
VictorTaelin / implementing_fft.md
Last active July 20, 2024 08:14
Implementing complex numbers and FFT with just datatypes (no floats)

Implementing complex numbers and FFT with just datatypes (no floats)

In this article, I'll explain why implementing numbers with just algebraic datatypes is desirable. I'll then talk about common implementations of FFT (Fast Fourier Transform) and why they hide inherent inefficiencies. I'll then show how to implement integers and complex numbers with just algebraic datatypes, in a way that is extremely simple and elegant. I'll conclude by deriving a pure functional implementation of complex FFT with just datatypes, no floats.

@VictorTaelin
VictorTaelin / FFT.hvm
Last active May 4, 2023 02:05
fast fourier transform using only integers on HVM
(Rot (V z)) = (V (- 0.0 z))
(Rot (G x y)) = (G (Rot y) x)
(Add (V z) (V w)) = (V (+ z w))
(Add (G x y) (G w z)) = (G (Add x w) (Add y z))
(Get (V x) f) = (f x)
(Get (G x y) f) = (f x y)
Nil = λm λx (m x)
Flip (n: Nat) : Nat
Flip Nat.zero = 1n
Flip (Nat.succ Nat.zero) = 0n
Mod2 (n: Nat) : Nat
Mod2 Nat.zero = Nat.zero
Mod2 (Nat.succ n) = Flip (Mod2 n)
IsEven (n: Nat) : Type
IsEven Nat.zero = Unit
@LukeMathWalker
LukeMathWalker / audit.yml
Last active July 24, 2024 04:03
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@PurpleBooth
PurpleBooth / README.md
Last active September 8, 2023 20:52
A github workflow pipeline for rust that does test, build and deploy windows, linux and mac, creates releases, and does SemVer Versioning, and releases to a homebrew tap

Features

  • Automatically bump SemVer
  • Update a personal homebrew tap
  • Keep that pesky version in the Cargo.toml up to date
  • (From dependabot) Get new versions out as soon as possible

Assumptions

  • You don't want a changelog
@Pilotin
Pilotin / tailwindcss-postcss-autoprefixer-cssnano.md
Last active June 8, 2024 19:05
TailwindCSS + PostCSS + AutoPrefixer + CSS Nano Install

Setup

  • Create new working folder /tailwind/. Open in terminal
  • run npm init -y
  • run npm install tailwindcss @tailwindcss/custom-forms postcss-cli autoprefixer postcss-nested cssnano
  • run npx tailwind init
  • Edit tailwind.config.js and replace plugins: [], with:
plugins: [