labor - Dave's Blog

Search
My timeline on Mastodon

Retweet of unconed

2015 Dec 19, 5:41
Here's an elaboration of that last thought. Mathematicians are insane. Q.E.D. pic.twitter.com/OqbJAokBTg
PermalinkComments

Web Worker Initialization Race

2012 Feb 24, 1:44

Elaborating on a previous brief post on the topic of Web Worker initialization race conditions, there's two important points to avoid a race condition when setting up a Worker:

  1. The parent starts the communication posting to the worker.
  2. The worker sets up its message handler in its first synchronous block of execution.

For example the following has no race becaues the spec guarentees that messages posted to a worker during its first synchronous block of execution will be queued and handled after that block. So the worker gets a chance to setup its onmessage handler. No race:

'parent.js':
var worker = new Worker();
worker.postMessage("initialize");

'worker.js':
onmessage = function(e) {
// ...
}

The following has a race because there's no guarentee that the parent's onmessage handler is setup before the worker executes postMessage. Race (violates 1):

'parent.js':
var worker = new Worker();
worker.onmessage = function(e) {
// ...
};

'worker.js':
postMessage("initialize");

The following has a race because the worker has no onmessage handler set in its first synchronous execution block and so the parent's postMessage may be sent before the worker sets its onmessage handler. Race (violates 2):

'parent.js':
var worker = new Worker();
worker.postMessage("initialize");

'worker.js':
setTimeout(
function() {
onmessage = function(e) {
// ...
}
},
0);
PermalinkCommentstechnical programming worker web-worker html script

Completion of IANA Selection of IDNA Prefix

2010 Dec 8, 6:44Description of how they picked 'xn--' as the ACE prefix for IDN. Shockingly elaborate =)PermalinkCommentsidn technical ace encoding unicode rfc ietf

C-SPAN Video Player - House Judiciary Subcmte. Hearing on Immigration and Farm Labor

2010 Sep 24, 8:38"Comedian Stephen Colbert joined the panel of witnesses at a House hearing on immigrant farm workers. Mr. Colbert has partnered with United Farm Workers and their campaign calling on unemployed Americans to take jobs in the agriculture sector. The organization's president, Arturo Rodriguez, also testified at the Judiciary Subcommittee on Immigration and Border Security hearing chaired by Rep. Zoe Lofgren (D-CA).
Washington, DC : 2 hr. 10 min."PermalinkCommentshumor video stephen-colbert politics immigration farm labor house

The appendices of the CSS specification are in alphabetical order [dive into mark]

2010 Feb 24, 4:13Wow, its true... the CSS appendices titles start with the letter of their appendix. The 'Appendix E. Elaborate description of Stacking Contexts' is pushing it though.PermalinkCommentshumor css technical specification reference

Dive Into HTML 5 by Mark Pilgrim with illustrations from the Public Domain

2009 Aug 21, 3:26"Dive Into HTML 5 seeks to elaborate on a hand-picked Selection of features from the HTML 5 specification and other fine Standards. I shall publish Drafts periodically, as time permits." Lovely design.PermalinkCommentsvia:waxy reference programming howto design html5 typography mark-pilgrim html web development technical

Hot Tub Time Machine | Film | A.V. Club

2009 Jul 24, 11:56New movie Hot Tub Time Machine: "Craig Robinson, John Cusack, Rob Corddry, and Clark Duke are transported back to 1986 in a magical hot tub. So crazy it just might work? Elaborate joke?"PermalinkCommentshumor time-travel hot-tub movie video preview

A Bulbdial Clock - Evil Mad Scientist Laboratories

2009 Apr 9, 8:56Someone implemented the Ironic Sans artificial sundial clock concept! "Last year David Friedman published on his blog Ironic Sans an interesting design concept for something that he called The Bulbdial Clock. That's like a sundial, but with better resolution-- not just an hour hand, but a minute and second hand as well, each given as a shadow from moving artificial light sources (bulbs). We've recently put together a working bulbdial clock, with an implementation somewhat different from that of the original concept."PermalinkCommentshowto diy clock led sundial via:swannman

STREET WITH A VIEW: a project by Robin Hewlett & Ben Kinsley

