<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4544349702756476498</id><updated>2012-01-29T13:12:19.249-08:00</updated><title type='text'>My Wacky Head</title><subtitle type='html'>Just things that are going on in my life.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.circuitsofimagination.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-2956450261827876301</id><published>2012-01-29T13:04:00.000-08:00</published><updated>2012-01-29T13:11:42.387-08:00</updated><title type='text'>Sooooooooooo True</title><content type='html'>&lt;blockquote&gt;
&lt;p&gt;It sure seems easy to make a table. Anyone can do it, right? Get 1 large flat rectangular piece of wood, 4 equally tall wooden poles, 4 nails and a hammer. Nail the 4 poles to each corner of the flat rectangular bit, and you have a table. Ta daaa!&lt;/p&gt;

&lt;p&gt;Now ask a carpenter to craft you a table. First they will spend time discussing the purpose and function of the table - indoor or outdoor, kitchen or dining room, for show or heavy use, what load does it need to bear. Then they will determine the materials to use - hard vs soft woods, laminate, plywood or railway sleepers. Then they will look at the aesthetics of the table - beveled edges, foot design, center or corner mounted legs. And when they finally get down to crafting the table, they spend a lot of time to mitre, mortise and dovetail all joints, install bracing points, use quality glues, dowels and screws, test its levelness, sand it flat, stain it, seal it, polish it and produce a table they are proud of. Seems a whole bunch more work, doesn’t it? It just a table, no?&lt;/p&gt;

&lt;p&gt;But there are differences between the two approaches, did you see any?&lt;/p&gt;

&lt;p&gt;The table with four nails looks shoddy, it’s wobbly because the legs are not squared, has a warped top, will not last a week before a leg spins itself off and cannot be trusted to bear the weight of single salt shaker. The carpenter’s table looks better, works better, both feels and is solid, does not wobble, has squared legs, is flat, does not give you splinters, lasts way way longer, and can be relied upon to keep a full dinner and a few partygoers off the floor. Which would you rather have?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Pulled from &lt;a href="http://www.hiltmon.com/blog/2012/01/11/it-should-only-take-you-a-few-hours-dot-dot-dot/"&gt;The Hiltmon&lt;/a&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-2956450261827876301?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/2956450261827876301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/2956450261827876301'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2012/01/so-true.html' title='Sooooooooooo True'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-1906697518193673752</id><published>2011-02-15T18:58:00.000-08:00</published><updated>2012-01-29T13:12:19.260-08:00</updated><title type='text'>Greasemonkey 101</title><content type='html'>&lt;p&gt;So I'm reading &lt;a href="http://www.infoworld.com"&gt;InfoWorld&lt;/a&gt; the other day and on the side of the page ther is that annoying "Share This" toolbar. Now I have AdBlock installed but it skipped this one for some reason and AdBlock can't removes div's AFAIK. The solution I came up with was &lt;a href="http://www.greasespot.net/"&gt;Greasemonkey&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/"&gt;installing the plugin&lt;/a&gt; go back to that article you were reading. Right click on the Greasemonkey icon on the right side of Firefox's status bar and choose to add a new script. Fill out the Dialog that pop's up (see screenshot), make sure to give an URL for the namespace, a fake one will do, and to set the include line to "http://www.infoworld.com/*".&lt;/p&gt;

&lt;img src="http://farm6.static.flickr.com/5218/5449967798_b57deb0219.jpg"/&gt;

&lt;p&gt;Click on the Greasemokey dialog box and your editor should pop up. This is where you write the code for your script, which is just plain Javascript. So our goal is to get rid of the annoying toolbar which just happens to have the fixed ID of "floating_tools", making our script REALLY simple. Remember to keep the comments that were originally in the file.&lt;/p&gt;

&lt;pre class="code"&gt;
// ==UserScript==
// @name           KSTB
// @namespace      http://greasemonkey.circuitsofimagination.com/
// @description    Kill the Share it Tool Bar
// @include        http://www.infoworld.com/*
// ==/UserScript==

var toolbarElement = document.getElementById("floating_tools");
toolbarElement.parentNode.removeChild(toolbarElement);
&lt;/pre&gt;

&lt;p&gt;Save the script and close the editor. Refresh the infoworld page and magically no more annoying toolbar. Even better you are now a 1337 c0d3r cuz you writes amazing greasemokey scripties. Congradulations!&lt;/p&gt;

&lt;p&gt;For more in-depth info go to the &lt;a href="http://commons.oreilly.com/wiki/index.php/Greasemonkey_Hacks"&gt;Greasemokeys Hacks Wiki&lt;/a&gt; which is where I learned to do this from.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-1906697518193673752?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/1906697518193673752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/1906697518193673752'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2011/02/greasemonkey-101.html' title='Greasemonkey 101'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm6.static.flickr.com/5218/5449967798_b57deb0219_t.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-4797088885633329252</id><published>2009-06-21T13:53:00.000-07:00</published><updated>2009-06-21T13:56:49.808-07:00</updated><title type='text'>LAWIM</title><content type='html'>Gotta love CoreImageFunHouse!

&lt;a href="http://www.flickr.com/photos/23763980@N06/3648127664/sizes/o/"&gt;&lt;img width="500" src="http://farm4.static.flickr.com/3344/3648127664_57324df59f_o.jpg"/&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-4797088885633329252?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/4797088885633329252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/4797088885633329252'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2009/06/lawim.html' title='LAWIM'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-8078371251416469602</id><published>2009-06-02T10:25:00.000-07:00</published><updated>2009-06-02T10:26:25.053-07:00</updated><title type='text'>openFrameworks is cool</title><content type='html'>&lt;p&gt;&lt;a href="http://www.openframeworks.cc/"&gt;openFrameworks&lt;/a&gt; is a set of C/C++ libraries for "Creative Coding".&lt;/p&gt;

&lt;p&gt;I heard about openFrameworks a while back off of reddit. The video on there home page had me sold! So one Saturday morning when I wasn't too hung over I made this.&lt;/p&gt;

&lt;a href="http://www.flickr.com/photos/23763980@N06/3445897429/" title="OFVideoGrabber by The Moldy Peep, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3375/3445897429_bbd93b5618_m.jpg" width="240" height="187" alt="OFVideoGrabber" /&gt;&lt;/a&gt;

