Skip to content

Instantly share code, notes, and snippets.

View etorreborre's full-sized avatar
🏠
Working from home

Eric Torreborre etorreborre

🏠
Working from home
View GitHub Profile
@etorreborre
etorreborre / AGENTS.md
Created January 18, 2026 17:27 — forked from stew/AGENTS.md

RULES FOR THIS UNIQUE REPO

  • This repo exists to give agents durable memory while working with *Unison/UCM.
  • Unison code is not primarily stored as files; Unison sketches are created in ephemeral .u files which can be typechecked, and once they typecheck, can be added to the "unison codebase" aka "codebase" which is managed by UCM
  • you Interact with UCM via the unison MCP
  • therefore, do not treat .u files as durable source-of-truth.
  • Use beads when possible so workflow context is injected about the specific task being worked on
  • Try to keep tasks in beads small
  • Assume that any library a project depends on is also in UCM. You should aggressively suggest improvements to other projects by creating issues in their beads database.
  • For any project we work with in UCM we will on demand create a projects/<slug>/' directory using ./bin/add-project `. This will create the directory structure, initialize a beads database, and create the initial PROJECT.md file.
@etorreborre
etorreborre / latency.txt
Created December 17, 2025 09:53 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@etorreborre
etorreborre / generate-ssh-key.sh
Created October 20, 2021 14:09 — forked from denisgolius/generate-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@etorreborre
etorreborre / concurrent-map.hs
Created December 4, 2020 07:32 — forked from Gabriella439/concurrent-map.hs
Low-tech concurrent hashmap
module ConcurrentMap where
import Control.Concurrent.STM.TVar (TVar)
import Control.Concurrent.STM (STM)
import Data.Hashable (Hashable)
import Data.HashMap.Strict (HashMap)
import Data.Vector (Vector)
import qualified Control.Concurrent.STM.TVar as TVar
import qualified Data.Hashable as Hashable
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE PostfixOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeApplications #-}
@etorreborre
etorreborre / README.md
Created April 16, 2020 21:41 — forked from dcsobral/README.md
Scala Configurable Warnings

Pull request #8373 implementing issue 333 (but please note differences).

Pull request description follows:

This PR adds a -Wconf compiler flag that allows filtering and configuring compiler warnings (silence them, or turn them into errors).

It also integrates the fantastic silencer compiler plugin by @ghik into the compiler, which allows suppressing warnings locally using the @nowarn annotation.

Hi Eric,

https://twitter.com/leashless/status/1002715630536151041 "We are going to need to be much, much smarter about this blockchain thing. It's not clear to people that we are building tools to manage scarce planetary resources through the difficult 21st century. They think it's just an extension of the current economy. That can't be true."

RChain Background from Actors to Rho Calculus to Blockchain

@etorreborre
etorreborre / extensible.hs
Created March 17, 2018 20:48 — forked from fumieval/extensible.hs
small example of hlist from extensible library
{-# LANGUAGE TypeOperators #-}
import Control.Applicative
import Data.Extensible
import Control.Monad.Trans.Maybe
import Data.Text
-- the shape of the problem
--
-- we want a list of Parsers, all of different types.
-- we will apply each of them, one after another,
@etorreborre
etorreborre / extensible.hs
Created March 17, 2018 20:48 — forked from cdepillabout/extensible.hs
small example of hlist from extensible library
module Parser where
import Control.Applicative
-- this is from the extensible package
import Data.Extensible.HList
import Data.Text
-- the shape of the problem
--
-- we want a list of Parsers, all of different types.
@etorreborre
etorreborre / haskell-records.md
Created January 9, 2018 07:30 — forked from mtesseract/haskell-records.md
Working around Haskell's namespace problem for records

The Problem

Defining records in Haskell causes accessor functions for the record's fields to be defined. There is no seperate namespace for these accessor functions.

The Goal

Be able to

  • use records in Haskell, which share field names.
  • use lenses for accessing these fields