Skip to content

Instantly share code, notes, and snippets.

rm-hull /
Created Jul 20, 2019 — forked from bessarabov/
Script to generate data shown in post 'At what time of day does famous programmers work? Part 2. Workweek vs Weekend.' —
# This script is made to show graphs with git commit time made on workweek vs weekend
# The desription of this script and results of its usage is avaliable at:
# usage:
# git log --author="Sebastian Riedel" --format="%H %ai" | perl
rm-hull /
Created Jan 4, 2017 — forked from ayosec/
Why Lisp macros are cool, a Perl perspective
rm-hull /
Created Nov 27, 2016 — forked from TheRayTracer/
The below Python source files control an OLED display (size 96 x 64, 65K colours) using a SSD1331 chipset and the SPI interface. The source code initialises the chipset and includes hardware accelerated functions for drawing primitive shapes and a non-hardware accelerated full ASCII set. Examples include a basic Space Invaders game, and a clock.
import struct
import spidev
import sys
import time
import random
import RPi.GPIO as gpio
ascii = [
[ 0x55, 0x00, 0x55, 0x00, 0x55 ],
[ 0x55, 0x00, 0x55, 0x00, 0x55 ],

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.


The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

rm-hull / sin.cljs
Last active Dec 30, 2015 — forked from martintrojer/sin.cljs
Sample core.async - see it running in the browser:
View sin.cljs
(ns async-test.sinewave.core
(:require [cljs.core.async :refer [<! >! chan timeout]])
[cljs.core.async.macros :as m :refer [go]]))
(defn sin-vals [offset]
(map #(Math/sin %) (iterate (partial + 0.1) offset)))
(let [events (chan)]
rm-hull / three.cljs
Last active Apr 11, 2017 — forked from michiakig/three.cljs
Simple demonstration of using THREE.js with ClojureScript [from a fork of], now working with thanks to @seabre
View three.cljs
(ns three.demo
(:require [THREE :as THREE]))
(def camera
(/ 800 600)
View sudoku.cljs
(ns sudoku
;(:refer-clojure :exclude [==])
(:require-macros [cljs.core.logic.macros :as m])
(:use [cljs.core.logic :only [everyg infd distinctfd]]))
(defn get-square [rows x y]
(for [x (range x (+ x 3))
y (range y (+ y 3))]
(get-in rows [x y])))
View curry.clj
(defmacro def-curry-fn [name args & body]
{:pre [(not-any? #{'&} args)]}
(if (empty? args)
`(defn ~name ~args ~@body)
(let [rec-funcs (reduce (fn [l v]
`(letfn [(helper#
([] helper#)
([x#] (let [~v x#] ~l))
([x# & rest#] (let [~v x#]
(apply (helper# x#) rest#))))]
You can’t perform that action at this time.