1. Compiler,Translator,Interpeter,Binder?
- Posted by don cole <doncole at pacbell.net> Dec 21, 2004
- 500 views
- Last edited Dec 22, 2004
Could somebody please define compiler ,translator and intepeter and binder? Like Compiler=Translates source code into binary code (I think) Example:Bind.bat(I think). I thought I understood all this but after reading the "Wayyy to slow" thread I am thoughly confused. don cole SF
2. Re: Compiler,Translator,Interpeter,Binder?
- Posted by Jason Gade <jaygade at yahoo.com> Dec 21, 2004
- 486 views
- Last edited Dec 22, 2004
don cole wrote: > > > Could somebody please define compiler ,translator and intepeter and binder? > > Like Compiler=Translates source code into binary code (I think) > Example:Bind.bat(I > think). > I thought I understood all this but after reading the "Wayyy to slow" thread > I am thoughly confused. > > don cole > SF > Compiler - translates source code into machine code that can run directly on the processor. Translator - an RDS product now included with 2.5 alpha that can translate your Euphoria source code into C source code. A C compiler translates the C source code into machine code that can be executed. The reason for a translator instead of a program that directly compiles Euphoria into machine code is that it leverages all the optimization work that C compiler writers put into their programs so RDS doesn't have to. Binder - an RDS product that 'binds' your Euphoria source code to the interpreter executable. This is a little more complicated to understand. Your Euphoria source is converted into bytecode that the interpreter understands and bundles it with the interpreter executable into one file. The binder creates an exe file. The translator creates C source files that you must then compile to get an exe file. The compiler itself is not provided by RDS. Is all that clear? ;^) ===================================== Too many freaks, not enough circuses. j.
3. Re: Compiler,Translator,Interpeter,Binder?
- Posted by Jason Gade <jaygade at yahoo.com> Dec 21, 2004
- 486 views
- Last edited Dec 22, 2004
don cole wrote: > > > Could somebody please define compiler ,translator and intepeter and binder? > > Like Compiler=Translates source code into binary code (I think) > Example:Bind.bat(I > think). > I thought I understood all this but after reading the "Wayyy to slow" thread > I am thoughly confused. > > don cole > SF > Sorry, I forgot interpreter. Interpreters don't translate source code directly into executable machine code. They read a program one line at a time and then execute whatever machine code routines are implied by that source line. Modern interpreters translate source code into a faster internal representation before executing. The advantage over traditional compiled languages and languages like Java that have to be explicitly compiled to bytecode before running is that it saves the programmer time. The usual procedure for compiled languages is edit - compile - link - run - debug (rinse, repeat). For interpreted languages the process is edit - run - debug (rinse, repeat). Interpreted languages are also usually safer (i.e. they don't crash your machine) and more expressive (i.e. some algorithms can be expressed in fewer lines of code) than compiled languages though not always. ===================================== Too many freaks, not enough circuses. j.
4. Re: Compiler,Translator,Interpeter,Binder?
- Posted by Derek Parnell <ddparnell at bigpond.com> Dec 22, 2004
- 493 views
don cole wrote: > > > Could somebody please define compiler ,translator and intepeter and binder? Compiler: Reads in human-readable program text (source code) and converts it into machine-readable form (machine code). The output is usually an executable file (.EXE) Translator: Reads in source code and transforms it into equivalent source code for another programming language. The RDS translator converts Euphoria source code into the equivalent C source code. Interpreter: Reads in source code, and executes it as if it had been compiled into machine code. Generally they do an on-the-fly conversion to a type of machine code (eg. Intermediate Language : IL ) and then run the converted code. Does not keep a copy of the converted source code. The current (2.5) Euphoria interpreter is composed of two sub-programs. The front-end converts the source code to IL. The back-end runs the IL. Binder: Uses the front-end subprogram to convert source code to IL, then joins that IL to the back-end subprogram to form a single output file in the format of an executable program. When that program executes, it runs the back-end so that it can run the embedded IL. Shrouder: Uses the front-end subprogram to convert source code to IL, then encrypts that IL to form a single output file. The special program called 'backend.exe' reads the encrypted IL and runs it. What some people are asking for: Two new facilities. The first would just be a stand-alone version of the front-end. It would convert source code into IL and write that IL out to a file. The second facility would allow the Interpreter to 'include' IL files, which are pre-converted source code, just like it can include source files now. This would mean that it would be possible for a library author to distribute the IL version of the library so that people could include into their applications without the overhead of converting the library source to IL at runtime. These two new ideas have nothing to do with binding or shrouding. They would allow newcomers to Euphoria to use the free Interpreter with large libraries without the slowish startup time. It might also mean that distributed IL files could be smaller than the source code version of the library. It would mean that instead of numerous source files that go into making a library, they could use a single IL file instead. Currently, I think that RDS believes this is too much work for little gain (from RDS's point of view). It would be in RDS's interest to 'encourage' people the buy the Binder themselves if they want faster startup times, etc...rather than library authors to provide this ability free of charge. Of course, RDS could create these two new facilities as enhanced products and charge for them. Say each at 50% of the binder price? My guess is that RDS would make more sales this way than just hoping everyone will buy the binder. -- Derek Parnell Melbourne, Australia
5. Re: Compiler,Translator,Interpeter,Binder?
- Posted by Jason Gade <jaygade at yahoo.com> Dec 22, 2004
- 473 views
Derek Parnell wrote: > The current (2.5) Euphoria interpreter is composed of two sub-programs. > The front-end converts the source code to IL. The back-end runs the IL. > > Binder: Uses the front-end subprogram to convert source code to IL, then > joins that IL to the back-end subprogram to form a single output file in > the format of an executable program. When that program executes, it runs > the back-end so that it can run the embedded IL. > > Shrouder: Uses the front-end subprogram to convert source code to IL, then > encrypts that IL to form a single output file. The special program called > 'backend.exe' reads the encrypted IL and runs it. > > What some people are asking for: Two new facilities. The first would > just be a stand-alone version of the front-end. It would convert source > code into IL and write that IL out to a file. The second facility would > allow the Interpreter to 'include' IL files, which are pre-converted > source code, just like it can include source files now. This would mean > that it would be possible for a library author to distribute the IL version > of the library so that people could include into their applications without > the overhead of converting the library source to IL at runtime. > > These two new ideas have nothing to do with binding or shrouding. They > would allow newcomers to Euphoria to use the free Interpreter with > large libraries without the slowish startup time. It might also mean that > distributed IL files could be smaller than the source code version of > the library. It would mean that instead of numerous source files that > go into making a library, they could use a single IL file instead. > > Currently, I think that RDS believes this is too much work for little gain > (from RDS's point of view). It would be in RDS's interest to 'encourage' > people the buy the Binder themselves if they want faster startup times, > etc...rather than library authors to provide this ability free of charge. > > Of course, RDS could create these two new facilities as enhanced > products and charge for them. Say each at 50% of the binder price? > My guess is that RDS would make more sales this way than just hoping > everyone will buy the binder. Is there any reason Euphoria 2.5 couldn't go back to block interpreting? http://www.listfilter.com/EUforum/m9015.html > > -- > Derek Parnell > Melbourne, Australia > ===================================== Too many freaks, not enough circuses. j.
6. Re: Compiler,Translator,Interpeter,Binder?
- Posted by Vincent <darkvincentdude at yahoo.com> Dec 22, 2004
- 490 views
- Last edited Dec 23, 2004
> don cole wrote: > > > > Could somebody please define compiler, translator and interpreter and > > binder? > Heres what I believe the following things to be true, though these are soley my definitons, I cannot verify them as true for sure! : Machine Code Compiler: A program that will directly convert human readable source code in a source file to machine code, then a linker module will build an EXE (executable) or DLL (Dynamic Shared Library) file(s) from that machine code. Different compilers will compile on different platforms, and not all compilers produce the same exact machine code. JIT Compiler: JIT stands for "just-in-time", and is like a conventual machine code compiler except that it converts byte code to machine code "on-the-fly". This compiler technology first harnessed by Sun Microsystem's JAVA language enviroment (JLE) as an alternate option to using JAVA's Virtual Machine (JVM), which is like an interpreter (I think), is now is being used with Microsoft's .NET developers framework. Other companys have and/or are using this core technology as well, like Netscape I belive. Often a byte code compiler would make the IL (intermediate language) code while this type of compiler would make machine code from that IL. Translator: In terms of the RDS product "Euphoria to C Translator", the translator takes the human readable Euphoria source code and translates it to fairly inefficent C code that is put into a set of C source files to reduce the overhead work of the compiler. The RDS product will create a batch file called 'emake' which acts like a subprogram that calls and sets compiler parameters to compile each one of those C source files (so u dont have to manually). After that, the emake will call a linker corrisponding to that compiler and will either create an EXE (executable) or DLL (Shared Library) file(s). As of version 2.5, emake.bat will also delete the C source files/ object file after completion. The advantages with this method is greatly increased program loading/execution speed, plus the ability to make DLL (Shared Library) files. "This I belive is the best method of non-open source distrubution!" Modern Interpreter: In simple terms a modern interpreter will have a frontend and backend, the frontend will quickly convert human readable source code to a unique IL (intermediate language, also known as byte code) into computer memory that will then run off the backend. Euphoria does this process very quickly though as of 2.5 the frontend will now parse all the code before actually making the byte code?, where as before the code was parsed in incraments, the first attempt at this is fairly inefficent leaving some unnessasary idle time in the process, thus dramaticly increasing program loading time in which users are now complaining about. The next minor release (BETA) of Euphoria is promised to be much improved in this aspect. Binder/Shrouder: In Euphoria 2.5 the binder, which exists as a seperate RDS product will use the frontend of Euphoria to make the unique encrypted IL (intermediate language) code, and then will combine that with the Euphoria backend which exists as an EXE file, therfore your able to make standalone applications. The shrouder skips the integration part and just makes an encrypted IL file that may be ran manually off the backend. Vincent