Main issue with symlink is needing to choose the source of truth— one needs to be the real file, and the other point to it. You also need to make sure they have the same lifetimes to prevent dangling links.
Hardlink is somewhat better because both point to the same inode, but will also not work if the file needs different permissions or needs to be independently mutable from different locations.
Reflink hits the sweetspot where it can have different permissions, updates trigger CoW preventing confusing mutations, and all while still reducing total disk usage.
I don't disagree but I think some of these problems could potentially be solved by having somewhat of a birds nest of a filesystem for large blobs, eg.
/blobs/<sha256_sum>/filename.zip
and then symlinking/reflinking filename.zip to wherever it needs to be in the source tree...
It's more portable than hardlinks, solves your "source of truth" problem and has pretty wide platform support.
Platforms that don't support symlinks/reflinks could copy the files to where they need to be then delete the blob store at the end and be no worse off than they are now.
Anyway, I'm just a netizen making a drive-by comment.
from that page: A program accessing the database is free to decide how the data is to be stored in a record. Berkeley DB puts no constraints on the record's data. The record and its key can both be up to four gigabytes long.
Berkeley DB supports database features such as ACID transactions, fine-grained locking, hot backups and replication.
I find immutable state to be useful when appropriate. But sometimes you really do want mutability, and it is a feature. Performance of updating player.coordinates, ability to create temporary but potentially complex structures inside the function, lack of need to create a new immutable copy of a bank account’s ledger to add another transaction, all good reasons to allow mutability.
It seems that there are some people who really just think of everything as a state machine and want state transitions to happen only in very controlled and specific ways. And other people seem to focus more on how to organize frequently evolutions of mutable state in a way that makes it easy to reason about. I’m not sure if there is some sort of commonality to these approaches. Different parts of the industry maybe? Different exposure to Haskell?
> lack of need to create a new immutable copy of a bank account’s ledger to add another transaction, all good reasons to allow mutability.
The immutability kool-aid was already drunk by the banking industry 5000 years ago. That's why you're appending transactions on a ledger instead of mutating bank balances (behind getters and setters, so it's "encapsulated" /s).
Sure but your account balance does mutate and so does the length of the ledger. (I know this was sarcasm, but I do think those are important considerations).
3) implement getX() and getY() alongside getR() and getTheta() and allow user code to decide which to use. Double the functionality without having to expose internal state.
4) implement a PolarPoint class with a way to convert between that and Point. This is more applicable if the concepts are not orthogonal but also not as strongly correlated as coordinate systems.
The two ways of handling you describe are not how I would actually handle any of this in real situations.
Getters and setters meanwhile allow you to do things like recalculate internal state whenever you call setX() or setR() to amortize computational costs or do any other kind of change tracking without having to rely on some more language-specific feature to do so. Plus getters and setters work across network boundaries unlike modifying state directly.
One thing to also consider: generally speaking you likely had no chance in convincing him or saving him. It’s awful to feel powerless. I recently had a somewhat similar situation with a friend. I knew he was struggling. I was going to reach out to him the day he was found dead. It was under somewhat strange circumstances so it took a couple of months to get the report back on what the authorities thought happened, which turned out to be a spontaneous health issue and not any deliberate act. But when a healthy man in his 20s is found dead you rarely think “brain aneurysm” so I and other people in his life struggled to make sense of what happened.
One of the more helpful things I was told was that there is nothing you can do if someone is determined to end their life. No intervention, no amount of reaching out, nothing. And that is a powerless place to be but it also means that you not calling the police the night your acquaintance died is likely not the deciding factor in this case.
Find a way to forgive yourself. Talk about your experience. To friends, to strangers, to a therapist. EMDR is great, from what I hear but even talk therapy is a really good place to start processing. I hope you find a way out of this, one internet stranger to another.
General AI on non-objective ("best" is undefined here and for what usecase/priorities?) broadly covered topics like this instance is mostly just a regression to the mean with bias bleed in from other knowledge graphs (eg, trying to use correct grammar/tense (linguistics) in place of endianness(compsci)). As we traverse further into the depths of the dead internet theory, and more AI slop pollutes the internet (and in turn/tandem, poorly curated synthetic datasets), there is some inevitable Ouroboros style reinforcement here too.
So a simple filter in the sense of "omit anything too similar to X" would just omit the mean result within your given deviation. It's effectively asking, "What are some truly insane ways to use PostgreSQL", which is an interesting thought experiment, though if it actually produces useful results then you've basically just written a unit-test (Domain test?) for when AI slop evolves into full on AI jumping the shark.
If you're doing it based on cross-linking (source-citing), you're basically doing Page-Rank for AI.
If you time gate familiarity to posts only up to the NLP/General AI explosion in 2022 or so, well that might still be useful today, but for how long?
If you were to write a "Smart" filter, you're basically just writing the "PostgreSQL Best Practices" article yourself, but writing it for machines instead of humans. And I don't know what to make of that, but frankly I was lead to believe that if nothing else, the robopocalypse would be more interesting than this.
You are asking a question that doesn’t make sense. It seems like to you it does, and to others it sounds like “what does the color blue taste like?” People do stuff for fun. It doesn’t have to be useful. Or it can be useful to them because it isn’t the existing thing. xv6 is great, this is different. It makes different choices and studying the differences can be a good thing. Comparing two different pieces of software written in the same language is sometimes exactly what you want.
The logic of “something similar already exists so don’t bother” is reductive. I am sure 99% of hobbyist software is useless to anyone but the person who wrote it. It still helps people learn and become professionals.
Remember a few weeks ago there was a post here by a high school student detailing building a laptop from scratch. Was that wasted effort because you can just buy a laptop? Was Linux wasted effort? Why does this project offend you so much that you keep commenting on it in such a negative way?
> Comparing two different pieces of software written in the same language is sometimes exactly what you want.
And here we are at my question, which obviously makes sense. So what's the difference to xv6? Why did the author consider it important to implement yet another unix-like system in C? What is the core benefit of this specific kernel? The website doesn't provide an answer.
> that you keep commenting on it in such a negative way?
That is a false accusation. I have not said anything negative about this project.
I think it's a cool project even though I have no interest in downloading and running it, but it's a technological curiosity that might yield some insight of other things.
If you're so hell-bent on knowing what differentiates Fiwix from xv6 why don't you download the projects and compare them? You shouldn't be asking others to do your work for you, or to justify their choices and actions to you.
> You shouldn't be asking others to do your work for you, or to justify their choices and actions to you.
Are you serious? This is HN, so it's reasonable to assume that there are people here (obviously not you) who know the project and can answer questions about it quickly. After all, the project author has even set up a dedicated website and is asking for support for his project. It should be in his and the other project contributors' interest to communicate the advantages of the project to people on their own initiative. I don't consider it my job to analyze the source code to find out for myself. I'm very interested in lean operating systems, especially for embedded SMP systems, but my time is limited.
> Why did the author consider it important to implement yet another unix-like system in C? What is the core benefit of this specific kernel? The website doesn't provide an answer.
The website does answer your questions:
> It is designed and developed mainly as a hobby OS
A hobby is something that someone does for their personal enjoyment; it isn't any more complicated than that.
> It is designed and developed mainly as a hobby OS
That doesn't answer my questions at all; e.g. Linux also started out as a hobby, and yet Linus had a clear position on why he considered his system to be better than e.g. Minix, and why he made certain design decisions. Hobby does not in any way preclude rational, goal-oriented motivation.
> Hobby does not in any way preclude rational, goal-oriented motivation.
And it doesn't imply one, either. Most hobbies are just hobbies, that began as hobbies, and continue to stay hobbies.
Replace programming with any other hobby here -- It would be ridiculous to say, in response to someone showing a hat they they've knit: "Why did you consider it important to knit yet another hat? What is the core benefit of this specific knit hat?"
> It would be ridiculous to say, in response to someone showing a hat they they've knit: "Why did you consider it important to knit yet another hat? What is the core benefit of this specific knit hat?"
Not at all. Knitting has a clearly defined purpose: to make a particular garment with a particular shape and pattern so that you can wear it, give it as a gift or sell it (coincidentally, I have detailed first-hand insider knowledge on this topic). But I don't think we need to continue this discussion because it doesn't bring me any closer to the answers to my questions, and apparently you don't have the answers either.
No, hobbies are done for the enjoyment of the activity itself. That's what the word means. The answer to your questions is likely "there is no advantage" and "because the author thought it was fun"
You are asking questions about things that were never asserted in the first place. "Why did the author consider it important to implement yet another unix-like system in C?" Nobody ever said it was!
If you left it at the initial question this might have been an entirely different thread.
"There are already so many Unix like operating systems of all sizes written in C... If I were to go to such an effort, I would try another language...It is meanwhile more than clear that it can be done in C...so it would actually be more interesting to explore the suitability of other languages for such a task."
Based on your earlier remarks why not say knitters should use different material or needles to make it more interesting? Why do the same pattern over again when so many knitters have probably knit the very same pattern already.
Because the statements above miss the point of what hobby means to most people.
>> and apparently you can't answer the questions either
No one is required to. Not anyone on HN or the hobbyist in question.
That was the original intent. It’s like a half way to a parliamentary system where the legislature elects a PM except here it is a separate one time use assembly.
There was a post from someone a long time ago who has an email address and name similar to Make Cuban but not quite. He got quite a few cold call emails meant for Cuban. A lot of them were quite sad (people asking for money for medical procedures and such).
reply