More applied lens theory. A spreadsheet layout can...
# devlog-together
t
More applied lens theory. A spreadsheet layout can be a bidirectional projection of a reactive notebook. This is extremely compelling, you can just us d3 for arithmetic and normal named cells for constants and external function, but the UX needs some work. A$1 vs A1 all works by lazily creating the cell "A$1" on the fly, then the normal notebook reactivity engine works... you can actually delete the spreadsheet projection and the code continues to work because the actual cell wiring was lifted into the notebook paradigm as normal cells already. This is my 2nd attempt at a spreadsheet prototype but I think I have got the model right this time (thanks again lens theory). Again its not either/or with notebook format. Its both at the same time.
❤️ 3
😍 1
OK I think it is pretty good. tomlarkworthy.github.io/lopebooks/notebooks/tomlarkworthy_spreadsheet.html Lenses have utterly reshaped my programming model. I am a post-modern programmer who always tries to reuse what has already been done but for new purposes, and lenses fits so well for that because I can take something and utterly reshape it without damaging the original thing. In this case the Observable Runtime took inspiration from spreadsheet reactivity, which I like, and now we can fit the spreadsheet paradigm back onto it, without redoing the reactivity engine. Lenses are kind of strictly additive because the original remains working. I think my old way of working was to try and wrap things with new abstractions, or monkey patch, or come up with conventions at the boundary. Lenses lead to sibling abstractions at the same level, its much nicer, and there a bunch of clear lens laws you can property check against so you know if it is truly working or not. I put lenses on the same pedestal as compilation/parsing thoery, I think its better than parsing.
w
I just have to say Tom that I really need to seriously look through your stuff. Yes, lenses are delightful: keeping enough info around to allow for richer change reconciliation.
t
ok I go on vacation tomorrow so I will just publish the NEWSLETTER 002 which has a better overview but is probably buggy as I just did it in a rush did-plc-j7nm3lrd5h7fm3sfhcv3lhfv.lopecode.com/r/lopecode-news-issue-2
👍 1
❤️ 1
oh it works quite well on bluesky now, I finally got the standard.site thing working bsky.app/profile/…/post/…