<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
 <title>OSU Open Source Lab aggregator</title>
 <link>http://osuosl.org//aggregator/categories/1</link>
 <description>OSU Open Source Lab - aggregated feeds in category Planet OSL</description>
 <language>en</language>
<item>
 <title>Michael Marineau: Class inheritence in C</title>
 <link>http://mike.marineau.org/blog/%5Bcatpath%5D/2008-05-07-class-inheritence-c</link>
 <description>&lt;p&gt;For a while now I have been slowly developing a touchscreen music player to replace the stereo in my car. Although that concept should be fairly simple the project has turned into a bit of a playground for learning how to implement an X toolkit using nothing but C, XCB, and Cairo. One of the more recent legs this project has grown is an object oriented system for C which supports class inheritance and method overriding for use in my toolkit.&lt;/p&gt;
&lt;p&gt;At this point I&#039;ve got it almost the way I like it. Defining a class in a header looks something like this:&lt;/p&gt;
&lt;pre&gt;
CLASS(mtk_widget, mtk_object)
        int x, y, w, h;
        struct mtk_window *window;
        struct mtk_widget *parent;
        cairo_surface_t *surface;
METHODS(mtk_widget, mtk_object, int x, int y, int w, int h)
        void (*init)(mtk_widget_t *this, mtk_widget_t* parent);
        void (*draw)(mtk_widget_t *this); /* children must implement this */
        void (*update)(mtk_widget_t *this);
        void (*mouse_press)(mtk_widget_t *this, int x, int y);
        void (*mouse_release)(mtk_widget_t *this, int x, int y);
        void (*mouse_move)(mtk_widget_t *this, int x, int y);
        void (*set_geometry)(mtk_widget_t *this, int x, int y, int w, int h);
        void (*set_parent)(mtk_widget_t *this, mtk_widget_t *parent);
END
&lt;/pre&gt;&lt;p&gt;
This defines a new class named &lt;em&gt;mtk_widget&lt;/em&gt; based on the base class &lt;em&gt;mtk_object&lt;/em&gt;. The extra arguments to the &lt;em&gt;METHODS&lt;/em&gt; macro are additional arguments for the object constructor.&lt;/p&gt;
&lt;p&gt;To actually implement the class the corresponding C file will have something like this:&lt;/p&gt;
&lt;pre&gt;
/* more methods up here */

static void set_parent(mtk_widget_t *this, mtk_widget_t *parent)
{
        this-&gt;parent = parent;
}

mtk_widget_t* mtk_widget_new(size_t size, int x, int y, int w, int h)
{
        mtk_widget_t* this = mtk_widget(mtk_object_new(size));

        SET_CLASS(this, mtk_widget);
        this-&gt;x = x;
        this-&gt;y = y;
        this-&gt;w = w;
        this-&gt;h = h;

        return this;
}

METHOD_TABLE_INIT(mtk_widget, mtk_object)
        METHOD(init);
        METHOD(draw);
        METHOD(set_geometry);
        METHOD(set_parent);
METHOD_TABLE_END
&lt;/pre&gt;&lt;p&gt;
Methods can (and probably should) be static functions. The &lt;em&gt;METHOD_TABLE_INIT&lt;/em&gt; macro defines the function &lt;em&gt;_mtk_widget_class_init()&lt;/em&gt; to fill up a hidden structure named &lt;em&gt;_mtk_widget_class&lt;/em&gt; which is the class virtual method table. Each object then has a pointer tucked away inside to its class&#039;s method table (set by the SET_CLASS macro). One thing that is a bit clunky about this is that the program must somehow call &lt;em&gt;_mtk_widget_class_init()&lt;/em&gt; before the class is ever used. I would like to be able to do away with that by using GCC&#039;s &lt;em&gt;constructor&lt;/em&gt; function attribute so it magically runs before &lt;em&gt;main()&lt;/em&gt;. However the class hierarchy must be initialized in order but a way to order the constructors was not added until GCC 4.3. I&#039;m using 4.1 on my system so that feature will have to wait for now.&lt;/p&gt;
&lt;p&gt;Actually using objects looks something like this:&lt;/p&gt;
&lt;pre&gt;
int main (int argc, char *argv[])
{
        mtk_window_t *window;
        mtk_widget_t *widget;

        mtk_init();

        window = new(mtk_window,640, 480);
        widget = mtk_widget(new(mtk_text, 0, 0, 640, 480, &quot;WHEE&quot;));
        call(window, mtk_container, add_widget, widget);

        mtk_main();

        mtk_cleanup();

        return 0;
}
&lt;/pre&gt;&lt;p&gt;
Pretty strait forward, &lt;em&gt;call()&lt;/em&gt; is a bit weird though. It takes the arguments &lt;em&gt;(object, class name that defined the method, method name, method arguments)&lt;/em&gt;. I would like to be able to get rid of the class argument somehow (it is used to cast object to the correct type) but I haven&#039;t come up with a solution yet. I have a similar clunkyness with my &lt;em&gt;super()&lt;/em&gt; macro for calling a parent class&#039;s method when doing method overriding.&lt;/p&gt;
&lt;p&gt;That&#039;s pretty much it. As with the rest of this project it is a good example of making things more complicated than they need to be but it was an interesting challenge to put together.&lt;/p&gt;
&lt;p&gt;The code for the above macros and base class can be found in this &lt;a href=&quot;http://mike.marineau.org/git/?p=charlie.git;a=blob;f=src/include/mtk_object.h&quot;&gt;header&lt;/a&gt; and &lt;a href=&quot;http://mike.marineau.org/git/?p=charlie.git;a=blob;f=src/mtk/object.c&quot;&gt;c file&lt;/a&gt;.&lt;/p&gt;</description>
 <pubDate>Wed, 07 May 2008 21:43:45 +0000</pubDate>
