maradydd: (Default)
Yeri "tuinslak" Tiete has been contacted by Belgian ICT minister Vincent Van Quickenborne -- on Twitter. The minister has invited Tielte to come discuss the NMBS/iRail issue with him, and states that "NMBS should be happy with your initiative."

As a recent expat I'm still learning my way around the complexities of Belgian politics, but it's very nice to see this kind of rapid, personal response -- especially from a prominent member of a party as large as Open VLD (who have slipped in power in the last few years, placing fourth among Flemish parties in the recent elections, but are still very much a going concern). I don't know how much influence Van Quickenborne has in his party, but if he can convince Open VLD as a whole to support open access to public data -- which fits in well with the party's emphasis on encouraging innovation and entrepreneurship -- that could very well lead to increased support at the polls. I'm looking forward to seeing how this continues to unfold.
maradydd: (Default)
I don't know what the hell bizarro universe I woke up in today, but I kinda like it. Democrats proposing tax cuts? In my Congress? It's more likely than you think...



Don't miss the money shot at 5:11 -- "particularly when we're using a Chinese credit card to pay for it all." Boo yah.

This should go without saying, but I'll say it anyway -- call your Congresscritters. Make this happen.

(h/t [livejournal.com profile] rialian)
maradydd: (Default)
Here is the preface to Plumbing for the Arduino, the new Creative Commons-licensed book about parallel programming for the Arduino by Matthew C. Jadud, Christian L. Jacobsen, and Adam T. Sampson:
Embedded programming has always been about dealing with the real world in a timely manner.

When you push a button on your microwave, it beeps and updates the display immediately. It doesn’t matter if the microwave is currently making popcorn or not—it responds in near real-time to your touch. If you’ve ever tried to achieve this with your Arduino (or other embedded controller), you discovered that it is very difficult to make your embedded project do two things at once—like controlling a motor while waiting for a button to be pressed. You either found yourself writing large, complex loops that constantly check everything about your system, or you found yourself reading about “interrupt vectors,” and wondered if you should have paid more attention in your high school physics class.

Plumbing, and the language it is written in (occam-π), makes these problems go away.

This is how you write an introduction that makes people care about what your project does. This is how you take a specialty solution, heretofore useful to and understandable by only people who already understood process algebra and the pi-calculus, and present it as another tool for people's toolboxes right alongside hammers and screwdrivers. If you want to drive a nail, get a hammer; if you want to do parallel tasks in real-time, get occam-π.

Now, that said, figuring out how to describe a project (especially the more abstract or academic ones) in terms of "what problem does this solve" is not always easy. Figuring out how to do so concisely and in a way that people are likely to remember is even harder. But it is crucial to making your project matter.
maradydd: (Default)
An enterprising open-source hacker who goes by the moniker Famulus, using polywell plasma confinement, has achieved desktop-scale nuclear fusion.

There are some really lovely photos of plasmas and lab equipment on the blog, and all the STL files for the polywell itself, plus Ruby source code for running the thing, are available on github. Go to.

ETA: That's fusion full stop, not "a sustained fusion reaction producing more energy than is consumed by plasma containment". I'd wager my left temporal lobe that he's running at a net energy loss. However, polywell confinement is one of the more promising technologies out there for net-gain fusion; interested parties should check out the work that EMC2 Fusion is doing.
maradydd: (Default)
Whoever came up with apport -- the Ubuntu crash-reporting system -- is an unsung genius. Crash reporting isn't anything new, of course, but crash reporting that opens up a ticket in Launchpad and lets you, the user, customise the report and follow the problem-remediation on the web is elegant brilliance. Quality assurance that provides some level of accountability to the user reporting the problem? Who'd'a thunk?

Amazing what you can get your users to do with just a little presumption of good faith, innit.

Also, whoever came up with the idea of having apport report package installation failures -- those of us who have ever spent time in dependency hell salute you. If I ever meet you, I'm buying you a beer.

(This post brought to you by the karmic dev build.)
maradydd: (Default)
So, I'm not sure if y'all are talking behind my back, if my Google-juice is better than I thought it was, or if Python developers are just telepathic, but I'd like to note that I'm now two for two when it comes to whining about some library not doing exactly what I want it to and having one of that library's developers pop up within 24 hours to address my question -- that is, as long as the library's written in Python.

No, I'm not going to push my luck (though, note this changeset for 3.0), but this is just one more reason why this community owns.
maradydd: (Default)
The summer 2009 issue of h+ Magazine is out, and there's an interview with yours truly. The reporter, Tyson Anderson, and I had an interesting conversation about the history of biohacking, how I got started with it, the diverse nature of DIYbio, the importance of the amateurs in the history of science, and some of the ethical issues surrounding this hobby.

(Yes, yes, [livejournal.com profile] enochsmiles, I need to put together a press page for my website. I know.)

But until then, check out that nice interface! They've definitely achieved the look and functionality of a paper magazine (minus being able to dog-ear the pages or scribble notes in the margin), and halle-freakin-lujah, each page is uniquely addressable! There are only two things I can dock them points on. First is the fact that their "share a bookmark" feature is so tightly coupled to a host of social networking services, many of which are walled gardens. (LJ happens not to be one of them. When did we jump the shark, guys?) This is, however, the fault of AddThis, provider of the feature in question; I can extract the URL I want by, say, clicking on the Google Bookmarks link and then copying said URL, but that is kind of a pain. Hey, AddThis, can we have a plain ol' "URL" option? That would be swell, thanks.

Second, not being able to copy and paste text == also a pain. Minus that, though, I could totally get used to reading magazine content online with an interface like this.
maradydd: (Default)
Skype on OS X has the good sense to pause iTunes when starting a call. Thanks for the sensible IPC, Apple!

(Context: couldn't find my cellphone.)
maradydd: (Default)
So I've been working with Django lately, and I continue to be pleased with the preeminent saneness with which it handles the interaction between HTML and Python. Here is the latest example.

Suppose you have an HTML form that your Django backend will be processing. Give each input or select element in your form a name attribute, and whatever function you POST the form back to will receive a request.POST dictionary keyed by the name. For instance, if you have a form like this:

<form id="shopping">
  <p>
    <select name="fruit">
      <option value="apples">apples</option>
      <option value="bananas">bananas</option>
      <option value="cherries">cherries</option>
    </select>
  </p>
  <p>
    <select name="meat">
      <option value="buffalo">buffalo</option>
      <option value="moose">moose</option>
      <option value="quail">quail</option>
    </select>
  </p>
  <input type="submit" value="Submit" />
</form>


Then your receiving function will get a request.POST consisting of a dictionary with the keys fruit and meat, and the value for each will be a list containing the values that were selected. And, yes, if you give those selects the multiple attribute, turning them into multi-valued choice sets, your list will contain all values that were selected. Very handy.

But wait, there's more!

Suppose that you want to give your hypothetical shopper the ability to select more than one type of fruit or meat at a time without using multiple, so you write some DOM-manipulating javascript to dynamically add more copies of the appropriate select element as needed, giving each element a unique name. (How to do this is left as an exercise for the reader. I did it, you can too.) Suppose further that you also want to give your users the ability to specify how many units of each item they want, so you add text inputs (with appropriate input validation, of course, also left as an exercise for the reader). Give each <input type="text"> the same name as its corresponding select, and you'll get a request.POST that looks like:

{ 'fruit_0': ['4', 'cherries'], 'fruit_1': ['3', 'apples'], 'meat_0': ['1', 'buffalo'] }

(In this case I'm using subscripts in my javascript to generate distinct names. There may actually be a simpler way to do this, though I haven't hit on it yet.)

This is especially useful in the case where you have some function that you want to pass each of your (amount, item) pairs to, because then you can use the handy *args syntax, e.g. [doStuffTo(*thing) for thing in request.POST.values()]. You could also use a dictionary comprehension if you're using Python 3, you bleeding-edge hacker, you. Though I don't know if Django is compatible with Python 3 (and I doubt it, given all the backward-compatibility stuff that Python 3 breaks). That, too, is left as an exercise for the reader.

Profile

maradydd: (Default)
maradydd

September 2010

S M T W T F S
   1234
567891011
12131415 161718
19202122232425
26 27282930  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags