« first day (1052 days earlier)      last day (1610 days later) » 

12:03 AM
@Adám ok thank you
 
12:36 AM
for me 0 element list is void list whatever it type it has… so '' is zilde… but this is not for apl or possible other programming languages
 
@RosLuP We've been over this before. Do you think that 1⍴0⍴0 should be the same as 1⍴0⍴'a', and if so, what should it give?
 
12:54 AM
For me both has to retur zilde enclosed...one set that contain 1 void set
 
@RosLuP Where did the enclosure come from? Are you saying that all fills should be ⊂⍬?
@RosLuP So you also think ↓↑'ab' 'defg' (or in APL2/NARS2000 etc. ↓⊃'ab' 'defg') should be ('a' 'b' ⍬ ⍬) 'defg' ?
 
@Adám I add that because has not meaning for me 10/rho /zilde that return one list of 10 zero, but has meaning 10/rho /enclose /zilde that return one list of 10 zilde
 
@RosLuP Everybody agrees that 10⍴⊂⍬ gives ⍬⍬⍬⍬⍬⍬⍬⍬⍬⍬. Are you saying that APL shouldn't provide fill elements at all?
 
It has meaning in the result...for me 10/rho /zilde has already meaning one array of 10 zilde has 10/rho 4 it is one array of 10 4
 
@RosLuP OK, how about 10⍴0⍴0?
@RosLuP Btw, your "/name" notation is quite hard to read. Maybe have a look at this which allows you to type APL characters in the browser?
 
1:05 AM
0/rho0 is always zilde 10/rho /zilde here print 10 0 as list , not 10 zilde as list... It appear array are concatenate
 
@RosLuP You are confusing and ⊂⍬. What do you think 10⍴1 2 should give? (1 2)(1 2)(1 2)(1 2)(1 2)(1 2)(1 2)(1 2)(1 2)(1 2)? or 1 2 1 2 1 2 1 2 1 2?
 
It appear that in A/rho W A is a number; ifW is a scalar it replicate it (as one list enclosed) if W is one list it concatenate A times in a list
This for me means that A/rho /zilde has to be zilde, and A/rho /enclosed /zilde has to be A zildes in a list
 
@RosLuP No, the definition of ⍺⍴⍵ when is a number and is a list is a list of length filled cyclically with the elements from . Otherwise 3⍴1 2 would give 1 2 1 2 1 2 and not 1 2 1.
@RosLuP I'd really appreciate it if you could use proper APL symbols instead of slash followed by their names.
@RosLuP Therefore, ⍺⍴⍬ has to give a list of length filled cyclically with the elements from . You are correct that ⍺⍴⊂⍬ gives s in a list.
But then the problem arises, what are the elements of ?
And APL solves this by remembering that the prototypical element of is 0 while the prototypical element of '' is ' '.
 
Elements of zilde == none
 
1:21 AM
@RosLuP True, so either we have to make some up, or error. Enclosing or returning an array of a different shape than requested isn't right.
 
10 rho zilde is void set it is zilde
 
@RosLuP So you are saying that there should exist values a and b such that (,a)≢⍴(,a)⍴b ?
 
I don't know...good night or good morning depends where one is
 
@RosLuP Good night to you too!
 
ngn
1:57 AM
@Adám "We reserve extra space" - do you know if that's a const amount, as opposed to realloc-ing in powers of 2 for instance?
 
@ngn Also curious about what happens when the array has rank 2 or higher
 
@ngn Didn't you have that discussion with someone? IIRC, we reserve a certain percentage, 25% or something.
@Bubbler All arrays are "rank-1" internally, they are stored as rank,shape,ravel.
 
ngn
@Bubbler i don't think they can do that for rank ≥2 in the general case - what if it's a very tall matrix and all this is a waste of space and thus ruining locality. but i vaguely remember roger mentioning in a presentation that boolean matrices (and probably other small types) are padded to the closest multiple of something
@Adám i've had this discussion many times :)
 
(repeating a question I asked earlier in case anyone here now knows:) I know that I can set keyboard shortcuts for F1–F12 with the PFKEY system function. But is there any way to set other shortcut keys in the Linux TTY IDE? (I've found instructions for the Windows GUI IDE and (more limited) instructions for RIDE, but I'm having trouble finding anything for the version I use.)
(From some references in the docs, I suspect that /opt/mdyalog/17.0/64/unicode/aplkeys/xterm might be related somehow, but I couldn't quite tell how that file works. Minor edits to it didn't seem to have a major effect, and I am reluctant to change it more without a better understanding.)
 
ngn
@ngn the buddy system (and its variations) is still the simplest and most efficient memory allocation strategy that i know of
 
2:08 AM
@codesections I've not forgotten, I just didn't have time to ask relevant colleagues today. I'm planning to do so tomorrow. Sorry, I should have said something.
 
ngn
@codesections iirc the tty version uses a "private use" range of unicode to receive commands
the mapping from keystroke(s) to chars in that range is done in the kbd layout for linux
 
@Adám Oh, thanks. I know it's easy for messages to get lost in formats like this
 
@codesections True, and I don't mid you reminding me. I was just travelling and teaching APL IRL all day.
 
@ngn Interesting. If that's the case, I should be able to use xdotool to send those unicode chars. (It does regular unicode, so I'd bet it'd do the private range characters just fine.
 
