Skip to content

Instantly share code, notes, and snippets.

View selfsame's full-sized avatar

Joseph Parker selfsame

View GitHub Profile
(ns fast.core
(:refer-clojure :exclude [-next])
(:require [css.units :as u]
[cljs.pprint :as pprint]))
(def -UID (atom 0))
(defn new-uid [] (swap! -UID inc))
(defonce m-u-m (js/Array.))
(aset js/window "mum" m-u-m)
@selfsame
selfsame / om.next_design_question.md
Last active December 7, 2017 21:09
om next design question

how should I structure my component/queries?

My application interface is a set of generic panels that can be configured to display components via a :view prop. The views correspond to components that have a top level query. There could be 0-n instances of a component.

The panels themselves are normalized in the app-state:

{:panels/by-id {
@selfsame
selfsame / style.md
Last active February 1, 2016 16:00

finalpage dev gist blog

(defmacro machine [sym args & body]
(let [gosym (symbol (str sym (hash sym)))
[state value] args
pre (take-while (comp not {'-> 1} first) body)
inputs (filter (comp {'-> 1} first) body)
chans (cons '_kill_ (map (comp first rest) inputs))
conds (map #(list '= 'c %) chans)
outputs (cons nil (map (comp first format rest rest) inputs))]
`(do
~@(map (fn [c] (concat ['def c] ['(chan (async/sliding-buffer 1))])) chans)
(ns sync.sheets
(:require-macros [reagent.ratom :refer [reaction]])
(:require
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[heh.core :as heh :refer [private private!] :refer-macros [html]]
[reagent.core :as r]
[goog.events :as events]
[css.units :as units]
(ns virtual.test
(:require-macros [reagent.ratom :refer [reaction]])
(:require
[css.units :as units]
[css.core :as css]
[dollar.bill :as $ :refer [$]]
[cljs.pprint :as pprint]
[fast.style]
[reagent.core :as r]))
(defui Main
static om/IQueryParams
(params [this] {})
static om/IQuery
(query [this]
`[:item/filters
:image/by-path
{:editing ~(om/get-query Item) }
{:inventory ~(om/get-query Item) }])
Object
transition:
-webkit-transition:
font-family: 'Linux Libertine' Georgia Times serif;
font-family: 'Linux Libertine', Georgia, Times serif;
@selfsame
selfsame / 2016.md
Last active December 31, 2016 22:37
@selfsame
selfsame / ArcadiaComponents.cs
Created December 7, 2015 20:25
ArcadiaComponents.cs
using UnityEngine;
using clojure.lang;
public class ArcadiaBehaviour : MonoBehaviour, ISerializationCallbackReceiver
{
private IFn _fn;
public IFn fn
{
get { return _fn; }
set