Posts

Showing posts from October, 2012

Online conferences

Intriguing concept: the JavaScript Summit 2012 (Nov 13-15) is an online conference . How it works Here is how the JavaScript Summit works (quoting the website): [...] sign in and enter the [Flash-based] virtual meeting space. Once you are signed in, you'll be able to see and hear the presentations as they happen, ask questions as needed and chat with the other attendees if you like! Additionally, tickets include acess to slides and video recordings of the talks. Benefits Benefits compared to offline conferences. The main benefit of an online conference is that one doesn’t have to travel to attend. In fact, one doesn’t even have to leave one’s home. The audience benefits twice: First, it’s more pleasant for them. Second, the chance of good speakers attending increases, as they don’t have to travel, either. Another benefit of online conferences is that their locations are virtual – large audiences can be accommodated cheaply. That’s good for organizers (more money), but also f...

Object properties in JavaScript

Update 2013-08-25: Blog post “ Protecting objects in JavaScript ” ( Object.preventExtensions() , Object.seal() , Object.freeze() ). Properties determine the state of an object in JavaScript. This blog post examines in detail how they work. Kinds of properties JavaScript has three different kinds of properties: named data properties, named accessor properties and internal properties. Named data properties (“properties”) “Normal” properties of objects map string names to values. For example, the following object obj has a data property whose name is the string "prop" and whose value is the number 123. var obj = { prop: 123 }; You can get (read) a property: console.log(obj.prop); // 123 console.log(obj["prop"]); // 123 And you can set (write) a property: obj.prop = "abc"; obj["prop"] = "abc"; Named accessor properties Alternatively, getting and setting a property value can be handled via functions. Those ...

The future of Markdown

The basic idea of Markdown is simple: To create a document, one writes plain text (bullet lists are lines that start with dashes, styles are written **bold** and *italics*, etc.). To display a document, the plain text is converted to HTML. That gives you the best of both worlds: the plain text is to write (much easier than HTML), store and transfer; the rendered HTML is nice to look at. It is amazing how popular Markdown has become: GitHub supports it for files such as readmes and gists; Stack Overflow uses it for comments; Lean Publishing supports no other format for submitting books; many blog engines let you write posts in it; etc. However, Markdown is poorly specified and there are many slightly incompatible dialects. The blog post “ The Future of Markdown ” (by Jeff Atwood for Coding Horror) mentions a proposal by David Greenspan: I think you and I share some concern (horror?) about Markdown's lack of spec and tests. The code is ugly to boot. Extending or customizing Mark...

Summary of the October 2012 Apple event

Image
This blog post summarizes what Apple has introduced yesterday. Mac mini Phil Schiller commenting on the introductory slide for this segment: “Mac mini. You knew there would be something called ‘mini’ in this presentation, didn’t you?”. Faster processors, quad core option Mac mini with OS X Server : like the normal high-end model, but with two 1TB hard drives and bundled with OS X Server iMac Screen sizes: 27" and 21.5" Both models still have the same pixel count as previous iMacs. That is, neither of them has a Retina display, which is still too expensive (and possibly not even technically feasible) at this size. 75% less reflective: thanks to anti-reflective coating and the laminated display (which means that the display is closer to the glass). Good to see Apple react to user complaints here. The previous moves away from matte towards very glossy were not a good idea. Fusion Drive: 128GB Flash storage plus 1TB or 3TB hard disk drive (HDD) Ha...

Should Windows 8 be split into two operating systems?

Microsoft’s Windows 8 has a confusing split Metro/Desktop personality [1] . To make matters even more complicated, there is an additional version of Windows called Windows RT. This blog post argues that instead, Microsoft should have created two operating systems: one for tablets and one for desktops. Windows RT versus Windows 8 Roughly, Windows RT is a subset of Windows 8 that only supports Metro apps, plus a few Microsoft apps running in Desktop mode. Windows RT runs on ARM processors, which still dominate the mobile device market, including tablets. Microsoft’s first Surface tablets will be based on ARM processors and Windows RT [2] . Surfaces based on Intel processors and Windows 8 will come out 3 months later. One potential problem with Windows RT is that people don’t know what Windows RT is. Quoting “ What Is Windows RT? Redmond, We Have A Problem ” (on Paul Thurrott’s SuperSite for Windows): I really like Windows 8 and think Windows RT is a great long-term play against the i...

ECMAScript.next: TC39’s September 2012 meeting

