Bonum Certa Men Certa

GitHub-Free: Why fig No Longer Supports Pygame

Article by figosdev

fig 4.9



Summary: "I don't love the idea of trying maybe Tk instead. But Tk is at least responsible enough not to keep selling themselves to an aggressive monopoly that hates software freedom."

This story is more about GitHub than it is about fig, but I use fig more than anything else I've ever written -- it's basically my reference implementation of a language for teaching.



Because of this, I like it to set an example for all my other projects; whether they follow the example or not.

Fig goes back to version 0.4, it was always based on CPython, the standard and most conventional implementation of Python -- for fig 3.x it switched to Python 3.

"I hate when languages break a lot of things, as if nothing made previously with them matters."Each stage of fig was an experiment, though I rely on it and I've tried to keep it as stable as possible. I hate when languages break a lot of things, as if nothing made previously with them matters. In an industry, that makes enough sense. For hobbyists, that really sucks sometimes.

I use fig for both serious purposes (at the moment I've got a fig program running for 48 hours on a dedicated machine, processing over a million files) and for fun. I've enjoyed tinkering with graphics since I was a kid. Fig is what I use for that.

But for dealing with various kinds of files, Python 2 suits my purposes. After years of checking on options and tricks, I did my utmost to make fig Python-3 compatible, as an experiment. Fig really leans on the way that strings are expected to work in Python. I've gone through many tutorials, run 2to3, maybe you can make a language based on fig that uses Python 3. Have fun with that.

I have fig 3.x a serious chance -- I used it almost exclusively for half a year. After that I was working on a serious project and fig 3 started mishandling a file, I ran it with Python 2 instead and it worked better for my purposes.

"I use fig for both serious purposes (at the moment I've got a fig program running for 48 hours on a dedicated machine, processing over a million files) and for fun."That's why fig jumped right ahead to 4.x, the most recent version of which (until today) was from late 2017.

If Pygame is not installed, fig falls back on escape sequences -- it draws in the term instead. It's designed specifically to have fewer than 100 commands; I created an experimental (quite nice) "figplus" to try some new things. I'm still very happy with standard fig; the main features figplus adds are extra Pygame features and some neat handling of Python dictionaries. Both allow inline Python in fig programs, so you can define fig functions that access dictionaries as well.

Years ago I created a simple hack with inline Python to access the 16-colour palette (fig uses foreground/background 0-15/0-15, based on the CGA palette) and allow fig to do 24-bit colour without adding commands. I decided for many reasons I preferred this hack to making it a feature of fig -- but I made it a native feature in figplus:

function rgbcolor r g b
python
    figcgapal[0] = (r, g, b)
    fig
    fig


This changes colour 0, so the next time you draw it will use whatever RGB settings you like. You can change it back to 0, 0, 0 after that if you want.

I made four changes to the stable version of fig for the latest, and each change is related to GitHub:

1. Pygame is gone, even as an optional feature. This is a protest, if someone wants to fork fig to keep Pygame I'd be happy to help them do it. It's simple enough that they probably won't need it. The change is backward compatible -- commands that only did something when Pygame was installed, now do nothing even when it is. No code changes should be needed.

2. PyPy 2 is now used instead of CPython. This was likely to happen anyway, because the Python Foundation wants to force a language I don't care about. I knew a guy that worked at Nokia who felt the same way, but there are plenty of sound technical treatises on why strings are broken in Python 3. Don't agree? Then use what the Python Foundation tries to shovel at you -- most people do.

"...not only am I not interested in Python 3, it is also developed on Microsoft GitHub."However the reason is two-fold; not only am I not interested in Python 3, it is also developed on Microsoft GitHub. PyPy is not, and I hope it never will be. People who have Python 2 installed on the GNU operating system that want to continue to use it with fig only need to make a symlink; I'm not judging. If you have trouble with a symlink, copying your Python executable to something called pypy2 may help.

3. The arropen command already worked in both CPython and PyPy. However, PyPy doesn't close files read with .read() as I think it ought to, which means that after reading about 1000 or so files with arropen, PyPy complains about too many open files. It shouldn't be necessary, but fig 4.9 caters to PyPy by opening and closing files even when arropen uses .read(). As I said, the command works in both implementations. What's changed is that arropen should now work more reliably when under heavy use in PyPy.

4. I didn't just remove Pygame support, I tried to add something to make the GitHub boycott a little more fun. The hack that allows 24-bit colour in Pygame is now supported in text mode. If you don't include the hack in your program, figcgapal doesn't get modified (it can only be modified with inline Python; fig doesn't support identifiers that start with "fig") and fig does escape output the way it did before, with esc[0 or 1;(30 or 40 plus f)m.

"The screencap is also a jpeg, even though png would be better for this purpose. The reason is symbolic; png relies on zlib1g, which is on GitHub."If you use the hack, it changes the contents of figcgapal and fig uses esc[38;2;r;g;bm instead. This is designed to be compatible with existing code that uses the hack; fig now checks figcgapal against a copy that's made when the original is set. This was done in haste, and 4.8 is GitHub-free but the 24-bit feature didn't work until it was fixed (along with arropen) in 4.9, maybe 30 minutes later.

The screencap has fig 4.9 doing 24-bit output based on unmodified code, but I haven't tried it with a lot of code yet. The screencap is also a jpeg, even though png would be better for this purpose. The reason is symbolic; png relies on zlib1g, which is on GitHub.

Very few people have any idea just how much everybody is relying on GitHub right now. Although it may not be possible to get away from it (or Microsoft) completely, and removing Pygame from my favourite programming language may seem ridiculous, I don't think it's nearly as ridiculous as putting all our free software eggs in Microsoft's giant basket. We need to Delete GitHub. If it turns out that we can't do it entirely, we should at least consider our options. I'd rather sacrifice Pygame than use a canvas that Microsoft controls.

"Very few people have any idea just how much everybody is relying on GitHub right now. Although it may not be possible to get away from it (or Microsoft) completely, and removing Pygame from my favourite programming language may seem ridiculous, I don't think it's nearly as ridiculous as putting all our free software eggs in Microsoft's giant basket."To the Pygame devs: I love SDL (I love DOSBox! Which probably still uses SDL, but did when I created fig). I never preferred to use anything other than Pygame for fig graphics. I don't love the idea of trying maybe Tk instead. But Tk is at least responsible enough not to keep selling themselves to an aggressive monopoly that hates software freedom. I figure any graphics will likely pull in libffi (GitHub) though you're developing there directly. Please reconsider your reasons for this! Don't sell out your users to the GIAFAM trap.

Long Live Stallman, and happy hacking.

Licence: Creative Commons CC0 1.0 (public domain)

Recent Techrights' Posts

Mass Layoffs at IBM, But Mostly in Secret (PIPs and 'Voluntary' Redundancies)
Gerstner laid off a record number of people; Krishna tries to find 'innovative' new ways to cause workers to leave
Secret Layoffs at Microsoft, Apparently More Sites Will Shut Down Entirely
vindicates us and serves to affirm what we've said for over a month
SLAPP Censorship - Part 156 Out of 200: Brett Wilson LLP Becoming Wilson FC
Now acting almost like one-person shop (lots of staff has fled this past year)
 
Sources-First Publication
Thank you for keeping us on track
Ubuntu is Not Linux
I was one of the first users of Ubuntu
Links 21/08/2026: Outrage Over Politicians Who Support Slop-Feeding Data Centres, "America Is About to Get More Expensive"
Links for the day
Gemini Links 21/08/2026: Rain Coming Back and "Small Internet"
Links for the day
Slop-ware: Nobody Knows What Code Goes Into Linux and Most Developers Cannot Understand the Rust Code (Even If They Tried)
So nobody is in charge
The Slop Pyramid Scheme (Not Boon!) Isn't Good for GNU/Linux, Even If the Plagiarism Engines (Framed as "Training" or "Intelligence") Almost Always Run GNU/Linux
We need the slop pop - we need the bubble to pop
North America: GNU/Linux Measured at 13%-15% Every Night
many (north) Americans use GNU/Linux at home and are using it to access the Web in the small hours of the morning
Links 21/08/2026: "Silicon Valley’s Billionaire Cults Are Coming for Democracy" and "Who’s Raking it in as the National Debt Explodes?"
Links for the day
SLAPP Censorship - Part 157 Out of 200: What is a 'Defamation Troll'?
"Defamation Mill" also
Northern Europe Leads the Pack in Abandoning Windows After Threats Made to Greenland (Says Clownflare Data)
Clownflare has a vast trove of data, so it cannot be easily dismissed as pure nonsense
Clownflare: In Past 12 Months Microsoft Windows Fell From ~80% to ~75% on Desktops/Laptops in Asia
Microsoft is deep in debt
The State of Slopfarms About "Linux" in August 2026
The Web needs serious cleanup, which curation can help deliver
IBM Offers Workers Some Money to Fire Themselves, It's Called "Next Step" and It's Allegedly 'Extended' (Not Enough Fools Have Fired Themselves)
Will IBM executives - including the CEO - ever be held accountable?
£5 Million Unsolicited/Undisclosed Bribes and What That Means to British Politics
It still remains unknown (disclosure denied) who helps fund the £1 million lawfare against us
[Satire] Pocock, Binface & nobodies vs Farage: defamation before UK High Court
Reprinted with permission from Daniel Pocock
The IBM Censorship Team, PIPs (Silent Layoffs) in IBM Europe
There seem to be many de facto layoffs going on at IBM right there
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, August 20, 2026
IRC logs for Thursday, August 20, 2026
Gemini Links 21/08/2026: "Ensmallening the BigWeb", "Rust Dependencies"
Links for the day
Links 20/08/2026: 'Linux' Foundation Promoting Slop Hype for Money (Hype as a Service), Malaysia’s Exports Jump 38% Year-on-Year
Links for the day
Gemini Links 20/08/2026: A "Break From Routine" and "Modem Was the Problem"
Links for the day
Clownflare Reckons GNU/Linux is on Almost 1 in 10 Laptops/Desktops in Western Europe
Western Europe and China are leaving more of GAFAM behind them
Looking Ahead at September
Rianne and I look forward to a productive September
Links 20/08/2026: Facebook "Ran Ads for an App That Promised to Nudify Female Politicians" and Facebook Faces "Social [Control] Media Addiction Trial"
Links for the day
Clownflare Sees GNU/Linux at 16% Market Share on Desktops/Laptops in Tajikistan
in Tajikistan it seems like adoption of GNU/Linux is exceptionally high, based on a very large data set associated with Web access
The Demise of Social Control Media Continues
Entering (anew) social control media in 2026 seems foolish
SLAPP Censorship - Part 155 Out of 200: Throwing Stones in Houses Made of Glass
character-assassination-as-a-service
Gemini Links 20/08/2026: Planners, Pantsing, Vinylyssee
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, August 19, 2026
IRC logs for Wednesday, August 19, 2026
Gemini Links 19/08/2026: "Big Boost in Autonomy" and "Answer of E-Mail"
Links for the day
Firefox in Trouble in the US, Down to Lowest Level in 20+ Years
more sites will stop or intentionally neglect Firefox support
Clownflare: More Than 1 in 5 Laptops or Desktops in El Salvador Run GNU/Linux or ChromeOS
Clownflare Radar reckons it's more like 20%+ now
SLAPP Censorship - Part 154 Out of 200: Computer-Generated Legal Filings From Men Who Are Salaried by Mass Plagiarism Companies in Another Continent (America)
This isn't the behaviour of a moral person but of some sort of "crypto bro" or "slop bro"
Fired by IBM for Medical Leave, Rampant Censorship of IBM Critics Explained
We've already caught and showed many cases where thelayoff.com deleted comments that were not even remotely racist
Links 19/08/2026: First Amendment Under Fire by White House of Cards, "Universities Were Forced to Pay Up" for Not Censoring
Links for the day
Gemini Links 19/08/2026: What Friendship Means, Sm0lNet/SmolNet, and New Feeds
Links for the day
Omarchy is Already Dying
Same as the life cycle of slopfarms
No, WSL (Windows With Fake 'Linux') Isn't Growing Faster Than Ubuntu, This Was Disinformation Spread by a Microsoft Propaganda Site, Then Spread by Slopfarms
Be sceptical; Microsoft is truly desperate for anti-Linux spin right now, seeing that Windows is in a freefall
Microsoft's Mass Layoffs Impact the Ability to Run Microsoft
Can Microsoft still run Microsoft?
Microsoft's Active Directory ("AD") and "Entra" Are National Security Threats
Even the US government concluded Microsoft could not be trusted for security; it issued a formal report about it in April 2024
Instant Impact: GNU/Linux Skyrockets to 10% in China Days After Policy Changes
Let's see what the 'aftermath' looks like by year's end
Links 19/08/2026: Timothy James King (AmigaDOS) Dies, GitHub Goes Offline, Finland Wants to Shun Social Control Media
Links for the day
Slop's Achilles Heel: It Increases the Workload, Not Just Costs
Set aside its inability to scale well
Improving techrights.org
Technical debt (like 17 years with WordPress) is something that's better to address early, not later
Mass Layoffs at Dropbox, Blame the Debt, Not Slop Hype
The debt of Dropbox Inc., which isn't an imaginary (estimated) thing, is over 4 billion dollars
Microsoft is 'Angel of Death' to Developers (Even Its Own), 'Voluntary' Layoffs Happening Again
From what we are hearing and reading, there are 'voluntary' layoffs again
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, August 18, 2026
IRC logs for Tuesday, August 18, 2026
Gemini Links 19/08/2026: Shirts, Handwriting, and Fights in Geminispace
Links for the day