Skip to content

Instantly share code, notes, and snippets.

@aamedina
aamedina / rdf.edn
Created November 22, 2022 23:37
db-stats on a datomic database with a schema bootstrapped from linked data on the semantic web
{:datoms 31934,
:attrs
{:schema/domainIncludes {:count 1451},
:rdfs/domain {:count 329},
:rdf/type {:count 3763},
:doap/mailing-list {:count 1},
:owl/deprecated {:count 24},
:dc11/date {:count 3},
:dc11/format {:count 1},
:dc11/creator {:count 2},
@aamedina
aamedina / boot.edn
Last active November 20, 2022 23:07
wip bootstrapping rdf in datomic
#:db{:ident :rdf/uri
:valueType :db.type/string
:cardinality :db.cardinality/one
:unique :db.unique/identity}
#:db{:ident :rdf/literal
:valueType :db.type/string
:cardinality :db.cardinality/one
:fulltext true}
[:foaf/knows :rdfs/isDefinedBy "http://xmlns.com/foaf/0.1/"]
[:foaf/knows :rdfs/range :foaf/Person]
[:foaf/knows :rdfs/domain :foaf/Person]
[:foaf/knows :rdf/type :owl/ObjectProperty]
[:foaf/knows :rdfs/comment "A person known by this person (indicating some level of reciprocated interaction between the parties)."]
[:foaf/knows :rdfs/label "knows"]
[:foaf/knows :vs/term_status "stable"]
[:foaf/knows :rdf/type :rdf/Property]
[:foaf/firstName :rdfs/isDefinedBy "http://xmlns.com/foaf/0.1/"]
[:foaf/firstName :rdfs/range :rdfs/Literal]
@aamedina
aamedina / wikipunk.clj
Last active September 20, 2022 22:06
become a clojure wikipunk
(in-ns 'user)
(require '[clojure.java.io :as io]
'[clojure.data.json :as json]
'[datomic.client.api :as d])
(def metadata
"redmod/metadata.json"
(with-open [rdr (io/reader "https://gist.githubusercontent.com/aamedina/01ed2dcc1c318d6992b0ecb6761acb45/raw/2c776b67200044717bdb5643558d294f36238089/metadata.json")]
(json/read rdr)))
@aamedina
aamedina / aliases.edn
Last active September 19, 2022 22:42
wikipunk.net
#:redmod.alias{:name "vehicleAVBaseObject", :class "AVObject"}
#:redmod.alias{:name "gamedataSpawnableObject_Record",
:class "SpawnableObject_Record"}
#:redmod.alias{:name "gameAttachmentSlotEventsItemRemovedFromSlot",
:class "ItemRemovedFromSlot"}
#:redmod.alias{:name "gameuiPanzerExplosion",
:class "PanzerExplosion"}
#:redmod.alias{:name "gamedataMiniGame_AllSymbols_Record",
:class "MiniGame_AllSymbols_Record"}
#:redmod.alias{:name "gamebbScriptID_String",
@aamedina
aamedina / letter.md
Created June 24, 2022 18:26
Maimonides Letter on Astrology

Rabbi Moses ben Maimon (called Maimonides, or Rambam) LETTER ON ASTROLOGY

from Isadore Twersky, A Maimonides Reader (New York: Behrman House, Inc., 1972) pp. 463-473

Twersky's Intro: In this answer to inquiries from scholars of southern France, Maimonides exposes foibles and fallacies of astrology, while touching upon such questions as the sources of knowledge, creation of the world, divine providence and free will, and the Messiah. The rationalistic temper of the letter is characteristic of Maimonidean writing in general and accurately reflects many basic Maimonidean attitudes. Inasmuch as this letter was intended for general circulation, with no pretense to esotericism, the references to the Guide and the statements concerning the rationalization of the commandments are highly significant. Noteworthy is the oft-quoted comment that the Second Temple was destroyed and national independence forfeited because the Jews were preoccupied with astrology. On the whole, the letter is a model of compression, precisi

@aamedina
aamedina / init.el
Created May 22, 2022 20:18
Common Lisp snippet from my init.el for Sly config using use-package
;;;; Common Lisp
(use-package sly
:ensure t
:init (setq inferior-lisp-program "lispworks"))
(use-package sly-asdf
:after sly
:ensure t)
(ns dev.describe
"A Clojure port of the Common Lisp describe function."
(:require
[clojure.pprint :refer [pprint]]
[clojure.repl]
[clojure.spec.alpha :as spec]))
(def hierarchy (make-hierarchy))
(defmulti describe-object
@aamedina
aamedina / months.clj
Last active May 12, 2019 19:52
This describes an enumerated set of valid months in the calendar. I love how easy in Clojure it is to read, write, and reason about the "shape" of the data that flows through your code. An elegant, and rapidly evolving language.
(clojure.spec-alpha2/def ::חודש
#{:חודש/ניסן
:חודש/אייר
:חודש/סיון
:חודש/תמוז
:חודש/אב
:חודש/אלול
:חודש/תשרי
:חודש/חשון
:חודש/מרחשון
@aamedina
aamedina / vulkan-dff.lisp
Created December 27, 2018 19:47
Cleaned up output from the LispWorks foreign parser on vulkan.h
(in-package "CL-USER")
(fli:define-c-typedef (vk-flags (:foreign-name "VkFlags"))
:uint32)
(fli:define-c-typedef (vk-bool32 (:foreign-name "VkBool32"))
:uint32)
(fli:define-c-typedef (vk-device-size (:foreign-name "VkDeviceSize"))
:uint64)
(fli:define-c-typedef (vk-sample-mask (:foreign-name "VkSampleMask"))
:uint32)