5 ms·
For more info: https://mlochbaum.github.io/BQN/doc/quick.html https://mlochbaum.github.io/BQN/doc/quick.html BQN is an array language similar to APL, it has 2
by alexisread 3y ago
For more info:
https://mlochbaum.github.io/BQN/doc/quick.html https://mlochbaum.github.io/BQN/doc/quick.html
BQN is an array language similar to APL, it has 2 VM runtimes, one in javascript (for this engine) and one in C.
BQN stands for Big Query Notation language, but is a play on being better than APL -> BQN
- ithkuil 3y agoUnfortunately (missed opportunity): "APL"+1 "BQM"
- hoosieree 3y ago"Big Questions Mnotation" The retcon is that it's not "APL"+1, but "APL"+Fibonacci.
- Avshalom 3y ago'Mnemonic' almost makes sense, you could even leave it as BQN and claim the m is silent.
- ithkuil 3y ago"APL"+{⊑(+`⌽)⍟𝕩 1‿1}¨↕3 "BQN" (https://bqnpad.mechanize.systems/s?bqn=eyJkb2MiOiIjIFdlbGNvbWUgdG8gQlFOIChodHRwczovL21sb2NoYmF1bS5naXRodWIuaW8vQlFOLykgUkVQTCFcbiNcbiMgSG93IHRvIGVudGVyIEJRTiBnbHlwaHM6XG4jIC0gVXNlIGdseXBoIGJhciBhdCB0aGUgdG9wXG4jIC0gVXNlICdcXCctcHJlZml4IHRvIGVudGVyIGdseXBocyBmcm9tIGtleWJvYXJkLlxuIyAtIFByZXNzICdUYWInIGZvciBjb21wbGV0aW9uc1xuIyBcbiMgRXhwcmVzc2lvbnMgYXJlIGJlaW5nIGV2YWx1YXRlZCBhcyB5b3UgdHlwZS4gUHJlc3MgJ1NoaWZ0K0VudGVyJ1xuIyB0byBjcmVhdGUgYSBuZXcgY2VsbCAodGhlIGN1cnJlbnQgY29kZSBpcyBiZWluZyBwcmVzZXJ2ZWQgaW4gdGhlXG4jIHdvcmtzcGFjZSBoaXN0b3J5KS5cbiNcbiMgSGF2ZSBmdW4hXG5cblwiQVBMXCIre%2BKKkSgrYOKMvSnijZ%2FwnZWpIDHigL8xfcKo4oaVMyIsInByZXZTZXNzaW9ucyI6W10sImN1cnJlbnRTZXNzaW9uIjp7ImNlbGxzIjpbXSwiY3JlYXRlZEF0IjoxNjgzOTA2NTc4NDczfSwiY3VycmVudENlbGwiOnsiZnJvbSI6MCwidG8iOjM5NiwicmVzdWx0IjpudWxsfX0%3D https://bqnpad.mechanize.systems/s?bqn=eyJkb2MiOiIjIFdlbGNvb...)
- teddyh 3y agoPython: "".join(chr(ord(c)+1) for c in "APL") → 'BQM'
- ithkuil 3y agoThe comment you're replying to is the BQN code that adds a Fibonacci number to each letter of the "APL" string. You're python code is spelled just "APL"+1 in BQN. Array languages implicitly so a "foreach" when there is a scalar operand
- teddyh 3y ago> * The comment you're replying to is the BQN code that adds a Fibonacci number to each letter of the "APL" string.* Oh, right. > [Your] python code is spelled just "APL"+1 in BQN. Apparently APL has very weak typing, if "A"+1 is "B".
- dzaima 3y agoAPL doesn't do this character arithmetic; BQN does. But it's not weak typing, it's an intentionally designed feature[0]; so things like "a"+1.2 or "a"+"b" error. It's quite useful too - you can add the null character to a number (or list of numbers) to convert code points to respective characters (or subtract to do the inverse). Or do things like '0'+x to convert a list of numbers to a string of digits (and x-'0' for the inverse); or 'a'+↕26 (↕26 being a list of the numbers 0…25) to generate the alphabet. (it's the same logic that's behind any language with pointers - you can add a number to a pointer, subtract a number from a pointer, and subtract two pointers to get a number) [0]: https://mlochbaum.github.io/BQN/doc/arithmetic.html#character-arithmetic https://mlochbaum.github.io/BQN/doc/arithmetic.html#characte...
- ithkuil 3y agoWell said. Your average "very weakly" typed language will happily do "APL"+1 == "APL1"
- mlajtos 3y agoBrain Quotient Measure Best Quality Marshall Bizarrely Quirky Matrices
- suskeyhose 3y agoIt was intended to be this but it was only after the name was established that the author realized that N doesn't come after L.
- dzaima 3y agoBQNPAD can also use CBQN via the VM dropdown at the top right (but CBQN doesn't support live previewing unlike BQN.js). Also, "Big Questions Notation", not "Query". Not that it matters much.