&lt;p&gt;It only took me 100-150 lines of code to write that app. You can get the Xcode project &lt;a href="http://github.com/tantalum/ofvideograbber/tree/master"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;IMO the filter looks best with some kind of light source in the background and an object between it and the camera. It's trippy!&lt;/p&gt;

&lt;p&gt;So what really happened was that I was trying to write an edge detector and it went wrong. See code for a link, since I obviously have know idea what I'm doing, I won't try to explain why the filter does what it does. But I thought it was cool so I left it the way it is.&lt;/p&gt;

&lt;p&gt;openFrameworks uses a &lt;a href="http://processing.org/"&gt;processing&lt;/a&gt; style application loop with a setup(), update(), draw(), and event functions that you hook into by implementing a subclass of ofSimpleApp. My "main" function is only two lines long.&lt;/p&gt;
&lt;pre&gt;
int main (int argc, char * const argv[]) {
 ofSetupOpenGL(1024, 768, OF_WINDOW);
 ofRunApp(new OFVideoGrabberApp());
}
&lt;/pre&gt;

&lt;p&gt;My real friend was ofVideoGrabber. Getting the pixels from a built in webcam takes three lines. One in setup():&lt;p&gt;
&lt;pre&gt;
videoGrabber.initGrabber(camWidth, camHeight);
&lt;/pre&gt;

&lt;p&gt;The update function has the other two:&lt;/p&gt;
&lt;pre&gt;
void OFVideoGrabberApp::update(){
 unsigned char *buffer = (unsigned char*)malloc(camWidth*camHeight);
 ofBackground(80, 80, 80);
 videoGrabber.grabFrame();
 if(videoGrabber.isFrameNew()){
  unsigned char* pixels = videoGrabber.getPixels();
  convert_to_greyscale(pixels, camWidth, camHeight, buffer);
  edge_detect(buffer, camWidth, camHeight, filterBuffer);
  filteredTexture.loadData(filterBuffer, camWidth, camHeight, GL_LUMINANCE);
 }
 free(buffer);
}
&lt;/pre&gt;

&lt;p&gt;The reason I didn't convert the image to grey scale and do the filtering all at once, instead of looping over the image twice, is that by doing it this way I can easily replace the filter. I just write a new filter and edit a couple lines of code. Of course the proper way to do things would be to dynamically load blah blah blah. For heavens sake it's just a toy!&lt;/p&gt;

&lt;p&gt;The same goes for allocating "buffer" every update&lt;/p&gt;

&lt;p&gt;I like openFrameworks use of 3rd party libraries and them leaving it out there and on the surface. Most frameworks I've worked wrap the 3rd party API's with there own, or just reinvent the wheel. Which is great as long as you are working within there confines but sucks when you need that one little property that you can't get to.&lt;p&gt;

&lt;p&gt;The part of open frameworks that I like right now but probably wouldn't like so much if I was doing a complete project is the hackish feel that is has. There isn't a nice little config/make/install wrapper, and it _wants_ to hand you the raw pixel data. Which means there is a little less learning overhead and it help free you up to add on what you want quite easily. The flip side to that is there is a lot you have to do from scratch of you want to change/add stuff.&lt;/p&gt;

&lt;p&gt;It did take me a little messaging for openFrameworks to compile correctly. It mostly had to do with header paths, due to the lack of a nice config/make wrapper. It also comes with pre-built versions of most of it's libraries but you might have to move some files around to fix link errors. Other then that it went pretty smooth.&lt;/p&gt;
 
&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-8078371251416469602?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8078371251416469602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8078371251416469602'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2009/06/openframeworks-is-cool.html' title='openFrameworks is cool'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm4.static.flickr.com/3375/3445897429_bbd93b5618_t.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-2667141712578239477</id><published>2009-06-02T10:24:00.001-07:00</published><updated>2009-06-02T10:24:56.802-07:00</updated><title type='text'>Whats up with Xmonad</title><content type='html'>&lt;p&gt; 
  Xomnad... The new and hip tiling window manager written is Haskell, the new hip language. I've been hearing about xmonad a lot and have been trying to get into haskell. Ya know, gotta follow those trends.
&lt;/p&gt;

&lt;p&gt;So I go and grab a copy of xomand (0.8) and all the depends (I had haskell setup already). Compiling and installing was a breeze. At the time I had a pimped out gnome setup (compiz, emerald... the works). Just to see what would happen I run the fresh new binary called xmonad. All the friking windows start bouncing around the screen. It was kind of cool to see the two programs fight for control over to poor windows.&lt;/p&gt;

&lt;p&gt;Getting used to the tiling thing took a little bit. I'm still working on getting used to it, but I haven't lost much as far as productivity. Configuring xmonad is pretty fun since you have all of haskell to mess around with. But if you just want to do some simple configuration it still feels like any other config file (terminal = "urxvt").&lt;/p&gt;

&lt;p&gt;One of the cool things about xmonad is that it's still small enough that you can mess around with it without having to spend a week reading up on documentation (I'm looking at you  &lt;a href="http://developer.apple.com/"&gt;developer.apple.com&lt;/a&gt;). There are bunch of pre-made config files that are easy to read, a good starting point.&lt;/p&gt;

&lt;p&gt;The contrib extentions are really cool... Well written, do cool things, small. Doesn't get better than that. E.g.: Invisible.hs is only 45 lines, including documentation. But I have to shameingly admit that I have no idea what the hell it does. On the other hand XMonad.Util.Run is an example of awesome. Simple and sweet functions for spawning processes via xmonad.&lt;/p&gt;

&lt;p&gt;I've been using it for a couple of weeks and some times I can hear my video card calling for some changeling renders but alas. I think I'm gonna stay xmonad for a little longer. I've been using the trminal a lot more since I've gotten a new gig and, believe me, tiling window managers are made for terminals. I kind of expected they were before I starting using xmonad but I didn't think I'd get used to it so fast. I can see every thing all at the same time with no wasted space. But for things other than that (say gimp or evolution) some times you end up looking at the screen and thinking to your self "wtf is up with that?". Basically if you aren't a programmer/sys-admin/I like to push a lot of buttons kind of person then xmonad is not for you.&lt;/p&gt;

