5 ms·
Tabular Programming: A New Paradigm for Expressive Computing
- turtleyacht 2y agoSee also: Table-oriented Programming (2002) - https://news.ycombinator.com/item?id=29735298 https://news.ycombinator.com/item?id=29735298 - Dec 2021 (126 points, 87 comments)
- dgellow 2y agoThe name is kind of similar but they are unrelated concepts
- turtleyacht 2y agoMaybe control tables? https://web.archive.org/web/20121024051826/http://www.geocities.com/tablizer/cntrl1.htm https://web.archive.org/web/20121024051826/http://www.geocit... What I like about this submission is arguments are themselves functions, so each call lays out its dependencies up front.
- deleted 2y ago[deleted]
- Johnbot 2y agoThis is giving me flashbacks to RPG II - https://en.m.wikipedia.org/wiki/IBM_RPG_II https://en.m.wikipedia.org/wiki/IBM_RPG_II
- diggernet 2y agoThat very first example instantly brought RPG to mind for me, too.
- eschneider 2y agoYeah, but without the cool programming forms. :/
- poulpy123 2y agoMaybe it's interesting as a scripting language for a music sequencer that has few keys, but I can't even think of a use case for regular computers
- lantry 2y ago> this tabular programming environment isn't just about cramming programming capabilities into a Game Boy-like device. It's about rethinking programming from the ground up for a specific hardware context. (...) > By rethinking how programming can work within tight hardware constraints, we might discover new approaches that actually enhance rather than limit creative expression. This speaks to me. As a software engineer, I work with abstractions all day, and it is impossible for me to fully understand the system that I'm building. I often think I would be much happier if I worked on a product that I could actually understand from top to bottom and know all the details.
- lo_zamoyski 2y ago> This speaks to me. As a software engineer, I work with abstractions all day, and it is impossible for me to fully understand the system that I'm building. I often think I would be much happier if I worked on a product that I could actually understand from top to bottom and know all the details. For a programmer, the “system” is in a sense incidental to the domain and language you’re programming in. It has relevance only insofar as practicality demands it (like an astronomer knowing how to operate a telescope). There is no intrinsic value to this knowledge as such. Anything ‘beneath’ your language is implementation detail whose purpose is to simulate your language, program, whatever. It has nothing to do with your language and does not explain the language; any appropriate system that can simulate it will do.
- bombela 2y agobut it has a tremendous impact on performance. making it hard to ignore.
- lo_zamoyski 2y agoHence the comparison with telescopes. But knowledge of a tool is not to be confused with the field itself. We are not programming computers per se. We are using computers to simulate formalisms that can be carried out by people, in our heads or on paper, largely because it is tedious, labor intensive, and would take us longer. The intellectual distinction is essential and, sadly, one that many in the field seem not to understand. Many seem to subscribe to a kind of "computer atomism" which installs the physical device in the center as the really real with abstractions as epiphenomena or illusions; the real stuff, they claim, are the assembly - nay! - the bits - nay! - the atoms - nay! - ... No. Assembly, bits, atoms, these are all irrelevant and incidental as far as the language and the formalism we're using is concerned. They are details that concern the instrument, not the language, which stands on its own.
- hwpythonner 2y agoThis reminds me of ladder diagrams from industrial control systems—not because of the domain, but because both emphasize a linear, visually structured flow of logic.
- deleted 2y ago[deleted]
- topspin 2y agoThe first glance of the code made me think of CNC g-code. Some older machines I've seen have tabular form similar to this, only because they have segmented displays. I suspect these concepts aren't as "new paradigm" as the author imagines. Most such code is generated elsewhere and loaded into industrial machines. However, technicians frequently find themselves navigating and editing code directly at the console. Some are entirely capable of programming all of the steps involved in a complex operation directly in these primitive languages.
- deleted 2y ago[deleted]
- hcarvalhoalves 2y agoWhen I first read the title, I had something in mind, but this is actually about structuring the code itself as a fixed-size table. Here's a different take on thinking about tables: https://www.youtube.com/watch?v=b5UK-VHbJlQ https://www.youtube.com/watch?v=b5UK-VHbJlQ
- debugnik 2y agoFollowing GPU industry standards, this should be called a General Purpose Music Tracker. I wonder if this UI would work well for logic programming instead of stack-based.
- dimatura 2y agothat would be pretty confusing, as it happens M8 was partially inspired by another tracker called LGPT (Little Game Park Tracker, named after the device it ran on).
- dgellow 2y agoInteresting, I didn’t know. I thought it was a direct descendants of LSDJ. I have an old school PSP around, I will try LGPT over the weekend :)
- dL-9vP3xZq 2y ago[dead]
- gregschlom 2y agoI've only skimmed the article but to me it sounds like what the author wants is essentially assembly language, where everything fits in 5 columns: label, opcode, 2 operands, comment. It's not great for usability though :)
- aniou 2y agoYes-and-no, I think. Limited usability of assembly language comes from limited resources (registers, operations) available to programmer, that leads to (so) many simple steps for more complicated tasks. But, high-level language can offer a very interesting possibilities, even if it was not created for such kind of programming. For example, some time ago I made another attempt to emulate family of 65xxx. Previous versions were written in typical manner, like work of every other programmer on Earth. A new approach, when a code was written in more regular way (see link below), like mentioned tabular-one, gave me excellent results. I was able to fully understood a program and processor logic and finally I was able to re-create a most magical command for 65xx: SBC/ADC with BCD support in very straightforward and clear way (especially for a cpu-like logic). For example: https://github.com/aniou/morfeo/blob/a83f548e98bd310995b3c37dec458d63c806a840/emulator/cpu/cpu_65xxx.odin#L938 https://github.com/aniou/morfeo/blob/a83f548e98bd310995b3c37... There is one thing that not fits into pure, tabular-like code logic: more complicated conditionals and loops. But maybe, in future...
- herr_shield 2y agoI have come to the same conclusion for a tracker that I am working on that is targeting the steam deck. I designed an instruction set that is reasonably convenient to input via the gamepad controllers. Instead of typing, one selects instructions and operands from lists of options. It's surprisingly fluid to input and this makes it impossible to input invalid programs.
- dgellow 2y agoWhat’s your project? I would love to try it out :)
- 2y ago
- sedatk 2y ago> At first glance, limiting each function to just five expressions seems incredibly restrictive. But this constraint actually encourages breaking down complex operations into atomic, composable functions - which tends to produce more maintainable code. The author conveniently disregards the other extreme end of this, putting every instruction in a separate function, which is neither readable nor maintainable. What I see here is similar. The code snippets I’m looking at look neither readable nor maintainable.
- sanderjd 2y agoYeah it's an interesting idea, but trying to read this code reminds me a lot of reading assembly. It's charming in its way, but there's also a very good reason we tend to reserve assembly code to very specific purposes nowadays.
- dgellow 2y agoAgreed, and it is a very specific purpose. Note that it is based on Forth, not assembly
- dgellow 2y agoTwo points: 1. This is specifically designed for portable hardware with minimal controls - not general-purpose programming. 2. Like music trackers, unfamiliarity makes it look complex, but the rules are simple and consistent once learned. The five-expression limit creates a natural balance in function decomposition that's neither too granular nor too monolithic. While the code might look strange initially, the structured format actually enhances readability once you're fluent in the paradigm - just as tracker musicians can quickly "read" musical patterns that would appear cryptic to others. Readability is highly contextual and shaped by our existing paradigms. This article/concept explores whether different constraints might offer unique advantages for creative coding in specific environments.
- sedatk 2y ago> 1. This is specifically designed for portable hardware with minimal controls - not general-purpose programming. I don't understand why portable hardware warrants a new programming model. What does make C such a significantly worse candidate for the examples given in the article? > 2. Like music trackers, unfamiliarity makes it look complex, but the rules are simple and consistent once learned. Columns and rows in tracker music have specific meanings: each column corresponds to a channel, and each row corresponds to a point in time. Not in this case. In this layout, columns are arbitrary, and their meaning changes every row. Rows don't have any more meaning than regular code. I don't think they're equivalent.
- AdieuToLogic 2y ago[flagged]
- deleted 2y ago[deleted]
- gatane 2y agoForth mentioned, btw.
- dgellow 2y agoI initially used the title « tabular Forth », as that has been one of my main source of inspiration. But eventually decided against and removed most mentions of the language, because at this stage I’m still not set on a specific design and choice of language, and prefer to keep my options open without feeling pressured by my old self (if that makes sense)
- dimatura 2y agoDidn't expect to see the M8 when opening this. It's truly an amazing device, and the tables are a really awesome addition to the typical audio modulation option.
- kats 2y agoSome random thoughts, might be interesting (or not). Some things that really do fit into tables, where there's no empty fields in the rows: - Relational databases - Hardware circuit truth tables - Assembly language opcodes - FPGA compiler output - Matrix multiplication. Or some GPU programs e.g. if you want to have a conditional statement using multiply-add, then 'if (cond) then x1 else x2' would be 'out = (cond * x1) + (cond * x2)'. Those things have good performance in one way or another. But it's not easy to make all the application logic fit into a table-based schema. e.g. Why does someone choose a python web server framework which sends and receives JSON. It's really super easy to extend and add something without knowing what you'll need in advance. But if you try to fit that into a table, you'll have to change the table schema for everything to try to best fit what the program does right at the moment. And then if there's one new extra complex or long-running function, it will never easily fit the same schema as the others. You'll have to break the big function down into some smaller common operations.