Ascii23

I’ve been working on a project in C++ recently, and in so doing I realized that I could not find a good standardized C++ library for dealing with ASCII text. At least not besides the cctype header, which features some surprising and usually unwanted behavior.

So I recently wrote and published my first C++ library, named ascii23. It’s a small header-only library which provides some ASCII-related functions, such as checking whether an input is an ASCII whitespace character, or converting upper-case ASCII characters to their lower-case equivalents and vice versa. Unlike cctype, ascii23’s behavior is the same regardless of locale. Also unlike cctype, it behaves sensibly with Unicode code points and UTF-8 code units, correctly recognizing and handling non-ASCII inputs.

The library includes a benchmarking tool, which was used to write very performant implementations of these ASCII functions, as well as comprehensive unit tests. You can find it on GitHub here, and you can quickly make use of it in your own project by copying the file “src/ascii23.h” into an include directory and including that header in your project:

https://github.com/pineapplemachine/ascii23

Jungle, an esoteric programming language

Recently I’ve been making some new esoteric programming languages, or “esolangs”. I haven’t been actively writing new esolangs since 2011! Most recently I published a language named Jungle to the esolang wiki. The structure and control flow of a Jungle program resemble that of a binary tree. You can learn about the language and download a reference implementation at https://esolangs.org/wiki/Jungle.

write_char "Hello world!";

Color Graph

I recently developed a tool to help me work through some math that was proving difficult to visualize any other way. You can use this tool here: https://files.pineapplemachine.com/public/web/color-graph

Using this webpage, you can describe a JavaScript function accepting two inputs, X and Y, and see its output or outputs visualized as color intensities. The first time you load the page, a more detailed help text should appear. You can make the help text appear again at any time by clicking the “?” question mark help button in the bottom-right corner of the page.

Screenshot of the color graph webpage

¶City – Ludum Dare #41

I made a game in less than 48 hours for Ludum Dare #41! You can learn more at the Ludum Dare compo page, or if you’d rather you can directly go and play ¶City here.

Ludum Dare #41’s theme was “Combine 2 Incompatible Genres”, so I created ¶City, the Text-Based City-Building Simulation RPG. In it you are charged with growing and maintaining a city with mechanics comparable to Simcity games, but presented with a much more personal (and more wordy) perspective.

¶City is played in your modern internet browser supporting ES6 JavaScript syntax. It was tested using Chrome; I recommend using Chrome to play unless you’re sure about your browser’s full support of ES6 functionality.

Canary

I published my first package on npm recently, and it became stable and well-documented enough for a v1.0 release!

Canary is an automated testing tool for JavaScript code. I created Canary because existing JavaScript testing tools didn’t quite agree with my philosophy toward writing automated tests.

Canary on GitHub: https://github.com/Mapita/Canary
Canary on npm: https://www.npmjs.com/package/canary-test
Canary on readthedocs: http://canary.readthedocs.io/