<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Aquabu</title>
  <id>http://127.0.0.1</id>
  <updated>2007-08-28T00:00:00Z</updated>
  <author>
    <name>Noah Thorp</name>
  </author>
  <entry>
    <title>Again World, Hello</title>
    <link href="http://127.0.0.1/2012/02/18/again-world-hello/" rel="alternate"/>
    <id>http://127.0.0.1/2012/02/18/again-world-hello/</id>
    <published>2012-02-18T00:00:00Z</published>
    <updated>2012-02-18T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;Time to change blog engines. I have decided to streamline my thought flow by publishing my blog using markdown, git version control, etc. So, I&amp;rsquo;m moving my blog to Toto which is friendly to this workflow. It also will be simple to customize and it deploys to Heroku. Hopefully the simplicity of this approach will free me up to post more of my thoughts&amp;hellip;&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;Time to change blog engines. I have decided to streamline my thought flow by publishing my blog using markdown, git version control, etc. So, I&amp;rsquo;m moving my blog to Toto which is friendly to this workflow. It also will be simple to customize and it deploys to Heroku. Hopefully the simplicity of this approach will free me up to post more of my thoughts.&lt;/p&gt;

&lt;p&gt;To clarify what I mean by simple, the workflow is this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;write in vim&lt;/li&gt;
&lt;li&gt;preview locally&lt;/li&gt;
&lt;li&gt;push via git to Heroku&lt;/li&gt;
&lt;li&gt;hack a few pages for twitter feeds or style tweaks only&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The complexity I am avoiding is actually caused by the undesired &amp;lsquo;helpfulness&amp;rsquo; of other systems. I will however have to expend some effort to port some old posts from Textile to Markdown.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Notes From Intro To Cooperation Theory With Howard Reingold</title>
    <link href="http://127.0.0.1/2011/05/21/notes-from-intro-to-cooperation-theory/" rel="alternate"/>
    <id>http://127.0.0.1/2011/05/21/notes-from-intro-to-cooperation-theory/</id>
    <published>2011-05-21T00:00:00Z</published>
    <updated>2011-05-21T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;These are my &lt;em&gt;very rough unedited notes&lt;/em&gt; for the Cooperation Theory collaborative learning session at &lt;a href="http://www.rheingold.com/university"&gt;Howard Reingold University&lt;/a&gt;. The session was hosted by Howard Reingold (author of Smart Mobs) as part of his mindamp series. Howard may do a full length cooperation theory course in the summer&amp;#8230; that would be exciting!&lt;/p&gt;

</summary>
    <content type="html">&lt;p&gt;These are my &lt;em&gt;very rough unedited notes&lt;/em&gt; for the Cooperation Theory collaborative learning session at &lt;a href="http://www.rheingold.com/university"&gt;Howard Reingold University&lt;/a&gt;. The session was hosted by Howard Reingold (author of Smart Mobs) as part of his mindamp series. Howard may do a full length cooperation theory course in the summer&amp;#8230; that would be exciting!&lt;/p&gt;


&lt;h2&gt;Social Action&lt;/h2&gt;


&lt;p&gt;People looking down at their phones in Japan long before us&amp;#8230; it got Howard thinking. &lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;In the Philipines people texted to organize demonstration to bring down Joseph Lastrada. &lt;/li&gt;
&lt;li&gt;Collective action is not always a pretty thing&amp;#8230; riots in africa etc. People who share a grievance can organize quickly &amp;#8211; non-violent or violent. &lt;/li&gt;
&lt;li&gt;Election in Korea (see oh my news). &lt;/li&gt;
&lt;li&gt;Madrid, dozen copies of a photo in email sent to Howard many times. Bombings in the railroads blamed on basque separatists. Social tech enabled organization tipped the election.&lt;/li&gt;
&lt;li&gt;20,000 highschool students organize anti-immigration deportation rally in LA over myspace.&lt;/li&gt;
&lt;li&gt;Chilean society. Penguin revolution, 15-18 year old students. Photoblogs and youtube. 700,000 people. changed the dialog about education.&lt;/li&gt;
&lt;li&gt;&lt;span class="caps"&gt;SMS&lt;/span&gt; organized protests against Denmark in Syria and Egypt, around the mohamad cartoons.&lt;/li&gt;
&lt;li&gt;Moldova, violent action. Social media and mobile phones.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Open Source&lt;/h2&gt;


&lt;ul&gt;
&lt;li&gt;Not organized by companies&lt;/li&gt;
&lt;li&gt;People who didn&amp;#8217;t know eachother&lt;/li&gt;
&lt;li&gt;Not working for money&lt;/li&gt;
&lt;li&gt;Make technology that challenges software companies&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Market Places&lt;/h2&gt;


&lt;ul&gt;
&lt;li&gt;Ebay provides a little info that creates enough trust to overcome prisoner&amp;#8217;s dilemna (which should not happen theoretically).&lt;/li&gt;
&lt;li&gt;Think cycle&amp;#8230; idea marketplace for design students. Huge success in designing colera dehydration unit.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Swarm computing collectives.&lt;/h2&gt;


&lt;ul&gt;
&lt;li&gt;Seti at home. Screen saver loads, then processes outerspace data. For a while this was the most powerful super computer.&lt;/li&gt;
&lt;li&gt;Folding @ Home does something similar for cancer analysis. It&amp;#8217;s an intractible problem, but can tackle the same way by aggregating computing power. (Distributed.net)&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Disaster Response&lt;/h2&gt;


&lt;ul&gt;
&lt;li&gt;South east asian blog after tsunami&lt;/li&gt;
&lt;li&gt;Same after katrina&lt;/li&gt;
&lt;li&gt;Now first responders are all over the world&lt;/li&gt;
&lt;li&gt;Jim Gray, searched for him after he disapeared. 12,000 images gone through by mechanical turk. He was never found but this was organized in 24 hours. &lt;/li&gt;
&lt;li&gt;1/4 million dollars raised for drinking water over twitter&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Origins&lt;/h2&gt;


&lt;ul&gt;
&lt;li&gt;Success of colaborative hunting of mastadons, lead to human adaptions for collaboration.&lt;/li&gt;
&lt;li&gt;Large scale aggriculture instigated large human settlements, and writing for accounting&lt;/li&gt;
&lt;li&gt;Guttenberg was an entrepeneur &amp;#8211; had amassed lots of metal. Not much known but had law suites with creditors. The printing press allowed Luther&amp;#8217;s writings to be read at home.&lt;/li&gt;
&lt;li&gt;Science relied on genius&amp;#8217;s coming along but aggregation of observations allows a new kind of collective knowledge to emerge.&lt;/li&gt;
&lt;li&gt;Cycles of information overload inspire reactions to them.&lt;/li&gt;
&lt;li&gt;Revolutions in europe were literate revolutions. The federalist papers were letters to news papers.&lt;/li&gt;
&lt;li&gt;Literate populations were enabled by these technologies to do things they were not able to do before&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Social Dilemmas: 3 Mythic narratives&lt;/h2&gt;


