Slides to follow along
Other work: JupyterLite, autograd
, and the PyBaMM ecosystem (Python Battery Mathematical Modelling)
A wheel is a ZIP file that contains:
.py
files)package-1.0-py3-none-any.whl
├──package/
│ ├──__init__.py
│ └──lib_package.so ← binary file!
└──package-1.0.dist-info/
├──METADATA
└──WHEEL
pydistcheck
A tool and a linter for examining built files in Python distributions (source distributions and wheels)
Many thanks to James Lamb (@jameslamb
on GitHub) for authoring it!
Debug symbols are added during compilation, if you don't strip them.
strip
utilityRemoves debug information from binaries
What it removes
Why strip binaries?
$ pydistcheck --inspect ./dist/*.whl
[compiled-objects-have-debug-symbols] Found compiled object
containing debug symbols. For details, extract the distribution
contents and run 'nm -a "lightgbm/lib/lib_lightgbm.dylib"'.
errors found while checking: 1
🤔 ...but the binary was stripped!
nm
's output$ nm -a "lightgbm/lib/lib_lightgbm.dylib"
0000000005614542 - 00 0000 OPT radr://5614542
radr://5614542
The “black hole” of users’ bug reports
Used as an internal ticketing system, too
Bug reports were not natively searchable and this hasn't necessarily been acted upon
For bugs across the web, iOS, macOS, and all other Apple devices and software; from compilers to end-user apps
But where is Apple’s source code?
https://opensource.apple.com/source/cctools/cctools-822/misc/strip.c
https://opensource.apple.com/source/cctools/cctools-973.0.1/misc/strip.c.auto.html
https://opensource.apple.com/source/cctools/cctools-751/misc/strip.c.auto.html
https://github.com/opensource-apple/cctools/blob/fdb4825f303fd5c0751be524babd32958181b3ed/misc/strip.c
taken down, no longer accessible
not the same code; various commits in the version control history are lost
{
/*
* If there is a chance that we could end up with an indirect symbol
* with an index of zero we need to avoid that due to a work around
* in the dynamic linker for a bug it is working around that was in
* the old classic static linker. See radar bug 5614542...
*/
if(new_nlocalsym == 0 && nindirectsyms != 0){
len = strlen("radr://5614542") + 1;
new_strsize += len;
new_nlocalsym++;
new_nsyms++;
hack_5614542 = TRUE;
}
The solution: add a dummy symbol at index 0 to prevent dynamic linker confusion
The original problem
The fix
radr://5614542
, a harmless dummy symbol at index 0What I tried to find:
The result:
Hours of digital detective work to understand a 20-year-old workaround
critical knowledge is disappearing from the world
Attacks on gender identity, DEIA initiatives, and LGBTQIA+ content
Research funding cuts
Takedowns of critical research data
almost lost to bureaucratic indifference
left-pad
package removal incident from npm
module.exports = leftpad;
function leftpad (str, len, ch) {
str = String(str);
var i = -1;
if (!ch && ch !== 0) ch = ' ';
len = len - str.length;
while (++i < len) {
str = ch + str;
}
return str;
}
October 26, 2009 - Digital apocalypse
🌐 The web's first mass extinction
38M sites gone forever
190M hours of human creativity
Lost annually due to poor knowledge sharing [1]
Per company annually (30K employees on average) [2]
The hidden cost: Teams spend more time recreating knowledge than creating new solutions
[1] International Data Corp, 2017; [2] Panopto 2018
Key preservation strategies:
Automated ingestion from multiple sources
Geographic distribution and redundancy
Rich descriptions and provenance tracking
APIs and tools for discovery
Long-term integrity and migration
Tools: Archivematica, DSpace, Fedora, LOCKSS
Thank you for your time! Please feel free to say hello!
in/agriyakhetarpal
agriyakhetarpal
agriyakhetarpal
agriyakhetarpal [at] outlook [dot] com
Content licensed under the CC-by-SA Attribution-ShareAlike Version 4.0 International License
Emoji by openmoji.org
@agriyakhetarpal@fosstodon.org
@agriyakhetarpal.bsky.social
These slides