Friday, 25 March 2011

Apple Patches Critical Safari Holes

Apple last week patched 27 vulnerabilities in Safari for Mac OS X and Windows, 85% of them critical bugs that could be exploited to hijack Macs or PCs.

Of the 27 flaws fixed in Safari 5.0.3 for Mac and Windows, four were patched by Apple two months ago in its iOS mobile operating system, and at least three had been addressed by Google in its Chrome browser as far back as mid-August.
Chrome and Safari share the open-source WebKit browser engine. Apple identified all 27 vulnerabilities it patched today as within WebKit.
Most of the vulnerabilities addressed in the Safari updates -- Apple also patched the older Safari 4 that runs in Mac OS X 10.4, aka Tiger -- were accompanied by the phrase "arbitrary code execution," which is Apple's way of saying "critical."
Unlike other browser makers, including Google, Microsoft and Mozilla, Apple doesn't assign severity labels to vulnerabilities.
According to Apple, the 23 critical bugs can be exploited by "drive-by" attacks that launch as soon as a victim browses to a malicious Web site.
Among the non-critical vulnerabilities patched today was one that could be used by unscrupulous site owners to secretly track users' browsing habits, even when Safari has disabled cookies. Another flaw could let identity thieves spoof the URL showing in Safari's address bar, a common tactic of phishers who feed bogus sites to users in the hope of capturing passwords to online bank accounts.
Apple also fixed several stability bugs, boosted the reliability of its pop-up ad blocker and improved the accuracy of the choices displayed in Top Sites, the navigational feature that posts thumbnails of frequently-visited sites.
As has been the case before, Apple credited a wide range of researchers who work for rivals for finding flaws it fixed today: A third of the vulnerabilities were reported by Google developers, one was submitted by an engineer in Microsoft's bug research team, and another was filed by someone working for Opera Software, the Norwegian company that creates the browser by the same name.
This update was the first since Sept. 7 , and the third since Apple rolled out Safari 5 in June.
Safari 5.0.3 can be downloaded from Apple's site for Mac OS X 10.5 (Leopard), Mac OS X 10.6 (Snow Leopard), Windows XP, Windows Vista and Windows 7.
Mac OS X users will be notified of the new version automatically, while Windows users already running Safari will be alerted by the Apple Software Update tool.

Lua : Programming Language

What is Lua?

Lua is a powerful, fast, lightweight, embeddable scripting language.
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

Why choose Lua?

Lua is a proven, robust language

