what if "old_ship == new_ship" is true, but "old_ship is new_ship" is false?!?
The whole philosophical question can be summarized as "do we compare by value or by memory address"?
If we replace the ship of theseus’s reference value with a modern super yacht, is it still the ship of theseus?
Holy shit, yeah actually
That is an incredibly deep question haha
if you use is
instead of ==
, then...since they're only equal if they refer to the same object in memory, i don't think there could be a replacement ship. it would just be...the ship (not sure if that makes sense)
I mean, that seems to be the right abstraction for this - clearly, if you have two ships where one is an exact copy of the other, they aren't the same ship, so if we accept that the replaced ship of Theseus is the same ship as the original, then comparing the addresses to check whether the two ships are the same allocated object is the right way to compare them. Of course, you could then get more granular and treat the ship as a structure of pointers to components, and then comparing the ship by value would compare the addresses of the components, which would be the right way to go about it if you believed the replaced ship of Theseus is not the same ship as the original.
EDIT: I should note that that's probably going to make it difficult to make a "replaced ship" in Python using strings, since iirc, Python strings are copy-on-modify.
Yes, like a great warrior-philosopher once said, "It depends on what the meaning of the word ‘is’ is."
Now, ship it to prod asap!
I studied philosophy and computing. It's not that weird a mix, logic and intelligence and all that.
Both professions try to solve problems by mere thinking and then writing about it.
there's a big difference though. with code, either it compiles or it doesn't. with philosophy, nothing is either right or wrong because everyone's got their own opinion
There’s only a big difference in the sense that it approaches a similar subject from two different angles - philosophy is the observation of the world (science is an offshoot of philosophy after all) and computer science or engineering is applying those insights and attempting to fabricate our own logical systems.
Software being able to compile isn’t much different from an argument being logically consistent and free from fallacies. There are actually objectively untrue things.
i was just talking about how coding is very binary in some ways. either it compiles or it doesn't, either it runs or it doesn't, things are either true or false, numbers are 1 or 0. with philosophy there's all these shades of gray that make things too confusing imho
But what’s the conclusion to this? That’s they’re bad things to study together? But people study design and programming which is just as subjective as any philosophy. I’m not saying they are the same discipline but rather that they fit together quite snugly.
Maybe, the ship is not the same, but its hash is the same.
bro just use .copy()
missing the philosophical point.
This is the hardest problem in software development in one comment; delivering only exactly what the specification says, without any regard for the use-case.
well yes, i think, if you can’t formalize it into spec, then you can’t develop it?
This is the kind of missing developer insight that leads to to developers easily being replaced with AI though. A mechanical view of specification devoid of consideration for the user, is easily formulated. I think road to better software is the developer being aware of the usage of the system.
bro just use .copy()
hey it worked!
As someone who once studied philosophy but works in IT since many years, let me just mention the courses in formal logic that I took back then are still amazingly helpful every day now.
What if the water is slightly different at the replacement ship?
Are you aware that you do a string replace in a loop that changes all occurences ? So you could either: just replace the single characters within each iteration or only call the iteration only once per unique character in those strings.
I would solve it by also cloning Theseus.
If only Theseus knew about hashing he wouldn't have to go through all this trouble.
What is the point of the string replacement? Couldn't you simply compare the old and new part to arrive at the same result with less work? Or is this some part of the meme I'm missing?
You should really do it with pointers to each char, then you will prove that they are indeed different ships. Each component has a different pointer in memory, just like real life each plank is distinct.
wait, so ship of thesius remains the same ship unless i mount a cannon the the prow, even if nothing else is replaced?
this is why philosophers don't like us. we're too good at thinking
Yeah at that point its clearly a ship of thesius plus cannon as you can clearly see from the fact that you get a ship of thesius by subtracting a cannon
Wow this is becoming a variable in algebrea
In the same sense, the ship of Theseus is actually a coffee cup.
Not only that, if it merely changes direction it's no longer the ship of Theseus.