When is Something Built from Source
-
@scottalanmiller said in When is Something Built from Source:
@DustinB3403 said in When is Something Built from Source:
And nodejs is required (because it operate the code) for XO.
RIght, it is the interpreter. We've covered these bits The point is... nothing is being compiled, ever.
So let me see if this is correct. (freaking semantics...)
drafting code in Visual Basic, is the creation of source code. The application which packages the code into an EXE or MSI would be VB's compiler.
Correct?
And if it's correct, does anyone ever really compile anything (besides maybe machine language programmers?)
If the question isn't clear, ask.
-
Or are you saying, the creation of source code is compilation?
And that packing it into an EXE for example is just something nice that we do?
-
@DustinB3403 said in When is Something Built from Source:
Or are you saying, the creation of source code is compilation?
No, I'm saying the exact opposite. Compilation is taking source code and turning it into binary for the system to execute. What compilation is is one of the most basic and well known things in computing.
-
@DustinB3403 said in When is Something Built from Source:
And that packing it into an EXE for example is just something nice that we do?
You don't pack into an EXE. An EXE (executable binary file) has no source code in it. It is a binary file that the computer itself can execute. The only thing that can make an exe file is compilation.
-
@scottalanmiller said in When is Something Built from Source:
@DustinB3403 said in When is Something Built from Source:
Or are you saying, the creation of source code is compilation?
No, I'm saying the exact opposite. Compilation is taking source code and turning it into binary for the system to execute. What compilation is is one of the most basic and well known things in computing.
Ok that makes a bit more sense.
As source code is just text, until it's able to be installed.
-
@scottalanmiller said in When is Something Built from Source:
@DustinB3403 said in When is Something Built from Source:
And that packing it into an EXE for example is just something nice that we do?
You don't pack into an EXE. An EXE (executable binary file) has no source code in it.
This I remember from high school.
-
@DustinB3403 said in When is Something Built from Source:
As source code is just text, until it's able to be installed.
No, installation and compilation are totally different things. Compilation takes source and turns it into an executable. Installation takes applications and puts them on a system. There is nothing that connections compilation and installation. Unrelated concepts.
-
Just stretching my memory.
Back in highschool (programming class) we had a project where we were using VB6 to create a game. Simon Says.
We drafted all of the code in VB6 (placed our elements into the form etc). We check our source code, confirming there are no logic errors etc. And then we hit the VB6 compile button.
That compile button, took our logic, and the "physical" elements of the form, and made an installer for our application.
What is the VB6 compiler doing specifically, that you are saying is compilation? Just taking everything we told it to, and spitting out an installer?
Still confused I guess, but I do understand, a bit.
-
@DustinB3403 said in When is Something Built from Source:
That compile button, took our logic, and the "physical" elements of the form, and made an installer for our application.
That's where your memory is failing. VB6 had no ability to "create an installer." It would create an executable only. You would either then create your own installer or buy a commercial one or whatever. In the VB6 days, commercial installers were big business.
-
@DustinB3403 said in When is Something Built from Source:
What is the VB6 compiler doing specifically, that you are saying is compilation? Just taking everything we told it to, and spitting out an installer?
All compilers are the same. They take source code (VB6, C, C++, Fortran) and turn it into a binary executable(s). They do not produce installers. Compilation and installation are unrelated. Completely and totally unrelated.
It's possible, of course, to build a compiler that also creates installers. That would be very silly and to the best of my knowledge has never been done. Certainly nothing that anyone would ever use.
-
@scottalanmiller said in When is Something Built from Source:
@DustinB3403 said in When is Something Built from Source:
That compile button, took our logic, and the "physical" elements of the form, and made an installer for our application.
That's where your memory is failing. VB6 had no ability to "create an installer." It would create an executable only. You would either then create your own installer or buy a commercial one or whatever. In the VB6 days, commercial installers were big business.
So in a side bar this was just said. "I could be wrong on this, but I think compiled means - change from human readable into machine readable"
Is that accurate @scottalanmiller ?
-
@DustinB3403 said in When is Something Built from Source:
@scottalanmiller said in When is Something Built from Source:
@DustinB3403 said in When is Something Built from Source:
That compile button, took our logic, and the "physical" elements of the form, and made an installer for our application.
That's where your memory is failing. VB6 had no ability to "create an installer." It would create an executable only. You would either then create your own installer or buy a commercial one or whatever. In the VB6 days, commercial installers were big business.
So in a side bar this was just said. "I could be wrong on this, but I think compiled means - change from human readable into machine readable"
Is that accurate @scottalanmiller ?
Essentially, yes.
It would take this: 10 PRINT "This is a print statement";
Into this: 00100010101101010110 1010101 1010101010101
-
@scottalanmiller said in When is Something Built from Source:
@DustinB3403 said in When is Something Built from Source:
What is the VB6 compiler doing specifically, that you are saying is compilation? Just taking everything we told it to, and spitting out an installer?
All compilers are the same. They take source code (VB6, C, C++, Fortran) and turn it into a binary executable(s).
That is the part I was looking for.
Binary executable.
-
@DustinB3403 said in When is Something Built from Source:
@scottalanmiller said in When is Something Built from Source:
@DustinB3403 said in When is Something Built from Source:
What is the VB6 compiler doing specifically, that you are saying is compilation? Just taking everything we told it to, and spitting out an installer?
All compilers are the same. They take source code (VB6, C, C++, Fortran) and turn it into a binary executable(s).
That is the part I was looking for.
Binary executable.
And then binary executables can either be simply copied to where you want them OR in most cases, packaged with other things into an installer that deploys them for you.
-
So with the example of top....
The gcc compiler takes C code source files of top and compiles them into a single executable (ELF) file.
The RPM package of top is created that makes a top installer for people who want to use a handy installer system.
So top itself is the executable and top.rpm is the installer.
-
I suppose something that adds to the confusion is the installer process.
When you compile something, you compile the whole thing into a binary executable. That binary may or may not depend on other files.
Likely in the case of your Simon Says game you wrote, it probably didn't rely on any other files. The single file all by itself was self contained to play the game.
The same goes for Top in Scott's example.
But when we look at things like MS Word, that application is made up of dozens of files, several of which are executable binaries and many which are libraries, etc. So you need an installer to put all of the pieces in the correct location to make MS Word work.
Where your game as it's single file, doesn't need an installer - it simply executes where ever it's currently sitting and relies no nothing else.
-
@Dashrender said in When is Something Built from Source:
I suppose something that adds to the confusion is the installer process.
When you compile something, you compile the whole thing into a binary executable. That binary may or may not depend on other files.
Likely in the case of your Simon Says game you wrote, it probably didn't rely on any other files. The single file all by itself was self contained to play the game.
The same goes for Top in Scott's example.
But when we look at things like MS Word, that application is made up of dozens of files, several of which are executable binaries and many which are libraries, etc. So you need an installer to put all of the pieces in the correct location to make MS Word work.
Where your game as it's single file, doesn't need an installer - it simply executes where ever it's currently sitting and relies no nothing else.
And the same mess exists for scripts. A simple script, like our XO Installer, is just one file. Download and run. But a really big script like XO itself or WordPress contains tons of files and needs to be "installed" or it can't find everything that it needs to run. So both scripts and compiled software might be so simple that it is just "a file" or might be complex and need to be installed.
-
Build from source code
Install from sourcesI havent built anything from source code since amd64 was new and i needed a package for my then awesome Opteron cpu system with Debian (or was it MEPIS)
Cant even remember what the package was now, though i do remember it was quite exciting when it all compiled correctly and i was able to install it and it worked. -
@DustinB3403 said in When is Something Built from Source:
@Dashrender said in When is Something Built from Source:
@DustinB3403 said in When is Something Built from Source:
So @scottalanmiller would you call https://github.com/Jarli01/xenorchestra_installer a "precompiled installer"?
I wouldn't, it's an installation script. There's nothing compiled about it.
Why wouldn't you? Think back to when I went through the process of installing XO into Ubuntu 14 (or whatever it was) and posted the process here on ML.
It would be appropriate to say this though.
It is an installer of a precompiled program.
-
And to clarify a point (again) for @Dashrender.
A script most certainly CAN compile in the background. I noted an example previously.
But it is very, very uncommon. The PBX in a Flash setup process is the only one I know that does that and that was also in widespread use in the open source community.
But even then, it only compiled the Asterisk portions. everything else was repo.