Headsecks

From Esolang
Jump to: navigation, search

Headsecks is a brainfuck equivalent in which each character of the source code is interpreted as its ordinal value modulo 8, from which the instruction to execute is determined. It was designed and implemented by User: andkerosine in May 2012.

Overview

The conversion from Headsecks to brainfuck is, technically, up to the implementer. In the interest of compatibility, however, it is strongly recommended that the following mapping be adhered to:

  ord mod 8   0 1 2 3 4 5 6 7
  brainfuck   + - < > . , [ ]

This particular arrangement was a design decision, as it optimally maps spaces, tabs, and newlines to (reasonably) sane instructions, should one desire aesthetic spacing. Of course, there are (by definition) no limits regarding the structure one can impose on Headsecks code, and so the choice of separators (if any) is entirely open.

Syntax

Mathematicians have yet to discover a natural number which results in a negative remainder when divided by 8; as such, every possible string of characters is a valid (though not necessarily computable) Headsecks program. Here, for instance, are 16 different ways of writing the simplest infinite loop (+[]):

PҾз ʀҖΟ ȨжƧ ŸϞç ʠÞз Űņп ӠǶΧ àӎɇ ɘŮӯ @Ǯȿ аҞϧ ¸Ҟć ϠӶ· ψȮȷ Ɉʖ· ϘφÇ

Examples

Hello World (Trigrams dialect)

☰☰☰☰☰☰☰☰☰☰☶☳☰☰☰☰☰☰☰☳☰☰☰☰☰☰☰☰☰☰☳☰☰☰☳☰☲☲☲☲☱☷☳☰☰☴☳☰☴☰☰☰☰☰☰☰☴☴☰☰☰☴☳☰☰☴
☲☰☰☰☰☰☰☰☰☰☰☰☰☰☰☰☴☳☴☰☰☰☴☱☱☱☱☱☱☴☱☱☱☱☱☱☱☱☴☳☰☴☳☴

Note the use of an explicit newline to decrement the data pointer.

Konnichi wa (Kana dialect)

ビるィせセコびせかルゎチこるビびッセッべゃ゛ッびんんルィ゛ィらィんニスゃヘ゠だヰヒたヱィホゃかにつめこゃッっカッニほっほゃレひゴぴずもオげずやずオぺオヲず゜コんるニ゛ヴビぼケるニレよこコにルほこかコにャニコほッゴリぺ゚をぺぢヲなゲりりぺぴペぢなペゲぢひひゔべラが

Implementations

At present, only the reference implementation exists. You should improve this unfortunate situation.