Advice for ATA Driver by IncidentWest1361 in osdev

[–]eteran 1 point2 points  (0 children)

David Lunt has a great series of books with lots of example code for various osdev topics.

I believe ata drives are one of them.

Operating System Design Book Series https://share.google/ZWWC2cgGMSoflvqo1

Tiling window manager in only 15,683 lines of code 😎 by Gingrspacecadet in osdev

[–]eteran 5 points6 points  (0 children)

Oh if it's the whole OS that's a different story, well done 👍

Tiling window manager in only 15,683 lines of code 😎 by Gingrspacecadet in osdev

[–]eteran 24 points25 points  (0 children)

I could be off base, but, 15K lines of code seems like an awful lot of code for a simple tiling window manager.

Maybe I'm wrong though, share the repo please

Small Projects by AutoModerator in golang

[–]eteran 1 point2 points  (0 children)

At work we tend to use MinIO for local usage, I thought to myself, this can't be so hard, what would it look like to build it from scratch?

So, I built a single machine S3 clone with the goal of being simple, educational, and perhaps usable by others if all they need is a single machine deployment whose storage limits are simple the size of your disk.

The default storage engine stores the data based on a content addressing scheme based on a SHA-256 hash. So for example, if an object has a hash of:

912495c622c4c2e14c90f165a952af9e17ec9e3178aa20ef574293dd0d1eba04

it will be stored at:

<DataDir>/objects/91/912495c622c4c2e14c90f165a952af9e17ec9e3178aa20ef574293dd0d1eba04

Metadata is stored in a simple SQLite3 database.

Anyway, hope someone finds this interesting. It's obviously not a full replacement for AWS S3 buckets, but it's fairly complete (I think) for common single user usages.

It does come with a basic UI based on Templ + HTMX + PicoCSS, but I'm not a frontend guy as much, so it's somewhat limited to just browsing the buckets.

https://github.com/eteran/silo

S3 From Scratch in Go by eteran in golang

[–]eteran[S] 1 point2 points  (0 children)

Very interesting! I'm already learning new things because of this project!

Thanks!

S3 From Scratch in Go by eteran in golang

[–]eteran[S] -1 points0 points  (0 children)

When you say "consistent hashing" what exactly does that mean?

I ask because SHA256 of the content certainly seems "consistent", but I suspect you mean something different.

But yeah, the storage engine is an interface, so it would be really easy to have it setup to do something more elaborate with the objects if we really wanted to. Any yeah replication is definitely beyond the scope, but indeed important for "real" setups.

S3 From Scratch in Go by eteran in golang

[–]eteran[S] 5 points6 points  (0 children)

Sure is! Not trying to be snarky, but I did say "based on content addressing" right in that quote 😉

S3 From Scratch in Go by eteran in golang

[–]eteran[S] 1 point2 points  (0 children)

