Remote-Url: https://mlochbaum.github.io/BQN/ Retrieved-at: 2022-03-31 18:40:27.016848+00:00 documentation•specification•tutorials•implementation•communityTry it online below (arrow at the right for more samples and shift-enter to run), onthis page, orin our chat. UseCBQNoffline; detailshere.<⟜'a'⊸/ "Big Questions Notation""B Q N"Looking for a modern, powerful language centered on Ken Iverson's array programming paradigm? BQNnow provides:A simple, consistent, andstablearray programming languageA low-dependency C implementation using bytecode compilation:installationSystem functionsfor common math, file, and IO operationsDocumentation with examples, visuals, explanations, and rationale for featuresReplace or extend primitives to make aBQN-like languagesuited for specialized domainsBQNwill provide:State of the art array performance: takes some time, but I developed many of Dyalog APL's current algorithms and know we'll get thereInterfaces to connect with other languages, like a C FFI and JSON and CSV toolsA standard system to install and use libraries and packages, and support for package managersAt present, I think BQN is a good choice for learning array programming, scripting, medium-scale (fits in RAM) number crunching, and recreational programming. For some examples of BQN in action, this repository holds the dreadedself-hosted compilerand the friendliermarkdown processorused to generate the site. See also my scripts atbqn-libs, thisgnuplot interface, examples onRosettaCode, or something else from thecommunitypage.It's three letters, that happen to match the capitals in "Big Questions Notation". You can pronounce it "bacon", but are advised to avoid this unless there's puns.BQN aims to remove irregular and burdensome aspects of the APL tradition, and put the great ideas on a firmer footing. It maintains many of the ideas that made APL\360 revolutionary in 1966:It incorporates concepts developed over years of APL practice:But it's redesigned from the ground up, with many features new to the array paradigm:Not sold? Seewhy BQN?for an outline of what all these features add up to in terms of programming power.Right at the beginning, you can use the bar above the online REPL to enter BQN code: hover over a character to see a short description, and click to insert it into the editor. But you'll soon want to skip the clicking and use keyboard input. I type the special characters using a backslash escape, so that, for example, typing\thenzwrites⥊(the backslash character itself is not used by BQN). The online REPL supports this method out of the box, and theeditor pluginsinclude or link to ways to enable it for editors, browsers, shells, and so on.Thefont comparison pageshows several fonts that support BQN (including the one used on this site, BQN386). Most other monospace fonts are missing some BQN characters, such as double-struck letters𝕨,𝕩and so on, which will cause these characters to be rendered with a fallback font and possibly have the wrong width or look inconsistent. The double-struck characters also require two bytes in UTF-16, which breaks rendering in many Windows terminals. If you have this problem, VS Code andwsl-terminalwith an appropriate font definitely support them.Chat forum links below; either of the bold ones will open in a browser without much hassle if you just want to get on quickly. Further forum detailshere.DiscordMatrix…in ElementAll roomsInvite#array:matrix.orgSpaceBQN room#bqn:matrix.orgRoomDiscordis a popular commercial chat client and Element is a similar UI for the open chat protocolMatrix. They're bridged together so that messages in one appear in the other. Most discussion happens on these (they're quite active), but see also thecommunitypage for activities and such in other places.Also feel free to contact me personally via Github issues or with the email address shown in my Github profile.The documentation still has some pages missing (not many now), while the tutorials are probably less than half complete. I don't think this is much of an impediment any more. Ask about anything you find confusing on the forums.BQN'stutorialsare intended as an introduction to array programming with BQN. They assume only knowledge of elementary mathematics, but will probably be hard to follow if you havenoprogramming experience. BQN has a lot in common with dynamically-typed functional languages like Lisp, Julia, or Javascript, so knowledge of these languages will be particularly helpful. The tutorials end abruptly right now, so you'll have to switch to the documentation, which is less structured.If you're already an array programmer, you might start with thedocumentationright away, using theBQN-Dyalog APLorBQN-Jdictionary as a quick reference where appropriate. Be aware of two key differences between BQN and existing array languages beyond just the changes ofprimitives—if these differences don't seem important to you then you don't understand them! BQN'sbased array modelis different from both a flat array model like J and a nested one like APL2, Dyalog, or GNU APL in that it has true non-array values (plain numbers and characters) that are different from depth-0 scalars. BQN also usessyntactic rolesrather than dynamic type to determine how values interact, that is, what's an argument or operand and so on. This system, along with lexical closures, means BQN fully supports Lisp-stylefunctional programming.A useful tool for both beginners and experienced users isBQNcrate, a searchable collection of BQN snippets to solve particular tasks. If you have a question about how you might approach a problem, give it a try by typing in a relevant keyword or two.