The discussion centers around APL, a programming language known for its simplicity and hand-holding nature, contrasting it with Unlambda, which is presented as a more elegant and purely functional language. Unlambda utilizes a single syntactical element, the backtick (`), to apply functions, emphasizing its minimalist design that relies solely on functions without introducing non-functional concepts like numbers or strings. The conversation highlights Unlambda's use of combinators from lambda calculus, its Turing completeness, and its additional features like call/cc. The comparison extends to K, a modern version of APL, which is noted for being keyboard-friendly, alongside a mention of J, a similar language that the user found fun but not preferable for practical use. The thread reflects on the evolution of programming languages and their varying degrees of complexity and usability.
APL - back in the days when programmers were programmers and men were men ...
Almost put this in the goto thread, but it deserves a thread of it's own. Typical APL program:
Just in case it's not obvious, it's a program to display all the programs in a workspace as if a user displayed them manually (except for the fns program itself). I still have an old dos directory of APL source code.
Bah, APL holds your hand too much. You know what's an actually cool programming language, is UNLAMBDA. Here's a program to calculate the Fibonacci numbers written in Unlambda:
Behold the simplicity! Unlambda is the world's first purely functional programming language, by which I mean that there is nothing but functions. Most supposedly "functional" languages-- like Scheme or Erlang-- actually clutter things up by introducing non-functional concepts like "numbers" and "strings" and and "lists" and whatnot (even though it's perfectly possible to emulate those things using functions). Unlambda keeps it simple. There is exactly one syntactical element, the ` character, which in Unlambda means "apply this function to the next function". Other than this one piece of syntax the language consists of a number of builtin functions, each of which takes one function as an argument and returns one function as a result. For example, s is the function which takes a function X as an argument and returns the function which when given an argument Y returns the function which when given an argument Z evaluates and returns the results of X applied to Z, applied to Y applied to Z. Behold the convenience!
You will of course have noticed by now that unlambda contains the s, k, and i combinators from the calculus of logical combinators, so of course most people who write unlambda use the convenient shortcut of writing their program as an expression in lambda calculus, then translating to SKI. However although this alone would be enough for most users (and indeed the S and K functions are all unlambda would need to be turing-complete), Unlambda offers a wealth of other features, including call/cc.
In short, Unlambda is basically to Scheme what INTERCAL is to C. Unfortunately, it is not as well known as INTERCAL. I've never been able to figure out why not.
#3
Coin
564
1
Also incidentally I'm curious if anyone has any experience with "K". Supposedly this is like a modern version of APL that is possible to type on a standard keyboard.
#4
mXSCNT
310
1
I've messed around with J (similar to K). Fun as an exercise, but I never got into it to the point where I'd prefer it for anything.
Learn
If you want to write code for
Python
Machine learning, AI
Statistics/data analysis
Scientific research
Web application servers
Some microcontrollers
JavaScript/Node JS/TypeScript
Web sites
Web application servers
C#
Games (Unity)
Consumer applications (Windows)
Business applications
C++
Games (Unreal Engine)
Operating systems, device drivers
Microcontrollers/embedded systems
Consumer applications (Linux)
Some more tips:
Do not learn C++ (or any other dialect of C) as a...