Message from @picnicnapkin
Discord ID: 481452063512068099
python however, is not a compiled language. it is itself a complex program that scans and executes your code on the fly. usually called an "interpreter"
aka you go from a hello world program to a bunch of 64-bit or 32-bit instructions the system will understand, so when you open your compiled file up into a hex editor, you'll only see something like.. `<insert random garbage here, too lazy>`, because it's nothing like your normal code
interpreters do compiling on the fly, JIT interpreters do compiling ahead of time
JIT interpreters, in rare cases, can actually be faster than compiled languages
take the Julia language's default interpreter's JIT system, for example
because Julia is like LUA on steroids
@Silver0Fox doesnt know what any of those langs are dude 😛
uhh
shit
well
its just making code into a program that you can actually run on your computer
yeah
basically
LUA is typically used to make plugins and addons for stuff
it's an embeddable language
so a LUA interpreter usually gets crammed into different projects to help with modular code
Nope, but I think I get it. It's different methods for your computer to process the instructions depending on the language and your desired outcome
the point is more that your CPU can only do the most basic instructions, like load two numbers from memory, add them together, and store the result somewhere else in memory
well your computer in the end processes them all the same way but sort of
every CPU has a slightly different instruction set, but most of them all come under one architecture, like x86 or ARM
so when you write your software in a high level language, you need a compiler (another program) to translate into thousands of these little basic machine instructions that your processor understands how to do
when you compile a program, it only works on the platform you compiled it for, unless you cross-compile
so if you compile for x86, which you probably will, it'll only run on computers with an x86 processor, like intel or AMD CPUs tend to be
if you compile for ARM, your program can run on things like phones and things like the raspberry pi, so low-power devices
yes, the binary (executable program) the compiler outputs is specific to a particular CPU instruction set architecture, usually the one you run the compiler on
but just use python and dont worry about compilers yet
lol
the difference between ARM and x86 (two of the most popular architectures) is that one of them is CISC and one of them is RISC, meaning x86 has lots and lots of instructions for specific tasks and ARM has only a few instructions that can be combined to do complex tasks- ARM is used in low power devices because the simplicity of the CPU's design is pretty linked to the lower power consumption
wasn't planning on it. But this is super interesting
i have another word for it
Worry about compilers once you get to C and C++ and Java and stuff.
i always forget how much detail and complexity there is in all this stuff
well is javac really a compiler then
For now, just worry about understanding how to use basic programming stuff.
yeah javac is a compiler, but it outputs bytecode for the JVM and not an executable
starting with python means you don't have to worry about all of this compiler stuff and whatnot (unless you happen to be me and you overcomplicate things to the point of insanity just to get tiny speed increases but uhhhhhhhhh)
I will concentrate on learning my basics before trying anything weird
good idea
Yeah, just focus on mastering the basics for now.
But I find this discussion really interesting even if I don't understand all of it
Learn Python The Hard Way is pretty good for that.