this post was submitted on 25 Apr 2024
723 points (95.6% liked)

Programmer Humor

23215 readers
976 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

cross-posted from: https://lemmy.ml/post/14869314

"I want to live forever in AI"

(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 1 year ago (1 children)

void teleport(Person person);

[–] [email protected] 4 points 1 year ago

I've always said that teleporters are just suicide machines that sometimes spit a clone out somewhere else.

[–] [email protected] 6 points 1 year ago

It needs an empty catch block

[–] [email protected] 5 points 1 year ago

I had to turn my phone sideways and go cross-eyed to spot the difference.

[–] [email protected] 5 points 1 year ago

The best part is, unless that function name is misleading, it doesn't matter how the data is passed; a copy is being sent out over TCP/IP to another device regardless.

[–] [email protected] 4 points 1 year ago

Sorry Dave, I'm afraid I can't do that

[–] [email protected] 4 points 1 year ago (5 children)
[–] [email protected] 7 points 1 year ago (2 children)

It wouldn't be you, it would just be another person with the same memories that you had up until the point the copy was made.

When you transfer a file, for example, all you are really doing is sending a message telling the other machine what bits the file is made up of, and then that other machines creates a file that is just like the original - a copy, while the original still remains in the first machine. Nothing is even actually transferred.

If we apply this logic to consciousness, then to "transfer" your brain to a machine you will have to make a copy, which exist simultaneously with the original you. At that point in time, there will be two different instances of "you"; and in fact, from that point forward, the two instances will begin to create different memories and experience different things, thereby becoming two different identities.

load more comments (2 replies)
[–] [email protected] 5 points 1 year ago (2 children)

The first line passes the argument by reference, ie, the object itself.

The second line passes the object by value, ie, a copy.

[–] sukhmel 4 points 1 year ago

Also in Rust that would be the opposite which is funny but confusing

load more comments (1 replies)
load more comments (3 replies)
load more comments
view more: ‹ prev next ›