Skip to content

Instantly share code, notes, and snippets.

@hagmonk
hagmonk / lein-m1-vs-intel.md
Last active March 19, 2022 08:35
Benchmarking Leiningen on Apple Silicon

Benchmarking Leiningen on Apple Silicon

Gene was tweeting about Clojure's startup performance on Apple Silicon, so I decided to benchmark my new MacBook Air with the M1 chip against my Intel based MacBook Pro.

TL;DR

img

The M1 chip in the MacBook Air - which lacks a fan - was able to quite tidily beat an almost top-of-the-line Intel chip.

@hagmonk
hagmonk / install.md
Created July 6, 2019 23:58
K3OS on Raspberry Pi

Imaging

Assuming macOS and an SD card presented as /dev/rdisk3:

For ARMv7 (Pi 2):

diskutil unmountDisk disk3
xzcat ubuntu-18.04.2-preinstalled-server-armhf+raspi2.img.xz | sudo dd of=/dev/rdisk3 bs=32m
@hagmonk
hagmonk / DefaultKeyBinding.dict
Created August 7, 2018 05:00
DefaultKeyBinding.dict
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally
https://github.com/10nin/hello-world
https://github.com/AdamFrey/clojure-git-deps-demo
https://github.com/Bronsa/tools.decompiler-aot
https://github.com/Cirru/calcit-editor
https://github.com/Cirru/cirru.org
https://github.com/Cirru/ir.core
https://github.com/Cirru/sepal.clj
https://github.com/Codamic/core.async
https://github.com/ComputeSoftware/shoe
https://github.com/ComputeSoftware/spec-keys
(mapv #(%1 %2) (cycle [(partial identity) #(* %1 -1)]) [1 2 3 4 5])
@hagmonk
hagmonk / conj2017.ics
Last active October 12, 2017 19:00
Clojure/conj 2017 calendar
BEGIN:VCALENDAR
METHOD:PUBLISH
VERSION:2.0
X-WR-CALNAME:Clojure/conj 2017
PRODID:-//Apple Inc.//Mac OS X 10.13//EN
X-APPLE-CALENDAR-COLOR:#CC73E1
X-WR-TIMEZONE:America/Los_Angeles
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/New_York
@hagmonk
hagmonk / result-set-test.clj
Last active June 17, 2017 01:01
the not-very-lazy ResultSet
(ns result-set-test.core
(:require [clojure.java.jdbc :as jdbc]
[clojure.string :as str])
(:gen-class)
(:import (java.sql ResultSet)
(clojure.lang IReduceInit)))
(def sqlvec ["select left(md5(i::text), 10),
md5(random()::text),
md5(random()::text),
@hagmonk
hagmonk / community.md
Last active November 11, 2018 05:38
Clojure Community Collaboration Tools

This document lists ...

  • High level requirements for a community collaboration tool, ranked by importance to the Clojure community.
    • mandatory
    • expected
    • nice to have
  • Extant collaboration tools, with pointers towards existing Clojure communities within them, if any.
  • A detailed analysis of how each tool satisfies the requirements of the Clojure community.
@hagmonk
hagmonk / calendar.ics
Created November 29, 2016 21:30
Clojure/conj 2016 Calendar
BEGIN:VCALENDAR
METHOD:PUBLISH
VERSION:2.0
X-WR-CALNAME:Clojure/conj 2016
PRODID:-//Apple Inc.//Mac OS X 10.12.2//EN
X-APPLE-CALENDAR-COLOR:#1BADF8
X-WR-TIMEZONE:America/Los_Angeles
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Chicago
@hagmonk
hagmonk / gist:241a8083c5d764708010
Last active August 29, 2015 14:19
Cheryl's birthday
(*
Procedural answer to the question posted here:
"http://nbviewer.ipython.org/url/norvig.com/ipython/Cheryl.ipynb"
Doing this in other fun mathematica ways is left as an exercise for the reader :)
*)
In[665]:= str = " May 15 May 16 May 19
June 17 June 18
July 14 July 16