Skip to main content

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
3 answers
305 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 ...
40 votes
38 answers
3k 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 ...
43 votes
18 answers
5k 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 ...
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 , ...
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 ...
18 votes
7 answers
877 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 ...
15 votes
6 answers
774 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 ...
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 ...
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 ...
16 votes
5 answers
368 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 ...
9 votes
1 answer
437 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 ...
24 votes
3 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 ...
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 ...
8 votes
7 answers
499 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 (...
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". ...