Skip to content

Instantly share code, notes, and snippets.

View Blaisorblade's full-sized avatar

Paolo G. Giarrusso Blaisorblade

View GitHub Profile
@palmskog
palmskog / pos-neg.md
Last active July 23, 2023 21:17
Positive vs. negative coinductive finiteness in Coq

Positive vs. negative coinductive finiteness in Coq

Positive

@siraben
siraben / Proving insertion sort in Coq.pdf
Last active July 13, 2022 01:50
Proving insertion sort correct easily in Coq
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Bionic Reader Bookmarklet

This bookmarklet is inspired by Bionic Reader API that is truly incredible. However I have issues with service APIs that are not clear on how they handle the privacy and security of my data. So I made a quick and dirty bookmarklet to do the job locally.

  • Create a new bookmark in your browser
  • Use this script as the address:
javascript:(function(){!function(){window.hasOwnProperty("bionicWordWrapApplied")||(!function(e){var n,t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,null);for(;n=t.nextNode();){for(var o,r=n.parentNode,d=n.nodeValue;o=d.match(/^(\s*)(\S+)/);){d=d.slice(o[0].length),r.insertBefore(document.createTextNode(o[1]),n);var a=Math.ceil(o[2].length/2),c=r.insertBefore(document.createElement("b"),n);c.appendChild(document.createTextNode(o[2].slice(0,a)));var i=r.insertBefore(document.createElement("span"),n);i.appendChild(document.createTextNode(o[2].slice(a)))}n.nodeValue=d}}(document.body),window.bionicWordWrapApplied=!0
@wenkokke
wenkokke / README.md
Last active August 18, 2024 19:12
A list of tactics for Agda…

Tactics in Agda

This gist is my attempt to list all projects providing proof automation for Agda.

Glossary

When I say tactic, I mean something that uses Agda's reflection to provide a smooth user experience, such as the solveZ3 tactic from Schmitty:

_ :  (x y : ℤ)  x ≤ y  y ≤ x  x ≡ y
_ = solveZ3
@Blaisorblade
Blaisorblade / dune
Last active November 27, 2021 20:17
Evidence for https://github.com/coq/coq/issues/15255; build by clone + dune build
(coq.theory
(name notation_test)
(flags (:standard)))
import cats._
// A pure functional, contravariant monoidal string builder
sealed trait SB[A] {
final def render(a: A): String = {
val sb = new StringBuilder
renderInternal(sb, a)
sb.toString
}
@aaronmdjones
aaronmdjones / freenode-resign-letter.txt
Created May 19, 2021 10:20
My resignation from freenode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
My resignation from freenode staff
==================================
I joined the freenode staff in March 2019 [1].
Before I joined the staff, Freenode Ltd was sold [2] to a person named
Andrew Lee as part of a sponsorship deal. The informal terms of that
@martinchapman
martinchapman / mosaic.sh
Last active May 18, 2023 15:25
Visualise a latex document git history
# Visualise a latex document git history
# loop through commits, create a PDF from your main file for each
# translate the pages of that PDF to a single image
# create GIF/mp4 from the folder of images created
# run within your local repository
# prerequisites: ImageMagick and FFmpeg
# create output folder
@angerman
angerman / Installation.md
Last active February 1, 2024 11:38
Installing nix on macOS BigSur

The nixos.org website suggests to use:

sh <(curl -L https://nixos.org/nix/install)

For macOS on Intel (x86_64) or Apple Silicon (arm64) based macs, we need to use

sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
@bobatkey
bobatkey / cont-cwf.agda
Last active December 4, 2024 11:35
Construction of the Containers / Polynomials CwF in Agda, showing that function extensionality is refuted
{-# OPTIONS --rewriting #-}
module cont-cwf where
open import Agda.Builtin.Sigma
open import Agda.Builtin.Unit
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat
open import Data.Empty
import Relation.Binary.PropositionalEquality as Eq