3 ms·
> If you consider the design space, “resetting the state every time” is exactly how basically every other “fiddle” app works. This app's design space is exposi
by sgbeal 4y ago
> If you consider the design space, “resetting the state every time” is exactly how basically every other “fiddle” app works.
This app's design space is exposing the sqlite3 shell app via the web, not to emulate every other fiddle environment. sqlite shell app's doesn't (with very good reason) behave that way and the fiddle frontend is just passing state between the user and that app.
> The idea is to let you build up a reproducible, shareable outcome.
Because this app has no server-side state, we have no way of _sharing_ the outcome. Large fiddle sites give you a short URL which refers to state in their server-side storage. This app completely lacks that (and we're definitely not going to add server-side state to this app). What we _might_ eventually do is offer the ability to base64-encode the SQL into a URL argument which can be shared, but URL length limits are very server-dependent so it would be impossible to portably share "large" fiddles that way.
> (and confusingly easy to discover on accident when you get weird errors as SQLite tries in vain to execute some invalid SQL fragment you accidentally had selected before you hit the run button).
There's a comment in the initial example SQL explaining that feature, so it'll _hopefully_ be noticed by people new to the app. (Noting that that's not, as of this writing, yet deployed on the production server.) Another feature under consideration is having it intermittently spit out random tips/reminders to the output area (when the db is not working - the app knows when that's happening), and the exec-selection feature would be one such tip.
- infogulch 4y ago"sharing the outcome" in fiddle apps often just means reproducing the input text expecting a reproducible output given consistent input, nothing more. This can be seen through the fact that sometimes the share feature doesn't use any server side storage (link shortener) at all and instead stores the entire text of the fiddle in the url itself, e.g. https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&code=fn%20main()%20%7B%0A%20%20%20%20println!(%22Hello%2C%20sqlite!%22)%3B%0A%7D https://play.rust-lang.org/?version=stable&mode=debug&editio... This is just to clarify GP's perspective, I understand that you may be going more for "instant local sqlite repl environment" than "playground to develop shareable snippets of sqlite commands".