That's me! It's a pretty exciting time for BQN because I've just put the self-hosted version online where you can try it out. In addition to exploring a lot of new APL ideas[0], BQN is also a test of the Co-dfns[1] approach to compilation, meaning that with an appropriate runtime the entire bytecode compiler could be run in parallel on a GPU. It's still in proof-of-concept stage, so that the online compiler is very slow and one running on dzaima/BQN, another implementation, compiles only about as fast as Go despite having a lot less features. However, having written several thousand lines of BQN I'm very happy with the language's fundamentals, and I feel it's a big advance over APL or J.<p>[0] <a href="https://mlochbaum.github.io/BQN/doc/index.html" rel="nofollow">https://mlochbaum.github.io/BQN/doc/index.html</a><p>[1] <a href="https://mlochbaum.github.io/BQN/implementation/codfns.html" rel="nofollow">https://mlochbaum.github.io/BQN/implementation/codfns.html</a>
> The Javascript-based compiler[1] is also slow [...] this is purely due to the slow runtime<p>Top-level functions are defined with 'let'. I wonder if 'const' is more likely to be inlined?<p>Array's are given a flag property 'sh'. I wonder if adding a property to an Array drops it off Array operation fast paths? Perhaps interferes with its optimization on element kinds?<p>Functions are given a flag property 'm1' xor 'm2'. So shape polymorphism, different hidden classes, and associated burden on inline caches at call sites, property accesses, etc. Better to always set both. I wonder if adding any property to a function drops it off function call fast paths? Or interferes with inlining? Perhaps these flags might be avoided using 'Function.length'?<p>I wonder if there's some low-hanging performance fruit here.<p>[1] <a href="https://github.com/mlochbaum/BQN/blob/master/docs/bqn.js" rel="nofollow">https://github.com/mlochbaum/BQN/blob/master/docs/bqn.js</a>
Hey Marshall,<p>Do you still work at Dyalog? Is this just a personal hobby project?<p>Why choose JS or Go as implementation languages if you're already quite familiar with C? I guess web browser support is neat, but what I've always really wanted was a single executable (no install) that can run as a REPL or build self-contained executables that bundle the code and interpreter. I think that could be pretty useful. I know J exists, but it is a huge install.
Awesome work! Hopefully array languages will undergo a renaissance!<p>One thing is that even after reading running.md, I'm still kind of confused about how to actually run BQN. Maybe provide an easy way to get started with the self-hosted bytecode compiler? Or maybe there is an easy way, but I'm just stupid.