<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>TDI Web Log</title>
	<atom:link href="http://blog.tempusdictum.com/index.php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.tempusdictum.com</link>
	<description>Cognitive Tools</description>
	<pubDate>Wed, 01 Sep 2010 23:19:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Expanding an VirtualBox XP system disk</title>
		<link>http://blog.tempusdictum.com/index.php/gepr/system-admin/expanding-an-virtualbox-xp-system-disk</link>
		<comments>http://blog.tempusdictum.com/index.php/gepr/system-admin/expanding-an-virtualbox-xp-system-disk#comments</comments>
		<pubDate>Wed, 01 Sep 2010 23:19:35 +0000</pubDate>
		<dc:creator>gepr</dc:creator>
		
		<category><![CDATA[System Admin]]></category>

		<category><![CDATA[virtualbox]]></category>

		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=79</guid>
		<description><![CDATA[After spending an extraordinary amount of time trying to figure out why I couldn&#8217;t get NTFSResize to work, I finally found Seppe vanden Broucke&#8217;s log entry.  For posterity, I&#8217;ll record what I did, here, following partly the instructions in the original post and one commenter&#8217;s modification:

Get the SysRescCD ISO image.  (Any live linux ]]></description>
			<content:encoded><![CDATA[<p>After spending an extraordinary amount of time trying to figure out why I couldn&#8217;t get <a href="http://darkstar.ucd.ie/timosh/links/ntfsresize.html">NTFSResize</a> to work, I finally found <a href="http://blog.macuyiko.com/2008/09/virtualbox-expanding-disk-drive.html">Seppe vanden Broucke&#8217;s log entry</a>.  For posterity, I&#8217;ll record what I did, here, following partly the instructions in the original post and one commenter&#8217;s modification:</p>
<ol>
<li>Get the <a href="http://www.sysresccd.org/Main_Page">SysRescCD</a> ISO image.  (Any live linux CD should work, including <a href="http://www.knopper.net/knoppix/index-en.html">Knoppix</a>.)</li>
<li>Create a new (larger) VirtualBox disk image (*.vdi) from within VirtualBox.</li>
<li>In the VirtualBox Details tab for your Windows instance, set your original VDI as the IDE Primary Master.</li>
<li>Set the new (empty) VDI as the IDE Primary Slave.</li>
<li>And set the linux ISO as the CD/DVD IDE Secondary Master.</li>
<li>Ensure that the instance is set to boot from the CD/DVD first in System->Boot Order.</li>
<li>Boot the instance.</li>
<li>At the command line, run<br />
<code>fdisk -l /dev/sda</code><br />
You should see a partition there of type 7, NTFS.</li>
<li>Then run<br />
<code>fdisk -l /dev/sdb</code><br />
You should see an error message that says there is no partition on that device.</li>
<li>Then run the command:<br />
<code>dd if=/dev/sda of=/dev/sdb</code><br />
This will take a long time.  It means copy from the input file /dev/sda to the output file /dev/sdb.</li>
<li>Shutdown the system with:<br />
<code>shutdown -h now</code></li>
<li>Change the Storage->IDE Secondary Master (CD/DVD) from the ISO image to your regular optical drive, or remove it completely so that it will boot into the original (small) Windows image.</li>
<li>In Windows, select Start->Run&#8230; and type:<br />
<code>diskpart.exe</code></li>
<li>Type:<br />
<code>select disk 1</code><br />
to select the (large) disk.</li>
<li>Type:<br />
<code>list disk</code><br />
to see that you&#8217;ve selected the right one with the right size.</li>
<li>Type:<br />
<code>select partition 1</code><br />
to select the 1st partition on that disk.</li>
<li>Type:<br />
<code>list partition</code><br />
to see that you&#8217;ve selected the right partition.</li>
<li>Type:<br />
<code>extend</code><br />
to extend the volume all the way to the end of the device.</li>
<li>Turn off the virtual instance and select the new (larger) VDI as the Storage->IDE Primary Master.</li>
<li>Boot the instance again and you should have a larger system (C:) disk.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/gepr/system-admin/expanding-an-virtualbox-xp-system-disk/feed</wfw:commentRss>
		</item>
		<item>
		<title>98-all-your-atmel-belong-to-us</title>
		<link>http://blog.tempusdictum.com/index.php/don/system-admin/98-all-your-atmel-belong-to-us</link>
		<comments>http://blog.tempusdictum.com/index.php/don/system-admin/98-all-your-atmel-belong-to-us#comments</comments>
		<pubDate>Wed, 14 Jul 2010 07:03:28 +0000</pubDate>
		<dc:creator>don</dc:creator>
		
		<category><![CDATA[System Admin]]></category>

		<category><![CDATA[ubuntu debian foobar udev]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=78</guid>
		<description><![CDATA[Foobarred is Normal
Recently I started using my linux laptop as my primary avr-usb development environment. When I upgraded the laptop to the current Ubuntu-LTS release (10.4 aka Lucid lynx) a bunch of stuff was broken including all of the wonderful udev rules provided by my linux savvy friends at dorkbotpdx.
I mean jeesh even lsusb was ]]></description>
			<content:encoded><![CDATA[<h2>Foobarred is Normal</h2>
<p>Recently I started using my linux laptop as my primary avr-usb development environment. When I upgraded the laptop to the current Ubuntu-LTS release (10.4 aka Lucid lynx) a bunch of stuff was broken including all of the wonderful udev rules provided by my linux savvy friends at dorkbotpdx.</p>
<p>I mean jeesh even lsusb was broken.</p>
<pre>$ lsusb -vd "03eb:"|grep iM
cannot read device status, Operation not permitted (1)
iManufacturer           1</pre>
<p>When I started looking at what changed and how to adjust, the web dead ended to a lot of threads like the one at <a href="http://ubuntuforums.org/showthread.php?t=1360412" target="_blank">http://ubuntuforums.org/showthread.php?t=1360412</a> ; where two people declared that having to escalate privileges to root in order to talk to a user device was &#8220;normal&#8221;. Even when the developer said it wasn&#8217;t normal the ubuntu folk redeclared it normal (apparently after Bush you just have to repeat something blatantly stupid for it to be true). As an administrator the <strong><em>last</em></strong> thing you want is everything and its dog requiring root privileges.</p>
<p>Hanging around the #ubuntu channel was a lot like having people repeat the searches on the web that provided me with the same dead ends that I joined the channel trying to resolve.</p>
<h2>Cherchez la femme (look at the squeeze)</h2>
<p>This was getting stupid. All I wanted to do was to have devices that I could plug in and program and then communicate with them using ruby or perl or some other haphazzardly thrown together scripts without having to be root. Then I realized once again that ubuntu is really focused on making the users life easier and that this leads to a lot of non technical help. So I asked my friends what the nick name was for the Debian release that was the basis for the Ubuntu release nick named &#8220;Lucid&#8221; and then re did all of my dead ended web queries replacing &#8220;Ubuntu Lucid&#8221; with &#8220;Debian Squeeze&#8221;.</p>
<p>The results were heavy on the technical detail and light on social skills.</p>
<p>More importantly I quickly found the solution that I needed in the middle of <a href="http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver?a=blob_plain&amp;f=README&amp;hb=HEAD" target="_blank">this link<em> (http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver?a=blob_plain&amp;f=README&amp;hb=HEAD)</em></a> what I was missing was the difference between the new and the old udev rules.</p>
<p style="padding-left: 30px;"><em>&#8220;If you are running a newer version of udev (as in Debian Squeeze and<br />
Ubuntu 9.10), you need to adapt the rules-file to the new udev-version:<br />
sed -i -e &#8217;s/TEMPNODE/tempnode/&#8217; -e &#8217;s/SYSFS/ATTRS/g&#8217; -e &#8217;s/BUS/SUBSYSTEMS/&#8217; \<br />
/etc/udev/rules.d/xusbdfwu.rules&#8221;</em></p>
<p>One line of sed was all I needed and it had taken me a week of asking about <em>lucid</em> when i should have been asking about <em>squeeze</em>. With this I also was able to find the changes to the lay out of the /dev and /proc trees and the new tools to monitor udev and diagnose issues.</p>
<h2>All-Your-Atmel-Belong to Us</h2>
<p>I really just wanted to change the permissions so I could use my devices. Adding the following udev rule to your system will do just that.  You will also need to restart the udev service. Both of these will require you to be root.</p>
<pre># cat &gt;/etc/udev/rules.d/98-all-your-atmel-belong-to-us.rules&lt;&lt;EOF
#------------------------/etc/udev/rules.d/98-all-your-atmel-belong-to-us.rules
#
# Make atmel devices (dfu, LUFA, obdev) accessible in userland
# 
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", MODE="0666"
EOF
# service udev restart</pre>
<p>To actually own all my atmel I could have also added &#8216; ,USER=&#8221;don&#8221; &#8216; after the mode part but I just wanted to talk my Atmel  usb-avr devices and the open source firmware I was developing. And the above rule made things &#8220;just work&#8221;.</p>
<pre>$ lsusb -vd "03eb:"|grep iM
iManufacturer           1 mycompany.com
$</pre>
<p>This rule fixed all of my LUFA based devices including the my open source arduino programmer as well as the dfu programmer.used to code them. Hopefully it will be a while before I have to go through this again.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/don/system-admin/98-all-your-atmel-belong-to-us/feed</wfw:commentRss>
		</item>
		<item>
		<title>More Sinatra from the Ubuntu Folk.</title>
		<link>http://blog.tempusdictum.com/index.php/don/uncategorized/more-sinatra-from-the-ubuntu-folk</link>
		<comments>http://blog.tempusdictum.com/index.php/don/uncategorized/more-sinatra-from-the-ubuntu-folk#comments</comments>
		<pubDate>Tue, 29 Jun 2010 21:13:42 +0000</pubDate>
		<dc:creator>don</dc:creator>
		
		<category><![CDATA[System Admin]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[linux ubuntu lucid]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=77</guid>
		<description><![CDATA[I remember when the kids decided that they wanted to adapt the unnecessarily complicated system V init system and I kissed the simple days goodbye (sometimes I miss early bsd/freebsd and sometimes i miss it alot). Nowadays even the sysv-init isnt complicated enough. We gotta have upstart.
So after upgrading two systems to Lucid, I can ]]></description>
			<content:encoded><![CDATA[<p>I remember when the kids decided that they wanted to adapt the unnecessarily complicated system V init system and I kissed the simple days goodbye (sometimes I miss early bsd/freebsd and sometimes i miss it alot). Nowadays even the sysv-init isnt complicated enough. We gotta have upstart.</p>
<p>So after upgrading two systems to Lucid, I can tell you that most of the details have been well paid attention to, and a few problems we were having with 9.10 and hardy actually got solved. But there is still stuff that wasn&#8217;t broken that the kids just had to fix. So without further adeau I will tell you how to get gdm (and X) to go away after you have installed sysv-rc configured it to runlevel 3 (multiuser - no x) and its still there.</p>
<h2>Setting the runtime.</h2>
<p>If you have a working inittab the existing scripts will reference it so you can skip to how to get rid of gdm.</p>
<p>if you don&#8217;t you will find that the default runlevel is set to 2 (linux&#8217;s &#8216;user defined&#8217; graphical runlevel since rc5 wasnt good enough for some reason) in /etc/init/rc-sysinit.conf. This should be changed to look like this.</p>
<pre># Default runlevel, this may be overriden on the kernel command-line
# or by faking an old /etc/inittab entry
env DEFAULT_RUNLEVEL=3</pre>
<p>rebooting and typing &#8220;runlevel&#8221; should verify the change.</p>
<h2>Why is gdm/X still running?</h2>
<p>Beats the begebes out of me. But if you want it to stop you need to edit the /etc/init/gdm.conf and comment out the &#8220;start on&#8221; conditions and change them so that they correspond to the appropriate runlevel.</p>
<pre>#start on (filesystem
#          and started dbus
#          and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
#               or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
#               or stopped udevtrigger))
start on runlevel [24]
stop on runlevel [0136]</pre>
<h2>Grubby.</h2>
<p>If you don&#8217;t want gdm/x you probably don&#8217;t want the splash junk either. While /boot/grub/menu.lst allows you to set default options like nosplash every kernel upgrade i have done in the past year explicitly asks for quiet and splash way out at the end of each &#8220;kernel&#8221; line so just plan on hand editing the darned thing after each kernel update. I am sure you can uninstall splash but I prefer configuring things to keeping track of what needs to be uninstalled for a system to run correctly.</p>
<h2>Damned Kids.</h2>
<p>Hope this saves you some of your precious hair. All and all lucid (server and desktop) seems pretty sane and stable but they are still fixing things whether or not they were broken.</p>
<p><em>Dont even get me started on last weeks apparmor configuration update busting our dns. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/don/uncategorized/more-sinatra-from-the-ubuntu-folk/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tracing Multiscale Mechanisms of Drug Disposition in Normal and Diseased Livers</title>
		<link>http://blog.tempusdictum.com/index.php/gepr/uncategorized/tracing-ii</link>
		<comments>http://blog.tempusdictum.com/index.php/gepr/uncategorized/tracing-ii#comments</comments>
		<pubDate>Tue, 20 Apr 2010 22:52:43 +0000</pubDate>
		<dc:creator>gepr</dc:creator>
		
		<category><![CDATA[M&amp;S]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[biology]]></category>

		<category><![CDATA[modeling and simulation]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=76</guid>
		<description><![CDATA[Our second ISL tracing paper has been published online as a JPET FastForward Article Tracing Multiscale Mechanisms of Drug Disposition in Normal and Diseased Livers.
I&#8217;ll repeat the brief blurb on my agent based modeling website.

This paper talks in relative detail about how hypothesis formulation and falsification (failed validation) can be done at a fine grain ]]></description>
			<content:encoded><![CDATA[<p>Our second ISL tracing paper has been published online as a JPET FastForward Article <a href="http://jpet.aspetjournals.org/content/early/2010/04/20/jpet.110.168526.abstract" target="_blank">Tracing Multiscale Mechanisms of Drug Disposition in Normal and Diseased Livers</a>.</p>
<p>I&#8217;ll repeat the <a href="http://agent-based-modeling.com/" target="_blank">brief blurb on my agent based modeling website</a>.</p>
<blockquote><p>
This paper talks in relative detail about how hypothesis formulation and falsification (failed validation) can be done at a fine grain when only coarse grained validation data is available. Because our in silico liver (ISL) is an analog built in software, we can trace its internals. And because the internals of the analog were designed to map to the internal structure and dynamics of its referent (wet-lab liver perfusion experiments), traces of the ISL become detailed hypotheses about the internals of the liver. However, those detailed hypotheses are not falsifiable, except to the extent that they fail to reproduce the coarse validation data. Nothing can be done about that until we design wet-lab experiments to perform on real livers. In the meantime, though, we can alter the ISL mechanisms so that the coarse grained data matches that taken from wet-lab experiments under different conditions. In this case, we build 3 ISLs that generate the outflow profiles for drug and a sucrose marker for: 1) normal healthy livers, 2) alcohol damaged livers, and 3) carbon tetrachloride damaged livers. With the traces for each of the 3 ISLs, based upon the validated (i.e. not proven true, of course, but proven true enough) mechanisms of the ISL, we can formulate &#8216;proto-theories&#8217; for the translation of an experimental liver from a healthy to a diseased (cirrhotic) state.</p>
<p>Note that the particulars of the &#8216;proto-theories&#8217; suggested by these traces are not as sophisticated as those that might be generated by an expert hepatologist. In fact, these &#8216;proto-theories&#8217; may even seem bizarre or patently false to such an expert (though I believe they don&#8217;t seem so to the experts). Indeed, as Box&#8217;s aphorism says,</p>
<blockquote><p>&#8230; all models are wrong; the practical question is how wrong do they have to be to not be useful.</p></blockquote>
<p>The point is not to build computer programs that attempt to compete with the hypothesis formulation of experts. This is not an AI project. The point is to build devices, with whatever tools are available including computers, that make the experts more efficient and effective. By formulating these &#8216;proto-theories&#8217; about the translation of healthy livers to diseased livers (and vice versa), models like the ISLs provide a foil or sounding board to help sharpen the theories developed by the experts.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/gepr/uncategorized/tracing-ii/feed</wfw:commentRss>
		</item>
		<item>
		<title>Reprogramming your avr-usb device using atmel&#8217;s built in bootloader</title>
		<link>http://blog.tempusdictum.com/index.php/don/electronics/avr-development/reprogramming-your-avr-usb-device-using-atmels-built-in-bootloader</link>
		<comments>http://blog.tempusdictum.com/index.php/don/electronics/avr-development/reprogramming-your-avr-usb-device-using-atmels-built-in-bootloader#comments</comments>
		<pubDate>Fri, 05 Mar 2010 21:57:14 +0000</pubDate>
		<dc:creator>don</dc:creator>
		
		<category><![CDATA[Avr development]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=75</guid>
		<description><![CDATA[Getting code onto the MidiMonster or Benito device.





Midi Monster Button Locations.




Benito 7g Switch Lcations






Benito 2010 Switch Locations




Benito Without Buttons





All of the code on the Benito and MidiMonster devices is open source and references an open source library called the Lightweight Usb For Avr (lufa). Getting the code compiled and onto the device requires a few ]]></description>
			<content:encoded><![CDATA[<h3>Getting code onto the MidiMonster or Benito device.</h3>
<table border="0">
<tbody>
<tr>
<td>
<div class="image"><a href="http://www.flickr.com/photos/7175086@N05/4404887952/"><img src="http://farm3.static.flickr.com/2717/4404887952_d72836dabc_m.jpg" alt="Midi Monster Button Locations." width="240" height="180" /></a></p>
<div>Midi Monster Button Locations.</div>
</div>
</td>
<td>
<div class="image"><a href="http://www.flickr.com/photos/7175086@N05/4404887950/in/photostream/"><img src="http://farm5.static.flickr.com/4068/4404887950_8b951295db_m.jpg" alt="Benito 7g Switch Positions." width="240" height="180" /></a></p>
<div>Benito 7g Switch Lcations</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="image"><a href="http://www.flickr.com/photos/7175086@N05/4404887938/in/photostream/"><img src="http://farm3.static.flickr.com/2752/4404887938_92aa8c439b_m.jpg" alt="Benito 2010 Switch Locations" width="240" height="180" /></a></p>
<div>Benito 2010 Switch Locations</div>
</div>
</td>
<td>
<div class="image"><a href="http://www.flickr.com/photos/7175086@N05/4404887926/in/photostream/"><img title="Benito Without Buttons." src="http://farm5.static.flickr.com/4066/4404887926_a264eca548_m.jpg" alt="Benito Without Buttons." width="240" height="180" /></a></p>
<div>Benito Without Buttons</div>
</div>
</td>
</tr>
</tbody>
</table>
<p>All of the code on the Benito and MidiMonster devices is open source and references an open source library called the Lightweight Usb For Avr (lufa). Getting the code compiled and onto the device requires a few other open source tools.</p>
<h3>AVR-GCC</h3>
<p>The most current and stable release of the toochain for the AVR has untill recently been maintained by Eric Wedddington and released as WinAvr (<a href="http://sourceforge.net/projects/winavr/" target="_blank">http://sourceforge.net/projects/winavr/</a>) Winaver integrates nicely into atmels avr studio <a href="http://" target="_blank">http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=2725</a> and I reccomend that you get both if you are running windows. Each Winavr Release is closely followed by objective developments CrossPack for avr <a href="http://www.obdev.at/products/crosspack/index.html" target="_blank">http://www.obdev.at/products/crosspack/index.html</a> and a <a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=42631" target="_blank">script for building the current toolchain on linux</a> which is hosted by AvrFreaks at present there is also a debian package that was put out last month <a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=90172" target="_blank">http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=90172</a></p>
<h3>HWB? DFU?</h3>
<p>Most Atmel &#8220;atmega&#8221; devices have a pin dedicated to determining whether or not the device goes into the bootloader depending on the devices flag settings. This pin is labled HWB (for hardware boot) on most of  the datasheets. The usb avr family has this mode set up by default. When you hold the hwb pin low and reset the device it goes into the bootloader. On these devices the built in bootloader uses a usb device class called the Device Firmware Uploader (DFU). Atmel provides a tool called flip for programming DFU devices on  windows and linux. There is an open source programmer called dfu-programmer <a href="http://dfu-programmer.sourceforge.net/" target="_blank">http://dfu-programmer.sourceforge.net/</a></p>
<h4>That other guys stuff.</h4>
<p>Those of you who have worked with the teensy boards from paul stoffregon will notice some subtle differences. Paul wrote his own (closed source) bootloader rather than use the bootloader tha comes installed on the chips. Then he uses a hardware trick similar to the auto reset hack to make a single button manipulate both the reset and the hwb pins to put his boards into the bootloader. I didnt feel that either the two button arrangement or the builtin bootloaders were broken so I like most people working with these chips dont fix them.</p>
<h4>Using the dfu-programmer</h4>
<p>All of the programs in Dean Cameras Lightweight Usb for Avr have a &#8220;dfu&#8221; target. Once you have the target into the DFU mode you can simply</p>
<pre>$make dfu</pre>
<p>This will cause the dfu-programmer to erase the flash reprogramm it with a new hex file and restart the chip. You can also do this manually with the following commands</p>
<pre>$dfu-programmer atmega32u2 erase
$dfu-programmer atmega32u2 flash mycode.hex
$dfu-programmer atmega32u2 start</pre>
<p>This will cause the dfu-programmer to erase the flash reprogramm it with a new hex file and restart the chip.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/don/electronics/avr-development/reprogramming-your-avr-usb-device-using-atmels-built-in-bootloader/feed</wfw:commentRss>
		</item>
		<item>
		<title>In Silico Liver port to MASON</title>
		<link>http://blog.tempusdictum.com/index.php/gepr/uncategorized/in-silico-liver-port-to-mason</link>
		<comments>http://blog.tempusdictum.com/index.php/gepr/uncategorized/in-silico-liver-port-to-mason#comments</comments>
		<pubDate>Tue, 23 Feb 2010 18:40:14 +0000</pubDate>
		<dc:creator>gepr</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[modeling and simulation]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=72</guid>
		<description><![CDATA[I set this task aside awhile back.  When I returned to it, we had moved the source repository to a different machine.  I had lots of changes in my local sandbox.  Several of the prerequisite libraries had been upgraded.  Etc.  After doing all the catch-up work and checking it in, ]]></description>
			<content:encoded><![CDATA[<p>I set this task aside awhile back.  When I returned to it, we had moved the source repository to a different machine.  I had lots of changes in my local sandbox.  Several of the prerequisite libraries had been upgraded.  Etc.  After doing all the catch-up work and checking it in, however, it compiled and ran right out of the box!  I&#8217;m always surprised when that sort of thing happens.</p>
<p><a href="http://blog.tempusdictum.com/wp-content/uploads/2010/02/screenshot1.png"><img class="aligncenter size-full wp-image-74" title="ISLJ" src="http://blog.tempusdictum.com/wp-content/uploads/2010/02/screenshot1.png" alt="Way early ISL in MASON mock-up." width="500" height="289" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/gepr/uncategorized/in-silico-liver-port-to-mason/feed</wfw:commentRss>
		</item>
		<item>
		<title>Windows Vista using a CUPS PDF printer hosted on Debian</title>
		<link>http://blog.tempusdictum.com/index.php/gepr/uncategorized/windows-vista-using-a-cups-pdf-printer-hosted-on-debian</link>
		<comments>http://blog.tempusdictum.com/index.php/gepr/uncategorized/windows-vista-using-a-cups-pdf-printer-hosted-on-debian#comments</comments>
		<pubDate>Sat, 13 Feb 2010 00:21:51 +0000</pubDate>
		<dc:creator>gepr</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=71</guid>
		<description><![CDATA[So, every time I upgrade my system, it seems like my printers break.  I don&#8217;t know if it&#8217;s bad management of the cups debian packages, the peculiarity of windows, or my own incompetence.  The breaks have wildly varying symptoms.  So, I haven&#8217;t seen a pattern in them that allows me to fix things gracefully.  Sometimes ]]></description>
			<content:encoded><![CDATA[<p>So, every time I upgrade my system, it seems like my printers break.  I don&#8217;t know if it&#8217;s bad management of the cups debian packages, the peculiarity of windows, or my own incompetence.  The breaks have wildly varying symptoms.  So, I haven&#8217;t seen a pattern in them that allows me to fix things gracefully.  Sometimes Samba is to blame.  Sometimes CUPS (-PDF) is to blame.  And sometimes Windows is to blame.  Well, when I upgraded from Lenny to Squeeze awhile back, of course it broke my virtual PDF printer that I use to generate electronic invoices.  When I&#8217;d try to connect to the printer (as configured in Lenny), I got the following error:</p>
<pre><strong><span style="background-color: #000000; color: #ff6600;">Windows cannot connect to the printer. Operation
could not be completed (error 0&#215;0000000d).</span></strong></pre>
<p>(No, it wasn&#8217;t in those colors or with that background&#8230; but I figured I&#8217;d try to find a way to make you, dear reader, feel as annoyed as I felt when I saw the error.)  Anyway, with such a wonderfully informative error, I didn&#8217;t know quite where to turn.  The logs (cups, samba, auth.log, syslog, etc.) on the server gave no indication that anyone had tried to connect.  And I could browse the other shares from the vista machine nicely and those connections did show up in the logs.  So, I had a strong indicator that the problem was NOT my upgrade from Lenny to Squeeze.  But, being the stubborn idiot that I am, I started fiddling around with the printer and samba configs anyway&#8230;. which lead nowhere, of course.  The upside is that I am just a smidgeon more familiar with cups and samba. [sigh]</p>
<p>When I finally typed the error into a search engine, I <a href="http://social.technet.microsoft.com/Forums/en-US/itprovistaprinting/thread/d02718d8-cf5d-45de-9206-46714a549ee0/">found the answer provided by some participants of Microsoft TechNet</a>, which I repeat here for posterity:</p>
<pre>
From: AHarsent

I've seen this problem with a few printers now, not
consistantly[sic] between any particular makes or
models. However, I have found a consistant[sic]
fix to connect to any network printer from vista:

Run a command prompt and type the following:

   net use LPT2: \\servername\printer

This sets up a behind-the-scenes connection to
the printer.

Then go through the add printer wizard, choose to
add a local printer, and choose port LPT2&#8230; It will
probably ask for a printer driver, and you can just
choose whatever XP driver you might have been using
before. The printer is then installed without any errors,
and works just fine.
</pre>
<p>Of course, since I&#8217;m using CUPS-PDF, I don&#8217;t have a printer driver.  I just use the Generic MS Publisher Imagesetter, which seems to work nicely.  And now that I&#8217;ve made the right sacrifices to the right gods, I&#8217;m back to being able to generate PDFs from any program on the windows machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/gepr/uncategorized/windows-vista-using-a-cups-pdf-printer-hosted-on-debian/feed</wfw:commentRss>
		</item>
		<item>
		<title>Acid Testing Your Time Machine Backups</title>
		<link>http://blog.tempusdictum.com/index.php/don/mac-development/acid-testing-your-time-machine-backups</link>
		<comments>http://blog.tempusdictum.com/index.php/don/mac-development/acid-testing-your-time-machine-backups#comments</comments>
		<pubDate>Thu, 04 Feb 2010 23:31:21 +0000</pubDate>
		<dc:creator>don</dc:creator>
		
		<category><![CDATA[Mac Development]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=70</guid>
		<description><![CDATA[
Disks Die, Laptops break, Bags are Stolen.
It&#8217;s more or less a fact of life,
In the 4 year  process of  transitioning from a noisy sun E-250 in the garage to something that could actually be in the same room with you I arrived at the above network arrangement.
Most of the my data is hosted ]]></description>
			<content:encoded><![CDATA[<p><a href="http://farm5.static.flickr.com/4020/4331153338_cd3ce93100_o.jpg"><img class="alignnone" src="http://farm5.static.flickr.com/4020/4331153338_cd3ce93100_o.jpg" alt="" width="640" height="480" /></a></p>
<h3>Disks Die, Laptops break, Bags are Stolen.</h3>
<p>It&#8217;s more or less a fact of life,</p>
<p>In the 4 year  process of  transitioning from a noisy sun E-250 in the garage to something that could actually be in the same room with you I arrived at the above network arrangement.</p>
<p>Most of the my data is hosted by a central server and when I had more systems all of the home directories were NFS mounted (<em>which is a major PITA on OSX</em>). In the last hear I have worked primarily on my MacBook, occasionally syncing my projects with the file server. After migrating to leopard I purchased a 1 Terabyte external disk and backed up both the file server and my laptop using &#8220;Time Machine&#8221;. As I worked more and more on the laptop I did less and less syncing of the work to the file server. The thing about time machine is that its thoughtless. Set it up and as long as you get your laptop home and leave it on for a few hours and it<em><strong> should </strong></em>keep your work safe for you.</p>
<h3><strong>Two weeks ago My Bag was stolen.</strong></h3>
<p>On top of the work I had actively been doing I lost two active sketchbooks and in the end this loss is probably the most painful. Since I couldn&#8217;t immediately restore the data using the process described below, I spent much of last week recreating the designs for this months workshops. Once the critical work was done I turned to see what I could recover.  I had used time machine to restore a couple of files I had foobared but I had never had to restore all 270G of data and applications. My Intel Imac did not have enough disk nor did it have most of the software. So I bought a 1T disk from <a href="http://www.otcpdx.com/" target="_blank">Old Town Computers</a> and &#8220;<a href="http://www.bombich.com/" target="_blank">CarbonCopyCloner</a>&#8220;ed a bootable operating system onto it and put it into my Intel Imac (Ernesto).</p>
<h3>WHERE&#8217;S MY BACKUP?!?</h3>
<p>After googling around I found that I was supposed to restore my files using the &#8220;Migration Assistant&#8221; tool. I had used migration assistant to move users and applications to new systems but never to restore files. When I first tried the migration assistant I mounted the disk remotely but I couldn&#8217;t see the backup. So I moved the disk to the target machine. Even then I only saw the option of restoring the server and not my laptop.<br />
Panic set in until I found a file named with my laptops name and a .sparsebundle extension. Right clicking on this lets me open it with the appropriate mounting utility. But&#8230;. Not until it had checked the file system. Walking away and doing something else for a few hours let me come back to the image mounted. When I ran the migration assistant again the option of restoring the laptop was there.</p>
<h3>SUCCESS!</h3>
<p>Starting the restore process and going to sleep I woke to find that it had successfully restored all of my data and applications! I was only out the extra time on the designs and the actual property.</p>
<h3>FAIURE.</h3>
<p>Now all of my active work was on a disk which was large enough to also contain the rest of my images/music/video and web content which had been kept on the file server. Since I could see the fileserver&#8217;s backup and I was so happy with my success I tried then to restore the file server data.</p>
<p>Mounting your home directories on external disks on OSX is a lot like mounting them remotely. It just plain sucks. Half the time if I made any changes in the disks connected to the file server it would mount them in a different place. Then when you logged in it would create a new mount point and empty directory and you could not remount the disk where it was supposed to be until you removed the new directory.</p>
<p>When I restored the file server user I had few options. I could restore the user (giving an estimated size of like 20 meg , not the  &gt;400G I expected) and on the next screen  I could restore the file system at the top level directory. This did not show me enough data to represent the data directory either. I could also have restored the entire system and then re-restored the Intel files over it but I really didn&#8217;t want to deal with the mess.</p>
<h3>So I punted.</h3>
<p>I just plugged the file server disk in and dragged my home folder to the new disk. I will probably test the restore process to the file server with the external disk attached to make sure the data is recoverable on that system. Once this is done I will reformat the time machine disk for future backups and send the file servers external disk to another state. In the mean time I will rest better knowing that my time machine backups actually work transparently while I work.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/don/mac-development/acid-testing-your-time-machine-backups/feed</wfw:commentRss>
		</item>
		<item>
		<title>Dual coordinate plots in R</title>
		<link>http://blog.tempusdictum.com/index.php/gepr/uncategorized/dual-coordinate-plots-in-r</link>
		<comments>http://blog.tempusdictum.com/index.php/gepr/uncategorized/dual-coordinate-plots-in-r#comments</comments>
		<pubDate>Tue, 12 Jan 2010 01:16:41 +0000</pubDate>
		<dc:creator>gepr</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=68</guid>
		<description><![CDATA[The default plot functions in R don&#8217;t seem to facilitate plotting two dependent variables using different scales on the same plot, against the same independent axis.  But it&#8217;s not that difficult, as I learned from: Jim Lemon&#8217;s &#8220;Kickstarting R&#8221;.  But even his example isn&#8217;t simple enough for me.  So, I generated this:

par(mar=c(5,4,4,4))
plot(1:11, ]]></description>
			<content:encoded><![CDATA[<p>The default plot functions in R don&#8217;t seem to facilitate plotting two dependent variables using different scales on the same plot, against the same independent axis.  But it&#8217;s not that difficult, as I learned from: <a href="http://cran.r-project.org/doc/contrib/Lemon-kickstart/kr_addat.html">Jim Lemon&#8217;s &#8220;Kickstarting R&#8221;</a>.  But even his example isn&#8217;t simple enough for me.  So, I generated this:</p>
<pre>
par(mar=c(5,4,4,4))
plot(1:11, 1:11, ylab="", col="green", axes=F)
axis(1,1:11)
axis(2,1:11, col="green")
par(new=T)
plot(1:11, 5:-5, ylab="", axes=FALSE, pch=3, col="blue")
axis(4, -5:5, col="blue")
par(new=F)
</pre>
<p>which produces this:<br />
<a href='http://blog.tempusdictum.com/wp-content/uploads/2010/01/dual-coordinates.png'><img src="http://blog.tempusdictum.com/wp-content/uploads/2010/01/dual-coordinates-285x300.png" alt="" title="dual-coordinates-in-R" width="285" height="300" class="alignnone size-medium wp-image-69" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/gepr/uncategorized/dual-coordinate-plots-in-r/feed</wfw:commentRss>
		</item>
		<item>
		<title>Postgres + Ruby + OSX=Multi Architectural Hell</title>
		<link>http://blog.tempusdictum.com/index.php/don/mac-development/postgres-ruby-osxmulti-architectural-hell</link>
		<comments>http://blog.tempusdictum.com/index.php/don/mac-development/postgres-ruby-osxmulti-architectural-hell#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:28:59 +0000</pubDate>
		<dc:creator>don</dc:creator>
		
		<category><![CDATA[Mac Development]]></category>

		<category><![CDATA[osx rails ruby fubar]]></category>

		<guid isPermaLink="false">http://blog.tempusdictum.com/?p=67</guid>
		<description><![CDATA[I was finally able to get my ruby/rails environment setup with my database of choice.
It wasnt easy as postgres will not build with more than one architecture at a time, I  had gone through similar hell the last time I tried to build anything on OSX that had to compile against libraries made for ]]></description>
			<content:encoded><![CDATA[<p>I was finally able to get my ruby/rails environment setup with my database of choice.</p>
<p>It wasnt easy as postgres will not build with more than one architecture at a time, I  had gone through similar hell the last time I tried to build anything on OSX that had to compile against libraries made for different architectures. Fortunately the solution was relatively simple.</p>
<p>My database is running 64 bit and I use it for many other applications that are compiled against either multiple architectures including 64bit but also some which are 64 bit only.</p>
<p>Ruby on the other hand is compled for 32 bit which worked flawlessly on mysql and most of the other gems i installed when I got to the postgres it puked in weird ways and when I tried every third solution on the net it was always the same.</p>
<pre style="padding-left: 30px;">Bash-3.2# gem install pg
Building native extensions.  This could take a while...
ERROR:  Error installing pg:
ERROR: Failed to build gem native extension.</pre>
<p>The bottom line from one of the only success stories that I found on the net was that you either built everything 64bit or nothing. <i>Easy enough if you want to build all of your dependencies by yourself.</i> The whole point of gems is to have the tools work for you. I wasnt really able to figure this out in the web full of people beating their heads on the same problem each harder than the other and each reaching the same it doesnt work conclusion but I had the fortune of getting completely away from the web long enough to realize that only the client and libraries needed to match the architecture and since all interaction between rails and the database went through a socket the architecture of the client didn&#8217;t have to be the same as the database.</p>
<p>so going back to my postgres source tree i did a</p>
<pre style="padding-left: 30px;">...postgresql-8.3.6# make distclean</pre>
<p>and then reconfigured the database using the prefix /usr/local32</p>
<pre style="padding-left: 60px;">..postgresql-8.3.6# ARCHFLAGS='-arch i386' ./configure --prefix=/usr/local32/</pre>
<p>Then I just had to tel ruby/gem to  use the 32 bit libraries. Since ruby uses pg_config I made sure that the 32bit version is in the path first.</p>
<pre style="padding-left: 60px;"># PATH=/usr/local32/bin/:$PATH ARCHFLAGS='-arch i386' \
gem install pg  -- --with-pgsql-dir=/usr/local32/</pre>
<p>And we are off but my god what at PITA.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tempusdictum.com/index.php/don/mac-development/postgres-ruby-osxmulti-architectural-hell/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
