Package: hbcht
Half-Broken Car in Heavy Traffic is a difficult programming language with only
5 combined operators and direction “signs” for 2D grids.hbcht is a Python 3.1+ combined compiler/interpreter for the language.Licensemege is free software under the terms of the Do What The Fuck You Want To Public
License (WTFPL); see the file COPYING.txt. The author of mege is Niels G. W. Serup,
contactable atngws@metanohi.name.ContactThe author of hbcht is Niels G. W. Serup. Bug reports and suggestions should be sent
tongws@metanohi.namefor the time being.InstallationWay #1Get the newest version of hbcht athttp://metanohi.name/projects/hbcht/or athttp://pypi.python.org/pypi/hbchtExtract hbcht from the downloaded file, cd into it and run this in a
terminal:# python3 setup.py installExamples are available in theexamplesdirectory.Way #2Just run something like this:# pip-3 install hbchtNote that this will not make any examples available.Language documentationThis is the official documentation of HBCHT.HBCHT is a 2D grid-based programming language. You are a car fighting to get to
the exit of a very chaotic highway. You have to follow the signs, but whenever
you do that, you also change your memory. The value of your current memory cell
can be incremented or decremented and your memory cell index can change. You
can also find signs that tell you to turn either right or not turn at all,
depending on your memory.The car can drive in four directions: up, right, down, and left. Because of the
chaos, you never know which direction the car is headed when the program
starts. This makes it easy to randomize the output.To make things worse (actually, it’s to make programming in HBCHT possible),
you cannot turn left because your car is half-broken. You can drive straight
ahead, you can turn right, and you can reverse.Markerso car
# exit, return/printOperations> go right, next memory cell
< go left, previous memory cell
^ go up, increment
v go down, decrement
/ go right if the current memory cell has the same value as the previous
  memory cell, else continue (if the previous memory cell does not exist,
  its value is zero)RulesThere can be only one car and only one exitThe car cannot turn left; any relative left turns will be ignored along with
their memory effectsThe program always starts at memory cell #0All memory cells have the value 0 by defaultInput values cannot be negative, but values returned by a program canThe car cannot go out of bound; if it exits to the right, it reenters to the
left, etc.Values cannot be input to memory cells below memory cell #0, but the program
can set values in theseValues can be arbitrarily large. An interpreter or compiler without this
feature is valid, but not perfect (note that hbcht’s C translator uses
32-bit ints and is thereby not perfect).A semicolon denotes a comment. Anything from the semicolon to the end of the
line is ignored.If a program file contains a line that starts with@intext, it will see
input as text and convert the text to ordinals before running the core
function.If a program file contains a line that starts with@outtext, it will show
output as a text string instead of a list of numbers.UseAs a command-line toolRunhbchtto use it. Runhbcht--helpto see how to use it.As a moduleTo find out how to use it, run:$ pydoc3 hbchtExamplesThere are a few examples in theexamplesdirectory.Developmenthbcht uses Git for code management. The newest (and sometimes unstable) code
is available at:$ git clone git://gitorious.org/hbcht/hbcht.git