Skip to content

Instantly share code, notes, and snippets.


Eero Helenius eerohele

View GitHub Profile
ZlGCeaVIOme2sCc k7aM5azZDf8EwrX 4dUaIaKru5MOfW7 xDTolSOzxKTDA2f
q36EErpEcULTthd 1khuiM9BjaUTCKq 6Xr2MZHgg6smaIL BpjOvAsq7EbxijZ
fSj5kuHbySVTnuH YIWUnXY5GoHnZlS aqDRMsNR9btNJlP pzv7I0aNlDoMQsU
Z1imMSmbnfS2TgB avyYaeJjLH8GrrZ jTEzl0Qz5Z.
View core.clj
(require '[clojure.main :as m])
:init #(apply require m/repl-requires)
:eval (fn [form]
(require '[clojure.pprint :refer [pp pprint]])
(require '[hashp.core])
(eval form))))
eerohele / learnxinyminutes-clojure.markdown
Last active Nov 21, 2019
A Markdown version of the Clojure variant of learnxinyminutes
View learnxinyminutes-clojure.markdown

This is a version of learnxinyminutes for Clojure adapted for use with Useless.

All I've done is lifted most of the comments out of the code blocks, removed the ; => bits, and some minor copy editing.

Clojure is a Lisp family language developed for the Java Virtual Machine. It has a much stronger emphasis on pure functional programming than Common Lisp, but includes several STM utilities to handle state as it comes up.

This combination allows it to handle concurrent processing very simply, and often automatically.

View core.async-walkthrough.markdown

core.async walkthrough

This is a Markdown version of the core.async walkthrough.clj.

This walkthrough introduces the core concepts of core.async.

The clojure.core.async namespace contains the public API.

eerohele /
Last active Nov 18, 2019
A minimal, annotated example of using Clojure prepl with core.async
  1. Acknowledge that you might actually want to use Propel instead of relying on this Gist.

  2. Clone this Gist:

    git clone prepl
  3. Open the project in your favorite editor/IDE.

  4. Start evaluating the forms in prepl.clj one by one.

View sudoku_compact.markdown


(ns sudoku
  (:refer-clojure :exclude [==])
  (:use clojure.core.logic))

(defn get-square [rows x y]
  (for [x (range x (+ x 3))
        y (range y (+ y 3))]
eerohele / possible-solutions.markdown
Last active Sep 4, 2019
shadow-cljs: shadow-cljs server shuts down with `RejectedExecutionException` when running `npx shadow-cljs watch app` (macOS)
View possible-solutions.markdown
  1. In your project.clj, try setting your maximum JVM heap size:

    :jvm-opts ["-Xmx2G"]
eerohele /
Last active Jan 11, 2019
shadow-cljs & mkcert

Using mkcert to generate a trusted certificate for ClojureScript development with shadow-cljs

NOTE: These instructions are a work in progress. Don't trust them yet.


View error.txt
;; evaluating the hello-world namespace yields:
CompilerException clojure.lang.ExceptionInfo: Call to #'clojure.set/map-invert did not conform to spec:
-- Spec failed --------------------
Function arguments
You can’t perform that action at this time.