Skip to content

Instantly share code, notes, and snippets.

Richard Hull rm-hull

Block or report user

Report or block rm-hull

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rm-hull
rm-hull / script.pl
Created Jul 20, 2019 — forked from bessarabov/script.pl
Script to generate data shown in post 'At what time of day does famous programmers work? Part 2. Workweek vs Weekend.' — https://ivan.bessarabov.com/blog/famous-programmers-work-time-part-2-workweek-vs-weekend
View script.pl
#!/usr/bin/perl
# 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:
# https://ivan.bessarabov.com/blog/famous-programmers-work-time-part-2-workweek-vs-weekend
#
# usage:
#
# git log --author="Sebastian Riedel" --format="%H %ai" | perl script.pl
View keybase.md

Keybase proof

I hereby claim:

  • I am rm-hull on github.
  • I am rhu (https://keybase.io/rhu) on keybase.
  • I have a public key ASAlyPkfDitTkB4MCdhTjMXTFIdzrBMeS1n4MyUgahQ3VQo

To claim this, I am signing this object:

View pixel_spaceships.pde
// Pixel Spaceships
// David Bollinger - July 2006
// http://www.davebollinger.com
// for Processing 0115 beta
// (updated for 0119 Beta)
/**
Click mouse to advance early to next pattern<br>
*/
@rm-hull
rm-hull / content.md
Created Jan 4, 2017 — forked from ayosec/content.md
Why Lisp macros are cool, a Perl perspective
View content.md
@rm-hull
rm-hull / SSD1331.py
Created Nov 27, 2016 — forked from TheRayTracer/SSD1331.py
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.
View SSD1331.py
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 ],
View palmiters-protozoa.cljs
; Based on pp161-176 of "The Magic Machine" by A.K.Dewdney
(ns enchilada.palmiters-protozoa
(:require
[big-bang.core :refer [big-bang]]
[big-bang.components :refer [dropdown slider color-picker]]
[enchilada :refer [ctx canvas canvas-size proxy-request]]
[monet.canvas :refer [circle fill fill-style
text text-align
stroke-style stroke stroke-width
line-to move-to begin-path close-path
View answer.md

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.

@rm-hull
rm-hull / wireframe-extrusion.cljs
Last active Aug 29, 2015
The humble cone contains the answers to fundamental questions about the universe. But not _this_ one, its just pixels on the screen. What is mildly interesting about this cone is the way it is generated - a 2D polyline forms the bottom side and hypotenuse of a right-handed triangle in the X-Y plane. This flat shape is then "extruded" into three …
View wireframe-extrusion.cljs
(ns enchilada.wireframe-extrusion
(:require
[enchilada :refer [canvas ctx value-of canvas-size]]
[wireframes.renderer.canvas :refer [draw-solid ->canvas]]
[wireframes.renderer.color :refer [wireframe solid]]
[wireframes.transform :refer [point combine rotate scale translate degrees->radians]]
[wireframes.shapes.primitives :refer [extrude make-line make-point transform-shape center-at-origin]]
[jayq.core :refer [show]]
[inkspot.color :refer [coerce]]
[monet.canvas :refer [get-context fill-rect fill-style]]
@rm-hull
rm-hull / aspirational-vanity-product.cljs
Last active Aug 29, 2015
I found myself in a popular electronics emporium recently; I was transfixed by the on-screen advertisements of a certain manufacturer, which seemed to encourage consumer conformity and consistency - and felt driven to reproduce it's iconography crudely here. See http://bit.ly/1Aqmz3g
View aspirational-vanity-product.cljs
(ns enchilada.aspirational-vanity-product
(:require
[enchilada :refer [ctx canvas]]
[big-bang.core :refer [big-bang]]
[jayq.core :refer [show attr css]]
[monet.canvas :refer [begin-path move-to line-to clear-rect
stroke stroke-style stroke-width stroke-cap
save restore translate rotate]]))
(def two-pi (* 2 Math/PI))
You can’t perform that action at this time.