Hacker News new | past | comments | ask | show | jobs | submit login
A programming language coding in a grid (github.com/splware)
54 points by Judyrabbit on Dec 27, 2023 | hide | past | favorite | 39 comments



I think you need to work on the communication of what this does, and why it's different from data flow languages or spreadsheets. Putting formula in cells and using that to calculate things feels _very_ spreadsheet like, and having results depend on others feels _very_ data flow like.

Don't just say things like, "You can't program in spreadsheets," build examples showing what the other system can do and its limitations, and then show how what you've built can go further.


This really brings back memories of programming RPG for the AS/400 in school, almost 30 years ago. Since we did not actually have access to an AS/400, all programming was done on printed pieces of paper. The paper was formatted in numbered rows/columns, where for example a loop was created by putting the letter R in exactly column 5 and nowhere else (something like that, thankfully I've forgotten the details). It all felt like one step above punched cards. Our "programs" were never actually executed, our professor also did not have access to an AS/400. Anyway, just saying, column and row based programs are a welcome trip down memory lane, let's keep it there.


They taught RPG (Report Program Generator) to school kids? That is cruel and abusive. RPG is based on a primitive card tabulator paradigm.


Thank you for your attention. I'm glad it brings back some good memories.


When I read the title I thought of Befunge (https://en.wikipedia.org/wiki/Befunge). This seems easier to write though :)



Also "Piet", an image-based one: https://www.dangermouse.net/esoteric/piet/samples.html

(No idea if it's related to these other three)


To be fair SPL is not two-dimensional, a grid is just a way to represent one-dimensional source code with indentations :-)


So what’s the point?


Ah, the optimal parallel cores setup.. One column of corecells has a input connection bus. One column of core cells has a output connection. The rest is on a grid bus between row and columns only. Cell Programs are just input data, swept into place by a automatic cycling of data along a program able flow.

Cells can be passive, just filtering or forwarding each cycle.


I was expecting something like Orca: https://wiki.xxiivv.com/site/orca.html


This grid forms a graph. Ugly represented, but a graph.

Variable names are good btw.


Of course you can name the variable also, SPL give you another option.


Naming variables is so good that it should be mandatory in your programming language.


Anonymous variables can be pretty convenient, like $0 in Perl and point-free in Haskell. Difficult to add debug prints though.

I also think it's bad to require explicitness when something's obvious - like if you have an array of `cats` then naming its iterator variable `cat` is a waste.


Early in in my career I was part of a small company that developed a grid-based language for geospatial applications. The grid approach worked well for a lot of aspects, like implicit caching and concurrency. The cells could contain data that defined a view, such as a map or chart.

The downside of the grid was the same as it is with spreadsheets. The identifiers are not as visible as they are in a flat-file based programming language. What cell the interest rate in again?

It was amazing how well it worked even on state of the art Sun SPARCstation 5s at the time.


> What are the benefits of writing code in a grid?

> When programming, we always need to use intermediate variables and name them. However, when we program in SPL, naming variables is often unnecessary. SPL allows us to reference the name of previous cell directly in subsequent steps and get the calculation result of the cell (such as A1), for example,

> …

This just doesn’t really sell it well enough to get me interested in the idea as more than a novelty, or to keep reading for that matter. Are there any concrete use cases where this excels? No pun intended.


Intriguing. My feedback for whoever is writing this, the main site, the github Readme, etc, please put in some work on a clarity/simplification pass.


Likewise. In specific to: >In practice, when used as a data warehouse, SPL does show different performance compared with traditional solutions. For example, in an e-commerce funnel analysis scenario, SPL is nearly 20 times faster than Snowflake even if running on a server with lower configuration; in a computing scenario of NAOC on clustering celestial bodies, the speed of SPL running on a single server is 2000 times faster than that of a cluster composed of a certain top distributed database. There are many similar scenarios, basically, SPL can speed up several times to dozens of times, showing very outstanding performance.

Wow that really sounds amazing? Just wonder how a java based db can out perform Snowflake (a columnar base db). Maybe the original implementation in Snowflake is not optimal? Then again, from personal experience h2 embedded mode significantly faster than plain postgres.


This post(https://blog.scudata.com/a-major-culprit-in-the-slow-running...) explains why java-based SPL can run much faster than the C++-based database. BTW, SPL also support columnar storage, it can implement columnar storage in a single file. And here is a test report https://blog.scudata.com/spl-computing-performance-test-seri.... It sounds amazing, but it is not mysterious. A lot of low complexity algorithms can not be implemented in SQL, programmer can only expect the optimizer of database. howerver ,when SQL is complex, optimizer would get lost.


This post(https://blog.scudata.com/how-the-performance-improvement-by-...) also explains the principle of high speed of SPL, more generally


This is a little difficult for SPL,SPL is a little versatile. For example, it can be used as middleware to solve mixed computing over multiple data sources, Implement hot-swap microservices, Substitute stored procedure, Act as a data warehouse for high performance, As a computing engine for implementing the true lakehouse, accompany with OLTP database to achieve low-risk HTAP, ..., It can even be used as an Excel plugin to help with desktop analysis. Because computing is everywhere! Everyone only cares about their own issues, that's a fraction of what SPL is used for. But we can't predict what people will care when they come to the homepage, we have to list a little bit of everything, so, the home page is somewhat cluttered. Simply skip the items you are not interested in and read the links to the items you are interested in. Thanks very much.


Due to the many references made to it in the text, I suspect you have mainly or only programmed in Java? It is greatly advantageous to have used many languages (especially 'in production') when coming to design your own, not least as you will then be aware of and can reference precedents for your language features. For example the @ flags on functions are essentially shell script flags.


When programming, we always need to use intermediate variables and name them. However, when we program in SPL, naming variables is often unnecessary. SPL allows us to reference the name of previous cell directly in subsequent steps ... In this way, racking our brains to define variables is avoided (as the variable has to be given a meaningful name, which is annoying).

Okay then


It's not so bad if you think of this as pipelining. I definitely agree some intermediates ought to be named though.


Somewhat related, what I first thought was referenced is Grid-Coding (https://dl.acm.org/doi/abs/10.1145/3526113.3545620). A Python-like programming environment for the visually impaired


What is the different with excel programming (without VB Script or alike)?


It has nothing to do with Excel , It ijust looks like Excel. It is a program language, will execute from top to bottom and left to rigth.


… Excel on the other hand recalculates cells in a 3 step process:

1. Construction of a dependency tree 2. Construction of a calculation chain 3. Recalculation of cells

It can automatically parallelize and also detects circular chains. I find it quite powerful but sometimes hard to reason about. Curious why they have not even mentioned Excel once in the readme despite the obvious similarities that beg for an answer to the question: „What is different?“

https://learn.microsoft.com/en-us/office/client-developer/ex...


Excel also allows for circular iteration if you allow it to. Helps with solving dynamic programming problems


It has nothing to do with Excel itself, it just looks like Excel. It is a programmer language like Python,SQL. Although SPL can be used as a plugin to help Excel to deal with some complex calculation, its main use is to do big data and multi-data source computing in application systems


I think this is basically how I use Excel, with a few other (nice but not game changing) features? Am I missing something?


It has nothing to do with Excel itself, it just looks like Excel. It is a programmer language like Python,SQL. Although SPL can be used as a plugin to help Excel to deal with some complex calculation, its main use is to do big data and multi-data source computing in application systems


This seems a lot like Excel programming.

If you like that grid style, would Excel be good enough?


Excel is not a program language,we can not code in Excel, VBA is still text-style code. SPL just looks like Excel, it is really a program language, you can code and debug in the grid.


I’m… not sure what you mean. This is also text style code. It’s just text in the cells.

With VBA you can make user defined functions and then use them in the cells, which off the top of my head seems superior to stuffing the implementation details in each cell where the same logic is likely to be reused.

I don’t feel like I get it from reading this readme. Things like the function option bit seem like harmful features at a glance. I feel like you lose a lot of credibility asserting that excel is not a programming language. It very much is. And both of them are based on the same key feature: using spatial coordinates instead of or in conjunction with a namespace. The debug thing is honestly minor.

It’s very counterproductive for you to be negative towards excel. Fans of excel are your MOST LIKELY INTERESTED USERBASE.


It has nothing to do with Excel itself, it just looks like Excel. It is a programmer language like Python,SQL. Although SPL can be used as a plugin to help Excel to deal with some complex calculation, its main use is to do big data and multi-data source computing in application systems


That does not make sense though. Excel is a programming language like Python. It is simply a pure functional reactive programming language that unless you do cursed VBA stuff has no side effects except returning the result of the calculation.

And the spatial name space is far more than a visual similarity. It’s a rare, core design feature!

Basically the only people who are familiar with the advantages of a spatial name space are excel pros. You should really be advertising how it expands on this. Not claiming there’s no relevance.


In the era of AI, naming variables can and should be automated. Without good names, the code is very hard to read, and code should be, before anything else, readable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: