Online REPL lacks header support
dcao opened this issue · comments
When attempting to run the destructuring example from the docs on blocks:
Destruct ← { 𝕊 a‿1‿⟨b,2⟩: a≍b }
Destruct 5‿1‿⟨7,2⟩
The online REPL fails with the following error:
Unknown character: :
Yeah, the online impl is incomplete. The only incomplete syntactical features are headers and multiple bodies though. See running
I plan on working on this very soon since the self-hosted compiler is now the basis of CBQN.
BQN has a tendency to be distracting! Arguably I started working on this in May, but in any case, it's finished now. There are a fair number of tests but it's likely some bugs are still out there, probably mostly accepting cases it shouldn't and then behaving unpredictably.
The compiler and Javascript runtime have full support; CBQN doesn't yet (in particular the constant matching in this example will crash) but I wouldn't expect that to last too long.