r/altprog • u/kmmbvnr • Oct 14 '26
Rank — an array-oriented language for small screens, inspired by BASIC and APL
web: https://rank.viewflow.io/
A little over a month ago, inspired by old pocket computers, I started building Rank—a language I could comfortably write on my phone. I'm even thinking about making a dedicated handheld with a physical QWERTY keyboard and multi-function keys like the ZX Spectrum had
The language combines ideas from BASIC and APL: array operations, words instead of special symbols, and data-first function calls
Here is what it looks like:
rem Largest Palindrome Product
rem https://projecteuler.net/problem=4
use sequences
Factors = 100 to 999
Products = Factors Factors outer *
Candidates = Products merge .descending
Candidates filter palindrome first print
fun palindrome X
Text = X text
return Text reverse equal Text
endI'd like to try a little challenge: suggest me a programming puzzle or a small data-processing task, and I'll post a solution in Rank
Let's explore where the language a still needs more work!
3
u/6502zx81 Oct 14 '26
So what is the computational model / mental model that the user should hav in mind? Looking at the exsmples I guess it is Forth-like or HP 48 RPL like. A stack is filled with objects and then operaions are applied to the stack. Is this correct?