Skip to content

Instantly share code, notes, and snippets.

View rizo's full-sized avatar

Rizo rizo

  • Porto (Portugal)
View GitHub Profile
@rizo
rizo / list.lhs
Created September 19, 2017 23:28 — forked from gatlin/list.lhs
"Church-encoded" lists and their interesting properties
===
*This is a literate Haskell program which you can run in ghci.*
*Also, I already corrected a glaring problem. Let us speak no more of it.*
One of the beautiful things about computer science is that, fundamentally,
**data is code** and **code is data**. But what does that mean? And how is it
useful?
@rizo
rizo / my_prelude.hs
Created September 19, 2017 23:36 — forked from gatlin/my_prelude.hs
{- * Foundational functions -}
id :: a -> a
id x = x
const :: a -> b -> a
const x y = x
fix :: (a -> a) -> a
fix f = f (fix f)
@rizo
rizo / README.md
Created March 30, 2020 12:32 — forked from hofmannsven/README.md
Increase key repeat rate on macOS

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.

Source: https://apple.stackexchange.com/a/83923

@rizo
rizo / ppx-tree.ml
Created February 27, 2025 00:03 — forked from ivg/ppx-tree.ml
A tree representation for ppx
open Core_kernel
module Ast = struct
type ident = string [@@deriving compare, hash, sexp]
type t =
| Var of ident
| Int of int
| Let of ident * t * t
| App of ident * t list
@rizo
rizo / heap-lisp.c
Created October 10, 2025 09:28 — forked from swatson555/heap-lisp.c
Heap based scheme machine.
/* Heap based virtual machine described in section 3.4 of Three Implementation Models for Scheme, Dybvig
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
char token[128][32];