Hacker Newsnew | past | comments | ask | show | jobs | submit | beefburger's commentslogin

RFC Esolang is a programming language in which the specification document is the source code.

Requirement levels like MUST, SHOULD, and MAY act as control flow. Section numbers define labels. Packet-diagram labels serve as registers.

Executing RFC 9379 outputs the powers of two. Pre-existing RFCs MAY parse as valid programs, forming a historically accidental standard library.


How to install a Tic-Tac-Toe game on your printer by copy-pasting a few lines in PostScript.


Solvers and visualizers in Python, C and PostScript


I've been experimenting with PostScript programming over the past two years, creating several small games (Tic-Tac-Toe, Chess, Sokoban and Tetris) all running in Ghostscript or directly on printers. Here are my annotated slides about this quirky and fun journey, filled with insights, code snippets, and lessons learned.


How I shrank Takashi Hayakawa's 33 years old tiny ray tracer by 33 bytes


I've just implemented Tetris in PostScript, pushing the limits of a document-processing language to run a realtime game. It works in GhostView on macOS.

* 600 lines / 10 KB * 69 different PostScript operators, no external libs * Realtime input, direct drop, increasing speed levels * 7-tetrimino random bags * Nintendo-style scoring and high score tracking

This project builds on my earlier experiments with PSChess and PSSokoban.

It show that PostScript is a lightweight, expressive, and surprisingly interactive programming language. A perfect tool for hacking on unexpected platforms.


Cool! I didn't know that postscript supported interactive content. I thought the code would be generating the document and that's it.


PS was actually used for OS graphics multiple times (with more adaptions of course)

https://en.m.wikipedia.org/wiki/Display_PostScript


Yes but using raw postscript in this perverse way to get interactivity is truly inspired. My hat is off to the author.


Not really, that is exactly how it was used in Sun NeWS.

https://en.m.wikipedia.org/wiki/NeWS

You would write full blown GUI apps in Postscript with some C glue.


Well, it really doesn’t. This uses a clever hack where you write the input to a text file that the PS program is continuously reading. Very cool.


Sokoban implementation in pure PostScript. Playable in GhostView. Direct input using tty raw mode and unix pipes.


OP here. Indeed, hardest part is the initial mental gymnastics. This can be overcome by devising and enforcing some conventions that I wrote about in a separate article https://seriot.ch/projects/programming_in_postscript.html


I'm the author of bfps. I don't have too much time either. But I do enjoy this kind of brainb^Hteaser while commuting in the train :)


I love this idea. Instead of doomscrolling news or giving your time to the attention economy in other ways, this is like solving interesting puzzles.


A tiny Turing machine for 2-symbols Busy Beavers. No variable for state. Program is kept on input string.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: