LBiQ

Typed arrays in JavaScript

Very Large Array
Very Large Array by Julia Manzerova

NERD ALERT! The Firefox 4 beta features typed arrays in JavaScript. They have been introduced to improve performance when working with binary data e.g. in Mozilla’s implementation of the FileAPI. Currently raw data is parsed as a string and read character by character using charCodeAt(). Typed arrays let you work with raw binary data. As a side effect, a JavaScript typed array will only let you store one type of variable within it; you can not mix strings and floats. And a JavaScript typed array will not allow you to change the size of the array after instantiation. Here are the types you can specify:

Int8Array
Uint8Array
Int16Array
Uint16Array
Int32Array
Uint32Array
Float32Array
Float64Array

While the performance results (http://weblog.bocoup.com/javascript-typed-arrays) are undoubtedly impressive, is there a place for typing in JavaScript? Surely the flexibility, dynamic nature and lightweight syntax of the language is it’s appeal? Introducing typed arrays is cited as a performance improvement, but in fact many other areas of the language could be dramatically improved by changing or introducing new features, so are Mozilla setting a dangerous precedent here? The abandoned ECMAScript 4th edition (PDF link) featured optional type annotations as well as optional static type checking, but the most recently approved ECMAScript 5th edition (PDF link) has neither of these.

Interestingly, the typed array draft spec originally came out of the spec for WebGL, the 3D graphics context of the HTML5 Canvas element.

Your thoughts? Happy, sad? Tearful? OUTRAGED? Leave a comment below and let’s tell Mozilla exactly what we think of their spec-disregardin’.

Tags: , , , ,

0 comments Add This

Your Shins, Your Face, Your Mum

This week the LBi Black Eagles soft ball team, entered their penultimate game.  Though Crayon were at the bottom of the league, as former underdogs ourselves, our optimism was cautious. Furthermore, with a hurricane blowing around us and the pitch surrounded on all sides by inept footballers, the arena was set for an epic battle.

Crayon stepped up to bat first, but we saw them away with no danger of them scoring. Our most reliable weapon, Captain Darling himself, got us started, and the hits just kept on coming, occasionally in all violation of sense (common or otherwise). He had superlative backup throughout in the form of J Miesner 2: Electric Boogaloo, Keith from Google, and Doc Brown, whose hits were so powerful they warped the very fabric of space and time, so that to the untrained observer they kept looking like foul balls!  And let’s not forget the tireless efforts of Pollyanna, because there’s no shame in walking to victory. Meanwhile our masterful fielding kept Crayon off the scoreboard, eventually granting them a solitary run for the sake of preserving some level of tension. In Crayon’s final turn at bat, their last hope was caught out by Darling in a display of ninja prowess Splinter would be proud of.  We went on to get another 7 runs, rendering our victory complete.

The final score was our most resounding triumph to date, 16-1! Looking back at our Week 1 loss of 17-2, we have truly completed our evolution from plucky outsiders to an unbridled force of nature. Now the final chapter awaits: next week we challenge the unbeaten Facebook for the title of most awesome-est softball team ever (….division 5). We have the will, we have skill – we need supporters!  Ask not what your softball team can do for you, but what you can do for your softball team: join us as the Black Eagles soar into the pages of history…

AS ONE!!!

(Also there will be beer.)

Catch of the Match – Darling’s ninja skills

MVP – Pollyanna, doing a sterling job in backstop (and playing her first ever softball game!)

Dick of the Day – The Chancellor, for her preeminent sledging of the opposition

Photos can be seen here

Tags: , , , , , , ,

0 comments Share

LBi and bigmouthmedia Brazilian Staff Party

This years summer staff party for all the troops @LBiLondon and @bigmouthmedia is Brazilian themed.

“London’s got its Sunny on, the beer’s flowing and the caipirinhas are being mixed. Squint and you could be shaking your hips at the Copacabana or slinking down Ipanema.

This year’s summer party has a Brazilian flavour, so get in the Samba spirit and join us on the roof terrace”

LBi and bigmouthmedia Brazilian Summer Staff Party


NB: THIS IS A PARTY FOR LBi AND bigmouthmedia EMPLOYEES ONLY.

Tags: , ,

0 comments Share

Interface Development team weeknote (week 1036)

Week ending 09/07/10:

Andrew spent some time this week catching up with our TripleLBi colleagues in Copenhagen, and was pleased to find the Danes were developers with sharp skills. Project Battle of the Giants is being built out of Copenhagen with Andrew advising on architecture and beer. And them Danes are giants: what do they feed them over there? Yes, I know, bacon and blue cheese; blue cheese that made Andrew’s eyes water and filled his hotel dreams with monsters with flowing fair manes.

Jon conjured up a nice piece of news over on Project Raiders of the Orient Express: they’ve tamed the Photoshop JavaScript engine (actually ExtendScript, Adobe’s extended implementation of JavaScript), which has been a standard part of the application since version 7. Using it they’ve written a script to receive a JSON file and an image button template and automatically generate 50 buttons in 5 different styles and themed 5 different ways. That’s 1250 different buttons! The script generates in 15 minutes what may take a tablet-wielding Mac operator much, much longer, no matter how strong their Photoshop-fu. Apparently the JavaScript took a while, but that’s an impressive return on investment.

Tom and Ray delivered another massive code drop to Project Incident In Istanbul, which includes some seriously innovative banking transaction representations. I’d love my bank’s website to have even a tiny bit of the impressive functionality and design polish that this project is currently rolling with.

Martin spent last week involved in yet more discoveries around the capabilities of CSS3 gradients and RGBa opacity, and investigating server-side image generation to enable Project Aurora to use fonts that we are unable to embed via @font-face due to restrictive licenses. It seems that this is the only non-sIFR method of including such font faces that doesn’t require JavaScript to work, and won’t present the FOUT (Flash of Unstyled Text ). It’s not a discovery he’s particularly pleased about, and says it’s very frustrating to deal with font foundries who refuse to embrace the changing nature of the web by updating their licensing (seriously, he’s been bitching in the back-channel all week long about technologically-retarded and reality-denying font foundries)

Tags: , , , , , , , , , ,

0 comments Share

New Facebook film not to be promoted on Facebook

In  ironic but sadly unsurprising news Boom Town have confirmation from Columbia TriStar Motion Picture Group that Facebook will not be used to promote David Fincher’s new film The Social Network that depicts the early days of, you guessed it, Facebook.

SVP of Media Relations Steve Elzer cited Facebook’s advertising guidelines which forbid the use of advertisements that reference Facebook unless Facebook have themselves granted permission. Given Zuckerberg’s personal disapproval of the film – he argues the book it is based on, Ben Mezrich’s The Accidental Billionaires, contains inaccuracies – this is obviously highly unlikely to be forthcoming.

Perhaps more surprising is the fact that there currently appears to be no official presence for the film on Facebook at all, although the official site for the film does feature a button to share the link to Facebook and one unofficial . Whilst there are rules against trying to represent brands or individuals without authorisation there do not appear to be rules suggesting Facebook authorisation is required for fan pages in general. Indeed, in the past there have been debate over whether Facebook should delete pages that contain questionable views and the general consensus has been that to do so would restrict freedom of speech.

Elsewhere the promotion for the film is remarkably creative. The movie poster (pictured here) is a fantastic departure from the norm, using typefaces creatively and riffing on the browser bar, creating a recognisable strip down the side. So far two teaser trailers have been released (both are available on the official site) and they are a long way from the bombastic teasers we have come to expect, playing on text and the Facebook interface.

For a film about social media to lack a clear social media strategy appears to be a massive missed opportunity – there isn’t even a Twitter account – but with the film’s release not until November perhaps we will see this rectified. Who knows – maybe it is all part of the tease!

This story was originally posted at The Wall.

Tags: , , , ,

0 comments Share