This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns user.demo-4-webview | |
| "Photon fullstack query/view composition with client/server transfer" | |
| (:require [datascript.core :as d] | |
| [hyperfiddle.photon :as p] | |
| [hyperfiddle.photon-dom :as dom] | |
| [hyperfiddle.photon-ui :as ui] | |
| user.util) | |
| #?(:cljs (:require-macros user.demo-4-webview))) | |
| (defonce conn #?(:cljs nil ; state survives reload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns app | |
| "Full stack, multiplayer todo list app in one file" | |
| (:require [datascript.core :as d] | |
| [hyperfiddle.photon :as p] | |
| [hyperfiddle.photon-dom :as dom] | |
| [hyperfiddle.photon-ui :as ui]) | |
| #?(:cljs (:require-macros app))) | |
| (defonce !conn #?(:clj (d/create-conn {}) :cljs nil)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require '[hyperfiddle.photon :as p] | |
| '[hyperfiddle.api :as hf]) | |
| (hfql [{(submissions "") | |
| [{(:dustingetz/shirt-size . {::hf/options (shirt-sizes gender)}) | |
| [:db/id :db/ident]} | |
| {(:dustingetz/gender . {::hf/options (genders)}) | |
| [:db/id (:db/ident . {::hf/as gender})]}]} | |
| {(genders) | |
| [:db/ident]}]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns user.blog-100-loc-crud-app | |
| "Concrete minimum viable crud app that demonstrates strong composition and real world edge cases" | |
| (:require | |
| [clojure.spec.alpha :as s] | |
| #?(:clj [datomic.api :as d]) | |
| [hyperfiddle.api :as hf] | |
| [hyperfiddle.photon :as p] | |
| [hyperfiddle.photon-dom :as dom] | |
| [hyperfiddle.html5 :as-alias html])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns dustin.y2021.missionary_promise | |
| (:require [hyperfiddle.rcf :as rcf :refer [tests % !]] | |
| [missionary.core :as m])) | |
| ; We want to turn a promise-thing into a Task | |
| ; Leo: The problem with Promise and CompletableFuture is no cancellation | |
| ; What task do we want? Is the task listening to the promise? Or is the task the process backing the promise? | |
| ; Background: when you get a promise, there is a process in the background which eventually completes the promise. | |
| ; Do you want to await the result of an already running promise | |
| ; or do you want to run the process of the promise when the task is run? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns leo.file-watcher | |
| (:require | |
| [clojure.edn :as edn] | |
| [clojure.java.io :as io] | |
| [missionary.core :as m]) | |
| (:import | |
| (java.nio.file Path FileSystems Paths WatchEvent$Modifier StandardWatchEventKinds | |
| StandardWatchEventKinds$StdWatchEventKind WatchEvent) | |
| (com.sun.nio.file SensitivityWatchEventModifier) | |
| (java.io File PushbackReader))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns hyperfiddle.via | |
| (:require | |
| [meander.epsilon :as m :refer [match]] | |
| [meander.strategy.epsilon :as r] | |
| [minitest :refer [tests]])) | |
| (comment | |
| ; Goal here is to implement async/await sugar like this: | |
| (via* (->Maybe) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns user.dustin.bind10 | |
| (:require | |
| [contrib.do :refer [Do-via via* !]] | |
| [meander.epsilon :as m :refer [rewrite]] | |
| [meander.strategy.epsilon :as r])) | |
| (declare do> mlet pure fmap fapply bind) | |
| (comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns user.dustin.minitest2 | |
| (:refer-clojure :exclude [test]) | |
| (:require | |
| [meander.epsilon :as m] | |
| [taoensso.timbre :refer [error]])) | |
| (declare tests test!) | |
| (def ^:dynamic *tests* (atom {})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### prerequisites | |
| sudo yum groupinstall "Development Tools" | |
| git --version | |
| gcc --version | |
| bash --version | |
| python --version # (system) | |
| sudo yum install -y openssl-devel readline-devel zlib-devel | |
| sudo yum update | |
| ### install `pyenv` |