Saturday, 23 May 2015

Rust 1.0, the programming language behind Mozilla’s new Web engine Servo, is released

As many programmers know, reaching the 1.0 milestone is an important day for any language. It signals the first stable point where developers can use its features without fear that their code will break with incoming changes. But what separates the open-source and openly developed Rust 1.0 is that Mozilla chose and backed it for building the company’s crazy-fast new Web browsing engine, Servo. Here, from a working developer’s point of view, I’ll explain the characteristics Mozilla has focused on when creating Rust, and how the company plans to use Rust to replace Gecko (the existing Firefox engine) with Servo.

The needs of Servo defined how Rust must improve over current languages — especially C++, which Rust will replace in future Mozilla browsers. If I had to single out one improvement in Rust, it’s its inherent safety. It eliminates the possibility of most of the errors that occur on applications written in C/C++. At the same time, Rust is also designed with concurrency in mind, facilitating the development of applications with a high level of parallelism. Furthermore, Rust achieves these improvements while being a low-level language with the same high performance everyone expects from C++.

Most errors in C/C++ applications come from its memory mishandling, such as allowing invalid memory accesses to data already released and reused, and buffer overruns to memory beyond the data structure you are intending to read and write. To solve these problems, Rust has brand-new memory management with static types, no implicit conversions, bound checks, variable addressing that’s statically checked by the compiler, non-mutable variables by default, and an ownership model that allows the application to automatically free the memory when its scope ends — and more importantly, ensure the validity of every pointer.

Many, if not all, of these concepts are already found in managed languages like Java and C#. But Rust allows them in applications compiled as native code, without needing to run within a runtime, and without suffering the big performance penalty of a garbage collector.

Although far from being as bad as a managed language, all those bound checks come with an small performance penalty over unsafe languages. So Rust also allows the execution of unsafe code, to allow the maximum possible performance for the occasional critical bits of code.

Rust’s ownership model model also provides a solution to painless development of highly parallel applications, so we can avoid the feared race conditions. Every thread is isolated in Rust, but data can still be shared through channels, which also transfers ownerships of the messages sent along, preventing the sender from racing back to that data. Locks can be defined, and some data types can be allowed to be shared by multiple threads.

The Servo Web Engine

Mozilla has put all the potential of this language to good use with their new Web engine: Servo.

Gecko, Firefox’s current Web engine, is a real dinosaur. It’s difficult to maintain, difficult to extend, and it’s poorly adapted to modern PCs and mobile devices. This is why Mozilla is building a revolutionary new engine from scratch to replace it and correct all of those defects. Choosing Rust facilitates Servo to divide every rendering task of HTML in as many parallel subtasks as possible. This way, the browser will be able to take advantage of modern processors. Even phones come nowadays with multiple cores, and MediaTek will soon launch a SoC with 10 CPU cores. The fact that Rust is inherently much safer than C++ doesn’t hurt, either.

Mozilla and Samsung have shared some performance comparisons between Servo and Gecko engines. When comparing the loading of CNN’s website, we can see that with a single processor, Servo is much faster than Firefox’s existing engine, and when running with a quad-core processor, the loading time decreases significantly.

To facilitate the adoption of Servo outside their own browsers, Mozilla has abandoned the complicated and troublesome Gecko API, and has adopted the Chromium Embedded Framework API, instead of yet creating another new Web API of its own. Despite being based on Blink (Chrome’s new web engine), this API aims to completely isolate users from the ever-changing, underlying Web engines, and has already been chosen by Adobe and Valve for its Steam Client.

Servo’s Roadmap tells us to expect an alpha browser later this year, but Mozilla is focusing on mobile and embedded spaces. So for the next two years, we should only expect mobile Servo browsers, and maybe the engine embedded within third-party software. Considering the spectacular results of those initial tests, we will have a hard time waiting so long.

It’s probably still too soon to start learning Rust for many developers. But if the Servo web engine becomes as successful as it looks, then Rust will have enough validation to stay with us for a long time.


Windows 10's seven editions

Windows 10's seven editions are excessive:
 
Greg Shultz offers his take on the seven editions of Windows 10, and wonders if Microsoft's plans for a free OS include reviving the Anytime Upgrade program.

windows10editions.png
 Image: Greg Shultz/TechRepublic

