Skip to content

Instantly share code, notes, and snippets.

View carnotweat's full-sized avatar

sameer gupta carnotweat

View GitHub Profile
@carnotweat
carnotweat / LICENSE.txt
Created September 28, 2011 19:21 — forked from p01/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@carnotweat
carnotweat / fib.py
Created December 10, 2011 11:26
euler
fib1
=========
`def fib(a=0, b=1):
while True:
yield a
a, b = b, a + b

Keybase proof

I hereby claim:

  • I am carnotweat on github.
  • I am sameerg (https://keybase.io/sameerg) on keybase.
  • I have a public key whose fingerprint is 7418 D902 D3DE A1C0 EB27 001F FA20 2CE6 D5F0 4602

To claim this, I am signing this object:

with import <nixpkgs> {};
mkShell {
nativeBuildInputs = [
ocaml
opam
dune_2
pkg-config
gcc
bintools-unwrapped
gmp
@carnotweat
carnotweat / modal_mu.v
Created May 11, 2023 18:23 — forked from qnighy/modal_mu.v
Modal mu calculus in Coq
Require Import Coq.Classes.SetoidClass.
Program Instance Iff1Setoid{A:Type} : Setoid (A->Prop) := {|
equiv := fun P Q => forall x, P x <-> Q x
|}.
Next Obligation.
split.
- intros P x; reflexivity.
- intros P Q H x; symmetry; exact (H x).
- intros P Q R H0 H1 x; transitivity (Q x); [exact (H0 x)|exact (H1 x)].
@carnotweat
carnotweat / openpgp.md
Last active July 22, 2023 10:54
verification

[Verifying my cryptographic key:openpgp4fpr:d4b56e4d18ed5be3e4aee1cdff331a5a1a7ab372]

openpgp4fpr:5303A2502DA636704D86227F0833317599B7F097

—- Functors
{—
class Functor f where
fmap :: (a->b) ->fa-->fb
—}
-- Monads, comonads
class (Functor m) => Mon m where
unit :: a->ma
mult :: m (ma) -> ma
class (Functor n) => Comon n where
@carnotweat
carnotweat / configuration.nix
Last active October 25, 2023 17:00
from nixos wiki
{ config, lib, pkgs, inputs, system, ... }:
# to be modulazrized as overlay, well maybe
let
unstable = import (fetchTarball
"https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {
overlays = [
(import (builtins.fetchTarball {
url =
"https://github.com/nix-community/emacs-overlay/archive/master.tar.gz";
@carnotweat
carnotweat / .emacs
Created November 22, 2023 03:49 — forked from oblique63/.emacs
Emacs Bootstrap
;; -*- lexical-binding: t; -*-
;;===[ PERFORMANCE ENHANCEMENTS ]===============================================
;; See:
;; https://github.com/hlissner/doom-emacs/wiki/FAQ#how-is-dooms-startup-so-fast
(defvar file-name-handler-alist-backup file-name-handler-alist)
(defvar gc-cons-threshold-backup gc-cons-threshold)
(defvar gc-cons-percentage-backup gc-cons-percentage)
(setq gc-cons-threshold 402653184