xcb-studies/docs/Progress.md

45 lines
2.7 KiB
Markdown
Raw Normal View History

Resources used in the production of this program:
- [The XCB Reference from FreeDesktop](https://xcb.freedesktop.org/manual/index.html)
- [The Xorg Basic Programming with the XCB
Library](https://www.x.org/releases/X11R7.6/doc/libxcb/tutorial/index.html),
- [The KDE Source Code for
2022-02-25 01:11:01 +00:00
XCBWrapper](https://github.com/KDE/libkscreen/tree/master/backends), [Vlad Zahorodnii](https://github.com/zzag) et. al., ongoing.
- [The source code to xedgewarp](https://github.com/Airblader/xedgewarp), [Ingo Burke](https://github.com/Airblader)
- [C++ in a
Nutshell](https://www.oreilly.com/library/view/c-in-a/059600298X/)
Ray Lischner, O'Reilly Publishing, 2003
The sheer variety of sources I needed to cobble together an
understanding how the XCB library works is an example of what teachers
call [extrinsic
load](https://betterhumans.pub/skyrocket-your-learning-top-3-studying-techniques-based-on-cognitive-load-theory-1641b5e56508),
an unnecessary extra load on learning because the documentation is
poorly organized and lacks instruction. *Basic Programming with XCB*
is a
*[tutorial](https://www.writethedocs.org/videos/eu/2017/the-four-kinds-of-documentation-and-why-you-need-to-understand-what-they-are-daniele-procida/)*
oriented toward commonplace tasks, but peters out before getting to an
XCB extensions such as RandR. The reference is a *reference*; it
doesn't help you understand how to use the library. `XCBWrapper` is
an excellent example of how to use XCB, but it uses some fairly
high-level C++ to accomplish all that it does, and untangling the
relationship between the wrapper template, the macro that does wrapper
2022-02-25 01:12:52 +00:00
declarations, and the XCB Reference, was quite a challenge; once you
find the insight that XCB's declarations are all derived from a
massive XML file, you can start to understand that XCBWrapper exploits
the patterns produced by the derivative file, but it requires insight
and effort that's unrelated to understanding XCB in the first place.
This project does show the usual trajectory of one of my learning
exercises, especially since I'm fond of delving in places where no man
has documented before. I've dumped a ton of stuff into my brain and
now it's all starting to make sense. I also note that I'm doing
_better_ than a lot of the open-source examples, in that I'm batching
many of my requests before processing them. I'm not batching storing
the replies yet, but I don't see why that couldn't happen.
2022-02-25 01:12:52 +00:00
I did attempt at one point to start using `std::unique_ptr` to
automatically free `_reply_t` objects that XCB allocated for me, but
after playing with them for an hour or so my initial impression is
that I'm utterly thrilled with Rust's ergonomics. Just sayin'.