Hacker Newsnew | past | comments | ask | show | jobs | submit | klowin's commentslogin

Here is the original Folders esolang: https://danieltemkin.com/Esolangs/Folders/


> Folders is a Windows language. In Windows, folders are entirely free in terms of disk space!

They can’t be entirely free, can they? Doesn’t the structure have to be persisted on disk somewhere?


The metadata for the file do take space on the disk, but are never taken into account when mentioning the file size.

> All Folders programs are 0 bytes if you're on windows as it interprets an empty folder as 0 bytes.

> The ultimate code golf!

In code golf competition the shortest program (in bytes) wins. I don't think anyone ever included there the bytes taken by the metadata of the files, so in theory any solution implemented in this language is the best possible: 0 bytes.


This reminds me of back in high school in the late nineties where we had a disk quota and I created a Word Macro to create empty folders on the network share in the computer lab.

Although it it did not count against my quota, it certainly was not free :)


All folders use at least 1024 bytes of MFT space on NTFS. More if they have lots of subfolders/files. The UI just doesn't account for it properly.


It seems to be a common misconception. When you right click an empty folder in Windows Explorer, it says the size is 0KB.


If that means 0 kb in terms of sectors allocated, I would believe it. But the name has to be stored somewhere, right? It's just that the dialog doesn't account for that (and the acl, I'd guess).

Or am i missing that this is a joke?


They only count file sizes. The folders still take up space, it's just not accounted for properly.


Maybe it displays 0kb because an empty folder is only a few bytes?


I think NTFS stores the names in a block at the beginning of the partition, with a reference to another block in the back which holds the contents. And it only reads those contents for size.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: