You are viewing archived messages.
Go here to search the history.

Márton Gunyhó 2025-12-06 06:44:56

Hi all! I created a little stack-based programming language which I'm using to solve Advent of Code this year. It's not as revolutionary as most of the projects here, the most interesting feature is the syntax, which uses forward Polish notation. In the future, I want to explore if this could work well for REPL-driven development.

codeberg.org/marton/taka

📝 taka

The Taka programming language

Ivan Reese 2025-12-06 06:46:34

I'm twenty years into this racket and it's never before occurred to me that RPN implies FPN. So that's cool.

Ivan Reese 2025-12-06 06:47:39

Ahhh it's like s-exprs, sorta. Cool. Right.

Márton Gunyhó 2025-12-06 06:48:25

Kind of but not really. The grouping happens by the number of items a function consumes from the stack instead of parens.

Paul Tarvydas 2025-12-06 16:10:26

various asides (hoping that they might provide further inspiration)...

  • the correct term for forward polish notation is polish notation (Perplexity (LLM))
  • APL uses right-to-left evaluation but "parses" based on the operator, 2 x 3 + 4 evaluates to 14 (not 10)
  • Perplexity clarification: APL uses strict right-to-left associativity with uniform precedence
  • + * 2 3 4 in Taka is (+ (* 2 3) 4) in lisp and (2 x 3) + 4 in APL and 2 x 3 + 4 in grade-school math and infix-with-precedence PLs
  • 2 x 3 + 4 in APL is (* 2 (+ 3 4)) in lisp, hence, * 2 + 3 4 in Taka (?) and 3 4 + 2 * in Forth
  • TCL uses Polish Notation by default (TCL's expr provides infix)
  • Dylan, before being converted to infix, was Polish Notation (perplexity)
  • Lisp REPLs traditionally use the variable * to denote the last value computed in the REPL, ** for the next-to-last, and so on (in lisp, the character * placed in the first position of an expression is treated as an operator not a variable (which leads into the lisp-2 v. lisp-1 rabbit hole)
  • REPLs are for program development, so "efficiency" has a different meaning (in a REPL, developer turn-around time is more important than production-level "efficiency")
  • I would be interested in your comments on the following thought, as you go down the REPL learning curve: I wonder if we no longer need to build REPLs into languages, but that we need to build languages around the UNIX shell to form a REPL capable of running many languages? I think that REPL is spelled wrong. There should be 2 P's. REPPL.
  • Not now, but, when you get back to exploring REPLs, you might wish to look at (and discuss) the following thoughts and further reading

programmingsimplicity.substack.com/p/we-lost-something-1970s-repls-were?r=1egdky

In the 1970s, Lisp and APL REPLs represented something we’ve lost: true interactive, exploratory programming environments where developer feedback was instantaneous, context was persistent, and the entire system was designed around the developer’s cognitive workflow.

...

For decades, programming languages have tried to optimize for both development and production simultaneously, a conflation that created unnecessary complexity.

...

Konrad Hinsen 2025-12-07 10:02:06

This loss is one of my topics in Redressing the Balance: A Yin-Yang Perspective on Information Technology. It's sad to look back at 30 years of working in computational science and noting that my (almost) first environment, APL, was the best I ever had in terms of being made for the work I do.

"Almost" because my very first programming environment was BASIC on a TRS-80. I learned APL (initially on an IBM mainframe) a year later.

Tom Larkworthy 2025-12-07 20:31:41

There is a missing semantic in Dataflow programming, something like function calling but not exactly that. After many attempts, I think I finally nailed it: Dataflow Templating. While I have got it working for Observable Dataflow, I think this equally applies to its forefathers like FrTime. I could reexplain it here but its in the article. I saw @Dennis Hansen grappling with the same thing for Artifact. I don't use diagrammatic representations of dataflow, but if I did, I would be trying to figure out what the graphical representation of this is.

observablehq.com/@tomlarkworthy/dataflow-templating

📝 Dynamic Dataflow Templating

The missing function-like semantic for dataflow programming. Why? There is a reusability gap with notebooks (and spreadsheets for that matter). When you express a complex chain of computation, they build upon a set of initial inputs, unrolled across a series of cells. But then you realize, there is no way you can reuse the same logic with different inputs. But I love dataflow, notebooks, inspectable cells and the accompanying documentation! The inspectability of intermediate steps with dataflow programming

Tom Larkworthy 2025-12-07 20:42:13

I'me off functions Paul Tarvydas!

Tom Larkworthy 2025-12-07 20:55:11

its really just this diagram where the arrow denotes "has a reactive dependancy on"

image.png

Dennis Hansen 2025-12-07 21:57:08

i think this is a very useful semantic. In general, blocking loops are necessary when the subsequent loop requires the output of the prior loop, but when there isn't that dependency then doing things in parallel is encouraged and should be easy