</item>
<item>
 <title>Greg Lund-Chaix: Surpassed 100 Moodle sites</title>
 <link>http://staff.osuosl.org/~gchaix/2008/04/30/surpassed-100-moodle-sites/</link>
 <description>&lt;p&gt;Wow.  I am amazed at how quickly teachers are latching onto the Oregon Virtual School District stuff.&lt;/p&gt;
&lt;p&gt;Since I set up a system to automatically create school Moodle servers on demand, 109 Moodle instances have been spawned on the shared-code Moodle system.  That means at least one teacher from 109 different public schools and ESDs in Oregon has been interested enough in the ORVSD offerings to give it a try.  Of course, only a small number of them are far enough along to be using it with their students, but there are quite a few teachers getting up to speed with how the tools work.  I&amp;#8217;m delighted to see the system seems to be scaling up remarkably well.  It&amp;#8217;s not having any problem at all dealing with so many separate vhosts/databases running on the same Moodle install.&lt;/p&gt;
&lt;p&gt;I expect we&amp;#8217;re going to see an explosion of use by the end of the summer and beginning of next fall.  I guess I better get those disk arrays ordered &amp;#8230; we&amp;#8217;re probably going to need a &lt;em&gt;lot&lt;/em&gt; more disk space soon.&lt;/p&gt;</description>
 <pubDate>Wed, 30 Apr 2008 23:02:10 +0000</pubDate>
</item>
<item>
 <title>Kurt Maier: Hi!  I&#039;m a Google SoC student for 2008!</title>
 <link>http://kurt.madleet.net/2008/04/you-know-there-was-man-that-lived-here.html</link>
 <description>Well, I got accepted to GSoC, which is pretty damn exciting. You can see my abstract &lt;a href=&quot;http://code.google.com/soc/2008/osuosl/appinfo.html?csaid=BC30B2B9A0E1DDBA&quot;&gt;here&lt;/a&gt;. It took me a while to bandy up the nerve to apply, but I did, and then I got picked. It&#039;s kind of mindblowing to me. Anyway, I&#039;ll be working with my mentor Jeff Sheltren at the &lt;a href=&#039;http://osuosl.org/&#039;&gt;Oregon State University Open Source Lab&lt;/a&gt;, and I&#039;m severely stoked about it.</description>
 <pubDate>Mon, 28 Apr 2008 15:06:07 +0000</pubDate>
</item>
<item>
 <title>Kurt Maier: You know, there was a man that lived here once that had a prize-fighting kangaroo.</title>
 <link>http://karmaflux.blogspot.com/2008/04/you-know-there-was-man-that-lived-here.html</link>
 <description>Well, I got accepted to GSoC, which is pretty damn exciting. You can see my abstract &lt;a href=&quot;http://code.google.com/soc/2008/osuosl/appinfo.html?csaid=BC30B2B9A0E1DDBA&quot;&gt;here&lt;/a&gt;. It took me a while to bandy up the nerve to apply, but I did, and then I got picked. It&#039;s kind of mindblowing to me. Anyway, I&#039;ll be working with my mentor Jeff Sheltren at the &lt;a href=&#039;http://osuosl.org/&#039;&gt;Oregon State University Open Source Lab&lt;/a&gt;, and I&#039;m severely stoked about it.&lt;br /&gt;&lt;br /&gt;This blog will house all my notes and ruminations along the way. This is also where I&#039;ll be posting about my volunteer work on the &lt;a href=&#039;http://laptop.org&#039;&gt;OLPC&lt;/a&gt; project.</description>
 <pubDate>Sun, 27 Apr 2008 02:09:51 +0000</pubDate>
</item>
<item>
 <title>Jeff Sheltren: cfengine 2.2.6</title>
 <link>http://sheltren.com/cfengine_226</link>
 <description>&lt;p&gt;I&#039;ve built updated cfengine 2.2.6 packages for el4 and el5.  You can find them in the usual spot:&lt;br /&gt;