Microsoft announced last week that there will be seven editions of the Windows 10 operating system (OS). When I first learned this information, I was surprised; the way Microsoft has been talking about Windows 10 being the last major upgrade -- plus, the fact that the upgrade will be free for the first year for qualifying devices, and future upgrades will be delivered in an ongoing fashion -- I assumed there would just be a consumer/business edition, a mobile edition, and an enterprise edition.
In a May 13 post on the Blogging Windows site, Tony Prophet, VP of Windows Marketing at Microsoft, introduced the seven Windows 10 editions as follows:
As in the past, we will offer different Windows editions that are tailored for various device families and uses. These different editions address specific needs of our various customers, from consumers to small businesses to the largest enterprises.
The seven editions of Windows 10
  • Windows 10 Home: This is the most basic edition and will be the one most consumers will get on their desktops, laptops, and tablets.
  • Windows 10 Pro: This prosumer and small business edition of the OS will run on desktops, laptops, and tablets. It will have a higher-end feature set and advanced centralized management features.
  • Windows 10 Mobile: This small device edition will run on smartphones and small, 7/8-inch Windows tablets.
  • Windows 10 Enterprise: This advanced edition of the OS is designed for large organizations running Windows servers in a network domain environment.
  • Windows 10 Education: This is similar to the Enterprise edition but will have a feature set that is tailored to schools.
  • Windows 10 Mobile Enterprise: This advanced edition of the Mobile edition is designed for large organizations.
  • Windows 10 IoT Core: This specialized, advanced edition of the OS is designed to run on industrial devices, such as ATMs and cash registers.
A simpler approach
After reading the more detailed descriptions on the Introducing Windows 10 Editions blog post, I think five editions of Windows 10 would suffice.
It makes sense to have a Windows 10 Mobile edition for smartphones and small tablets. I can also see that having Windows 10 Enterprise and Windows 10 Mobile Enterprise for large organizations is necessary. And, Windows 10 IoT Core is definitely its own type of animal.
However, I think that one edition of the core OS for desktops, laptops, and tablets is plenty. I'd bag the Home, Pro, and Education distinctions and have one edition with the Pro/Education feature set and just call it Windows 10. After all, if the core OS is going to be free, what's the need for multiple editions?
 
The Anytime Upgrade approach
The answer might be that perhaps Microsoft plans to give us equivalent editions for free and then charge users to move up an edition via a revised Windows Anytime Upgrade program. (In Windows 8/8.1, Anytime Upgrade was renamed to Add features to Windows 8/8.1.)
So, if you're running Windows 7 Home/Home Premium or Windows 8.1, you'll get a free upgrade to Windows 10 Home; if you want more features, you'll have to fork out some cash to move up to Windows 10 Pro. If you have Windows 7 Professional/Ultimate or Windows 8.1 Pro, you'll get a free upgrade to Windows 10 Pro; if you want to move up to Windows 10 Education, it'll cost you.
How much extra cash? Well, that remains to be seen. If the past is any indication, it could cost close to $100. For example, going from Windows 7 Home Premium to Windows 7 Professional costs $89.95. Going from Windows 8.1 to Windows 8.1 Pro Pack costs $99.99.
 
Just like going from Windows 7 Home Premium to Windows 7 Professional or Windows 8.1 to Windows 8.1 Pro, there will be a feature incentive to go from Windows 10 Home to Windows 10 Pro. For example, with Windows 7 Home, you can use Remote Desktop to connect to another computer configured as a host, though Windows 7 Home cannot be configured as a Remote Desktop host; to get that capability, you have to move up to Windows 7 Professional. Likewise, if you have Windows 8.1 and want Windows Media Center, you have to upgrade to Windows 8.1 Pro.
What features will be missing from Windows 10 Home that you'll have to move up to Windows 10 Pro to get? That's unknown at this point, but one good candidate might be the Task View virtual desktop feature.
What's your take?
Would you rather see a single core edition of Windows 10? If you end up with a lower edition of Windows 10, are you willing to pay to get more features? Share your opinion in the discussion thread below.

Paytm Promo code & Cashback

Get latest Paytm cashback coupons, discount offer and working promo codes.

paytm promo codes may 2015
Latest Paytm Coupons & Discount Codes of JULY 2016.
1.Get 1% upto 300 cashback on Prepaid, Postpaid, landline, DTH
Get 1% cashback on Prepaid recharges, Postpaid bill pay, landline, DTH recharges,Data card recharge. Max cashback Rs 300. No Minimum transaction amount require. Five time per user.
Use coupon- GRAB300

2. Har Din Lakhpati: Win 1 Lakh Cashback daily
Everyday win 1 lakh on Paytm. Make maximum transactions and use more Paytm services to make chances higher. Winners will be announced in 48hrs at given page
 Use Coupon- LAKHPATHI   

3.Get Rs.25 cashback by adding Rs.250 to Wallet.
  • Rupay Card user Get Rs.25 cashback on adding cash to Paytm wallet. All User can avail this offer. 
  • Use coupon- RUPAY25