« first day (1509 days earlier)      last day (1442 days later) » 

03:02
Document on OOP in BQN is up! Probably missing some topics; please ask. @rak1507 @Razetime
03:39
thank you, this looks good
 
1 hour later…
04:51
@Marshall sure! will do.
 
3 hours later…
07:43
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?
08:02
@Russtopia There's also APL Keys (which I should add to the wiki…)
@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.
08:22
@Adám Yes! Bit of a pain to set up but 5-row layout is working like a charm. \o/ Yay
@Marshall how do I install the vim plugin?
I've got the syntax highlighing, but not the \prefix
 
3 hours later…
11:08
@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)
tried making a dyadic function in BQN: mlochbaum.github.io/BQN/…
what am i doing wrong?
@Razetime functions need to be named with an uppercase 1st letter
Name regulations grr
12:17
@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?
 
3 hours later…
15:18
@Marshall yes that works thank you!
15:37
@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.
I had to put set keymap=bqn in the rc
@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.
Possibly filetype plugin on in .vimrc.
@dzaima I added the /bin/dbqn file with the correct path, trying to run the script and get permission denied
@nathanrogers Erm chmod a+x it?
i did chmod
maybe the relative path doesn't work for bin files
15:50
@nathanrogers What's the exact error message? Double check the /path/to part as well, I guess.
@nathanrogers the bin/dbqn file must have a full absolute path to the jar
@nathanrogers It would be relative to the current directory, not to where the script file's located, so it mostly won't work.
nah permission denied
/home/ndr/bqn/BQN.jar
didn't work maybe need to restart terminal
@nathanrogers are you just running that in the terminal? cause that's not gonna work
no I'm not running that
I set that as my path in /bin/dbqn
now I put #!/usr/bin/env dbqn in a .bqn file, chmod x, nope, chmod a+x, "permission denied" both times
15:54
@nathanrogers have you chmod-ed the bqn/dbqn file itself?
oh, no I didn't
what is the "print" glyph?
just with the keyboard want to test its working now
@nathanrogers ? \0
well its blowing up, so I guess that means its working
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.
keyboard map?
16:05
@nathanrogers You mean this one?
You can also hover over a key in the online REPL's language bar if you forget one.
@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.
@nathanrogers isn't documented, although there is a draft spec for some of it. dzaima/BQN uses •← like APL's ⎕←, but I don't like this syntax.
rgr
yay! ran my first bacon
can I use APL keyboard for symbols where they're reused?
or are the glyphs different?
16:14
@nathanrogers most things re rearranged
I had a bug once took me 2 days to find because I used the gnu apl keyboard for ⋄ rather than the dyalog keyboard
@dzaima I see they're rearranged but I'm asking if they're the same versions of the unicode glyphs
@nathanrogers Dyalog and BQN use the same ones afaik
@nathanrogers Common glyphs are the same as the "normal" Dyalog ones except , which is a real star and not an asterisk.
@Marshall I just like the fact that it can be inserted anywhere without spaces, and since it pretty-prints, it's supposed to be for debug only anyway
16:19
@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.
huh, i completely forgot that •←3⊸+ is invalid
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 would be nice if that wouldn't require 2 builtins. {Fn}•P would be an alternative, but it's ugly
@dzaima Fn˙⊸•P is maybe better until you need parentheses.
@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
16:27
•⊢ is kind of nice.
cannot assign with different types?
Maybe •` for print modifier but that's completely ad hoc.
@nathanrogers i'd guess you're doing something like f←{𝕩}. BQN has case-sensitive names and so functions must start with an uppercase letter
16:30
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
woof
seems you got your capitalization rules backwards
@nathanrogers Only relative to German.
Jane runs, nouns can and often are proper, while verbs are only capitalized at the begninning of a sentence
you do stuff, but Bob's your Uncle
The most straightforward code just assigns subjects. I think it makes the most sense for this to use lowercase letters as it's less noisy.
or, different parsing rules?
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?"
16:37
@nathanrogers The form of the name isn't some peripheral information you have to get "right". It's how you tell BQN how you intend to use it.
no I get it you're using it for type information
You can take a variable containing a function and pass it as an argument by spelling it lowercase.
@nathanrogers Role, not type.
yeah if its enforced by the interpreter, I don't care what you call it
Type is a property of a value; role is a property of an expression.
@nathanrogers the only place it's enforced in is assignment
16:38
which is... where you assign your name... right
Which has saved me from a fair amount of debugging, since it tells you when you think you just defined a function but didn't actually.
no operator precedence rules, but but don't you worry, lots of other rules to memorize and follow
@nathanrogers all you have to do extra is know what type of thing you want to assign. Everything else becomes easier
I don't want to do anything extra, if I the writer know what I want to assign, it shouldn't matter what the name is. is all I'm saying
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
16:41
name should never be forced
style guidelines, fine
but enforced, nuh uh
i even hate pythons _ and __ rules
just have an init, and its resreved
no need for __init__ that's stupid
@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
@dzaima the problem isn't in naming it, the problem is that Im' forced to name it a certain way
its like... orwellian, compelled speech type shit
you're not going to change my mind
I intend to give it a fair shake
@nathanrogers you're also forced to use to assign, which is the same level of "forcedness" as the case of the name
but I'm telling you right now, I'll rail about it from henceforth
no that is assignement. there must be a means of assignment
but what I'm assigning, that isn't even up to me
@nathanrogers and an uppercase name means that there must be function assignment. Not any different
16:45
right
but I don't name my functions upcase
so fuck me I guess
fuck john scholes too I guess
and his code is cleaner than anyone I've ever seen
"code should read like good prose" or something, but if I can't even choose my words
that's dumb
@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
I mean like I said
I'll give it a fair shake
but I feel violated, like I'm being nannied
i really don't like it
@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
because syntax must exist, but the words and how their formed are up to the author
like fucking obviously I need a way to assign and divide
@nathanrogers well, part of words has now become syntax
16:49
but how I name is a way for me to define my own language ovre a problem space
@dzaima which is fucking retarded, imo
I mean, I get why
but also, I resent it
@nathanrogers In BQN uppercasing and underscores are part of syntax. Which is... actually the exact same as natural languages?
written word isn't programming
@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
@dzaima I'm not arguing that it is or isn't effective
but that I fucking hate it, yeah that's what I'm arguing
its like, being followed around by the literal guy
@nathanrogers well, if you come up with anything at all acceptable while keeping static parseability, report back to us pretty please
16:53
taste, preference, style, have no bearing on effectiveness. I just think its pedantic
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)
it just became clear to me that you might think I'm being overly seirous
I think its funny. And its meant to be taken in good humor.
@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)
17:01
i don't think this is a particularly wierd opinion, I think its wierd having name enforcement
still, feels nice to have ran my first program :D
17:46
@dzaima k
@rak1507 So you think enforced naming convention is worse than the lack of user-defined infix functions?
Fair enough. To each, their own.
I do miss user defined infix functions in k though, you're right that they're nice to have
@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))
17:54
Hi @Bubbler, I have a q4u ;)
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...
@dzaima Ah, true.
@dzaima idk what you mean about operators, you can do higher order functions (and then get 'hyperators' etc for free too)
@rak1507 but not with the same syntax, and we're primarily discussing syntax here
oh, fair enough
@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.
18:03
@dzaima (if you ignore the syntax difference, might as well go with lisp syntax :) )
@dzaima That's what K does.
@Adám well it does have verbs and adverbs
Ah, true, the adverbs and built-in operators (?) are unusual for Lisp, but all user-defined functions are basically forced to List syntax.
@Adám Ah, ok - that rules it out, indeed :(
@MBaas Do you know that MSKLC's source files are simple human readable text files? You can easily write code that generates/modifies (part of) them.
18:12
have you ever made a keyboard layout generator in APL?
Me? No. Should be easy if target is .klc format.
@rak1507 Not a bad idea. Feed national language layout, then choose shifting or prefix key, and we'll add the assignments for you.
having the ability to customise the kb layout when dyalog is installed would be great
18:29
We probably can't build the keyboard without MSKLC, though.
ngn
ngn
19:09
@rak1507 infix (own extension)
I knew about that but that doesn't work for more than 1 character right?
ngn
ngn
@rak1507 right
so I didn't think people here would see that as valid
ngn
ngn
@rak1507 apl's user defined functions and operators can't use unicode chars, right?
no :(
ngn
ngn
19:12
so that's not much of a smooth extension to the language either
agreed
ngn
ngn
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: given a vector, take the square indexes from it, so indices 1, 4, 9, 16, ...
@rak1507 Is the vector guaranteed to have square length? Also, ⎕IO←1, I presume?
yes, guaranteed, and any suitable ⎕IO←0 modification is fine too (0, 1, 4, 9...) maybe
I don't have a solution to this I was just doing something similar a moment ago and wondered about it
19:28
It's a straightforward 7 in BQN, with index origin 0 of course.
@Marshall The equivalent in a suitably extended APL would be 8.
@ngn heh, replace "is uppercase" with "is unicode" in BQNs case system and you get that :) (ignoring the length 1 restriction of course)
hmm, can anyone think of a way of approximating pi where you can do f\a and get a list of approximations?
ngn
ngn
@dzaima that wouldn't go down well with actual k users
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!
19:39
@rak1507 -\4÷1+2×⍳
ngn
ngn
@nathanrogers naming conventions xor static parsability - can't have both
@rak1507 Lots of approximations here. The simplified Leibniz +/*/\2,%2+%>:i.60 should do what you want, and is pretty accurate.
@nathanrogers i assume you have a solution to the stated problem
@ktye BQN*+/ J K (APL-tradfns-i/o-⎕IO)
@Marshall BQN translation. Should be +\×\2,÷2+÷1+⍳60 in APL.
19:41
thanks @Adám and @Marshall
@Marshall looks like that'll do the trick, seems pretty fast converging
@kyte my solution doesn't work for function syntax, I forgot (J-'variable assignment'-verb define-'inline function definitions')
ngn
ngn
@Marshall nice
19:56
@Marshall @dzaima any i/o?
I'm assuming \0 but how?
@nathanrogers File functions here. There's also •Sh for the shell, which I haven't used.
great thanks. Also, what was the rationale for the boxy versions of ⊃? For me it breaks up the flow with the other rounded glyphs
@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).
@Marshall yeah I can see that, fair enough
@Marshall any intentions to invest in a full font? some of the glyphs are super thin and small, hard to see and differentiate
20:11
oh nice
that fairfax is slick
Any chance at useing true bold instead of double struck special signifiers like FGxw, without whitspace they make me go crosseyed
@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?
@Marshall as specified, for bytewise data that only allows reading one at a time, which is pretty suboptimal for files
There's probably some command-line tool that could move characters around in a ttf too but I don't know what it would be.
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 There are mathematical bold characters, although the font has to support them.
I guess you only have to copy 11 characters over (𝕊𝕏𝕎𝔽𝔾𝕤𝕩𝕨𝕗𝕘𝕣) so fontforge isn't that bad.
20:23
@dzaima really read & write should be different operations
@dzaima So you'd want to read a specified number of bytes? I guess you could optimize •SByte¨n⥊<fd but that's definitely precarious.
@Marshall does the emacs input mode work?
because I know how to replace symbols there
@nathanrogers See the comments at the top of bqn-mode.el. A little better than the Vim one actually.
@Marshall I imagine you'd do batch reads in most cases you're reading by bytes, so it's a pretty important thing to have
@Marshall Do I remember correctly that for performance, you recommended 1⊥ for +⌿ during a User Meeting presentation?
20:29
@Adám Your memory matches mine. Only in cases where performance is very important of course.
@Marshall Do you remember where?
@Adám Should be the one on reduction. A little more than halfway through?
@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 do I put the .el files in /.emacs.d/bundle ? or ...?
20:35
@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))
@nathanrogers Same instructions as gnu-apl-mode. I should copy them over.
The files can go anywhere.
And the M-x gnu-apl thing doesn't apply: it's for language-server type stuff.
(add-to-list 'load-path "~/BQN/editors/emacs")
(require 'bqn-mode)
?
@nathanrogers That looks the same as mine.
works for me thanks!
idk if its my font or windows terminal, but there's a lot of jank happening when I input the double struck characters
@dzaima another option would be to have steams be namespaces with functions to read/write
@nathanrogers it might not like that they don't fit in a single UTF-16 character
20:42
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
even when scrolling
if that's for double-strucks, and double-strucks only, it probably is UTF-16 issues
@dzaima Yes, that's probably better.
@Marshall @dzaima what terminal do you use?
are you windows with WSL or linux?
I'll switch to conemu and try there. windows terminal (not cmd) having issues, can't seem to find anything about utf16 support
@nathanrogers This st fork, which I don't recommend.
@Marshall for the record, conemu doesn't support those characters whatsoever
terminal looks like the best option :/
even with the fonts installed, the just appear as strange junk in regular cmd or conemu
20:56
@nathanrogers It's going to stop being the 90s any day now, I'm sure of it...
the microsoft terminal is nice I use it primarily... no problem with APL characters
@nathanrogers APL characters don't need UTF-16 surrogate pairs, but double-strucks do
e.g. see "⍵"‿"𝕩"-@ in dzaima/BQN (x-@ being pretty much ⎕UCS except UTF-16)
I can probably use vs code without issue
I have a few unicode addons
so I know it displays properly at least
even running vscode from wsl doesn't trigger file changes though so breaks the workflow :C
Speaking of which... @Razetime what's the status of vscode BQN support? Is it useful yet? Should I link to it?
21:23
Yeah I'm not sure how to proceed. Looks like unicode is jank with unicode
I might try windows emacs
HAHA Cool Retro Term shows the characters just fine :D
lololooooooool
@Marshall
@nathanrogers It stopped being the 90s! Just not in the direction I expected!
lol
cool retro term has a pain in the ass setup for windows
but once its working, its pretty nifty
most of the fonts show the characters, I'll paste in the lot of them and see if they all work
there is some wierdness with multiple glyps, it seems to expand and contract as you scroll over them
@nathanrogers Pretty likely to be a fallback font with different metrics.
eespecially if they're joined closely together
Looks like the built-in 3270 version is pretty old and won't have the characters. Unlikely anything else does either.
21:34
Oh dude, hermit works too
works best if there's spaces between the glyphs though
:c
is whitespace significant in BQN @Marshall
@nathanrogers Only newlines, assuming we mean after tokenization.
I mean for typing
can I add spaces between glyphs?
if so this should do me fine for now
@nathanrogers yeah. Nothing weird like in k
Can't you set a font that's installed separately? That should fix fallback issues, if you use one with full BQN support.
this looks fine for typing and reading, but editing is jank
letters disappear and its hard to tell where they are without significant whitespace
I don't think you can install fonts because its gpu rendered I think
21:44
It's clearly falling back to a proportional font for 𝕎, and probably a lot of other characters too.
Can you find app/qml/fonts/1971-ibm-3278/3270Medium.ttf? I'd imagine you can just swap in a recent version of 3270 (or any other font).
Looks like ubuntu-terminal-app also uses qmltermwidget.
I guess that's this thing?
i found the fonts
i'll try adding one
@Marshall that's just the ubuntu wsl app
if you launch that app it uses cmd as the terminal emulator
which doesn't have support for unicode
someone showed zsh with wsl
I tried it and couldn't get it to work correctly as they showed
well I placed the font there, nothing new. I'll probably have to build it again
22:00
@dzaima (another pseudo-problem - interleaving byte and line reads is very funky, and seems mostly impossible while staying sane in java)
22:47
@Marshall @dzaima c-x RET f
emacs can select encodings, it may be an emacs settin
can you check that list and suggest which utf-16 famliy to use?
@MBaas Hi. If you have a q for me, just leave it here so I can check later.
@dzaima @Marshall ^^^ microsoft terminal with setting the encoding works
23:04
I can't find how to add it to init.el
so it loads by default
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
@phantomics Yes, from dyalog docs:
> Note that the ravel of the mask selects from the ravel of the right argument's index array.
@Bubbler Makes sense, thanks
If you want to reverse the odd numbers on each row separately, ⌽@(2∘|)⍤1 might work
23:19
It does
Nice.
@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
ngn
ngn
23:53
@nathanrogers tip: try f1 and move around the bqn file
for emacs?
ngn
ngn
@nathanrogers vim
@ngn f1 is just the main help file for vim
ngn
ngn
@nathanrogers are you using the bqn plugin for vim?
yes
can I try to manually set something?
I can input characters just fine
ngn
ngn
23:59
this line should have worked..

« first day (1509 days earlier)      last day (1442 days later) »