[HN Gopher] l-2D: An exploration of drawing as programming language ___________________________________________________________________ l-2D: An exploration of drawing as programming language Author : ink404 Score : 149 points Date : 2022-04-06 14:44 UTC (8 hours ago) (HTM) web link (www.media.mit.edu) (TXT) w3m dump (www.media.mit.edu) | somewhereoutth wrote: | Very nice! | | However written languages convey not just what a program _does_ , | but also, through the names of things, what it _means_. | Unfortunately there is no validation of (or other computation | with) the meaning - so what it seems to mean may or may not have | any bearing on what it actually means, either now or previously. | | Thus a program is not just how humans talk to machines, but also | (one of many ways) humans talk to humans. | DennisP wrote: | They do show some diagrams with comments. | | It's true that there's no validation of comments. But there's | also no validation that the name of a variable is what that | variable actually means, or that the name of a function is what | that function actually does. | nuancebydefault wrote: | Cool, but in practice, for software development you need version | control. Has anyone ever seen a workable solution for diffing -- | let alone merging -- _any_ graphical language? | gaetgu wrote: | No, but that is probably because such a thing hasn't ever | really been needed. To be a reasonably good product, it would | probably need to parse the language to show both an actual | pixel-for-pixel difference and a what-is-practically-different | diff. Merging seems next to impossible with more complex | programs, unless there could be an art->program->art program. | The problem with that is that it would (probably) destroy any | comment art or organization that was in the program before. The | more I think about it, the more I think that a merge for this | sort of file would be a really cool semester project for a comp | sci class. | nomel wrote: | > because such a thing hasn't ever really been needed. | | I think this is backwards. I think the lack of collaboration | is exactly why graphical programming _can 't_ be used by | most. It's so badly needed, that it's not even usable without | it, for the majority of people. | zitterbewegung wrote: | What was that language or system where it would read what you | wrote down on a piece of paper and then execute the program ? | nomel wrote: | Since the purpose of all programming languages is to be readily | readable by biological OCR systems, I would think all. ;) | xixixao wrote: | Who immediately thought: Factorio! | lonk wrote: | Crazy. Alien tech. | camtarn wrote: | Very interesting! Reminds me a bit of ladder logic, a 2D visual | programming paradigm based on wiring together relays - but at a | higher level of abstraction, since ladder logic is mostly based | on simple boolean operations and doesn't really have any notion | of defining functions. | | The fractal tree and UTM examples are absolutely beautiful and | mind-bogglingly simple. | awhitty wrote: | The author [1] was somewhat recently featured on Hacker News [2] | for their Fishdraw [3] project, if you're wondering why their | name might look familiar. Always a treat to see what they come up | with next! | | [1] https://lingdong.works/ | | [2] https://news.ycombinator.com/item?id=28157657 | | [3] https://fishdraw.glitch.me/ | LichenStone wrote: | This is very cool. I've always been very disappointed that | programming is so utterly dominated by the linear text format. It | feels like so much potential for expression and feedback is | getting left on the table, making use of our capacity to | understand and work with spatialisation, patterns, sounds, | colours, dynamics, etc would make a lot of sense. | | Bret Victor's The Future of Programming and other talks come to | mind - https://youtu.be/8pTEmbeENF4 | agumonkey wrote: | I wish we had a smarter feedback loop between trying an idea | (aka typing stuff) and reacting to results. Right now tdd or | type inference doesn't really produce backward infered hints. | Types do help exhaustive matching but you may be able to | reverse trials output back to function types and conditionals. | | Your editor would become a convergence game. | ilaksh wrote: | Like SmallTalk? | agumonkey wrote: | Smalltalk is live object but, afaik[0], the base | interaction is still work for edit, work for test, work for | resolution. I thought about making them one concept.. | something like gradually pruning input spaces. test and | code being somehow isomorphic (each failing test is | implicitely mirrored in the working code). | | [0] I only did a pharo MOOC and read some bits about | smalltalk but considering the crowd, it's possible someone | has an image with similar if not better ideas. | dgb23 wrote: | A REPL? | Minor49er wrote: | There's a bug where if you have an animated run, but switch | programs, the first animated run will keep executing over phantom | pathways. You can start another animated run at the same time. | The resulting visuals and audio are really interesting. | | I also love the option to obfuscate the code in two separate | ways. This project rules. | Razengan wrote: | This made me wonder, of course if electrical circuits can be | expressed as pretty much 1:1 WYSIWYG diagrams, why not computer | programs? | NeutralForest wrote: | It's very cool and the presentation is clear. The animation of | the parsing is fun as well =) | tromp wrote: | > To be able to draw programs that look visually appealing | themselves, such that someone would want to put a frame around | them and hang them on the wall. | | I've done that with the predecessor function in lambda diagram | form: +---------- +-----+---- | +-----+-+-- | --+-+ + + | +-+-+ | | | | | +-+ | | | +-+ | | +-+ | | +-----+ | | +-+ | | Lambda diagrams [1] are just a graphical output format for the | pure lambda calculus though, and not a 2D programming language | like L-2D. | | [1] https://tromp.github.io/cl/diagrams.html | twofornone wrote: | Those animated runs look like they would be super useful for | debugging. Offloads a ton of working memory that comes with | tracking stack traces in your head when you can just see a visual | representation of the stack and watch data flow in real time. | munificent wrote: | _> Coding in l-2D is somewhat like playing Minecraft or Factorio, | but it 's even better because I can call it research._ | | I love the honesty in this sentence so much. | Cloudef wrote: | This is pretty cool, the programs end up looking pretty pleasing | to eye. Looks like schematics. | zozbot234 wrote: | The untyped lambda calculus seems pretty uninteresting compared | to 'typed' counterparts that tend to come with more interesting | graphical visualizations out of the box, viz. string diagrams | (where the topological features of the diagram have their | counterpart in useful program transformations). | | Also, I thought it would be fairly well established by now that | the De Bruijn notation for the untyped lambda calculus, with | prefix function abstraction but _postfix_ application, better | reflects its underlying properties since it allows for an | intuitive visual understanding of reduction, where applications | can be directly matched up to abstractions. | ammanley wrote: | Absolutely fascinating. I actually put a lot of time a while back | into looking for a way to "draw" either a psudeo-code | specification language, or just Python, on an iPad for | "programming doodling" that could be scanned and parsed for later | execution (spoiler: handwriting code outside of a drawing program | is terrible). I love the idea of being able to bring computation | closer to a hand-to-paper medium. Computer vision processing of | code -> computation in an editor would be a dream. Please keep at | this. ___________________________________________________________________ (page generated 2022-04-06 23:00 UTC)