shalabh
03/28/2020, 6:41 PMCan Programmers Escape the Gentle Tyranny of call/return?
A paper from Marcel Weiher arguing against the prevalence of the call/return pattern and for replacing it with something more general.
Edward de Jong / Beads Project
03/28/2020, 10:19 PMMariano Guerra
Mariano Guerra
Mariano Guerra
Edward de Jong / Beads Project
03/29/2020, 1:12 AMNick Smith
03/29/2020, 6:38 AMNick Smith
03/29/2020, 6:41 AMKartik Agaram
wtaysom
03/29/2020, 8:02 AMNick Smith
03/29/2020, 8:25 AMNick Smith
03/29/2020, 8:28 AMWouter
03/29/2020, 3:54 PMWouter
03/29/2020, 3:56 PMIvan Reese
Ivan Reese
Call/return (subroutines) are an intrinsic part of all programmingFrom the paper:
One of the reasons programming is so hard and requires seemingly excessive amounts of engineering is that the (linguistic) tools we use no longer match the systems we are expected to build using those tools.
However, the assumption that this particular architectural style is the only one that amounts to “programming” is so deeply entrenched that we tend to describe alternatives as not-programming, so modeling, configuring or architectural-description./ Objection! meme /
Kartik Agaram
Ivan Reese
Kartik Agaram
Edward de Jong / Beads Project
03/29/2020, 10:58 PMNick Smith
03/29/2020, 11:10 PMNick Smith
03/29/2020, 11:11 PMEdward de Jong / Beads Project
03/30/2020, 6:54 PMshalabh
03/30/2020, 7:14 PMivar:f |= (9.0/5.0) * ivar:c + 32 .
This expression describes the constraint between f
and c
and importantly, does not employ call/return semantics.
The key point is you can build other models on top of call/return, so we end up doing it everywhere:
While there are few attempts to generalise from call/return to connectors, there are many, trying to simulate different architectural styles using call/return style programming is very common.The main thing the paper is arguing for is more research into support for other styles natively, and not simulation by call/return. Call/return is a very specific kind of pattern - data in / data out - it's a calculator. But where does the data go? And where does it come from? The system is not a call/return function - but why is all the wiring and ongoing behavior implemented with call/return calculators?
Nick Smith
03/31/2020, 10:14 AMChris Knott
03/31/2020, 5:03 PMIvan Reese
Chris Knott
03/31/2020, 5:13 PMChris Knott
03/31/2020, 5:19 PMIvan Reese
shalabh
03/31/2020, 5:41 PMSo, my only contribution in this discussion is if you are doing this to please, please, please make it possible to seamlessly "peel away" these layers of abstraction.
In the future of programming, this process of discovery should be seamlessly possible from within the environment.💯 Strongly agree with that. I call this permeable layers. However I think we still need layers, and in fact better higher level models. Programming x86 is too low level, which is why compilers and higher level languages are popular, of course. It's a tragedy call/return is deeply embedded in the prevalent hardware, however it's not the only thing available (there's also `jmp`😉). Seems like there's kind of this feedback loop that keeps some designs propagating - hardware influences software and software influences hardware. E.g. Intel is not going release a chip that deviates from the call/return stack or use tagged memory only because it immediately becomes incompatible with all existing software. Industry will continue to evolve and extend C and C-like replacements. The only way out is to have different models in software first, mapped to the existing hardware. Over time new hardware might become economically feasible. In any case, good layers also let you stay at the higher level (don't require dropping down) as much as they enable dropping down by choice. I'll leave this here: https://www.quora.com/People-who-are-really-serious-about-software-should-make-their-own-hardware-Why/answer/Alan-Kay-11 ("Computing is about _processes_")
shalabh
03/31/2020, 5:55 PMBut perhaps with many people creating better things at the higher levels, it will motivate the people responsible for lower levels to improve their abstractionsYes, this is what I was trying to say. I see Ivan's point too. I think the principle of permeable layers is solid (just like in principle, we should redesign hardware too). Finding good higher level programming models is very valuable and fully compatible with the principle itself (which is kind of a defferred goal).
Chris Knott
03/31/2020, 5:56 PMshalabh
03/31/2020, 6:37 PMKartik Agaram
with the skills I have, I would not be able to create a FoC language that allows someone to dig as far down as x86.Please build your prototypes atop Mu! It's nowhere near ready yet. I have no idea how to do graphics or sound. But a forcing function would be helpful. For example, perhaps there's a minimum in sound syscalls I could provide that would enable text-mode UIs for music.
Kartik Agaram
It would be borderline immoral to burden people like this with Rust ownership semantics. At the same time, ideally, if he wanted he should be able to dig through those layers.From my abstract:
The hope is that rewarding curiosity will stimulate curiosity in a virtuous cycle, so that more people are motivated to study and reflect on the difference between good vs bad design and good vs bad architecture, even as the study takes place over a lifetime of specialization in other domains.
Kartik Agaram
Wouter
03/31/2020, 8:39 PMIvan Reese
Wouter
03/31/2020, 8:45 PMIvan Reese
shalabh
03/31/2020, 8:49 PMshalabh
03/31/2020, 8:53 PMWouter
03/31/2020, 10:49 PMIvan Reese
Nick Smith
04/01/2020, 12:53 AMEdward de Jong / Beads Project
04/01/2020, 3:46 AMwtaysom
04/01/2020, 4:41 AMEdward de Jong / Beads Project
04/01/2020, 5:58 AMChris Knott
04/01/2020, 7:53 AMAlso I'll just point out that I'm getting a vibe from a lot of people that their "future of coding" involves C-like performance. Most applications aren't limited by operations per second... so I'm puzzled by why people are limiting their visions to ones with a clear mapping to C-like constructs. Only asymptotic complexity matters broadly, since that is what separates the possible from the impossible.I didn't mean to suggest that C like performance is necessary. In fact I think optimising compilers are very bad for understanding. The examples I gave were cases of asymptotic complexity being different, and in high level languages. Shalabh's async track trace example is one that has nothing to do with performance. For me it's not about the performance so much as the tension of presenting a model of computation that is fundamentally at odds with reality. The disagreement is whether or not this matters. The answer to this question basically comes down to how airtight your abstractions are. My main point is these issues can be avoided if you just make it possible to draw back the curtain. If your abstraction is blocking my understanding, let me easily remove it. If your abstraction is not blocking my understanding, whether or not I can remove it is moot because I won't want to.
Nick Smith
04/01/2020, 8:32 AMChris Knott
04/01/2020, 8:40 AMNick Smith
04/01/2020, 9:02 AMNick Smith
04/01/2020, 9:06 AMChris Knott
04/01/2020, 9:20 AMNick Smith
04/01/2020, 9:25 AMNick Smith
04/01/2020, 9:27 AMNick Smith
04/01/2020, 9:31 AMChris Knott
04/01/2020, 9:37 AMWhat I do want to expose via my programming environment is the time & space complexity of programs, so the user can reason about what is possible and impossible
Chris Knott
04/01/2020, 9:37 AMNick Smith
04/01/2020, 9:42 AM