Skip to content

Instantly share code, notes, and snippets.

View IGJoshua's full-sized avatar

Joshua Suskalo IGJoshua

View GitHub Profile
(s/def :entry/endian #{:endian/little :endian/big})
(s/def :entry/type keyword?)
(s/def :entry/id keyword?)
(s/def ::entry (s/keys :req [:entry/id :entry/type]
:opt [:entry/endian]))
(s/def :entry/size pos-int?)
@IGJoshua
IGJoshua / notes.clj
Last active October 25, 2018 06:22
Test version of a DSL for use with mfiano's parsley.clj
(ns notes
(:refer-clojure
:exclude [read])
(:require
[clojure.spec.alpha :as s]
[mfiano.parsley.data-types :refer [read]]
[mfiano.parsley.io :refer [open-file]]
[net.cgrand.xforms :as xf]))
(s/def :entry/endian #{:endian/little :endian/big})
@IGJoshua
IGJoshua / lo me mi moi jbobau.org
Last active August 12, 2023 05:33
The lojban I speak

The lojban I speak

coi ro do mi’e la saski’o tu’a dei cu ve ciksi tu’a lo me mi moi jbobau

Introduction

@IGJoshua
IGJoshua / Thinking About kau.org
Last active February 27, 2021 00:49
ciksi zo kau pe lo mi bankle

Thinking About {kau}

This is a translation of the Lojban above. While some parts have been rephrased for ease of reading, the general style and structure intentionally mirrors that of the lojban text.

@IGJoshua
IGJoshua / gjk.clj
Last active August 23, 2021 21:05
A dimension-independent implementation of the GJK algorithm in Clojure with core.matrix
(require '[clojure.core.matrix :as mat])
(defprotocol Support
:extend-via-metadata true
(support [this direction]
"Calculates a support point for the object in the given direction.")
(dimensions [this]
"Returns the number of dimensions this support operates in."))
(defn minkowski-support
@IGJoshua
IGJoshua / reload.clj
Last active January 28, 2022 21:00
Reloadable function vars
(require '[clojure.spec.alpha :as s])
(s/def ::defreloadable-args
(s/cat :name simple-symbol?
:doc (s/? string?)
:attr-map (s/? map?)
:fn-tails (s/+ any?)))
(defmacro defreloadable
"Defines a new function as [[defn]], but old references will refer to new versions when reloaded.
@IGJoshua
IGJoshua / keybase.md
Created April 13, 2022 15:23
keybase.md

Keybase proof

I hereby claim:

  • I am IGJoshua on github.
  • I am jsuskalo (https://keybase.io/jsuskalo) on keybase.
  • I have a public key whose fingerprint is FF1D 4D9C 713C ED3B 29F9 9ADF 9B6B A586 EFF1 B9F0

To claim this, I am signing this object: