5 ms·
I watched the video when this was last submitted and he makes some interesting points with many of which I disagree. Images as illustrations in the code: Yeah
by donquichotte 4y ago
I watched the video when this was last submitted and he makes some interesting points with many of which I disagree.
Images as illustrations in the code:
Yeah, sure, it would be nice to have the Vitruvian Man in the code, but it's also nice to be able to re-open your text file in 5 years, when development on the IDE has stopped and it no longer runs on current operating systems. Also, animations would be hugely distracting.
Code cells:
With jupyter and spyder I have been bitten by lingering obsolete state from re-running cells or code blocks various time. I find the program much easier to debug if it runs on a clean slate and builds all the state from scratch. If building state takes long, I try to cache, save it to disk, and go from there.
Nonetheless, an interesting perspective.
- nequo 4y ago> Yeah, sure, it would be nice to have the Vitruvian Man in the code, but it's also nice to be able to re-open your text file in 5 years I imagine this as an Emacs package that recognizes tree-like code patterns (like what he showed in the video) and replaces those patterns inline when you toggle it. Your code is still the same plaintext. But your editor can display chunks of it as graphs. Emacs does this already in latex-mode and org-mode for math formulas.[1] It shouldn't be a stretch to do this for other types of code, too. [1] See this example in markdown-mode: https://external-preview.redd.it/ETo2U5C7vh5o4482sMcnYbkZ6LxfIb_2ePbPGBObW0k.png?format=pjpg&auto=webp&s=b05871716101838bb6310bf7fe6c92c79a91ecc9 https://external-preview.redd.it/ETo2U5C7vh5o4482sMcnYbkZ6Lx...
- joeman1000 4y agoThis is already quite simple. You can have a .org buffer with SRC blocks & have their output displayed underneath (exactly like a jupyter/Pluto notebook). I’m thinking you can define a function and underneath it you can say something like “@structure myfunc” to get an image of the structure as the src-block output.
- nequo 4y agoThat would be phenomenal. And even better if it works outside of org-mode!
- tinus_hn 4y agoIf only we had some standardized and ubiquitous kind of format, a markup language that allows hyperlinks. If could have embedded pictures and interactivity!
- blep_ 4y ago> With jupyter and spyder I have been bitten by lingering obsolete state from re-running cells or code blocks various time. I find the program much easier to debug if it runs on a clean slate and builds all the state from scratch. Hm, reading this just made my brain connect the reasons I don't like Jupyter with the reason I am baffled by people who like Smalltalk. An image that you can't fully restart just... doesn't seem like a pleasant development environment.
- codeflo 4y agoExactly. How are you supposed to code review something that lives in RAM?
- Jtsummers 4y agoBy committing the code to a git repo and having a code review like every other language out there. I'm guessing you have never tried these things but image based Smalltalk implementations have supported VCS for decades now, literally. In Pharo this is with git using Iceberg: https://github.com/pharo-vcs/iceberg https://github.com/pharo-vcs/iceberg They even wrote a tutorial to make it easier: https://github.com/pharo-vcs/iceberg/wiki/Tutorial https://github.com/pharo-vcs/iceberg/wiki/Tutorial It's not magic, it's not even a problem, because the problem you're imagining doesn't actually exist. So long as the user of the system has at least half a brain (and maybe less) they will be capable of distributing their code with git these days.
- codeflo 4y agoI’m not imagining anything, I’m arguing from logic. If the code is distributed via Git, then you have a normal programming language (with a particularly cool IDE/REPL). Which isn’t in any way a bad thing, but I hope you will agree that this is not how Smalltalk is usually advocated. You can’t have it both ways.
- Jtsummers 4y ago> I hope you will agree that this is not how Smalltalk is usually advocated. I will not agree, and I hope you will understand why after I give some evidence. Here's what Pharo advocates typically point people towards: https://mooc.pharo.org/#week1 https://mooc.pharo.org/#week1 - I've linked to the week1 anchor so you can see that Iceberg makes it in pretty early. I hope you understand that despite your hopes for me I cannot agree. Sorry to crush your hopes, I hope you can forgive me.
- the-smug-one 4y agoAre you talking about this? https://youtu.be/8Ab3ArE8W3s?t=2190 https://youtu.be/8Ab3ArE8W3s?t=2190 It's not inserting images into the code. It's a structured editor presenting an alternative view of the code. It's just code. That's all there is to this. Man, frustrating.
- throw10920 4y agoBoth of these problems are pretty easily overcome. > it's also nice to be able to re-open your text file in 5 years, when development on the IDE has stopped and it no longer runs on current operating systems Export the code to normal text, manually translate the images to ASCII or just keep them as Markdown-style links to images. The cognitive benefit from having actual images in your code will massively outweigh the expected small one-time cost of having to perform a one-time task to migrate them a fraction of the time (and it's more likely that a particular software project will die than an editor that it's written in). > I have been bitten by lingering obsolete state from re-running cells or code blocks Make cells explicitly show you what state/inputs they use. If you're not using purely functional programming languages or design patterns, then having the ability to re-use state will also massively outweigh the occasional transient issues from accidentally doing so. The upsides of both of these techniques massively outweigh the downsides. Not to say that you have to use them, of course - there are still people trying to implement large software projects using UNIX shell scripts.