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

Father of XBox Says What Microsoft Does Not Want to Hear About XBox (They All Know It's Dead)
Microsoft just worried shareholders will find out Sharma is "just a face" and an undertaker
France Needs to Focus on Software Freedom, Not Flags
We need more SIP advocacy!
Combatting Censorship in the "Civilised World": The Media Blackout Surrounding EPO Strikes and Other Large-Scale Actions
We - collectively speaking - cannot afford to keep the Office in the hands of a "Mafia"
EPO Strike Actions and Other Industrial Actions Are Effective When Management Fears the Staff and Staff No Longer Fears Any Managers
'António the unready' should get ready to be ousted
IBM Did Not Fall Because of COBOL Vapourware, IBM Still Collapses Because It's Worthless, Way Overvalued, and Very Likely Cooks the Books
language-to-language conversion (in the context of programming) is nothing new
Quitting Reddit (Social Control Media Controlled by Conde Nast)
There is a new post in Reddit
Links 24/02/2026: Telephone Turns 150, Political News Catchup, and Rearmament
Links for the day
 
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, February 24, 2026
IRC logs for Tuesday, February 24, 2026
Gemini Links 25/02/2026: Rise of Solar in 2025 and Smallnet Protocols
Links for the day
HR Blunder at IBM or IBM Struggling With Money?
Weird for such an allegedly rich company to be so stingy
Gemini Links 24/02/2026: x86 Computer In-Browser and Administration
Links for the day
Envy is the #1 Enemy of Richard Stallman
Whenever you see someone mocking Richard Stallman, ask yourself: does this person have a reason to be jealous of Richard Stallman?
Life is Sweeter When Less Means More
People need to think "small", not "big" (as in capital)
Championing a Cause
Probably over 100 million GNU/Linux users on laptops/desktops
Balmoral rape cult & Debian suicide cluster indifference, community
Reprinted with permission from Daniel Pocock
Can Much Longer Can the Financial 'Press' (Pump-n-Dump Megaphone) Cheer for IBM's Accounting Enigma?
IBM has fallen almost 25%
Religious or Not, Consider Quitting Social Control Networks (All of Them) This Season
Lent is a good time to quit addiction such as social control media
Liberating the Self From the Invisible Prison of Plutocrats-Controlled Media and Social Control Media
Can you always see the full picture or does something (someone powerful) obstruct it?
Links 24/02/2026: Drug Cartel Decapitated, Jeffrey Epstein-Connected 'Linux' Foundation Promotes Slop and Buzzwords at MWC Barcelona 2026
Links for the day
2023: Layoffs Are Because of "AI". 2024: Shares Up Owing to "AI". 2025: Shares Recently Fell Due to "AI". 2026 Forbes (Paid by IBM): Shares Falling is Good!
"AI" is smoke and mirrors
Bitcoin: Code of Conduct stifled open source concerns
Reprinted with permission from Daniel Pocock
Slop Boosters and 'Hype Agents' Render Themselves Irrelevant and the General Public Becomes Incredulous Due to "Bros Who Cry Wolf!"
It won't age well
"Half-baked Vibe Code Shipped Full of Errors"
Seems timely after our latest article
Links 24/02/2026: Copyright Litigation Over Anne Frank’s Diary, "Arrogance of Developers"
Links for the day
Another New Low for Solicitors Regulation Authority (SRA): Authorising Slop Disguised as "Legal Advice"
SRA is a lapdog - not a watchdog - of the "litigation industry"
EPO "Cocaine Communication Manager" - Part IV - "Many Jobs Were Given to Spanish Employees for No Related Skills At All"
The EPO's fate might be similar to that of the XBox
Gemini Links 24/02/2026: Hardware Tinkering and Slop Bots Attacking the "Small Web"
Links for the day
IBM is the World Champion at Layoffs and There Are Reportedly More Layoffs in IBM This Month (EU)
IBM fired 60,000 in 1993
Free Software is for Everyone
Young and old, rich and poor etc.
Gemini Links 24/02/2026: Voltage Divider on Slide Rule and Many Raspberry Pi Projects
Links for the day
Asha Sharma "a Palliative Care Doctor Who Slides Xbox Gently Into the Night"
2026 will probably be the last year of XBox
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, February 23, 2026
IRC logs for Monday, February 23, 2026
Probably IBM's Worst Day in Wall Street in Well Over a Decade
They try to blame some Anthropic slop, but that's just a distraction from IBM having nothing to offer
The Monday After the 9PM-on-Friday Prepared Puff Pieces-Under-Embargo Microsoft Strategy for XBox Collapse
There are more layoffs ahead at Microsoft's XBox
Kyndryl Also in a Freefall Today, James Kavanaugh's Accounting Skills Seem to be Based on Pumping and Dumping
What is the real value of Kyndryl when its debt is about twice its alleged "worth"?
Not Much Left to "Pump" in This Slop Bubble
let's hope that by the end of the year the whole bubble fully implodes
IBM Common Stock Crashes Hard (Almost $100 Below the Levels of February's Beginning)
Another Kyndryl?
Links 23/02/2026: Withdrawal From Slop and Ukraine Invasion Enters Fifth Year
Links for the day
Gemini Links 23/02/2026: Moving to Gentoo, Wake-on-LAN Script
Links for the day
Kyndryl Fell by About 50% in One Day, IBM Fell 23% in 20 Days
the IBM Titanic
Security and blobs, by Alex Oliva (GNU Linux-Libre)
Reprinted with permission from Alex Oliva
Trusting the Evil Maids
Don't listen to liars and frauds
Aaron Swartz Has Already Explained What Reddit/Conde Nast Meant to Him and Why We Should All Avoid Reddit If We Value Software Freedom
Aaron Swartz did not start Reddit
Valnet's Good Legacy of GNU/Linux Advocacy in Journalism Form
Let's hope they carry on like this
Techrights Thanks Every Single EPO Worker Who Went on Strike Today
We have so much in common
Coders and Thinkers
I used to be a hyper-productive coder; these days I do more thinking and writing
Slop (So-called 'genAI') is Not a Skill, Slop Gets You Suspended or Even Sacked, It Can Eventually End Your Career
Benj Edwards, a so-called 'Senior' so-called 'AI' so-called 'Reporter'
There is No Such Thing as "AI Skills", "AI Competency", "AI Fluency" Etc.
Slop does not give anybody an advantage
EPO Staff Union: The Strike Actions and Other Industrial Actions "Have Already Delivered Measurable Gains."
SUEPO Munich has just issued a statement to staff
Links 23/02/2026: "What Boston Will Cost Me" and Women as Hostages
Links for the day
IRC Usage Levels Seem to be Rebounding This Year
it looks like the total count (tally) of users increased a lot lately
Microsoft Tricked the Media Into Lying About Microsoft Layoffs in January. Now It Does the Same (in February).
Microsoft has got the media by the wallet (or balls)
Free Software Projects Become Slow Due to Slop
It does not improve efficiency or productivity, it reduces both
EPO Strike Has Begun (or Resumed)
The EPO status quo is untenable
Links 23/02/2026: US Surrenders to Climate Change (to Benefit Oil Companies and Slop), UK Court of Appeal to Hear Mazur
Links for the day
GAFAM Jobs No Longer Lucrative
Those days are long gone
Based on Insider Leaks, Asha Sharma's Job is to Kill XBox While Talking About "AI"
They cite SneakerSO
Germans Recognise the Contagion is Digital, Not Racial
How to dismantle or neutralise those weapons? Turn them off
Free Software (or Software Freedom) Ain't No Religion
It's hardly surprising that some of the loudest opponents of Software Freedom and its luminaries also disregard or bend facts
Dr. Andy Farnell Explains Why the Slop Industry is Like Trespassers and Thieves
interesting new article about robots.txt files
The Demise of the Solicitors Regulation Authority (SRA) and Profession Based Around Bullying With SLAPPs and Empty Threats
For press to survive and thrive in the UK we need the hired gun to be submerged
Linux Kernel 7.0 Release Candidate Comes Out, Stallman Turns 73 in Three Weeks
It predates Microsoft and Apple
In Greenland, Firefox's Gecko and KHTML (KDE, But Bastardised by Apple) Bigger Than Chrome
Are those Danes recognising the risk of monoculture?
Gemini Links 23/02/2026: Imperfect Journal, Evil, and "Progress Goes Boing!"
Links for the day
“Power is a Thing of Perception. They Don't Need to be Able to Kill You. They Just Need You to Think They are Able to Kill You” ― Julian Assange
When leadership becomes corrupt enough to lose a sense of authority its days are numbered; it'll be replaced
IBM Has Already Admitted 2026 Mass Layoffs (in 4Q Earnings Call)
We showed this earlier this month, but some people bring that up again
Reasons to Go on Strike in the European Patent Office (EPO)
If you live in Europe and don't work for the EPO, you can still help
First speech of Chanellor Hitler, Andreas Tille & Debian denounce Branden Robinson
Reprinted with permission from Daniel Pocock
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, February 22, 2026
IRC logs for Sunday, February 22, 2026