&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Prisoners&amp;#8217;s dilemma. Simplified into a grid. Matrix of permutations for 2 priorities betraying or not betraying the other. Another interesting one called the ultimatum game. It also turn&amp;#8217;s out that sense of fairness (50 / 50 split) is cultural!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The tragedy of the commons. Many desserts were overgrazed grass lands. Elanor Ostrom studied a lot of water sharing arrangements and found that there were a small but regular proportion of people who were able to sustain their use of resources. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Public goods. Elanor Ostrom Found 8 design principles that are needed for success. She said institutions for collective action can define their way out of the prisoners dilemma. She won the nobel prize in economics last year. Matrix of Rivalrous, Non-Rivelrous (these are about finite goods); with Excludable, Non-Excludable (these are about access).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Biology originally did not see cooperation as being a large part of evolution. But this has been changing.&lt;br /&gt;
Altruistic punishment may be the glue that holds societies together.&lt;/p&gt;


&lt;p&gt;Technologies of Cooperation &amp;amp; Sharing Economies: &lt;a href="Cooperationcommons.com"&gt;The cooperation Project&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;Chat Notes&lt;/h2&gt;


&lt;ul&gt;
&lt;li&gt;Couchsurfing.com takes advantage of axelrod&amp;#8217;s 3 necessary conditions.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Cave_of_Forgotten_Dreams"&gt;Herzog cave of forgotten dreams interesting&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Collaborative Learning&lt;/h2&gt;


