Stack Exchange Feeds

 The APL Orchard

apl.chat ― Learn, teach, ask, code, golf, & discuss usage. See ...
Jun 24 23:31
1
Q: Looking for Pascal Source for APL Interpreter

Leo B.There exists an APL interpreter written in CDC Pascal, which source was published in The BYTE Book of Pascal. Multiple scanned copies of the book in PDF form can be found online, some pretending to contain copyable text, but the reproduction of the printout is of too low a quality to be OCRed pro...

Jun 6 07:42
0
Q: Change Excel spreadsheet by modifying underlying xml files

T.P.As the title says, I’m trying to edit a spreadsheet by diving into its underlying xml files after I read the xlsx file as a ZipArchive. It’s for a work project where we’re trying to get rid of Excel running in the background of our programs. I’ve come up with other probably better solutions such ...

Apr 2 16:37
0
Q: Dyalog APL: how fix AI-generated code (work with PostgreSQL via ffi)

конструкторThe task was this (be sure to use libpq via ffi, odbc is not suitable): connect to the database, let's call it Local We get records from the Local database from the vpn_nodes table, ip addresses For each vpn_node, we take the ip address and connect to postgresql running on its ip in a separate t...

Mar 28 09:26
0
Q: Setting a minimum size for a GUI object in Dyalog APL

August KarlstromIs there a way to specify a minimum size for e.g. a window created with 'F'⎕WC'Form' so that I can resize the window but not make it smaller than a certain size?

Mar 24 13:48
-1
Q: Is there a way to standardise formatting in an APL Project?

sloorushI want to write a file like eslint.js file which has a standard like tab=4spaces etc. The problem I am essentially having is that if someone uses the IDE or their own way of formatting, a lot of random white space changes pop up in the diff. Is there a standard followed by the IDE or Ride, that I...

Mar 10 22:17
0
Q: efficient print of a checkerboard pattern caveman (1978) style in APL

rtobinAPL dyadic func that takes two scalars: chars on side of square, squares on side of board and prints. Example: 2 ckrboard 5 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx The following GNU APL code restricts to 1978 APL constructs that...

Mar 10 20:03
0
Q: print of a checkerboard pattern caveman (1978) style in APL

rtobinQuick: APL dyadic func that takes two scalars: chars on side of square, squares on side of board Example: 2 ckrboard 5 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx Long: The following GNU APL code limits to 1978 APL constructs that ...

Mar 10 10:25
0
Q: Why does ⎕DIV not effect Matrix divide (⌹)?

sloorushWith ⎕DIV←1, dividing by 0 does not give an error but gives a 0 every time. When dividing by 0, ⌹ seems to always throw a domain error even with ⎕div←1. Is there a reason why the value of ⎕DIV does not affect quad divide⌹?

Mar 10 09:41
0
Q: Can I set ]Box and ]Rows settings for new installations of Dyalog?

RikedyPSometimes I install a new version of Dyalog and I have to re-set my ]Box and ]Rows settings. ]box on -fns=on ]rows on -fns=on -fold=3 I know I can set these and then save the session file, but I can't simply copy my old session file for use with a new version of Dyalog. It's not a lot of effort ...

Feb 26 16:02
0
Q: Find locations of substrings within a string

userABC123I'm trying to find the locations of substrings within a string. Here, I can find the location of the first length-3 string ('DEF') within the larger string: ⍸(3,/'DEFGHI') ⍷ 3,/'ABCDEFGHIJKLMNOP' 4 But how can I find the rest of the matches? In this case the output would be: 4 5 6 7 Using...

Jan 21 16:00
0
Q: Dyalog APL does sum `+/` from the wrong end, violating the specification

Jeppe Stig NielsenOf course, many functions f are not associative in the sense that a f(b f c) (which is often just written a f b f c in APL) is not always the same as (a f b)f c. This is also the case when f is addition + of floating-point numbers. Fortunately, in APL there is a simple convention to evaluate from...

Jan 19 15:33
0
Q: Dyalog APL: GUI full mode

конструкторWhen launching Dyalog APL, I don't have a complete interface. How do I get the familiar interface back? My Dyalog APL is in the screenshot below. stackoverflow does not allow my question: it writes too short text, but I have nothing more to add... sorry for this meaningless text under the screen...

Dec 28, 2024 12:56
0
Q: APL selective assignment with commute

justin2004Selective assignment (with replicate on the left) works as expected: d←'bob' (1 0 0/d)←'B' d Bob But the same thing (though expressed with a commute) does not: d←'bob' (d/⍨1 0 0)←'B' SYNTAX ERROR (d/⍨1 0 0)←'B' ∧ I expected the same result as the first selective assignm...

Dec 5, 2024 13:20
0
Q: New dll in Dyalog APL

