Skip to content

Instantly share code, notes, and snippets.

View zeitstein's full-sized avatar

Filip Juruković zeitstein

  • Belgrade, Serbia
View GitHub Profile
(ns xtdb-rules-bug
(:require [xtdb.api :as xt]))
;; rules bug https://github.com/xtdb/xtdb/issues/1569
(def n (xt/start-node {:xtdb.lucene/lucene-store {}}))
(def data
[;; loop
{:xt/id 1 :text "t1" :child 2}
@zeitstein
zeitstein / absenceq.clj
Created November 3, 2022 08:28
Benchmarking various strategies for "absence queries"
(ns absenceq
(:require [xtdb.api :as xt]))
(def absnode (xt/start-node {}))
(def tx-data
(mapv (fn [n]
[::xt/put (cond-> {:xt/id n :even? (even? n)}
(= 0 (mod n 100))
(assoc :query? false))])
(ns grove.effect
(:require
[shadow.experiments.grove :as sg :refer (<< defc)]
[shadow.experiments.grove.runtime :as rt]
[shadow.experiments.grove.db :as db]
[shadow.experiments.grove.eql-query :as eql]
[shadow.experiments.grove.events :as ev]
[shadow.experiments.grove.local :as local]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(ns grove.suspense
(:require
[shadow.experiments.grove :as sg :refer [defc <<]]
[shadow.experiments.grove.runtime :as rt]
[shadow.experiments.grove.events :as ev]
[shadow.experiments.grove.db :as db]
[shadow.experiments.grove.local :as local]))
(defonce data-ref
(-> {:initialised? true
(ns grove.guide
(:require
[shadow.experiments.grove :as sg :refer (<< defc)]
[shadow.experiments.grove.runtime :as rt]
[shadow.experiments.grove.db :as db]
[shadow.experiments.grove.eql-query :as eql]
[shadow.experiments.grove.events :as ev]
[shadow.experiments.grove.local :as local]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@zeitstein
zeitstein / fulcro-denormalization-issue.cljs
Last active December 20, 2021 10:02
Reproducing unexpected denormalization behaviour with infinitely recursive queries
(ns app.gist
(:require
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.dom :as dom :refer [div h3 span]]
[com.fulcrologic.fulcro.algorithms.merge :as merge]
[com.fulcrologic.fulcro.algorithms.denormalize :as de]))
(declare ui-folder)
(ns app.application
(:require
[com.fulcrologic.fulcro.application :as app]
[edn-query-language.core :as eql]
[com.fulcrologic.fulcro.algorithms.tx-processing :as txn]
[promesa.core :as p]
[com.wsscode.pathom3.interface.eql :as p.eql]
[com.wsscode.pathom3.connect.operation :as pco]
[com.wsscode.pathom3.connect.indexes :as pci]))