zlacker

[parent] [thread] 14 comments
1. donqui+(OP)[view] [source] 2022-10-20 04:57:34
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.

replies(5): >>nequo+A1 >>tinus_+rp >>blep_+rq >>the-sm+Jt >>throw1+wB1
2. nequo+A1[view] [source] 2022-10-20 05:14:24
>>donqui+(OP)
> 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/ETo2U5C7vh5o4482sMcnYbkZ6Lx...

replies(1): >>joeman+rs2
3. tinus_+rp[view] [source] 2022-10-20 09:54:25
>>donqui+(OP)
If only we had some standardized and ubiquitous kind of format, a markup language that allows hyperlinks. If could have embedded pictures and interactivity!
4. blep_+rq[view] [source] 2022-10-20 10:08:40
>>donqui+(OP)
> 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.

replies(2): >>codefl+4r >>trasht+aA
◧◩
5. codefl+4r[view] [source] [discussion] 2022-10-20 10:15:15
>>blep_+rq
Exactly. How are you supposed to code review something that lives in RAM?
replies(1): >>Jtsumm+Td1
6. the-sm+Jt[view] [source] 2022-10-20 10:46:55
>>donqui+(OP)
Are you talking about this? 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.

◧◩
7. trasht+aA[view] [source] [discussion] 2022-10-20 11:45:37
>>blep_+rq
Jupyter would really benefit from having the output and state of notebooks stored to separate files. That way you could easily version the code itself in git, while putting the output and state file types in .gitignore.
◧◩◪
8. Jtsumm+Td1[view] [source] [discussion] 2022-10-20 14:54:28
>>codefl+4r
By 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

They even wrote a tutorial to make it easier: 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.

replies(1): >>codefl+Sx1
◧◩◪◨
9. codefl+Sx1[view] [source] [discussion] 2022-10-20 16:17:00
>>Jtsumm+Td1
I’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.
replies(1): >>Jtsumm+AA1
◧◩◪◨⬒
10. Jtsumm+AA1[view] [source] [discussion] 2022-10-20 16:28:23
>>codefl+Sx1
> 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 - 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.

replies(1): >>codefl+zL1
11. throw1+wB1[view] [source] 2022-10-20 16:34:09
>>donqui+(OP)
Both 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.

◧◩◪◨⬒⬓
12. codefl+zL1[view] [source] [discussion] 2022-10-20 17:15:51
>>Jtsumm+AA1
> I hope you understand that despite your hopes for me I cannot agree. Sorry to crush your hopes, I hope you can forgive me.

Honestly, I don't have the slightest idea what's going on with you.

replies(1): >>Jtsumm+DZ1
◧◩◪◨⬒⬓⬔
13. Jtsumm+DZ1[view] [source] [discussion] 2022-10-20 18:22:16
>>codefl+zL1
> Honestly, I don't have the slightest idea what's going on with you.

I was having fun with the word "hope" which I find to be a weird sentiment because it expresses a lack of agency or control over a situation. But you didn't lack agency or control, you had an opportunity to persuade. An opportunity to convince me of your position and to try and bring me into agreement, but you didn't use that opportunity. It would have made more sense to me to express a hope for agreement if you had at least taken the chance to provide evidence for your claim.

>> I hope you will agree that this is not how Smalltalk is usually advocated.

You offered no evidence, you just hoped (asserted a lack of control in persuading) that I would agree with a bald assertion. I offered evidence to the contrary, the Pharo MOOC, which turns up in most discussions I've seen, here and elsewhere, about Pharo in particular and Smalltalk in general. Interestingly, to me, you didn't even engage with my evidence, which is unsatisfying.

You could have responded to it. You could have provided your own counter-evidence. But you didn't.

◧◩
14. joeman+rs2[view] [source] [discussion] 2022-10-20 20:44:47
>>nequo+A1
This 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.
replies(1): >>nequo+SR2
◧◩◪
15. nequo+SR2[view] [source] [discussion] 2022-10-20 23:07:10
>>joeman+rs2
That would be phenomenal. And even better if it works outside of org-mode!
[go to top]