I managed to build GNU APL for my android phone running under Termux which is Debian-based. However the only app claiming to offer an APL keyboard is very out-of-date and doesn't seem to work on modern Android. Does anyone know of a way to input APL on recent Android versions?
@Adám !! Hacker's Keyboard, Oh! I think I'd tried that on Android for other purposes in past times; I didn't know it might have an APL mode, amazing! I'll try that thank you.
@Russtopia I personally use the 5-row compact layout for portrait (but 5-row full on landscape). Needs expanding to 6th row (gestures→swipe up→toggle extension row) to get all APL chars, but I find it to be more comfortable. (also doesn't work for non-latin langs, i so wish 5-row compact was supported for everything; you may also want to turn down the long-press duration, or enable hints (theme and label setings→laballed alternative keys→all))
(also might be time to add BQN to it? i've been annoyed at my lack of ability to easily write BQN on phone a couple times)
@nathanrogers I just symlink everything into the folders of the same name in ~/.vim, and I have a line au! BufRead,BufNewFile *.bqn setf bqn in filetype.vim. If that's not enough, does :set keymap=bqn work?
@nathanrogers Good, I'll add that to the editors README then. FYI I also have a line au! BufRead,BufNewFile * if getline(1) =~ '^#!.*bqn$' | setf bqn | endif for shell scripts.
@nathanrogers That should be set by the ftplugin script, at least when editing a BQN file. Did you link that one? I wonder if there's something you have to do to enable it.
You could do git clone https://github.com/mlochbaum/Music.git && cd Music && git clone https://github.com/mlochbaum/BQNoise.git and then run ./g.bqn and end up with some music in /tmp/loop.wav.
@Marshall it would be useful in the language bar hover popup to have a link to that thing
for instance, I'm trying to just •1 + 2 and its blowing up and I don't know why, so seeing an example would be helpful but I'm not able to track down • in the docs very easily
@nathanrogers The documentation isn't structured so I can coherently link to a glyph (which might be two primitives) right now. I'll make some pages for that eventually.
@dzaima I have trouble with it since I often want a function I can insert in trains or with Over to display both arguments, so I end up writing {•←𝕩} a lot. Another pattern I end up needing is to display a property of some value but return the original value, like {•←Fn𝕩⋄𝕩}.
If those were •P and •_q I think I'd find debugging more convenient.
Maybe the rule should be that • just sticks to the next token (not actually sure how dzaima/BQN handles it), in which case you could have something like •> for a print function.
@Marshall though this is not how it's implemented (though it could/should be), • can be thought of as any other •name, just that it happens to have 0 characters
functions start with an uppercase character, 1-modifiers (aka monadic operators) start with an underscope, 2-modifiers (aka dyadic operators) start and end with an underscore
relying on the form of the name is like... having our kindergarten teaching rap you over your knuckles, or your mom nitpick you for not putting that thing YOURE STILL using "WHERE IT BELONGS"
its like a nanny watching everything you do saying "now, NATHAN, what did we say about your capticalization?"
if I give you F a G b, you know that that's invoking F monadically on the result of G called dyadically on a and b. In APL you couldn't tell anything about that expression
@nathanrogers you know what to assign, so what's the problem with naming it? since BQN stores variables case-insensitively, it won't matter anyway, and you now have an extra place to make sure your intent is checked
@nathanrogers you definitely won't get anyone to remove case requirements in BQN. Otherwise BQN couldn't be statically parsed, compiled, etc, and some things would be an order of magnitude slower
@nathanrogers I just don't understand why you're so disgusted by being forced to use specific case, but are just fine with being forced down the fact that ←must be assignment, that ÷must be division, that (must start an expression grouping, etc. These really aren't different restrictions at all
@nathanrogers and you also need a way to distinguish functions, values, modifiers. Maybe not as much, but knowing that namespace.Fn x will always always always invoke a function with the argument x is pretty damn useful
it's all just compromises anyway. I believe the requirements on casing are well worth the positive effects it brings on the language. If you don't, you can go back to APL :)
like, I'll always prefer lisp names and scheme conventions for boolean names, but I can't use - or ? in names, and I get why, but I still prefer true? to is_true
if you removed variable name caing from BQN, you'd get back pretty much precisely APL, just with different glyphs for things. (you'd also lose first-class functions which you like, among many other things)
@nathanrogers I didn't think you were overly serious, but there's really no other way to respond other than maybe "get out of here you weirdo with your weird opinions!"
@dzaima (but even that's not really correct as i do agree with the idea that forcing case isn't nice)
@Adám (and no user-defined modifiers/operators (no way to extend the language with any similarity to it) and different trains (APL-style ones would become harder to use))
And one for all the keyboarders out there:: has anyone ever tried this? keyman.com/developer. looks interesting, I might explore - unless someone has already looked into it...
@MBaas I've installed it, but was dismayed at it requiring the recipient of a kbd layout to have the app installed. MSKLC creates true Windows keyboards.
guy steele had an excellent presentation on that, "growing a language", and pointed at apl as an example of a language where extensions look very different from builtins
that's in contrast to lisp being a "ball of mud" (you add more mud to it - it still looks like a ball of mud)
CMC: fully functional, v1.0+ pattern matching, extensible, notational array programming language with modern scripting features, and fully featured FFI and library ecosystem which doesn't force naming conventions!
@nathanrogers Most functions are square; it's 2-modifiers that are circles. ⊃ and so on conflict with the mathematical set functions, which could be wanted in an extension of BQN with sets (but I don't think I'll make such an extension).
@dzaima Do you think it makes sense to use •SLine, •SChar, and •SByte for reading and writing stdin and other streams incrementally, in analogy with the file functions? The stream is 𝕩, and to output use 𝕨. This could cover sockets and reading files with offsets, with the appropriate stream-creation functions. For stdin and stdout we could just use the UNIX file descriptor numbers (these should work for whole-file functions too).
@nathanrogers Easiest way is probably to see if you can get your editor to display double-struck characters as bold ones?
fontforge should also allow relatively easily copying characters around with just ctrl+c/ctrl+v i believe (not quite sure about cross-font copying, as you'd probably need to do that for bold)
@dzaima (if you wanted to do everything, you'd even probably want a way to read everything currently in buffers too, possibly limited with some max length)
@dzaima So technically none of the output left arguments are numbers but it's probably best to split input and output up, so the input functions have an optional left argument number. I and O are the obvious characters then I guess.
@Marshall yeah, overloading doesn't really work. 2•SBytes 0 vs ⟨2⟩•SBytes 0 for read vs write is weird. (personally i'd prefer R/W, i've gotten Java's Input/OutputStreams the wrong way around way too many times (read: every time))
blank cells, cells that don't change, i'll type something like x + 2, and a new 2 will appear with a "null cell" like nothing in it adjacent to the x, that never goes away until I exit the editor
if it doesn't load by default, it messes up the buffer, and I have to open a new one. but then reopening the old buffer loads it as utf-8 again... having a way to open it with the correct encoding when in bqn-mode would be super useful
Hey, have a question about the @ operator. When the right operand is a function, that function is used to select indices of the right argument to operate upon. For array operations, are those indices always treated as a vector?
For example, try evaling ⌽@(2∘|) 4 5⍴⍳20
The odd numbers are reversed as though they were a vector and not a matrix
@Marshall @dzaima false alarm. saving the file with the new encoding reduces the fuckery, but its still making lines disappear, duplicating lines, putting characters in wierd places
@Marshall vim doesn't seem to have this problem apparently its just with emacs. so I'll just stick with vim then
it wasn't the terminal, microsoft terminal is the only one which displays all the characters . Scrolling through fifty.bqn it seems to work fine with vim. It's an emacs and file encoding thing
doesn't work with tmux open htough
just vim
If something happens with that vs-code version, I'm interested