ngn
@codesections probably
it may help to look in /usr/share/X11/xkb/symbols/apl
there should be a table that looks like this:
//				APL special actions		F800-F88F
//
//	│F800 F810 F820 F830 F840 F850 F860 F870 F880
//	├────┬────┬────┬────┬────┬────┬────┬────┬────┐
//     0│QT  │LL  │BK  │FX  │Rc  │BP  │PA  │    │    │
//	├────┼────┼────┼────┼────┼────┼────┼────┼────┤
//     1│ER  │HO  │ZM  │LN  │LW  │AB  │    │    │    │
//	├────┼────┼────┼────┼────┼────┼────┼────┼────┤
unfortunately the codes are given only as abbreviations. i know QT=quit, ER=enter, BK=back, LN=toggle line nums,..
there must be a more descriptive list of these buried somewhere in dyalog's docs
easier to wait for adam to come back with more info tomorrow :)
 
2:19 AM
@ngn That's perfect! The abbreviations correspond to the ones listed in Appendix A of the Configuration and User's Guide. There might still be a more official/easier way to do it, but this looks very promising for a hack
 
ngn
3:03 AM
@ngn uh.. wrong link. i meant this of course
 
 
3 hours later…
5:34 AM
CMQ: Is there a more elegant way to write small unit tests than my Assert and its example usage?
 
 
1 hour later…
6:41 AM
Nevermind, I rewrote them already
 
 
2 hours later…
8:29 AM
@Bubbler Roger Hui advocates Assert←{⍺←'assertion failure' ⋄ 0∊⍵:⍺ ⎕signal 8 ⋄ shy←0} which can be used with a slightly neater syntax:
 Assert 1≡f,')':
 Assert 5≡f'()())':
 
9:02 AM
@Bubbler I know you've rewritten it already, but for good measure, your old Assert could be written as Assert←'Assertion Failure'⎕SIGNAL 11/⍨0∘=
 
9:57 AM
@codesections Using the key codes from /usr/share/X11/xkb/symbols/apl like @ngn said, the best practice way is:
Create ~/aplkeys
Create ~/aplkeys/my_keyboard:
MOD: xterm + Dyalog's defaults
+my definitions go here
Edit ~/.dyalog/dyalog.config inserting two lines:
export APLKEYS=$HOME/aplkeys:/opt/mdyalog/17.0/64/unicode/aplkeys
export APLK=my_keyboard
Then start APL as normal.
 
 
6 hours later…
4:03 PM
Thanks for the info. I'm not *quite* sure I follow, though.

After creating the `my_keyboard` file, you said I should:
MOD: xterm + Dyalog's defaults
+my definitions go here

Which part of that is literal text and what part is something for me to fill in? Do I type `MOD: xterm +` as a literal string and then paste in Dyalog's defaults? If so, is that the contents of `/opt/mdyalog/17.0/64/unicode/aplkeys/default`, `/opt/mdyalog/17.0/64/unicode/aplkeys/xterm`, or some other file? Or do I type the literal string `MOD: xterm + Dyalog's defaults`?
I guess my more general question/what I should have asked is "what language should I use to write the config file?" After looking at it a bit more, it looks like + is the comment character. If so, that answers about half of my questions but means that I don't know what language this is in—clearly neither Bash nor APL
 
4:31 PM
Also, when you said "Then start APL as normal", did you mean with the mapl command (which is how I normally start it)?
 
 
5 hours later…
9:10 PM
APL symbols make a nice font for AoC day 13: i.imgur.com/uhr6dVA.mp4
 
ngn
9:40 PM
@voidhawk how did you figure out what we're supposed to do in that game?
 
9:55 PM
@ngn Have you ever played Arkanoid/Breakout?
 
ngn
@voidhawk i've played a similar game, i don't remember what it's called, but i wouldn't recognize it just from its matrix of tiles
it seemed too much work to simulate the game interactively and then try to figure out what i'm supposed to do, so i gave up on part 2 :)
 
10:09 PM
Yeah that's fair. It's not really specified in the problem, but I grew up playing those games - as soon as I saw the tile types were "wall, block, ball, paddle" and part 2 asked "Beat the game by breaking all the blocks" I knew what it was
In general the intcode challenges feel like work to me, but I guess I'm a completionist
 
ngn
@voidhawk i have a function for the transition between states of the intcode machine (3 lines of k) and i reuse it for all challenges, so those are generally easy for me
 
Oh nice, 3 lines? Way shorter than mine: github.com/voidhawk42/aoc2019apl/blob/master/p13.dyalog
Care to share?
 
ngn
@voidhawk click on my avatar - bitbucket.org/ngn/k/raw/master/aoc19/a.k
 
@ngn Is this k7?
Oh, right - ngn/k?
 
ngn
@voidhawk yes, my own re-implementation of k5-k6
@voidhawk so, the strategy for part 2 is just follow the ball's x coord? :)
 
10:22 PM
@ngn Yep, sorry if I spoiled it
 
ngn
np, it should be obvious once one finds out what the game is
and i thought it would be necessary to reverse engineer the intcode, so i wasn't going to waste time on it
 
10:37 PM
@ngn Yeah, I'm planning on skipping the inevitable intcode reverse engineering challenge
 

« first day (1052 days earlier)      last day (1610 days later) »