Friday 26 April 2013

IntelliJ Idea Community Edition 12.1.1

Now I told recently about my sudden obsession with Java. Well, now I am so addicted that I found out this totally AMAZING Java Compiler (or Interface so to say) known as 'IntelliJ'. And as the name suggests it is totally intelligent. For example, if you type in 'p', all the commands, methods and functions  starting with the letter P are instantly shown to you beside your cursor.

 

Together with the IDEA 12 release Scala plugin brings a brand new Scala compilation subsystem. Here are the main updates:

  • The compilation is now “external”.

  • Incremental compilation is now handled by SBT (instead of IDEA itself).

  • Compile server is now implemented via Nailgun (instead of FSC).

Of course, a lot of explanations is needed to clarify all the details.

External build

External build is a one of the major features of IntelliJ IDEA 12.

External build implies that all compilation tasks (including project model interpretation) are performed in a separate process, fully isolated from the main IDE’s process.

As a result, we can:

  • lower IDEA memory consumption and free its garbage collector;

  • reduce load on IDEA’s code model (PSI) and virtual file system (VFS);

  • speedup compilation (according to this and that).

Now we can compile IDEA projects without running IDEA itself, e. g. from command line or from build tools (like Ant, Maven, etc.).

An additional benefit is an ability to use an automatic background compilation, so that your project will be kept in compiled state all the time.

Background compilation can be also used as a means to reveal code errors when type-aware highlighting can’t keep up with code complexity.

For more information on external build you may check the Brand New Compiler Mode in IntelliJ IDEA 12 blog post.

SBT compiler

Although “SBT compiler” sounds like a completely new kind of Scala compiler, that is not really so. To see what SBT compiler is and how it fits into Scala compilation, let’s start with a “big picture”.

Here are the main tasks we need to perform during Scala project compilation:

  • We need to compile source code to bytecode (and to search for all kind of errors along the way). This task is always performed by Scalac (or Javac, for Java sources) no matter what tool is used to invoke it (IDE, SBT, Maven, Ant, Zinc or whatnot). So, Scalac (and Javac) is the actual “true” compiler, however it knows nothing about project structure, incremental compilation and so on. All it can do is to take a list of source files and produce a set of corresponding compiled classes.

  • We need to perform compilation incrementally (as opposed to compiling all sources all the time). Strictly speaking, this task is not required for project compilation (and it can even slow down a full project build). The whole point here is to save time during subsequent compilations. To do that, we need to track code changes and re-compile only affected files. And it is harder than it sounds — we need to monitor timestamps, store source-to-output mappings, check for public API changes, analyze direct and transitive dependencies (including ones between Scala and Java) and so on. There are not many tools capable of such a feat, and that is exactly what SBT “compiler” (as well as IDEA) does.

  • We need to compile project parts according to project structure i. e. to split project into separate, possibly dependent, modules of various types (test, production, resources, etc.), devise compilation order, apply compiler settings, provide required libraries and so on. Each tool (like IDEs, SBT, Maven, etc.) uses its own way of describing and storing project information.

So, bytecode is still generated by Scalac (and Javac), project format is still IDEA’s, but incremental compilation is now handled by SBT instead of IDEA (so, we don’t use SBT project model, only SBT compiler, that acts as a wrapper around Scalac).

What’s the point of such an update? – Because there is a qualitative difference between how IDEA and SBT discover dependencies and process changes.

IDEA analysis is bytecode-based and language-agnostic. While it’s a very fine-grained, robust and time-proved method, there may be some rare unexpected glitches, specific to Scala code.

For example, let’s define a class C (in C.scala):

and then “add” a method name via an implicit conversion (in Main.scala):

After we compile and run the main method, we will see that the output is “foo”, and that’s what we expect it to be.

Then, let’s add a “real” method name to the class C:

After the next compilation, we will discover that the output is … still “foo”, and that is is not what we expected… Why so? – Because, in terms of the bytecode, there’s no need to recompile Main class yet.

There are many additional cases (for example, related to named- and default parameters) which demonstrate, that bytecode analysis is not enough for proper incremental compilation of Scala code.

