Message from @z80

Discord ID: 481451605766570014


2018-08-21 13:12:43 UTC  

node.js has some pretty decent binding systems for calling into native libs, i wonder if they actually use it

2018-08-21 13:12:56 UTC  

What is compiling?

2018-08-21 13:13:05 UTC  

.exe

2018-08-21 13:13:16 UTC  

z80 can handle this one

2018-08-21 13:13:17 UTC  

compilation is the translation of high level code into assembly code your system can understand

2018-08-21 13:13:17 UTC  

lol

2018-08-21 13:13:46 UTC  

Your turning the data into something readable?

2018-08-21 13:14:25 UTC  

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"

2018-08-21 13:14:32 UTC  

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

2018-08-21 13:14:57 UTC  

interpreters do compiling on the fly, JIT interpreters do compiling ahead of time

2018-08-21 13:15:10 UTC  

JIT interpreters, in rare cases, can actually be faster than compiled languages

2018-08-21 13:15:29 UTC  

take the Julia language's default interpreter's JIT system, for example

2018-08-21 13:15:53 UTC  

because Julia is like LUA on steroids

2018-08-21 13:16:12 UTC  

@Silver0Fox doesnt know what any of those langs are dude 😛

2018-08-21 13:16:18 UTC  

uhh

2018-08-21 13:16:26 UTC  

shit

2018-08-21 13:16:27 UTC  

well

2018-08-21 13:16:33 UTC  

its just making code into a program that you can actually run on your computer

2018-08-21 13:16:42 UTC  

yeah

2018-08-21 13:16:43 UTC  

basically

2018-08-21 13:16:47 UTC  

LUA is typically used to make plugins and addons for stuff

2018-08-21 13:16:52 UTC  

it's an embeddable language

2018-08-21 13:17:08 UTC  

so a LUA interpreter usually gets crammed into different projects to help with modular code

2018-08-21 13:17:10 UTC  

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

2018-08-21 13:17:49 UTC  

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

2018-08-21 13:17:50 UTC  

well your computer in the end processes them all the same way but sort of

2018-08-21 13:18:34 UTC  

every CPU has a slightly different instruction set, but most of them all come under one architecture, like x86 or ARM

2018-08-21 13:18:36 UTC  

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

2018-08-21 13:18:53 UTC  

when you compile a program, it only works on the platform you compiled it for, unless you cross-compile

2018-08-21 13:19:12 UTC  

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

2018-08-21 13:19:45 UTC  

if you compile for ARM, your program can run on things like phones and things like the raspberry pi, so low-power devices

2018-08-21 13:20:03 UTC  

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

2018-08-21 13:20:52 UTC  

but just use python and dont worry about compilers yet

2018-08-21 13:20:53 UTC  

lol

2018-08-21 13:21:03 UTC  

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

2018-08-21 13:21:26 UTC  

wasn't planning on it. But this is super interesting

2018-08-21 13:21:40 UTC  

i have another word for it

2018-08-21 13:21:47 UTC  

Worry about compilers once you get to C and C++ and Java and stuff.

2018-08-21 13:21:50 UTC  

i always forget how much detail and complexity there is in all this stuff

2018-08-21 13:22:02 UTC  

well is javac really a compiler then

2018-08-21 13:22:08 UTC  

For now, just worry about understanding how to use basic programming stuff.