A concise language for sketching ASCII art.
Switch branches/tags
Clone or download
Latest commit 94729ef Dec 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Align keyboard file, add things to verbose grammar Jul 26, 2017
extras Align keyboard file, add things to verbose grammar Jul 26, 2017
highlighters Added some new features, cursor positioning is currently in progress Oct 10, 2016
.gitignore Add direction cast, fixes Aug 4, 2017
.travis.yml Hopefully fix Travis May 26, 2018
LICENSE Added scoping Oct 22, 2016
README.md Remove the Windows part of the link to Python3 in README.md Aug 24, 2017
TODO.md Add things to Subtract, other things Jul 31, 2017
__init__.py Align keyboard file, add things to verbose grammar Jul 26, 2017
ansiterm.py Bugfixes, conform to PEP8 Aug 2, 2017
appveyor.yml Remove Python 3.3x64 and Add Python 3.6 Aug 25, 2017
astprocessor.py Mega-update 1 Mar 6, 2018
charactertransformers.py Fix ReflectMirror Nov 11, 2018
charcoal Align keyboard file, add things to verbose grammar Jul 26, 2017
charcoal.py Fix Divide Dec 15, 2018
charcoaltoken.py fixes Apr 6, 2018
codepage.py Fix codepage Aug 24, 2018
compression.py fix RLE compression May 10, 2018
direction.py Add direction cast, fixes Aug 4, 2017
directiondictionaries.py Bugfixes, conform to PEP8 Aug 2, 2017
extras.py Mega-update 1 Mar 6, 2018
interpreterprocessor.py cast more things Apr 19, 2018
requirements.txt Create A `requirements.txt` Aug 25, 2017
stringifierprocessor.py Fix slice stringifying May 5, 2018
test Align keyboard file, add things to verbose grammar Jul 26, 2017
test.py Fix ReflectMirror Nov 11, 2018
tox.ini Bugfixes, conform to PEP8 Aug 2, 2017
tutor Fixes, implement list reduce Jul 28, 2017
tutor.py Bugfixes, conform to PEP8 Aug 2, 2017
unicodegrammars.py Fix slice stringifying May 5, 2018
verbosegrammars.py fixes Apr 6, 2018
wolfram.py Mega-update 1 Mar 6, 2018

README.md

Charcoal

Want to be able to write basic Charcoal quickly? Then read on. If you came here looking for help, scroll to the bottom for the FAQ.

Example REPL session

To use the REPL, simply invoke with ./charcoal.py, python charcoal.py or python3 charcoal.py.

Charcoal> Hello, World!  
Hello, World!
Charcoal> ^C
Cleared canvas

Literals

There are two basic types of literals: strings and numbers. A string is just a run of printable ASCII, and a number is just a run of the superscript digits ⁰¹²³⁴⁵⁶⁷⁸⁹.

Examples: foo is equivalent to "foo".
foo¶bar is the same as "foo\nbar".
¹²³⁴ is 1234.

Printing

In a Charcoal program, expressions are implicitly printed. Numbers print a line, and arrows can be used to specify a direction.

Examples: foo prints foo
foo⁴ prints foo----
foo↖⁴ prints:

\   
 \  
  \ 
foo\

FAQ

  • When I run Charcoal it throws some errors about UTF-8 characters and exits.
    • Maybe you don't have Python 3 installed. Try installing Python 3 from here.
  • When I run Charcoal it throws some errors and exits.
    • If the message comes with a stack trace, it looks like you have found a bug. File a bug report here, and we'll come back to you as soon as we can.