In Dyalog APL the character vector ⎕AV contains all characters in the Classic Dyalog APL character set. Where can i find information about what each character in ⎕AV stand for? I'm trying to find out what each control character in the ASCII encoding corresponds to in ⎕AV in order to filter out in...
I now know how to use the APL interpreter, but I'm quite confused about how to write APL into a file and then run the said file. I currently write Dyalog APL using the ride IDE. What I now want to do is to:
Use the ride IDE to develop programs (how else do I access the keybindings?).
Save my pr...
This question addressed the question of APL overstrikes on printing terminals. However, IBM also had 3270 video display terminals that supported APL, as well, and those, too, handled overstriking. How?
The APL language used a unique set of characters, and additionally allowed overstriking of some characters on the terminal to form characters that were used in the language. When an APL workspace was saved, or a function with an overstrike was executed, were overstruck characters (e.g., 'domino' ...
I wrote a function that takes as input a vector with two integers between 1 and 8 representing a position in a chessboard and that should output a vector where each cell is a similar vector of integers, with the positions that a knight in the input position could reach.
E.g. for the input 1 1, m...
ok, i lied, it is possible, but the code isn't pretty.. https://tio.run/##nVLLattAFN37Kw5ZjbAQHtt5GrcUSnalhUI3xouJPHGmqJIZyfIiGEoWXdUlCwey7sqL7Jr@gD9FP@LemZH8KHYKHWTkuffMPY9RKOJcpKvVK9zyRr348VB8uy9mv6fF7CfzlwsPrIlmMXsuZr/atGmh5TbnXq2Yfy/mX/c9TwfqLz/3NPGOo4kW2pt/OMYJTnGGc6oRYn7g9PN/cT7udfH0L5EcvFm9wVtO2R1vgVvlbfBj8JOyDLNM@RT8DPygjxccPK6WC6gvo@iiVgNG46tIhfgkorHEOB5Izd5ffYYQPsw78cvWxMdbqVUuB@@SEQiWe7itGTUqvYyZEF7H7iy614eWaRNdxHJSliaBEn2H0TJk7HIce5aGKGh4w/8bu13gtDMTvWpANtYx3mgdhFqKTDLTpDlBeiNG0qKm9DP@SDMBkCdqYImJd687FWdQ/lq/0MPU33bzQcud/dr@NZhCt2tPBJGMh9lN1SvjQE5JJMSQZiIOZXINEvEaZQaJF4QiitiWG0d…
@Adám is dzaima/APL the only APL using minimum depth here? that's been since changed (hopefully being equal to Dyalog), and i want to be sure before i remove all mention of minimum depth
@JeffZeitlin plain assignments - no. Modifying assignments will work, and so you can hack around by using var⊢← value (assuming var previously had a value in the scope you want it to be in)
@dzaima other thing i noticed in the wiki is replicate, as dzaima/APL's is just ⌿⍥, (probably axis replicating could be added but everything's on hold until ⍢ is updated or scrapped; i'll see if i can edit it without wasting too much space on my random decisions)
i'm pretty much done with the ⍢ rework, but one thing that's left is figuring out whether f⍢(g⍢h) (where g & h are structural modifications) is a sane and/or implementable thing, and it's hurting my brain :|
In RIDE, when )editing a function, is there a way to save changes without closing the edit window? Both ESC and hitting the (X) button saves & exits...
@Adám - @dzaima's comment just now brought up a thought that keeps popping up in my head: In tradfns, one names the return value and the arguments, but is it allowable to use ⍺ and ⍵ as the arguments in tradfns?
@Bubbler the structural modification part is important though - this can't work with just inverses. It's already defined for purely-computational things
To begin, I have an XML file at /Users/gaze/lab/lab/gpib_lib/out.xml that contains lines like...
<MemberCall method_name="setFastCoupleMode" callee_name="GPIB_7280" fname="/Users/gaze/lab/lab/gpib_lib/../apps/capbridge/capbridge.C" lineno="394" colno="9" />
<MemberCall method_name="setInputLine...
@Evan If there are a significant number using a namespace to collect and pass the arguments can have many advantages, among them no need to worry about position.
@dzaima As an aside, predicate⊃(if-true)(if-false) -- and boy does it seem obvious after I figured it out -- should probably be predicate⊃(if-false)(if-true)
To begin, I have an XML file at /Users/gaze/lab/lab/gpib_lib/out.xml that contains lines like...
<MemberCall method_name="setFastCoupleMode" callee_name="GPIB_7280" fname="/Users/gaze/lab/lab/gpib_lib/../apps/capbridge/capbridge.C" lineno="394" colno="9" />
<MemberCall method_name="setInputLine...
@Bubbler the point of the rework was to switch from the "undoing" mindset to structural functions having an "under" call that does both execution & unexecution at the same time, so it's not that simple anymore
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)?
⎕io←0
heappush←{(⍺,⍵)siftdown 0(≢⍺)}
heappop←{
heap←⍵
last←⊃¯1↑heap ⋄ rest←¯1↓heap
0=≢rest:rest last
r←heap[0]
(((last@0)rest)siftup 0)r
}
siftdown←{
...
I imagine for most purposes you'd much rather index than transpose and then index.
but anyway. The goal here is to open an XML file, and assuming it only has one tag at level zero and everyone has the same attributes, extract the values of a particular attribute... namely 'callee_name'
I don't know if this is necessarily a really appropriate topic for the Cultivations, but I think something about converting code from other languages would be a useful/interesting possibility.
hmm still dont quite have it.
basically, I want to span 1-to-1, 1-to-2, but not 2-to-1 (numbers are arbitrary can be wtvr)
x ← 0 0 2 0 1 0 2 0 1 0 0 1 0 0 2
y ← 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0
in that case, i've got this crazy monstrocity that's probably slower than a more trivial approach, but i've gotta go https://tio.run/##TVBNS8NAEL33Vww9JaSh2dw9WK8i3o2HNMnqQtIN@ZJavYZWulKR4kmQopibB@1F6KX@k/kjcdJQkWVn580b3nusG4emP3ZDeVHXXorlYmI4zES1drYfttm3etT2DQIMy0erx1B9oapwtqL5LaB6hkj6govAh8PTY89NMpAcukd5lIduJooA0jxKQTMcHWQRJASHReBlMkmbxZMCxMgXnpuRwHAMg6ILVyK7JIKyaOQzKHTyZB0eN@HI9YzhfKqh@mxD6GabzUuB9SycvdDsvE3GRRi2anESFELmKYzkyLwOEgkiC6IOh0aTtNYHlo7Td/vGcBpEKpb@89S2rzjfkPl805gZGrd3LG3v2DfC5YLH0PxHB@@Xu9h3qwmWD6iW22pbofpuSK6DRcemy/69@9pi@6/fV6uufwE
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 with two integers between 1 and 8 representing a position in a chessboard. This function should ...