&lt;p&gt;Gregor McNish: Boardgamegeek.com. Simple dynamics that lead to rich game play. Lots of clubs in many cities where people gather for these. &lt;br /&gt;
Howard: what games are interesting (knows about public goods and prisoner&amp;#8217;s dilemna)&lt;br /&gt;
Subzombie: Dixit was really fun and involved very cool rules&lt;br /&gt;
Vahid: in video games, there&amp;#8217;s a trend of games that enfasize cooperation more and more&lt;/p&gt;


&lt;p&gt;What about markets for ideas? Ideagoras. Was talking about inocentive. There was a gold company that had lots of mines and geologic data that was going out of business. They published their data and asked where should they drill&amp;#8230; they received answers that allowed them to collect much more gold. &lt;span class="caps"&gt;IBM&lt;/span&gt; made a patent commons that made their patents available as long as others published their improvements to these patents&amp;#8230; this is very much the open source model.&lt;/p&gt;


&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=NgYE75gkzkM&amp;feature=youtu.be"&gt;Yochai Benkler &amp;#8211; Open Source economics&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Is collective action more socialist or anarchistic in nature? Howard: It&amp;#8217;s not socialalism. Socialism is centralized and coerced. Collective action is distributed but it is not without hierarchy although it devolves to individual decision makeing. It is not coerced. &lt;/p&gt;


&lt;p&gt;Why do open source software developers contribute. Their motivations in order have been collected as:&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;Learning&lt;/li&gt;
&lt;li&gt;Developing a reputation (that can be converted to money)&lt;/li&gt;
&lt;li&gt;Working towards an altruistic aim&lt;/li&gt;
&lt;li&gt;Sticking it to microsoft&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Steven weber wrote the success of open source. Cooperationcommons.com gives a good 1 page summary of this. &lt;/p&gt;


&lt;p&gt;&lt;a href="http://piratepad.net/mindamp3-may20"&gt;Addtional link notes by participants here&lt;/a&gt;&lt;/p&gt;

</content>
  </entry>
  <entry>
    <title>My Rubyconf 2009 Audio Talk Posted on Confreaks</title>
    <link href="http://127.0.0.1/2010/02/18/my-rubyconf-2009-audio-talk-posted-on-confreaks/" rel="alternate"/>
    <id>http://127.0.0.1/2010/02/18/my-rubyconf-2009-audio-talk-posted-on-confreaks/</id>
    <published>2010-02-18T00:00:00Z</published>
    <updated>2010-02-18T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;&lt;a href="http://confreaks.net/videos/189-rubyconf2009-making-music-with-ruby-patterns-context-fun"&gt;My talk at Rubyconf 2009 on using Ruby for audio projects was posted&lt;/a&gt; I focus on frequently unfamiliar open source libs that people may find useful and make reference to a number of BArCMuT presenter&amp;#8217;s projects. There&amp;#8217;s a lot of talk about using Ruby and Chuck, SuperCollider, solving sync issues, etc, etc. You can find the source code for the presentations on &lt;a href="http://github.com/aquabu"&gt;github here&lt;/a&gt;&lt;/p&gt;

</summary>
    <content type="html">&lt;p&gt;&lt;a href="http://confreaks.net/videos/189-rubyconf2009-making-music-with-ruby-patterns-context-fun"&gt;My talk at Rubyconf 2009 on using Ruby for audio projects was posted&lt;/a&gt; I focus on frequently unfamiliar open source libs that people may find useful and make reference to a number of BArCMuT presenter&amp;#8217;s projects. There&amp;#8217;s a lot of talk about using Ruby and Chuck, SuperCollider, solving sync issues, etc, etc. You can find the source code for the presentations on &lt;a href="http://github.com/aquabu"&gt;github here&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;One major Ruby discovery since then is that Charles Nutter (a primary author of jRuby) has a version of Ruby that uses static typing, runs on the &lt;span class="caps"&gt;JVM&lt;/span&gt;, and runs at the speed of Java! It&amp;#8217;s called duby and it&amp;#8217;s available &lt;a href="http://github.com/headius/duby"&gt;here&lt;/a&gt;&lt;/p&gt;

</content>
  </entry>
  <entry>
    <title>BArCMuT Co-Organization Constitution</title>
    <link href="http://127.0.0.1/2010/01/24/barcmut-co-organization-constitution/" rel="alternate"/>
    <id>http://127.0.0.1/2010/01/24/barcmut-co-organization-constitution/</id>
    <published>2010-01-24T00:00:00Z</published>
    <updated>2010-01-24T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;Over the last year I have been contemplating how to further democratize the Bay Area Computer Music Technology group ( &lt;a href="http://www.barcmut.org"&gt;BArCMuT&lt;/a&gt; ) for more co-organization and stronger collaborative relationships, while maintaining a high quality of events. On my way back from &lt;span class="caps"&gt;&lt;span class="caps"&gt;NAMM&lt;/span&gt;&lt;/span&gt; this idea for writing a constitution for BArCMuT bubbled up. The only receptacle for the idea on South West was this slightly waxy emergency bag.&lt;/p&gt;

</summary>
    <content type="html">&lt;p&gt;Over the last year I have been contemplating how to further democratize the Bay Area Computer Music Technology group ( &lt;a href="http://www.barcmut.org"&gt;BArCMuT&lt;/a&gt; ) for more co-organization and stronger collaborative relationships, while maintaining a high quality of events. On my way back from &lt;span class="caps"&gt;&lt;span class="caps"&gt;NAMM&lt;/span&gt;&lt;/span&gt; this idea for writing a constitution for BArCMuT bubbled up. The only receptacle for the idea on South West was this slightly waxy emergency bag.&lt;/p&gt;


&lt;p&gt;&lt;img src="/images/IMG_0112.jpg" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;Since then I have refined the constitutions guidelines and listed them below. If you need to skim this article just skip to the &#8220;BArCMuT Constitution&#8221; section. Before I get to the guidelines, I would like to share some background on how I arrived at the new form for BArCMuT&#8230;&lt;/p&gt;


&lt;h2&gt;Some Background On BArCMuT&#8217;s Inspiration&lt;/h2&gt;


&lt;p&gt;In 2003 I attended a Dorkbot event in which Tim Thompson presented Key Kit game controller hacks and Dr. Friendly presented a crazy wavelet feedback algorithm. My friend &lt;a href="http://www.rhiz.eu/person-475-en.html"&gt;Zu&lt;/a&gt; who is an entertainment magazine editor in Poland asked me what I thought the coolest thing in San Francisco was and I told her about Dorkbot. I meant it.&lt;/p&gt;


&lt;p&gt;Then, in early 07 at the SF Ruby Meetup I had my mind blown by awesome technical talks by Chris Wanstrath (now Github co-founder) and others. These events made me wonder &#8220;why doesn&#8217;t a group like this exist specifically for the computer music community?&#8221;.&lt;/p&gt;


&lt;p&gt;I had recently quit my job at Digidesign thinking that I was going to develop this weird ontological DJ remixing algorithm while I contracted. I was constantly looking for the right technology to build it in. My max patches had gotten un-managable with 100  sub-patches and lots of logic that was more suited to procedural programming. Java audio sucked. Chuck &#8211; what was that? Csound was cumbersome. I was unsure about the Supercollider licensing. Ruby had no audio libraries. Python was a little better supported but less familiar. I wanted to hear people tell me about this stuff first hand.&lt;/p&gt;


&lt;p&gt;I started the Bay Area Computer Music Technology Group in the fall of 2007. On the first night, the event magically came together as community leaders like Tim Thompson, Ge Wang, Vlad Spears, Scot Gresham Lancaster, and David Wessel decended on the Space Gallery in the Tenderloin of San Francisco. Nobody seemed to care about the street noise as we watched Ge&#8217;s chuck demo while sitting on church pews next to a recently assembled indoor skateboarding ramp.&lt;/p&gt;


&lt;p&gt;The group took off after that night. Now there are over 500 members and we have had over 35 succesful events all over the Bay Area (Stanford &lt;span class="caps"&gt;&lt;span class="caps"&gt;CCRMA&lt;/span&gt;&lt;/span&gt;, Berkeley &lt;span class="caps"&gt;&lt;span class="caps"&gt;CNMAT&lt;/span&gt;&lt;/span&gt;, Mills College, Digidesign, Dolby, Maker Faire, &lt;span class="caps"&gt;&lt;span class="caps"&gt;GAAFTA&lt;/span&gt;&lt;/span&gt; etc). The presenters have been world class awesome and many of the members could just as easily be presenting or audiencing. I typically have to warn presenters that they will need to answer some very difficult questions from the expert tribunal refered to as the &#8220;audience&#8221;. Lots of people have told me how they acquired a job, met collaborators, changed product specs, or began an academic path at a BArCMuT event. This makes me happy and excited.&lt;/p&gt;


&lt;p&gt;Fast forward to 2010. The community has gained a lot of great momentum with other groups like Phasor, Overlap.org, Learn Tech, Share San Jose, PyGame, and others. We&#8217;ve all been influencing eachother a lot and starting new projects. At an event at &lt;span class="caps"&gt;&lt;span class="caps"&gt;CCRMA&lt;/span&gt;&lt;/span&gt;, Tim Thompson said how BArCMuT had been one of his inspirations for starting the Share San Jose group. This was both nice and funny because I had actually been inspired by his talk at Dorkbot to create BArCMuT in the first place. I think this illustrates how a cool community can inspire itself.&lt;/p&gt;


&lt;p&gt;Despite the fact that our community really is a headless web, BArCMuT has formed as a benevolent dictatorship. In 2010 I would really like that to change. To do that I am symbolically stepping down as benevolent dictator and setting up a structure for co-organizing the group (aka the constitution). In fact, it&#8217;s weird to even think of the group as just being &#8220;BArCMuT members&#8221;. BArCMuT is actually just a tool for the community to organize itself, and I would like to re-org BArCMuT to reflect this.&lt;/p&gt;


&lt;h2&gt;What&#8217;s In It For Me&lt;/h2&gt;


&lt;p&gt;Part of cooperation is understanding why the people you are cooperating with are doing what they do.&lt;/p&gt;


&lt;p&gt;At the bottom of my South West emergency bag BArCMuT constitution, there&#8217;s a section titled &#8220;WIIFM&#8221; (an abbreviation for &#8220;What&#8217;s in it for me&#8221;?). At the risk of being overly explicit, let me share why I organize BArCMuT:&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;I want to participate in a community that I help to create&lt;/li&gt;
&lt;li&gt;I want to meet cool collaborators and make cool s@&amp;amp;#%! &lt;/li&gt;
&lt;li&gt;I want to know about awesome new electronic art technology, libraries, and techniques&lt;/li&gt;
&lt;li&gt;I want you to think that I am cool and well organized and include me in cool projects&lt;/li&gt;
&lt;li&gt;I want you to return my phone calls and emails&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Conspicuously missing is any sort of profit motive. BArCMuT is an Open Source inspired organization, vis a vis Eric S. Raymond. The way I see it, collaboration creates value through network effects rather than through hording.&lt;/p&gt;


&lt;p&gt;To get semi-technical, personal sub-optimization (greed) in a commons reduces the benefit of the commons as a whole and ultimately limits its abilities to benefit community members thus trashing the commons. For the mildly cynical or economics obsessed, building a commons can be thought of as &#8220;enlightened self interest&#8221;. But really, this technical framing doesn&#8217;t capture the spirit of why I built BArCMuT. For those who follow their heart, this approach can be described as just feeling good and creating community.&lt;/p&gt;


&lt;h2&gt;Envisioning The Computer Music Commons&lt;/h2&gt;


&lt;p&gt;To further the goals that I listed and I believe that many community members share, I want to reform BArCMuT as a durable commons for the computer music community. My strategy from the beginning has been to remove any frictions to having a neutral commons &#8211; such as such as pursuing direct monetary gain or gratuitous advertising. Now that BArCMuT exists as a community asset, the next step in reducing friction on the commons is to change the structure of BArCMuT from a tree to a graph.&lt;/p&gt;


&lt;p&gt;Part of the strategy for limiting the politics that can exist within a group, is to limit the scope of what BArCMuT does. I hope to reduce politics by: not having a shared treasury, only allowing free events, and limiting the scope to events relevant to learning about or creating electronic arts (e.g. no concert audience promotion). BArCMuT definitely should support the excellent commercial work that is being done within our community ecosystem, but as a commons it should be clearly differentiated from these ventures.&lt;/p&gt;


&lt;h2&gt;The BArCMuT Constitution&lt;/h2&gt;


&lt;p&gt;Every group needs some guidelines &#8211; the more lightweight the better. Here&#8217;s my first attempt at codifying a group constitution for a co-organized BArCMuT. Please post your feedback.&lt;/p&gt;


&lt;p&gt;Goals of the constitution:
&lt;ul&gt;
&lt;li&gt;Create a durable commons that is not reliant on a single member (i.e. not a benevolent dictatorship run by me)&lt;/li&gt;
&lt;li&gt;Further enable the Bay Area computer music community to stay informed about technical talks, hack sessions, and community events&lt;/li&gt;
&lt;li&gt;Create a neutral commons for members to find collaborators, employment, teachers, and students&lt;/li&gt;
&lt;li&gt;Filter events to maintain a high level of quality&lt;/li&gt;&lt;/p&gt;


&lt;p&gt;&lt;/ul&gt;&lt;/p&gt;

&lt;p&gt;Participants:
&lt;ul&gt;
&lt;li&gt;There are four general participant types: co-organizers, hosts, presenters, and attendees &lt;/li&gt;
&lt;li&gt;Initial co-organizers will be invited by me&lt;/li&gt;
&lt;li&gt;Additional co-organizers can be added or removed by an 80% group vote (I could use some additional advice on the official decision making process).&lt;/li&gt;
&lt;li&gt;Co-organizers can schedule official BArCMuT events if they fit the guidelines. An official BArCMuT event is one that sends RSVPs and is listed on the main page of &lt;a href="http://www.barcmut.org"&gt;barcmut.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Co-organizers, hosts, and presenters are encouraged to list their logo on the barcmut home page&lt;/li&gt;&lt;/p&gt;


&lt;p&gt;&lt;/ul&gt;&lt;/p&gt;

&lt;p&gt;BArCMuT event guidelines:
&lt;ul&gt;
&lt;li&gt;events must include a technical talk about electronic art technology&lt;/li&gt;
&lt;li&gt;events must be free to members&lt;/li&gt;
&lt;li&gt;events must be in the Bay Area&lt;/li&gt;
&lt;li&gt;hosts, presenters, and co-organizers are encouraged to mention upcoming electronic art events (free or not), job positions, and products. Although community relevant promoting is encouraged as a vital part of the ecosystem, this should not dominate the event.&lt;/li&gt;
&lt;li&gt;co-organizers can list events (even if they are not official BArCMuT events) in the BArCMuT calendar. It would be great if we could announce all upcoming events listed in the calendar at official BArCMuT events.&lt;/li&gt;
&lt;li&gt;there will be no shared treasury or treasurer for BArCMuT&lt;/li&gt;
&lt;li&gt;venues, presentations, and co-organization are offered for free &lt;/li&gt;
&lt;li&gt;expenses will be payed by co-organizers or by donation (e.g. for security gaurds, snacks, etc.)&lt;/li&gt;&lt;/p&gt;


&lt;p&gt;&lt;/ul&gt;&lt;/p&gt;

&lt;p&gt;I am inviting trusted community members who I have organized events with in the past to be BArCMuT co-organizers. These co-organizers can schedule events that fit the BArCMuT guidelines. These include:
&lt;ul&gt;
&lt;li&gt;Ge Wang (&lt;span class="caps"&gt;CCRMA&lt;/span&gt;, Smule)&lt;/li&gt;
&lt;li&gt;Sasha Leitman, Linnea Williams, Carr Wilkerson (&lt;span class="caps"&gt;CCRMA&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;Tim Thompson (Share San Jose, Visual Music Meetup, ZeroOne)&lt;/li&gt;
&lt;li&gt;David Wessel, Adrian Freed, Andy Schmeder (&lt;span class="caps"&gt;CNMAT&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;Barry Threw (&lt;span class="caps"&gt;GAFFTA&lt;/span&gt;, Overlap.org, etc.)&lt;/li&gt;
&lt;li&gt;Vlad Spears (Phasor, Overlap.org)&lt;/li&gt;
&lt;li&gt;Harry Tormey (PyGame, Digidesign)&lt;/li&gt;
&lt;li&gt;Chris Brown (Mills)&lt;/li&gt;
&lt;li&gt;Scot Gresham-Lancaster (Cogswell, The Hub)&lt;/li&gt;
&lt;li&gt;Rich &amp;amp; Moldover (Learntech, LoveTech)&lt;/li&gt;
&lt;li&gt;If you are not on the list and you think you should be let me know&lt;/li&gt;&lt;/p&gt;


&lt;p&gt;&lt;/ul&gt;&lt;/p&gt;

&lt;p&gt;A note about scheduling. If there are too many events (e.g &amp;gt; 4 per month) we may need to thin things out. One strategy would be to to list events that repeat frequently once as official BArCMuT &lt;span class="caps"&gt;&lt;span class="caps"&gt;RSVP&lt;/span&gt;&lt;/span&gt; events and then list them in the non &lt;span class="caps"&gt;&lt;span class="caps"&gt;RSVP&lt;/span&gt;&lt;/span&gt; calendar to be announced at other events.&lt;/p&gt;


&lt;h2&gt;Conclusion&lt;/h2&gt;


&lt;p&gt;In conclusion, I am excited about being part of more great events this year as a &lt;strong&gt;co-organizer&lt;/strong&gt;. My plan is to work towards a durable commons through transparency and establishing light weight and usable guidelines. If I am doing something that seems to work against this plan, please tell me. I&#8217;m not perfect and I would appreciate the feedback.&lt;/p&gt;


&lt;p&gt;Even before this article has been completed I have had some great conversations with other organizers about creating this commons. 2010 is going to be a great year for community!&lt;/p&gt;

</content>
  </entry>
  <entry>
    <title>jQuery Wherefore Doth Thy Includes Go?</title>
    <link href="http://127.0.0.1/2009/07/21/jquery-wherefore-doth-thy-includes-go/" rel="alternate"/>
    <id>http://127.0.0.1/2009/07/21/jquery-wherefore-doth-thy-includes-go/</id>
    <published>2009-07-21T00:00:00Z</published>
    <updated>2009-07-21T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;h2&gt;Whither Javascript&lt;/h2&gt;


&lt;p&gt;Recently I have been working on a Rails project with lots of Javascript include complexity ( &lt;a href="http://www.ashburymusichall.com"&gt;Ashbury Music Hall&lt;/a&gt; ). Here&amp;#8217;s the challenge:&lt;/p&gt;

</summary>
    <content type="html">&lt;h2&gt;Whither Javascript&lt;/h2&gt;


&lt;p&gt;Recently I have been working on a Rails project with lots of Javascript include complexity ( &lt;a href="http://www.ashburymusichall.com"&gt;Ashbury Music Hall&lt;/a&gt; ). Here&amp;#8217;s the challenge:&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;Some larger libraries and plugins only need to appear on single pages (e.g. Thickbox, FCKEditor).&lt;/li&gt;
&lt;li&gt;Some Ajax page renders depend on core libraries (e.g. jQuery) but shouldn&amp;#8217;t be loaded more than once by layouts and partials&lt;/li&gt;
&lt;li&gt;When Ajax page renders degrade to linked pages they may be in alternate layouts and include different Javascript libraries or have different load orders&lt;/li&gt;
&lt;li&gt;Rails partials load &lt;strong&gt;before&lt;/strong&gt; layouts and potentially include Javascript files specified in them before core libraries&lt;/li&gt;
&lt;li&gt;Page and partial specific Javascript (e.g. myview/my_page.js ) presents even more complexity&lt;/li&gt;
&lt;li&gt;Pages appear to load faster if Javascript is loaded on the bottom of the page&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Oh what a tangled web we weave.&lt;/p&gt;


&lt;h2&gt;Thither&lt;/h2&gt;


&lt;p&gt;The solution I arrived at is to specify sectional order of libraries, accumulate them, deduplicate them, and include them at the end of the page request. This allows definition of core libraries at the top of a layout page for all partials and inclusion of librararies in plugins on any view or partial without duplicate loading or core library omissions.  To do this I defined two Application Helpers as follows:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;# Use accumulate_js to accumulate javascript paths throughout the application
# it deduplicates them and then they should be included by calling include_accumulated_js
# at the foot of the page.
def accumulate_js(key, path)
  @javascript_list ||= {} 
  @javascript_list[key] ||= []      

  if path.class == Array || path.class == String
    @javascript_list[key].&amp;lt;&amp;lt;(path)
    @javascript_list[key].flatten! # for some reason   was not working properly for arrays
    @javascript_list[key].uniq!
  else 
    raise ArgumentError
  end
  @javascript_list
end

# call accumulate_js first to use the default @javscript_list instance var
def include_accumulated_js(order_array, path_hash = @javascript_list)
  result = ""

  order_array.each do |key|
    next unless path_hash[key]
    result  = path_hash[key].inject("") do |result, path|
      result  = javascript_include_tag(path)
    end
  end
  result
end&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Then wherever Javascript is called for a request (layout, view, or partial) the names of the libraries are accumulated:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;accumulate_js(:core, ["jquery-1.3.2.min.js", "jquery-ui-1.7.1.custom.min.js"])
accumulate_js(:plugins, "beautytips/jquery.bt.min.js")
accumulate_js(:application, "application")&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;All load path strings from the public/javascripts directories are specified. The library order is maintained but additional loads are de-duplicated. Then all of the libraries are loaded at the foot of the document, ordered by type with a command like this:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;include_accumulated_js([:core,:plugins,:application,:page,:partial])&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;For the specifics of what it does, here&amp;#8217;s the rspec spec:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;describe "javascript library acuumulation" do
  it "accumulates javascripts associated with a specific key" do
    accumulate_js(:core,["a","b"])
    accumulate_js(:core,"c").should == {:core =&amp;gt; ["a","b","c"]}
  end

  it "can accumulate a list of javascripts used on a web page" do
    accumulate_js(:core, "library.js")
    accumulate_js(:core, "another/library.js").should == {:core =&amp;gt; ["library.js", "another/library.js"]}
  end

  it "can take combinations of arrays and strings" do
    accumulate_js(:foo, ["lib1.js","lib2.js"])
    accumulate_js(:foo, "lib3.js")
    accumulate_js(:foo, ["lib4.js","lib5.js"]).should == {:foo =&amp;gt; ["lib1.js","lib2.js","lib3.js","lib4.js","lib5.js"]}
  end

  it "raises an error if it is of an unknown type" do
    lambda do
     accumulate_js(:foo, 1)
    end.should raise_error(ArgumentError)
  end

  it "deduplicates and preserves order" do
    accumulate_js(:baz, ["a","b","a","c","b","c"]).should == {:baz, ["a","b","c"]}
  end
end

describe "including accumulated javascript" do
  before(:each) do
    accumulate_js(:foo, ["foo_1","foo_2"])
    accumulated = accumulate_js(:baz, ["baz_1","baz_2"])
    @result = include_accumulated_js([:baz, :foo], accumulated)
  end

  it "returns javascript includes" do
    @result.should =~ /script.*src.*javascripts\/baz_1.js.*type.*text\/javascript/ 
  end

  it "includes javascripts in the specified order" do
    @result.should =~ /baz_1.*baz_2.*foo_1.*foo_2/m
  end
  it "can handle nil values" do
    accumulated = accumulate_js(:foo, ["foo_1","foo_2"])
    lambda do
      include_accumulated_js([:baz, :not_in_there], accumulated)
    end.should_not raise_error
  end
end&lt;/code&gt;&lt;/pre&gt;


&lt;h2&gt;Accolades&lt;/h2&gt;


&lt;p&gt;&lt;a href="http://marcgrabanski.com"&gt;Marc Grabanski&lt;/a&gt;, excellent jQuery developer that he is, contributed his sage advice to this solution.&lt;/p&gt;


&lt;h2&gt;Epilogue&lt;/h2&gt;


&lt;p&gt;I might put this in a plugin and post to github, but just seems a little silly since there are only two helper methods. What think ye? If this blog post is good enough for you, then it&amp;#8217;s good enough for me. Obviously, I&amp;#8217;m busy enough that I&amp;#8217;ve gone bonky and resorted to archaic english &amp;#8211; but if you request a plugin or some other container I may be obliged.&lt;/p&gt;

</content>
  </entry>
  <entry>
    <title>Ruby Value To Boolean Method</title>
    <link href="http://127.0.0.1/2009/06/25/ruby-value-to-boolean-method/" rel="alternate"/>
    <id>http://127.0.0.1/2009/06/25/ruby-value-to-boolean-method/</id>
    <published>2009-06-25T00:00:00Z</published>
    <updated>2009-06-25T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;It&amp;#8217;s a common problem that does not seem to have a standard solution. Sometimes you need to coerce a value to a boolean (e.g. from a web form). Here&amp;#8217;s a simple implementation I wrote that handles common strings and numbers and gives flexibility in how to treat nils.&lt;/p&gt;

</summary>
    <content type="html">&lt;p&gt;It&amp;#8217;s a common problem that does not seem to have a standard solution. Sometimes you need to coerce a value to a boolean (e.g. from a web form). Here&amp;#8217;s a simple implementation I wrote that handles common strings and numbers and gives flexibility in how to treat nils.&lt;/p&gt;


&lt;p&gt;Here&amp;#8217;s the behavior we want:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;describe "#to_boolean" do                                                                         
    it "converts false values" do                                                                   
      ["no","false",false, "0", 0].each do |value|                                                  
        to_boolean(value).should == false                                                           
      end                                                                                           
    end                                                                                             

    it "converts true values" do                                                                    
      ["yes","true",true, "1", 1].each do |value|                                                   
        to_boolean(value).should == true                                                            
      end                                                                                           
    end                                                                                             

    it "is case insensitive for strings" do                                                         
      to_boolean("YeS").should == true                                                              
      to_boolean("NO").should == false                                                              
      to_boolean("TruE").should == true                                                             
      to_boolean("FalSe").should == false                                                           
    end                                                                                             

    it "converts nil to false by default" do                                                        
      to_boolean(nil).should == false                                                               
    end                                                                                             

    it "can return nil as nil" do                                                                   
      to_boolean(nil, nil).should == nil                                                            
    end                                                                                             

    it "converts unmatched strings to true" do                                                      
      to_boolean("a string").should == true                                                         
    end                                                                                             
  end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here&amp;#8217;s the source code that satisfies the desired behavior:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def to_boolean(value, nil_value = false)
  value.downcase! if value.class == String
  case value
  when "no","false",false, "0", 0
    false
  when "yes","true",true, "1", 1
    true
  when nil
    nil_value 
  else
    !!value
  end
end&lt;/code&gt;&lt;/pre&gt;

</content>
  </entry>
  <entry>
    <title>restful_authentication and rspec-rails 1.2.2</title>
    <link href="http://127.0.0.1/2009/03/26/restful_authentication-and-rspec-rails/" rel="alternate"/>
    <id>http://127.0.0.1/2009/03/26/restful_authentication-and-rspec-rails/</id>
    <published>2009-03-26T00:00:00Z</published>
    <updated>2009-03-26T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;If you are getting something like this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;it "should map #edit" do
-      route_for(:controller =&gt; "assets", :action =&gt; "edit", :id =&gt; 1).should == "/assets/1/edit"

</summary>
    <content type="html">&lt;p&gt;If you are getting something like this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;it "should map #edit" do
-      route_for(:controller =&gt; "assets", :action =&gt; "edit", :id =&gt; 1).should == "/assets/1/edit" 
+      route_for(:controller =&gt; "assets", :action =&gt; "edit", :id =&gt; "1").should == "/assets/1/edit" 
     end 

     it "should map #update" do
-      route_for(:controller =&gt; "assets", :action =&gt; "update", :id =&gt; 1).should == "/assets/1" 
+      route_for(:controller =&gt; "assets", :action =&gt; "update", :id =&gt; "1").should == {:path =&gt; "/assets/1", :method =&gt; :put}
     end 
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;Essentially you need to change your == match to be a hash which includes a :method key. Also, numbers for the :id param should be quoted.&lt;/p&gt;


&lt;p&gt;This will probably be fixed on the restful_authentication side since &lt;a href="http://github.com/dchelimsky/restful-authentication/commit/ad92c6cb52500c37ef81e30ac4e79adffc2f4d39"&gt;David Chelimsky has posted a patch&lt;/a&gt; on github (thanks David!). But, if you created these specs with the restful_authentication generator you may want to just go in and change them yourself. Onward!&lt;/p&gt;

</content>
  </entry>
  <entry>
    <title>My Band Rabbit's Rum is an Independent Music Awards Finalist</title>
    <link href="http://127.0.0.1/2008/11/20/rabbit-s-rum-is-an-independent-music-awards-finalist/" rel="alternate"/>
    <id>http://127.0.0.1/2008/11/20/rabbit-s-rum-is-an-independent-music-awards-finalist/</id>
    <published>2008-11-20T00:00:00Z</published>
    <updated>2008-11-20T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;My music project &lt;a href="http://www.rabbitsrum.com"&gt;Rabbit&amp;#8217;s Rum&lt;/a&gt; has just been nominated as an Independent Music Awards finalist. &lt;a href="http://tinyurl.com/6mtzfh"&gt;Check it out!&lt;/a&gt;&lt;/p&gt;

</summary>
    <content type="html">&lt;p&gt;My music project &lt;a href="http://www.rabbitsrum.com"&gt;Rabbit&amp;#8217;s Rum&lt;/a&gt; has just been nominated as an Independent Music Awards finalist. &lt;a href="http://tinyurl.com/6mtzfh"&gt;Check it out!&lt;/a&gt;&lt;/p&gt;

</content>
  </entry>
  <entry>
    <title>ActiveRDF and Redland - Up and Running</title>
    <link href="http://127.0.0.1/2008/11/04/activerdf-and-redland-up-and-running/" rel="alternate"/>
    <id>http://127.0.0.1/2008/11/04/activerdf-and-redland-up-and-running/</id>
    <published>2008-11-04T00:00:00Z</published>
    <updated>2008-11-04T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;Conveniently the Redland libraries have been added to macports. To install them you will need to install both the Redland and Redland-Bindings library. In my case I installed them with the  ruby option although it&amp;#8217;s hard to tell if this is required given sparse documentation:&lt;/p&gt;

</summary>
    <content type="html">&lt;p&gt;Conveniently the Redland libraries have been added to macports. To install them you will need to install both the Redland and Redland-Bindings library. In my case I installed them with the  ruby option although it&amp;#8217;s hard to tell if this is required given sparse documentation:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo port install redland  ruby
sudo port install redland-bindngs  ruby&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Then to test that Redland is working it is recommended that you run the example.rb file. Since it&amp;#8217;s good to have the source around anyway you can get it from the Redland subversion repository here:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;svn export http://svn.librdf.org/repository/bindings/trunk/&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;To run the example and make sure things are working, cd into the ruby directory and enter this per the &lt;a href="http://librdf.org/docs/ruby.html"&gt;Redland Ruby Binding instructions&lt;/a&gt; :&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;ruby -I. -Ilib example.rb file:../data/dc.rdf rdfxml&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;You should get output like this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;found statement: {[http://www.dajobe.org/], [http://purl.org/dc/elements/1.1/description], "The generic home page of Dave Beckett."}
found statement: {[http://www.dajobe.org/], [http://purl.org/dc/elements/1.1/creator], "Dave Beckett"}
found statement: {[http://www.dajobe.org/], [http://purl.org/dc/elements/1.1/title], "Dave Beckett's Home Page"}
Parsing added 3 statements
Printing all statements
Statement: {[http://www.dajobe.org/], [http://purl.org/dc/elements/1.1/title], "Dave Beckett's Home Page"}
Statement: {[http://www.dajobe.org/], [http://purl.org/dc/elements/1.1/creator], "Dave Beckett"}
Statement: {[http://www.dajobe.org/], [http://purl.org/dc/elements/1.1/description], "The generic home page of Dave Beckett."}
Querying for dc:titles:
{
  0= [http://www.dajobe.org/]
  1= Dave Beckett's Home Page
}
Serialized query results to JSON as a string size 296 bytes
Writing model to test-out.rdf as rdf/xml
Serialized to ntriples as a string size 292 bytes
Done&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;Also you should have the test output in the test-out.rdf file. Something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&amp;gt;
  &amp;lt;rdf:Description rdf:about="http://www.dajobe.org/"&amp;gt;
    &amp;lt;dc:title&amp;gt;Dave Beckett's Home Page&amp;lt;/dc:title&amp;gt;
  &amp;lt;/rdf:Description&amp;gt;
  &amp;lt;rdf:Description rdf:about="http://www.dajobe.org/"&amp;gt;
    &amp;lt;dc:creator&amp;gt;Dave Beckett&amp;lt;/dc:creator&amp;gt;
  &amp;lt;/rdf:Description&amp;gt;
  &amp;lt;rdf:Description rdf:about="http://www.dajobe.org/"&amp;gt;
    &amp;lt;dc:description&amp;gt;The generic home page of Dave Beckett.&amp;lt;/dc:description&amp;gt;
  &amp;lt;/rdf:Description&amp;gt;
&amp;lt;/rdf:RDF&amp;gt;
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Cool!&lt;/p&gt;


&lt;p&gt;Next, lets setup ActiveRDF. If something goes wrong in your install or you want more information, the ActiveRDF install instructions are &lt;a href="http://wiki.activerdf.org/GettingStartedGuide"&gt;here&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Now, for ActiveRDF install these gems:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;sudo gem install activerdf --include-dependencies -y
sudo gem install activerdf_sparql
sudo gem install activerdf_redland&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;Don&amp;#8217;t forget the activerdf_redland gem or you will get the error: unknown adapter redland&lt;/p&gt;


&lt;p&gt;Enter this code from the ActiveRDF getting started &lt;a href="http://wiki.activerdf.org/GettingStartedGuide"&gt;guide&lt;/a&gt; into a file called &lt;strong&gt;active_rdf_demo.rb&lt;/strong&gt;:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;require 'rubygems'
require 'active_rdf'
adapter = ConnectionPool.add_data_source :type =&amp;gt; :redland
adapter.load "test_person_data.nt" 
Namespace.register :test, 'http://activerdf.org/test/'
ObjectManager.construct_classes

# we can access all RDF properties of a person as Ruby attributes:
eyal = TEST::Person.new 'http://activerdf.org/test/eyal'
puts eyal.age
puts eyal.eye
puts eyal.class

# lets create an instance of one of the classes, that were constructed in that 
# way armin will be of rdfs:type test:person
armin = TEST::Person.new 'http://armin-haller.com/#me'

# now lets search for something in the triple store
all_resources = RDFS::Resource.find_all

# print all the people, and their friends
all_people = TEST::Person.find_all
all_people.each do |person|
    puts "#{person} has #{person.eye} eyes" 
end

# find all people aged 27
almost_thirties = TEST::Person.find_by_age(27)

puts "the following people are almost thirty: #{almost_thirties}" 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Download the test data &lt;a href="http://activerdf.org/data/test_person_data.nt"&gt;here&lt;/a&gt; and put it in the same folder as your active_rdf_demo.rb file.&lt;/p&gt;


&lt;p&gt;Run active_rdf_demo.rb:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;ruby active_rdf_demo.rb&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;You should get some output like this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;27
blue
TEST::Person
&amp;lt;http: /&amp;gt; has blue eyes
the following people are almost thirty: &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;Congrats! ActiveRDF is now working with Redland using the Redland Ruby bindings.&lt;/p&gt;


&lt;p&gt;Now if by chance you get this error next time you run script/server for a rails app:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- /opt/local/lib/ruby/gems/1.8/gems/activerdf-1.6.10/lib/activerdf/init.rb (MissingSourceFile)&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;This is because some versions of the ActiveRDF gem (e.g. 1.6.10) do not have an init.rb file created. This is a bug. Here&amp;#8217;s how you can get around it (the directory to cd into will be the one from your error):&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;sudo su
cd /opt/local/lib/ruby/gems/1.8/gems/activerdf-1.6.10/lib/
mkdir activerdf
touch activerdf/init.rb&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;

</content>
  </entry>
  <entry>
    <title>Scruffy Ruby Gem Debugging</title>
    <link href="http://127.0.0.1/2008/07/16/scruffy-ruby-gem-debugging/" rel="alternate"/>
    <id>http://127.0.0.1/2008/07/16/scruffy-ruby-gem-debugging/</id>
    <published>2008-07-16T00:00:00Z</published>
    <updated>2008-07-16T00:00:00Z</updated>
    <author>
      <name>Noah Thorp</name>
    </author>
    <summary type="html">&lt;p&gt;&lt;img src="/images/cast.jpg" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;In the process of creating some graphs in ruby I decided to go upstream from ruport and use the scruffy gem directly. I made some discoveries along the way that touch on issues that could be encountered by various permutations of scruffy, macport, and rubygems users.&lt;/p&gt;

</summary>
    <content type="html">&lt;p&gt;&lt;img src="/images/cast.jpg" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;In the process of creating some graphs in ruby I decided to go upstream from ruport and use the scruffy gem directly. I made some discoveries along the way that touch on issues that could be encountered by various permutations of scruffy, macport, and rubygems users.&lt;/p&gt;


&lt;h2&gt;A Storm Brewing&lt;/h2&gt;


&lt;p&gt;The first issue I encountered was this error:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;testing_scruffy.rb:2:Warning: require_gem is obsolete.  Use gem instead.
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:304:in `report_activate_error': Could not find RubyGem Scruffy (&amp;gt;= 0.0.0) (Gem::LoadError)
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:238:in `activate'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:76:in `active_gem_with_options'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:61:in `require_gem'
    from testing_scruffy.rb:2&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;This seems like a straightforward case of not installing the gem. However, in my case the the gem &lt;strong&gt;was&lt;/strong&gt; installed and there was additional strange behavior: require &amp;#8216;scruffy&amp;#8217; would load the library in irb but not from a script (even with require &amp;#8216;rubygems&amp;#8217; before it).This seemed inconsistent because $LOAD_PATH (aka $:) variables were identical in irb and in the script. After investigating a number of possibilities I updated rubygems (which was at 0.9.4) to 1.2.0 and this seem to resolve the blatantly bizarre behavior.&lt;/p&gt;


&lt;p&gt;You can check which version of ruby gems you are running with &amp;#8220;gem -v&amp;#8221;. If you are using macports you may have an older version of ruby gems, in which case you may find it useful to update rb-rubygems. Caveat emptor: dependent updates may also be installed &amp;#8211; such as ruby. Here&amp;#8217;s how you can update your macport rb-rubygems library on OS X:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo port upgrade rb-rubygems&lt;/code&gt;&lt;/pre&gt;


&lt;h2&gt;Scruffy Needs A Shave&lt;/h2&gt;


&lt;p&gt;If you do upgrade ruby gems you may run into the another issue. With an updated version of ruby gems the require_gem method is obsolete. Because of this you may see the following error since scruffy 0.2.2 is not updated to use the &lt;strong&gt;gem&lt;/strong&gt;  method instead of &lt;strong&gt;require_gem&lt;/strong&gt;:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;NoMethodError: undefined method `require_gem' for main:Object
    from /opt/local/lib/ruby/gems/1.8/gems/scruffy-0.2.2/lib/scruffy.rb:18
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `require'
    from (irb):3&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;I used the hack below to get around this and to avoid unpacking the gem in to my project directory for modifications. Once again caveat emptor &amp;#8211; you may ultimately be better off unpacking (freezing) the gem into a local directory and including it in your application directly. Here&amp;#8217;s the hack which simply creates an alias to suspend the deprecation of the require_gem method indefinitely:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;require 'rubygems'
alias require_gem gem #later versions of gem use gem instead of require_gem
require 'scruffy'&lt;/code&gt;&lt;/pre&gt;


&lt;h2&gt;Case Of The Missing Pie&lt;/h2&gt;


&lt;p&gt;Ah, but that&amp;#8217;s not all. It appears that tutorials and documentation are out of sync with the rubygem download&amp;#8230; see example code at &lt;a href="http://scruffy.rubyforge.org/"&gt;http://scruffy.rubyforge.org/&lt;/a&gt; which suggests this usage (with my require hack at the top):&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;require 'rubygems'
alias require_gem gem
require 'scruffy'

graph = Scruffy::Graph.new
graph.title = "Favourite Snacks"
graph.renderer = Scruffy::Renderers::Pie.new

graph.add :pie, '', {
      'Apple' =&amp;gt; 20,
      'Banana' =&amp;gt; 100,
      'Orange' =&amp;gt; 70,
      'Taco' =&amp;gt; 30
}

graph.render :to =&amp;gt; "pie_test.svg"
graph.render :width =&amp;gt; 300, :height =&amp;gt; 200, :to =&amp;gt; "pie_test.png", :as =&amp;gt; 'png'&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Running the sample code throws this error:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;test_scruffy.rb:7: uninitialized constant Scruffy::Renderers::Pie (NameError)&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Well, this error occurs because there is no such class as Scruffy::Renderers::Pie. It&amp;#8217;s not in the docs and if you do grep -r &amp;#8220;pie&amp;#8221; . from within the scruffy-0.2.2 folder it comes up with nothing that would lead to the creation of such a class. &lt;span class="caps"&gt;FYI&lt;/span&gt;, the docs are visible online here &lt;a href="http://scruffy.rubyforge.org/doc/"&gt;http://scruffy.rubyforge.org/doc/&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Well, it&amp;#8217;s hard to use a class that doesn&amp;#8217;t exist. It appears that this may be present in scruffy 0.2.3 released on July 13th &amp;#8211; but as of this writing it&amp;#8217;s not downloaded via sudo gem update scruffy. If you need this and it it is not yet available through ruby gems &amp;#8211; you may need to do a manual install. In the mean time let&amp;#8217;s try something else instead.&lt;/p&gt;


&lt;h2&gt;Steady Into Port (Mind The Wireshark)&lt;/h2&gt;


&lt;pre&gt;&lt;code&gt;graph = Scruffy::Graph.new
graph.title = "Sample Line Graph"
graph.renderer = Scruffy::Renderers::Standard.new

graph.add :line, 'Example', [20, 100, 70, 30, 106]

graph.render :to =&amp;gt; "line_test.svg"
graph.render  :width =&amp;gt; 300, :height =&amp;gt; 200, :to =&amp;gt; "line_test.png", :as =&amp;gt; 'png'&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Well if you have RMagick installed that may have worked for you. If not you will need to make sure rmagick is installed. On my machine I had to remove some dependencies before reinstalling tiff with different compilation options. Here are the commands I ran. You will probably have different dependencies, so know what you are doing. Don&amp;#8217;t just blindly run these commands or you may uninstall something you need:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo port uninstall wireshark
sudo port uninstall gtk2
sudo port uninstall tiff @3.8.2_1 macosx
sudo port install tiff -macosx imagemagick  q8  gs  wmf
sudo gem install rmagick&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Note that installing and compiling rmagick took several minutes. I would suggest looking at the &lt;a href="http://rmagick.rubyforge.org/install-osx.html"&gt;rmagick installation page&lt;/a&gt; if you need to install this.&lt;/p&gt;


&lt;p&gt;At this point you should be able to output your svg and png files.&lt;/p&gt;


&lt;h2&gt;Conclusion&lt;/h2&gt;


&lt;p&gt;Careful, or due to &amp;#8220;environmental conditions&amp;#8221; you could set out expecting a simple three hour tour happily outputting beautifully rendered svgs as you sail effortlessly through graph land; but instead, end up whistling along sympathetically to the Gilligan&amp;#8217;s Island theme song as you set ground on the shore of an uncharted desert isle. Hopefully this will help you through some of the things you may run into, and you can have a smooth sail enjoying scruffy.&lt;/p&gt;

</content>
  </entry>
</feed>