T.P.Is it possible to use new a new dll in Dyalog APL? I can use the existing dll's just by setting ⎕USING, but this does not work if I download a new dll. Simply copying the dll in the directory and calling ⎕USING←'new_dll,new_dll.dll gives me the error: Assembly load failed: Could not load file or ...

Dec 3, 2024 13:24
0
Q: Showing a window resize grip

August KarlstromA simple window created with 'F'⎕WC'Form' can be resized by the user but there is no resize grip in the lower right corner. If we add a status bar with 'F.SB'⎕WC'StatusBar', however, the grip is shown. To me it's not clear why the grip is only shown when the window has a statusbar. Is there a way...

Nov 30, 2024 01:52
0
Q: How to Import an APL namespace?

Zet KhrushLet's say I have the following namespace in the APL file F.apln: :Namespace F foo←{...} :Endnamespace I want to import this namespace in another namespace and use it. For example: IMPORT F :Namespace G foo2←F.foo∘÷ :Endnamespace How?

Nov 27, 2024 12:49
0
Q: Setting the vertical alignment of grid cells

August KarlstromIs there a way to align the top of the cell entries in a grid row when the cells contain text that spans more than one line? Example: Test 'F'⎕WC'Form' 'F.G'⎕WC'Grid'('Values'(1 2⍴('foo',[0.5]'bar')'baz'))('CellHeights' 10)('RowTitleAlign' TopLeft') Here I would like "baz" to be vertically align...

Nov 20, 2024 00:16
0
Q: Dyalog APL Parser

Zet KhrushI'm looking for a parser for Dyalog APL similar to aplparse, but one written either in APL itself or offered as part of the Dyalog engine. I'll be manipulating the AST in an APL program, which is why I need the output of the parser to be native to the language. Note that my question is not a dupl...

Nov 17, 2024 21:19
-1
Q: 1960-s IBM System Journal article defining System/360 instruction set in APL

DavidHope it is OK to ask the following non-programming question. Does anyone know where one can find on Internet the excellent 1960-s IBM System Journal article defining the System/360 instruction set in APL and if there is a similar paper on the current or earlier INTEL chips?

Nov 13, 2024 08:22
0
Q: User‘s language settings lead to error in working with Excel programmatically

T.P.Is there a way to change the language of an Excel application/workbook during the execution of a function? The problem I face is the following: In my organization there’s of course a lot of work that has to be shown in excel tables. We have functions (written in APL) that do most of the calculati...

Sep 24, 2024 17:23
0
Q: dyalog apl recognized idiom for `and` reduction

justin2004In Dyalog APL, could G be recognized as an idiom that evaluates to F since F is more efficient? In order to do that maybe the interpreter first needs to know if it has a boolean array argument? F ~ 0 ∘∊ G ∧/ , v←¯1+∘?¨5 ⍴¨ 1e6⍴2 cmpx 'F v' 'G v' F v → 2.4E¯2 | 0% ⎕⎕...

Sep 5, 2024 14:04
0
Q: Dyalog APL: Conga and 301 Moved Permanently

конструктор HttpCommand.Get'api.binance.com/api/v3/exchangeInfo' [rc: 1201 | msg: Conga client creation failed ERR_TLSHANDSHAKE Handshake certificate failure | HTTP Status: 301 "Moved Permanently" | ≢Data: 167] How to execute this request successfully? I'm on Dyalog 19

Jul 28, 2024 22:54
0
Q: How does liftM2 work like the S' combinator in Haskell?

nesselI was watching a video by code_report (Link) where he mentions liftM2 works like the S' combinator from combinatory logic. In his example he calculates the min/max element of an array and takes their gcd. Here's his solution. solve = liftM2 gcd maximum minimum While I can check and verify that th...

Jul 21, 2024 13:15
0
Q: JavaScript compatible libraries for evaluating APL

cyberixaeAre there any JavaScript compatible libraries for evaluating APL? I'm hoping to find something that would let me include tiny APL snippets among JavaScript using tagged template literals. Consider the following code example. The tag function apl is responsible for providing an interface for calli...

Jul 12, 2024 22:03
0
Q: Why does this expression give an error in GNU APL?

NeRobotoThis works in Dyalog APL but not in GNU APL: {10<⊃⍵:⍵ ⋄ ∇ ⍵,⍨+/2↑⍵}1 The error I get is Illegal : in immediate execution+ I am using the REPL but I tried running it from a file as well but it didn't work either. If something I am using is specific to Dyalog, what is the correct GNU way to do it?

Jul 10, 2024 10:26
0
Q: Scan that splits accumulator and yielded value

Tom HuntingtonProblem: split a list of ints such that the sums of the sublists are bounded (by 10) Here's how I would solve it in python using a scan to do the conditional logic: l = random.choices(range(5), k=30) [2, 3, 3, 1, 4, 0, 3, 2, 0, 3, 3, 1, 2, 0, 2, 1, 2, 4, 4, 3, 1, 4, 2, 0, 3, 1, 4, 1, 0, 2] scan_...

Jun 16, 2024 22:37
0
Q: I am struggling to use the TryAPL API

Aengus BallMy level in programming isn't super advanced, and I am struggling to find documentation on this API for a practice script I'm working on. I am following the instructions in the APL Wiki (aplwiki.com/wiki/TryAPL#API) but I am not getting anything back. The examples are in what looks like a C-famil...

Jun 11, 2024 17:44
0
Q: Dyalog APL: How to filter an array like filter() but more weakness

конструкторHow to change the solution from the answer to the question Dyalog APL: How to filter an array like filter() To: it performed an incomplete match search ignoring the case Original solution: tmpSymbolsT←(data←⎕JSON(HttpCommand.Get'api.binance.com/api/v3/exchangeInfo').Data).symbols tmpSy...

Jun 11, 2024 13:49
0
Q: Dyalog APL: Is it possible to do inline text editing?

конструкторFor Object class from Dyalog APL: How to write array of Objects to XML File?. Is it possible to make a function that outputs the value of the Name field and allows you to edit it? What do I mean by that: Print _People.Name Get user input, but don't newline (inline mode) See image: Edit the val...

Jun 9, 2024 09:56
0
Q: Is there a way to access APL+Win's ability to generate an expression for a value?

AdámWhen hovering the mouse over a variable name in APL+Win, a value tip is shown, with (the beginning of) an expression that would evaluate to the variable's value. How do I access this ability programmatically, so I can get an expression for any given value?

Jun 7, 2024 12:55
0
Q: Dyalog APL: How to write array of Objects (with NameSpace) to XML File?

конструкторIn addition to the question Dyalog APL: How to write array of Objects to XML File?, I'd like to clarify this situation: And if one field contains a namespace, then what will the XmlMat function look like? For example, let's add the Phone field (←⎕NS⍬) to the People class. And assign the value to ...

Jun 5, 2024 16:10
0
Q: Dyalog APL: How to write array of Objects to XML File?

конструкторI have Object class like that: :Class People :Field Public Type ← 'contact' :Field Public Name ← ⍬ :Field Public Company ← ⍬ :Field Public Position ← ⍬ :Field Public Fax ← ⍬ :Field Public Email ← ⍬ ∇ make args :Access Public :Implements Constructor ...

May 28, 2024 13:52
0
Q: Read old APL *.sf files

Robert JellisonI need to get data out of old (~1990) APL *.sf files. The old APL software will not run on current Windows verions. Tried to read the files after installing DyalogAPL with no success. Could not find a way to tie to file.

May 26, 2024 00:33
0
Q: How to generate output while iterating with Del?

David HoelzerI'm knocking off 30+ years of rust and poking at APL again. I was working through some Project Euler questions and ran into an interesting problem. I defined the following function to evaluate "primeness": prime←{0=+/0=⍵|⍨1↓⍳⌊⍵÷2} This works fine for all reasonable cases, though it's clearly n...

May 23, 2024 07:10
0
Q: Map over a list of lists of arbitrary depth in Haskell

lanfOne can map over a list of lists of arbitrary depth as follows: map :: (a -> b) -> [a] -> [b] (map.map) :: (a -> b) -> [[a]] -> [[b]] (map.map.map) :: (a -> b) -> [[[a]]] -> [[[b]]] Is it possible to write a single function handling all such cases? Uiua has the ∵ each func...

May 21, 2024 21:52
0
Q: transitive edges in APL

justin2004Say we have a rank 2 vector that represents edges in a graph: m←3 2⍴3 5 5 9 6 3 m 3 5 5 9 6 3 And we want to compute the transitive edges. e.g. Since we have the edge from node 3 to 5 and the edge from node 5 to 9 then transitively we also have the edge from node 3 to 9. I have imple...

May 15, 2024 07:54
0
Q: How to use each with a dyadic function?

AnnamisakiI want to execute a function for each element of its left and right argument, by pair. I've seen each can be used for this with dyadic operands (https://help.dyalog.com/latest/#Language/Primitive%20Operators/Each%20with%20Dyadic%20Operand.htm) and tried (left fire¨ right) but it doesn't work, I h...

May 14, 2024 07:49
0
Q: How to change the value of a variable defined outside the function in APL?

AnnamisakiI am a beginner in APL (I use dyalog APL) and I want to change the value of a variable defined outside the function. I've tried this function but marks_list is still empty after calling it: Accessibilityset←{ (⍴marks_list)=0 : marks_list←⍺ marks_list }

Apr 17, 2024 10:56
0
Q: Alexa Widget - test DataStore Update

BrtlbI am currently trying to develop an alexa widget for visual echo devices which is supposed to display data from a DataStore. I could bind the DataStore data to the widget i n the APL code and install it on my echo show. I can also send updated data using the "Update data store" button in the widg...

Apr 12, 2024 22:42
0
Q: Is there a language where "everything is a dataframe"?

dpercyIn APL, you don't need to write loops because scalar operations are automatically "broadcast" (mapped and zipped) across arrays. For example a grayscale image could be a 2D array, which is like a function (int, int -> float). If I add a 1D array to this, it zips along the x axis, and broadcasts a...

Apr 11, 2024 22:56
0
Q: APL - idiomatic way to filter, group, and sort from matrices

Marco PegoraroI am attempting to learn APL, but I am having a hard time writing code in an idiomatic way. Part of the problem, I believe, is that it is hard to find teaching material sufficiently broad and complete. For instance, consider the following problem: we have a matrix with n rows and 3 columns. Assum...

Mar 30, 2024 14:35
0
Q: Widget APL Touch Component Advice

Brian WI’m trying to create an APL document (for an Alexa widget) that contains a background image, several text components, and a footer action button.  I would like for the user to be able to touch anywhere on the widget (outside of the footer action button) to open the corresponding Alexa skill.  I a...

Mar 17, 2024 21:13
0
Q: Dyalog Trying to understand a Floating Point rounding issue

Neil BartlettI'm trying to understand an FP issue that I presume is rounding but not sure. I have the script below that I have typed in from a Decimal Computation Schmid 1974. LOG X;I;J OUT←0,0,0,(PX←X),S←J←1-I←1 A←8⍴0 L1:A[I]←1+(SI←¯1*I)×10*2-I A[1]←0.1 L2:PX←A[I]×P←PX S←S-⍟(A[I]) OUT←OUT,(J←J+1),(I-2),...

Mar 15, 2024 20:08
0
Q: Is there a special meaning to underbar variables names in APL

Neil BartlettI'm trying to transcribe the FMT function from Formatting APL to Dyalog. However I'm not sure of the meaning of the underbar S and I don't see a mechanism to enter underbar variable names into Dyalog. So two questions in one: How does one enter underbar variable names into Dyalog and do they hav...

Mar 15, 2024 18:38
-2
Q: What is the Dyalog equivalent of the APL/360 I-beam 26?

Neil BartlettWhat is the best translation from APL/360 to Dyalog for I-beam 26 for example in the lines: →(3 2 1 ⍴⍴X)/(DFTERR+F←0), 2 3 +⌶26 →(∧/0≤Y)/2+⌶26 ? (The APL\360 manual at https://www.softwarepreservation.org/projects/apl/Books/APL360ReferenceManual says ⌶26 Current value of line counter. In the e...

Mar 15, 2024 17:30
0
Q: Trying to run old APL from the Book Decimal Computation using Dyalog. Function DFT (presumably from IBM PLOTFORMAT). Is there a Dyalog equivalent?

Neil BartlettAPL newbie. Using Dyalog (18.2 on Mac) to run a function I've transcribed from Decimal Computation by Schmid a 1974 book I'm reading. The function is the source of a table in the book. The function is ∇ COSANDSIN L;I;J;X;Y;Z;OUT OUT←0, 0, 0, X, Y, SA , PK←Z←X←J←1+I←N←SA←Y←0 LH:A←(180÷○1)ׯ3○10...

Feb 28, 2024 13:06
0
Q: VSCode keymap best compatible with Dyalog APL IME keyboard

OlexaVisual Studio Code's default hotkeys keymap is effectively incompatible with Dyalog Unicode IME keyboard, as it uses Ctrl [+ Shift] + alphanumeric keys really massively. There are over 100 VSCode extensions with alternative keymaps: https://marketplace.visualstudio.com/search?term=keymap&target=V...

Feb 24, 2024 06:55
0
Q: Dockerfile fonts for APL, BQN, and UIUA

buddingprogrammerIs it even possible to type within an Arch, or other distro, container using the glyphs for APL, BQN, and/or UIUA? I can find the fonts each recommends in their respective documentation, but where should they be extracted to and will the terminal in the image be able to enable them and type direc...

Feb 16, 2024 03:45
0
Q: Merge Vectors In APL

Jay MoskUsing Dyalog APL I would like to take a Mask Vector where '-' means use the original character and any other character is to replace that position in the Data Vector. So in the example below, Mask 'a' is used on Vector 'b' to create Vector 'c'. ┌──────┬────────┬────┐ │X--Y-Z│--34--91│-+-+│ Mask V...

Feb 14, 2024 11:00
0
Q: Best way to import and handle non-rectangular (ragged) data

AlbertoI am studying APL and I am facing this problem: in real life cases, it is common to deal with non-rectangular datasets (imagine importing data from a SQL database where the "count(*) ... group by ..." gives different counts for different groups). I have setup an example where I import a time seri...