JavaScript

At firest I was a little puzzled by this Geek.com story to which Slashdot linked last night. HTML5 includes natively capabilities for playing back audio though not all formats are supported equally by all browsers, for reasons similar to the much more visible debates over video formats. A JavaScript powered player on cursory inspection would seem to be yet another front end to this multimedia capability increasingly available in newer browser.

jsmad isn’t a front end, though. Digging into the story a bit more, it is actually a native decoder for several variations of the MP3 format that runs entirely in JavaScript. It has more in common, then, with the the recent x86 emulator and several game emulators that have been ported or written from scratch to execute in the browser without using any plugins or any special multimedia capabilities.

Porting notes

Obviously, porting low-level C code to Javascript isn’t an easy task. Some things had to be adapted pretty heavily. jsmad is not the result of an automatic translation – all 15K+ lines of code were translated by hand by @nddrylliog and @jensnockert during MusicHackDay Berlin. Then, @mgeorgi helped us a lot with the debugging process, and @antoinem did the design of the demo during MusicHackDay Barcelona.

It performs well enough to decode and play MP3s in realtime on Firefox on modern computers, although if you do lots of things at once, Firefox might forget at all about scheduled tasks and let the soundcard underflow. There is a rescue mechanism for that in the demo, which works most of the time.

There is a fully capable demo, written in a very brief amount of time as part of the Music Hackday. I ran into a couple of issues with playback but outside of that, the experience is entirely comparable with the usual Flash players.

If it is possible to run a fixed point, compute and data intensive decoder like this with nothing more than the browser’s JavaScript engine, I have to imagine it should also be possible to port many of the open formats, like Ogg Vorbis and Flac. As a podcaster, the possibilities here are very alluring. jsmad is free software, available under the GPL v2 so it isn’t unreasonable to expect as interest increases, so should performance, accuracy and stability.

Kindle allowing bypass of Chinese censoring firewall
Slashdot points to an interesting use for the otherwise not very freedom friendly device. Apparently, however the 3G service is provided locally in China, it isn’t being subjected to the same censorship as regular net access. I tend to agree with Professor Kwan’s interpretation, that those in charge of the firewall simply don’t realize the Kindle can be used for anything other than buying and reading books.

Adobe temporarily closes their Flex SDK
According to a conversation with the product manager initiated by The Register, the public source code repository and patch submission for Flex will be closed for a couple of releases. This stems from the fact that while the tool itself, used for creating Flash and AIR apps, is open, the platform is closed. In order to build against the un-released new versions of closed platform components, it is necessary to also close Flex. This demonstrates one considerable risk of working with a set of tools that isn’t all open.

Face detection with HTML5 and JavaScript
Klint Finley at ReadWriteWeb describes a new library that the developer sees as helping with automatically tagging photos online. Even if it doesn’t evolve from face detection to full on recognition, you could easily see how a distributed, in browser trick like this could be effectively coupled with crowd intelligence to allow web applications to offer almost as good identity based tags. I think it is far more interesting to consider how the library might open up compelling, novel interactions with web applications based on a user’s movements and orientation in space. That avenue of thought is less concerning from a privacy perspective, too.

Contest to produce JavaScript demos no more than 1Kb
Slashdot links to this now concluded contest that sort of reminds me of the demo scene in terms of the constraint to bum down code as much as possible. The results are a bit more diverse, including many interactive games as well as passive animations. More so than a lot of recent and fairly contrived “HTML5″ demos, the finalists in JS1K really showcase what modern browsers can do.

Firefox Home adding more devices, social capabilities
Chris Cameron at ReadWriteWeb shares news of Mozilla’s plans for their Sync client for iPhone. Personally, I cannot wait to get an Android powered replacement for my iPod Touch and start running Fennec, their full mobile browser, but in the interim I’m happy that Home is getting such attention from the lizard wranglers. I especially cannot wait for the password sync support planned for a future release.

A Review of Jason Scott’s “Get Lamp”
Text adventure games figured largely in my earliest experiences of computers. It was a no brainer for me to pick up a copy of Scott’s documentary on the subject. I enjoyed it immensely and am far from finished exploring all the material he has included in the two disc set. Jeremy Reimer at Ars Technica has a glowing review that resonates very strongly with my own experience of the work.

Open HDCP software implementation released
Ars Technica, among others, has news of researchers using the recently leaked HDCP keys to build an open source program capable of decrypting encoded digital video streams. Peter Bright questions the utility of the effort as it would still require some sort of hardware to connect into your home media ecosystem. I think the overlooks the very strong tradition of these sorts of proofs of concept developed by security researchers interested in the system more so than its applications.

As The Register explains, this JavaScript engine isn’t aimed at use but rather to make the process of researching the future of the language more inclusive. From Mozilla Labs Tom Austin:

“In programming language (PL) research, we like to write up fancy evaluation rules containing lots of Greek letters. Unfortunately, these rules tend to be inscrutable to anyone who isn’t a PL researcher. Even for PL researchers, there is something unsatisfying about seeing a bunch of rules on a piece of paper.”

Practical concerns rank on his list along side syntax and semantics. JavaScript, especially as implemented in browsers, is the target of a lot of programmers’ ire. Perhaps this effort will lead to more of those who complain the loudest contributing ideas and code. I believe self interest is a powerful motivator so it’s more than likely going to be a benefit of the Narcissus engine and its companion script look-up tool, Zaphod.

