14 ms·
Can programming be liberated from the von Neumann style? (1978)
- RodgerTheGreat 5y agoEven when this paper was published, Backus' comments toward APL did it a massive disservice. Modern descendants of the language have freed it entirely from "expression/statement" splits, and the collection of operators has grown richer. More than any other family, APLs today represent the most successful realization of function-level programming as yearned for in this paper.
- rackjack 5y agoJoy [1] is a function-level stack-oriented (read: FORTH-y) programming language inspired by Backus's FP. Funny how these things end up connected. [1]: https://en.wikipedia.org/wiki/Joy_(programming_language) https://en.wikipedia.org/wiki/Joy_(programming_language)
- brylie 5y agoThis style of programming, such as unnamed arguments, sounds very difficult to understand. An important part of programming is thinking clearly by using simple and explicit writing style. Clear code should be as close as possible to explaining the problem domain and how you would like to influence the outcome.
- jhomedall 5y agoIt most likely sounds difficult to understand because you are not familiar with it. Try working through the first few exercises in SICP; you'll see that it can be quite straightforward.
- Jweb_Guru 5y agoAs someone who's spent many, many hours proving things in Coq, I concur with the original post--pointfree stuff is usually much less easy to read than the same function with named variables. A lot of that comes down to not being able to tell what's going on at all if you don't already know the arity of the functions you're using.
- dirkt 5y agoNevertheless, most mainstream imperative languages (e.g. Java) have adopted lambdas, "fluent" style, async/await (which is a Monad), and other functional features in the last years, and continue to adopt them.
- carapace 5y agoThe thing in this paper that I see missing from most discussions of Functional Programming is the use of an algebra to derive programs. I've worked a bit with an FP concatenative language Joy and this sort of algebraic manipulation is easy and fun, and seems to permit (nearly) bug-free development. Here's a very simple example of deriving a function for the quadratic formula: https://joypy.osdn.io/notebooks/Quadratic.html https://joypy.osdn.io/notebooks/Quadratic.html A more complex example deriving a combinator "treestep" to process tree datastructures: https://joypy.osdn.io/notebooks/Treestep.html https://joypy.osdn.io/notebooks/Treestep.html
- JoshuaAshton 5y agob sqr 4 a c * * - sqrt Yeah no. This being "bug free" seems like a joke.
- js8 5y agoThis is just a "minor usability issue". Seriously. In Factor, you can solve this with references to local variables, which under the covers manipulate the stack as needed. It can also typecheck, so you wouldn't be able to write the expression in a way which unbalances the stack.
- morelisp 5y agoI don't see an objective reason this is more or less clear than sqrt(sqr(b) - 4 * a * c) or (sqrt (- (sqr b) (* 4 a c)) Honestly, by objective measures the traditional style is probably the worst. The Forth style makes it easy to see large stacks because you'll see long sequences of literals. The sexp style makes it easier to work with subexpressions. Both the Forth and sexp style don't require remembering PEMDAS. The sexp style is easier to parse, and the Forth style doesn't even need a parser. The only thing going for the traditional style is that it is an ugly approximation of mathematical notation - but that notation itself loses most of its value in the uglifying.
- js8 5y agoI came across this paper recently while looking at Kitten (it was actually mentioned in HN before): http://evincarofautumn.blogspot.com/2012/02/why-concatenative-programming-matters.html http://evincarofautumn.blogspot.com/2012/02/why-concatenativ... I think really explains the idea. I always liked combinatory logic more than lambda calculus, although it didn't click to me that the concatenative languages are essentially the formalism for it (as opposed to ML-style syntax). Although I would say functional programming is somewhat orthogonal concept, the concatenative languages can have functions with side effects, like Forth does.
- akomtu 5y agoOn a half serious note, the traditional 0-1 computing model is the origin of mental polarisation in our society, because such model permits no shades of gray. A better model would use probabilistic bits where each bit represents a probability density.
- njdullea 5y agoSo there wasn't 'mental polarisation' in society before computational models were created? Don't think that's correct..
- kstrauser 5y agoThat’s why I use only floats in my code, and a patched Python interpreter that replaces “if” with “seemslikely”.
- agubelu 5y ago#define true (rand() < 0.99)
- Banana699 5y agoyou meant a 0% serious note right? The 0s and 1s are in the human brain friend not the computers. You can make computing as probabilistic as your heart desires, people will not stop simplifying and caricaturing the world to fit their biases, not by one "bit".
- xkeysc0re 5y agoIf only ternary computing had won! https://en.wikipedia.org/wiki/Ternary_computer https://en.wikipedia.org/wiki/Ternary_computer
- andrewmcwatters 5y agoI would like a system that produces “true,” “false,” and “enthusiastic” results. Enthusiasm left as an exercise for the implementor.
- discreteevent 5y agoBooch: Your functional programming work was unsuccessful. Backus: Yes. Booch: Let’s dwell upon that for a moment, because there were some other papers that I saw after your Turing Award lecture [“Can Programming Be Liberat ed From the von Neummann Style”, 1977] which was also a turning point. Because I’d describe it as a wake-up call to the language developers and programmers, saying there’s a different way of looking at the world here. The world was going down a very different path. Let me pursue that point of why you think it didn’t succeed. Backus: Well, because the fundamental paradigm did not include a way of dealing with real time. It was a way of saying how to transform this thing into that thing, but there was no element of time involved, and that was where it got hung up. Booch: That’s a problem you wrestled with for literally years. Backus: Yeah, and unsuccessfully. http://archive.computerhistory.org/resources/access/text/2013/05/102657970-05-01-acc.pdf http://archive.computerhistory.org/resources/access/text/201...
- ipnon 5y agoReactive paradigm programming seems to have handled this problem is a satisfactorily functional way. But these higher reactive layers are almost always built on Von Neumann paradigm languages like JavaScript. So long as bare metal looks more like a Turing machine than a Church calculus we will struggle to take functional paradigm from top to bottom.
- brazzy 5y agoThe whole thing still runs in and has to interact with the real world where everything is governed by time and state. You can't avoid having the impedance mismatch somewhere in your stack.
- dnautics 5y agoThe inability to deal with time and state is not fundamental to functional PLs (though possibly a difficulty for pure FPs). Erlang handles time, state, AND space (though isn't that just time?) fantastically. Perhaps unsurprisingly, the lead creator was a Physics PhD (candidate dropout? I don't remember). Concepts of giving up on absolute synchronicity, for example, reliability of transmissions across unreliable channels, permeate the feel of the (functional) system. It is decidedly not pure functional programming though, as the choice of a functional system was made more of a pragmatic / developer ergonomic choice than a theoretical one.
- dang 5y agoThe pdf is at https://dl.acm.org/doi/10.1145/359576.359579 https://dl.acm.org/doi/10.1145/359576.359579
- dang 5y agoSome past related threads: Can Programming Be Liberated from the von Neumann Style? (1977) [pdf] - https://news.ycombinator.com/item?id=21855249 https://news.ycombinator.com/item?id=21855249 - Dec 2019 (32 comments) Can Programming Be Liberated from the von Neumann Style? (1977) [pdf] - https://news.ycombinator.com/item?id=14673817 https://news.ycombinator.com/item?id=14673817 - June 2017 (3 comments) Can Programming Be Liberated from the von Neumann Style? (1978) [pdf] - https://news.ycombinator.com/item?id=13210988 https://news.ycombinator.com/item?id=13210988 - Dec 2016 (107 comments) Can Programming Be Liberated From The Von Neumann Style? (1977) [pdf] - https://news.ycombinator.com/item?id=12159792 https://news.ycombinator.com/item?id=12159792 - July 2016 (175 comments) Can Programming Be Liberated from the von Neumann Style? (1978) [pdf] - https://news.ycombinator.com/item?id=10182712 https://news.ycombinator.com/item?id=10182712 - Sept 2015 (57 comments) Can Programming Be Liberated From The Von Neumann Style? (1977) [pdf] - https://news.ycombinator.com/item?id=7671379 https://news.ycombinator.com/item?id=7671379 - April 2014 (72 comments) Can Programming Be Liberated from the von Neumann Style? (classic) - https://news.ycombinator.com/item?id=768057 https://news.ycombinator.com/item?id=768057 - Aug 2009 (34 comments)
- failwhaleshark 5y agoFeature request for the submit page: live AI fuzzy suggestions of URLs to prevent dupe submits.
- dang 5y agoIt's important to understand that this submission doesn't count as a dupe by HN's standards. On HN, reposts are fine after a year or so, and/or if an article hasn't had significant attention before (the latter isn't the case here, but often is). https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html People post links to past discussions are not because they're bad (look at all those reposts!) but because they're good (wow, interesting comments from the past!) - at least in the best case. Because there's so much randomness in what gets noticed on /newest, overzealous dupe detection would prevent many good articles from ever getting discussed. That would be a poor trade for better deduplication! HN's dupe detector is therefore left porous on purpose (https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=by%3Adang%20porous&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...). We will probably implement karma sharing amongst the various submitters of an article, though, at least when it's a first-time discussion.
- mikewarot 5y agoSpreadsheets and FPGAs are two places where there's no focus on a "program counter". Metamine was amazing... he had figured out how to safely mix procedural and reactive code in one place without going insane in the process: https://web.archive.org/web/20201101065701/https://github.com/ymte/metamine https://web.archive.org/web/20201101065701/https://github.co... I watched a set of videos on YouTube that were amazing, but now I can't find any links to them. 8( I would really like to know where it went. [Edit: I found a fork of the repository at https://github.com/caminadab/metamine https://github.com/caminadab/metamine Of course I forked that fork to have a copy for safety]
- breck 5y agoMetamine looks amazing. I don’t know if I’ve seen it before. Thanks for sharing. Now I’m really curious.
- hcs 5y agoMetamine looks interesting, thanks! Here's a tutorial video I found demonstrating programming the game Snake http://web.archive.org/web/20201014024057if_/https://www.youtube.com/watch?v=RvRc3c9TQ6c&gl=US&hl=en http://web.archive.org/web/20201014024057if_/https://www.you... Found from a Reddit discussion http://web.archive.org/web/20201130115327/https://www.reddit.com/r/programming/comments/j94lgd/metamine_a_completely_declarative_programming/ http://web.archive.org/web/20201130115327/https://www.reddit...
- mikewarot 5y agoIn Metamine there are two different modes of assignment x = y is an equation, any time the expression y changes, x will be recomputed a := b is an assignment, it only happens once, like we're all used to. It is profoundly powerful to be able to use them both in one program. There appears to be a type associated with them, you can't assign to an equation variable, and vice versa.
- taeric 5y agoPretty sure this is used in the likes of metafont, as well. Is a great tool where it is applicable. Oddly not that applicable in most programs. Especially if the "plumbing" variety.
- andrewmcwatters 5y agoI'm too unknowledgeable to know, but I consistently get the feeling when I interact with a new programming language that they all fail to encompass everything that a modern system is capable of, or that they provide mechanisms with such high overheads that they're no better, or even worse, than programming languages of yesteryear. One example of this for me is that you don't need special drivers for making your program run on a CPU; that would sound quite strange to most developers I think. But many high-end systems have full blown GPUs on them that we basically never use unless they're specifically interfaced with for video purposes, scientific computing, etc. Even then, you still have to use specific interfaces to access that hardware. It's not intrinsic to the language. But say I wanted to run some generic routines across CUDA cores/Stream Processors, I have to explicitly move into the realm of GPGPU programming to do that, and then you have to write "compute kernel" code. It's not just... programming. It's fully terminology'd, it's own thing. There's no standard library for any programming languages that automatically sends your routines to the GPU. I don't know how all of this should be approached. I've been exposed to all of these systems, but they're all clearly isolated. All I know is that it doesn't feel right. I fully engage development efforts feeling like I'm not using the full compute power I have available to me, and a part of that I think is that today we just don't think like developers did 50 years ago. We have so much compute resource available to us, I think in some very fundamental ways--industry wide--we no longer understand how to use these systems. I know I don't. I'm consistently asking myself why certain operations I write take milliseconds for some reason instead of microseconds. That's tremendously concerning to me.
- fleischhauf 5y agoWhile i agree that it is more difficult to distribute computational load between cpu and gpu than it aught to be, Gpu is not necessary faster for all workloads than cpu, it is very specific. Most of computations can probably be executex faster on cpu.
- ledauphin 5y agoagreed, but i take the GP's argument to be that the languages aren't sufficiently expressive to allow us to communicate generically about workloads in a way that allows a system to correctly determine whether they would be faster on a CPU or not.
- RcouF1uZ4gsC 5y agoGiven the question is still being asked after 43 years since the paper was published, my guess is the answer is “no”. I would not be surprised though if this paper is still posted in the HN equivalent in 2078.
- lincpa 5y agowarehouse/workshop model: the only architecture that fully surpasses the "von Neumann architecture", and it is the first architecture to achieve a unified software and hardware. The Grand Unified Programming Theory: The Pure Function Pipeline Data Flow with Principle-based Warehouse/Workshop Model https://github.com/linpengcheng/PurefunctionPipelineDataflow https://github.com/linpengcheng/PurefunctionPipelineDataflow
- adamzerner 5y agoEric Normand has a great podcast episode where he talks through the paper, summarizing and commenting on it in a way that targets a more general audience. https://lispcast.com/can-programming-be-liberated-from-the-von-neumann-style/ https://lispcast.com/can-programming-be-liberated-from-the-v...
- todd8 5y agoJohn Backus won the Turing award in 1977 and gave a Turing Award Lecture with the same title. I was in the audience and it made a big impression on me. I had just finished my Masters degree in computer science and had decided to work for a few years before returning to grad school for more. It was an interesting time to be in CS. To be fair, CS has remained interesting to me to this day. But back then, right out of school, I felt like I knew something about almost every area of CS, maybe not much but at least something. So everything seemed possible. The field has become so large that even after a lifetime of working and studying in the field of CS, even a modest understanding of one slice of CS is all we can hope for. Nevertheless, it stays fascinating.
- eyelovewe 5y agoI’m under the impression that it must actually function in the contrary: i.e. exotic non von Neumann hardware requires new programming approaches. Example: a systolic array, which you are only likely to encounter as an FPGA bitstream, by its very nature requires a different approach. Flow based programming is a better match for this specific system. What we have seen since this paper was written is often the shoehorning of new concepts under control of standard von Neumann style programming, whatever the reasons may be, often including programmer familiarity.