Skip to content

Instantly share code, notes, and snippets.


Marcin Kulik sickill

View GitHub Profile
sickill /
Last active Feb 8, 2017
Naive comparison of reduce/sum performance of Clojure 1.8, ClojureScipt (Planck 2.0, Lumo 1.1.0), Ruby 2.4, JRuby and Elixir 1.3.2

Naive micro-benchmark of reduce/sum I made to get the idea of raw performance range of different dynamic languages / different runtimes.

For each of these I repeated the execution until the timing stopped changing in major way (JIT etc), and saved only the last run.

Don't take it too seriously ;)

View asciinema-theme-monokai.css
/* Based on Monokai from base16 collection - */
.asciinema-theme-monokai .asciinema-terminal {
color: #f8f8f2;
background-color: #272822;
border-color: #272822;
.asciinema-theme-monokai .fg-bg {
color: #272822;
.asciinema-theme-monokai .bg-fg {
sickill / danny.datalog
Created Jan 26, 2017
"Find actors older than Danny Glover"
View danny.datalog
[:find ?actor
[?d :person/name "Danny Glover"]
[?d :person/born ?danny-age]
[?a :person/name ?actor]
[?a :person/born ?actor-age]
[?m :movie/cast ?a]
[(< ?actor-age ?danny-age)]]
View web-controllers-doc_controller.ex
defmodule Asciinema.DocController do
use Asciinema.Web, :controller
def show(conn, _params) do
|> put_layout(:docs)
|> render("show.html")
View gist:413c68c9edf85d5af96a
nREPL: Establishing direct connection to localhost:32323 ...
nREPL: Direct connection established
Connected. Clojure isn't a language, it's a building material.
Error in `cider-repl--state-handler': (void-function seq-find)
error in process filter: Symbol's function definition is void: seq-find [2 times]
View split-coll.cljs
(defn split-coll [elem coll]
(loop [coll coll
parts []
part []]
(if-let [e (first coll)]
(if (= e elem)
(recur (rest coll) (conj parts part) [])
(recur (rest coll) parts (conj part e)))
(if (seq part)
(conj parts part)
View clojure.clj
(defmacro events [one two & items] (prn one two) (set items))
(events 1 2 3 4 5 6) ; => #{3 4 5 6}
1 2 ; <- printed

Keybase proof

I hereby claim:

  • I am sickill on github.
  • I am sickill ( on keybase.
  • I have a public key whose fingerprint is 42D4 E8CD 43BD 3BB8 EA3F 1EE0 9AA2 70F0 A59B 4381

To claim this, I am signing this object:

sickill / play.rb
Last active Aug 29, 2015
The simplest asciicast player
View play.rb
# This plays asciicast (v1 format - in your terminal:
# ruby play.rb asciicast.json
require 'json'
JSON.parse([0]))['stdout'].each do |frame|
sleep frame[0]
STDOUT.write frame[1]
sickill / asciinema.yml
Created Jun 23, 2015
asciinema site config file
View asciinema.yml
:address: ""
:port: 587
:enable_starttls_auto: true
:user_name: ""
:password: "8s7df7syfysu"
:authentication: :plain
:domain: ""