p-nand-q.com | home | computer | humor | business | pictures | about

humor

programming languages

Brackets - the language of a BCC: generation

Welcome to []. The express purpose of this language is to provide MS Outlook with "Active Content" in mail headers. The idea comes from the habit of the members of the esolang news group to encode all their subjects in square brackets and put them in the header, although it can be quite difficult to do so when the subjects are still alive.

Features

Code model

The code model is very simple, and looks like a small assembler:

MoveXtoY:                   ({<<x]y)
AddXtoY:                    ({[<x]y)
SubXFromY:                  ({{<x]y)
MultiplyXWithY:             ({}<x]y)
DivideXWithY:               ([(<x]y)
CompareXAndY:               (]<<x]y)
NandXToY:                   (}[<x]y)
GotoLabelXIfNotEqual:       (((<x)
GotoLabelX:                 ((<<x)
DeclareLabelX:              (([<x)
PrintX:                     (({<x)
ClearX:                     ((}<x)
NegateX:                    ({(<x)
ImmediateX:                 ((<x>
RegisterXIndirect:          (<<x>
RegisterXIndirectIncrement: ([<x>
RegisterXIndirectDecrement: ({<x>
GotoLabelXIfEqual:          (}<x]
RegisterX:                  (<x>
DeclareDataX:               [x}

Here is a typical [] code:

Subject: <>(()[Brackets])<()0)}())[)()0))(]])1)
         <>>([)0)>[0]{(]()2)()))([)0))([])1)(]])2)

Code model

The [] source is a beauty to behold, if I may say so myself. You can browse it online. You can download the whole package here.