APL - back in the days when programmers

  • Thread starter Thread starter rcgldr
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around programming languages, particularly APL and its historical context, as well as comparisons with other languages like Unlambda and K. Participants share their experiences and opinions on the usability and characteristics of these languages.

Discussion Character

  • Exploratory
  • Debate/contested
  • Technical explanation

Main Points Raised

  • One participant reflects on APL's historical significance and shares a typical APL program that displays all programs in a workspace.
  • Another participant critiques APL for being overly simplistic and promotes Unlambda as a superior language, emphasizing its purely functional nature and minimal syntax.
  • The same participant explains the mechanics of Unlambda, highlighting its reliance on combinators and its Turing-completeness.
  • A different participant inquires about "K," describing it as a modern iteration of APL that is more accessible for typing on standard keyboards.
  • Another participant mentions their experience with J, a language similar to K, noting it was enjoyable but not compelling enough to use regularly.

Areas of Agreement / Disagreement

Participants express differing views on the merits of APL versus Unlambda, with some favoring the simplicity of Unlambda while others appreciate APL's historical context. There is no consensus on which language is superior, and the discussion remains open-ended regarding the value of K and J.

Contextual Notes

Participants do not provide definitive conclusions about the effectiveness or superiority of the languages discussed, leaving open questions about their respective usability and appeal.

rcgldr
Homework Helper
Messages
8,948
Reaction score
687
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:

aplfns.jpg


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.
 
Technology news on Phys.org
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:

Code:
```s``s``sii`ki
  `k.*``s``s`ks
 ``s`k`s`ks``s``s`ks``s`k`s`kr``s`k`sikk
  `k``s`ksk

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.
 
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.
 
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.
 

Similar threads

  • · Replies 25 ·
Replies
25
Views
5K
Replies
29
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 90 ·
4
Replies
90
Views
12K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
4
Views
1K
Replies
60
Views
18K