I officially promoted <ReSheet> from alpha to beta...
# share-your-work
d
I officially promoted ReSheet from alpha to beta! ReSheet has undergone a lot of detailed work over the last two months that might not be noticeable unless you encountered specific issues that got improved. Noticable will be the improved starting document which makes it much clearer what ReSheet aims to achieve and how to use it. I added a demo, better documentation, and several examples. The examples aim to demonstrate what's possible with ReSheet and the potential I see in it. I think the "Examples > Custom Blocks" and "Examples > Interactive Game Dev" pages will be especially interesting to you. "Examples > Custom Blocks" illustrates how to integrate almost any other (web/React) library/tool. I think there’s a lot of potential if we could integrate the various tools developed here. Since many are web-based, ReSheet could potentially serve as a framework to unify them. If anyone is interested in exploring this, please send me a message! 🙂 "Examples > Interactive Game Dev" showcases the possibilities for building custom Blocks in ReSheet. It uses built-in Blocks to create a simple interactive Game Editor, featuring live programming and displaying intermediate steps/results of the code. Let me know what you think!
🙌 3
d
🎉 The little embedded ReSheets are a nice touch! And you did well with the design in the landing sheet! It does show nice versatility. Since embedding works here, does it mean embedding into websites outside of ReSheet.dev is closer? 😀
d
Thanks Declan ❤️ Embedding didn't get easier, but it should be easy to create a library out of ReSheet. Maybe I'll tackle that in the next days, I'll keep you updated
t
I love Observable. Been using it for > 3 years now. I can think of many improvements it needs. I am not sure how to get ReSheets working yet though. I would expect the following to evaluate to 6
d
It looks like you have a space before the = 3
💡 1
d
ReSheet is reactive, but only working downwards, right? Does it use a DAG to only recalc dependencies or does it refresh everything going downwards or something else? Observable works by updating values through a DAG (I think - Tom prob knows this better than I do), with a neat side-effect that the order of cells in the document doesn't matter. My habit of just putting cells anywhere I want to is a tough one to shake (this is an issue I also face in Jupyter notebooks for example)
d
Yes, it only works downwards, in the SheetOf Block to be more precise. One can also build a block that works in another direction. But technically it's currently not so easy to build a Sheet-like Block where dependencies can point anywhere between cells. Therefore the Block interface most probably would have to be extended. Sheets in fact just update everything below an updated line. But the lines themselves just update if something they depend on changed. The
recompute(state, dispatch, env, changed)
function of a Block is responsible for updates in response to changes of values before. All values available to a Block are given in
env
.
changed
contains the
Set<string>
of changed variables in
env
, which a Block can then use to compare to its own dependencies.
I also thought about implementing something like a DAG for updates. The current implementation is the result of going from dumb and easy solution in small, simple and incremental steps forward, optimising it (to a local maximum probably)
t
Observable runtime is open source, that does the topologic recomputation thing https://github.com/observablehq/runtime
👀 1
❤️ 1
d
"But the lines themselves just update if something they depend on changed" ok, no dag but this might cover a lot of the basic needs. I'll definitely give it another spin
🙂 1
s
I have a hard time differentiating this from something like observable. Although IIRC observable uses their own js variant whereas yours seems to embrace js plus react?
d
Yeah, it somehow went into the same direction. Originally I had spreadsheets with js as formulas in mind, but with more free form abilities like apple‘s numbers. And somewhere along the lines I went into the direction of embedding it in something similar to notion, without realizing that I arrived at some observable flavor. You described the difference pretty good, react is one specialty. I don’t have real experience with observable, but I think two other key differences are that you have a lot of (full) access to the browser and js runtime and that it is very modular and extensible. ReSheet is based on its own concept of a block, and you can reuse these to plug together your own ReSheet variant and embed it somewhere. I haven’t packaged it up yet, but it is easily possible. So it’s also a kind of toolkit to build similar tools, which is accessible from inside ReSheet itself to extend itself.