add tag
Marshall Lochbaum
Have functionality you want to see as a BQN library? Request it here! I'll be directing BQN programmers in search of things to do towards this page.

For best results, include links to resources describing the functionality and other implementations, especially in array languages. Good resources in general are [dfns](https://dfns.dyalog.com/n_contents.htm), [J essays](https://code.jsoftware.com/wiki/Essays), Rosetta Code ([APL](https://rosettacode.org/wiki/Category:APL), [J](https://rosettacode.org/wiki/Category:J)), and Julia codebases such as [JuliaMath](https://github.com/JuliaMath).

Star the projects you would use, and edit the request to indicate current status if you've published anything relevant. The chat thread here might also be useful to coordinate efforts.
Top Answer
Marshall Lochbaum
#### JSON

One of the more common formats for data these days, so it would be nice to have a solid library with good validation for reading and writing. There are multiple possibilities for how to format objects on the BQN side.

[Basic decoder](https://codeberg.org/CptJimKirk/bqn-rest/src/branch/master/JSON.bqn) in bqn-rest.
Answer #2
Marshall Lochbaum
#### Polynomial utilities

Add, multiply, evaluate, and solve definitely. Should it have a way to represent complex polynomials in a real-only BQN? It needs to be able to handle complex roots.

Some simple utilities [on bqncrate](https://mlochbaum.github.io/bqncrate/?q=polynomial). Julia has a solver [here](https://github.com/JuliaMath/Polynomials.jl/blob/master/src/polynomials/multroot.jl). See also [Wikipedia](https://en.wikipedia.org/wiki/Root-finding_of_polynomials#Roots_of_polynomials).
Answer #3
Marshall Lochbaum
#### Prime number utilities

Primality sieving, testing, Pi function, factorization, etc.

Resources: Julia's [Primes.js](https://github.com/JuliaMath/Primes.jl/blob/master/src/Primes.jl); [RosettaCode](https://rosettacode.org/wiki/Category:Prime_Numbers).

Marshall has implemented fairly good versions of these [in bqn-libs](https://github.com/mlochbaum/bqn-libs/blob/master/primes.bqn). Limited to `2⋆53` because it uses native numbers.
Answer #4
Binary Search Trees!

Some of the algorithms I've been looking at depend on efficient binary trees.

Options are [AVL trees](https://en.wikipedia.org/wiki/AVL_tree), [Red-black trees](https://en.wikipedia.org/wiki/Red%E2%80%93black_tree), or the more general (!) [WAVL trees](https://en.wikipedia.org/wiki/WAVL_tree).

Related functions would be insert, delete, and find.
One possible way to implement this would be to store the nodes in one of the ordering (preorder, postorder, or inorder) as a flat array, and extended attributes could be stored as a separate flat array. There might be multiple extended attributes, so these could also be indices into a map or another array.

For example:
| |
2 3
preorder ← 1‿2‿3
attrs    ← 10‿12‿14
Answer #5
Anonymous 2596
Hi - I'll throw some answers in here :)


I'm planning one day to implement a geometric algebra library in BQN to learn both - something like this, and in general things relating to computer graphics could potentially bring in a new niche of users. 

Having graphical feedback to their BQN scripting would provide a softer on-ramp to people new to array languages.

Interfacing with something like webgpu / https://github.com/gfx-rs/wgpu-native could be a good start, perhaps with some higher level constructs for generating geometry. One target API allows for native + web demos.

See: https://github.com/chakravala/Grassmann.jl


In tandem, great tooling for live / interactive programming with lisp-style hot-reloading would really be an exciting proposition. 

Especially tooling that is not married to just one IDE / workflow.


Multicore / parallel programming constructs if this is currently possible.

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.