<?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>B:\datenbrei &#187; Mono/C#</title>
	<atom:link href="http://b4mad.net/datenbrei/skos/coding/mono/feed/" rel="self" type="application/rss+xml" />
	<link>http://b4mad.net/datenbrei</link>
	<description>Collaborating Individuals - All Knowledge on one Floppy</description>
	<lastBuildDate>Mon, 18 Feb 2013 08:00:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Hacking Jena and Mono/C#</title>
		<link>http://b4mad.net/datenbrei/archives/2006/01/19/hacking-jena-and-monoc/</link>
		<comments>http://b4mad.net/datenbrei/archives/2006/01/19/hacking-jena-and-monoc/#comments</comments>
		<pubDate>Thu, 19 Jan 2006 20:03:22 +0000</pubDate>
		<dc:creator>[GNU]</dc:creator>
				<category><![CDATA[CIL]]></category>
		<category><![CDATA[Mono/C#]]></category>
		<category><![CDATA[semantic web]]></category>

		<guid isPermaLink="false">http://B4mad.Net/datenbrei/?p=266</guid>
		<description><![CDATA[After a short discussion with AndyS on #jena I reengaged on writing a C# application (using Mono) that uses Jena. Compiling all the ARQ-1.2 .jars to CIL using ikvmc was an easy job: ikvmc commons-logging.jar log4j-1.2.12.jar -out:log4j.dll -target:library ikvmc stax-api-1.0.jar wstx-asl-2.8.jar xercesImpl.jar xml-apis.jar \ resolver.jar -out:xml.dll -target:library ikvmc antlr-2.7.5.jar arq.jar concurrent.jar icu4j_3_4.jar \ jakarta-oro-2.0.8.jar jena.jar [...]]]></description>
				<content:encoded><![CDATA[<p>After a short discussion with AndyS on #jena I reengaged on writing a C# application (using <a href="http://www.go-mono.com/">Mono</a>) that uses <a href="http://jena.sourceforge.net/">Jena</a>. Compiling all the <a href="http://jena.sourceforge.net/ARQ/FAQ.html">ARQ</a>-1.2 <code>.jar</code>s to <a href="http://http://en.wikipedia.org/wiki/Common_Intermediate_Language">CIL</a> using <code>ikvmc</code> was an easy job:</p>
<pre><code>
ikvmc commons-logging.jar log4j-1.2.12.jar  -out:log4j.dll -target:library
ikvmc stax-api-1.0.jar wstx-asl-2.8.jar xercesImpl.jar xml-apis.jar \
 resolver.jar -out:xml.dll -target:library
ikvmc antlr-2.7.5.jar arq.jar concurrent.jar icu4j_3_4.jar \
jakarta-oro-2.0.8.jar jena.jar -reference:xml.dll -reference:log4j.dll \
 -out:arq.dll -target:library
</code></pre>
<p>A short test if the Jena classes are working was derived from an example of the Jena documentatio and worked out just fine&#8230; replacing <code>import</code> with <code>using</code> and omitting the trailing <code>.*</code> gave quick working results.</p>
<p>The hard part starts if it comes to <a href="http://jena.sourceforge.net/DB/mysql-howto.html">persistent Jena Models</a>. I am using MySQL, so I <code>ikvmc</code>ed the Java MySQL 3.2alpha driver and used the following code segment as learned from the docs:</p>
<pre><code>
  System.Activator.CreateInstance(&quot;mysql32alpha&quot;, 
     &quot;com.mysql.jdbc.Driver&quot;);

  IDBConnection idbcon = new  DBConnection(&quot;jdbc:mysql://db-server-2/jena23&quot;, 
     &quot;jdbc&quot;, &quot;password&quot;, &quot;MySQL&quot;);
</code></pre>
<p><code>mysql32alpha</code> is the name of the assembly where the class <code>com.mysql.jdbc.Driver</code> is to be found. Compiling the code went well, running it resulted in <code>Exception: Failure to instantiate DB Driver:MySQL java.lang.NullPointerException</code>. So, I droppt the ikvm developers a line&#8230; awaiting an answer. Hang on for updates</p>
<p><strong>UPDATE 1</strong>: With the devine intervention of &#8220;reinstall and configure your tool chain&#8221; I did that, currently running:</p>
<pre><code>
goern@node-236:~/src/mono/ARQ-1.2$ ikvm -version
CLR version: 1.1.4322.2032 (32 bit)
System: 1.0.5000.0
IKVM.Runtime: 0.22.0.0
IKVM.GNU.Classpath: 0.22.0.0
ikvm: 0.22.0.0
mscorlib: 1.0.5000.0
GNU Classpath version: 0.19
goern@node-236:~/src/mono/ARQ-1.2$ mono --version
Mono JIT compiler version 1.1.13.1, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV      : normal
</code></pre>
<p>Redoing the build process I got the ARQ and MySql <code>.dll</code>s and my binary, compiled just fine and runs fine. JDBC Connection is opned up, Jena Model gets opened and all the content dumped to Console. Having all the good tools in place two point araise:</p>
<p>1. Determining the Language you use is hard! C# just looks like Java to me at the moment:</p>
<pre><code>
using System;
using com.hp.hpl.jena.rdf.model;
using com.hp.hpl.jena.db;

public class hodge {
   public static void Main() {
           IDBConnection idbcon = null;
           ModelMaker maker = null;
           Model model = null;

           System.Activator.CreateInstance(&quot;mysql32alpha&quot;,
            &quot;com.mysql.jdbc.Driver&quot;);

           idbcon = new  DBConnection(&quot;jdbc:mysql://server/jena23&quot;, 
            &quot;user&quot;, &quot;pass&quot;, &quot;MySQL&quot;);
           if (idbcon == null)
                   Console.WriteLine(&quot;no IDBConnection&quot;);

           try {
                   maker = ModelFactory.createModelRDBMaker(idbcon);
                   model = maker.openModel(&quot;pim&quot;);
           } catch (Exception e) {
                   Console.WriteLine(&quot;Exception: &quot; + e.Message);
           }

           Console.WriteLine(model); // model.write(System.out);
   }
}
</code></pre>
<p>2. C# and Mono world seems to be open for Jena.</p>
<p>PS: I have attached a <a href="http://b4mad.net/2006/01/20/jena-sharp.tar.gz">distribution</a> that contains a nant build file for the tasks above and the source code, just configure at top of <code>build.build</code>.</p>
<p>PPS: I have not tested this under some MS Windows.</p>
]]></content:encoded>
			<wfw:commentRss>http://b4mad.net/datenbrei/archives/2006/01/19/hacking-jena-and-monoc/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Vor und zurÃ¼ck, vor und zurÃ¼ck</title>
		<link>http://b4mad.net/datenbrei/archives/2005/07/12/vor-und-zuruck-vor-und-zuruck/</link>
		<comments>http://b4mad.net/datenbrei/archives/2005/07/12/vor-und-zuruck-vor-und-zuruck/#comments</comments>
		<pubDate>Tue, 12 Jul 2005 07:35:06 +0000</pubDate>
		<dc:creator>[GNU]</dc:creator>
				<category><![CDATA[Mono/C#]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://B4mad.Net/datenbrei/?p=171</guid>
		<description><![CDATA[Gestern abend habe ich das Gizmo Project gefunden, der Skype killer wie man so hÃ¶rt&#8230; Der Gizmo client steht momentan nur fÃ¼r Windows und MacOSX zur VerfÃ¼gung, wird aber ab August auch unter Linux verfÃ¼gbar sein. Also: sipgate&#8217;s x-lite aus, Skype client aus und gizmo an. Sieht gut aus und ist in der Tat genau [...]]]></description>
				<content:encoded><![CDATA[<p>Gestern abend habe ich das <a href="http://www.gizmoproject.com/">Gizmo Project</a> gefunden, <em>der</em> <a href="http://www.skype.com/">Skype</a> <a href="http://www.theappleblog.com/2005/07/01/flexible-communications/">killer</a> wie man so hÃ¶rt&#8230; Der Gizmo client steht momentan nur fÃ¼r Windows und MacOSX zur VerfÃ¼gung, wird aber ab August auch unter Linux verfÃ¼gbar sein. Also: sipgate&#8217;s x-lite aus, Skype client aus und gizmo an. Sieht gut aus und ist in der Tat genau wie Skype vÃ¶llig ohne irgendwelche Konfigurationen benutzbar. </p>
<p>Erster Anruf geht zum echo service, erstaunlich gute SprachqualitÃ¤t ist das Resultat, besser als bei einer X-Lite Installation und genau so gut wie bei Skype. Zweiter Anruf gilt meiner sipgate voice mailbox: geht auch gut, wenn man mal ausgefunden hat was die <a href="https://secure.sipgate.de/user/tarife.php?show=6">sipgate Vorwahl</a> aus dem sipphone Netz ist: 1777, umgekeht ist es 000747 . </p>
<p>Fazit ist, dass ich einen neuen Versuch starten werde SIP zu nutzen, scheinbar hat sich sowohl die Bedienbarkeit eines clients als auch die SprachqualitÃ¤t verbessert. </p>
]]></content:encoded>
			<wfw:commentRss>http://b4mad.net/datenbrei/archives/2005/07/12/vor-und-zuruck-vor-und-zuruck/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>blam and my Mac</title>
		<link>http://b4mad.net/datenbrei/archives/2005/03/02/blam-and-my-mac/</link>
		<comments>http://b4mad.net/datenbrei/archives/2005/03/02/blam-and-my-mac/#comments</comments>
		<pubDate>Wed, 02 Mar 2005 15:08:11 +0000</pubDate>
		<dc:creator>[GNU]</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[macish]]></category>
		<category><![CDATA[Mono/C#]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://B4mad.Net/datenbrei/archives/2005/03/02/blam-and-my-mac/</guid>
		<description><![CDATA[Last night I started a sudo port install mono gtk-sharp mozilla and after setting the pkg-config path to some correct value (export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig &#8211; for a standad darwinports installation) the machine compiled for several hours, something arround 7hrs. Finally it left me with a working mono 1.1.4 (without globalization support?? why??) and a pretty complete [...]]]></description>
				<content:encoded><![CDATA[<p>Last night I started a <code>sudo port install mono gtk-sharp mozilla</code> and after setting the pkg-config path to some correct value (<code>export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig</code> &#8211; for a standad <a href="http://darwinports.org/">darwinports</a> installation) the machine compiled for several hours, something arround 7hrs. Finally it left me with a working mono 1.1.4 (without globalization support?? why??) and a pretty complete <a href="http://gnome.org" alt="Gnome">Gnome</a> 2.8 installation. </p>
<p>Next to give a shot to was <a href="http://www.imendio.com/projects/blam/" alt="Blam">Blam</a>, configured and compiled without any error and installed to /usr/local/blam-1.6.1/ Starting the binary resulted in a error message (I guess) of Mono:<br />
<code>
<pre>
nostromo:/usr/local/blam-1.6.1 goern$ ./bin/blam 

Unhandled Exception: System.DllNotFoundException: libblam.dylib
in &lt;0x000d0&gt; (wrapper managed-to-native) Imendio.Blam.MessageConnection:bacon_message_connection_new (string)
in &lt;0x00028&gt; Imendio.Blam.MessageConnection:.ctor (string)
in &lt;0x000e4&gt; Imendio.Blam.Application:.ctor (string[],object[])
in &lt;0x00054&gt; Imendio.Blam.Application:Main (string[])

nostromo:/usr/local/blam-1.6.1 goern$ <blink>_</blink>
</pre>
<p></code></p>
<p>Anyone got an idea if this is related to Mono or Blam or the MacOSX dynamic linker or &#8230;</p>
<p style="text-align:right;"><span style="font-size:10pt;">[posted with </span><span style="font-size:10pt;"><a href="http://ecto.kung-foo.tv">ecto</a></span><span style="font-size:10pt;">]</span></p>
]]></content:encoded>
			<wfw:commentRss>http://b4mad.net/datenbrei/archives/2005/03/02/blam-and-my-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
