Skip to content

Instantly share code, notes, and snippets.

View plaidfinch's full-sized avatar

finch plaidfinch

View GitHub Profile
@plaidfinch
plaidfinch / webrtc-for-llms-and-people.md
Last active April 30, 2025 13:51
WebRTC.rs For LLMs and People

WebRTC Rust Library Documentation Summary

This directory contains comprehensive summaries of the WebRTC Rust library modules. These summaries provide an overview of the library's architecture, key components, and their interactions.

Table of Contents

Foundation Protocols

  • STUN - Session Traversal Utilities for NAT for network discovery
  • TURN - Traversal Using Relays around NAT for NAT traversal
@plaidfinch
plaidfinch / pretty-pragmata.el
Last active July 15, 2021 01:56
Mappings for prettify-symbols-mode to enable Pragmata Pro's ligatures in Emacs. I've taken some slight liberties with the original ligature map, to suit my own tastes.
;; PRETTIFY SYMBOLS (with Pragmata Pro)
(defun setup-pragmata-ligatures ()
(setq prettify-symbols-alist
(append prettify-symbols-alist
'(("!!" . ?)
("!=" . ?)
("!==" . ?)
("!≡" . ?)
("!≡≡" . ?)
("!>" . ?)
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Fixes where
@plaidfinch
plaidfinch / Continuations.hs
Last active February 28, 2018 17:27
Playing around with explicit CPS in Haskell
{-# language ScopedTypeVariables, LambdaCase, TypeApplications #-}
module Continuations where
import Data.String
import Control.Monad
-- Short-circuiting evaluation

Keybase proof

I hereby claim:

  • I am kwf on github.
  • I am kwf (https://keybase.io/kwf) on keybase.
  • I have a public key whose fingerprint is E6D1 D4C2 5CBE 5A89 741F 6A04 64DB 17E8 EB41 6853

To claim this, I am signing this object:

@plaidfinch
plaidfinch / Handles.hs
Last active September 8, 2016 17:00
File handles with type-level verification that you use them properly
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE RebindableSyntax #-}
@plaidfinch
plaidfinch / Ding.el
Last active August 5, 2016 06:56
Configure flycheck to make a "ding!" sound after it completes checking, only in certain modes
;; Noisy Flycheck (for slow syntax checkers, program verifiers, &c.)
(defvar flycheck-ding t) ;; Enable sounds?
(defvar flycheck-ding-path "~/.emacs.d/private/Ding.mp3") ;; Where's the "ding!" sound to make?
(defvar flycheck-buzz-path "~/.emacs.d/private/Basso.aiff") ;; Where's the "bzz!" sound to make?
(defvar flycheck-noisy-modes-list '(dafny-mode)) ;; Which modes should we make sounds in?
;; Below what number of seconds checking time should we be silent?
(defvar flycheck-ding-delay-threshold 2)
(defvar flycheck-buzz-delay-threshold 1)
> take 7 pascalLists
[[1],
[1, 1],
[1, 2, 1],
[1, 3, 3, 1],
[1, 4, 6, 4, 1],
[1, 5, 10, 10, 5, 1],
[1, 6, 15, 20, 15, 6, 1],
[1, 7, 21, 35, 35, 21, 7, 1]]
pascalLists :: [[Integer]]
pascalLists = map pascalList [0..]
where
pascalList n =
map view .
takeWhile ((>= 0) . row) .
iterate (go $ above & right) .
goto (0,n) $ pascal
evaluate :: ComonadApply f => f (f b -> b) -> f b
evaluate fs = fix $ (fs <@>) . duplicate