Skip to content

Instantly share code, notes, and snippets.

Avatar
🏢
Hybrid Work

Alice Zoë Bevan–McGregor amcgregor

🏢
Hybrid Work
View GitHub Profile
@Enichan
Enichan / interpretoy.html
Last active Dec 16, 2021
Interpretoy: a toy lisp interpreter with REPL built in javascript
View interpretoy.html
<html>
<head>
<title>Interpretoy REPL</title>
</head>
<body>
<script>
// based on lispy by Peter Norvig: http://norvig.com/lispy.html
function load(source) {
@amcgregor
amcgregor / ddelange-pip-constraints.md
Created Jul 28, 2021
Particularly interesting comment by ddelange on resolving Python packaging version complexity issues using pip's constraints functionality.
View ddelange-pip-constraints.md

From: pypa/pip#9187 (comment)

could there be an easy option that forbides pip-21.2.1 to downgrade any already installed package (like specifying the existing packages version as a minimal constraint >= ) ?

@stonebig if you still have your pip cache populated, there is a way to achieve it without spamming the pypi registry: you can use the output of pip freeze and feed it to your pip command with an additional -r (it can be used multiple times):

pip freeze | sed 's/==/>=/' >> ./constraints.txt
pip install <some-new-package> -r ./constraints.txt
@amcgregor
amcgregor / 1-#webcore.log
Last active Jun 7, 2021
Goodbye Freenode. It was a mostly-fun 15 years.
View 1-#webcore.log
# "Official services" forced out of channel, usurper joins and gains control.
[2021-05-25T23:04:14-0400] ChanServ (ChanServ@services.) left the channel
[2021-05-25T23:04:17-0400] freenodecom (~com@freenode/staff) joined the channel
[2021-05-25T23:04:17-0400] freenodecom sets mode +o freenodecom
[2021-05-25T23:04:17-0400] freenodecom changed the topic to This channel has moved to ##webcore. The topic is in violation of freenode policy: https://freenode.net/policies
[2021-05-25T23:04:17-0400] <@freenodecom> This channel has been reopened with respect to the communities and new users. The topic is in violation of freenode policy: https://freenode.net/policies
# All channel modes reset (bans, quiets, …)
[2021-05-25T23:04:17-0400] OperServ sets mode +o freenodecom
[2021-05-25T23:04:17-0400] ChanServ sets mode +imnpscf-bbb ##webcore *!*@*shell/* *!*@*.powered.by.lunarbnc.net $a:average
View freenode-irc-drama-and-goodbye.md

hi, and goodbye

The past few weeks has not been fun on IRC, the drama based on false information and assumptions has been insane. I've almost entirely been silent on the drama because I know the fallout that would happen if I spoke up.

A quick TLDR - I'm quitting all IRC development. KiwiIRC project lead, IRCv3 technical board, supporting the multitude of IRC networks, the lot.

Many people seem to think that I am supporting one side in everything that is going on, so just to be clear: I am not supporting any side of the current freenode drama - there is so much false information going around from everywhere that it is impossible to support anybody.

Woo freenode drama

View freenode-faq.md

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

View On freenode's independence.md

It appears that rasengan (Andrew Lee) of Private Internet Access believes that ownership of the company Freenode Ltd. gives him the right to unilaterally replace the current staff team.

We may have had our disagreements with staff, but freenode being run by a volunteer team, using servers provided by sponsors, is a key reason that we appreciate freenode.

As such, we do not believe that such a unilateral replacement by a corporate interest is appropriate.

If this attemped takeover by Andrew Lee continues, we will be advocating to move our communities elsewhere.

Context: Fuchs' leaked (not by him) draft resignation letter that caused Andrew Lee to come onto #freenode: https://fuchsnet.ch/privat/fn-resign-letter.txt

View resignation.md

IRC friends, enemies and others,

Control of freenode has recently been seized by the proprietors of Freenode Limited, a holding company established by a previous head of freenode and a third party as part of a deal with a corporate sponsor. The terms of that deal were not disclosed, and remain unknown to me.

At the time, we, freenode's volunteer staff, were given informal guarantees that staff retained operational control of the network. The same guarantees were repeated after leadership was passed on to a new head of staff. I don't

@amcgregor
amcgregor / ot.py
Last active Jun 28, 2021
A declarative description of Operational Transform (OT) operations developed with the context of Quill's Delta format for representation of rich text content changes.
View ot.py
"""An implementation of the Delta text markup format using MongoDB as back-end storage.
For details, please see:
- https://quilljs.com/guides/designing-the-delta-format/
- https://quilljs.com/docs/delta/
"""
from collections import deque
from weakref import proxy
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active Sep 28, 2022
Files for PlayStation BIOS Files NA-EU-JP
View PlayStationBIOSFilesNAEUJP.md
@rendarz
rendarz / zip_longest_last.py
Last active Dec 5, 2020
Consume multiple iterators, filling each when exhausted with the last value they produced.
View zip_longest_last.py
def zip_longest_last(*args):
"""Consume multiple iterators, filling each when exhausted with the last value they produced."""
line = []
# CREATE a list of iterators of iterable objects passed as args.
iters = [iter(it) for it in args]
active = len(iters)
lasts = [None]*active
# CREATE a generator that yields the last item forever.
def take_last(index):
while True: