<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:nibot_lab</id>
  <title>Tobin's Lab Notebook</title>
  <subtitle>Tobin Fricke's Lab Notebook</subtitle>
  <author>
    <name>Tobin Fricke's Lab Notebook</name>
  </author>
  <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom"/>
  <updated>2009-12-26T06:57:10Z</updated>
  <lj:journal userid="1499772" username="nibot_lab" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://nibot-lab.livejournal.com/data/atom" title="Tobin's Lab Notebook"/>
  <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:100095</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/100095.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=100095"/>
    <title>fireflies in javascript</title>
    <published>2009-12-26T06:53:10Z</published>
    <updated>2009-12-26T06:57:10Z</updated>
    <category term="javascript"/>
    <content type="html">As my christmas eve coding project (and second toy javascript project), I wrote up a little firefly simulator.  The idea is that you have a collection of "fireflies" that blink at regular intervals.  The time until each firefly's first flash is chosen randomly, so there is no order to their pattern of flashing.  However, by some protocol, the collection of fireflies synchronizes themselves so that they all flash in unison.  Here's the protocol:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Each firefly has a "charge" that builds up at a regular rate.&lt;/li&gt;&lt;li&gt;When that charge exceeds some threshold, the firefly flashes and its charge is reset to zero.&lt;/li&gt;&lt;li&gt;When a firefly observes the flash from another firefly, it gets a little increment of charge.&lt;/li&gt;&lt;/ol&gt;Rule #3, I am &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0786887214/monolakewebsite/"&gt;told&lt;/a&gt;, will lead to synchronization of the group.&lt;br /&gt;&lt;br /&gt;You can imagine my implementation.  Each firefly is an object.  It sets an alarm to go off in the future, at the time it's supposed to fire.  When it does fire, it sends a message to all of the other fireflies.  When a firefly receives such a message, it resets its firing alarm to go off just a little bit earlier.&lt;br /&gt;&lt;br /&gt;Unfortunately, it turns out that Javascript in Safari on this G4 machine is just too slow for this to work except for the smallest collection of fireflies (less than 100).  This all seems kind of sad, because a 1.5 GHz PPC provides an outrageous amount of computing power.  I hear that Google Chrome actually has a just-in-time compiler that might make Javascript useable, but alas it is not yet available for this architecture.&lt;br /&gt;&lt;br /&gt;Anyway, I will let you critique my Javascript since I am a complete N00B at it.  &lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;Here is the code to set up alarms, developed after &lt;a href="http://stackoverflow.com/questions/1957142/javascript-gettimeout"&gt;consulting&lt;/a&gt; stackoverflow.com.  The Alarm object calls the .fire() method of an object that's provided as a parameter at some point in the future. The firing time can be changed either relatively (via &lt;code&gt;update&lt;/code&gt;) or absolutely (via &lt;code&gt;schedule&lt;/code&gt;):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;now = function() {
  // &lt;i&gt;get the number of milliseconds since the epoch (January 1st, 1970?)&lt;/i&gt;
  return (new Date).getTime();
}

function Alarm(delay, object) {
  this.obj = object;
  this.func = function(obj) { this.id = false; obj.fire(); }
  this.id = false;
  this.schedule(now() + delay);
}

Alarm.prototype.update = function(delta) {
  this.schedule(this.firetime + delta);
}

Alarm.prototype.schedule = function(firetime) {
  this.firetime = firetime;
  var delay = this.firetime - now();
  if (delay &amp;lt; 0)
    delay = 0;
  if (this.id != false) 
    clearTimeout(this.id);
  this.id = setTimeout(this.func, delay, this.obj);
}&lt;/pre&gt;And the fireflies themselves:&lt;pre&gt;var zoo = new Array();  // &lt;i&gt;keep track of everyone&lt;/i&gt;

function firefly(x, y, delay) { // &lt;i&gt;constructor&lt;/i&gt;
  this.x = x;  // &lt;i&gt;(x,y) is where this guy will be drawn on the canvas&lt;/i&gt;
  this.y = y;
  // &lt;i&gt;start up with random phase&lt;/i&gt;
  var initialDelay = Math.random() * interval;
  // &lt;i&gt;set up the firing call-back&lt;/i&gt;
  this.alarm = new Alarm(initialDelay, this);
}

