plwm: An X11 window manager written in Prolog

39 points by classichasclass


dutc

Thank you for sharing this!

I have been meaning to publish some lists I have been compiling of “short” (usu. ≤1000) examples of programmes that most programmers could not write off the top of their head. Most of these are programmes which are both fundamental but seem very daunting to write. I think I could write a simple line-orientated grep off the top of my head, but I don’t know where to start (or how much effort and research is needed) to write a window manager or a terminal multiplexer.

However, if I have a few examples of very simple implementations of such programmes, if such programmes are complete (even if lacking in features) such that I can build them and make small tweaks, if they are written in a language I can squint by way through, and if the code is short enough for me to read in the course of a lazy afternoon, the barrier is eliminated.

For an X11 window manager, we might expect interaction with Xcb or similar underlying APIs might add a lot of boilerplate to the code; thus, we may relax our burden from ≤1000 to ≤10000 lines of code. plwm is toward the upper end of this.

Project & Code: Total Lines of Code† with Breakdown (indicating dominant language)

† “Total Physical Lines of Code” and “Grouped by Language” as reported by David A. Wheeler’s sloccount

‡ Incorrectly reported as perl, likely based on .pl extension; there may be other mistakes than this.

⹋ Added based on other comments: ~mhd