A Pen by Christian Romney on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ack # search | |
ansible # config mgmt | |
apachetop # how's apache | |
apple-gcc42 # helps to build certain software | |
aria2 # faster downloads | |
asciidoc # documentation | |
aspell # for emacs/vim spell-checking | |
bazaar # every now and then I clone a repo hosted by ubuntu | |
brew-desc # get better descriptions of homebrew utils | |
casperjs # javascript testing and screenscraping |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Geiser settings | |
(setq geiser-active-implementations '(racket)) | |
(setq geiser-repl-startup-time 10000) | |
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history") | |
(setq geiser-repl-query-on-kill-p nil) | |
(setq geiser-implementations-alist | |
'(((regexp "\\.scm$") racket) | |
((regexp "\\.ss$") racket) | |
((regexp "\\.rkt$") racket))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Geiser settings | |
(setq geiser-active-implementations '(racket)) | |
(setq geiser-repl-startup-time 10000) | |
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history") | |
(setq geiser-repl-query-on-kill-p nil) | |
(setq geiser-implementations-alist | |
'(((regexp "\\.scm$") racket) | |
((regexp "\\.ss$") racket) | |
((regexp "\\.rkt$") racket))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; BinOp ::= [Symbol Operand Operand] | |
;; Operand ::= Number | BinaryOperation | |
(defprotocol Numerical | |
"A thing which has a numerical value" | |
(value [this])) | |
(defprotocol PrintableMathExpression | |
"A mathematical expression which can be printed | |
using infix or prefix notation" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn filter-col [a] | |
(filter (juxt #(< 30 %) odd?) a)) | |
(defn report-results [col] | |
(println col) | |
col) | |
(-> (range 100) | |
filter-col | |
report-results) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
;; Non-tail | |
(define sum1 | |
(λ (n) | |
(if (= n 0) n | |
(+ n (sum1 (- n 1)))))) | |
(sum1 10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Hi, I'm Reservation. | |
I dont need an interface because I am a carrier of data. | |
Like a good carrier, I can be instantiated in any layer and used | |
in any other layer. | |
If you need to do stuff with me you should know to instantiate the correct | |
service and pass me to it. | |
Makes sense too since I you might need other classes to instantiate service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns async.core | |
(:require [clojure.core.async :as async :refer :all] | |
[clojure.data.generators :as gen]) | |
(:gen-class)) | |
(defrecord SyncMessage [text wake]) | |
(defmacro forever [& body] | |
`(while true | |
~@body)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns async.core | |
(:require [clojure.core.async :as async :refer :all] | |
[clojure.core.async.lab :as lab] | |
[clojure.data.generators :as gen]) | |
(:gen-class)) | |
;; A Message carries some text to be communicated | |
;; and a wake channel which notifies the originator | |
;; that it may transmit again. | |
(defrecord Message [text wake]) |