Thursday, March 03, 2011
Script Junkie | IndexedDB – The Store In Your Browser
Script Junkie | IndexedDB – The Store In Your Browser: "Simply put, IndexedDB is a persistent store that lets you save and retrieve JavaScript objects. The objects are indexed based on a “key” or an “index” property of the object. The API also allows for iterating over the objects. Hence, IndexedDB is not really relational in the sense of a traditional database; relationships between different object stores are not explicit. The storage is also subject to the same origin policy."
Bit Twiddling Hacks
Bit Twiddling Hacks: "Swapping values with XOR
#define SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))
This is an old trick to exchange the values of the variables a and b without using extra space for a temporary variable."
#define SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))
This is an old trick to exchange the values of the variables a and b without using extra space for a temporary variable."
History API - Dive Into HTML5
History API - Dive Into HTML5: "The HTML5 history API is a standardized way to manipulate the browser history via script. Part of this API — navigating the history — has been available in previous versions of HTML. The new parts in HTML5 include a way to add entries to the browser history, to visibly change the URL in the browser location bar (without triggering a page refresh), and an event that fires when those entries are removed from the stack by the user pressing the browser’s back button. This means that the URL in the browser location bar can continue to do its job as a unique identifier for the current resource, even in script-heavy applications that don’t ever perform a full page refresh."
Researchers Crack the Mystery of the Missing Sunspots - NASA Science
Researchers Crack the Mystery of the Missing Sunspots - NASA Science: "'Plasma currents deep inside the sun interfered with the formation of sunspots and prolonged solar minimum,' says lead author Dibyendu Nandi of the Indian Institute of Science Education and Research in Kolkata. 'Our conclusions are based on a new computer model of the sun's interior.'"
Wednesday, March 02, 2011
Spacewar! - Original 1962 code on PDP-1 emulator
Spacewar! - Original 1962 code on PDP-1 emulator
"In 1997 we posted a playable version of the Spacewar!, the first graphical computer game. Spacewar! was written by Russell et al at MIT in the early '60s. We did not re-implement the game. Rather, we found the original source code, rebuilt it to get an authentic binary and ran it on a PDP-1 emulator that we wrote in Java. We chose Java to implement the PDP-1 because we believed at the time — correctly as it turned out — that a Java version would survive the browser wars. Also, it would not require any effort to keep it running on all platforms well past the turn of the millennium, and through the traffic peaks of Spacewar's 40th and 45th birthday. It's now getting close to 15 years later. We would not want to bet that in another 15 years a Java program will still run on the latest popular platforms. As a hedge to the future, and in an effort to continue the preservation of this significant digital artifact, we've now ported the PDP-1 emulator to Javascript/HTML5. This should see the game through Spacewar!'s 50th (and hopefully 60th) birthday. Expect another update around 2025."
"In 1997 we posted a playable version of the Spacewar!, the first graphical computer game. Spacewar! was written by Russell et al at MIT in the early '60s. We did not re-implement the game. Rather, we found the original source code, rebuilt it to get an authentic binary and ran it on a PDP-1 emulator that we wrote in Java. We chose Java to implement the PDP-1 because we believed at the time — correctly as it turned out — that a Java version would survive the browser wars. Also, it would not require any effort to keep it running on all platforms well past the turn of the millennium, and through the traffic peaks of Spacewar's 40th and 45th birthday. It's now getting close to 15 years later. We would not want to bet that in another 15 years a Java program will still run on the latest popular platforms. As a hedge to the future, and in an effort to continue the preservation of this significant digital artifact, we've now ported the PDP-1 emulator to Javascript/HTML5. This should see the game through Spacewar!'s 50th (and hopefully 60th) birthday. Expect another update around 2025."
Subscribe to:
Posts (Atom)