Measures Concepts
GitHub icon

BQN

BQN - Programming language

< >

BQN, aka Big Questions Notation, is a programming language created in 2020 by Marshall Lochbaum.

Source code:
git clone https://github.com/mlochbaum/BQN
#806on PLDB 4Years Old

An APL-like programming language. Self-hosted!


Example from the web:
#! /usr/bin/env bqn # Case conversion utilities case ← { diff ← -´ "Aa" Lower ⇐ -⟜diff Upper ⇐ Lower⁼ } hw ← <˘ 2‿∘ ⥊ "helloworld" hw case.Upper⌾(⊑¨)↩ •Out hw ↩ ∾ ⥊⍉ [hw, ", "‿"!"] # Hello, World! # Split at spaces and repeated characters Split ← { !1==𝕩 ⋄ (!2=•Type)¨𝕩 Proc ← { · 𝕊 ' ': spl⇐1 ; # Space: break and delete it prev Fn cur: ⟨spl,str⟩⇐ spl←0 ⋄ str←⟨cur⟩ # Include and don't break... { prev=cur ? spl+↩1 ; @ } # except at equal characters } GV‿GS ← {𝕏¨}¨ ⟨ {⟨s⇐str⟩:s;""} {𝕩.spl} ⟩ r ← Proc{»𝔽¨⊢} 𝕩 (∾¨ GV ⊔˜ ·+`GS) r } •Show Split hw # ⟨ "Hel" "lo," "World!" ⟩

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Queries · Stats · Sponsor · Day 605 · feedback@pldb.io · Logout