r/ProgrammingLanguages • • Dec 19 '18

What is NOT a stack machine?

https://github.com/udexon/5CSM/blob/master/SMOCL/README.md
6 Upvotes

6 comments sorted by

12

u/shponglespore Dec 19 '18 edited Dec 19 '18

I'm detecting a strong Time Cube vibe here. Especially in this paragraph:

I also coined the name Inverse Shunting Yard Algorithm (ISYA) to describe the operations of nSM, as the inverse of Dijkstra's now legendary Shunting Yard Algoritm (DSYA). In my not so humble opinion, ISYA might be the most significant algorithm since DSYA itself -- as it can potentially "unify" ALL programming languages: Programmers need only to write programs in Forth-like reverse Polish notation; using nSM, the program written in RPN is translated into the host programming language and executed. This has immense implications on beginners learning programming languages, as well as large teams, as using RPN helps to consolidate codes written in multiple programming languages.

This seems rather like claiming nobody will ever have to learn a foreign language if we just all agree to only speak Esperanto, translate all the world's literature into Esperanto, and throw away all the original text.

0

u/wengchunkn Dec 19 '18

Perhaps national languages killing local dialects will be a better analogy -- which has happened throughout mankind's history. You still speak local dialects when needed, but use a national language as interface to communicate with people speaking other dialects.

The simplest use case would be a web page, which typically requires PHP, JavaScript, MySQL, HTML, CSS.

I will post some examples later. Imagine the productivity improvement by using a single programming language for beginners and large projects.

node.js, typescript are examples of this convergence trend. The reverse Polish notation is just the ultimate, simplest form of programming language that will win by natural selection.

4

u/Barrucadu Dec 20 '18

Reverse polish notation is also hard to read once your program becomes large.

1

u/wengchunkn Dec 20 '18

Examples?

1

u/[deleted] Dec 19 '18 edited Dec 19 '18

And this is pretty much why insist on using it as a foundation for more elaborate abstractions in Snigl.

It's the Siu Nim Tau of programming...

1

u/wengchunkn Dec 19 '18

Thanks a lot for the link.

The main practical motivation is to use Forth like notation to develop apps interactively for mobile GPU on the mobile device itself.

No one else seemed to be moving in that direction.

Hence SMOCL (Stack Machine OpenCL).