this post was submitted on 08 Apr 2025
260 points (99.6% liked)

games

20849 readers
394 users here now

Tabletop, DnD, board games, and minecraft. Also Animal Crossing.

Rules

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] carpoftruth@hexbear.net 12 points 2 weeks ago (12 children)

What on earth is source code anyway

[–] buckykat@hexbear.net 34 points 2 weeks ago (11 children)

Source code is the (nerd) human readable form of software. To run it you put it through a thing called a compiler that translates it into the ones and zeros the computer processor can actually process, and those raw ones and zeros are how proprietary software is generally distributed.

Having the source code means it's easy (for nerds) to change the software or to run it on other kinds of processors.

[–] carpoftruth@hexbear.net 15 points 2 weeks ago (10 children)

Hm ok. So one writes source code in a coding language, it gets turned into 1s and 0s. Why can't you go back? Source code gets compiled into a specific order of 1s and 0s, but the same set of 1s and 0s could be made from different types of source code?

[–] sodium_nitride@hexbear.net 11 points 2 weeks ago

To add on to what the others have said, the compiler will also optimise your code (which is why professional coders write in common patterns as much as possible, so the compiler can recognise them and optimise).

So many times, you literally won't even have the same program.

Also machine understandable code (assembly or 1s and 0s) is different depending on the processor used. You could give me machine code made for a risc-v processor and I could reconstruct a c program that made it. But if I had the same program compiled for an x86 processor ...

load more comments (9 replies)
load more comments (9 replies)
load more comments (9 replies)