&lt;p&gt;And that ladies and gentlemen is a big part of how I ended up with mutt, which, depeding on how intersting my life is during the next couple of days, could be what I'm gonna write about next&lt;/p&gt;


&lt;p&gt;P.S.: Grammer police, please leave me the fuck alone.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-2667141712578239477?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/2667141712578239477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/2667141712578239477'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2009/06/whats-up-with-xmonad.html' title='Whats up with Xmonad'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-7694285551740244318</id><published>2008-03-03T20:47:00.000-08:00</published><updated>2008-03-03T20:50:29.636-08:00</updated><title type='text'>This is from gnome blogger</title><content type='html'>&lt;p&gt; Well I'm posting this entry using gnome-blogger. I got my old laptop up and running Ubuntu again for work. I still have my Mac that I use for school and stuff I prefer to develop on Linux machines. I have written a whole three lines and I still don't see what so special about this app. I might as well use emacs and copy/paste. Any way hopefully I'll post some interesting stuff later this week.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-7694285551740244318?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/7694285551740244318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/7694285551740244318'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2008/03/this-is-from-gnome-blogger-well-im.html' title='This is from gnome blogger'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-1377825721930399781</id><published>2008-02-26T07:15:00.000-08:00</published><updated>2008-02-26T07:18:51.170-08:00</updated><title type='text'>I'm back again</title><content type='html'>&lt;p&gt;This is probably the third or forth one of thoes "I'm gonna start writing again" posts that I've done. But yes I think I'm gonna start blogging again. I've been carzy busy lately and I have to go to class in a couple of minuts so I'll try to post something useful tonight&lt;/p&gt;

&lt;p&gt;^---Completly useless post&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-1377825721930399781?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/1377825721930399781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/1377825721930399781'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2008/02/im-back-again.html' title='I&apos;m back again'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-2432490510010671449</id><published>2007-09-22T22:56:00.000-07:00</published><updated>2007-09-22T22:57:24.590-07:00</updated><title type='text'>Script is working</title><content type='html'>&lt;p&gt;So I've been messing around with Mac development for the last little while. I got a copy of "Beginning Mac OS X Programming" and I'm reading it. I also got my iCal script to work, here it is&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;
tell application "iCal"
 activate
 set the my_summary to ""
 set the calendar_list to every calendar
 repeat with i from 1 to the count of the calendar_list
  set the the_calendar to the item i of the calendar_list
  set the event_list to (every event of the the_calendar)
  repeat with j from 1 to the count of event_list
   set the_event to the item j of the event_list
   set my_summary to my_summary &amp; return &amp; return &amp; my summerise_event(the_event)
  end repeat
 end repeat
 set the clipboard to my_summary
end tell


on summerise_event(the_event)
 tell application "iCal"
  set the event_properties to the properties of the_event
  set this_summary to the summary of the event_properties
  set this_location to the location of the event_properties
  if this_location is missing value then set this_location to "No Location"
  set start_date to short date string of (get start date of the event_properties)
  set end_date to short date string of (get end date of the event_properties)
  set event_description to the description of the event_properties
  if event_description is missing value then
   set event_description to "No Notes"
  end if
  set event_summary to "Summary: " &amp; this_summary &amp; return &amp; "Location: " &amp; this_location &amp; return &amp; "Start Date: " &amp; start_date &amp; return &amp; "End Date: " &amp; end_date &amp; return &amp; "Notes: " &amp; event_description &amp; return
 end tell
 return the event_summary
