Phil Freeman@paf31·Sep 8, 2017A variant on UIs I'd like to try: data UI model = UI { view :: model -> DOM , update :: Δmodel -> model -> ΔDOM }10950
Phil Freeman@paf31·Sep 8, 2017i.e. you have a view function, but also the derivative of the view function. Instead of diffing the virtual dom, you diff the model.2410
Tom Schouten@tom_zwizwa·Sep 9, 2017Replying to @paf31It helps to add a model->viewmodel indirection. Then structure viewmodel such that vm diff +- isomorphic to imperative widget toolkit calls.1
Tom Schouten@tom_zwizwaReplying to @tom_zwizwa and @paf31In my case viewmodel is a nested Erlang map, with diffs expressed in terms of key "paths". Keeps JS code minimal.github.comerl_tools/diff.erl at master · zwizwa/erl_toolsMisc Erlang Tools. Contribute to zwizwa/erl_tools development by creating an account on GitHub.12:58 AM · Sep 9, 2017·Twitter Web Client2 Likes
Tom Schouten@tom_zwizwa·Sep 9, 2017Replying to @paf31Stumbling around til I find the light switch :) Started reading "Theory of Changes". This smells a lot like CCC AD:youtube.comYOW! Lambda Jam 2017 Conal Elliott - Teaching New Tricks to Old...Slides: http://conal.net/talks/teaching-new-tricks-to-old-programs.pdfMany useful operations are well-defined on functions but are not computable, e.g., root...11