This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-20
Channels
- # announcements (1)
- # bangalore-clj (27)
- # beginners (82)
- # boot (4)
- # chestnut (1)
- # cider (22)
- # cljs-dev (26)
- # cljsrn (4)
- # clojure (118)
- # clojure-dev (18)
- # clojure-italy (2)
- # clojure-losangeles (1)
- # clojure-nl (2)
- # clojure-russia (1)
- # clojure-spec (15)
- # clojure-uk (125)
- # clojurescript (61)
- # core-async (74)
- # cursive (2)
- # datomic (41)
- # duct (6)
- # editors (7)
- # emacs (3)
- # events (1)
- # figwheel-main (3)
- # fulcro (111)
- # hoplon (11)
- # jobs-discuss (97)
- # lein-figwheel (99)
- # off-topic (34)
- # onyx (4)
- # parinfer (9)
- # pedestal (4)
- # precept (2)
- # re-frame (5)
- # reagent (2)
- # reitit (4)
- # ring-swagger (11)
- # shadow-cljs (104)
- # spacemacs (4)
- # tools-deps (19)
- # vim (8)
- # yada (15)
@alandipert nowadays my primary backend is the ethereum blockchain and i just started to talk to if finally from clojure again, so im just doing json-rpc via the browser's builtin fetch
api, like (def fetch (js/fetch.bind js/window))
🙂
https://github.com/enumatech/cljs-abi-viewer/blob/block-explorer/src/eth/explorer.cljs#L87-L99
otherwise, im trying to avoid very interactive UIs, because UIs are just hard and suck a lot of time away from the core problems of many projects...
on the other hand, what i've learnt from hoplon and splint, i've carried over to practice and whipped up a super minimalistic, non-reactive version of hoplon (https://gitlab.com/oax/state-channel-poc/blob/master/viz/states/src/bongo/dom.cljs) so i could create this interactive visualization (which u can navigate with shift-left/right): https://onetom.keybase.pub//state-channels/
@onetom looks cool! do i understand right that's a way to project cljs data to dom?
yes, that's a good way to put it. i provided default dom representation for the most common data types, so i can just directly render them, but later customize arbitrary parts of the data by turning those parts into records and implement a render function them
yeah that's super cool. I was messing with a lighter weight subset of hoplon myself recently. Yours looks super clean
Thank you!
I haven't actually designed it, I just built it as a need has arose for a feature.
You can see its evolution was just about 4 steps:
1. https://github.com/enumatech/cljs-abi-viewer/commit/d3c74ef7877aaae1e4295d7761d62f9e61ad889c
2. https://github.com/enumatech/cljs-abi-viewer/commit/657ace1952410b0724818934453a565d3e6b20a0
3. https://github.com/enumatech/cljs-abi-viewer/commit/4eb2eb35767fc0a78dc49bc65aeadec2aefa4c6b
and then i came up with the Elem
protocol with the render
method idea to keep the data and its visualization connected but as loosely as i could possibly think of:
https://github.com/enumatech/cljs-abi-viewer/commit/fde773ccf58ba77bc6ad50793ce081f44998d542#diff-c8c65fd8671e437d18217fbfe0865542
i had some mirthil experiments last year, but i dropped it after about 5-10 minutes because when i was editing text in an input field rendered by mirthil, the cursor was jumping to the end of the input text, but not in every browser as if the whole input element has been recreated. then i tried some hoplon and react examples and none of those had issues with the same browser... but their state management story is not the best either, so i moved on...
ah, sounds like its not fully baked