frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

The initial version of the /etc./magic file used by the file(1) command

https://retrocomputing.stackexchange.com/questions/31722/where-can-i-find-the-initial-version-of-the-etc-magic-file-used-by-the-file1
35•SeenNotHeard•1d ago

Comments

kps•1d ago
> Today, we can go all the way back to its first commit from around 40 years ago via its Git repository

I can't wait to see someone to find the first commit of SCCS via its Git repository.

genewitch•1d ago
I think this is probably a parsing error, if i read your comment correctly; like "git isn't 40 years old"; however the statement can be parsed as "the original commits and revision history are saved in its (now) git repository"
kps•22h ago
It's really about the assumption that the past was like the present, only older. Unix didn't have version control when `file(1)` was written, unless you count last week's backup tapes. (Granted, ‘backup tapes with fancy labels’ is also the working model of git.)
genewitch•14h ago
right, but if i take some vb6 thing i wrote and update it for .net or .ts or whatever, but i also upload the original vb6 project/file(s) into git as well, that satisfies the meaning of the sentence. we could probably think of a better way to say it as concisely, but, as i said, i just parsed it differently.
jandrese•1d ago
I still think it is a shame that Unix never adopted the concept of the resource fork from Macs. Having a pair of 4 byte fields that denote file type and associated program is so much better than reading the first few bytes of the data and guessing. file(1) is and has always been a hack.
rollcat•1d ago
Today we still have xattrs, but it's not even too late, it's simply impossible; even OS X gave up on resource forks, because PCs won.

(An excerpt from history.txt)

frizlab•1d ago
macOS has xattrs too (had them very early actually), and supports resource forks through them (it’s the same concept), though they are not used anymore except in some fringe cases.
hedora•1d ago
I’ve repeatedly lost data copying files off macs (especially pre-osx) because some things move the file header into the resource fork, and other things ignore the resource fork when copying to other operating systems.
genewitch•1d ago
Wait, macOS still doss this? So you still have to use stuffit for a platform agnostic transfer? Don't get me wrong, hacking everything with resedit and the like almost makes me reach for the rose glasses.

I have scads of macOS footprints all over my NAS from a Mac I used a decade ago.

kmeisthax•1d ago
Mac OS X (because NeXT) switched packaging format from resource forks to directory hives, which are just as alien a concept, but with the advantage that most tools that silently ignore the resource fork will work correctly on directories.

Stuffit is, AFAIK, dead. Along with all the various other OS9-era packaging formats for resource fork files. If you need to send a directory hive over something that only accepts individual files you send a disk image or ZIP archive, both of which macOS will happily extract for you.

genewitch•1d ago
I vouched because nothing you said seems incorrect on its face, and i don't know enough to incorrect you. Someone else could; rather than no discussion. It is good to know you no longer have to binhex mac stuff before zipping (and i assume tar, etc). That's why i sounded incredulous, even though the last time i used a mac the "install" was "drag this icon onto your hard drive icon"

I'm curious, if you have a disk/disc, and you drag a file onto the desktop, and eject the disk, does the file still disappear?

timschmidt•1d ago
I guess that makes https://justine.lol/ape.html and https://github.com/jart/cosmopolitan hacks on top of a hack.
genewitch•1d ago
Yes those are the very epitome of hacks.
PhilipRoman•1d ago
I think I would disagree on this one. While it would make some operations neater, I steer clear of any and all external file metadata for the simple reason that it is not portable (and never will be, because that would mean giving up the stream/pipe abstraction).
jandrese•1d ago
It's not portable because nobody else adopted it. Had DOS and Unix also embraced the concept this would be a solved problem. Microsoft does actually have something on NTFS that works similarly, which is how Windows knows when something has been downloaded from the internet and warns you that it might be dangerous.

Having a standard to separate your data from your metadata isn't necessarily incompatible with streams. It would be something you would IOCTL on an open stream if you cared.

    int fd;
    fd = open("the_file", O_RDONLY);
    if ( fd < 0 )
    {
      perror("the_file");
      return -1;
    }
    char* filetype = NULL;
    ioctl(fd, FDRESGET, "FILETYPE", &filetype);
    if ( filetype != NULL )
    {
      printf("%s has a filetype of %s\n", "the_file", filetype);
    }
You could also have a version FNRESGET that operates on file names instead of file descriptors. Also a setter. There's still obviously a lot of details to work out, but nothing about this should be all that difficult. It even simplifies some other parts of the system, for example if you have a network socket the socket metadata like the remote IP address and port numbers could be in the resource fork of the socket itself.

Monitoring Backstage Blindspots with OpenTelemetry

https://signoz.io/blog/monitoring-backstage-with-opentelemetry/
1•ankit01-oss•29s ago•0 comments

Data Science Weekly – Issue 602

https://datascienceweekly.substack.com/p/data-science-weekly-issue-602
1•sebg•2m ago•0 comments

Parasite Infecting Up to 50% of People Can Decapitate Human Sperm

