Skip to content

Instantly share code, notes, and snippets.

(ns vormen
(:require [clojure.string :as str]))
(defn basisvorm []
(case (rand-int 4)
0 [:num (inc (rand-int 15))]
(1 2 3) (into [:term (inc (rand-int 15))]
(comp (map (fn [_] (rand-nth '[a b c d])))
(distinct))
(range (inc (rand-int 2))))))
(ns vormen
(:require [clojure.string :as str]))
[:+ [:* 25 'a]]
(defn dice [n d]
(apply + (map (fn [_] (inc (rand-int d)))
(range n))))
(defn basisvorm []
#!/usr/bin/env bb
;; lein2deps | jet --pretty > deps.edn
(require '[clojure.string :as str]
'[clojure.edn :as edn])
(defn read-project-clj []
(-> "project.clj"
slurp
#!/bin/sh
exec java-17 \
-Xms8G \
-Xmx8G \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC \
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>my.datomic.com</id>
<username>...</username>
<password>...</password>
</server>

Graphics

CLJC

  • Quil Graphics and animation sketches, based on Processing
  • th.ing/geom a comprehensive and modular geometry & visualization toolkit. WebGL, OpenGL, SVG.
  • Iglu Turning data into GLSL shaders for use by OpenGL and WebGL. By Zach Oakes, part of play-cljc.

Clojure

Making nREPL and CIDER More Dynamic (part 2)

In part 1 I set the stage with a summary of what nREPL is and how it works, how editor-specific tooling like CIDER for Emacs extends nREPL through middleware, and how that can cause issues and pose challenges for users. Today we'll finally get to the "dynamic" part, and how it can help solve some of these issues.

To sum up again what we are dealing with: depending on the particulars of the nREPL client (i.e. the specific editor you are using, or the presence of

// Open Slack in a browser, then copy-paste this into the console (F12)
// It will scroll through the emoji picker 4 times (once for each skin tone),
// and finally download the full list of emoji shortcodes.
// You can parse the actual unicode code points out of the image file names.
var emojis={}
function selectSkinTone(value) {
Exception in thread "main" Syntax error compiling at (clojure/data/xml/impl.clj:1:1).
at clojure.lang.Compiler.load(Compiler.java:7648)
at clojure.lang.RT.loadResourceScript(RT.java:381)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.load(RT.java:459)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)