On Tue, Nov 29, 2022 at 3:40 AM Matous Jan Fialka <m...@mjf.cz> wrote:
> Hello. > > I would like to get some opinion on a petite idea I got while reading > the "nextval > parameter is not clear" thread. Because it may not fit well to the > thread itself > I managed to create a new one instead... > > +1 (right approach, I was clearly wrong, learning...) > ... > The very best example of the approach of a book with runable examples > is the > "The Rust Programming Language" [1][2] aka "The Book". Who has not > known about it, > please give it few minutes to see how it works and what a great > experience it is > to read it. :-) > > I actually recorded this interaction. I think this is cool. And as I think about WHERE this goes, I DEFINITELY believe it goes in the tutorial world. I love the "peek" and the "play" icons, on mouse over. https://app.screencast.com/VddQpV2LYoUdx for those that want to see it themselves: https://rust-lang.github.io/mdBook/format/mdbook.html And scroll to the bottom of that page. > ... > I am also not aware if DB Fiddle or another service allows to run > examples covered > in such tutorial book via some API or not. If not, the results could > still be > "pregenerated" and hardcoded at compile time. Maybe, in this case, it > would be even > better. > > If in the tutorial we used this "hiding" technique to explain the code, but expanded it so it was runnable, that would be awesome. I like the idea of it being able to go directly to: https://www.db-fiddle.com/ to either a specific preloaded example, or better, pass in our code... Especially if we could do it using one CSS/Javascript wrapper! > > References: > [1] https://doc.rust-lang.org/book/ > [2] https://github.com/rust-lang/book (source code of "the book") > [3] https://rust-lang.github.io/mdBook/format/mdbook.html > -- > Matous Jan Fialka > Thanks... Let's hope the discussion gets some traction...