https://www.sciencealert.com/parasite-infecting-up-to-50-of-people-can-decapitate-human-sperm
2•softwaredoug•6m ago•0 comments

Industry reacts to DuckDB's rethink of Lakehouse architecture

https://www.theregister.com/2025/06/05/ducklake_db_industry_reacts/
1•rntn•9m ago•0 comments

URL Shortening System Design

https://javatechonline.com/url-shortening-system-design-tiny-url/
1•GarethX•10m ago•0 comments

Simple cross platform TCP tunnel

1•zerodata•12m ago•0 comments

Track Errors First

https://www.bugsink.com/blog/track-errors-first/
1•GarethX•16m ago•0 comments

Skim: The implementation of functional languages using custom hardware

https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-81.html
2•fanf2•17m ago•0 comments

Google DeepMind's CEO Thinks AI Will Make Humans Less Selfish

https://www.wired.com/story/google-deepminds-ceo-demis-hassabis-thinks-ai-will-make-humans-less-selfish/
1•pseudolus•18m ago•1 comments

Trump Pushes to Restrict Harvard's International Students from Entering U.S.

https://www.nytimes.com/2025/06/04/us/politics/trump-harvard-international-student-visas.html
4•sva_•18m ago•1 comments

The Last Currency: On Crypto and the Banality of Extinction

https://thereader.mitpress.mit.edu/the-last-currency-on-crypto-and-the-banality-of-extinction/
2•pseudolus•20m ago•0 comments

Show HN: Convert your USDC to SPY, tokenization of S&P 500

https://www.digitalspx.com
2•adi-io•23m ago•0 comments

Benchmarking Is Hard, Sometimes

https://vondra.me/posts/benchmarking-is-hard-sometimes/
1•adastral•23m ago•0 comments

AWS Lambda: Silent Mid-Execution Crashes in Node.js VPC Functions [pdf]

https://lyons-den.com/whitepapers/aws-lambda-silent-crash.pdf
1•Azzlain•24m ago•1 comments

How the Heck Do QR Codes Work? (An Interactive Exploration)

https://perthirtysix.com/how-the-heck-do-qr-codes-work
2•sebg•25m ago•0 comments

FDA rushed out agency-wide AI tool—it’s not going well

https://arstechnica.com/health/2025/06/fda-rushed-out-agency-wide-ai-tool-its-not-going-well/
3•voxadam•27m ago•0 comments

Reddit vs. Anthropic Lawsuit [pdf]

https://redditinc.com/hubfs/Reddit%20Inc/Content/PDFs/Docket%20Stamped%20Complaint.pdf
5•simonpure•29m ago•1 comments

Show HN: Discover hidden engineering expertise from your codebase

https://www.sklsync.com/playground
1•cat-whisperer•30m ago•0 comments

Monolayer MoS2 for Spiking Neural Networks Enabled Machine Vision Applications

https://advanced.onlinelibrary.wiley.com/doi/10.1002/admt.202401677
2•PaulHoule•33m ago•0 comments

How a national encyclopedia fixed messy workflows with open-source tech

https://xwiki.com/en/webinars/How-HLS-modernized-with-XWiki
2•lorinab•33m ago•1 comments

Ask HN: Seeing lots of Reddit ads for app that appears to have no large market

1•ivape•33m ago•1 comments

We decreased Gitlab repo backup times from 48 hours to 41 minutes

https://about.gitlab.com/blog/2025/06/05/how-we-decreased-gitlab-repo-backup-times-from-48-hours-to-41-minutes/
3•HieronymusBosch•33m ago•0 comments

LLM Inference Economics from First Principles

https://www.tensoreconomics.com/p/llm-inference-economics-from-first
1•sebg•38m ago•0 comments

Apollo 17 in Real-Time

https://apolloinrealtime.org/17/
2•ColinWright•38m ago•0 comments

Sodern launches Astradia, a star tracker for GNSS-denied navigation

https://sodern.com/fr/astradia-le-viseur-detoiles-diurne-pour-un-systeme-de-navigation-sur-et-robuste/
11•sorenjan•38m ago•11 comments

"Vibe Check" a domain (assess how brandable it is)

https://brandmint.ai/vibe-check/news.ycombinator.com
1•io84•42m ago•0 comments

Zero shot forecasting: finding the right foundation model for O11Y forecasting

https://www.parseable.com/blog/zero-shot-forecasting
2•tiwarinitish86•42m ago•2 comments

The Online Books Page at U Penn – listing of legally available online books

https://onlinebooks.library.upenn.edu/subjects.html
7•WillAdams•49m ago•3 comments

Lionsgate Boss Says AI Can Adjust a Movie's Rating, Create Kid-Friendly Cuts

https://variety.com/2025/film/news/lionsgate-ai-adjust-movie-ratings-tone-format-1236417772/
2•Michelangelo11•52m ago•1 comments

BookList – Track and Share Your Reading Journey

https://booklist-app.neocities.org/
2•perottisam•52m ago•0 comments