Skip to content

Instantly share code, notes, and snippets.


Daniel Kvasnička dkvasnicka

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dkvasnicka on github.
  • I am dkvasnicka ( on keybase.
  • I have a public key ASCzKqMENpeKa_hmnrf1upvL9TxL_a3TpGVvUTY7f7aAkgo

To claim this, I am signing this object:

dkvasnicka / Dockerfile
Last active Feb 26, 2021
Racket Jupyter kernel setup for
View Dockerfile
RUN sudo apt-get update && \
sudo apt-get install -y libzmq5
# Derived from which is
# licensed under the MIT license.
View dot.clj
(let [rng (doall (range 1000000))]
(time (reduce + (map * rng rng))))
View gist:5908493
(extern nanotime () -> u64)
(define (main)
(let ((v1 (iota 1000)) (v2 (iota 1000)))
(let ((start (nanotime))
(reduce +
(kernel ((x v1) (y v2))
dkvasnicka / gist:5692932
Last active Dec 17, 2015
Currying in CL
View gist:5692932
(defun curryplus (x)
(lambda (y) (+ x y)))
(funcall (curryplus 2) 3) ; = 5
dkvasnicka / gist:5691519
Created Jun 1, 2013
Currying in Racket
View gist:5691519
#lang racket
(define (curryplus x)
(lambda (y) (+ x y)))
((curryplus 2) 3) ; = 5
dkvasnicka / gist:5691514
Created Jun 1, 2013
Currying in Clojure
View gist:5691514
(defn curryplus [x]
#(+ x %))
((curryplus 2) 3) ; = 5
dkvasnicka / app.rkt
Created May 26, 2013
Primitive RESTful hello world in Racket. Run racket (racket -il xrepl) and load the file (,rr app.rkt). Browse to http://localhost:8000/hello/whatever Uses Spin No buildfile needed or anything... Racket requires the library from disk or downloads it from the central repo (PLaneT) if needed. Übercool.
View app.rkt
#lang racket
(require (planet dmac/spin))
(get "/hello/:name" (lambda (req) (string-append "Hello, " (params req 'name))))