Thanks to Rick Waldron , we have a detailed account of the decisions regarding ECMAScript.next that were made by TC39 [1] during its meeting from September 18-20, 2012. This blog post summarizes and explains the highlights. September 18 Highlights of the notes : The final draft of the Internationalization API (ECMA-402) has been approved ( page with PDFs , HTML format ). It will be submitted to the Ecma General Assembly for ratification. This API exists separately from ECMAScript and will be available for ECMAScript 5 or later. TC39 discussed River Trail [2] , JavaScript language extensions for parallel programming. River Trail won’t be in ECMAScript 6, but ECMAScript 7 or later is possible. For a while, operators for batch-assignment and/or batch-definition were considered for inclusion in ECMAScript 6. The latest decision was to instead use a function and to specify the properties to be added via an object literal. This kind of merging of two objects is ...

Firefly – the animated series?

At New York Comic-Con, there was a panel for Joss Whedon’s space western Firefly . The show was canceled on TV in 2003 and followed up by a movie in 2005. Actor Nathan Fillion was asked the usual “Will there be more Firefly?” question. He answered: “If we’re dreaming, tell me what you think about this: ‘Firefly – the animated series’.” After the panel, Sean Maher provided more information. Quoting ” ‘Firefly’ cartoon in the works? “ (by Kate Storey for the New York Post): Sean Maher told The Post, “I know somebody who is actually trying to get that done, who has approached Joss [Whedon, the creator] about it. He used to work with Guillermo del Toro.” Earlier, Fillion mentioned that the logistics of doing an animated series are simpler, because voiceover is much less work for the stars and they can telecommute. At the panel, it was heartwarming to see how close the actors still were. For example, they see each other every few months.

Sponsored blog posts: 50% off

To celebrate the arrival of fall and the increased traffic at 2ality, sponsored blog posts are 50% off, for one week. Sponsored blog posts help me offset some of the costs of maintaining 2ality and ensure its long-term viability. You can use them to let 2ality’s readers know about web-related products, services, job offers, etc. Contact me , if you are interested. Details are explained here .

The myth of self-created millionaires

Quoting “ Mitt Romney and the myth of self-created millionaires ” by George Monbiot for The Guardian: We could call it Romnesia: the ability of the very rich to forget the context in which they made their money. To forget their education, inheritance, family networks, contacts and introductions. To forget the workers whose labour enriched them. To forget the infrastructure and security, the educated workforce, the contracts, subsidies and bailouts the government provided. It comes down to the question “How much more than normal employees should executives and company owners make?” And these are interesting points to consider.

JavaScript: parallel programming via River Trail coming to Firefox

2013-12-23: A new blog post on ParallelJS (as River Trail is now called) supersedes this post. River Trail is a set of mechanisms that enable a new functional style of parallel programming in JavaScript. An initial prototype was developed by Intel. Recently, work has started to bring it to Firefox. Intel’s River Trail prototype [The following description is an excerpt from my free ebook “ The Past, Present, and Future of JavaScript ”.] River Trail is an experiment by Intel Labs that adds data parallelism to JavaScript, but without having to explicitly control it, as with WebCL. It introduces the new type ParallelArray with transformation methods that are parameterized via a function implementing the transformation (a so-called elemental function). Arrays have similar methods (e.g. Array.prototype.map ), but ParallelArray 's methods execute their elemental functions several times in parallel. The following code uses ParallelArray : var a = new ParallelArray(1, 2, 3); va...

Invented swear-words and exclamations

Some swear-words and exclamations made up on TV and in the movies are really good. Favorites of mine: Odin’s beard! (Thor in The Avengers: Earth’s Mightiest Heroes ) Whiskers! ( Thundercats ) Frak , fraking ___, etc. ( Battlestar Galactica ) Great Scott! (Doc Brown in Back to the Future )

Controlling the Mac user interface from the shell

The Mac OS X shell has several Mac-only commands for communicating with the graphical user interface (GUI). They are useful in three cases: First, when switching back and forth between shell and GUI. Second, when interacting with the system from a language that is not Objective C or AppleScript: Bash, Node.js [1] , Python etc. open The open command performs multiple tasks. The following subsections give an overview, consult the man page for complete documentation: man open If you use open programmatically (instead of interactively via a shell) then it helps to know the long forms of the options. You can list those by calling open without any arguments. open open and files You can use open to work with files: Open a folder in the Finder: open . Open a file in the application that has been associated with it (which can be overridden per file): open index.html Reveal a file in the Finder (instead of opening it): open -R index.html Open a ...