Re-targeting ads stalk surfers for weeks after they shop
Slashdot links to a story at NYT that I find fascinating for its potential to drive home the point about widespread behavioral advertising. If more users notice these sorts of creepy practices, the more fuel we’ll have for debate around better practices around transparency and affording the ability to opt out.

Share this:

jQuery is one of the most popular of a class of libraries originally intended to ease the pain of working with JavaScript as implemented by a variety of web browsers. I’ve used jQuery for a couple of projects and other libraries for still others. I find that the API design in jQuery is simpler and more intuitive in terms how how consistently and thoroughly the core idioms are applied. These days, when I need to do any browser work and I have a free choice, I use jQuery.

More recently a rich ecosystem of third party plugins has evolved for jQuery. The quality of design and adherence to the core library’s idioms varies pretty widely but the ability to easily drop in bits that extend jQuery’s reach is attractive, even given the necessary trade-offs that often involves.

I was pretty thrilled, then, to see the H share the announcement that the jQuery developers are looking to do for mobile browsers what they have already done for desktop browsers.

According to jQuery creator John Resig, as part of the new mobile project, the core jQuery library is being improved to work across the various major mobile platforms and their browsers. Resig says that the developers are working to release “a complete, unified, mobile UI framework”. Current expectations are that this will be completed in late 2010.

As the H goes on to explain, the idea will be to ease the creation of touch based apps that degrade gracefully across the different capabilities provided by the combination of mobile browsers with particular mobile devices. jQuery is not the first project to tackling the mobile space, specifically for touch apps on mobile browsers. If they bring the same clean, simple design to the API and the amazing code quality as the original version, they should be able to produce a compelling, competitive offering despite perhaps arriving a little late.

jQuery itself is free software, available under a dual GPL or MIT license. Presumably the new mobile version will use the same licensing scheme which makes it pretty much a no brainer in terms of freedom to use with all kinds of applications. The H links to plenty more detail if you are curious, including a detailed grid of browser support.

Stormy Peters on the desktop, mobile and the cloud
Another tease for OSCON at O’Reilly Radar, this time James Turner interviews Stormy Peters, executive director of the Gnome Foundation. I am glad to read a practical discussion of bring usability, convenience and freedom together. I don’t necessarily see the cloud as a terrifying bugbear threatening software freedom as RMS has made it out, but I do think we need to be asking for and building services that take user freedom and autonomy into account. I am heartened by how well Stormy hits these very points.

Clarifying how user data sharing and advertising works on Facebook
Berin Szoka at TLF shares a video from Facebook CEO Sheryl Sandberg. This explanation certainly makes sense on its face and really should be the sort of aspect, as Berin notes, that services that rely on advertising explain at every opportunity. However, it still doesn’t excuse Facebook’s privacy gaffes and Zuckerberg’s mercurial stance about sharing personal information. It also doesn’t explain how the 3rd party partnering Facebook recently launched works, whether there are risks of exposure there or similar care has been taken to appropriately compartmentalize users’ data.

Share this:

I’ve seen just about everything else implemented in the lightweight, scripting language of the web, so why not a neural network? I saw this via Hacker News and it doesn’t strike me as too far different from libraries for doing heavy graphic processing in JavaScript. I could also see some distributed applications potentially using this. Think about it, modern browsers increasingly provide excellent client side storage, useful for hanging onto locally produced results, and means for sending and receiving data much more smartly, just what you would need to distribute tasks and collect results. I think a folding@home style project that works completely in the browser makes a great deal of sense.

The code is licensed under an MIT license and is available on github. Both would make it pretty simple to grab it and experiment quickly, whether pursuing my idea of distributed neural networks or any application that could make use of the capabilities of such a tool in a lightweight execution environment.

DoJ fails to report wiretaping activities to Congress, again
Mike Masnick at Techdirt links through to some findings by Julian Sanchez that the Attorney General has failed for a period of some years to provide a report on the number of surveillance orders applied for by law enforcers. This report is meant to allow Congress to exercise proper oversight which has essentially just not happened for large swaths of the past decade. As Masnick goes on to explain, the DoJ has done this twice before, lapsing then dumping multiple years of data onto Congress effectively creating years of operation at a stretch where oversight was impossible.

HP experimenting with ad delivering on its cloud based printers
Via Cory at Boing Boing, this Computerworld article has me very concerned. Automatically printing ads along with print jobs your submit over the net is very different from purely digital ads on web pages and email. A user of one of these printers is paying for consumables, most notably ridiculously over-priced ink. I don’t care if HP says their first test subjects didn’t mind, I have to imagine a majority of folks will be surprised, not sanguine, if not outright angry at the presumption.

ExtJS tries to harness developer outrage to fuel its new framework
The Register has an announcement from the ExtJS folks, a dual license AJAX library, that they are launching a new project to compete with mobile apps by combining their library with a couple of others targeted at programming touch interfaces and vector graphics presumably including animation. I’ve worked with ExtJS in a professional capacity and I am not entirely impressed by this attention getting move. I won’t say the library is bad, it packs a lot of capabilities. However, I will say I don’t think it is any easier to program than the iOS or Android SDKs. If you want to target pure web applications using HTML5 at mobile devices, I am positive there are better options.

Categories

Endorsements

"[T]houghtful, informative, and deep, a real plunge into the geeky end of the news-pool. There's great analysis and rumination, as well as detailed explanations of important security issues with common OSes and so on." -- Cory Doctorow