Skip to content

Instantly share code, notes, and snippets.

Jeanine Adkisson jneen

Block or report user

Report or block jneen

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
View hilite.sty
View thankful-eyes-theme.el
(deftheme thankful-eyes "a port of the thankful eyes theme from gtksourceview")
(let ((class '((class color) (min-colors 89)))
(cool-as-ice (if (display-graphic-p) "#6c8b9f" "#6c8b9f"))
(slate-blue (if (display-graphic-p) "#4e5d62" "#4e5d62"))
(eggshell-cloud (if (display-graphic-p) "#dee5e7" "#dee5e7"))
(krasna (if (display-graphic-p) "#122B36" "#121212"))
(aluminium1 (if (display-graphic-p) "#fefeec" "#fefeec"))
(scarletred2 (if (display-graphic-p) "#cc0000" "#cc0000"))
blanking() {
local mode="$1"; shift
case "$mode" in
-|stop) xset -dpms; xset s off ;;
+|start) xset +dpms; xset s on ;;
wake-loop &
ensure kill $!
open Batteries.Printf
open Batteries
type 't tokstate = Start | Tok of 't | Err of string | Eof
type 't state = {
mutable index : int ;
mutable head : 't tokstate ;
mutable behind : 't tokstate list ;
mutable ahead : 't tokstate list ;
View dynamic.js
var Dynamic = function() {
var context = {}
var defaults = {}
function bind(name, val, fn) {
try {
var save = context[name];
context[name] = val;
var out = fn();
echo == example the first ==
f1() {
local v=1
echo f1: $v
View frybo.clj
(defn frybo [fname]
(def raf ( fname "r"))
(def out-chan (chan 10))
(go-loop [] (>!! out-chan (.readByte raf)))
jneen /
Created Jun 16, 2015
Tulip evaluation order (DRAFT)

In tulip, a function call is expressed as a sequence of expressions, with parentheses appearing freely:

f arg1 (arg2) (g arg3)

If a function receives fewer arguments than its arity, the result is a curried function expecting the remaining arguments. If it receives more, it consumes its arity and calls the return value with the rest. The order of evaluation for a function call is:

  • The function expression is evaluated
  • Each argument is evaluated
View viewer.rb
#!/usr/bin/env ruby
require 'gtk3'
fname = ARGV[0]
def window(&b)
w =
proc { w.instance_eval(&b) }
View cases.rb
module Kernel
def cases(o, cases={})
o = [o] unless o.is_a? Array
raise "invalid" unless o[0].is_a? Keyword
selection = cases[o[0]] || cases[:else] || raise("non-exhaustive cases!")*cases[1..-1])
You can’t perform that action at this time.