end summerise_event
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;It's a really simple script that get the info about your events from iCal and puts them in the clipboard for you to past wherever.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-2432490510010671449?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/2432490510010671449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/2432490510010671449'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/09/script-is-working.html' title='Script is working'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-6134033370540297649</id><published>2007-09-16T21:22:00.000-07:00</published><updated>2007-09-16T21:27:23.570-07:00</updated><title type='text'>AppleScript and iCal</title><content type='html'>&lt;p&gt;I started to fiddle around with apple script the other day. I down loaded an example script that exports you iCal events. I tried to write a trimmed down version of it but I keep getting this error that I dont understand. I just signed up at &lt;a href="http://macscripter.net"&gt;MacScripter&lt;/a&gt; and posted my question so hopefully I'll get an answer soon&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-6134033370540297649?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/6134033370540297649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/6134033370540297649'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/09/applescript-and-ical.html' title='AppleScript and iCal'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-3645475701302435357</id><published>2007-09-10T19:16:00.000-07:00</published><updated>2007-09-10T19:23:11.072-07:00</updated><title type='text'>Wrote a Coca App!!</title><content type='html'>&lt;p&gt;So me being the ADD fuckup that I am decided that I want to write pretty coca app for Macintosh. So I went out to Barns &amp; Nobles and the only Mac Development related book I could find was about how to use Xcode. Well it had an example app as the introduction which I used as a starting point. I have to admit I didn't get very far after that. Any way I'd upload it for you all but blogger wont let me :-(.&lt;/p&gt;

&lt;p&gt;On the other hand I ordered a copy of "Beginning Mac OS X Programming" or something like that from B&amp;N. Can't wait to get it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-3645475701302435357?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/3645475701302435357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/3645475701302435357'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/09/wrote-coca-app.html' title='Wrote a Coca App!!'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-1355656447046895995</id><published>2007-09-08T14:58:00.000-07:00</published><updated>2007-09-08T15:03:09.805-07:00</updated><title type='text'>Pthread, Mutex and Mac OS X</title><content type='html'>&lt;p&gt;A while back I was reading Beginning Linux Programming. I never worked that much with the examples. Partially because I really never had time. So the other day I had some free time and I wanted to see what would and wouldn't work with my Mac. So I open up the part on threading and I re-read the mutex part. A couple of man's later and I found out that Macs supports pthread. I wrote up this little example for mutexes.&lt;/p&gt;
&lt;pre&gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
//#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;pthread.h&amp;gt;
#include &amp;lt;string.h&amp;gt;

void *worker_function(void* arg) ;
pthread_mutex_t work_mutex ; //our little flag

int main(int argc, char* argv[]){
  int res;
  pthread_t worker_thread ;
  void* thread_result ;
  res = pthread_mutex_init(&amp;work_mutex, NULL) ;
  if(res != 0){
    perror("Mutex Initialization Failed") ;
    exit(EXIT_FAILURE) ;
  }

  res = pthread_create(&amp;worker_thread, NULL, worker_function, NULL) ;
  if(res != 0){
    perror("Thread creation Failed");
    exit(EXIT_FAILURE) ;
  }
  int i ;
  for(i = 0; i&lt;10; i++){
    pthread_mutex_lock(&amp;work_mutex) ;
    printf("Main Thread: %d\n", i) ;
    pthread_mutex_unlock(&amp;work_mutex) ;
  }
  
  printf("Waiting for worker thread to finish\n") ;
  res = pthread_join(worker_thread, &amp;thread_result) ;
  if(res != 0){
    perror("Worker thread crashed") ;
    exit(EXIT_FAILURE) ;
  }
  pthread_mutex_destroy(&amp;work_mutex) ;
  exit(EXIT_SUCCESS) ;
}

void* worker_function(void* arg) {
  int i ;
  for(i = 0; i &lt; 20 ; i++){
    pthread_mutex_lock(&amp;work_mutex) ;
    printf("Worker thread: %d\n", i) ;
    pthread_mutex_unlock(&amp;work_mutex) ;
  }
  pthread_exit(0) ;
}
&lt;/pre&gt;
&lt;p&gt;Nothing much... kinda like the "Hello, world" of threading but I like. Hopefully I'll have the chance to work wiht queues soon&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-1355656447046895995?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/1355656447046895995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/1355656447046895995'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/09/pthread-mutex-and-mac-os-x.html' title='Pthread, Mutex and Mac OS X'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-774842745630421279</id><published>2007-09-01T20:08:00.001-07:00</published><updated>2007-09-01T20:08:37.587-07:00</updated><title type='text'>Class Extractor</title><content type='html'>&lt;p&gt;Ok so I wanted to do a little something in perl because it's been a while since I've written anything in it. Since I still have the code from my myspace profile I decided to write a little script to extract the css classes from it. Well here it is:&lt;/p&gt;
&lt;p&gt;
&lt;pre&gt;
#!/usr/bin/perl -w

#use strict ;
use HTML::Parser ;

sub handle_start{
  shift ;
  #print $tag."\n" ;  
  my @attrs = @_ ;
  for (@attrs) {
    my %hash = %$_ ;
    #print "\t".%hash."\n" ;
     for(keys %hash){
       if(m/^class$/){
  $class = $hash{$_} ;
  if(defined $class_count{$class}){
    $class_count{$class} += 1;
  }
  else{
    $class_count{$class} = 0;
  }
       }
     }
  }
}

$parser = HTML::Parser-&gt;new ;
$parser-&gt;handler(start=&gt;\&amp;handle_start,  'tag, attr') ;
while(&lt;STDIN&gt;){
  $parser-&gt;parse($_) ;
}

for(keys %class_count){
  print $_." : ".$class_count{$_}."\n" ;
}
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;It seems to work pretty well. I tried to write the same script in python but it'shtml parser it too uptight or myspace so.... I fell kinda guilty because I like python more than perl but sometimes perl's just kinda cool to play with.&lt;/p&gt;
&lt;p&gt;Here is what I got when I ran my unedited profile page throught it.&lt;/p&gt;
&lt;p&gt;
&lt;pre&gt;
nametext : 0
redtext : 1
bodyContent : 0
txt : 0
redlink : 0
redbtext : 0
extendedNetwork : 0
contactTable : 0
tdborder : 2
text : 28
btext : 1
navbar : 14
friendSpace : 0
blacktext12 : 0
text tdborder : 1
whitetext12 : 1
commentlinks : 1
navigationBar : 0
userProfileDetail : 0
friendsComments : 0
blacktext10 : 1
userProfileURL : 0
lightbluetext8 : 8
latestBlogEntry : 0
profileInfo : 0
blurbs : 0
orangetext15 : 4
ImgOnlineNow : 1
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;So I hope that a list of all the classes in myspace is usefull. I think a little more usefull is the a script that extracts classes and count from a web page&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-774842745630421279?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/774842745630421279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/774842745630421279'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/09/class-extractor.html' title='Class Extractor'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-7920629783604918945</id><published>2007-08-28T22:01:00.000-07:00</published><updated>2007-08-28T22:05:02.125-07:00</updated><title type='text'>Some Stupid Story.</title><content type='html'>&lt;p&gt;So today wasn't very interesting computer wise.&lt;/p&gt;
&lt;p&gt; I found this job for a java (yuc!) programmer at this bank in Jefferson City. I fixed up my resume an made it all nice and pretty. I put it on &lt;a href="docs.google.com"&gt; google docs&lt;/a&gt; and head over to my sister desktop to print it since my laptop isn't hooked up to the printer. Well, I was warned that the printer wasn't working very well so. So first off I go to &lt;a href="mapquest.com"&gt;mapquest&lt;/a&gt; to get directions. I select the part I need, File, Print, Ok.... "Cannot communicate with printer"! wtf!. The little dialog says that I should try and unplugged than replug the printer.&lt;/p&gt;
&lt;p&gt;It's getting late and I dont have enough time to deal with this crap. So I head over to the college in hopes of finding a working printer. I go to the library and try to use the computer but I dont have my student e-access setup yet (lazy bastard) so I can't log on. I tried for a guest account, no luck. I tried to guess the Admins password, also no luck. So I text my sister and ask her for her username/pass&lt;/p&gt;
&lt;p&gt;While I'm outside texting her this girl smoking a cigarette catches my eye. She's looks a little punky and kinda stands out. I haven't meet any one in this dead beat town yet to I go over and ask her for a cig. I start talking to her and decide that it's too late to go for this stupid interview for a job I dont really want. So I text my sister and tell her to forget about the username and stuff. I finish the cig and get up and leave. I didn't ask the girl for her number, I should have... I hope I run into her again soon. I liked her.&lt;/p&gt;
&lt;p&gt;As I'm walking away I get this call from my sister asking what the story is. I tell her about her printer. She tells me that she's near the library and that shell log me in so that I can use the printer there. I go back to the library and come out with a copy of my resume and the directions to the bank&lt;/p&gt;
&lt;p&gt;I go back home and change into my Look Professional clothes, aka Pretend I Care About What You Think clothes. I get to the bank and I fill out an access application that asks me for the usual info. Then I sign a couple of papers, hand them my resume and leave. They said theyd get back in touch with me&lt;/p&gt;
&lt;p&gt;Ok I kinda forgot why I told you guy's this story... I dont think there is a moral to it. But I have it all written down so I'm gonna publish it. Maybe tomorrow I'll come up with something you actually care about&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-7920629783604918945?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/7920629783604918945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/7920629783604918945'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/08/some-stupid-story.html' title='Some Stupid Story.'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-3506124611363876974</id><published>2007-08-27T22:53:00.001-07:00</published><updated>2007-08-27T22:59:05.826-07:00</updated><title type='text'>I'm back</title><content type='html'>&lt;p&gt;Ok I know it's been a while since I've posted anything here but I kinda went to Syria then I ended up moving to Columbia, Missouri. I'm still not settled in and stuff is still crazy.... The last month/two months have been really crazy.&lt;/p&gt;

&lt;p&gt;Any way back to whats important. I set up a mySpace page (Shudder!!) and the default look for the profile is kinda dull so I decided to spice it up a little bit using CSS... Well if you've never looked at the source for your myspace profile, Dont! That is some fucked up code. But I decided that I should try and analyze it so I could add some bitchin css to my ultra cool myspace page.&lt;/p&gt;

&lt;p&gt;first off I started to read a little bit of it and try to figure out how it was organized. Every time I'd hit an Id or class tag I would make a note of it in my little TextMate window. Here are the notes:
&lt;quote&gt;
*remember to look for bluetext&lt;br/&gt;
class=tdborder tabled with brders?. type: "td"&lt;br/&gt;
class=orangetext15 Orange headers. type: "span"&lt;br/&gt;
class=btext blacktext?. type: "span"&lt;br/&gt;
class=blacktext10 blacktext. type: "span"&lt;br/&gt;
class=redbtext red text? colored Numbers. type: "span"&lt;br/&gt;
class=navigationBar  The Navigation Bar. type: "table"&lt;br/&gt;
class=navbar The navigation bar elements. type: "a"&lt;br/&gt;
class=profileInfo The profile info box. type: "table"&lt;br/&gt;
id=Table2 The profile info inner table. type: "table"&lt;br/&gt;
class=contactTable The Contact me table. type: "table"&lt;br/&gt;
class=userProfileURL The user profile URL box. type: "table"&lt;br/&gt;
class=userProfileDetail The profile detail box. type: "table"&lt;br/&gt;
class=latestBlogEnrty latest blog ENTRIES. type: "table"&lt;br/&gt;
class=blurbs The blurb box. type: "table"&lt;br/&gt;
class=friendSpace Box with friends pictures. type: "table"&lt;br/&gt;
class=friendsComments friends comments. type: "table"&lt;br/&gt;
class=commentslinks . type: "div"&lt;br/&gt;
&lt;/quote&gt;
So I decided to use those little classes and Ids as a starting point. I wrote a little CSS and pasted it in my About Me box, update, looks kinda like what I wanted. After a couple more tries I finally found out that I can't quite get to the elements that I want to change. A new line of attack was needed&lt;/p&gt;

&lt;p&gt;
I figured that a good re-startign point would be to get the names of all the classes in my myspace profile so I wrote up this nice sweet little script to do the job for me:
&lt;pre&gt;
#!/usr/bin/python

import HTMLParser
import sys

class ClassFinder(HTMLParser.HTMLParser):
    def __init__(self):
 HTMLParser.HTMLParser.__init__(self)
 self.found_classes = {}

    def handle_starttag(self, tag, attrs):
 for name, val in attrs:
     if name == "class":
  if not self.found_classes.has_key(val):
      self.found_classes[val] = [tag]
  elif not tag in self.found_classes[val]:
      self.found_classes[val].append(tag)
    
    def print_findings(self):
 for cls, tags in self.found_classes.iter():
     print cls
     for tag in tags:
  print "\t", tag

if __name__=="__main__":
    cf = ClassFinder()
    cf.feed(sys.stdin.read())
    cf.print_findings()
&lt;/pre&gt;

I dont' event know if it works because I wrote it up at like 12:30am. So I run my profile through it and I get a Pare Error, fuck... I though about using BeautifulSoap to try and solve the problem but I have never used it and I didn't feel like learning a new library so soon before bed&lt;p&gt;

&lt;p&gt;So after all that work a quick google search tuned up a pretty cool copy/paste profile skin... I will defiantly edit it soon but until then I have an anonymous web designer to thank for my Ultra Cool profile page.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-3506124611363876974?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/3506124611363876974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/3506124611363876974'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/08/im-back.html' title='I&apos;m back'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-6070931588457988929</id><published>2007-06-29T20:52:00.000-07:00</published><updated>2007-06-29T20:53:22.821-07:00</updated><title type='text'>Too much work for somethig I dont care about.</title><content type='html'>&lt;p&gt;Ok so today at around 11:30PM I decided to go back to the link tester and write it in python.... Well that ment that I had to write a parser to get the urls. Which also ment that I had to handle relative urls which means I would have to write somthig to parse the value of the href attribute... In other words I have better things to waste my time on tonight&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-6070931588457988929?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/6070931588457988929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/6070931588457988929'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/06/too-much-work-for-somethig-i-dont-care.html' title='Too much work for somethig I dont care about.'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-8348998159983648510</id><published>2007-06-27T21:32:00.000-07:00</published><updated>2007-06-27T21:33:55.151-07:00</updated><title type='text'>Python Link Extractor/tester</title><content type='html'>&lt;p&gt;Ok so I was going to write a python counter part to yesterdays script. It's kind of funny because the difference between Python and Perl are so big that it's hard to write a good counter part in python.&lt;/p&gt;
&lt;p&gt;For starters python doesnt have a HTML::LinkExtor module so I have to write my own link extractor which isn't hard. It's actually kind of easy. But it's also somethig I didn't have to do in perl.&lt;/p&gt;
&lt;p&gt;Another difference is that python has urllib and urllib2 instead of the LWP::* packages. You can get the same results using both packages but the method is a little different.&lt;/p&gt;
&lt;p&gt;Also I cant find a package to guess the correct url from a partial url in python (think URI::Heurostic) so I have to write the whole url on the command line in the python version... Some thing I didn't have to do with perl&lt;/p&gt;
&lt;p&gt;I started writing the python version at about midnight but I stopped after 10 lines of code because I need to decide if I want to write the python version in a way that it emulates the perl version. Or I could write the python version so that the result is the same but it uses the "pythonic" way of doing things.&lt;/p&gt;
&lt;p&gt;If someone is reading this it really sounds like a rant against python. It isn't. I personally like python very much. It's the main language I code in.&lt;/p&gt;
&lt;p&gt; Any way I have to get up early tomorrow so it's time for bed&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-8348998159983648510?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8348998159983648510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8348998159983648510'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/06/python-link-extractortester.html' title='Python Link Extractor/tester'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-247168776902264630</id><published>2007-06-26T20:15:00.000-07:00</published><updated>2007-06-26T20:17:07.370-07:00</updated><title type='text'>A Quick and Dirty Perl Hack</title><content type='html'>&lt;p&gt;Well a while back I read a book to learn perl. I have seen perl code before and I, like very one else, have heard about it. I did the standard programming practices (e.g: Remove blank lines) and wrote a couple of utilities that I used to clean up some data I had. But after that I dropped it for about 4 month. Today I was looking a my copy of the Perl Cookbook and started reading the web stuff chapter. I read a couple of recipes and came up with this:
&lt;pre&gt;
#!/usr/bin/perl -w

use strict;
use LWP::UserAgent;
use HTTP::Response;
use URI::Heuristic;
use HTML::LinkExtor;

my $cmd_url = shift ; 
my $url = URI::Heuristic::uf_urlstr($cmd_url) ;
my $ua = LWP::UserAgent-&gt;new() ;
$ua-&gt;agent("Schmozilla/v9.3 BETA") ;
my $resp = $ua-&gt;get($url, Referer=&gt;"http://www.yellowdog.com") ;
die "Invalid response\n" if $resp-&gt;is_error() ;
my $lp = HTML::LinkExtor-&gt;new(undef, $url) ;
$lp-&gt;parse($resp-&gt;content()) ;
my @links = $lp-&gt;links;
for (@links){
  my($el_type, $attr_name, $attr_val) = @$_ ;
  if($el_type eq 'a' &amp;&amp; $attr_name eq 'href'){
    if($attr_val-&gt;scheme eq "http"){
      #printf "checking %s\n", $attr_val;
      my $agent = LWP::UserAgent-&gt;new(agent=&gt;"Schmozilla/v9.3 BETA");
      my $response = $agent-&gt;get($attr_val, Referer=&gt;$url) ;
      if($response-&gt;is_error()){
 printf "%s is dead\n", $attr_val ;
 print $response-&gt;message, "\n";
      }
    }
  }
}
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;I know. I know. No comment. I didn't even tell you what it does but if you read this blog your probably a smart person and can figure it out by your self...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-247168776902264630?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=247168776902264630' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/247168776902264630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/247168776902264630'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/06/quick-and-dirty-perl-hack.html' title='A Quick and Dirty Perl Hack'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-1026157537285498743</id><published>2007-06-18T19:29:00.001-07:00</published><updated>2007-06-18T19:29:58.053-07:00</updated><title type='text'>Designer</title><content type='html'>&lt;p&gt;QtDesigner + Python + Mac = Some really cool shit&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-1026157537285498743?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=1026157537285498743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/1026157537285498743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/1026157537285498743'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/06/designer.html' title='Designer'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-8064411131840270913</id><published>2007-06-15T20:40:00.000-07:00</published><updated>2007-06-15T20:42:34.166-07:00</updated><title type='text'>Why do we use only RMDBs?!</title><content type='html'>&lt;p&gt;Well It's aas far as the former issue of figuring out how to get Mac and FreeBSD to play nice together I haven't done anything. I think I'm just gonna install BootCamp, create a small partition to boot freeBSD off of and get it over with.&lt;/p&gt;
&lt;p&gt;I had a little debate this week with the people in the Postgresql Novice mailing list. The thing is there are other formats to store data other than the row/column format (ala trees) but there doesnt seem to exist any ACID capable system to manage such formats and I was asking why the situation was so. The Postgres mailing list was the wrong place to bring that up but I still dont have an answer. There are a couple of LDAP implementation for storing tree-like data but thats about it. I understand that alot of other formats can be emulated using RMDBs but why hammer that data to fit the system? Why hasn't any one made a system that fits the data?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-8064411131840270913?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=8064411131840270913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8064411131840270913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8064411131840270913'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/06/why-do-we-use-only-rmdbs.html' title='Why do we use only RMDBs?!'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-8673611086718317823</id><published>2007-06-10T08:55:00.000-07:00</published><updated>2007-06-10T08:56:34.636-07:00</updated><title type='text'>I know why the external wont boot.</title><content type='html'>&lt;p&gt;Ok I figured out why the external USB wouldnt boot. I was playing around with Disk Utility and in order to get the external to boot there is a special partitioning format thats needed. So I plugged in the usb and formatted it in the needed from for it to boot. I poped in the FreeBSD CD (Again) and booted from it. It turns out freebsd doest understand the partition table format the apple uses so I dont know what to do now. I remember Gentoo had something about Mac OS X partitioning so I might check that out, but that was for PPC based macs. I'm pretty sure freebsd has a way to do what I need it to do but I'm kinda getting tired with all the problems I've been having with it lately. I usually like freebsd but the last week it's just been a pain in the ass.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-8673611086718317823?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=8673611086718317823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8673611086718317823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8673611086718317823'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/06/i-know-why-external-wont-boot.html' title='I know why the external wont boot.'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-7229524084850812456</id><published>2007-06-05T20:30:00.000-07:00</published><updated>2007-06-05T20:32:34.006-07:00</updated><title type='text'></title><content type='html'>&lt;p&gt;Ok I have a FreeBSD server at work that I use for testing. I had to update it today and it was the first time I've ever updated a FreeBSD machine.... Let me tell you updating FreeBSD is a MAJOR bitch. On alot of systems it's just a few commands and then merging /etc and stuff like that. For some reason the ports ended up broken. libX11 was messed up and couldn't find "keysym.h" so emacs and vi wont update.... I dont know wy they even require X11 but buy that time I was tired of fighting with it and since jed worked I really didn't care...&lt;/p&gt;
&lt;p&gt;This was a big turn off for me. I still haven't done any thing about booting up my mac from the external drive but I'm now reconsidering using Gentoo instead of freebsd... Updating isn't the only reason I'm thinking about gentoo. The other reason is that I'm finishing reading Beginning Linux Programming and I reached the chapter about device drivers and I want to mess around with that a little bit.... I really like being able o touch the hardware when I program and not being restricted by user space memory tricks and stuff.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-7229524084850812456?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=7229524084850812456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/7229524084850812456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/7229524084850812456'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/06/ok-i-have-freebsd-server-at-work-that-i.html' title=''/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-298139822812117432</id><published>2007-06-03T08:36:00.000-07:00</published><updated>2007-06-03T08:37:20.465-07:00</updated><title type='text'>Continuing the FreeBSD struggle</title><content type='html'>&lt;p&gt;So I got a freebsd 6.2 CD and popped it in tne mac and it booted up all nice and pretty. The installation was a breeze, freebsd saw both the external hard drive and my wireless card, gentoo didnt see my wireless.&lt;/p&gt;
&lt;p&gt; I installed a standard MBR on the external and I figures my Mac would see it and let me boot from there.... It didn't. So now I have and full FreeBSD install that I can't access. I know you can boot up from an external hard drive on a mac so I dont know whats up. I'll try and see if I can fix that today&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-298139822812117432?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=298139822812117432' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/298139822812117432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/298139822812117432'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/06/continuing-freebsd-struggle.html' title='Continuing the FreeBSD struggle'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-8400976544338697749</id><published>2007-05-31T20:31:00.000-07:00</published><updated>2007-05-31T20:36:32.463-07:00</updated><title type='text'>Still trying with freebsd</title><content type='html'>&lt;p&gt; Ok so I figured freebsd should work on my MacBook. Every one that installed freebsd on MacBooks used BootCamp but i really dont want to to install it. &lt;a href="http://en.wikipedia.org/wiki/Boot_Camp"&gt;After reading about it.&lt;/a&gt; I dont think I need it. So I hook up to irc.freenode.net and joined ##freebsd and asked the nice people there what they though. Th only useful piece of information I got was to try with freebsd 6.2 instead of 6.1. So get home and get ready to d/l 6.2 and I remembered that I dont have any blank CD's..... Thank god tomorrow is friday so I can get 6.2 and try to install it on Saturday.&lt;/p&gt;
&lt;p&gt;I'm going to leave the partial gentoo installation alone until I know if 6.2 is going to work or not.&lt;/p&gt;
&lt;p&gt; I also had to go to court today for speeding. I was doing 57 in a 40. The funny thing is that almost every one that this cop caught was doing 57 in a 49 all on the same road. I mean there were like 10 people all magically doing 57 in a 40..... Any way I got a PBJ so I can get cough for a year.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-8400976544338697749?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=8400976544338697749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8400976544338697749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8400976544338697749'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/05/still-trying-with-freebsd.html' title='Still trying with freebsd'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-5469850933079709422</id><published>2007-05-30T21:22:00.000-07:00</published><updated>2007-05-30T21:59:09.719-07:00</updated><title type='text'>*nix and MacBooks</title><content type='html'>&lt;p&gt; I dont remember if I said this already or not but I got a used MacBook. I also have a 120G portable hard drive. What I want to do is a install a *nix on the portable drive and boot up into it whenever I need to.&lt;/p&gt; &lt;p&gt;Me being the big procrastinator that I am started working on this yesterday. First off I tried FreeBSD because Mac OS X is BSD based and I like freebsd. I have a freebsd 6.1 CD so I popped it in and booted up and everything when along just fine until it was time to load the kernel after the main menu.... it froze. So I rebooted and tried the load the kernel with APCI disabled. Didn't work either. The only thing google did was tell me that &lt;a href="http://freebsdgirl.com/2006/06/macbook_pro_freebsd.html"&gt;FreeBSD Girl got it to work&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next up was Slackware. After reading tuxdelux.com &lt;a href="http://tuxdeluxe.org/node/110"&gt;Get Slack&lt;/a&gt; article I've been wanting to give it another try. I have installed slackware in a test server but thats as far as I got because I really didnt have the time/energy to try out something new. Any way so I poped in my old Slackware 10.x CD and booted up but I kept on telling me that my keyboard was jammed and I couldnt get it to respond.&lt;/p&gt;
&lt;p&gt;Last but not least comes gentoo. The first time I tried to install gentoo I had known Linux for about 6 months and my Linux experience was limited to FreeBSD and Ubuntu, both very easy to install. Needless ti say I learn a hell of alot the first time I tried to install gentoo but I'd be damned if I could get it to work. I have since then tried to install it but never got it to work like it's supposed to.&lt;/p&gt;
&lt;p&gt;I figured I'd give gentoo one more try. I have the live CD so I pop it in and it boots up all nice and stuff. It complained when it tried to start X but it was the first *nix to give me a functional boot so I was pretty happy. I have formatted the drive, downloaded and extracted the stage a portage packages and now I need to configure the base system. I have yet to do that. I really want to get freebsd working on it so tomorrow I'm gonna go on to IRC and see of any of the hard core freebsd people got freebsd to work on there macbooks. If not I'll finish the gentoo installation and hopefully this time it will work.&lt;/p&gt;
&lt;p&gt;Talking about IRC I was chatting on the #python channel today on freenode.net and I was called crazy. I mean how bad do you have to be to be called crazy on fucking IRC... and the worst part os that although I kinda know why they called me crazy I feel that it was completely uncalled for..... Also note that they is only one person and another person who agreed with the first person&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-5469850933079709422?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=5469850933079709422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/5469850933079709422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/5469850933079709422'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/05/nix-and-macbooks.html' title='*nix and MacBooks'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-5646941389602663180</id><published>2007-05-25T16:19:00.000-07:00</published><updated>2007-05-25T16:50:50.930-07:00</updated><title type='text'>The Scoop</title><content type='html'>&lt;p&gt;Well since every one likes seeing what other people are doing with there personal lives (aka Mrs. Gossip), and because nothing else has happened lately, for your entertainment I present to you what I have been doing for last couple of weeks&lt;/p&gt;

&lt;p&gt;First off I'll start off with a little background: I've wanted to move out of my parents house for the longest time. When I finished high school in Syria I was told that I could come to the states and go to college here if I wanted to. In other words I could move out, so I took the offer. Of course I didn't tell my parents that I came here to get away from them, I told them that I wanted to go to the states to get a good eduminication. Lying is bad.&lt;/p&gt;

&lt;p&gt;So I came to the states and I'm living w/ my grandmother which isn't to bad because she really doesn't care what I do as long as I manage to get home before she wakes up the next day.&lt;/p&gt;

&lt;p&gt; I'm also going to college. I'm at a little community college and i took all the classes I need to graduate except for C, ComSci 1 and 2. The thing is I already know all that stuff so it's time for me to graduate and move on to a 4 year university&lt;/p&gt;

&lt;p&gt;I've also been working as a programmer which makes me enough money to pay for every thing, including school, because community college is cheap, but it doesn't pay enough for me to go to a 4 year school. My parents have offered to help pay for my school but I'm not gonna take any of there money.&lt;/p&gt;

&lt;p&gt;Here is the problem. What I'm gonna do is I'm gonna work full time and go to school part time so I can pay for my own school. My parents are pissed because they want me to go to school full time and they don't understand why I wont take there money. The reason I wont take there money is because I want them to leave me alone but I can't tell them that or else they'll be very hurt.&lt;/p&gt;

&lt;p&gt;So now I'm in all kinds of shit.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-5646941389602663180?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=5646941389602663180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/5646941389602663180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/5646941389602663180'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/05/scoop.html' title='The Scoop'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-8243920780691002477</id><published>2007-05-21T19:49:00.000-07:00</published><updated>2007-05-21T19:52:04.748-07:00</updated><title type='text'>Also did nothing</title><content type='html'>&lt;p&gt;Today was just an extension of yesterday. Did nothing. Wrote maybe five lines of code after I came home. Got the latest Wired and started reading it. Just sat around and did nothing&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-8243920780691002477?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=8243920780691002477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8243920780691002477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/8243920780691002477'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/05/also-did-nothing.html' title='Also did nothing'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-9047572710998701084</id><published>2007-05-20T12:19:00.000-07:00</published><updated>2007-05-20T12:31:06.227-07:00</updated><title type='text'>prescreening test</title><content type='html'>&lt;p&gt;Well I'm looking for a job somewhere computer related so I have been working on that. I applied for this job and they sent me an automatic pre-screening test that I have to take in C. I know C very well but I haven't touched it in about two years. I remember the syntax and all that good stuff but I have forgotten alot of the std(io|lib) calls so I was going to practice/refresh my memory yesterday but I didn't. I got my eyebrow pierced instead ;-). I might post a picture of it later.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-9047572710998701084?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=9047572710998701084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/9047572710998701084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/9047572710998701084'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/05/prescreening-test.html' title='prescreening test'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-3027473251177238431</id><published>2007-05-17T07:43:00.000-07:00</published><updated>2007-05-17T07:55:32.954-07:00</updated><title type='text'>Fixing last night's code</title><content type='html'>&lt;p&gt; The code in my last post is incorrect and won't work. I wrote it at 1:00am last night from memory :P. the correct code is:&lt;/p&gt;
&lt;pre&gt;{(%stdin) (r) file 256 string readline exch print (\n) print not {exit} if}bind loop&lt;/pre&gt;
&lt;p&gt;To explain how it works:
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;(%stdin) (r) file&lt;/i&gt;: Opens the standard input for reading and puts it on the stack&lt;/li&gt;
&lt;li&gt;&lt;i&gt;256 string&lt;/i&gt;: Create a string buffer 256 chars long and puts it one the stack to&lt;/li&gt;
&lt;li&gt;&lt;i&gt;readline&lt;/i&gt;: Reads a line of input from the file into the buffer (both are on the stack) and put a string and a boolean on the stack&lt;/li&gt;
&lt;li&gt;&lt;i&gt;exch&lt;/i&gt;: stack it now Bool String&lt;/li&gt;
&lt;li&gt;&lt;i&gt;print (\n) print&lt;/i&gt;: Print the string and add a newline. Stack is Bool. String got poped&lt;/li&gt;
&lt;li&gt;&lt;i&gt;not&lt;/i&gt;: readline buts false if it reaches the EOF&lt;/li&gt;
&lt;li&gt;&lt;i&gt;{exit} if&lt;/i&gt;: If we did hot the EOF than exit&lt;/li&gt;
&lt;li&gt;&lt;i&gt;loop&lt;/i&gt;: Loop until we exit&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-3027473251177238431?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=3027473251177238431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/3027473251177238431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/3027473251177238431'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/05/code-in-my-last-post-is-incorrect-and.html' title='Fixing last night&apos;s code'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4544349702756476498.post-5715663028864256429</id><published>2007-05-16T21:13:00.000-07:00</published><updated>2007-05-16T21:33:32.182-07:00</updated><title type='text'>Back To Blogging</title><content type='html'>&lt;p&gt;I used to have a blog that I updated once a month. I deleted it. I just started spring break and got a new (used) MacBook so I figured I'd give blogging another try. Any way I am a college student that likes to code. I'm trying to learn PostScript (Yes it's a programming language) so here is a one line echo program in postscript.&lt;/p&gt;
&lt;pre&gt;
{(%stdin) (r) file readline exch print {exit} if}loop
&lt;/pre&gt;

&lt;p&gt;I just made that code up so it probably has a typo or something. I have a working version at the office so I'll edit this post tomorrow. It is also inefficient because it reopens stdin for every loop. The reason I like it is because all the data is on the stack. I wouldn't recommend using it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4544349702756476498-5715663028864256429?l=blog.circuitsofimagination.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4544349702756476498&amp;postID=5715663028864256429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/5715663028864256429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4544349702756476498/posts/default/5715663028864256429'/><link rel='alternate' type='text/html' href='http://blog.circuitsofimagination.com/2007/05/back-to-blogging.html' title='Back To Blogging'/><author><name>Tantalum</name><uri>http://www.blogger.com/profile/00061087682802243705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='24' src='http://3.bp.blogspot.com/_XAo3qdmF6TE/S-LvJ7aviJI/AAAAAAAAACw/WbKpfUXM7Wc/S220/TrippyTreeUp.jpg'/></author><thr:total>0</thr:total></entry></feed>