&lt;a href=&quot;http://sheltren.com/downloads/cfengine/testing/&quot; title=&quot;http://sheltren.com/downloads/cfengine/testing/&quot;&gt;http://sheltren.com/downloads/cfengine/testing/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The same package has been built for Fedora development/rawhide and should be available there soon.&lt;/p&gt;
&lt;p&gt;Some bug fixes as well as support for detecting xen hosts/guests is now included.  Let me know if you have any problems!&lt;/p&gt;</description>
 <pubDate>Thu, 24 Apr 2008 16:21:10 +0000</pubDate>
</item>
<item>
 <title>Jeff Sheltren: Ubuntu 8.04</title>
 <link>http://sheltren.com/fun_with_ubuntu</link>
 <description>&lt;p&gt;Ubuntu 8.04 was just released.  We&#039;re having fun watching the bandwidth graphs.  See the graph below and try to figure out when they made the release announcement...&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://sheltren.com/sites/default/files/osuosl_ubuntu_traffic.png&quot; alt=&quot;Fun Ubuntu Traffic&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I should note that is just the traffic coming out of our FTP server here in Corvallis.  We also have two remote FTP mirrors in Chicago and Atlanta which are each pushing ~350Mbit/sec.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Here&#039;s an image showing each of our three FTP mirrors and how much traffic they are each pushing.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://sheltren.com/sites/default/files/traffic_map_20080424.png&quot; alt=&quot;Traffic Map&quot; /&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 24 Apr 2008 15:56:23 +0000</pubDate>
</item>
<item>
 <title>Jeff Sheltren: InnoTech Portland</title>
 <link>http://sheltren.com/innotech_portland_2008</link>
 <description>&lt;p&gt;Yesterday I was up in Portland at the InnoTech conference to give a &quot;lightning talk&quot; on the OSU Open Source Lab.  It was a lot of fun to meet a lot of people I&#039;ve been in contact with on the phone or via email and put a face to a name.  There&#039;s a great group of people in the Portland area involved with Open Source, and I really need to get up there more often to see some of them!&lt;/p&gt;
&lt;p&gt;The lightning talk was interesting but pretty fun and I think it really helped keep things from getting boring.  I think the basic idea was borrowed from Ignite who puts on events where people can talk, but the slides are pre-timed so you&#039;ve got to go pretty fast.  In our case, we each had five minutes total, this was for 20 slides for each presenter timed for fifteen seconds for each slide -- we had no control over moving the slides forward or backward.  I enjoyed it, although I was trying to cram too much into each slide and was talking very fast the whole time!&lt;/p&gt;
&lt;p&gt;Here&#039;s a list of the other people that were presenting during the &lt;a href=&quot;http://www.innotechconference.com/pdx/Event/Portland_Events/Open_in_Oregon_Presentations.php&quot;&gt;same session&lt;/a&gt;:&lt;br /&gt;
Nate Angell, The rSmart Group&lt;br /&gt;
Jennifer Cloer, Page OnePublic Relations&lt;br /&gt;
Stuart Cohen, Collaborative Software Initiative&lt;br /&gt;
Selena Deckelmann, PostgreSQL&lt;br /&gt;
Bjorn Freeman-Benson, Eclipse Foundation&lt;br /&gt;
Brian Jamison, OpenSourcery&lt;br /&gt;
Steve Morris, OTBC and Managing Director, OregonStartups.com&lt;br /&gt;
Scott Kveton, Vidoop&lt;br /&gt;
Brandon Philips, Novell&lt;/p&gt;
&lt;p&gt;It was very cool that a number of the other presenters also mentioned the OSUOSL in their talks!  We&#039;re glad to be making such a large impact.  If you are interested in checking out my slides, you can download them &lt;a href=&quot;http://sheltren.com/sites/default/files/osl_innotech_presentation.pdf&quot;&gt;here as a PDF&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The session was part of the Open Source Summit at InnoTech, a full day of presentations related to Open Source.  Raven Zachary from the 451 Group did a great job at organizing the Open Source part of the conference.&lt;/p&gt;
&lt;p&gt;Just before the lightning talks was a panel on &quot;Open Source in the Public Sector&quot;.  This was led by &lt;a href=&quot;http://www.bryantsblog.com&quot;&gt;Deb Bryant&lt;/a&gt;, and &lt;a href=&quot;http://staff.osuosl.org/~gchaix&quot;&gt;Greg Lund-Chaix&lt;/a&gt; was one of the panelists, both of them are also from the OSUOSL.  This was an interesting discussion and the panelists all gave some good examples of how and why they are using Open Source.  Greg was talking about his involvement in the &lt;a href=&quot;http://orvsd.org&quot;&gt;Oregon Virtual School District&lt;/a&gt;, which is a really exciting partnership with the Oregon Department of Education to provide online courses and course materials at no cost to the teachers.&lt;/p&gt;</description>
 <pubDate>Fri, 18 Apr 2008 16:46:11 +0000</pubDate>
