APL - back in the days when programmers

  • Thread starter rcgldr
  • Start date
In summary, the conversation discusses different programming languages such as APL, UNLAMBDA, and K. APL is described as being more user-friendly with its inclusion of non-functional concepts, while UNLAMBDA is praised for its simplicity and purely functional nature. The conversation also mentions the use of the S, K, and I combinators in UNLAMBDA, as well as its additional features like call/cc. The conversation ends with a mention of J, a language similar to K, but the participants have not had much experience with it.
  • #1
rcgldr
Homework Helper
8,855
632
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
  • #2
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.
 
  • #3
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
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.
 

1. What is APL?

APL (A Programming Language) is a high-level, interactive programming language developed in the 1960s. It is known for its concise and expressive syntax, which uses special symbols and operators to represent complex mathematical and logical operations.

2. What was APL used for?

APL was primarily used for scientific and mathematical computing, as well as data analysis and manipulation. Its powerful array processing capabilities made it popular among researchers and engineers in various fields.

3. Why was APL popular back in the days?

APL was popular because of its ability to handle complex mathematical and data processing tasks with relatively few lines of code. It also had a simple and intuitive syntax, making it easy for programmers to learn and use.

4. Is APL still used today?

Although not as widely used as it once was, APL is still actively used in certain industries, particularly in finance and academia. It has also influenced the development of other languages, such as J and K.

5. What are some challenges with using APL?

One challenge with using APL is its unique syntax, which can be difficult for some programmers to understand and write. It also has a limited number of available libraries and resources compared to more popular languages. Additionally, APL code can be difficult to maintain and debug, especially for those who are not familiar with the language.

Similar threads

  • Programming and Computer Science
Replies
25
Views
4K
  • Programming and Computer Science
Replies
29
Views
3K
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
3
Replies
90
Views
11K
  • Programming and Computer Science
Replies
5
Views
2K
  • STEM Career Guidance
Replies
1
Views
3K
  • Astronomy and Astrophysics
Replies
6
Views
2K
  • General Discussion
Replies
9
Views
1K
Back
Top