Big Question Notation

Recently, I've been enamoured with a language called BQN. I've started a bit of leg-work to add some of the tooling support I want to have for a language that I use, which should be finished soon. But then, I will have another language in my toolbox to help put thoughts into a computer. And so, I wanted to briefly talk about this one here.

What is BQN?

Life←{
   r←¯1(⌽⎉1)¯1⌽(2+≢𝕩)↑𝕩
   s←∨´ (1∾<r) ∧ 3‿4 = <+´⥊ ¯1‿0‿1 (⌽⎉1)⌜ ¯1‿0‿1 ⌽⌜ <r
   1(↓⎉1) ¯1(↓⎉1) 1↓ ¯1↓s
}
 
blinker←>⟨0‿0‿0,1‿1‿1,0‿0‿0⟩
(<".#") ⊏¨˜  Life⍟(↕3) blinker

BQN is an Array Programming[1] language in the style of Iverson and APL, but with a few crucial differences that make it interesting and important to me:

  1. It is a current-day language, created within the last decade[2] or so. This means a few things are true: Unicode Support[3] is baked in. So are first-class functions and combinators(from Functional Programming), and namespaces and classes(from Object Oriented Programming). And a pretty-active-for-its-size community of people online contributing, discussing, and using the language.
  2. It is built on a lot of prior experience. It supports both the based array and leading axis models. It has a context-free grammar that makes it easily understandable and interpretable. And it adds both anonymous functions, higher-order functions, and trains to the mix, allowing for very succint and elegantly combined code.
  3. It is defined in itself (not metacircular[4]), and can be built from source with a realtively simple[5] dependency tree.
  4. Everything so has been released under an FSDG-compatible license (either ISC, expat, or GPLv3). This is vital for me, as I don't want to waste my time learning proprietary software more than I have to.

This all makes for a language I am very excited to learn how to use, and one that will fit well for my needs[6] going forward.

Where I Am Currently

Flip ← {m←2|+⌜˜↕≠𝕩 ⋄ (⍉𝕩׬m)+𝕩×m}
Zz   ← {Flip ⍋∘⍋⌾⥊+⌜˜↕𝕩}

Right now, I am still learning the basics of the language.

I have the tools installed, I just need to actually learn to use them. There is always a period at the beginning of learning a new language where easy things are difficult and difficult things seem impossible. I wouldn't necessarily say I am there, but I would say I am not far from it.

One thing I have noticed is there does not seem to be a way to do multi-line definitions (like in the Life Example above) inside of the REPL. I'll need to get clarity on that, because that limitation will make my approach different (I'll need to pass files instead of strings to a repl, for instance).

Either way, I am excited to begin climbing this mountain! I'm certain I will learn a lot!


[1]: My goal when looking at new languages is to expand my mind in some way. The second-to-last thing I want to spend my time doing is learning 20 different flavors of C-style notation (the last thing is using any language with significant whitespace, ugh). I have dabbled with APL in the past, but I've never truly grokked Array Programming, and I'm looking forward to doing so with BQN.

[2]: The earliest commit in the specification repo is from 2020, and the earliest commit in the repo it grew out of is from 2011.

[3]: It is 2022, and I use unicode every day for one thing or another. I don't fault older languages for their limitations, but I'd rather learn those that support at least UTF-8 at this point

[4]: As mentioned in the link, metacircular doesn't mean 'Defined in Itself'. It refers to a system of circular evaluation used in certain contexts to mutually recurse. From what I can see, BQN doesn't do that (at least not yet).

[5]: JDK7+ → dbqn → bqn bytecode → cbqn for bootstrapping → singeli for bootstrapping → cbqn

[6]: My long-term goal is to build up my own set of languages (sort of like was recommended by Eric S. Raymond), but instead of those recommendations they will be: A Lisp, An Object-Oriented Language, a Scripting Language, a Web Language, an Array Language, and a Logic Language. This could turn into its own post, so I'll leave it there… I just want to have a clear set of tools to reach for in differrent situations, basically.