Hello World Polyglot in Brainf*ck and Whitespace

A Hello World Polyglot in Brainf*ck and Whitespace

Just to follow tradition—and use obscure languages—here’s a “Hello World!” implemented in both Brainf*ck and Whitespace at the same time.

Personally, I don’t find either BF or WS particularly obscure. They’re just languages with annoyingly difficult syntax, but very simple semantics. Still, it gets a bit obscure when code for two languages is mixed. In this case though, it’s barely noticeable—since all alphanumeric characters are treated as comments, and all of the the rest including tabs, spaces, and line feeds are actual code.

Link to hai.ws.bf

Whitespace is a surprisingly expressive language, especially compared to Brainf*ck—even though it only consists of three characters: tab, space line feed. Its instructions are made up of specific sequences of those characters.

Brainf*ck consists of: +-[]<>

> wspace hai.ws.bf
Hello World!
> bf hai.ws.bf
Hello World!

All #art #clojure #csharp #data-structures #database #datomic #emacs #functional #haskell #history #immutability #java #jit #jmm #lambdas #lisp #pioneers #poetry #programming #programming-philosophy #randomness #rant #reducers #repl #smalltalk #sql #threads #women