7 ms·
Most languages can be used for writing most things; however, for X11 window managers in particular, all of the APIs are exposed as C libraries, so the C family
by chriswarbo 12y ago
Most languages can be used for writing most things; however, for X11 window managers in particular, all of the APIs are exposed as C libraries, so the C family has a natural advantage. Other languages need an interface to those C libraries, a more idiomatic wrapper on top, and then a window manager can be written.
I've played with the Xlib libraries in Haskell and it wasn't the prettiest code I've ever written ;)
- pjmlp 12y agoThis is what caused me eventually to move from Turbo Pascal to C++ during the Windows 3.1 time frame. I started to get fed up with writing bindings to libraries not directly supported by Turbo Pascal and pure C was a no go for me.
- fspeech 12y agoI am a recent convert to C++ for the same reason (though not from Pascal but other high level languages like Prolog). I wrote my own Prolog interpreter with minimal footprint so I can still get an interactive prompt with a high level interface if I want to, but it is designed to be easy to expose C++ instead of the other way around.
- burntsushi 12y agoNot in the Go ecosystem. :-) We have a real, pure (concurrent) X client protocol implementation: https://github.com/BurntSushi/xgb https://github.com/BurntSushi/xgb (and of course, a WM: https://github.com/BurntSushi/wingo https://github.com/BurntSushi/wingo, which is hybrid tiling and stacking, kind of like Xmonad meets Openbox). /shameless plug Of course, it's not all moonpies and pennywhistles. XGB only supports basic extensions like RandR, Xinerama, Render and Composite. But it's missing Xinput and XKB (which are monstrous).
- bentrevor 12y agoWhen I saw this article, I thought "I bet burntsushi wrote it". I've been learning a lot from reading your Go code lately.
- burntsushi 12y agoHeh, thanks. I spent years of my life with X getting my perfect WM. I'm happy to say I got there. But I can't stomach much more of X. :-)
- pjmlp 12y agoI was actually looking for your code when I posted, but somehow forgot to refer to it in the end. Good work!