</item>
<item>
 <title>Narayan Newton: Go Comcast Go</title>
 <link>http://staff.osuosl.org/~nnewton/?q=node/64</link>
 <description>&lt;p&gt;Lets all give it up for Comcast, come on now:&lt;/p&gt;
&lt;p&gt;Go Comcast Go!&lt;br /&gt;
Ra Ra Ree!&lt;br /&gt;
Kick Em In The Knee!&lt;br /&gt;
Ra Ra Rass&lt;br /&gt;
Kick Em In...The Other Knee!&lt;/p&gt;
&lt;p&gt;A couple weeks ago I got several disturbing reports from the midwest, mainly of the &quot;drupal.org has been down for 6 hours&quot; variety. My response to which was frantically going to drupal.org, watching it load perfectly and then enjoying a large steaming cup of wtf.&lt;/p&gt;
&lt;p&gt;This lovely period was capped by helping an employee of a Drupal company in Boston try to track down this issue when it happened to them. He was very patient indeed and sent me the numerous tcpdumps, traceroutes, pings requests and netstat printouts that I wanted. It was quite the interesting issue. Any computer in their office could ping the individual drupal.org webnodes, but not the master virtual IP. SYN packets were getting to the load balancer managing the master VIP, but the SYN,ACK was never getting back to them. &lt;/p&gt;
&lt;p&gt;The most frustrating part of this was that every once in awhile a connection would go through and get to ESTABLISH..then die and we would go back to connections waiting for an ACK.&lt;/p&gt;
&lt;p&gt;We beat at this for awhile and then someone called Comcast and we discovered a lovely feature called &quot;Smart Packet Detection.&quot; This &quot;protects&quot; the intertubes from clogging by noting when many packets are going to a single IP address and then blocking that IP for awhile.....except apparently for SYN packets? That part makes no sense. &lt;/p&gt;
&lt;p&gt;Anyway, they requested that feature be turned off and connectivity immediately returned. &lt;/p&gt;</description>
 <pubDate>Thu, 17 Apr 2008 06:39:13 +0000</pubDate>
</item>
<item>
 <title>Lars Lohn: it’s a geeky meme</title>
 <link>http://staff.osuosl.org/~lohnk/blog/?p=30</link>
 <description>&lt;p&gt;lars@bozeman:~$ history|awk &amp;#8216;{a[$2]++} END{for(i in a){printf &amp;#8220;%5d\t%s\n&amp;#8221;,a[i],i}}&amp;#8217;|sort -rn|head&lt;br /&gt;
133   cd&lt;br /&gt;
114   ls&lt;br /&gt;
44   svn&lt;br /&gt;
31   vi&lt;br /&gt;
28   python&lt;br /&gt;
24   ssh&lt;br /&gt;
21   ./ConfigurationManager.py&lt;br /&gt;
17   make&lt;br /&gt;
13   rsync&lt;/p&gt;
&lt;p&gt;It looks to me like I spend too much time moving around the file system.  I should try to type more pathnames and stick around in one place&amp;#8230;&lt;/p&gt;</description>
 <pubDate>Mon, 14 Apr 2008 02:46:07 +0000</pubDate>
</item>
<item>
 <title>Frédéric Wenzel: Minefield?</title>
 <link>http://fredericiana.com/2008/04/04/minefield/</link>
 <description>&lt;blockquote&gt;&lt;p&gt;Minefield, pfft&amp;#8230; &lt;strong&gt;what kind of name is that?&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;http://fredericiana.com/wp-content/uploads/2008/04/mozilla_loveletter.jpg&quot; alt=&quot;&quot; title=&quot;Mozilla Love Letter&quot; width=&quot;499&quot; height=&quot;337&quot; class=&quot;alignnone size-full wp-image-1264&quot; /&gt;&lt;/p&gt;
&lt;p&gt;From a funny love letter Mozilla received. It&amp;#8217;s &lt;a href=&quot;http://www.wired.com/software/coolapps/multimedia/2008/03/gallery_mozilla10?slide=7&amp;#038;slideView=7&quot;&gt;part&lt;/a&gt; of a nice &lt;a href=&quot;http://www.wired.com/software/coolapps/multimedia/2008/03/gallery_mozilla10?slide=7&amp;#038;slideView=7&quot;&gt;picture series wired.com took at the Mozilla headquarters&lt;/a&gt;. Check it out.&lt;/p&gt;</description>
 <pubDate>Fri, 04 Apr 2008 10:04:14 +0000</pubDate>
</item>
</channel>
</rss>
