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?

1 day ago
big_guyforyou OP
:py:

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

1 day 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

1 day ago
Gorzoid

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

1 day ago
OtakinhoHiro
:unity:

Wow this is becoming a variable in algebrea

1 day ago
0xlostincode

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

22 hours ago
_a_Drama_Queen_

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

1 day ago
Bemteb
:cp:

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

1 day ago
WheresMyBrakes

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

23 hours ago
Bad_Decisions_Maker

Holy shit, yeah actually

22 hours ago
AbortedSandwich

That is an incredibly deep question haha

21 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)

1 day 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.

1 day ago
shigdebig

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

1 day ago
Last_Pick_2169

Gavel drop

36 minutes ago
Key-Principle-7111
:c::asm:

Now, ship it to prod asap!

1 day ago
global_namespace
:py:

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

1 day ago
bhison
:cs::unity::ts:

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

1 day ago
realmauer01

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

1 day 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

1 day 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.

1 day 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

1 day 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.

1 day 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.

23 hours ago
Fer4yn

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

22 hours ago
Last_Pick_2169

My friend wants to know the difference between first and new ships

37 minutes ago
big_guyforyou OP
:py:

in each iteration of the loop, the first_ship is ship_of_theseus before it has one part replaced by an identical replacement_ship part. new_ship is ship_of_theseus after the replacement has been made

24 minutes ago
kakhaev
:py:

bro just use .copy()

1 day 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.

1 day ago
kakhaev
:py:

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

1 day 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.

1 day ago
big_guyforyou OP
:py:
bro just use .copy()

hey it worked!

1 day 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.

1 day ago
Cubi80

I would solve it by also cloning Theseus.

23 hours ago
0xlostincode

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

22 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?

21 hours ago
ringsig

The idea behind the Ship of Theseus is that you replace every single part of the ship one after the other until all of the parts have been replaced. The philosophical question is whether it's the same ship now that it has been completely replaced or if it's a new ship.

The string replacement is analogous to replacing the various parts of the ship.

13 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.

21 hours ago