6 ms·
Why concatenative programming matters (2012)
- dang 1y agoRelated. Others? Why concatenative programming matters (2012) - https://news.ycombinator.com/item?id=32124621 https://news.ycombinator.com/item?id=32124621 - July 2022 (55 comments) Why Concatenative Programming Matters (2012) - https://news.ycombinator.com/item?id=25244260 https://news.ycombinator.com/item?id=25244260 - Nov 2020 (18 comments) Why Concatenative Programming Matters (2012) - https://news.ycombinator.com/item?id=19665888 https://news.ycombinator.com/item?id=19665888 - April 2019 (33 comments) Why Concatenative Programming Matters (2012) - https://news.ycombinator.com/item?id=5542695 https://news.ycombinator.com/item?id=5542695 - April 2013 (36 comments) Why Concatenative Programming Matters - https://news.ycombinator.com/item?id=3582261 https://news.ycombinator.com/item?id=3582261 - Feb 2012 (40 comments)
- 7thaccount 1y agoThe author also wrote the "kitten" programming language which also has been talked about on here as well back in 2017: https://news.ycombinator.com/item?id=13345832 https://news.ycombinator.com/item?id=13345832
- andsoitis 1y agoOm is a novel, maximally-simple concatenative language - https://news.ycombinator.com/item?id=33382397 https://news.ycombinator.com/item?id=33382397 - Oct 2022 (49 comments) Stem, an interpreted concatenative programing language - https://news.ycombinator.com/item?id=39151094 https://news.ycombinator.com/item?id=39151094 - Jan 2024 (74 comments) A Simply Arrived Concatenative Language - https://news.ycombinator.com/item?id=15576215 https://news.ycombinator.com/item?id=15576215 - Oct 2017 (21 comments) Factor: A Practical Stack Language - https://news.ycombinator.com/item?id=32215048 https://news.ycombinator.com/item?id=32215048 - Jul 2022 (45 comments) Xs: a concatenative array language inspired by kdb+ and FORTH - https://news.ycombinator.com/item?id=23437003 https://news.ycombinator.com/item?id=23437003 - Jun 2020 (27 comments) Cat: a statically typed concatenative language - https://news.ycombinator.com/item?id=24534755 https://news.ycombinator.com/item?id=24534755 - Sep 2020 (13 comments) 8th: a secure, cross-platform, concatenative programming language - https://news.ycombinator.com/item?id=15672361 https://news.ycombinator.com/item?id=15672361 - Nov 2017 (59 comments) Programming in the Point-Free Style - https://news.ycombinator.com/item?id=14077863 https://news.ycombinator.com/item?id=14077863 - Apr 2017 (101 comments)
- tristramb 1y agoAll programming is just function composition. This is an idea that I got from studying category theory. Concatenative programming is just a first step in that direction. I leave the details an an exercise for the reader.
- knome 1y agoside effects are quite the thorn in this theories side. hard to describe message passing in purely applicative terms.
- nine_k 1y agoEffects are pretty smoothly described by monads; there's an entire well-respected language built on top of that. One of the problems of the purely applicative approach is that you get a nice algebra for describing your results, including the sequence of effects, but reasoning about the resources spent by the computation becomes harder.
- knome 1y agomonads were certainly a clever fix for the difficulties otherwise caused by passing around the world as a value. I might argue that laziness makes haskell something different than purely applicative. It's not just pure values being passed around. It's a language built atop suspended self-caching invocable thunks getting knotted up and then firing off in chain reaction. main = do let hello = foo world world = bar hello putStrLn $ show hello putStrLn $ show world where foo v = [v] bar v = length v
- 90s_dev 1y agoModern programming is. But look at assembly, which is what actual machines do. And you can write assembly with tons of gotos and not a single function in sight.
- jrvieira 1y ago
- pmarreck 1y agoDo most people tend to conclude that concatenative languages are absolutely an intellectual curiosity for any nerd who knows RPN and thought "what if we kept going?", but kind of fail in larger-scale production contexts? (Yes, I'm aware of PostScript... Seems to be one of the sole exceptions here... And, uh, PDF... of course...)
- nine_k 1y agoPostScript is a bit like .Net CLR or WASM: while widely used, it's basically never written by humans directly. Forth is a wonderful way to build a high-ish level self-contained programming environment on very low-resource hardware, like a 8-bit MCU. But thinking in terns of the stack is useless mental gymnastics, this is something a machine should do instead.
- zzo38computer 1y agoPeople do write in PostScript directly (and I have seen .NET and WASM code written directly, too). I use PostScript directly and so do some other people.
- jrapdx3 1y agoAbsolutely. Years ago writing programs for *BSD/Linux, PS was the natural, most direct way to implement printing to printers equipped with a PS interpreter. Fortunately the PS language was very well documented. That made writing PS pretty straightforward, at least for the reasons I was using it. Curiously other concatenative languages have been harder for me to grasp. Maybe that's because I regarded PS as a specific-use tool vs. a general purpose language. If nothing else PS showed the value of excellent documentation. Lack of it probably accounts for many software project failures, particularly in the open-source world.
- zzo38computer 1y agoYou can also run PostScript programs on the computer; you do not need a PostScript printer. > Maybe that's because I regarded PS as a specific-use tool vs. a general purpose language. In my opinion, it is both. Many of the programs I write in PostScript do not involve a printer at all. > If nothing else PS showed the value of excellent documentation. Lack of it probably accounts for many software project failures, particularly in the open-source world. I also find a problem with many programs that do not have good documentation. When I write my own, I try to provide documentation.
- mikewarot 1y agoLong, long ago I wrote a Forth of OS/2 out of spite. I've had a long standing interest in the language. It's been my opinion for a while that Forth is a less powerful language than LISP, even though they initially appear to just be the opposites of each other in terms of argument handling. The thing that makes Forth and other similar languages write-only is that you can easily lose track of the variables when you are forced to toss them all on a stack. When you add the ability to use local variables, you get some of that power back, but then you've added a huge impedance mismatch with the rest of the system. As much as I hate all the () in Lisp, it's the source of much of its power.
- dreamcompiler 1y agoI write code in both and they seem pretty much equally powerful to me. There are two big differences for me: 1. If I look at Forth code I wrote a month ago I have no idea what it's doing. This is never a problem with Lisp. 2. I can -- and have -- written a complete Forth compiler bootstrapping my way up from assembler. Sounds like you've done the same thing. I could never bootstrap a Lisp compiler that way.
- geocar 1y ago> I write code in both ... > If I look at Forth code I wrote a month ago I have no idea what it's doing. Sometimes when we are learning a language, we plateau in our learning for so long we think we are done, however I assure you that other people can read Forth code written months or years ago, even written by other people, and can read it. That's not you, at least not yet, and you should be cautious with your certainty about things you just don't know about. Writing code is substantially easier than reading it, but reading is when it is possible for us to know the language. > I could never bootstrap a Lisp compiler that way. Don't be so hard on yourself: You can, but you would have to change and learn in order to do it.
- HelloNurse 1y agoLISP has more names (for function arguments), which convey more information.
- deleted 1y ago[deleted]