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•1d 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•16h 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.

The impossible predicament of the death newts

https://crookedtimber.org/2025/06/05/occasional-paper-the-impossible-predicament-of-the-death-newts/
33•bdr•23m ago•3 comments

Apple Notes Will Gain Markdown Export at WWDC, and, I Have Thoughts

https://daringfireball.net/linked/2025/06/04/apple-notes-markdown
25•robenkleene•31m ago•12 comments

A proposal to restrict sites from accessing a users’ local network

https://github.com/explainers-by-googlers/local-network-access
472•doener•19h ago•264 comments

Phptop: Simple PHP ressource profiler, safe and useful for production sites

https://github.com/bearstech/phptop
45•kadrek•5h ago•5 comments

Air Lab – A portable and open air quality measuring device

https://networkedartifacts.com/airlab/simulator
186•256dpi•6h ago•88 comments

Why I wrote the BEAM book

https://happihacking.com/blog/posts/2025/why_I_wrote_theBEAMBook/
533•lawik•1d ago•135 comments

AtoB (YC S20) – Stripe for Transportation – is hiring engineers

https://jobs.ashbyhq.com/atob
1•vignanv8•2h ago

Show HN: I made a 3D SVG Renderer that projects textures without rasterization

https://seve.blog/p/i-made-a-3d-svg-renderer-that-projects
162•seveibar•11h ago•36 comments

OpenAI slams court order to save all ChatGPT logs, including deleted chats

https://arstechnica.com/tech-policy/2025/06/openai-says-court-forcing-it-to-save-all-chatgpt-logs-is-a-privacy-nightmare/
883•ColinWright•16h ago•696 comments

From Tokens to Thoughts: How LLMs and Humans Trade Compression for Meaning

https://arxiv.org/abs/2505.17117
28•ggirelli•6h ago•5 comments

Track Errors First

https://www.bugsink.com/blog/track-errors-first/
35•GarethX•2h ago•27 comments

Autonomous drone defeats human champions in racing first

https://www.tudelft.nl/en/2025/lr/autonomous-drone-from-tu-delft-defeats-human-champions-in-historic-racing-first
234•picture•18h ago•183 comments

LLMs and Elixir: Windfall or Deathblow?

https://www.zachdaniel.dev/p/llms-and-elixir-windfall-or-deathblow
139•uxcolumbo•15h ago•47 comments

parrot.live

https://github.com/hugomd/parrot.live
135•jasonthorsness•14h ago•31 comments

End of an Era: Landsat 7 Decommissioned After 25 Years of Earth Observation

https://www.usgs.gov/news/national-news-release/end-era-landsat-7-decommissioned-after-25-years-earth-observation
45•keepamovin•9h ago•15 comments

A Spiral Structure in the Inner Oort Cloud

https://iopscience.iop.org/article/10.3847/1538-4357/adbf9b
103•gnabgib•14h ago•25 comments

Cursor 1.0

https://www.cursor.com/en/changelog/1-0
483•ecz•17h ago•372 comments

The iPhone 15 Pro’s Depth Maps

https://tech.marksblogg.com/apple-iphone-15-pro-depth-map-heic.html
300•marklit•20h ago•79 comments

Prompt engineering playbook for programmers

https://addyo.substack.com/p/the-prompt-engineering-playbook-for
323•vinhnx•22h ago•118 comments

A new Pitt study has upended decades-old assumptions about brain plasticity

https://www.pittwire.pitt.edu/accolades-honors/2025/06/03/neuroscience-synaptic-transmission-science-advances
24•XzetaU8•8h ago•7 comments

FFmpeg merges WebRTC support

https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/167e343bbe75515a80db8ee72ffa0c607c944a00
795•Sean-Der•22h ago•175 comments

Authentication with Axum

https://mattrighetti.com/2025/05/03/authentication-with-axum
62•mattrighetti•14h ago•15 comments

Comparing Claude System Prompts Reveal Anthropic's Priorities

https://www.dbreunig.com/2025/06/03/comparing-system-prompts-across-claude-versions.html
85•dbreunig•16h ago•38 comments

Differences in link hallucination and source comprehension across different LLM

https://mikecaulfield.substack.com/p/differences-in-link-hallucination
63•hveksr•10h ago•31 comments

Tesla seeks to guard crash data from public disclosure

https://www.reuters.com/legal/government/musks-tesla-seeks-guard-crash-data-public-disclosure-2025-06-04/
392•kklisura•14h ago•276 comments

IRS Direct File on GitHub

https://chrisgiven.com/2025/05/direct-file-on-github/
612•nickthegreek•21h ago•256 comments

When memory was measured in kilobytes: The art of efficient vision

https://www.softwareheritage.org/2025/06/04/history_computer_vision/
116•todsacerdoti•21h ago•24 comments

Not all tokens are meant to be forgotten

https://arxiv.org/abs/2506.03142
41•MarcoDewey•14h ago•14 comments

A practical guide to building agents [pdf]

https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf
203•tosh•22h ago•26 comments

How we reduced the impact of zombie clients

https://letsencrypt.org/2025/06/04/how-we-reduced-the-impact-of-zombie-clients/
127•jaas•22h ago•26 comments