Skip to content

Instantly share code, notes, and snippets.

(use ./build/jaylib)
(set-config-flags
:msaa-4x-hint)
(init-window 800 600 "Chart")
(init-audio-device)
(set-target-fps 60)
(def current-animations @{})
@borkdude
borkdude / assoc_pairs.clj
Last active April 6, 2021 11:38
Reports number of used k/v pairs in assoc to gather data for https://clojure.atlassian.net/browse/CLJ-1656
#!/usr/bin/env bash
#_" -*- mode: clojure; -*-"
#_(
"exec" "clojure" "-Sdeps" "{:deps {borkdude/grasp {:git/url \"https://github.com/borkdude/grasp\" :sha \"6315cea8c0b6dafc7b1eef9ccd03d6d5590d2045\"}}}" "-M" "$0" "$@"
)
(require '[clojure.java.io :as io]
'[clojure.spec.alpha :as s]
'[clojure.string :as str]
'[grasp.api :as g])
@mgarratt
mgarratt / conjure.md
Last active May 28, 2023 06:39
Conjure Clojure Cheatsheet

nREPL

Binding Action
<localleader>cd Disconnect from the current nREPL server.
<localleader>cf Connect to a server using the port found in any of the files specified by clojure.nrepl/connection.port-files.
<localleader>sc Clone the current nREPL session.
<localleader>sf Create a fresh session from scratch.
<localleader>sq Close the current session.
<localleader>sQ Close all sessions.
\sl List all sessions.
@borkdude
borkdude / script.clj
Last active October 29, 2020 02:23
Spec grep: find usages or reify in clojure.core with two or more interfaces. This idea has been implemented in a library now: https://github.com/borkdude/grasp
;; see https://github.com/borkdude/grasp for a more elaborate implementation
(ns script
(:require [clojure.java.io :as io]
[clojure.pprint :refer [pprint]]
[edamame.core :as e]))
(def clojure-core (slurp (io/resource "clojure/core.clj")))
(def parsed (e/parse-string-all clojure-core
{:all true :auto-resolve '{:current clojure.core}}))
@giner
giner / fix_ibus-mozc.sh
Last active April 8, 2023 08:04
JAPANESE: Make ibus-mozc remember last used mode
# Make ibus-mozc remember the last used mode (e.g. hiragana) and not switch back to Alphabet on restart
# See https://github.com/google/mozc/issues/381
cd $(mktemp -d)
apt source ibus-mozc
cd mozc-*/
patch src/unix/ibus/property_handler.cc << 'EOF'
--- src/unix/ibus/property_handler.cc.orig 2020-10-28 17:21:18.000849932 +0900
+++ src/unix/ibus/property_handler.cc 2020-10-28 17:21:34.172696046 +0900
@@ -80,7 +80,7 @@
@borkdude
borkdude / PR welcome.md
Last active February 2, 2021 21:54
PR welcome

Issues that welcome community contributions are labeled with PR welcome. That doesn't mean I don't welcome contributions for other issues. Feel free to reach out and discuss on Clojurians Slack or Github if you need assistance. Please note that I do not have the time or resources to give free and unlimited Clojure mentoring.

See issues

See issues

@natowi
natowi / audio2midi.md
Last active April 18, 2024 11:37
List of open source audio to midi packages
@yogthos
yogthos / clojure-beginner.md
Last active April 22, 2024 09:00
Clojure beginner resources

Introductory resources

@bakpakin
bakpakin / utf8.janet
Last active January 19, 2022 11:34
Use pegs to parse utf8
###
### utf8.janet
###
### Pure janet utf8 utils. You should probably just use C.
###
(defn utf8-encode
"Convert a sequence of codepoints to a string."
[x]
(def buf @"")
@zeux
zeux / luau_features.pdf
Last active May 22, 2023 20:42
Frequently asked questions about the Lua VM work we (Roblox) are doing.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.