Questions tagged [apl]
APL is an array-oriented programming language. Its powerful, concise syntax lets you develop shorter programs that enable you to think more about the problem you're trying to solve than how to express it to a computer.
17 questions
7
votes
1
answer
570
views
Efficient print of a checkerboard pattern caveman (1978) style in APL
APL dyadic func that takes two scalars: chars on side of square, squares on side of board and prints.
Example:
...
4
votes
1
answer
114
views
Dyalog APL dyadic operator deriving ambivalent function to pair two function results
I'm writing a small utility operator which applies two functions to an argument pair and strands the results. The pair can either be given as two arguments or as a single argument with two elements. ...
6
votes
2
answers
185
views
String unescaping in Dyalog APL
I am adapting the following existing python parser:
...
3
votes
2
answers
497
views
Print square numbers from 1 to 9999 (non-tradfn)
I'm making a simple program that outputs the squares. I have a question: Is there a way to improve the speed but make the Code readable?
Code
...
4
votes
0
answers
84
views
6
votes
1
answer
460
views
Image processing using Dyalog APL
I've started to write my first APL project, so I would like to have general feedbacks on coding style, file organization, error handling and defensive programming, performance improvements, etc.
The ...
2
votes
1
answer
134
views
A TradFn for loading an image from a URL in Dyalog APL
Wrote this for getting the content of image from the given URL. It accepts a URL and returns an array of shape number_of_channels image_height image_width. Each &...
3
votes
1
answer
148
views
Solving the game of 24 recursively in APL
The "game of 24" as I called it in the title is a maths game in which you are given four numbers and have to combine them in an expression using only the four basic arithmetic operations <...
3
votes
1
answer
265
views
Implementing basic graph theory functions in APL with matrices
I had to solve three problems on graph theory that I solved by implementing a utility function and 3 functions, one for each of the problems.
The problem set defines the input for all my functions as ...
3
votes
1
answer
90
views
Abbreviating and expanding IP v6 addresses with APL
Recently I solved a challenge (problem 1 of the 3rd easy problem set of phase 2 of the '19 APL Competition) on abbreviating and expanding IP v6 addresses. For that matter, I had to write two functions,...
2
votes
2
answers
431
views
Simplified Pig Latin translator in APL
I wrote a simplified pig latin translator in APL and I would like some feedback on it, as I am not sure my implementation is neat enough.
The simplified pig latin translation follows the following ...
5
votes
2
answers
215
views
Leftist Tree in Dyalog APL -- can it be made more compact/idiomatic?
Following great feedback given in response to my previous question, I was encouraged to consider a different type of heap structure, the Leftist Tree. It lends itself better to a functional ...
2
votes
1
answer
194
views
Decoding a telephone number that was masked with letters from the respective keys with APL
Legend says phones used to have keyscitation needed and in those times, a person could "encode" a phone number by creating a word from the letters in the keys with the given numbers.
Below is the ...
6
votes
4
answers
373
views
Finding legal knight moves in a chessboard in APL (follow-up)
This question is a follow-up to this previous question of mine. Assuming I understood correctly what is outlined in this meta post.
I wrote (and now, re-wrote) a function that takes as input a vector ...
4
votes
1
answer
195
views
A heap queue in Dyalog APL
I am learning Dyalog APL. I implemented a binary heap, which seems to work. How could I make it look more like APL (and less like Python)?
...
3
votes
1
answer
92
views
XML attribute analysis
To begin, I have an XML file at /Users/gaze/lab/lab/gpib_lib/out.xml that contains lines like...
...
18
votes
2
answers
964
views
Finding legal knight moves in a chessboard in APL
I wrote a function that takes as input a vector with two integers between 1 and 8 representing a position in a chessboard and ...