Sign inSign up

100hellos/bqn

By 100hellos

•Updated 4 months ago

"Hello World!" Written in bqn

Image
0

4.4K

100hellos/bqn repository overview

⁠Hello World! From bqn.

Language page⁠ — context, influences, and learning notes on the 100hellos site.

Source on GitHub⁠ (100hellos/bqn)

⁠Trying it

docker run --rm --platform="linux/amd64" 100hellos/bqn:latest

⁠Modifying it

Read the repo README⁠, or fork the project⁠ and customize it.

For an interactive shell:

docker run --rm --platform="linux/amd64" --entrypoint="" -it 100hellos/bqn:latest zsh

⁠BQN - Big Picture Array Programming

BQN is a modern array programming language developed by Marshall Lochbaum, inspired by APL and J but designed with modern programming principles. This implementation uses CBQN, the C-based reference implementation.

⁠What makes BQN special?

🔢 Array-first mindset: Every value is an array, making it incredibly powerful for data manipulation 🧠 Mathematical notation: Uses special symbols that make code read almost like mathematical expressions 🏃 Performance: CBQN compiles to efficient native code 🎯 Modern design: Learns from decades of array language development while avoiding historical baggage

⁠The "Hello World!" magic

Our simple program •Out "Hello World!" demonstrates:

  • •Out - A system function (indicated by the bullet •) for output
  • String literals work just like in other languages
  • No semicolons or verbose syntax needed!

⁠Fun BQN facts

  • BQN uses over 30 special symbols, each precisely chosen for mathematical intuition
  • A single line of BQN can often replace dozens of lines in traditional languages
  • The language has both "tacit" (point-free) and explicit programming styles
  • It's particularly beloved by mathematicians and data scientists

⁠Explore BQN further

Try these expressions to see BQN's array magic:

  • bqn -p "1+1" - Basic arithmetic
  • bqn -p "+´1‿2‿3‿4‿5" - Sum an array using fold
  • bqn -p "10↑{𝕩∾+´¯2↑𝕩}⍟9⟨0,1⟩" - Generate first 10 Fibonacci numbers!

BQN proves that powerful doesn't have to mean complicated!

Tag summary

Content type

Image

Digest

sha256:d9d510ada…

Size

115.1 MB

Last updated

4 months ago

docker pull 100hellos/bqn