Oh no.

@V4N4D1S Don't get me started on how it is 20 fucking 24 and we still can NOT, under ANY CIRCUMSTANCES, put a PICTURE in a code comment.

Because clearly no code has ever needed a DIAGRAM to explain it. That would be utterly useless. Besides, it's not like computers could handle it.

@WAHa_06x36 @V4N4D1S Markdown, github flavored, has it (if not markdown at all).

You can put a comment that direct to a section in a .md somewhere in your repo

@OSchell That's not in source code though. I can put a .odf file in my repo as well. I want picture *in the source*, so I can see them while I am working on the code.
@WAHa_06x36 @OSchell ASCII art ftw!
@pixelpusher220 @OSchell Not writing my documentation with a feather quill, and not making my diagrams with ASCII art. It's 2024! It's just utterly ridiculous that the state of the art of code formatting is stuck in 1980!

@WAHa_06x36 @pixelpusher220 @OSchell well, it's damn useful that you can just cat and grep in code, and markdown is a pretty good compromise between machine and human readability.

there's several markdown extensions that can turn ascii art into diagrams. one of which is this one:

https://support.typora.io/Draw-Diagrams-With-Markdown/

Draw Diagrams With Markdown

Precondition Sequence Diagrams Sequence Diagrams Options Flowcharts Mermaid Sequence Diagrams Flowcharts Gantt Charts Class Diagrams State Diagrams Pie Charts Requirement Diagram Gitgraph Diagrams / Commit Flow C4 Diagrams (plantUML compatible) Mindmap Timeline Quadrant Chart Sankey diagrams ZenUML XY Chart Global Mermaid Options Overview Diagram Alignment Mermaid Theme Auto Numbering Flowchart Curve Gantt Padding Inline Mermaid Config Save-as / Copy on Diagrams Precondition Typora supports some Markdown extensions for diagrams, to use this feature, first please enable Diagrams in Preferences Panel → Markdown section. When exporting as HTML, PDF, epub, docx, those rendered diagrams will also be included, but diagrams features...

@lritter @WAHa_06x36 @pixelpusher220 Yep, there should an upgrade on the standart of Markdown. I believe it's one (if nit the) must underrated text format ! (Btw typora is really great, you should get a license)
@OSchell @WAHa_06x36 @pixelpusher220 i would rather gouge out both of my eyeballs with a dessert spoon than to render myself dependent on software that i don't own
@lritter @WAHa_06x36 @[email protected] in this case Zettlr is also a very good one... As long as Typora isn't doing shitty things, I'm going to stay w/ it but if it where to happen, I'll make the switch without regrets.

@WAHa_06x36 @pixelpusher220 @OSchell You will stop me from editing the source file in a plain text editor by prying Notepad.exe/Notepad++.exe from my cold dead hands.

In the meantime, you can do Kanji Art if ASCII Art isn't your style.

@AT1ST @WAHa_06x36 @OSchell id think the source comments could have some sort of formatted link that an IDE plugin would process and display if found. Allows the actual source to be plain text while allowing updated functionality if desired

@WAHa_06x36 @V4N4D1S eh, as I was told once, the only thing worse than no comments...is wrong comments.

Ppl can't reliably update plain text comments, they ain't editing pictures. Lol post about a link to a design seems like a decent middle ground

@pixelpusher220 By that argument we should just get rid of comments entirely. I am not going to accept an argument from mediocrity.

*I* can make and maintain pictures. And I need them form MYSELF.

@WAHa_06x36 @pixelpusher220 But can the person who's also working on your project work on the same diagram?

Or will they have to replicate it from scratch if they want to edit it, because it doesn't have layers?

@pixelpusher220

That's what I like https://draw.io for.
Diagrams as vector or bitmap graphics that contain the actual diagram definition as Metadata and can be opened to make adjustments as code changes.

@WAHa_06x36 @V4N4D1S

Flowchart Maker & Online Diagram Software

draw.io is free online diagram software for making flowcharts, process diagrams, org charts, UML, ER and network diagrams

@Suran @pixelpusher220 @V4N4D1S Yeah, I love it! But I *can't put it in my source code*.
@WAHa_06x36 @V4N4D1S if ONLY we had SOME SORT of way to uniformly locate a RESOURCE on the web, say a PICTURE, as text that we could type into COMMENTS.

@WAHa_06x36 @V4N4D1S TempleOS supported this in its weird-ass C variant

so, just saying, this COULD have been solved, if only we'd listened

@WAHa_06x36 *blinks several times*

I .... absolutely hate this from an technical perspective, but also fully get it from a human one.

Would a means of specifying a diagram in a comment as a textual link that the IDE understands to render inline be an acceptable compromise?
@aaron I mean, it would be better than nothing, but the fact that we have to resort to that kind of thing is a pretty sad indictment of the state of programming tooling today.
@WAHa_06x36 @V4N4D1S if your ide supports rendering doxygen style comments (all the jetbrains ide's do) you can use \image to embed an image inline in a comment block, most IDEs can do this already it's just not really heavily used.

@WAHa_06x36 @V4N4D1S storing an image's data in source code would make it hard to edit with basic text edit.

So I guess it'd be like having a special syntax with a relative/absolute link inside a comment, and editors supporting this would render the image (possibly with an option to fold it down or zoom it) inside the comment sections.
Editing such a source with a non-supporting editor would show the special syntax with the link as plain text so one could still follow manually the link!

@WAHa_06x36 @V4N4D1S

// please see the SVG file in main.c.1.svg for a diagram of the code you see below this comment

not enough?

@amelia No, definitely not. I wouldn't want to read a textbook that put all the diagrams and illustrations in an appendix, and this is that. Also, clutters the directory.
@WAHa_06x36 @V4N4D1S Are you gonna be the person writing a 10/10 alt text for every image tho?
@Profpatsch @V4N4D1S No, and that is just letting perfect be the enemy of good.
@WAHa_06x36 @V4N4D1S I'd say if your code needs an /inline/ diagram to explain it, your code is likely unreadable and so must be rewritten.

Documentation of the public API (which this one isn't) on the other hand could, which JavaDoc and similar ones tend to allow via rich-text/hypertext formatting.
@lanodan Well, let me tell you from plentiful personal experience, that is incorrect.
@WAHa_06x36 Meanwhile the only time I had to document that much was because people reading it couldn't actually read code (And not as in they sometimes need a bit of help, which is fine, but as in doesn't even gets things like string vs. integer vs. float).
@lanodan This is for documenting for myself.