// what happens when someone else fires
firefly.prototype.recv = function() {
  this.alarm.update(-100);
}

firefly.prototype.fire = function() {
  // draw myself
  this.draw();
  // notify everyone else
  for (var ii=0; ii&amp;lt;zoo.length; ii++) { 
   // &lt;i&gt;I tried for (var bug in zoo) ... but had trouble&lt;/i&gt;
    var bug = zoo[ii];
    if (bug != this)
      bug.recv();
  }
  // schedule myself to fire again in the future
  this.alarm.update(interval);
}

firefly.prototype.draw = function() {
  ctx.beginPath();
  ctx.arc(this.x*20 + 10, this.y*20 + 10, 6, 0, 2*Math.PI);  
  ctx.stroke();
}
&lt;/pre&gt;And some boring initialization:&lt;pre&gt;
var interval = 10000;

// create a grid of fireflies
for (var ii=0; ii&amp;lt;10; ii++) {
  for (var jj=0; jj&amp;lt;10; jj++) {
    var bug = new firefly(ii,jj);
    zoo.push(bug);
  }
}

// &lt;i&gt;make fireflies fade away after they've flashed&lt;/i&gt;
setInterval(
 function() {
   ctx.fillStyle = "rgba(255,255,255,0.10)";
   ctx.fillRect(0,0,450,450);
 }, 100);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Frankly, I'm still a little bit confused about what the JavaScript &lt;code&gt;new&lt;/code&gt; operator does.  Copy &lt;code&gt;obj.prototype&lt;/code&gt; into a new object?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:99606</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/99606.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=99606"/>
    <title>life in javascript</title>
    <published>2009-12-19T07:37:14Z</published>
    <updated>2009-12-19T07:37:14Z</updated>
    <category term="javascript"/>
    <content type="html">My little project for this evening was to implement Conway's game of Life in Javascript, using the &lt;a href="https://developer.mozilla.org/en/Canvas_tutorial"&gt;&lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt;&lt;/a&gt; element to display the life universe.  Basically this is just a "Hello, World" so that I can learn this newfangled JavaScript thing (these days I only program in Matlab).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.phys.lsu.edu/~tfricke/notebook/2009/12/19/life.html"&gt;http://www.phys.lsu.edu/~tfricke/notebook/2009/12/19/life.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's implemented in the na&amp;iuml;vest possible way.  The 2d grid is stored as an Array of Arrays of booleans.  It's kind of slow.  The canvas element makes Javascript seem like a good way to rapidly make little visualizations.  &lt;br /&gt;&lt;br /&gt;Does the fact that all computers now ship with a Javascript interpreter make it the BASIC of the 21st century?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:99522</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/99522.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=99522"/>
    <title>conferences</title>
    <published>2009-12-18T23:52:35Z</published>
    <updated>2009-12-18T23:54:53Z</updated>
    <category term="conferences"/>
    <content type="html">Maybe I'm just attending the wrong conferences.  What have been the most interesting conferences that you've attended?  What has made them good?&lt;br /&gt;&lt;br /&gt;The best conferences I've attended have been one-offs, or at least one-offs for me.  They seem to be boring the second time around.&lt;br /&gt;&lt;br /&gt;I enjoy being an outsider.  The learning curve is steeper.&lt;br /&gt;&lt;br /&gt;The best talks are usually short ones, status updates by people doing stuff.  "Works in progress".&lt;br /&gt;&lt;br /&gt;I like coming away from a talk feeling like I understand something new.  Isn't that the point of listening to talks?  It seems kind of rare.  Best is when I come away with a new theory, language, model, or other sort of toy that I can immediately begin playing with on my own.&lt;br /&gt;&lt;br /&gt;I enjoy conferences where I run into people I know, or get to know new people.&lt;br /&gt;&lt;br /&gt;I'd really like to attend a conference where the talks are tutorials of all sorts of miscellaneous subjects from all of science.&lt;br /&gt;&lt;br /&gt;I'd like to go to a conference where people at the conference are working together to accomplish some interesting task over the course of the conference that leads to collaboration and discovery.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:99097</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/99097.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=99097"/>
    <title>feedforward and feedback for conference talks</title>
    <published>2009-12-18T23:39:04Z</published>
    <updated>2009-12-18T23:53:22Z</updated>
    <category term="conferences"/>
    <content type="html">Too often conference talks are boring.  Often this is because they miss the most appropriate level or angle for the target audience.  Rarely do conference speakers receive effective feedback about their talks.  At most conferences I attend, everyone has a laptop computer.  I propose that conferences adopt a cool web interface to provide feed-forward to speakers before the event and feedback afterwards.&lt;br /&gt;&lt;br /&gt;1. Before the conference, the agenda will be available, including a list of participants, the topics they intend to speak about, and the topics they want to hear about. At some point, speakers will refine their topic into a specific abstract.  Based on comments posted by other participants, the speaker will have an idea of how technical (etc) their talk should be.&lt;br /&gt;&lt;br /&gt;2. During/after the conference, listeners can use the web interface to give constructive feedback about talks, and discuss the subject matter.&lt;br /&gt;&lt;br /&gt;I guess this is what "&lt;a href="http://en.wikipedia.org/wiki/Unconference"&gt;unconferences&lt;/a&gt;" try to do, almost always using a Wiki.  I've never seen it actually work, so maybe it's not such a good idea.  Maybe the use of computers to mediate the process is antithetical to the intended result (socialization).</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:99046</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/99046.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=99046"/>
    <title>black hat cloud computing</title>
    <published>2009-12-08T00:52:32Z</published>
    <updated>2009-12-08T00:56:12Z</updated>
    <category term="brute force"/>
    <content type="html">&amp;gt;&amp;gt;WPA-PSK networks are vulnerable to dictionary attacks, but running a respectable-sized dictionary over a WPA network handshake can take days or weeks. WPA Cracker gives you access to a 400CPU cluster that will run your network capture against a 135 million word dictionary created specifically for WPA passwords. While this job would take over 5 days on a contemporary dual-core PC, on our cluster it takes an average of 20 minutes, for only $17.&amp;lt;&amp;lt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.wpacracker.com/"&gt;http://www.wpacracker.com/&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:98637</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/98637.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=98637"/>
    <title>effective unix habits?</title>
    <published>2009-12-07T21:10:06Z</published>
    <updated>2009-12-07T23:42:34Z</updated>
    <content type="html">1. How do you organize your files (i.e. home directory, etc)?&lt;br /&gt;&lt;br /&gt;2. How do you organize your work across multiple computers?&lt;br /&gt;&lt;br /&gt;3. When do you decide something has outlived its useful lifespan and actually delete the old cruft?&lt;br /&gt;&lt;br /&gt;I'm looking to change things up a little bit.  I used to commit everything to a central CVS, but I got out of the habit of doing that for every single file, and then the machine running the CVS went away.  I have a directory called "notebook" where there is a chronological hierarchy of subdirectories, like notebook/2009/12/06 where I keep that day's scratch work (small single-use programs, data files, notes, etc).  I like this, but it's hard to separate work stuff from fun stuff.  I put bigger things in subdirectories of a projects/ directory, i.e. projects/thesis.  What do you do?&lt;br /&gt;&lt;br /&gt;These questions are spurred in part because I am now spreading my usage across three computers: two linux laptops which are no longer mobile (one at work and one at home), and a borrowed G4 mac laptop for portability.  I've reverted to sshing into a machine on which I have a shell account and doing my work there.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:98416</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/98416.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=98416"/>
    <title>artificial firefly</title>
    <published>2009-11-25T07:39:49Z</published>
    <updated>2009-11-25T07:39:49Z</updated>
    <content type="html">I would like to build a tiny circuit to implement an 'artificial firefly'.  It will simply flash a bright green LED periodically, and have some means of detecting such flashes from other fireflies, and synchronizing their flashes so that all the fireflies in an area will flash together.   &lt;br /&gt;&lt;br /&gt;What is the smallest circuit that could implement this?  A tiny little all-analog phase-lock loop would be great.  I imagine the pulses of light would actually be modulated at several kHz in order to distinguish the firefly flashes from ambient light (or perhaps that wouldn't be necessary?).&lt;br /&gt;&lt;br /&gt;Extra credit if the electronic fireflies can successfully mingle with 'analog' fireflies in the wild.&lt;br /&gt;&lt;br /&gt;I imagine a similar device placed on bikes, e.g. in a critical mass ride.  When the mass gets together, some emergent behavior arises.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:98272</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/98272.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=98272"/>
    <title>the magic of wings</title>
    <published>2009-11-06T03:07:04Z</published>
    <updated>2009-11-06T03:16:15Z</updated>
    <category term="flight"/>
    <content type="html">It &lt;i&gt;is&lt;/i&gt; kind of counterintuitive that an airplane (a 737-800, say) weighing 100,000 pounds can be held aloft by engines with a total of 10,000 pounds of thrust.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:97824</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/97824.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=97824"/>
    <title>airport nerdery</title>
    <published>2009-11-06T02:58:23Z</published>
    <updated>2009-11-06T02:58:23Z</updated>
    <content type="html">On the Continental airlines &lt;a href="http://www.continental.com/web/en-US/apps/travel/flightstatus/default.aspx"&gt;flight status page&lt;/a&gt;, it tells you not only when a flight is expected to depart/arrive, but it also has a button labeled "Where is this aircraft coming from?"  By clicking this repeatedly, you can see the route taken by a particular airplane. For example:&lt;br /&gt;&lt;br /&gt;Boeing 737-800 aircraft #501&lt;br /&gt;&lt;br /&gt;Flight 1016: RSW (Ft Myers, Florida) to CLE (Cleveland, Ohio)&lt;br /&gt;Flight 189: CLE to PHX&lt;br /&gt;Flight 363: PHX to CLE&lt;br /&gt;Flight 515: CLE to LAX&lt;br /&gt;Flight 1403: LAX to EWR (Newark, New Jersey)&lt;br /&gt;Flight 41: EWR to SFO (San Francisco)&lt;br /&gt;&lt;br /&gt;I clicked many more times and never got back to San Francisco.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:97631</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/97631.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=97631"/>
    <title>nibot_lab @ 2009-11-05T11:46:00</title>
    <published>2009-11-05T17:46:48Z</published>
    <updated>2009-11-05T17:46:48Z</updated>
    <content type="html">An interesting anagram of "BANACH TARSKI" is "BANACH TARSKI BANACH TARSKI".</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:97326</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/97326.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=97326"/>
    <title>cos[x]^n = sum over cos[k x]</title>
    <published>2009-11-04T23:33:51Z</published>
    <updated>2009-11-04T23:43:19Z</updated>
    <category term="math"/>
    <content type="html">I want to write cos[x]^n as a sum of cos[kx] for integers k, i.e:&lt;br /&gt;&lt;br /&gt;cos[x]^5 = (5/8)cos[x] + (5/16)cos[3x] + (1/16)cos[5x]&lt;br /&gt;&lt;br /&gt;I'd like a nice closed form expression for those coefficients.  It's easy to do, because you can just write&lt;br /&gt;&lt;br /&gt;cos[x]^N = ((1/2)(exp(ix) + exp(-ix)))^N &lt;br /&gt;&lt;br /&gt;and then apply the binomial theorem.&lt;br /&gt;&lt;br /&gt;You get:&lt;br /&gt;&lt;br /&gt;Cos[x]^n == 2^(1-n) (Sum[Binomial[n, k] cos[(n - 2 k) x], {k, 0,  Floor[n/2]}]  - If[Mod[n, 2] == 0, (1/2) Binomial[n, n/2], 0]&lt;br /&gt;&lt;br /&gt;where the funny "If[Mod[n, 2] == 0, (1/2) Binomial[n, n/2], 0]" part corrects for double-counting the exp[0] term when n is even.&lt;br /&gt;&lt;br /&gt;Anyone have a nicer way to write it?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:97061</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/97061.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=97061"/>
    <title>matlab programming contest</title>
    <published>2009-11-04T21:06:11Z</published>
    <updated>2009-11-04T21:06:11Z</updated>
    <category term="programming contest"/>
    <category term="matlab"/>
    <content type="html">The &lt;a href="http://www.mathworks.com/contest/flooding/"&gt;20th MATLAB Online Programming Contest&lt;/a&gt; is currently underway.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:96946</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/96946.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=96946"/>
    <title>HD radio is proprietary</title>
    <published>2009-11-03T20:57:32Z</published>
    <updated>2009-11-03T20:57:32Z</updated>
    <content type="html">You've probably heard about "&lt;a href="http://en.wikipedia.org/wiki/HD_Radio"&gt;HD radio&lt;/a&gt;"--the new digital radio technology rapidly being implemented in the United States--but probably don't know much about it.  I offer two points:&lt;br /&gt;&lt;br /&gt;1. It doesn't stand for "high definition".  They want to fool you into thinking this, I think.  Originally the HD stood for "&lt;b&gt;hybrid digital&lt;/b&gt;" but now it officially doesn't stand for anything.  The audio quality is not necessarily better than analog (FM) radio.&lt;br /&gt;&lt;br /&gt;2. It's &lt;b&gt;proprietary&lt;/b&gt;!  Despite being the &lt;b&gt;only approved digital radio technology&lt;/b&gt; for use on the FM band in the United States, the codec is &lt;b&gt;protected by trade secret&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Point #2 makes me angry.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:96653</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/96653.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=96653"/>
    <title>darpa balloon challenge</title>
    <published>2009-11-03T18:05:56Z</published>
    <updated>2009-11-03T18:05:56Z</updated>
    <content type="html">&lt;blockquote&gt;&lt;p&gt;To mark the 40th anniversary of the Internet, DARPA has announced the DARPA Network Challenge, a competition that will explore the roles the Internet and social networking play in the timely communication, wide-area team-building, and urgent mobilization required to solve broad-scope, time-critical problems.&lt;/p&gt;

&lt;p&gt;The challenge is to locate ten moored red weather balloons located at ten fixed locations in the continental United States. Balloons will be in readily accessible locations, visible from nearby roadways and accompanied by DARPA representatives. All balloons are scheduled to go on display at all locations at 10:00AM (ET) until approximately 4:00 PM (local time) on Saturday, December 5, 2009.&lt;/p&gt;

&lt;p&gt;A single $40,000 cash prize will be awarded to the first participant to submit the correct latitude and longitude of all ten weather balloons within the contest period. Entries are accepted until noon, 12:00 PM (ET) December 14, 2009. No prize for second place will be awarded.&lt;/p&gt;&lt;/blockquote&gt;
&lt;a href="http://networkchallenge.darpa.mil/"&gt;http://networkchallenge.darpa.mil/&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:96431</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/96431.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=96431"/>
    <title>visual complexity</title>
    <published>2009-10-25T01:58:46Z</published>
    <updated>2009-10-25T01:58:46Z</updated>
    <content type="html">a gallery of data visualizations of all sorts:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.visualcomplexity.com/vc/"&gt;http://www.visualcomplexity.com/vc/&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:96191</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/96191.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=96191"/>
    <title>Renegade BBS in Ubuntu LINUX (Telnet|Multi-Node)</title>
    <published>2009-10-12T00:55:30Z</published>
    <updated>2009-10-12T00:55:30Z</updated>
    <category term="linux"/>
    <category term="retrocomputing"/>
    <category term="bbs"/>
    <content type="html">This guy is clearly after &lt;a href="http://nibot.livejournal.com/584185.html"&gt;my own heart&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://geek.phatus.com/2009/08/renegade-bbs-in-ubuntu-linux-telnetmulti-node/"&gt;http://geek.phatus.com/2009/08/renegade-bbs-in-ubuntu-linux-telnetmulti-node/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;A while ago I began thinking back about the the good old days when a dial-up BBS was the only thing even remotely resembling a basic website. Back when kids would unplug their parents phones over night and run their underground boards participating in a brilliant scene of hackers and phreakers that was decades ahead of its time. Since most young hackers typically had little to no money, the free and legendary Renegade BBS always seemed to be at the heart of this scene. Dispensing tens, perhaps even hundreds of megabytes of underground information and warez to all who would dial-in and participate in her communities. Now days I pretty much only use Windows for games and recording so I wanted to find a way to run a multi-node Renegade BBS under my Ubuntu system that you could telnet to. Below is a tutorial explaining how to accomplish this.&lt;/blockquote&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:95918</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/95918.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=95918"/>
    <title>adaptive fitting</title>
    <published>2009-10-06T06:23:01Z</published>
    <updated>2009-10-06T06:23:01Z</updated>
    <content type="html">In experimental physics, it is very common to measure many data points and then fit a model to the data.  For example, I recently measured the spot size of a laser beam at several locations along the beam.  Then, using a nonlinear least-squares fitter, I found the parameters of a gaussian beam best matching the data.&lt;br /&gt;&lt;br /&gt;I would like to have a more interactive process, one in which, given the measurements made &lt;i&gt;so far&lt;/i&gt;, an algorithm tells me what measurement to make &lt;i&gt;next&lt;/i&gt; to produce the greatest improvement in the determination of the model.&lt;br /&gt;&lt;br /&gt;It seems this ought to be a very routine process.&lt;br /&gt;&lt;br /&gt;One idea: Given the model-so-far, produce a monte-carlo ensemble of possible experimental outcomes over all possible experiments.  Find the experiment which has the highest variance in possible outcomes--perform this experiment to further refine the model.  This idea has some obvious failures: i.e. it will suggest you perform experiments totally unrelated to the model.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:95659</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/95659.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=95659"/>
    <title>gnu grep has a "--color" option</title>
    <published>2009-09-15T04:00:36Z</published>
    <updated>2009-09-15T04:00:36Z</updated>
    <category term="unix"/>
    <content type="html">&amp;nbsp;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:95442</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/95442.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=95442"/>
    <title>∂/∂t phase(z) = Im ∂/∂t log z</title>
    <published>2009-08-13T01:24:32Z</published>
    <updated>2009-08-13T01:41:09Z</updated>
    <category term="math"/>
    <category term="complex analysis"/>
    <content type="html">The rate of change of the amplitude and phase of a complex-valued function may be found by taking the real and imaginary parts of the derivative of the logarithm of the function.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;z(t) = A(t) exp(i &amp;phi;(t))&lt;br /&gt;&lt;br /&gt;&amp;part;/&amp;part;t log z = (&amp;part;/&amp;part;t log A) + i (&amp;part;/&amp;part;t &amp;phi;)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;another form that might be useful:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; (1/z) &amp;part;/&amp;part;t z = &amp;part;/&amp;part;t log z&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This also becomes obvious upon drawing a little picture.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:95199</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/95199.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=95199"/>
    <title>ZPK → [B,A] in Matlab</title>
    <published>2009-07-29T23:25:24Z</published>
    <updated>2009-07-29T23:27:31Z</updated>
    <category term="signal processing"/>
    <category term="matlab"/>
    <content type="html">I just spent several hours banging my head against Matlab, trying to convert a filter described in terms of poles and zeros into IIR &lt;code&gt;[b,a]&lt;/code&gt; coefficients suitable for the use by the &lt;code&gt;filter&lt;/code&gt; function.  The secret turned out to be, in part, the &lt;code&gt;c2d&lt;/code&gt; ("continuous to discrete") function, followed by &lt;code&gt;tfdata&lt;/code&gt;.  For future reference:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;% define the sample rate of our system [Hz]&lt;br /&gt;fs = 16384; &lt;br /&gt;&lt;br /&gt;% define some poles and zeros [radians/second]&lt;br /&gt;z = -2*pi*[0];&lt;br /&gt;p = -2*pi*[100];&lt;br /&gt;k = 1;&lt;br /&gt;&lt;br /&gt;% make a Bode plot of the continuous system (s-plane)&lt;br /&gt;sysc = zpk(z, p, k); &lt;br /&gt;bode(sysc);&lt;br /&gt;&lt;br /&gt;% convert the continuous system to a discrete one (z-plane)&lt;br /&gt;sysd = c2d(sysc, 1/fs, 'tustin');&lt;br /&gt;bode(sysd);&lt;br /&gt;&lt;br /&gt;% compute the IIR filter coefficients and apply the filter to some data&lt;br /&gt;[b, a] = tfdata(sysd, 'v');&lt;br /&gt;y = filter(b, a, x);&lt;br /&gt;&lt;br /&gt;% plot the spectra of the original and filtered data&lt;br /&gt;bw = 0.1;      % frequency resolution (binwidth) [Hz]&lt;br /&gt;nfft = fs/bw;&lt;br /&gt;[X, f] = pwelch(x, hanning(nfft), nfft/2, nfft, fs);&lt;br /&gt;[Y, f] = pwelch(y, hanning(nfft), nfft/2, nfft, fs);&lt;br /&gt;loglog(f, X, f, Y);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The default units on the Bode plot are radians/second.  For a given plot, the units can be changed to Hertz using:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;bode(sysd);&lt;br /&gt;h = gcr;&lt;br /&gt;h.AxesGrid.XUnits = 'Hz';&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Any idea how to make Hz the default unit, so that the units don't have to be fixed every time?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:94739</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/94739.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=94739"/>
    <title>crucial NASA research</title>
    <published>2009-07-24T00:54:05Z</published>
    <updated>2009-07-24T00:54:05Z</updated>
    <category term="space"/>
    <lj:music>The Shins - A Comet Appears | Powered by Last.fm</lj:music>
    <content type="html">&lt;blockquote&gt;Japanese scientists and origami masters propose to launch a flotilla of paper planes from space. The launch is tentatively slated for early 2009 from the International Space Station. Around 30 planes will make the descent, each gliding downward over what is expected to be the course of several months. If one of the planes survives to Earth, it will have made the longest flight ever by a paper plane, traversing some 400 km.&lt;/blockquote&gt;&lt;a href="http://en.wikipedia.org/wiki/Origami_airplane_launched_from_space"&gt;http://en.wikipedia.org/wiki/Origami_airplane_launched_from_space&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:94611</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/94611.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=94611"/>
    <title>Detexify²</title>
    <published>2009-07-13T01:20:44Z</published>
    <updated>2009-07-13T01:20:44Z</updated>
    <category term="sweetcode"/>
    <content type="html">&lt;a href="http://detexify.kirelabs.org/classify.html"&gt;http://detexify.kirelabs.org/classify.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Draw a symbol by hand and &lt;a href="http://detexify.kirelabs.org/classify.html"&gt;detextify²&lt;/a&gt; will tell you the LaTeX symbol that you're looking for.  Really cool!&lt;br /&gt;&lt;br /&gt;(via &lt;span class='ljuser ljuser-name_util' lj:user='util' style='white-space: nowrap;'&gt;&lt;a href='http://util.livejournal.com/profile'&gt;&lt;img src='http://l-stat.livejournal.com/img/userinfo.gif' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0; padding-right: 1px;' /&gt;&lt;/a&gt;&lt;a href='http://util.livejournal.com/'&gt;&lt;b&gt;util&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:93871</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/93871.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=93871"/>
    <title>rocket science</title>
    <published>2009-06-28T08:14:42Z</published>
    <updated>2009-06-28T08:24:15Z</updated>
    <category term="icfp"/>
    <category term="classical mechanics"/>
    <category term="programming contest"/>
    <content type="html">&lt;a href="http://www.flickr.com/photos/tobin/3667715948/" title="ICFP programming contest 2009 by tobo, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3416/3667715948_c1d6bb6b47.jpg" width="500" height="375" alt="ICFP programming contest 2009" style="border-color:black;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This year's &lt;a href="http://icfpcontest.org/"&gt;ICFP programming contest&lt;/a&gt; involves planning an optimal sequence of rocket burns to cause an orbiting spacecraft to visit a collection of other orbiting spacecraft.  It's a cool problem&amp;mdash;orbital mechanics is quite unfamiliar!  &lt;br /&gt;&lt;br /&gt;Fortunately, the contest contains three warm-up problems.  The simplest is to just move from one circular orbit to another, which can be accomplished via the &lt;a href="http://en.wikipedia.org/wiki/Hohmann_transfer_orbit"&gt;Hofmann transfer orbit&lt;/a&gt; (as suggested by the contest specification).  The next requires that you meet up with another orbiting spacecraft in circular orbit.  I've solved those two.  The final warm-up problem is to leave one elliptical orbit to rendezvous with a spacecraft in another elliptical orbit.  &lt;br /&gt;&lt;br /&gt;The final problem that these warm-up problems lead to is to find an optimal procedure for visiting a collection of other spacecraft in various orbits&amp;mdash;here's where the clever searching and optimization will come in.&lt;br /&gt;&lt;br /&gt;As an added twist, the individual problems come packaged as binaries for a virtual machine that you have to implement.  Unlike prior years, this virtual machine is quite simple.  In fact, it has no branching instructions whatsoever, so it's hard to even call it a virtual machine.  You could translate it directly into C, for example.&lt;br /&gt;&lt;br /&gt;I think my approach is quite slick:  I implemented the virtual machine in C, but then wrote a Matlab (.mex) interface to it, so I can implement the rest of my solutions in Matlab, employing all of Matlab's mathematics and visualization and interactiveness while still coupled to this physics engine implemented in the virtual machine.&lt;br /&gt;&lt;br /&gt;However, I think it's time for one-man team "tensor" to get some sleep. (-:&lt;br /&gt;&lt;br /&gt;EDIT: 24 hours into the contest, they added a moon!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:93558</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/93558.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=93558"/>
    <title>C library manpages</title>
    <published>2009-06-27T08:53:22Z</published>
    <updated>2009-06-27T08:53:22Z</updated>
    <category term="c"/>
    <category term="unix"/>
    <content type="html">My Ubuntu installation has annoyed me for a long time by not having manpages for the usual C library functions.  Of course there's an easy fix:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;sudo apt-get install manpages-dev&lt;/code&gt;&lt;/blockquote&gt;ahh, such a relief.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:nibot_lab:93372</id>
    <link rel="alternate" type="text/html" href="http://nibot-lab.livejournal.com/93372.html"/>
    <link rel="self" type="text/xml" href="http://nibot-lab.livejournal.com/data/atom/?itemid=93372"/>
    <title>nibot_lab @ 2009-06-25T01:24:00</title>
    <published>2009-06-25T06:33:17Z</published>
    <updated>2009-06-25T06:33:17Z</updated>
    <content type="html">Looking for the canonical geographical coordinates of the LIGO detectors (in order to correct the &lt;a href="http://en.wikipedia.org/wiki/LIGO"&gt;Wikipedia entry&lt;/a&gt;!), I happened across the document &lt;a href="http://www.ligo.caltech.edu/docs/T/T060064-00/T060064-00.pdf"&gt;Provenance of Detector Geometry Values in LIGO Frame Files&lt;/a&gt; (LIGO document T060064-00).  &lt;br /&gt;&lt;br /&gt;(Here, "frame files" refers to the &lt;a href="https://dcc.ligo.org/cgi-bin/DocDB/ShowDocument?docid=329"&gt;file format&lt;/a&gt; developed to store data from gravitational wave detectors.  I'm not convinced this required a new file format, but that's another story.)  &lt;br /&gt;&lt;br /&gt;About the metadata stored in these files (at one time back in 2006), this document says:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;These values are very wrong! ...  The longitude and latitude values are swapped, and are expressed in degrees rather than radians, while the azimuth values are given as radians counter-clockwise from east rather than radians clockwise from north.&lt;/code&gt;&lt;/blockquote&gt;&lt;b&gt;/me weeps openly&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;How much more wrong could you get?&lt;br /&gt;&lt;br /&gt;Who let anyone describe latitude and longitude in &lt;i&gt;radians&lt;/i&gt;?</content>
  </entry>
</feed>
