ProgrammerHumor

iThinkThereforeHelloWorld

iThinkThereforeHelloWorld
https://i.redd.it/2jabblyh8tbf1.png
Reddit

Discussion

Saelora

wait, so ship of thesius remains the same ship unless i mount a cannon the the prow, even if nothing else is replaced?

10 hours ago
big_guyforyou OP
:py:

this is why philosophers don't like us. we're too good at thinking

10 hours ago
Giocri

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

10 hours ago
OtakinhoHiro
:unity:

Wow this is becoming a variable in algebrea

7 hours ago
Gorzoid

In the same sense, the ship of Theseus is actually a coffee cup.

5 hours ago
0xlostincode

Not only that, if it merely changes direction it's no longer the ship of Theseus.

3 hours ago
_a_Drama_Queen_

what if "old_ship == new_ship" is true, but "old_ship is new_ship" is false?!?

9 hours ago
Bemteb
:cp:

The whole philosophical question can be summarized as "do we compare by value or by memory address"?

5 hours ago
WheresMyBrakes

If we replace the ship of theseus’s reference value with a modern super yacht, is it still the ship of theseus?

4 hours ago
Bad_Decisions_Maker

Holy shit, yeah actually

3 hours ago
AbortedSandwich

That is an incredibly deep question haha

2 hours ago
big_guyforyou OP
:py:

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)

9 hours ago
redlaWw

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.

7 hours ago
shigdebig

Yes, like a great warrior-philosopher once said, "It depends on what the meaning of the word ‘is’ is."

5 hours ago
Key-Principle-7111
:c::asm:

Now, ship it to prod asap!

7 hours ago
bhison
:cs::unity::ts:

I studied philosophy and computing. It's not that weird a mix, logic and intelligence and all that.

10 hours ago
realmauer01

Both professions try to solve problems by mere thinking and then writing about it.

9 hours ago
big_guyforyou OP
:py:

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

10 hours ago
bhison
:cs::unity::ts:

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.

9 hours ago
big_guyforyou OP
:py:

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

9 hours ago
bhison
:cs::unity::ts:

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.

9 hours ago
global_namespace
:py:

Maybe, the ship is not the same, but its hash is the same.

8 hours ago
kakhaev
:py:

bro just use .copy()

9 hours ago
metaglot

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.

9 hours ago
kakhaev
:py:

well yes, i think, if you can’t formalize it into spec, then you can’t develop it?

9 hours ago
metaglot

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.

9 hours ago
big_guyforyou OP
:py:
bro just use .copy()

hey it worked!

9 hours ago
saschaleib
:asm::cs::cp::c::j::js:

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.

5 hours ago
Fer4yn

What if the water is slightly different at the replacement ship?

3 hours ago
xMAC94x

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.

9 hours ago
Cubi80

I would solve it by also cloning Theseus.

5 hours ago
0xlostincode

If only Theseus knew about hashing he wouldn't have to go through all this trouble.

3 hours ago
rainshifter

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?

3 hours ago
scyz314

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.

2 hours ago