Sunday, October 31, 2010

Бомбы должны были уничтожить лайнеры, заявил британский премьер


Замаскированные под посылки бомбы, направленные из Йемена в США, были сконструированы таким образом, чтобы взорваться на борту перевозивших их самолетов. Об этом заявил премьер-министр Великобритании Дэвид Кэмерон...

...эксперты американских спецслужб считают, что отправку в США бомб, замаскированных под посылки, мог организовать представитель базирующейся в Йемене организации "Аль-Каида на Аравийском полуострове" Ибрагим Хасан Тали Асири...

http://txt.newsru.com/world/31oct2010/ibn.html

Compilers Vs Interpreters ?


...Many of today’s interpreted languages are not interpreted purely. Rather, they use a hybrid compiler-interpreter approach...

...In this model, the source code is first compiled to some intermediate code (such as Java bytecode), which is then interpreted. This intermediate code is usually designed to be very compact (it has been compressed and optimized). Also, this language is not tied to any specific machine. It is designed for some kind of virtual machine, which could be implemented in software. Basically, the virtual machine represents some kind of processor, whereas this intermediate code (bytecode) could be seen as a machine language for this processor...This hybrid approach is a compromise between pure interpreted and compiled languages...

There is more below.
Ниже есть продолжение.


...A recent trend in programming language design is the presence of a virtual machine as one of the vital elements of programming platforms. One of the main elements of the Java Runtime Environment (JRE) is the virtual machine that interprets bytecode and serves as a layer between the application and operating systems. A virtual machine serves as a layer between the application and operating systems in Microsoft’s .NET platform as well.

Let’s now summarize briefly how the JRE works. Java programs contained in java extension source files are compiled to bytecode (files with a class extension). As I said earlier, the purpose of bytecode is to provide a compact format for intermediate code and support for platform independence. The JVM is a virtual processor, and like all other processors, it interprets code—bytecode in this case...

Following this, we can say Java is a hybrid compiled-interpreted language...

...Many modern scripting languages follow the same hybrid concept. Although programs are distributed in script form and are interpreted at runtime, the things going on in the background are pretty much the same.

Let’s look at Python, for example. The Python interpreter consists of a compiler that compiles source code to the intermediate bytecode, and the Python Virtual Machine (PVM) that interprets this code. This process is being done in the background, leaving the impression that the pure Python source code has been interpreted. If the Python interpreter has write privileges on the host system, it caches the generated bytecode in files with a pyc extension (the py extension is used for the scripts or source code). If that script had not been modified since its previous execution, the compilation process would be skipped and the virtual machine could start interpreting the bytecode at once. This could greatly improve the Python script’s startup speed. Even if the Python interpreter has no write privileges on the system and the bytecode was not written in files, this compilation process would still be performed. In this case, the bytecode would be kept in memory...

...There is nothing to restrict the use of a dynamic (scripting) language on the virtual machines designed for languages such as Java and C#. As long as we implement the compiler appropriate for the target virtual machine’s intermediate bytecode, we will receive all the features of the scripting language in this environment. Doing this, we could benefit from the strengths of both the system-programming approach of Java, and the scripting programming model in our software development process...

http://www.javabeat.net/articles/print.php?article_id=190

In JDK 7.0 that is still to release support for scripting languages will be added.