Skip to content

Instantly share code, notes, and snippets.

View tkersey's full-sized avatar
👹

Tim Kersey tkersey

👹
View GitHub Profile
@tkersey
tkersey / LinkerSetting.swift
Last active October 24, 2023 14:19
Package.swift Settings
extension LinkerSetting {
static var mergeable: Self = unsafeFlags([
"-Wl,-make_mergeable",
"-Wl,-no_exported_symbols",
])
}
@tkersey
tkersey / CoC.ml
Created February 25, 2023 22:50 — forked from Hirrolot/CoC.ml
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)
@tkersey
tkersey / pas.ts
Created September 24, 2023 17:27
TypeScript Proposition as Types
// https://www.typescriptlang.org/play?#code/PTAEDMEMBsGcFNQAcBOB7JbYEsAu20A7UQUqIAoXATyUQBUUBXRAXlAcIGtC0B3QgbjJkQoXI0SoMWPAWKASogrVEAMRgJQrQvABu8FIOFgAItlgArdgGN8RUAEFQgCiJQAIUU1QAeRQAeOwBpXAD4NUDJQUAAfUABvUUgAcwAuUAAiaHhwXFT+UG0YJhSHAF8wiOi43ESU1JRsBIALbNz86ELXUGKDMnArG2IMrL8ggApW9rsAShTvP0CtXRQQmPDQFHhcBhRiSuq0wezA8cQusmKhXsJrWTX6pp8XUeOUl2mvXwW9QMfY1fXN7axeLJNJ1RqHPIFE6Cc49Po3eB4Bp6OauQIAYVGqzQKBmvgCwX82MIABlMrgUiNIEVJhoQuiiREiAAlO4U0AjABGL1pzHpRLe6N+fw2W2II1WTJQADoqgkNMxWOlyakyhF1QB+UBEMlZEY46XHWmS9UpFls-Uyo2rSYwoSGUDoogWK79eygQDkRK53Ig7IQACaon6sADaBJcAF1uiIAJIAWyQ0GwlkgbocAFoQm4qB540ggyFWFSaXTXAYRABRACODGwrXgV19oB8fO9OcQMfA4ALoRDeYLgX7LkCdiCUaEIgAcvAEqmbgBCOw+0CTtC4YahEYADxLrc++ntImU2BQsFwoFTuHgCfPuDQyHQ-oYlkQkBXM7nulESjhrpuUGwDJ-QAfS0BJgMva8kFwEZaRWVZLmuWxwBxHQUVHYt7Dgk1-jFCBUMWKlbVWUohAids0HAfD1kWVYRHVAA9DV7QiRC3X9NAGE5DJQJnYYRi7SkU2gaBOUgSwOEpaksNLfdeRCOSil+dVQBAE02JuHhIDwYCUJovRMKmFJ92UlS1lFQEtJ0vS0JQIjBBU2EVNwwEuxGKzcF0gi9GIiJznIpRKNADiuJ4sC6LARjmIiejsEQVd1wS4YgjI0AMnPaTCAYONOT0UIQu4+BeISEYOFLDgRg
@tkersey
tkersey / cli.txt
Created May 29, 2023 16:22
macOS format SD card for Miyoo Mini Plus
sudo diskutil eraseDisk FAT32 SDCARD MBRFormat /dev/disk2

[fit] Algebra to

[fit] (Co)monads


$$Cᴮᴬ = (Cᴮ)ᴬ$$


$$Cᴮᴬ = (Cᴮ)ᴬ$$

$$Pair<A,B> → C ≅ A → B → C$$

@tkersey
tkersey / algebraic-effects-series-4.md
Created June 30, 2023 22:33 — forked from yelouafi/algebraic-effects-series-4.md
Implementing Algebraic Effects and Handlers

Algebraic Effects in JavaScript part 4 - Implementing Algebraic Effects and Handlers

This is the final part of a series about Algebraic Effects and Handlers.

So we've come to the core topic. The reality is that we've already covered most of it in the previous parts. Especially, in the third part, where we saw delimited continuations at work.

@tkersey
tkersey / cli.md
Created July 14, 2022 15:24
Useful macOS command line commands

Download full installer

softwareupdate --fetch-full-installer --full-installer-version 13.0

Create USB installer

sudo /Applications/Install\ macOS\ Ventura\ beta.app/Contents/Resources/createinstallmedia --volume /Volumes/Installer --nointeraction

@tkersey
tkersey / xcbuild-debugging-tricks.md
Created February 3, 2018 23:10 — forked from ddunbar/xcbuild-debugging-tricks.md
Xcode new build system debugging tricks

New Build System Tricks

Command Line

# enable internal menu
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool YES

alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
@tkersey
tkersey / XcodeBuildSettingsReference.md
Created February 3, 2018 23:09 — forked from NSExceptional/XcodeBuildSettingsReference.md
The Xcode Build Settings Reference in a searchable document, as of Xcode 8.3.2

Build settings reference

Active Build Action (ACTION)

A string identifying the build system action being performed.

Additional SDKs (ADDITIONAL_SDKS)

The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.

Alternate Install Group (ALTERNATE_GROUP)