We build languages, and the bridges between them

We carry code into other languages and into images

Lena Code

Code analysis, built on a deterministic pipeline.

JavaScript
const total = price * qty;
Pythontotal = (price * qty)
TypeScriptlet total = (price * qty)
Kotlinval total = (price * qty)
C#var total = (price * qty);
Dartfinal total = (price * qty);
PHP$total = ($price * $qty);
Haskelltotal = (price * qty)
Lispex(define total (* price qty))

Understand, improve, and transform code across 30 languages. Explanation, review and conversion are the starting points. Our own language Lena and Facet IR form the analysis foundation. Existing engine conversions also let you read the original and result side by side, as above.

Start with understanding your code, then explore improvements and transformations.

lenacode.com

codeimage.io

The image is the program.

A program image of the recursion program from the codeimage.io gallery
Recovered from the image alone

function fibonacci(v1) {
  if (v1 <= 1) {return v1;}
  return fibonacci(v1 - 1) + fibonacci(v1 - 2);
}

codeimage.io puts source code into a single image and brings the code back from that image alone. Its conversion engine is written in Topaz.

The source above was restored directly from this image.

codeimage.io

We set the pages of a book in a language we built

ATLAS

Fitting every line and page of a book by hand is hard.

Page 18 of the body text of The Rational OptimistPage 19 of the body text of The Rational Optimist

ATLAS is a typesetting tool for refining a manuscript and setting the pages of a book. It decides the line breaks of a whole paragraph together, breaking Korean between characters and English between words.

The spread above is pages 18 and 19 of the body text of The Rational Optimist, set with ATLAS.

atlasbind.com

Topaz

A paragraph sets evenly only when every line is scored for how loose or tight it runs against its target width.

function 나쁨도(너비: int, 목표너비: int, 글자수: int, 공백수: int, 분할종류: string, 마지막인가: bool) -> int {
  let 여유 = 목표너비 - 너비
  let 절대여유 = 절댓값(여유)
  let 원시R = if 절대여유 >= 4 * 목표너비 { 4 * R } else { 절대여유 * R / 목표너비 }
  let 조정상한센티 = if 여유 >= 0 { 100 + 공백수 * 45 } else { 100 + 공백수 * 25 }
  let 비례R = 반올림나눗셈(원시R * 100, 조정상한센티)
  let 제곱 = 비례R * 비례R
  let 몫 = 반올림나눗셈(제곱, R)
  let mut 기본B = 반올림나눗셈(몫 * (1000 * B), R)
  if 마지막인가 {
    기본B = 반올림나눗셈(기본B * 2, 5)
    if 너비 * 100 < 목표너비 * 52 && 글자수 > 0 { 기본B += 500 * B }
  }
  if 여유 < 0 {
    기본B += 20000 * B + 반올림나눗셈(20000 * B * 비례R, R)
  }
  if 분할종류 == "latin_hyphen" { 기본B += 65 * B }
  if 분할종류 == "hard_fallback" { 기본B += 50000 * B }
  if 글자수 <= 2 { 기본B += 275 * B }
  기본B += 10 * B
  기본B
}

atlasbind.com · 나쁨도.tpz

Topaz is a programming language specialized for typesetting. The function above is the part of the line breaking rules published on the ATLAS site that scores the badness of one line.

jeniapp and kakao.games, written in the same language, run right in the browser.

topaz.ooo

Tools and a game written in Topaz

Lispex

Where a heading caught at the bottom of a page should go is a call each publisher makes differently.

(let ((lines-left 1))
  (if (< lines-left 2)
      "next-page"
      "keep"))

lispex.com/v1.20/en

Lines leftResult
1"next-page"
2"keep"

Lispex expresses a publisher’s typesetting house style as rules that run in the evaluator embedded in Topaz apps. This rule moves the heading to the next page when fewer than 2 lines are left below it.

The same rule with the same input and limits gives the same answer.

lispex.com

We teach computer science by showing code at work

sicp.io

Learn SICP by running every idea.

Lesson 1.2.1 on sicp.io, with the iterative factorial of 8, the value 40320 and the execution trace.

Its 105 lessons across five chapters set runnable code and an execution trace beside the text, and each chapter ends with a checkpoint. All code runs in a browser workbench powered by Lispex, and the browser remembers where you left off.

The screen above is lesson 1.2.1 running the iterative factorial of 8 to the value 40320, with its execution trace.

sicp.io

compiler.co.kr

A computer science site that follows a single line of code on its rollicking adventure inside the computer.

  • The compiler.co.kr home in the Pop Block theme, with Hanjuri, Toktok and Gaji on blue.
    Pop Block
  • The compiler.co.kr home in the Neo Brutal theme, with Hanjuri, Toktok and Gaji on yellow.
    Neo Brutal
  • The compiler.co.kr home in the Sticker theme, with Hanjuri, Toktok and Gaji on green.
    Sticker

Five spaces make up the site, from First Steps to the Field Guide, and its first story, Hanjuri’s First Day at Work, asks where 1 + 2 goes. Switch between Pop Block, Neo Brutal and Sticker, and Hanjuri, Toktok and Gaji are drawn anew in each theme.

The three screens above are the same home page opened in each theme.

compiler.co.kr

Core Semantic Kernel

The research programme of STUDIO HAZE. Read the papers alongside their implementations and materials for reproducing the results.

cskernel.com
The first page of the anonymous PDF of Auditing What Program Images Hide and Preserve, showing its title and abstract.ICSE 2027 NIERAuditing What Program Images Hide and Preserve

Other work

Brand