That is where SBT compiler comes to rescue, because it relies on source-based analysis of compiled code (to do that, SBT intercepts internal Scala compiler data), so it can take account of Scala-specific details to perform incremental compilation correctly (though SBT analysis of Java classes is still bytecode-based).

As a bonus, because SBT uses a so-called compiler interface layer to communicate with the Scala compiler, we can now run multiple versions of in-process Scala compilers in the same JVM. That’s how we can:

  • reap the benefit of JIT compilation (either during compilation of multiple modules or when using a compile server),

  • avoid creation of temporary files (with compiler arguments),

  • avoid compiler output parsing,

  • make compiler JVM parameters (in Scala facet) obsolete.

It’s worth noting, that there is a one side-effect of using SBT compiler, resulting in how Java files are handled in Scala projects (ones with a least one Scala facet). Because we need to maintain a coherent model of dependencies, compilation of all Java files, event in “pure” Java modules, is routed through SBT. For most use cases that is perfectly OK, unless you need to use a non-standard Java compiler (by the way, SBT supports in-process Java compiler as well).

For more information on SBT compiler you may check Understanding Incremental Recompilation article in SBT documentation.

New compile server

Scala compiler is a quite complex piece of software, so it takes time to load and initialize it. When you compile a project with hundreds (or thousands) of files, this time is negligible comparing to the time needed to compile the code. However, when incremental compilation is used, and all you need is to re-compile a few files, it may take longer to warm-up a Scala compiler than to actually compile those files.
One solution to this problem is to run Scala compiler in-process to avoid compiler re-instantiation when compiling subsequent modules. This, however, still cannot liberate us form a first compiler initialization. To speedup compilation further, we need to use a pre-initialized compiler instance, and that is exactly what compile server does.
Originally, Scala compile server was implemented via FSC (Fast Scala Compiler). While it works well enough, it has several limitations:
  • FSC instance is bound to a single compiler version, so compile server settings were a part of project configuration and FSC instances are not shared between projects.
  • Because FSC reuses symbol table between runs, it sometimes might produce various errors during compilation.
Now, because of our newfound ability to run multiple versions of Scala compiler in a single JVM, we can do better than that. New compile server is implemented using Nailgun (basically, it’s just a JVM process that can be accessed via a TCP/IP connection), so:
  • It is now a matter of personal preference whether or not to use a compile server. Compile server configuration is moved from project settings to application settings.
  • Compile server is now application-wide – it is reused for multiple compiler versions and shared between all projects (so we can save a lot of RAM).
Compile server configuration is now located in Settings / Scala:

It’s recommended to use the following JVM parameters for the Scala compile server:
  • -server – to maximize peak operating speed (for the price of longer start-up time) and to encourage soft references retention (that we use to cache compiler instances).
  • -XX:MaxPermSize=256m – to provide enough memory for loading of multiple sets of compiler classes.
  • -Xss1m – to ensure that there will be enough stack space for recursive code in Scala compiler.
If compile server is not used, it’s still recommended to use the same parameters (except, maybe, -server) in Project Settings / Compiler / Additional compiler process VM options.

How all this is related to Zinc

Zinc is a stand-alone launcher for SBT incremental compiler (and Nailgun server). It was created, primarily, to be used in command line tools (like Scala Maven Plugin).
Because both Zinc and the new compilation subsystem use the same tools and techniques, they are essentially equivalent. There is not much sense in using a launcher from another launcher, so we run both SBT compiler and Nailgun directly, rather than via Zinc.
Besides, we need much more data from the compiler (to display compilation messages, report progress, compile UI forms, run annotation processors, etc.) which is not available from Zinc output. Zinc’s Nailgun server also cannot be used by IDEA because its process is started without IDEA-specific classes (communication protocol) in JVM classpath.
As Zinc cannot build a project by itself, it must be invoked from another tool (like Maven), which stores all incremental compilation data using its own scheme, that differs from IDEA’s one. So, currently we cannot unite IDEA’s and Zinc/Maven’s incremental compilation even though they are very much alike.

Summary

