Mimehole Research

Research notes on programming languages and interactive systems

Draft: Live Rewriting Under Concatenative Programming

  1. Michael Homer
. To be finalised after the workshop.

Concatenative programming languages offer attractive ergonomics for some applications, but are also sometimes called "write-only languages" because programs can fall into convoluted stack-juggling that is difficult to follow. Rewriting systems also offer some very straightforward expressions of some classes of problem, but face complex workarounds in others. Many of these strengths and limitations are complementary: advanced multi-step stack-juggling is complex and hard to follow as concatenative functions, but would be trivially expressed as rewrites over the stack, while rewriting systems often make negation and ordinal comparisons complicated.

Here we present a multi-stack concatenative programming system operating over a rewriting substrate: functions can be defined in conventional concatenative style, or as rewriting operations, or even combinations of both, and all application proceeds by rewriting the remaining program and state. In doing so, new possibilities for run-time intervention are exposed: the program can be paused and both state and pending code can be edited, including the equivalent of the call stack, but yet more dynamic options are also available, including evaluating other programs ad hoc within the main program's state. We also identify bindings between program-level stacks and external resources that can allow bidirectional direct manipulation of visible state.

Full article...

Tinted Windows: Reconstructing Historic Dithering

  1. Michael Homer

With the capacity only to display a very limited palette at higher resolutions, Windows 3.x used dithering to create the effect of a wider range of solid colours. There are a number of standard dithering algorithms, but these don't match what Windows actually did. The specific approach is documented in U.S. Patent 5485558, but there are a number of errors in the description given there. This is the result of my reverse engineering to produce behaviour correct to the real system, and a practical implementation illustrating it. The algorithm takes three colour coordinates 0–255 for each of the red, green, and blue channels, and produces an 8x8 dither pattern containing up to four palette colours spread across it.

Full article...

Older notes

  1. On Accidental Time Travel and Delimited Continuations
    1. Michael Homer
    • Grace
    • cps
  2. Avoiding Accidents in Structural Types
    1. Michael Homer
    • structural types
    • brands
    • survey
  3. What does it really mean to say a programming language has "strong" or "weak" typing?
    1. Michael Homer
    • types
    • survey
  4. What factors make a programming language more (or less) beginner-friendly?
    1. Michael Homer
    • novices
    • survey
  5. What evidence exists about brace- and indentation-based syntax for novice programmers?
    1. Michael Homer
    • survey
    • novices
  6. How often do variables in dynamically-typed code actually change type?
    1. Michael Homer
    • types
    • survey
  7. Live 2D Compositional Programming
    1. Michael Homer
    • LIVE
    • concatenative
    • visual programming