Questions tagged [dyalog]

"Dyalog" refers to the APL implementation developed and distributed by British company Dyalog Ltd. Dyalog APL includes many additions over the ISO standard for APL. This tag should be used in addition to [apl] when asking for help with language features specific to Dyalog APL, or when a solution using such features is acceptable.

Dyalog APL, or simply Dyalog, is a nested APL by British company Dyalog Ltd. The name Dyalog is a portmanteau of Dyadic and Zilog since it was initially released for the Zilog Z8000 processor in 1983. Continuously developed since, Dyalog has added numerous core language features, and support for many programming paradigms including object-oriented programming based on .NET, Lisp-style lexically scoped anonymous functions (dfns), and leading axis and tacit programming support based on J. It supports several platforms and interoperability between them, and interfaces with other languages and runtimes including native shared libraries, .NET, the JVM, R, and Python.

Example

This defines m as a 4-row, 3-column matrix consisting of the first 12 natural numbers:

      m ← 4 3 ⍴ ⍳ 12

Now we can sum the columns:

      +⌿ m
22 26 30

Counting the number of rows:

      ≢ m
3

Average of each column using an anonymous tacit function:

      ( +⌿ ÷ ≢ ) m
5.5 6.5 7.5

Tag usage

This tag should be used together with (in addition to more subject-specific tags) when asking about features limited to Dyalog APL and similar dialects, or when asking for code to complete a task, and a solution using Dyalog features is acceptable. Due to the rapid development of the language, it is beneficial to also include which version number is used, e.g. 17.1 or 18.0.

Learn more

146 questions
1
vote
2 answers

how to dynamically calculate sum of increases?

I have the following data: a b c d 5 9 6 0 3 1 3 2 Characters in the first row, numbers in the 2nd and 3rd rows. How can I change the second row depending on the numbers in row 3? For example, in the 3rd row, if the number is 3, then the…
cickness
  • 737
  • 2
  • 6
  • 13
1
vote
1 answer

Increase the numbers in apl

I have the following data: a b c d 5 9 6 0 3 1 3 2 Characters in the first row, numbers in the second row. How do I get the character corresponding to the highest number in the second row, and how do I increase the corresponding number in the…
cickness
  • 737
  • 2
  • 6
  • 13
1
vote
1 answer

Importing a workspace with qualifier

In a namespace script I would like to use a couple of functions from the dfns workspace. However, if I do ⎕CY 'dfns' all identifiers in dfns will be imported unqualified. How do I import dfns so that I can access functions in dfns with a qualifier,…
August Karlstrom
  • 10,773
  • 7
  • 38
  • 60
1
vote
1 answer

From unix time in seconds to datetime in ISO-8601

TL;DR. How to go from unix time in seconds to datetime in ISO-8601 format ? This looks more like a library question than a language question. I would like to be able to interpret the ping timestamp (unix time + microseconds) as a datetime to be able…
Ludovic Kuty
  • 4,868
  • 3
  • 28
  • 42
1
vote
2 answers

How do I get current timestamp in seconds?

In Dyalog APL I can use the function ⎕TS to get the current year, month, day, hour, minute, second etc, but is there a way to get the current timestamp in seconds from e.g. 1970-01-01 (Unix timestamp)?
August Karlstrom
  • 10,773
  • 7
  • 38
  • 60
1
vote
2 answers

Idiomatic way to select from a matrix based on value

The following employee matrix of names and email addresses makes it visually clear that bob's email address is bob@example.com. ┌───────┬─────────────────────┐ │alice │alice@example.com │ ├───────┼─────────────────────┤ │bob │bob@example.com…
codesections
  • 8,900
  • 16
  • 50
1
vote
2 answers

Using Search operator to find out only if there is a match

When using the operator ⎕S in Dyalog APL I'm only interested in if there is a match or not, so the expression ('foo' ⎕S F) 'foo' 'bar' 'foofoo' should evaluate to .→----. |1 0 1| '~----' What function (or string) F will achieve this? Edit: The…
August Karlstrom
  • 10,773
  • 7
  • 38
  • 60
1
vote
1 answer

In Dyalog APL, how do I turn off auto-scaling in a Form?

In the examples in the Dyalog chm help file on drawing simple lines in a form, I drilled down into all of the various options you can place on a Form window creation and could not find a way to turn off the auto-scaling. That is, when I resize the…
SteveH
  • 113
  • 8
1
vote
3 answers

How do I concatenate combinations of letters and numbers in APL?

I'm in Dyalog 17 and would like to generate unique names to be used with its graphics object library. So, for example, I have the letter 'l' and want to take the number 1, convert it to a character and then concatenate the two together to form…
SteveH
  • 113
  • 8
1
vote
2 answers

How to test for string input? (Dyalog APL)

I was working on this function Happy to practice control flow. Happy tests if a number is a happy number. I was trying also to learn error handling. So, I tried to catch if a user input is anything other than an integer. Especially if the input is a…
zeynel
  • 177
  • 1
  • 1
  • 12
1
vote
1 answer

Time testing a Dyalog Idiom on large array

For this first row found idiom (w∘{(↓⍺)⍳↓⍵}) there seems no reduction in search time even though the first search would be hashing the array making later searches much faster? w← 100000000 3⍴'123' w←w,[1]'321' z← ⎕AI[3] ⋄…
Joe Killian
  • 149
  • 4
1
vote
1 answer

APL Poker Game Scoring

I have a problem in APL which involves getting values and scoring them like a poker game. So I used CHARS⍸CAR3 5 29 30 8 29 23 5 34 34 33 2 34 3 34 6 10 10 15 6 15 15 Which is an integer representation of characters in "deck" of…
1
vote
1 answer

Iterating over a List from an imported (.net) class in Dyalog APL v14.0 and up

I'm a complete newbie when it comes to APL, and I hope some of you fine folks might be able to help me... I have a class library written in C# and exported to a dll. I then import this class in Dyalog APL (v14.0) and I am able to instantiate objects…
1
vote
1 answer

How to open Dyalog APL mapped file

I am trying to disable some image processing code in a digital camera firmware. From the firmware dump, I found some *.bin files with magic number that corresponds to "Dyalog APL mapped file 64-bit version 19.145" (from unix file command). After…
Hendrik Poernama
  • 413
  • 3
  • 14
1
vote
2 answers

Dyalog APL language bar is missing

I have just installed Dyalog APL and I can't see language bar above as well as other bars. No prior configuration was done. OS is Windows 7. Here you can see my window and normal look of it. Normal look My window How can I fix it? Thanks!
Dasha
  • 327
  • 2
  • 10
1 2 3
9
10