Reviving Old X Code
keithp.com
keithp.com
"In 2011, O'Reilly awarded an open source award to Packard, as "the person behind most of the improvements made on the open source desktop in the last ten years at least."" -- https://en.wikipedia.org/wiki/Keith_Packard
The single fact that he's doing RISC-V work at SiFive boosts my confidence in what they're doing.
What does this mean? It's like a remote desktop or something?
You run code on multiple machines (which might not even have any graphics devices or the concept of a "desktop" there) where each program might display graphical results in windows on your machine.
so you start up your app, and query what kind of display you're connected to - there is all kind of cruft about color models and bitplane depths. choose fonts, register for events (mouse, resize, etc), draw your elements and wait for the user to interact with you.
it makes absolute sense in the context of the early 90s 'lets make this a network api' - and almost none from a modern perspective
as bloated as the browser model is, i think shipping code to run on the users machine is a much more powerful model... if you can keep it small and deal with the security issues.
Sadly playing around and learning how it works is trickier than it used to be now that X doesn't listen over TCP by default (...because the protocol is unencrypted and unauthenticated... can't argue there), but google "SSH X forwarding" for a reasonable startpoint that's still fairly universally supported (you can even get X servers for Windows that work with PuTTY, and it all works natively on Linux and macOS).
I eventually tracked it down, Xaw3dXft operates in compatibility mode by default. A oneline patch enables all the new features, and makes a world of difference.
Here's a screenshot, I think it's night and day: https://twitter.com/taviso/status/1344779126767435776
I mailed a patch to the maintainer, hopefully the next version will fix it!
I guess, in Windows case it also should be relatively easy?
Mac OS would be a complete rewrite though, no salvaging that.
And that's assuming running under X.Org.
As for Win32, if the application didn't do stupid things like setting bitflags that were "reserved for future use", things apparently work without recompile for basic GUI from 1.01 to Windows 10.
The problem is that a lot of software... disregarded the specs. Including infamously using "reserved for future use" areas of bitfields, which for example caused a lot of app crashes during early days of Windows 95 (where certain common API gained a new flag that was not compatible with previous flags, which worked fine so long as you didn't set them concurrently - which all properly written applications avoided.)
I run a lot of older software, especially (though not only) games and i often have to do such workarounds like wrapper or replacement libs. I've also tried running older stuff on Linux (e.g. i have a collection of Linux game demos from the late 90s to early 2000s) and while most stuff run, you do need to find and install a bunch of missing libraries and wrappers (e.g. for OSS support).
I bet you could get a NeXT application from the early 90s running without too much pain.
macOS doesn't have support for any of these.
I found this out when I tried porting Tim Berners-Lee's WorldWideWeb to macOS as a weekend hack.
https://github.com/dbremner/cake is a 16-bit Windows 1.0 application that I ported to Win64; most of the changes weren't required.
Also I wondered from the headline why keithp is into XCode - might be better to have used X11 code instead.
So, no?
Yeah, dismissed it first thinking it was about appleIDE, really glad it dawned on me it's about X, good article.
Mille Bornes was invented by Arthur Dujardin (using pen name Edmond Dujardin), illustrated by Joseph Le Callennec, and first released in 1954 [0]. Dujardin died in 1964 [1], so using EU copyright term of author's life + 70 years, its copyright would expire in 2034. Le Callennec died in 1988, so copyright on the original illustrations would expire in 2058. (I don't know how dependent the illustrations in the computer game are on the original.)
I'm not sure who currently owns the copyrights to the original card game. But Dujardin founded the Dujardin company which still sells Mille Bornes [3] so I would assume they still do. Since 2007, the Dujardin company has been owned by the French TV network TF1 [4].
The copyright owners to the card game have probably never heard of this obscure non-commercial computer game. Who knows if they'd react to it indulgently or not.
[0] https://en.wikipedia.org/wiki/Mille_Bornes but actually the French article has a lot more information: https://fr.wikipedia.org/wiki/1000_bornes
[1] https://fr.wikipedia.org/wiki/Edmond_Dujardin
[2] https://fr.wikipedia.org/wiki/Joseph_Le_Callennec
[3] https://www.jeuxdujardin.fr/produit/milles-bornes-pegboardab...
My dad has a naval-themed clone of Milles Borne, which we played a lot when I was a kid:
https://boardgamegeek.com/boardgame/6806/nautic-miles
I liked it so much that when we had a school project to make a game, I made a space themed clone of that!
IANAL either, and you may well be right, but maybe this is the sort of question in which the answer may depend on which country's laws we are talking about? Even if what you say is true in country X, it might not be true in country Y.
> You may have a registered tradermark on the name an logo
Indeed, Dujardin SAS owns a registered US trademark on the phrase "MILLE BORNES" for a card game – https://tsdr.uspto.gov/#caseNumber=72156515&caseType=SERIAL_... – applied 1962, granted 1965, last renewed in 2015 (up for renewal again in 2025).
I don't know whether a registered trademark on a physical card game applies to a computer version of it, but I would suspect it does.
Not really; through WIPO, the US has "rationalized" every other signatory nation's IP laws to match its own. And pretty much every country that has any IP to protect, is a member of WIPO.
Some countries (e.g. China) might not bother to enforce their IP laws as strongly as the US does; but they do still have those very same IP laws, rather than materially-different ones.
That's not really true though, there are some real differences between copyright laws in different countries:
* US copyright law appears to recognise the ability of a copyright owner to relinquish their copyright to the public domain pre-expiration, German copyright law denies them that ability
* US copyright law has the concept of fair use; Australian copyright law lacks the concept of fair use, although it does have the significantly narrower concept of fair dealing
* Most EU countries recognise the concept of "moral rights of the author" in their copyright law, US copyright law generally speaking does not (it does for copyright on visual arts works under The Visual Artists Rights Act of 1990, but not in general)
* EU has the concept of a database right, which protects the contents of a database from copying even if the work of assembling was mere "sweat of the brow" involving no originality; the US does not, and mere "sweat of the brow" does not meet the copyright standard in the US (see Feist vs Rural Telephone Service Co)
* US law says that accurate photo-reproductions of public domain 2D works are themselves public domain – see Bridgeman Art Library v. Corel Corp – there is no independent copyright in the photo since there is no originality involved (selection of camera angles etc), and mere "sweat of the brow" is not enough for a copyright to exist. It appears – although not completely settled – that UK law, by contrast, has a weaker threshold of originality, such that mere "sweat of the brow" is enough. This was the crux of the dispute between the UK National Portrait Gallery and Wikipedia. Since it never went to court, we can't know for sure what the UK law actually is on this topic
* UK law provides special protection to specific works. For example, even though Peter Pan is out of copyright, there is special legislation requiring commercial productions based on certain Peter Pan works to pay royalties. Likewise, there used to be an "eternal copyright" on the King James Bible and Book of Common Prayer – that "eternal copyright" has been abolished, but still applies by a grandfather clause until the late 2030s. By contrast, the idea of specific works being legislated special IP protection is rather unheard of in the US (outside of trademark law, wherein the US does it too)
There's a lot more fiddly little differences. The Berne Convention, WIPO, TRIPS, etc only mandate the broad outlines of IP law, the fine details are up to each country and different countries do different things. Every country has its own statute law and case law and differences inevitably emerge
Just going to leave this right here... https://web.archive.org/web/20210103182219/https://keithp.co...
- Are vector graphics drawn by the X toolkit, or is the bitmap transferred in uncompressed form to the X server for drawing?
- The same regarding antialiased fonts: does the antialiasing happen at the client, or the server-side?
I would tend to guess that both happen at the client side, which ends up transferring bitmaps to the server. There's hardly any advantage to X's architecture if you end up transferring bitmaps...
I never understood why they didn't include proper font rendering and Cairo into the server. This would not only solve a lot of issues like mixed dpi rendering and vastly improve network transparency but would also eradicate duplicate effort and fragmentation in the toolkit space.
So this is not necessarily true, it depends on how you're using Cairo. If you're using Cairo's xlib surfaces, those will try to accelerate with XRender if that's available: https://cairographics.org/manual/cairo-XLib-Surfaces.html
As far as why the toolkits never got on board with it, some do actually use XRender in certain circumstances, but it's hard for all applications to make use of it properly. Most of the advantages go away if you have any images coming down the pipeline at all, or if you need to do any text layout or reading back from the pixmap, or if you have any GL/Vulkan usage in your application, etc. Plus historically I've heard the implementation of this was very inconsistent and on some servers it actually resulted in a slower rendering path, although this should not necessarily be the case if you're using the current Xorg with glamor enabled.
The XRender extension does all the rendering client-side. The one exception are glyphs which are rendered by the client only once and than stored in the server.
XRender also does not solve the problem that a line from A to B will/should look completely different on displays with different dpi / color space / subpixel arrangement.
> if you have any GL/Vulkan usage in your application
The original implementation of OpenGL on X11 was GLX by Sgi which serialized all the OpenGL commands and was completely network transparent as a result. Considering the fact that all the communication with the GPU is serialized via PCIe anyways there is no reason this shouldn't work with reasonable performance today when done right.
I'm not sure where you heard this, but it's not correct, you might consider checking the extension spec and the implementation in the server:
https://www.x.org/releases/X11R7.7/doc/renderproto/renderpro...
https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/re...
The reason why it's not used in all cases is because it doesn't map 1:1 to cairo and there are things missing, e.g. curves probably being the most important. You would have to ask Keith for a definitive answer why this is since he wrote both XRender and Cairo. (I assume it's because Cairo already included the necessary tessellation steps at the time)
Indirect GLX does work great for simple use cases, once you start to add textures into the equation the amount of bandwidth used would probably make it unusable over the network. There has been no serious work in getting indirect GLX working past OpenGL 1.x. I think another one of the main problems is that nobody really came up with a good way for GL extensions to work well there, the server needs to manually add an implementation for every extension you want to use.
one if the new cards says vehicle prioritaire. given card names are in French should be vehicule prioritaire i guess....