Lua has been used in many industrial applications (e.g., Adobe's Photoshop Lightroom), with an emphasis on embedded systems (e.g., the Ginga middleware for digital TV in Brazil) and games (e.g., World of Warcraft). Lua is currently the leading scripting language in games. Lua has a solid reference manual and there are several books about it. Several versions of Lua have been released and used in real applications since its creation in 1993. Lua featured in HOPL III, the Third ACM SIGPLAN History of Programming Languages Conference, in June 2007.

Lua is fast

Lua has a deserved reputation for performance. To claim to be "as fast as Lua" is an aspiration of other scripting languages. Several benchmarks show Lua as the fastest language in the realm of interpreted scripting languages. Lua is fast not only in fine-tuned benchmark programs, but in real life too. A substantial fraction of large applications have been written in Lua.

Lua is portable

Lua is distributed in a small package and builds out-of-the-box in all platforms that have an ANSI/ISO C compiler. Lua runs on all flavors of Unix and Windows, and also on mobile devices (such as handheld computers and cell phones that use BREW, Symbian, Pocket PC, etc.) and embedded microprocessors (such as ARM and Rabbit) for applications like Lego MindStorms.
For specific reasons why Lua is a good choice also for constrained devices, read this summary by Mike Pall. See also a poster created by Timm Müller.

Lua is embeddable

Lua is a fast language engine with small footprint that you can embed easily into your application. Lua has a simple and well documented API that allows strong integration with code written in other languages. It is easy to extend Lua with libraries written in other languages. It is also easy to extend programs written in other languages with Lua. Lua has been used to extend programs written not only in C and C++, but also in Java, C#, Smalltalk, Fortran, Ada, Erlang, and even in other scripting languages, such as Perl and Ruby.

Lua is powerful (but simple)

A fundamental concept in the design of Lua is to provide meta-mechanisms for implementing features, instead of providing a host of features directly in the language. For example, although Lua is not a pure object-oriented language, it does provide meta-mechanisms for implementing classes and inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the language small, while allowing the semantics to be extended in unconventional ways.

Lua is small

Adding Lua to an application does not bloat it. The tarball for Lua 5.1.4, which contains source code, documentation, and examples, takes 212K compressed and 860K uncompressed. The source contains around 17000 lines of C. Under Linux, the Lua interpreter built with all standard Lua libraries takes 153K and the Lua library takes 203K.

Lua is free

Lua is free open-source software, distributed under a very liberal license (the well-known MIT license). It may be used for any purpose, including commercial purposes, at absolutely no cost. Just download it and use it.

Where does Lua come from?

Lua is designed, implemented, and maintained by a team at PUC-Rio, the Pontifical Catholic University of Rio de Janeiro in Brazil. Lua was born and raised in Tecgraf, the Computer Graphics Technology Group of PUC-Rio, and is now housed at Lablua. Both Tecgraf and Lablua are laboratories of the Department of Computer Science of PUC-Rio.

What's in a name?

"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!

Thursday, 24 March 2011

Dirt 3

While Dirt 2 was another highly praised, commercially successful racing game for Codemasters, the studio received plenty of feedback from fans about how to improve it. Tackling criticism is never an easy task, but the team is up front about how it aims to appease fans. More rally driving, more cars, and more variety in stages are the main points they are aiming to address, as well as a greater level of visual and aural fidelity. We found out about the developer's aims during a recent visit to Cardiff, Wales, and spoke to legendary driver Ken Block about gymkhana's inclusion in Dirt 3--the first time the discipline has ever appeared in a racing game.


The main criticism that Codemasters faced post-Dirt 2 was that the game sacrificed rallying for other disciplines. As a result, Dirt 3's career mode will be 60 percent rallying. We got to race the Audi Sport Quattro around one of the new rally stages set in Finland and were impressed with the myriad of improvements. The physics engine is noticeably more advanced, resulting in very realistic differences between surface types. As we went around corners, the wheels touching the grass would slow down, meaning that we could use the rougher surface to tactically aid drifting. As one representative noted, the undulating dips on some of the tracks can also be used to your advantage, acting as grooves for your wheel to follow round the bend.
There are also new assists that help novice rally drivers when they're just starting out. These were turned on by default in our playtest and included stability control, corner braking, and throttle management. Once disabled, the car became more difficult to drive and more prone to spinning out, but not uncontrollably so, just adding another layer of challenge during our third and fourth run-throughs of the track. Codemasters has also chosen to keep the flashback feature of the second game, allowing you to rewind and retry any section of your run. However, the overall difficulty levels are still being tweaked at this stage, so we'll have to wait and see what levels of accessibility and simulation are catered for.
One thing's for sure--with gymkhana now included in the game, rally aficionados are going to have a serious challenge on their hands. Gymkhana is a series of stunts and jumps that are performed in quick succession, and it's a sport that has been popularised by Ken Block on YouTube. The track that we got to play on was a short section of the DC Compound, otherwise known as London's Battersea Power Station, which also appeared in Dirt 2. The compound will gradually open up as you progress through the career, but we got a short section to drive around and test our skills in.
The compound run contained six challenges that we had to try to complete as quickly as possible. Pole Dancer required us to lock the handbrake and donut around one of the pillars on the track--a tricky skill that needs a gentle finger on the accelerator and precise application of the brakes. Other drifting challenges were Trailer Thrash, Pipe Dream, and Can You Dig It, which have you balletically careering your car under trailers, through pipes, and under a digger's arm, respectively. Finally, there were Airborne and Block Buster--the former rewarding a jump with a clean landing, and the latter being about smashing all the foam blocks dotted around the track. This course took us many minutes to complete, even after numerous runs, but it's clear that gymkhana will offer hardcore players proving grounds that will separate the best from the best.


Developers at the studio have managed to clock a 36-second record--an impressive time that they admit will no doubt be smashed by players once the game is released. Bragging rights will also be improved by the fact that you can edit and upload gameplay clips to YouTube, meaning that Ken Block's real-world runs could very well be bettered by virtual ones.

Firefox 3.6 is Out there

There's a brand new Firefox in town: Firefox 3.6. It's not a huge update, but it does offer improved performance and stability together with some interesting new features.
One of the most important changes is improved support for HTML5, the next generation of the language in which the web is written.
That enables two particularly eye-catching things: the ability to watch streaming video without installing a plug-in, and support for the HTML5 File API, which means developers can use dragging and dropping between browser and desktop.
Firefox plug-ins
PLUG-IN HELP: Firefox will now tell you if plug-ins are out of date, reducing your potential exposure to some security threats.
With video, Mozilla's timing couldn't be better: YouTube and Vimeo have both announced HTML5 video players that dispense with the need for Adobe's Flash. Unfortunately neither player currently works with Firefox 3.6.
That's because of a schism in the HTML5 world, with Mozilla plumping for the open source Ogg Theora codec and other browsers supporting H.264 encoding instead. Google's Chrome supports both, but YouTube doesn't - and that, plus widespread H.264 support elsewhere, means that H.264 already looks like the winner in this particular format war.
What else is new? There's built-in support for Personas, which enables you to choose from tens of thousands of unpleasant browser themes. That's maybe a bit unfair on Windows, where Personas look pretty nifty, but on the Mac they're consistently hideous.
Personas
CHANGE YOUR LOOK: Personas - themes - are now built in, enabling you to preview new Personas with a single click. Some are more successful than others
More usefully there's support for the WOFF web font format, which enables print-style typography online. The browser now checks whether your plug-ins are out of date and warns you accordingly, which can help reduce the risk of browser-based exploits. And if you've got a laptop or tablet computer with an accelerometer in it you control the browser by tilting your PC.
If you're paying really close attention you'll also notice that when you open a new tab it appears next to the current one, not to the right of every other open tab. It might be a little change but it makes things much less confusing when you've got tens of tabs open at once.
How does it perform?
Last but not least there's performance, and this is the fastest Firefox yet. The JavaScript engine is faster than in Firefox 3.5. But while it's not as fast as Chrome you'd expect this: Google's various applications make heavy use of JavaScript, and the search giant has tuned its browser accordingly.
It is, however, closer to Chrome's performance than ever before. In the Sunspider benchmarks Firefox did the tests in an average of 1730ms, compared to 930ms for Chrome. That's more than four times faster than IE8, which wheezed through the same benchmarks in 8436ms.
JavaScript performance isn't the only thing that's been tweaked though. Before, every tab was given equal prominence, but now the tab in focus - the one you're currently looking at - gets the lion's share of system resources, which will make it render more quickly.
The browser also supports asynchronous scripts, which means web designers can essentially say "this script isn't that important; render the rest of the page first and then come back to it." Both changes should mean speedier real-world browsing.
Overall, then, this is a worthwhile upgrade. It's not revolutionary, but it delivers a host of improvements in speed, stability and support for emerging standards. It might not be pretty, but it's pretty damn good.
HTML 5

Assassin's Creed: Brotherhood

While we've played plenty of Assassin's Creed: Brotherhood's multiplayer mode that puts you in the role of templar, honing assassin-like skills, we haven't been able to play much of the single-player portion of the game up until now. Of course, some of the things we played have been shown before--we got our shot at the siege of Monteriggioni shown at the Electronic Entertainment Expo--but we did get a good look at some brand-new levels, such as action sequences that feature Ezio's present-day relative, Desmond Miles. But the start of our play-through begins in a familiar setting, with Ezio in a secret compartment below Rome's Sistine Chapel.
If you've completed Assassin's Creed II, then you already know what happens here and what Ezio saw upon defeating Rodrigo Borgia. Brotherhood picks up shortly after that as Ezio's uncle Mario calls for him, asking if the Piece of Eden is safe. With confirmation that it's in good hands, Ezio makes his way out of the compartment with the aid of some eagle vision, and the two make their way out of the chapel to flee the Vatican. This entire sequence functions like a tutorial, or a refresher, for Ezio's acrobatic moves and combat skills. As in previous Assassin's Creed games, it's incredibly easy to climb the variety of edifices in your view, and fighting guards and other foes generally functions the same way with some minor changes that are revealed later in our play session. Once Ezio and Mario have made their way through the throngs of priests and Vatican guards, they navigate to a nearby tower where they have a brief conversation before performing the assassin's trademark swan dive into the river below.

Moments later, the two arrive at Monteriggioni--the family home of Ezio and Mario. The two ride their horses through the streets of the town (we took the opportunity to deliberately run into people on our steed, of course) and reach the base of the steps where Ezio meets with some familiar faces from Assassin's Creed II, including Caterina Sforza, who makes googly eyes at the younger of the two Auditores. But, before joining his family and guests in the Auditore residence, Ezio makes his way around town, introducing himself to the engineers of Monteriggioni's new cannon defenses as well as a woman who needs help with an easy task. All of this seemingly serves the purpose of helping you become acquainted (or reacquainted) with the general layout of the town as well as Ezio's romancing skills.
Unfortunately, Ezio's homecoming celebration and subsequent tender and private moment with a certain lady abruptly end when a cannon ball comes crashing through the roof of his room. The siege of Monteriggioni by Borgia forces thus begins. As Ezio, you must travel swiftly to the town defenses--a series of cannons aimed directly at the massive army approaching the doors. You're tasked with firing the cannons at targets until Borgia forces overwhelm them with their siege towers and storm the ramparts. It's here that Ezio gets to use a few more of his combat skills, particularly the disarm maneuver that lets him grab his opponent's weapon. But perhaps even more useful is Ezio's kick. When stronger and heavily armored soldiers appear onscreen, there's no sense in trying to attack them with standard combinations, because they can easily defend against them. Instead, you have to create an opening by giving these tough foes a good old-fashioned kick, which momentarily stuns them and gives Ezio enough time to attack. Also, you might be happy to know that when Ezio disarms enemies equipped with spears, he can throw them at his opponents to produce a particularly gruesome death.


Still, even with Ezio's skills, the town is overrun, and Ezio--as well as his family--retreats through a secret passage found in the assassin's tomb located underneath the Auditore residence. The sequence ends, and we're then brought into the present day with Desmond and his crew, who are now charged with recovering the Piece of Eden lost in the siege of Monteriggioni. The group (which is also still on the run from Abstergo) finds itself at the present-day version of the Auditore fortress, which doesn't look all that different from its past incarnation, aside from modern conveniences like electricity. Actually, one of your first tasks as Desmond is to restore electricity to the Auditore residence (so they can power the animus) by using eagle vision to find wiring that eventually leads to power boxes scattered throughout town. He finds these boxes by performing the same dexterous moves as Ezio, since it's explained that Desmond essentially unlocks all of the abilities of his ancestors as he relives more of their memories.
In fact, Desmond finds the same secret passage used by his ancestors to escape the Borgia onslaught thanks to a vision of Ezio. From a story standpoint, as Desmond and Lucy make their way through the passage, it gives glimpses of how the Auditores managed to escape and how they sprung traps on their pursuers. From a gameplay standpoint, this passage functions much like the assassin's tombs from Assassin's Creed II, where the emphasis is placed solely on platforming with some mild puzzle elements. Needless to say, it seems the present day is going to figure much more prominently into Assassin's Creed: Brotherhood than it has in any previous game.
With the exploration of the passageway complete and power restored, Desmond returns to the animus and to the memories of his ancestor Ezio. From here, we spring a little further into one of the game's later sequences. Ezio is in Rome, and he has his sights set directly on the Borgia clan. However, like in Assassin's Creed II, you can undertake any number of missions available to you--whether they're main story missions or just side jobs that aren't directly tied to the core game. At first, we decided to experiment with a few of Ezio's goodies, namely his projectile weapons. Of course, he carries the same concealed gun that he had in Assassin's Creed II, but he also has access to a crossbow--an incredibly effective weapon for taking out those pesky rooftop guards or other foes that just won't get out of your way.


Perhaps our most favorite of all the weapons is the addition of other assassins that can come to your aid with the press of a single button. Ezio will raise his arm and clench his fist to order the attack on nearby targets. Assassins seemingly fall from the sky to take out enemies in the area before disappearing to the rooftops to attack again, but there is a cooldown period, so don't expect that you can continually use this feature. You can also get different types of attacks depending on the number of assassins you've recruited, so if you gather several of them, your assassins can launch a barrage of arrows from the shadows before jumping down to take care of business. We made extensive use of this feature while attempting to raid one of the Borgia towers in Rome. These towers are massive fortifications that you can storm in order to take away Borgia influence from the area, but doing so can be difficult. The one we tried to take required killing a specific general who would flee the area at the first sign of trouble, so finding a good spot to launch the attack from makes all the difference.