2008 Nov 22, 5:22"On May 3rd 2008, artists Robin Hewlett and Ben Kinsley invited the Google Inc. Street View team and residents of Pittsburgh's Northside to collaborate on a series of tableaux along Sampsonia Way. Neighbors, and other participants from around the city, staged scenes ranging from a parade and a marathon, to a garage band practice, a seventeenth century sword fight, a heroic rescue and much more."PermalinkCommentsgoogle map street view pittsburgh streetview internet art

Evil Mad Scientist Laboratories - Binary Birthday

2008 Nov 19, 4:28"A binary birthday candle. It consists of a single candle with seven wicks, where the wicks that are lit represent the birthday individual's age in binary. This single candle design works flawlessly to represent any age from 1 to 127, never requiring anyone below the age of 127 to blow out more than a mere six candles at a time."PermalinkCommentsvia:swannman birthday geek math humor howto cake birthday-cake candle binary

THOMAS Publishes Permanent Links (Another Recommendation Realized) | The Open House Project

2008 Oct 10, 3:35Apparently thanks to the Open House Project, US legislation can now have real and permanent links. I'm kind of surprised that legislation would exist so freely on the Internet without real links. The Open House Project is "a collaborative effort by government and legislative information experts, congressional staff, non-profit organizers and bloggers to study how the House of Representatives currently integrates the Internet into its operations, and to suggest attainable reforms to promote public access to its work and members."PermalinkCommentsinternet url link uri politics

This American Life

2008 Aug 18, 11:29"A special program about the housing crisis produced in a special collaboration with NPR News. We explain it all to you. What does the housing crisis have to do with the turmoil on Wall Street? Why did banks make half-million dollar loans to people without jobs or income? And why is everyone talking so much about the 1930s? It all comes back to the Giant Pool of Money."PermalinkCommentspodcast audio economics npr radio mortgage

Evil Mad Scientist Laboratories - How to make a Sawed-off USB Key

2008 Jul 17, 5:39DIY instructions on making a flash drive that looks like a cut up USB cable: "Holy crap-- somebody just went and TORE MY FREAKING USB CABLE IN HALF while it was still attached to my laptop!!! No-- wait-- sorry. That's just my USB drive. My bad. Never mindPermalinkCommentsdiy humor flash usb tutorial

Gin, Television, and Social Surplus - Here Comes Everybody

2008 Apr 28, 12:55Clay Shirky talks about the surplus of thought that TV occupies.PermalinkCommentsarticle clay-shirky culture internet tv technology collaboration community history

Protest Culture -- Ad Hoc vs Institutional, and What it Means (Event Video/Audio) | Berkman Center

2008 Mar 31, 3:43Clay Shirky talks to a very small audience. Starts with more examples like prev. video. @20:30 describes interesting problems he hasn't resolved. @31:04 interesting exchange between listeners and Clay.PermalinkCommentsvideo cooperation social web politics law internet culture collaboration community

Here Comes Everybody: The Power of Organizing Without Organizations (Event Video/Audio) | Berkman Center

2008 Mar 31, 2:33Clay Shirky gives a talk about how the Internet changes everything via organization and collaboration.PermalinkCommentsvideo book clay-shirky via:librarythingblog social talk research internet

TED | Talks | Howard Rheingold: Way-new collaboration (video)

2008 Feb 17, 11:25How the Internet can allow new forms of collaboration, solutions to tragedy of commons, prisoner's dilemma.PermalinkCommentsvia:felix42 cooperation collaboration howard-rheingold video ted internet

Evil Mad Scientist Laboratories - AlphaPOV: An alphanumeric persistence of vision display

2007 Jul 2, 9:13PermalinkCommentsdiy electronics make programming led via:swannman

Home : Nature Precedings

2007 Jun 18, 10:49"Nature Precedings is trying to overcome those limitations by giving researchers a place to post documents such as preprints and presentations in a way that makes them globally visible and citable."PermalinkCommentsscience research journal nature database collaboration archive community

What is reCAPTCHA?

2007 May 26, 7:21Captcha system that helps digitize books at the same time.PermalinkCommentscaptcha ocr spam free tool sollaboration book books
Older Entries Creative Commons License Some rights reserved.