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

<channel>
	<title>Adztec Independent - Blog &#187; multithreading</title>
	<atom:link href="http://www.adztec-independent.de/tag/multithreading/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adztec-independent.de</link>
	<description>Programming Ruby / JRuby / Rails / Common Lisp by Christopher Bertels</description>
	<lastBuildDate>Mon, 13 Sep 2010 22:58:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Programming Erlang: eFreeTPd</title>
		<link>http://www.adztec-independent.de/2009/03/programming-erlang-efreetpd/</link>
		<comments>http://www.adztec-independent.de/2009/03/programming-erlang-efreetpd/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 16:13:50 +0000</pubDate>
		<dc:creator>Christopher</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[multithreading]]></category>
		<category><![CDATA[parallel programming]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.adztec-independent.de/?p=132</guid>
		<description><![CDATA[I&#8217;ve been learning Erlang for quite a while now and started working on a small Erlang-based Project: eFreeTPd &#8211; a free ftp daemon written in Erlang.
I&#8217;ve bought myself the Programming Erlang book by Joe Armstrong at Pragmatic Programmers, a very nice book to read if you&#8217;re interested in Erlang and parallel programming &#8211; or COP [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been learning <a href="http://www.erlang.org" target="_blank">Erlang</a> for quite a while now and started working on a small Erlang-based Project: <a href="http://github.com/bakkdoor/efreetpd" target="_blank">eFreeTPd</a> &#8211; a free ftp daemon written in Erlang.<br />
I&#8217;ve bought myself the <a href="http://www.pragprog.com/titles/jaerlang/programming-erlang" target="_blank">Programming Erlang</a> book by <a href="http://armstrongonsoftware.blogspot.com/" target="_blank">Joe Armstrong</a> at <a href="http://www.pragprog.com" target="_blank">Pragmatic Programmers</a>, a very nice book to read if you&#8217;re interested in Erlang and parallel programming &#8211; or COP (<a href="http://ll2.ai.mit.edu/talks/armstrong.pdf" target="_blank">Concurrency Oriented Programming</a>) &#8211; in general.</p>
<p>So yeah, Erlang is fun. It&#8217;s really easy to learn, if you ask me. If you know some Prolog, that&#8217;ll definately help a bit, since Erlang is influenced by it. But even if you&#8217;ve never heard of Prolog before, the language in itself is really small and easy. Just a few concepts you&#8217;ll have to learn including those of message passing style concurrency with processes instead of shared memory threads and mutable state. The syntax might seem weird at first, but I found this to be no real burden in the end.</p>
<p><a href="http://github.com/bakkdoor/efreetpd" target="_blank">eFreeTPd</a> isn&#8217;t finished yet, but I&#8217;ll keep up development. It shouldn&#8217;t take too long though until there&#8217;s a somewhat stable or functional version out <img src='http://www.adztec-independent.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Next time I&#8217;ll write a little more on how <a href="http://github.com/bakkdoor/efreetpd" target="_blank">eFreeTPd</a> actually is implemented in terms of what design and overall structure is used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adztec-independent.de/2009/03/programming-erlang-efreetpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clojure</title>
		<link>http://www.adztec-independent.de/2009/01/clojure/</link>
		<comments>http://www.adztec-independent.de/2009/01/clojure/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 00:56:55 +0000</pubDate>
		<dc:creator>Christopher</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[multithreading]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[recursion]]></category>

		<guid isPermaLink="false">http://www.adztec-independent.de/?p=123</guid>
		<description><![CDATA[




I&#8217;ve been trying out Clojure lately. Clojure is a new lisp dialect, that is hosted on the JVM and interoperates nicely with it. You can easily use Java methods, classes and libraries. I&#8217;ve been using it a little bit, watching some videos about it on blip.tv by it&#8217;s author, Rich Hickey, which really is a [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<dl class="wp-caption alignleft" style="width: 110px;">
<dt class="wp-caption-dt"><a href="http://www.clojure.org"><img title="Clojure logo" src="http://clojure.org/file/view/clojure-icon.gif" alt="Clojure logo" width="100" height="100" /></a></dt>
</dl>
</div>
<p>I&#8217;ve been trying out <a title="Clojure Website" href="http://www.clojure.org" target="_blank">Clojure</a> lately. Clojure is a new lisp dialect, that is hosted on the JVM and interoperates nicely with it. You can easily use Java methods, classes and libraries. I&#8217;ve been using it a little bit, watching some <a title="Clojure Channel on blip.tv" href="http://clojure.blip.tv" target="_blank">videos about it on blip.tv</a> by it&#8217;s author, Rich Hickey, which really is a brilliant guy. You should check them out as well, they give you a pretty good introduction to the language.</p>
<p>Compared to Common Lisp, which I really like allot as well, Clojure does feel a little bit more modern. For example, being not limited to reader support for lists, but also having maps and vectors (like arrays) as first class citizens, is really nice. And then theres the huge emphasis on multithreading support in a really nice way without locks and condition variables but with a stm (software transactional memory). Clojure is a functional language and focuses on immutability of data structures compared to Common Lisp, which also allows a more imperative style, if you want to. In Clojure, you&#8217;re forced to a functional style, which might seem like a downside at first, but which makes it possible to have some pretty neat features concerning multithreaded programming support. Since all the datastructures are immutable, there&#8217;s no need do use locks when having multiple threads sharing them. I suggest checking out the videos and to give Clojure a try. It seems very promising and it&#8217;s having quite a publicity boost right now. Just google for it, take a look on some mailinglists or checkout reddit etc. You&#8217;ll find plenty comments, links and blogposts about it (like this one <img src='http://www.adztec-independent.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</p>
<p>So since I thought it&#8217;s always nice to try to port an existing little application from a language I already know to a new one I want to learn, I tried to port a very small programm <a title="CallToPower's website" href="http://www.calltopower.de" target="_blank">CallToPower</a>, a collegue from <a title="University of Osnabrück" href="http://www.uos.de" target="_blank">university</a>, wrote and <a title="Sysinfo.jar" href="http://calltopower.ca.funpic.de/stuff/blog/software/java/SysInfo.jar" target="_blank">posted on his website</a>. I pretty much copied it straightly to Clojure, changing some parts.</p>
<p>Now I know this might not be the best way to write it in Clojure. But it was my real first (although very small) programm in Clojure and I wanted to make it as close to the original, as possible. Basically, what it does is display some values of some system properties you can choose by pressing the appropriate. Nothing fancy, but it shows some Clojure related stuff pretty well.</p>
<p>So here&#8217;s the code, use it as you like:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p123code2'); return false;">View Code</a> LISP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p1232"><td class="code" id="p123code2"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>ns sysinfo
  <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">gen-class</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">import</span> <span style="color: #66cc66;">&#40;</span>java<span style="color: #66cc66;">.</span>awt BorderLayout
		     GridLayout<span style="color: #66cc66;">&#41;</span>
	   <span style="color: #66cc66;">&#40;</span>java<span style="color: #66cc66;">.</span>awt<span style="color: #66cc66;">.</span>event ActionEvent
			   ActionListener<span style="color: #66cc66;">&#41;</span>
	   <span style="color: #66cc66;">&#40;</span>javax<span style="color: #66cc66;">.</span>swing JFrame
			JPanel
			JLabel
			JButton<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>def *x-coord* 30<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>def *y-coord* 30<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>def *width* 800<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>def *height* 230<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>def *prog-<span style="color: #b1b100;">name</span>* <span style="color: #ff0000;">&quot;SysInfo 1.0 [Clojure]&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>def *visible* true<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>def *resizable* true<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>def *frame* <span style="color: #b1b100;">nil</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>def *label-property-mappings*
     <span style="color: #66cc66;">&#123;</span> <span style="color: #ff0000;">&quot;OS Name&quot;</span> <span style="color: #ff0000;">&quot;os.name&quot;</span><span style="color: #66cc66;">,</span>
       <span style="color: #ff0000;">&quot;OS Architecture&quot;</span> <span style="color: #ff0000;">&quot;os.arch&quot;</span><span style="color: #66cc66;">,</span>
       <span style="color: #ff0000;">&quot;Java Classpath&quot;</span> <span style="color: #ff0000;">&quot;java.class.path&quot;</span><span style="color: #66cc66;">,</span>
       <span style="color: #ff0000;">&quot;Java Version&quot;</span> <span style="color: #ff0000;">&quot;java.version&quot;</span><span style="color: #66cc66;">,</span>
       <span style="color: #ff0000;">&quot;Current working directory&quot;</span> <span style="color: #ff0000;">&quot;user.dir&quot;</span><span style="color: #66cc66;">,</span>
       <span style="color: #ff0000;">&quot;Resize to default&quot;</span> <span style="color: #ff0000;">&quot;Resize to default&quot;</span><span style="color: #66cc66;">,</span>
       <span style="color: #ff0000;">&quot;Clear&quot;</span> <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>defn resize-frame
  <span style="color: #66cc66;">&#91;</span>frame a b awidth bheight<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>doto frame
    <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>setBounds a b awidth bheight<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #66cc66;">&#40;</span>defn set-label-text <span style="color: #66cc66;">&#91;</span>label text<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>doto label
    <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>setText text<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>defn button-listener
  <span style="color: #ff0000;">&quot;Returns a ActionListener, which sets the text of the content label (label-content)
  to the appropriate system property (System.getProperty).&quot;</span>
  <span style="color: #66cc66;">&#91;</span>property label frame<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>proxy <span style="color: #66cc66;">&#91;</span>ActionListener<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&#40;</span>actionPerformed <span style="color: #66cc66;">&#91;</span>evt<span style="color: #66cc66;">&#93;</span>
		     <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>system-property-<span style="color: #b1b100;">value</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span> System getProperty property<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		       <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>equalsIgnoreCase property <span style="color: #ff0000;">&quot;Resize to default&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
			 <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>equalsIgnoreCase property <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
			   <span style="color: #66cc66;">&#40;</span>set-label-text label <span style="color: #66cc66;">&#40;</span>str <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>getActionCommand evt<span style="color: #66cc66;">&#41;</span> <span style="color: #ff0000;">&quot;: <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> system-property-<span style="color: #b1b100;">value</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
			   <span style="color: #66cc66;">&#40;</span>set-label-text label property<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
			 <span style="color: #66cc66;">&#40;</span>resize-frame frame *x-coord* *y-coord* *width* *height*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defmacro</span> doto-each
  <span style="color: #ff0000;">&quot;Macro, that works like doto-macro, only that it does it for each object in objects.
  varname is bound to each object in turn inside of the body (forms) and can be used to access the current
  object, if needed.&quot;</span>
  <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#91;</span>varname <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&amp;</span> objects<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&amp;</span> forms<span style="color: #66cc66;">&#93;</span>
  `<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">do</span>
     ~@<span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>fn <span style="color: #66cc66;">&#91;</span>f<span style="color: #66cc66;">&#93;</span> `<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>~varname ~f<span style="color: #66cc66;">&#93;</span>
		       <span style="color: #66cc66;">&#40;</span>doto ~f
			 ~@forms<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	    objects<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defmacro</span> add-each
  <span style="color: #ff0000;">&quot;Macro, that calls .add on to-object with each object in objects.&quot;</span>
  <span style="color: #66cc66;">&#91;</span>to-object <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&amp;</span> objects<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>
  `<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">do</span>
     ~@<span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>fn <span style="color: #66cc66;">&#91;</span>o<span style="color: #66cc66;">&#93;</span> `<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>add ~to-object ~o<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	    objects<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>defn create-new-sysinfo-window
  <span style="color: #ff0000;">&quot;Creates the main form and returns it. Mainly GUI-related stuff (javax.swing).&quot;</span>
  <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>frame <span style="color: #66cc66;">&#40;</span>JFrame<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;Adztec-Independent.de: SysInfo Clojure-style!&quot;</span><span style="color: #66cc66;">&#41;</span>
	panel-header <span style="color: #66cc66;">&#40;</span>JPanel<span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#41;</span>
	panel-main <span style="color: #66cc66;">&#40;</span>JPanel<span style="color: #66cc66;">.</span> <span style="color: #66cc66;">&#40;</span>BorderLayout<span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	panel-left <span style="color: #66cc66;">&#40;</span>JPanel<span style="color: #66cc66;">.</span> <span style="color: #66cc66;">&#40;</span>GridLayout<span style="color: #66cc66;">.</span> <span style="color: #cc66cc;">6</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	panel-south <span style="color: #66cc66;">&#40;</span>JPanel<span style="color: #66cc66;">.</span> <span style="color: #66cc66;">&#40;</span>GridLayout<span style="color: #66cc66;">.</span> <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #808080; font-style: italic;">;; labels</span>
	label-header <span style="color: #66cc66;">&#40;</span>JLabel<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;System Information&quot;</span><span style="color: #66cc66;">&#41;</span>
	label-blank <span style="color: #66cc66;">&#40;</span>JLabel<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#41;</span>
	label-content <span style="color: #66cc66;">&#40;</span>JLabel<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#41;</span>
	label-adztec-indep <span style="color: #66cc66;">&#40;</span>JLabel<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;by www.adztec-independent.de&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
&nbsp;
    <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>setHorizontalAlignment label-blank <span style="color: #66cc66;">&#40;</span>JLabel/CENTER<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>setHorizontalAlignment label-adztec-indep <span style="color: #66cc66;">&#40;</span>JLabel/CENTER<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;">;; buttons</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>btn-java-cp <span style="color: #66cc66;">&#40;</span>JButton<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;Java Classpath&quot;</span><span style="color: #66cc66;">&#41;</span>
	  btn-java-version <span style="color: #66cc66;">&#40;</span>JButton<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;Java Version&quot;</span><span style="color: #66cc66;">&#41;</span>
	  btn-os-<span style="color: #b1b100;">name</span> <span style="color: #66cc66;">&#40;</span>JButton<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;OS Name&quot;</span><span style="color: #66cc66;">&#41;</span>
	  btn-os-arch <span style="color: #66cc66;">&#40;</span>JButton<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;OS Architecture&quot;</span><span style="color: #66cc66;">&#41;</span>
	  btn-current-working-dir <span style="color: #66cc66;">&#40;</span>JButton<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;Current working directory&quot;</span><span style="color: #66cc66;">&#41;</span>
	  btn-resize-to-default <span style="color: #66cc66;">&#40;</span>JButton<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;Resize to default&quot;</span><span style="color: #66cc66;">&#41;</span>
	  btn-clear-all <span style="color: #66cc66;">&#40;</span>JButton<span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;Clear&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
      <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">do</span>
	<span style="color: #808080; font-style: italic;">;; add button-listener to all buttons</span>
	<span style="color: #66cc66;">&#40;</span>doto-each  <span style="color: #66cc66;">&#91;</span>btn <span style="color: #66cc66;">&#91;</span>btn-java-cp
			  btn-java-version
			  btn-os-<span style="color: #b1b100;">name</span>
			  btn-os-arch
			  btn-current-working-dir
			  btn-resize-to-default
			  btn-clear-all<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>
&nbsp;
		      <span style="color: #808080; font-style: italic;">;; add listener to button</span>
		    <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>addActionListener
		     <span style="color: #66cc66;">&#40;</span>button-listener <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">get</span> *label-property-mappings* <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>getText btn<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> label-content frame<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">;; add buttons to panel</span>
	<span style="color: #66cc66;">&#40;</span>add-each panel-left
		  <span style="color: #66cc66;">&#91;</span>btn-java-cp
		   btn-java-version
		   btn-os-<span style="color: #b1b100;">name</span>
		   btn-os-arch
		   btn-current-working-dir<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#40;</span>add-each panel-south
		  <span style="color: #66cc66;">&#91;</span>btn-resize-to-default
		   btn-clear-all<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">;; add labels to panel</span>
	<span style="color: #66cc66;">&#40;</span>add-each panel-header
		  <span style="color: #66cc66;">&#91;</span>label-header
		   label-blank<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>add panel-south label-adztec-indep<span style="color: #66cc66;">&#41;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">;; pack on frame</span>
	<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>content-pane <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>getContentPane frame<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	  <span style="color: #66cc66;">&#40;</span>add-each content-pane
		    <span style="color: #66cc66;">&#91;</span>panel-main
		     label-content<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
	  <span style="color: #66cc66;">&#40;</span>doto content-pane
	    <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>add BorderLayout/NORTH panel-header<span style="color: #66cc66;">&#41;</span>
	    <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>add BorderLayout/WEST panel-left<span style="color: #66cc66;">&#41;</span>
	    <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>add BorderLayout/SOUTH panel-south<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#40;</span>doto frame
	  <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>pack<span style="color: #66cc66;">&#41;</span>
	  <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>setTitle *prog-<span style="color: #b1b100;">name</span>*<span style="color: #66cc66;">&#41;</span>
	  <span style="color: #66cc66;">&#40;</span>resize-frame *x-coord* *y-coord* *width* *height*<span style="color: #66cc66;">&#41;</span>
	  <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>setVisible *visible*<span style="color: #66cc66;">&#41;</span>
	  <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>setResizable *resizable*<span style="color: #66cc66;">&#41;</span>
	  <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span>setDefaultCloseOperation JFrame/HIDE_ON_CLOSE<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    frame<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;; return frame</span>
&nbsp;
&nbsp;
<span style="color: #66cc66;">&#40;</span>defn -main
  <span style="color: #ff0000;">&quot;Main function. Gets called by the system, if used as an executable .jar file.&quot;</span>
  <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>*frame* <span style="color: #66cc66;">&#40;</span>create-new-sysinfo-window<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
       <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">.</span> Thread <span style="color: #66cc66;">&#40;</span>sleep <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.adztec-independent.de/2009/01/clojure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

