I have this idea for a programming environment ins...
# thinking-together
s
I have this idea for a programming environment inside a spreadsheet that generates interactive websites. The spreadsheet would have all the usual functions, plus some UI ones like “=renderTable(A1:D12)” to take data in the spreadsheet and display as a table. or “=button(‘sort by date’, onclick=sort(A1:D12, A:1)” to render a button that filters the table. We would compile this into JS, load the spreadsheet into memory and render the DOM, add event handlers defined in the spreadsheet etc. The idea is you only have to know how to work in a spreadsheet in order to build a website. Especially for folks that have a ton of data in spreadsheets and just want a basic site to display it. It's inspired by streamlit which is basically Python that generates a web frontend by repeatedly evaluating the python script on the backend on every user interaction, and rebuilding the DOM (via a patch). Although I'm not sure if the spreadsheet version would need to run on the backend or if it could start just all client side (since spreadsheets tend to live client side). https://streamlit.io/ Curious on anyone's thoughts. Maybe I’ll prototype it. But it’s more a fun idea than anything since I don’t know who would exactly need such a tool.
t
Observavble/Lopecode is a reactive spreadsheet engine + DOM renderer. Its very good for authoring DataViz where you need fast feedback loops but full DOM power. The just updated their About page new.observablehq.com/about. Lopecode is the local-first single HTML version I make github.com/tomlarkworthy/lopecode
👍 1
s
Observable is super cool. I wanted to do it in a pure spreadsheet tho so the user doesn't have to learn anything new.
I'm curious about Lopecode…it looks like the main advantage over observable is that you can run everything locally?
t
You can't change the hosting framework of Observable, so you are given a search feature, a standard library, a coding editor, and you have to accept it and live in your sandbox. But with Lopecode the framework is implemented in userspace so you can add your own editor, code search etc. To get those kinds of features working in Lopecode, there is more meta-programming facilities than Observbale. Though, because Lopecode it compatible with Observable, in a technical sense those facilities are now also available there too through the userspace libraries Lopecode publishes e.g. observablehq.com/@tomlarkworthy/runtime-sdk. But you can't really do things like annotate properly in Observable, it has no self-serialization so it forgets your annotations, but with Lopecode it can reserialize its own runtime and remember changes. The academic writeup of what I think makes Lopecode unique is called "source-last" programming.
you and few other atproto suggestions provoked me into seeing if it was possible to layer a spreadsheet properly onto Observable notebooks. and it is! tomlarkworthy.github.io/lopebooks/notebooks/tomlarkworthy_spreadsheet.html new.observablehq.com/@tomlarkworthy/spreadsheet https://feelingofcomputing.slack.com/archives/C03RR0W5DGC/p1788084452267889