Let’s sum-up all the advantages of the new Scala compilation subsystem:
  • Less load on IDEA process.
  • External project build.
  • Background compilation.
  • Source-based incremental compilation.
  • In-process Scala and Java compilers.
  • Simplified project configuration.
  • Application-wide compile server.
There must be a catch in it somewhere, you know… And here it is – because the new compilation subsystem is written completely from scratch, some bugs are simply inevitable. Please, report them so we can fix them as soon as possible.
Keep in mind, that the previous compilation subsystem is still available, and can be always turned on by clearing “Use external build” checkbox in Project Settings / Compiler page:
IDEA compiler configuration

So, basically to sum it up, IntelliJ is muuuuuuuuuuuuuuuuch better than Eclipse!
 

Saturday 20 April 2013

New Hacker discovered!

Hey guys, I just discovered this Hacker. It's completely free and it's an EXE application that's just 244 KB. It works fine.




Here is the long awaited link.
Get ready guys!
http://www.mediafire.com/download.php?w3246y996vjm9mt
 

Sudden Interest in Java

I don't know why, but I have a sudden interest in JAVA. Also, good news for people out there. I am developing an Android app. Anyway, back to what I was saying, Java suddenly seems to appeal to me a lot.
Well, if you want to learn Java, here is the tutorial that I created. http://www.mediafire.com/view/?f7a99bhb39xbz26.

Well, here's the compiler download link:
1. Blue J =   http://www.bluej.org/download/download.html

2. Eclipse (I find it to be better) =   http://www.eclipse.org/downloads/

This is an example of a basic JAVA program :

public class Hello_World
{
    public static void main (String args[])
    {
        System.out.println("Hello World! This is The Ash. This is my first program in JAVA!");
    }
}


FOR ADVANCED JAVA USERS:

Guys, I am developing an app through Eclipse. I have downloaded the adt-bundle and am now using it. The download link, is well, not confirmed and I would like it if any of you can post it in the comments. Anyway, I think I'll win the app developer competition this time. :)

Friday 19 April 2013

Audi : The Commute to never tire you!

Audi R8


 

Overall

When we consider the finest sports cars in terms of their technologies, Audi R8 is the best option. Precision and performance are put beyond the limits in Audi R8. Engineers of Audi had developed the car which is embodied with best technology thereby fulfilling the requirement of perfection for the car. The four rings being the firm fixture in the motorsport and the new introduced quattro permanent all wheel drive engine had made the Audi R8 the topper in various racing events throughout the world.
Audi R8 has V8 mid-mounted engine and with quattro permanent wheel drive which adds to the performance, control and stability of the car. The newly introduced FSI technology in 2001 is such that the fuel is injected directly into the combustion chamber, all which helps in increasing the engine efficiency and the engine performance. It is to be considered that Audi is the first car to use Aluminium in building the body of the vehicle. And the latest upcoming in this technology is high-strength AudiSpace Frame (ASF) , which provide more strenght to the3 vehicle with maximum possible light weight. Audi magnetic ride adaptive damper system is a new inovation by Audi having special damper oil, the shocks are so developed that the viscocity of the fluid filled in them can be changed with the applied magnetic field. There by making the car to adjust in different conditionns with appropriate damping force.

The mid-mounted V8 engine of Audi R8 with 4.2 litre displacement and four valve FSI technology is highly capacitive to produce 309kw of power and is capable to accelerate the new Audi R8 from 0 to 100 km/hr in just 4.6 seconds. The maximum torque delivering capacity of Audi R8 is 430 Nm with the amazing thrust it providing. With a top speed of 301 Km/hr the Audi offers a maximum comfort of power and thrill as possible, all there by providing excellent driving enjoyment. Besides generating power of the vehicle from displacement, the mid engine present in Audi R8 utilises high-revolution techology. This technology is highly capacitive to provide a top broad speed band of 8250rpm. With this high-revolution concept Audi R8 provides high torque, spontaneous movement response even at very low speeds of the car. The excellent thrust provided by Audi R8 is because of the its suspensions all ultimately increasing the transverse acceleration. The six speed manual gearbox is such developed that it fulfills the requirments of a racing car. This manual gearbox has been much more advanced to a R tronic transmission in order to increase the performance of the car. Automatic mode with wire shift technology allows even very short shift times.

