https://github.com/funmaker/bqneditor
BQN Editor in React
https://github.com/funmaker/bqneditor
bqn react styled-components webpack
Last synced: 4 months ago
JSON representation
BQN Editor in React
- Host: GitHub
- URL: https://github.com/funmaker/bqneditor
- Owner: funmaker
- License: mit
- Created: 2023-11-29T01:44:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-11-28T14:44:34.000Z (7 months ago)
- Last Synced: 2025-11-30T20:54:49.645Z (7 months ago)
- Topics: bqn, react, styled-components, webpack
- Language: TypeScript
- Homepage: https://bqn.funmaker.moe/
- Size: 616 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# BQN Editor
[Website](https://bqn.funmaker.moe)
[Changelog](./CHANGELOG.md)
This is an unofficial online editor for the [BQN](https://mlochbaum.github.io/BQN/) programming language
made by [Fun Maker](https://github.com/funmaker/). You can find the source code on [GitHub](https://github.com/funmaker/bqneditor).
Currently it is using [bqn.js](https://github.com/mlochbaum/BQN/blob/master/docs/bqn.js) as the interpreter.
# Multimedia output
`•Show 𝕩` system function automatically detects image and audio output depending on the shape (`≢𝕩`). You can turn this
feature off in settings.
Images have to be at least 10x10. They are represented as arrays of 0-255 values.
Allowed shapes are: `h‿w` (grayscale) `h‿w‿3` (RGB) `h‿w‿4` (RGBA) where `h` is height and `w` is width.
Example grayscale gradient: `+´¨ ↕ 127‿127`
Audio is represented as an array of at least 64 PCM samples from -1 to 1. It can be a list for mono audio, or an array
of shape `s‿2` or `2‿s` for stereo audio. You can get and change sample rate using `•SampleRate 𝕩` and
`•SetSampleRate 𝕩` respectively.
Example sine wave: `•math.Sin 2 × π × 60 × ↕⊸÷ •SampleRate @`
You can find more examples in the editor's menu.
# System-provided values
All bqn.js system values are avaliable. [BQN Specification](https://mlochbaum.github.io/BQN/spec/system.html)
includes standard system values. Note, this list includes many system values that are not avaliable in bqn.js and
therefore in BQN Editor. You can list all supported system values using: `•listSys`
Additionally, BQN Editor adds following system values:
- `•GetLine 𝕩` Reads next line from program input. `𝕩` is ignored.
- `•SampleRate 𝕩` Gets current sample rate. `𝕩` is ignored.
- `•SetSampleRate 𝕩` Sets sample rate. `𝕩` must be an integer between 1 and 4'294'967'295 inclusive.
You can list all the avaliable system values using: `•listSys`
## Source code usage
### Run development
```bash
npm run start
```
### Build production
```bash
npm run build
```