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

What the Media Misses: It's Not an NVIDIA Issue, Super Micro Computer Inc Also Fell From $45 to $26 in the Period NVIDIA Lost 33% of Its Faked 'Value', NVIDIA is Collapsing Like Intel
History goes in circles
Waste of Money: Giving More Money to Toothless Regulators That Don't Even Examine Evidence
Shame in SRA
At Microsoft, "Buyouts" or "Global Voluntary Separation Agreement" (GVSA) Not Much Different From Layoffs (Severance Shockingly Low)
From what we are able to gather, many people are leaving Microsoft 'voluntarily'
Is Microsoft the Next Fake-Valued Corporation to Lose 35% in "Market Value"? Is Slop Bringing Microsoft Down?
Will NDAs prevent people talking or journalists finding out the true cause?
Silent Layoffs at IBM (and Red Hat) Continue in November 2026
IBM's CEO is "a Palliative Care Doctor Who Slides [IBM] Gently Into the Night"
Links 13/11/2026: "Apple Support Community Forums to Permanently Close" and "The Slop Market is Getting Nervous"
Links for the day
 
The Real Issue With The Register MS is Not the Politics of Some Staff's "Tweets", It's That The Register MS Publishes Fake Articles for Sponsors (50,000 Pounds Minimum)
AWS and Google each pay millions for fake articles which beget journalistic bias too (they literally pay the salaries of the 'reporters')
Microsoft Total Cost of Ownership (TCO): We Need Accountability Because Many People Die and It's Because of Microsoft Diehards or People Bribed by Microsoft to Deploy Microsoft Where Lives Are at Risk
They're trying to save face right now
It's Not About China or Sex, It's About Corruption at NVIDIA and a Pyramid Scheme Perpetrated Under the Guise of "Hey Hi Revolution" (That Wasn't, It's Manufactured and Hyped by Bribes, Subsidised by Multi-Trillion-Dollar Loans, People's Pension Funds and More)
What's at stake here is a lot bigger than the "Ponzi hub" of Jensen Huang
No, You're Not a "Most Valuable Company" When Everything is Down for Half a Day in the Entire Planet
Still down, still no explanation (maybe they too aren't sure)
"Techrights Statement on Phoronix" Still Valid Five Years Later
Our position as stated in early 2022 has not changed
Vista 11's 'Growth' Has Stalled, It's Measured at Only 17.9% in the US This Year
That helps put in perspective Microsoft's attempt to discard almost 30% of its remaining workforce
"NVIDIA is Enron" (Subsidising the Pyramid Scheme That It Profited From), Microsoft is Next to be Down for the Count
Microsoft increasingly looks like the "next NVIDIA"
Richard Stallman Travels to South America to Give Talks About Free Software in Spanish, FSF Raises Money
The FSF is raising money (goal is $400,000) and the FSF has just mentioned the upcoming talks by the FSF's founder
United States Adding ~300 Billion in Government Debt Per Month, Wall Street Shaves Off Trillions in 'Value' in Less Than One Week
cushioning "assets" by helping them fake "value"
Microsoft: Pay Us for the Stuff That's Offline and We Cannot Fix
Learn to take control of the technology that you rely on
Links 13/11/2026: "Copyright-Strike-for-Hire" and "Stevie Wonder Photo Lawsuit"
Links for the day
The Slop Bubble (or Pyramid Scheme) Relied on Trust and Patience (Being Patient as Losses Grow and Debt Explodes, Trusting the Roadmap of Cheaters and Frauds)
Remember that it all began with trust
Anthropic's IPO Depends on $895.4 Billion in Debt (Money It Doesn't Have, It Loses Over 100 Billion Dollars Per Reporting Period), NVIDIA Has Just Lost Almost 2 Trillion Dollars In Value and Its Debt Trebled in Three Months
This coming week will be very, very entertaining for slop critics/sceptics to watch
Lorenzo Stoakes (ARM) the Latest of Many to Quit Linux Development Over Linus Torvalds' Obsession With Slop (Linus Wants to Work With Bots, Not Humans Who Understand Whatever Code They Write)
Linus caught the 'brain virus'
Microsoft Asks 60,000 Workers to Leave, Some Leave, Services Go Down
Microsoft laid off about 40,000-50,000 people in past years
Gemini Links 13/11/2026: Roku Exits the Smart Home Market and Poor Reporting/Journalism Regarding Slop Plagiarism
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, November 12, 2026
IRC logs for Thursday, November 12, 2026
Gemini Links 12/11/2026: A Firing of a Boss and Geminispace Growing Fast
Links for the day
Bill Epsteingate-Funded BBC "Totally Ignoring the $1.7 Trillion Wiped off NVIDIA Stocks"
Imagine how many pension funds are tied to this NVIDIA pyramid scheme
A Few Hours Before NVIDIA CEO Canned (and NVIDIA Shares Plunged) the NVIDIA-Funded The Register MS Published Paid Spam With "AI" 18 Times in It
Anything to inflate the bubble
Links 11/11/2026: NVIDIA Decapitated, "The Company That Published Fake Journalists in Sports Illustrated is Collapsing Dramatically"
Links for the day
Intercontinental Brigading - Part XXXXIX - We Didn't Start the Fire
It started in 2012
Photo Ops Are Liabilities
NVIDIA is not a "family business" and its CEO isn't some modest genius
NVIDIA’s Total Debt Trebled in Three Months!
Not the hallmark of a rich company unless its accounting is fraudulent
NVIDIA Turns Out to be Serial Cheater, Stock Plunges 33% in 5 Weeks
The "slop bros" have long relied on patience and blind faith
Adopting LLM Slop is Still Suicide
Suicide (in the literal sense) is also linked to adoption of chatbots
On Laundering Licences and Code
A "Second SCO" waiting to happen
The Cyber Show on Slop and the Ministry Of Truth in "Nineteen Eighty Four"
"cultural erasure" by slop
Intercontinental Brigading - Part XXXXVIII - Keeping Both Eyes on the Ball
One upside of these disputes is that they raise at least two very important issues concerning the law
Gemini Links 12/11/2026: Encryption is Easy, Human Emacs, and Legislation in Italy
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, November 11, 2026
IRC logs for Wednesday, November 11, 2026
Links 11/11/2026: End of Novaya Gazeta (Assassinated by Putin) and North Koreans Too Poor to Buy Rice
Links for the day
Gemini Links 11/11/2026: The Tyrant’s Moat and Rants About Slop Causing Problems
Links for the day
Links 11/11/2026: Skydance Games and Boeing Hit By Layoffs, "Time Out for Timeouts"
Links for the day
IRC is for Communities, Social Control Networks Are for Broligarchs (by Broligarchs)
Unlike Reddit, it's not a company
JavaScript is the Problem, Not the Answer
Making the Web better is about making things better, not slapping more JavaScript 'walls' at it
Intercontinental Brigading - Part XXXXVII - "Making a False Complaint to Police is a Crime." (British Cops Aren't American Mercenaries)
"In the United Kingdom, the Foreign Enlistment Act 1819 and the Foreign Enlistment Act 1870 make it unlawful for British subjects to join the armed forces of any state warring with another state at peace with Britain."
The Label 'Anti-AI'
They make it sound like opposing plagiarism or cheating is an act of intolerance or hatred
Intolerance and Violence
Intolerance in the software world is not a new problem
António Campinos Hiding From Staff Amid Strikes, Won't Participate in Dialogue
They voted to continue striking until Christmas
Silent Layoffs at IBM (Rolling Layoffs), Now Curbs on H1B (Mostly Indian Applicants)
Little will change at IBM except the gravity (global distribution) of its workforce will go east
Links 11/11/2026: Moving from Proton to Posteo and "Floating in Space"
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, November 10, 2026
IRC logs for Tuesday, November 10, 2026