# zipc compiles Prolog to Clocksin's 1984 ZIP machine to make trilog run leaner

Original title: A ZIP-style Prolog VM for trilog

> Hacker News story 50429210 · language: en · submitted 2026-11-09
> Web version: https://zeli.app/story/50429210
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 40 · by [triska](<https://news.ycombinator.com/user?id=triska>) · 💬 14
[original](<https://github.com/no382001/zipc>) · [HN discussion](<https://news.ycombinator.com/item?id=50429210>)

## Summary

A work-in-progress compiler and virtual machine, written in C and Prolog, that targets the ZIP abstract machine from Clocksin's 1984 paper on sequential Prolog. The compiler, running on Scryer Prolog, emits a binary image that the VM loads and executes. The aim is to benchmark it against trilog's current runtime: compiling clauses instead of interpreting them with the ABC algorithm should cut instruction count and memory use. If the MVP holds up, zipc could become trilog's backend.

## Key quote

> Either way, trilog interprets clauses as terms with the ABC algorithm, and compiling them to ZIP should make the same programs run in fewer instructions and less memory.

## HN discussion (14 comments)

### [donutdonot](<https://news.ycombinator.com/item?id=50450954>)

> Prolog is such a weird yet interesting language. Fun times having to program it back in University.
>
> Are there any modern use cases of prolog left, or is it more of academic interest?

---

## Cite

- Page: https://zeli.app/story/50429210
- Date: 2026-11-09
- Source: github.com (https://github.com/no382001/zipc)
- Hacker News: https://news.ycombinator.com/item?id=50429210

## Other languages

- zh: https://zeli.app/zh/story/50429210 · markdown: https://zeli.app/zh/story/50429210.md
- ja: https://zeli.app/ja/story/50429210 · markdown: https://zeli.app/ja/story/50429210.md
- ko: https://zeli.app/ko/story/50429210 · markdown: https://zeli.app/ko/story/50429210.md
- de: https://zeli.app/de/story/50429210 · markdown: https://zeli.app/de/story/50429210.md
- es: https://zeli.app/es/story/50429210 · markdown: https://zeli.app/es/story/50429210.md
- ru: https://zeli.app/ru/story/50429210 · markdown: https://zeli.app/ru/story/50429210.md