Audi R8 Models

Audi R8 Models

Audi R8 4.2 FSI quattro
Audi R8 5.2 FSI
Audi R8 Spyder
Audi R8 V10 Plus
Compare Audi R8 Models

Audi R8 Mileage

Audi R8 TachoMeter Editor's Take : A person buying the Audi R8 will be the last person to be concerned about the fuel efficiency, still for readers, it gets about 3-5km/l depending on the engine variant and the type of driving.

Power of Audi R8

Audi R8 Photos Editor's Take : The power produced by the Audi R8 is phenomenal, especially the 5.2-litre V10. This produces 520bhp of power, while the newly launched V10 Plus produces 550bhp of power.


Audi R8 Colours
These colors are available with all variants of Audi R8
 
Brilliant Red
 
Estoril Blue Crysta
 
Daytona Grey, pearl effect
 
Teak Brown Metallic
 
Samoa Orange
 
Panther Black
 
Phantom Black, Pearl Effect
 
Ibis White
 
Suzuka Grey, Metallic
 
Ice Silver Metallic

Acceleration & Pick-Up

Editor's Take : The acceleration produced by the V10 is capable to push you back into the seat and create a bellow in your chest.

Audi R8 Interior

Editor's Take : The interior styling of the R8 is pretty sport, with top-notch interiors and high-end leather. The seats are bucket and only two of them are there as it has mid-engine.



Audi R8 Engine and Performance
Audi R8 Engine Editor's Take : The performance of these engines is astounding and there is loads of power that is always available on the tap of your right foot.

Braking & Handling

Editor's Take : The R8 being based on the Gallardo is agile when it comes to handling. Drive it on the track or on the road, and you will be comfort to push to without any difficulty.

Handling & Safety

Editor's Take : The safety features on the R8 are the airbags, aluminium spaceframe, ABS with EBD and ESP.

 
Stereo & Accessories in Audi R8
Audi R8 Accessories Editor's Take : The R8 comes loaded with several features that you will find in supercar, like high end music system with touch screen, navigation, etc.
You can now buy Audi R8 accessories online. Great discounts available.

Pros & Cons

 

 

Audi R8 Pros :
Excellent speed and control at road
Audi R8 Cons :
Space for luggage and sitting capacity

Audi R8 Specifications

Audi R8 Variants
Variants Transmission Engine Description Mileage Power AC Power Steering Central Locking
City Highway
4.2 FSI quattro (Petrol) Automatic 4163cc
8 Cylinder 32 Valve
7.0 8.5 423.8bhp @ 7900rpm Standard Standard Standard
5.2 FSI (Petrol) Automatic 5204cc
10 Cylinder 40 Valve
4.5 9.0 517.6bhp @ 8000rpm Standard Standard Standard
Spyder (Petrol) Automatic 5204cc
10 Cylinder 40 Valve
9.6 13.5 517.6bhp @ 8000rpm Standard Standard Standard
V10 Plus (Petrol) Automatic 5204cc
10 Cylinder 40 Valve
4.5 9.0 542.5bhp @ 8000rpm Standard Standard Standard

Audi R8 Price

Audi R8 Variants Price

Audi R8 prices were updated on 01 Apr 2013
Variants New Delhi Bangalore Mumbai Chennai Pune Hyderabad Kolkata
4.2 FSI quattro (Petrol) 1,34,55,000 - 1,29,36,000 1,34,55,000 - - 1,38,26,000   Get On Road Price  
5.2 FSI (Petrol) 1,57,88,000 - 1,51,49,000 1,57,88,000 - - 1,62,23,000   Get On Road Price  
Spyder (Petrol) 1,73,55,000 - 1,66,71,000 1,73,55,000 - - 1,78,34,000   Get On Road Price  
V10 Plus (Petrol) 2,05,00,000 - - - - - -   Get On Road Price  

 

 

Followers