Skip to content

Instantly share code, notes, and snippets.

View hypirion's full-sized avatar
👋

Jean Niklas L'orange hypirion

👋
View GitHub Profile
{:deps {c/c {:git/url "https://gist.github.com/875d52f3b6871c8c08416aeea63d52f9.git"
:sha "1a0a886fc5441f9740601592db3ad3579681e3c5"}
a/a {:git/url "https://gist.github.com/a5562f1f3b81c7d3ee8d15367ed37885.git"
:sha "aa10a622aa0007724fc2b41f52d5c67ba281fc97"}}}
{:deps {b/b {:git/url "https://gist.github.com/08d7b3d403db2eec848ac93c2a673a90.git"
:sha "422570ec40a0d13dead95f8d187aa895c550ea47"}}}
{:deps {x/x {:git/url "https://gist.github.com/6aa4e5468b68e9be2d7d49e8ae80bd5e.git"
:sha "7988b23d6c97482f47e3c9e58ca55692c8a4884c"}}}
{:deps {x/x {:git/url "https://gist.github.com/6aa4e5468b68e9be2d7d49e8ae80bd5e.git"
:sha "6406bcf1c54d77b8ed1ff668337aa0d848fafb35"}}}
@hypirion
hypirion / deps.edn
Last active March 18, 2018 15:40
x
{:deps {y/y {:git/url "https://gist.github.com/2ef7e7bf8fc23fbed285041f7e7301cb.git"
:sha "f2672884f50c32fde1a0c191ff68c5cec4497624"}}}
{:deps {}}
{:deps {}}
@hypirion
hypirion / RandomColl.java
Created April 11, 2017 23:03
Collection with constant time insertion (amortised) and constant time uniform random removal
import java.util.*;
public class RandomColl<T> {
ArrayList<T> lst;
Random rng;
public RandomColl() {
lst = new ArrayList<>();
rng = new Random();
}
@hypirion
hypirion / text.txt
Created September 26, 2015 16:44
Result of building leiningen
jeannikl@Madonna of the Wasps  ~/leiningen   master ●  git rev-parse HEAD
d701275464c185f4f22be58450b1af4b94a79836
jeannikl@Madonna of the Wasps  ~/leiningen   master ●  cd leiningen-core
jeannikl@Madonna of the Wasps  ~/leiningen/leiningen-core   master  lein version
Leiningen 2.5.3 on Java 1.8.0_66-internal OpenJDK 64-Bit Server VM
jeannikl@Madonna of the Wasps  ~/leiningen/leiningen-core   master  lein bootstrap
Created /home/jeannikl/leiningen/leiningen-core/target/leiningen-core-2.6.0-SNAPSHOT.jar
Wrote /home/jeannikl/leiningen/leiningen-core/pom.xml
Installed jar and pom into local repo.
jeannikl@Madonna of the Wasps  ~/leiningen/leiningen-core   master ●  cd ..
@hypirion
hypirion / pvec.py
Last active August 29, 2015 14:23
Small (unoptimised) persistent vector in Python
## This is not an optimised persistent vector, just an implementation "straight
## off" http://hypirion.com/thesis.pdf. However, compared to Clojure's
## persistent vector, it is interesting in that this implementation
##
## - has O(n) runtime on iteration/reduce and map
## -> Clojure's implementations run in O(n log n) time
## - has submap and subiterators that runs in O(min(log n, m)) time,
## where m is the amount of elements to walk over
## -> Clojure doesn't support submap, although has subiterator indirectly
## through subvec, which runs in O(min(log n, m log n)) time