Questions tagged [apl]

This challenge is related to APL (A Programming Language). Note that challenges that require the answers to be in a specific language are generally discouraged.

Filter by
Sorted by
Tagged with
15 votes
14 answers
1k views

Evaluation order of an APL n-train

From Codidact with permission. Description APL trains are a series of functions, that get applied to an argument in this way: (f g) x = f g x here ...
user avatar
  • 27.1k
25 votes
10 answers
2k views

Floor of complex number

Background Complex floor is a domain extension of the mathematical floor function for complex numbers. This is used in some APL languages to implement floor , ...
user avatar
  • 62.1k
38 votes
37 answers
2k views

Ken Iverson’s Favourite APL Expression?

Ken Iverson, 1920–2020 Let's implement his favourite expression: Given a row of Pascal's triangle, compute the next row. This can for example be computed by taking the input padded with a zero on the ...
user avatar
  • 27.1k
18 votes
7 answers
834 views

What valence does this APL train have?

Context In APL, trains are tacit sequences of monadic/dyadic functions that can be called with one or two arguments. We'll code something to check if a given train follows the correct structure we ...
user avatar
  • 13.8k
15 votes
6 answers
764 views

Implement 1-dimensional version of Multi-Take

Background Adám and I were once discussing a way to properly extend some features in Dyalog APL. I came up with the following extension to Take, a function that takes some front or back elements (and ...
user avatar
  • 62.1k
11 votes
1 answer
180 views

Explicit-ify APL expressions involving trains

Related: Clearly parenthesize APL trains Background In the most basic form, APL has two kinds of tokens: arrays and functions. For this challenge, we will use a lowercase letter ...
user avatar
  • 62.1k
19 votes
4 answers
1k views

What have we got?

Inspired by, and in memory of, our beloved genius, R.I.P. He invented and implemented dfns — his magnum opus and the subject of the challenge. For the interested: latest full dfns documentation and ...
user avatar
  • 27.1k
16 votes
5 answers
358 views

Conjugation in Real Life

In @Adám's Dyalog APL Extended, the (under) operator means conjugation: apply one function, then a second function, then the inverse of the first. It's fun to ...
user avatar
  • 21.2k
9 votes
1 answer
379 views

Dyadic Transpose

As with most APL symbols, has different meanings when called with one argument (transpose) versus two arguments (dyadic transpose / reorder dimensions). This ...
user avatar
  • 21.2k
23 votes
4 answers
1k views

Clearly parenthesize APL trains

In APL, you can write tacit functions, called trains. How they work is irrelevant for this challenge. Here are the different ways they can be grouped, using as ...
user avatar
8 votes
7 answers
493 views

Fill the steps (randomly)!

This is Hole-9 from The Autumn Tournament of APL CodeGolf. I am the original author of the problem there, and thus allowed to re-post it here. Given a simple (rectangular, non-jagged) Boolean array (...
user avatar
  • 27.1k
13 votes
17 answers
1k views

Ten-row bar chart

This is Hole-1 from The Autumn Tournament of APL CodeGolf. I am the original author of the problem there, and thus allowed to re-post it here. Given a list of numbers, produce a horizontal bar chart ...
user avatar
  • 27.1k
25 votes
8 answers
2k views

Take that frown and turn it around

A celebration of the many faces of APL Given a string among those in column 1 or column 2 of the below table, return the string's neighbor to its right. In other words, if given a string in column 1 ...
user avatar
  • 27.1k
26 votes
11 answers
2k views

Official Dyalog APL 2016 Year Game

If you think this could be fun, but too much work, consider participating in this much smaller challenge. A bit of fun (and possibly frustration!) for 2016... Dyalog's "puzzle of the year". ...
user avatar
  • 27.1k
40 votes
17 answers
4k views

Tips for golfing in APL

I started one code golf challenge recently and it seems like the winner is GolfScript (surprise, surprise!). What's interesting is that there was another very strong competitor that had all chances to ...
user avatar
  • 1,039