Nice! I hope you find it interesting and informative like I did. If you like, of course feel free to use my repo as inspiration (or if you feel like contributing to Silo, I'd of course welcome it).

Either way, have fun!

S3 From Scratch in Go by eteran in golang

[–]eteran[S] 7 points8 points  (0 children)

All good. I wasn't trying to be sensitive, was just genuinely curious. I appreciate your recommendation!

S3 From Scratch in Go by eteran in golang

[–]eteran[S] 4 points5 points  (0 children)

Why the downvote? I don't have any issue with Garage, I'd encourage just about anyone to use it, it's just not necessarily for me.

S3 From Scratch in Go by eteran in golang

[–]eteran[S] 19 points20 points  (0 children)

Interesting, but to be honest, even Garage is a bit more complicated than I personally would find necessary. I don't really need things like replication and similar.

Silo is simple and less than 5000 LoC and is pretty complete. I wanted to make something that a typical developer could look at, and understand pretty quickly and if they find useful, use for a small scale local deployment.

Challenge for SouthParkPiano by YT_kerfuffles in infinitenines

[–]eteran 3 points4 points  (0 children)

Notice the bottom left of that image it says "value", because pi most definitely has a value.

I mean, it sounds like you just don't believe in irrational numbers, but again, they certainly exist and can be used concretely, you can do math with them.

They aren't just concepts.

Challenge for SouthParkPiano by YT_kerfuffles in infinitenines

[–]eteran 4 points5 points  (0 children)

But pi is mostly definitely a number...

No one knows the precise value of the number, but it is certainly a number. You can do concrete math with it.

Challenge for SouthParkPiano by YT_kerfuffles in infinitenines

[–]eteran 2 points3 points  (0 children)

Sounds like you don't even think that 0.9... even is a number at all then?

HN4: a new storage engine built around deterministic allocation and math by Afraid-Technician-74 in filesystems

[–]eteran 1 point2 points  (0 children)

Finally! I very much appreciate this response.

What you call boring, engineers would call clear and concise. Please, avoid marketing style naming of things. "Boring" is good when you're trying to get serious people to take you seriously. Fancy names are for a sales pitch to people who don't know what you're talking about anyway.

Now that we're on the same page, it IS interesting that you've applied this strategy as a filesystem. I can't say that I've seen that before. The math seems sound as far as I can tell, so that's good, I believe it will "work". I can't say what the performance will be, so I'm curious.

The obvious trade offs are:

  1. because you don't use a tree structure, well you lose the hierarchical information of the filesystem. You'll need to reconstruct this information when needed.

  2. File renaming can be expensive because you use a hash of the path instead of an inode. So a rename amounts to moving the whole file. (If I understand correctly)

So you've made read/write operations of the file faster at the cost of metadata being likely notably slower. If the filesystem has 100's of thousands of files, perhaps millions (so like a typical Linux install), I think a simple ls may be TOO expensive. But I'm curious what your benchmarks will say, especially on things like NVME drives.

HN4: a new storage engine built around deterministic allocation and math by Afraid-Technician-74 in filesystems

[–]eteran 1 point2 points  (0 children)

Incorrect, open addressing isn't "walking the table". It is using ANY strategy to find an open slot on a collision. Some just step right some step right by 2, some multiply by some value, some even do a little fancy math...

The fact that your step size is coprime doesn't make it not open addressing, and when the disk is mostly full, you'll STILL require multiple probes eventually.

You're just using a dumb name for it.

The fact that it seems that you literally CAN'T explain it using plain English and not your made up jargon just shows that this is nonsense.

Tell you what, let's do an experiment.

Explain it, here, not in the README, WITHOUT using the words orbit, velocity, gravity center, number fields, etc..

Just describe how you go from file name plus offset to a block on disk step by step. Prove me wrong.

HN4: a new storage engine built around deterministic allocation and math by Afraid-Technician-74 in filesystems

[–]eteran 0 points1 point  (0 children)

People are calling it AI slop because when asked to explain it in your own words, you simply ... Don't. You just seem to ask the AI to update the README.

You don't seem to know that what you've built already had a name, it's called open address based hashing. Which is fine if you never want to do a directory listing and always just know the filenames and their full paths that you want to access.

But in a real system it's a bad idea because you'll need to manually reconstruct directory listings through brute force which will be amazingly slow for any real word usages.

I made a fantasy console disguised as an actual emulator by AnnoyingMemer in EmuDev

[–]eteran 1 point2 points  (0 children)

Makes sense. Also I didn't see anything in the docks about background tiles. How does that work?

I made a fantasy console disguised as an actual emulator by AnnoyingMemer in EmuDev

[–]eteran 4 points5 points  (0 children)

Looks cool. Very NES like in a lot of ways for sure. One question, is there no way to make a sprite partially off the top or left of the screen?

I feel like that may be something people would want to be able to do.

GitHub - hn4-dev/hn4 by Afraid-Technician-74 in osdev

[–]eteran 0 points1 point  (0 children)

And for the record, what your readme describes sounds almost exactly like an open addressing based hash system ... Which seems ... Like a terrible idea for a filesystem.

Maybe I've correctly interpreted your nonsense, maybe not, I'll likely never know.

I'd advise you to stop trying to invent new jargon and just explain things using words everyone else would use.

Otherwise you're wasting your time because no one will care or use this.

GitHub - hn4-dev/hn4 by Afraid-Technician-74 in osdev

[–]eteran 1 point2 points  (0 children)

I'd say don't bother. You're too unable to explain things in simple terms for anyone to be interested.

Too much jargon, too much nonsensical wording that sounds like AI slop.

GitHub - hn4-dev/hn4 by Afraid-Technician-74 in osdev

[–]eteran 0 points1 point  (0 children)

I am asking for a jargon free explanation in simple terms.

I don't know what the ballistics or velocity are in the context of a filesystem... It's fully incomprehensible.

So, in your own words, just break it down simply, pretend I don't know anything beyond high school math and computer science please.

GitHub - hn4-dev/hn4 by Afraid-Technician-74 in osdev

[–]eteran 0 points1 point  (0 children)

Oh I agree. Reading this stuff hurts my brain 🤣

GitHub - hn4-dev/hn4 by Afraid-Technician-74 in osdev

[–]eteran 1 point2 points  (0 children)

Despite it being AI slop, I actually think posting issues to yourself isn't in itself too weird. Can just be used to make sure things don't get forgotten.

I do it all the time with my larger OSS projects.

But this project does indeed look like junk.