<?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/"
		xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Pragmatic Revelations &#187; Ada</title>
	<atom:link href="http://adrianhoe.com/adrianhoe/tag/ada/feed/" rel="self" type="application/rss+xml" />
	<link>http://adrianhoe.com/adrianhoe</link>
	<description>The Eccentric Logic of An Eclectic Mind</description>
	<lastBuildDate>Sun, 27 Nov 2011 04:24:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<copyright>Copyright &#xA9; Pragmatic Revelations 2011 </copyright>
	<managingEditor>mailbox@adrianhoe.com (Pragmatic Revelations)</managingEditor>
	<webMaster>mailbox@adrianhoe.com (Pragmatic Revelations)</webMaster>
	<ttl>28000</ttl>
	<image>
		<url>http://adrianhoe.com/adrianhoe/blog/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>Pragmatic Revelations</title>
		<link>http://adrianhoe.com/adrianhoe</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>The Eccentric Logic of An Eclectic Mind</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Society &#38; Culture" />
	<itunes:author>Pragmatic Revelations</itunes:author>
	<itunes:owner>
		<itunes:name>Pragmatic Revelations</itunes:name>
		<itunes:email>mailbox@adrianhoe.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://adrianhoe.com/adrianhoe/blog/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<item>
		<title>Ada and Multiple Inheritance</title>
		<link>http://adrianhoe.com/adrianhoe/2011/07/28/ada-and-multiple-inheritance/</link>
		<comments>http://adrianhoe.com/adrianhoe/2011/07/28/ada-and-multiple-inheritance/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 21:24:15 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[At Work]]></category>
		<category><![CDATA[Call Me a Geek]]></category>
		<category><![CDATA[Days in My Life]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Inheritance]]></category>
		<category><![CDATA[Multiple Inheritance]]></category>
		<category><![CDATA[Object oriented]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Symmetry]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/?p=2423</guid>
		<description><![CDATA[When developing an information system which computes real-life data, one of the most common problems a software developer may encounter is multiple inheritance. Inheritance is one of the four aspects in Object-Oriented Programming (OOP). What is Object-Oriented? Object-oriented technique organizes software as collection of discrete objects incorporate with data structures and behaviors. Take a software that [...]]]></description>
			<content:encoded><![CDATA[<p>When developing an information system which computes real-life data, one of the most common problems a software developer may encounter is multiple inheritance. Inheritance is one of the four aspects in Object-Oriented Programming (OOP).</p>
<p>What is Object-Oriented?</p>
<p>Object-oriented technique organizes software as collection of discrete objects incorporate with data structures and behaviors. Take a software that keeps records of professors and students in a university for instance. Both professor and student are person. These three entities &#8211; <em>professor</em>, <em>student</em> and <em>person</em> are objects. A <em>person</em> has data structure such as name, gender and date of birth to make things simple. Both <em>professor</em> and <em>student</em> share the same data structure of <em>person</em>. A <em>professor</em> has employee number, salary, and room number. And a <em>student</em> has student number, courses and grades. Both <em>professor</em> and <em>student</em> have different behavior: to lecture and to learn respectively. We can let <em>professor</em> and <em>student</em> to inherit the same data structure and behavior from <em>person</em>. <em>Person</em> is superclass. Both <em>professor</em> and <em>student</em> are subclass. Now both <em>professor</em> and <em>student</em> can derive data structure and behavior from superclass <em>person</em> but at the same time, both can preserve their own data structure and behavior as <em>professor</em> and <em>student</em> respectively.</p>
<p>Multiple inheritance is where a subclass inherits from more than one super class. One of the most common problems with multiple inheritance is symmetry. Let subclass <em>D</em> inherits from superclasses <em>B</em> and <em>C</em> which inherit from another superclass <em>A</em>. This is called symmetric multiple inheritance.</p>
<p>Multiple inheritance is rather problematic at linguistic level. Many object-oriented programming languages support multiple inheritance and solve the problems in such a way that usually they cause surprises to their users. In the above example, the operations in <em>A</em> can be derived to <em>B</em> and <em>C</em> and overridden in any other ways by any one of them in <em>D</em>.</p>
<p>Ada provides different approach to implement multiple inheritance by simply not allowing user to get into such problem in the first place and to force the user to break the symmetry.</p>
<p>While I slip deeper into my software design, symmetric multiple inheritance occurs. I have two classes <em>A</em> and <em>B</em> where both of them inherit from object <em>List.Node</em>. Another subclass <em>C</em> inherits both superclass <em>A</em> and <em>B</em>. Ada forces me to break the symmetry by letting <em>C</em> to have a direct inheritance from <em>A</em> plus indirect secondary inheritance of <em>B</em>.</p>
<pre><code>
package List is
   type List is limited private;
   type Access_List is access List;

   type Node is tagged private;
   type Access_Node is access all Node'Class;

private

   type Node is tagged record
      Previous : Access_Node;
      Next       : Access_Node;
   end record;

   type List is limited record
      Head    : Access_Node := null;
      Tail       : Access_Node := null;
      Current : Access_Node := null;
      Count   : Unsigned := 0;
   end record;
end List;
</code></pre>
<pre><code>
   type A is new List.Node with private;

private

   type A is new List.Node with
      record
         Id   : Integer;
         Str  : String ( 1 .. 20 ) ;
      end record;
</code></pre>
<pre><code>
   type B is new List.Node with private;

private

   type B is new List.Node with
      record
         Precision : Float;
      end record;
</code></pre>
<pre><code>
   type C is new A with private;

private

   type C is new A with
      record
         Magic : B;
         Plate   : Integer;
      end record;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2011/07/28/ada-and-multiple-inheritance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The waking of a sleeping beauty</title>
		<link>http://adrianhoe.com/adrianhoe/2010/09/10/the-waking-of-a-sleeping-beauty/</link>
		<comments>http://adrianhoe.com/adrianhoe/2010/09/10/the-waking-of-a-sleeping-beauty/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 07:18:41 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[At Play]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Days in My Life]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[GtkAda]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Othello]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/?p=2283</guid>
		<description><![CDATA[I wrote a board game called AdaOthello way back in 2001 using Ada (of course) and GtkAda. AdaOthello is quite a beautiful piece of GUI that I had created for the first time using GtkAda on Linux. Unfortunately, I don&#8217;t have the time to improve the game engine and port it to Mac OS X. It [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a board game called <a href="http://adrianhoe.com/adrianhoe/projects/adaothello/" target="_blank">AdaOthello</a> way back in 2001 using Ada (of course) and GtkAda. <a href="http://adrianhoe.com/adrianhoe/projects/adaothello/" target="_blank">AdaOthello</a> is quite a beautiful piece of GUI that I had created for the first time using GtkAda on Linux. Unfortunately, I don&#8217;t have the time to improve the game engine and port it to Mac OS X. It became a sleeping beauty!</p>
<p>On August 27, <a href="http://blog.thorslund.org/" target="_blank">Gustaf Thorslund</a> contacted me about his wish to use my code and continue the development of <a href="http://adrianhoe.com/adrianhoe/projects/adaothello/" target="_blank">AdaOthello</a>. Today, I received another email from Gustaf informing me that he has revived the project.</p>
<p>First, I would like to express my gratitude to Gustaf to take my code, make a second home for it, and taking it to a new height. I originally released <a href="http://adrianhoe.com/adrianhoe/projects/adaothello/" target="_blank">AdaOthello</a> under GPL 2.0 or later and I continue to wish to keep it that way.</p>
<p>You can find <a href="http://adrianhoe.com/adrianhoe/projects/adaothello/" target="_blank">AdaOthello</a> at its second home <a href="http://blog.thorslund.org/posts/2010/Waking_up_a_sleeping_beauty/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2010/09/10/the-waking-of-a-sleeping-beauty/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nuclear power plant for Malaysia?</title>
		<link>http://adrianhoe.com/adrianhoe/2010/05/06/nuclear-power-plant-for-malaysia/</link>
		<comments>http://adrianhoe.com/adrianhoe/2010/05/06/nuclear-power-plant-for-malaysia/#comments</comments>
		<pubDate>Thu, 06 May 2010 05:23:55 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ada]]></category>
		<category><![CDATA[High Integrity]]></category>
		<category><![CDATA[Nuclear Energy]]></category>
		<category><![CDATA[Nuclear Power Plant]]></category>
		<category><![CDATA[Safety Critical]]></category>
		<category><![CDATA[SPARK]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/?p=2051</guid>
		<description><![CDATA[Two days ago, the Malaysian government announced that the country is considering to have nuclear power plant by 2021. This was certainly a good news, but after a while of mind mingling, I think the implementation could be a disaster! The nuclear energy is the greenest energy currently available on Earth. James Lovelock, a scientist, [...]]]></description>
			<content:encoded><![CDATA[<p>Two days ago, the Malaysian government announced that the country is considering to have nuclear power plant by 2021. This was certainly a good news, but after a while of mind mingling, I think the implementation could be a disaster!</p>
<p>The nuclear energy is the greenest energy currently available on Earth. James Lovelock, a scientist, environmentalist, futurologist and the father of Gaia Hypothesis wrote in his book: &#8220;The Vanishing Face of Gaia: A Final Warning&#8221;, that the nuclear energy is indeed greener than any other form of power generating plants including solar voltaic and wind energy farm. A 1GW wind farm requires 2 millions tons of concrete, enough to build 30,000 homes for 100,000 people. That quantity of concrete would release 1 million tons of carbon dioxide into the air.</p>
<p>The under-construction Bakun Dam, located in Sarawak on the Balui River, will be the tallest concrete-faced rockfill dam in the world and the largest dam in Asia outside of China. Its powerhouse with 8 penstocks to powertrains comprising 8 vertical shaft Francis turbines of 300MW each, 8 air-cooled generators of 360MVA each and 8 oil-immersed transformers (360MVA each) will generate about 2.4GW of electricity. The dam has 16.71 million cubic meters of filled volume.  With catchment area of 14,750 km square, its gross storage capacity is 43,800 million cubic meters. How much concrete is required to build this dam? How much carbon dioxide will be released by the concrete? How much biodiversity would have perished under catchment area that large?</p>
<p>I read from various sources about people&#8217;s objections (including politicians&#8217;) of this nuclear energy project. This should not be a political issue and never be one. This should be an environmental, safety and social-economic issues at top.</p>
<p>TNB, the sole electricity distributor/supplier in Malaysia is not the sole energy producer. TNB buys, under contract, energy from many other producers. Unfair advantages, unscrupulous practice and increasing fuel cost in the produce-supply chain have contributed to rising energy cost, leading Malaysians to cry foul. The substandard service provided by TNB worsens the situation. As a corporation with revenue of MYR25.75 billion and net income of MYR2.6 billion as of fiscal year 2008, TNB is cutting more corners to reduce its operating costs and to maximize its profit with unhealthy practices, e.g. bi-monthly meter reading practice has stirred uproars in recent week. Being greenest, nuclear energy is more profitable than any other energy production. Could this help to reduce electricity cost for Malaysians considering the unhealthy practices and unfair advantages TNB has in its glossary bag?</p>
<p>I am not going to write more about TNB&#8217;s malpractice and sluggish substandard service. Ask any Malaysians, they will be able to tell you stories whole day and night. Instead, I am going to write more about safety.</p>
<p>The next question: Is it really safe to have nuclear power plant in Malaysia? This question does not imply that nuclear power plant is not safe. Rather, the human factors in managing and operating the nuclear power plant.</p>
<p>Alongside the nuclear physics in the power plant is the safety critical computer system, which includes both hardware and software, that is used to control and monitor the nuclear power plant. This safety critical system is the most crucial part and the entire operation of a nuclear power plant heavily relies on it.</p>
<p>Safety critical system is a computer (including software), electronic or electromechanical system whose failure may be a catastrophe, causing injury or death to human beings. This safety critical system comprises high integrity software. The safety critical system, both hardware and software, will likely be integrated and maintained by foreign contractors.</p>
<p>Nuclear power plant software are developed using Ada and/or SPARK programming language. SPARK is a subset of Ada. In the mid 1990s, UTM (University Technology Malaysia) KL campus was teaching Ada in CASE (Center for Advanced Software Engineering). At that time, CASE was a collaboration between UTM and Thomson CSF under special arrangement between the government of France and Malaysia. The Ada course was not long lived. Two years later, it was replaced by Java due to ignorance and market driven trends. Java is not a suitable candidate for high integrity, safety critical, real-time and distributed application development. Today, none of the universities in Malaysia is teaching Ada. According to my hitherto knowledge, apparently none of the Malaysia academies have submitted any high integrity and safety critical system related papers in international conferences and scientific journals.</p>
<p>It does not only require software engineers with Ada or SPARK knowledge. In safety critical software engineering, the individual developers, the entire team and organization are required to go through rigorous software development and safety critical validation processes. It takes years to achieve Carnegie-Mellon&#8217;s SEI (Software Engineering Institute) CMM (Capability Maturity Model) Level 5. Safety critical system development requires utterly strong discipline and engineering ethics in every requirement, design, development, testing and maintenance process and every process needs to be validated. Other than software process, there are many other non-software related risk assessments to comply.</p>
<p>Malaysia lacks qualified software engineers of such competency to develop and to maintain high integrity software system. It is costly to maintain such system by contract. The maintenance will increase the cost of energy production and hence will be borne by consumers.</p>
<p>The safety critical system of a nuclear power plant must be thoroughly tested with proven track records. With the loosey-goosey attitude of many Malaysians, will they have capability to manage the system and safety critical issues? Will they be effective to respond to emergencies, for example, system shutdown or nuclear melt down?</p>
<p>The disposal of nuclear waste poses another safety issue. If the engine of a RMAF (Royal Malaysia Air Force) fighter jet could go missing and be exported, can you imagine the potential hazard of missing nuclear waste?</p>
<p>Objection should be rational, not emotional. It is imbecilic to politicize the objection without scrutinizing facts. I, in my book, embrace nuclear energy for it is the greenest energy. On the contrary, I do not have any confidence in the management of safety related issues in Malaysia.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2010/05/06/nuclear-power-plant-for-malaysia/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>A hot Sunny affair</title>
		<link>http://adrianhoe.com/adrianhoe/2009/03/26/a-hot-sunny-affair/</link>
		<comments>http://adrianhoe.com/adrianhoe/2009/03/26/a-hot-sunny-affair/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 19:03:59 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[vmware fusion]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/?p=1617</guid>
		<description><![CDATA[I have been hesitating for another hot Sunny affair since the last one about three years ago. This is just another one I have been longing since then. The recent eclipse of Sun resurrects my overwhelming but sleeping desire. Although this happened near the time when Sun is setting, but it is never too late [...]]]></description>
			<content:encoded><![CDATA[<p>I have been hesitating for another hot Sunny affair since the last one about three years ago. This is just another one I have been longing since then. The recent eclipse of Sun resurrects my overwhelming but sleeping desire. Although this happened near the time when Sun is setting, but it is never too late to do it again because Sunset is beautiful and romantic.</p>
<p>Will Sun set and never rise again? Here is my encounter of the hot Sunny affair.</p>
<p><span id="more-1617"></span></p>
<p>In <a href="http://adrianhoe.com/adrianhoe/2006/10/30/solaris-10/" target="_blank">October 2006</a>, I installed Solaris 10 on an Intel box code-named, Pyxis1 (I love to name my computers after the name of a planet, a star or a constellation). The installation was successful but I could not get it to configured to work correctly. Some of the configuration would disappear every time I restarted the server. I could not find the reasons and I was on tight schedule to get the server up and running. I replaced Solaris 10 with Debian and eventually with Ubuntu. Read the story <a href="http://adrianhoe.com/adrianhoe/2007/09/26/ubuntu-feisty-fawn/" target="_blank">here</a>.</p>
<p>Solaris 10, in my opinion, is by far a better and more robust operating system than Linux. The fallback was the lack of installation information on older machines. That&#8217;s the bottom line of the configuration problem I had three years ago.</p>
<p>Last May, I began the <a href="http://adrianhoe.com/adrianhoe/2008/05/14/virtualization-installing-ubuntu-linux-with-vmware-on-macbook/" target="_blank">virtualization</a> of my MacBook and I had Ubuntu installed and ran parallel with Mac OS X. I tried to install Solaris 10 on VMware Fusion. Installation was successful but I never got it to boot after the installation. Again, I gave up and went on with Ubuntu.</p>
<p>On Sunday, I upgraded VMware Fusion 1.1.3 to 2.0.2 and read about successful installation of OpenSolaris on Mac. I decided to give it another try.</p>
<p><a href="http://opensolaris.org/os/" target="_blank">OpenSolaris</a> is a community-driven open source version of <a href="http://www.sun.com/software/solaris/index.jsp" target="_blank">Solaris</a>. Solaris is a proprietary UNIX operating system by <a href="http://sun.com" target="_blank">Sun Microsystems</a>. Sun plays an active role in open source software such as OpenOffice, MySQL and OpenSolaris.</p>
<p><a href="http://www.vmware.com/products/fusion/" target="_blank">VMware Fusion</a> 2.x has many major improvements. One obvious change is the Virtual Machine Library window. It shows you the snapshots of your virtual machines.</p>
<div class="wp-caption alignnone" style="width: 410px"><img src="http://adrianhoe.com/adrianhoe/images/blog/2009/OpenSolaris_01.png" alt="The Virtual Machine Library window showing the snapshots of OpenSolaris and Windows XP" width="400" height="237" /><p class="wp-caption-text">The Virtual Machine Library window showing the snapshots of OpenSolaris and Windows XP</p></div>
<p>Ok, ok. I have a Windows XP installed. For those who know I have ditched all Windows since 1998, I have some inevitable reasons. First, I need it to support my clients on some hardware and software configurations. Second, I needed it to support my Garmin GPS device. And thirdly, I need it for some non-appealing reasons. I have it installed to avoid having the need to hunt for a Windows desktop for some petty simple jobs. I used the Windows virtual machine under 10 times since last May. Simple put it, I just need it to get some simple jobs done, otherwise it is just a piece of shit occupying 5GB of disk space on my MacBook.</p>
<p>Installation of OpenSolaris was quite pleasant and simple (although it took about half hour). During the installation, I was surprised to learn that OpenSolaris has something called Time Slider which is an automated backup software similar to Apple&#8217;s Time Machine.</p>
<p>My hardware configuration:</p>
<ol>
<li>MacBook White, 2.16GHz Intel Core 2 Duo</li>
<li>2GB 667MHz DDR2 SDRAM</li>
<li>160GB hard disk</li>
<li>Mac OS X 10.5.6</li>
</ol>
<p>My virtual machine configuration:</p>
<ol>
<li>VMware Fusion 2.0.2</li>
<li>2 virtual CPU, 720MB RAM</li>
<li>15GB hard disk space</li>
</ol>
<div class="wp-caption alignnone" style="width: 410px"><img src="http://adrianhoe.com/adrianhoe/images/blog/2009/OpenSolaris_02.png" alt="Installation screen showing Time Slider" width="400" height="250" /><p class="wp-caption-text">Installation screen showing Time Slider</p></div>
<p>I will never need Time Slider on my Mac Book but I may need it after I switch from Ubuntu to OpenSolaris on Pyxis1. Until then, I am unable to tell if Time Slider is as good as Time Machine.</p>
<p>There are a few patches and manual installation after the first boot to solve some problems:</p>
<ol>
<li>The sound is not working.</li>
<li>No networking (you may not experience this).</li>
<li>The Apple&#8217;s menu bar is not appearing when virtual machine is running in full screen mode.</li>
<li>Need some packages from OpenSolaris repository in order to get the Ada compiler working (for Ada programmers only).</li>
</ol>
<div class="wp-caption alignnone" style="width: 410px"><img src="http://adrianhoe.com/adrianhoe/images/blog/2009/OpenSolaris_03.png" alt="OpenSolaris running at full screen on MacBook White." width="400" height="250" /><p class="wp-caption-text">OpenSolaris running at full screen on MacBook White.</p></div>
<p>First thing after restarting from installation is to install VMware Tools. At window mode, click on the Virtual Machine menu bar and select Install VMware Tools. A CD icon will appear on the OpenSolaris desktop. Open it and copy the zipped file to the desktop then extract and follow the steps below:</p>
<pre><code># cd Desktop/vmware-tools-distrib
# ./vmware-install.pl
</code></pre>
<div class="wp-caption alignnone" style="width: 410px"><img src="http://adrianhoe.com/adrianhoe/images/blog/2009/OpenSolaris_04.png" alt="OpenSolaris virtual machine running in window mode" width="400" height="373" /><p class="wp-caption-text">OpenSolaris virtual machine running in window mode</p></div>
<p>After installing VMware Tools, you will be able to access to Mac OS X menu bar when virtual machine is running full screen mode. Move the mouse pointer to top of the screen and the menu bar will drop down.</p>
<p>If the two networking icons on the top right do not show green badge as in the screenshot below, then make sure your Virtual Machine Network Settings is connected and set to NAT (share the Mac&#8217;s network connection). The network should also work in Bridged mode. Also make sure the OpenSolaris network interface is connected to <span style="font-family:Courier;">e1000g0</span> and is active.</p>
<div class="wp-caption alignnone" style="width: 247px"><img src="http://adrianhoe.com/adrianhoe/images/blog/2009/OpenSolaris_05.png" alt="Two networking status icons with green badge" width="237" height="39" /><p class="wp-caption-text">Two networking status icons with green badge</p></div>
<p>Otherwise, click on System &gt; Administration &gt; Network to set it to auto configure. Your network should be up and running. </p>
<p>Next is to activate the sound. Download OSS (Open Sound System) driver at <a href="http://4front-tech.com/download.cgi" target="_blank">http://4front-tech.com/download.cgi</a> and install it as follow:</p>
<pre><code># pkgadd -d oss-solaris-v4.0-123-i386.pkg
# osstest
</code></pre>
<p>After the installation, run <span style="font-family:Courier;">osstest</span> to test the sound system. You will hear a tune playing on your speakers. You may need to reboot your system to allow the driver to properly load.</p>
<p>There are a few more packages to be downloaded and installed from OpenSolaris.org repository. To install gcc4ada from BlastWave, you will need <span style="font-family:Courier;">SUNWgnu-libiconv</span> and <span style="font-family:Courier;">SUNWarc</span>. Start Package Manager to download and install them from OpenSolaris repository. If you need source code management, you will need <span style="font-family:Courier;">SUNWsvn</span> as well.</p>
<p>The OpenSolaris repository does not have Ada compiler (gccada) and only supports gcc 3.4.3. You will have to install Ada compiler from another repository at <a href="http://blastwave.org" target="_blank">Blastwave</a>.</p>
<p>To download and install software packages from Blastwave, you need <span style="font-family:Courier;">pkgutil</span>. Download and install <span style="font-family:Courier;">pkgutil</span> and other necessary packages by following the instruction at Blastwave site. You can obtain a list of software packages that you need from Blastwave. After installing <span style="font-family:Courier;">pkgutil</span>, you may want to include <span style="font-family:Courier;">/opt/csw/bin</span> to your path.</p>
<p>If you need an Ada 2005 compiler, then download and install <span style="font-family:Courier;">gcc4ada</span>:</p>
<pre><code># pkgutil --install gcc4ada
</code></pre>
<p>Include <span style="font-family:Courier;">/opt/csw/gcc/bin</span> to your path and the Ada compiler is ready. I checked out a project from my svn repository and compiled. Viola! I am happy with the performance which I find is better than Ubuntu and any other Linux distros. One drawback of OpenSolaris or Solaris is the limited software packages. There are more than a thousand ready-built software packages to download in every Linux distros. That means you will have to build some of the software you need on Solaris (and OpenSolaris).</p>
<p>I removed and re-installed OpenSolaris yesterday after I found some broken links due to not following the instructions correctly. Always read installation instructions from various sources carefully before installing. I find the trouble is worthy otherwise I will not have a clear summarized steps to write about here.</p>
<p>With the recent IBM&#8217;s announcement to acquire Sun Microsystems, I hope Sun will not be cannibalized after the acquisition. And I hope that Sun is not setting but if it must, it will rise again. OpenSolaris and UltraSPARC processors are one of the leading technologies available.</p>
<p>I hope to find time on a weekend to install OpenSolaris on the Sun Blade 100. It is still running Solaris 9 since 2003.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2009/03/26/a-hot-sunny-affair/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Objectively Boolean</title>
		<link>http://adrianhoe.com/adrianhoe/2009/02/11/objectively-boolean/</link>
		<comments>http://adrianhoe.com/adrianhoe/2009/02/11/objectively-boolean/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 18:34:23 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[At Work]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[C/C++]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/?p=1500</guid>
		<description><![CDATA[I was introduced to Objective-C in a workshop organized by Apple Malaysia about 3 years ago. Read my posts here and here. No real development using Objective-C after that. One plain reason for me to pick up Objective-C again recently is to develop Cocoa and Cocoa Touch applications for the Macs and iPhone (and iPod [...]]]></description>
			<content:encoded><![CDATA[<p>I was introduced to Objective-C in a workshop organized by Apple Malaysia about 3 years ago. Read my posts <a href="http://adrianhoe.com/adrianhoe/2006/11/29/first-hand-on-objective-c-and-cocoa/" target="_blank">here</a> and <a href="http://adrianhoe.com/adrianhoe/2006/11/29/cocoa-bindings-and-core-data-workshop/" target="_blank">here</a>. No real development using Objective-C after that.</p>
<p>One plain reason for me to pick up Objective-C again recently is to develop Cocoa and Cocoa Touch applications for the Macs and iPhone (and iPod Touch). Trying to having nonpartisan mind after so many years of using Ada (and away from C/C++ and variants) is a difficult task to comprehend. As an individual Ada developer (having my own opinion) I am finding C/C++ very compromising in many ways, for instance, readability of codes and safety. Although Objective-C has many improvement over C/C++, it is still lacking what Ada offers.</p>
<p>By syntax, Objective-C is still very much like C. A few obvious clues to tell if it is an Objective-C are the use of <span style="font-family:Courier;">#import</span>, instead of <span style="font-family:Courier;">#include</span>; the <span style="font-family:Courier;">@</span> sign; the Smalltalk-like message passing syntax and several others.</p>
<p>The <span style="font-family:Courier;">#include</span> statement in C/C++ has many drawbacks. One which seriously affecting compilation efficiency is the repeating includes of same header files. With <span style="font-family:Courier;">#import</span>, header files are included once only throughout entire compilation.</p>
<p>One deadly pitfall I have encountered so far is the way Boolean type is implemented in Objective-C. C supports Boolean data type, <span style="font-family:Courier;">bool</span>, which takes on the value of either <span style="font-family:Courier;">true</span> or <span style="font-family:Courier;">false</span>. Objective-C has similar data type, <span style="font-family:Courier;">BOOL</span>, which is 8-bit number that takes on <span style="font-family:Courier;">YES</span> as <span style="font-family:Courier;">1</span> and <span style="font-family:Courier;">NO</span> as <span style="font-family:Courier;">0</span>. If you unwittingly assign a 2-byte integer to a <span style="font-family:Courier;">BOOL</span> type, the result can be catastrophic. Only the lowest byte will be used for the value of <span style="font-family:Courier;">BOOL</span>. If the lowest byte is zero, for example, <span style="font-family:Courier;">4608</span> which its hexadecimal value is <span style="font-family:Courier;">0&#215;1200</span>, <span style="font-family:Courier;">BOOL</span> will be zero or <span style="font-family:Courier;">NO</span>.</p>
<p>Ada&#8217;s strong-typing disallows this to happen and thus saving, possibly countless hours of debugging. Personally, I like neither <span style="font-family:Courier;">bool</span> nor <span style="font-family:Courier;">BOOL</span>. I prefer Ada&#8217;s <span style="font-family:Courier;">Boolean</span>.</p>
<p>Unlike the dreaded C++, Objective-C does not support operator overloading and multiple inheritance. In Ada95, a restricted form of multiple inheritance is supported. In Ada2005, multiple inheritance is supported by new form of type called the interface type, similar to abstract tagged type with no components.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2009/02/11/objectively-boolean/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nassi-Shneiderman Diagram</title>
		<link>http://adrianhoe.com/adrianhoe/2008/09/12/nassi-shneiderman-diagram/</link>
		<comments>http://adrianhoe.com/adrianhoe/2008/09/12/nassi-shneiderman-diagram/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 04:44:58 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[At Home]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Ada]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[flow chart]]></category>
		<category><![CDATA[Nassi-Shneiderman]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/?p=1141</guid>
		<description><![CDATA[I came across a highly influential graphical representation method of stating algorithm while I was reading books of system analysis and design. This method is called Nassi-Shneiderman Diagram or NSD. It was developed by Isaac &#8220;Ike&#8221; Nassi and Ben Shneiderman in 1972. Isaac also helped design the Ada programming language. Many people claimed NSD to [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a highly influential graphical representation method of stating algorithm while I was reading books of system analysis and design. This method is called Nassi-Shneiderman Diagram or NSD. It was developed by <a title="Isaac Nassi" href="http://www.nassi.com/ike.html" target="_blank">Isaac &#8220;Ike&#8221; Nassi</a> and <a title="Ben Shneiderman" href="http://www.cs.umd.edu/~ben/" target="_blank">Ben Shneiderman</a> in 1972. Isaac also helped design the Ada programming language.</p>
<p>Many people claimed NSD to be very easy to read and understand, especially for beginners. This is probably quite true but maintaining NSD can be a problem for system designers. Unlike flowchart, NSD lumps all the symbols into one large block and does not use connectors between the symbols.</p>
<p>Contrary to flowchart which uses connectors, NSD provides a better structural approach of design where <em>Goto</em> should be avoided in structured programming. NSD provides simplicity and a compact overview of a program that can show some relationship nicely. NSD, in particular, provides visual aid and guides thinking about nested conditional structures.</p>
<p>Personally, I find that NSD is useful for rapid prototyping. It is quite simple and easy to draw a conceptual design before expanding into a flowchart. Modifying a stage or symbol in NSD is rather tedious compared to flowchart. On the other hand, after a careful and thorough investigation, I find NSD most suitable for structured system analysis, design and programming. NSD was designed with structured system analysis and design in mind as mentioned in the above paragraph, it has many advantages over flowchart despite of problem maintaining it. I think it is worth to study and to use it.</p>
<p>Here is an example of NSD and flowchart stating an algorithm to find a summation given by the equation:</p>
<p><img class="alignnone" src="http://adrianhoe.com/adrianhoe/images/blog/2008/nassi-shneiderman-summation.png" alt="" /> </p>
<p>If <em>S</em> &gt; 100, then display <em>k</em> and tell the user that <em>k</em> is in range.</p>
<p><span id="more-1141"></span></p>
<p><img class="alignnone" src="http://adrianhoe.com/adrianhoe/images/blog/2008/nassi-shneiderman.jpg" alt="" width="447" height="745" /></p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2008/09/12/nassi-shneiderman-diagram/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello? What is Ada?</title>
		<link>http://adrianhoe.com/adrianhoe/2008/07/09/hello-what-is-ada/</link>
		<comments>http://adrianhoe.com/adrianhoe/2008/07/09/hello-what-is-ada/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 15:46:21 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[At Work]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Days in My Life]]></category>
		<category><![CDATA[Seminar]]></category>
		<category><![CDATA[C]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/?p=770</guid>
		<description><![CDATA[I was giving an Ada talk this afternoon. The room was quite packed with students although not full. They were mainly 3rd year sem 1. Most of them were looking at technologies that they could work with their FYP (Final Year Project). While I regaled them with fascinating true facts of Ada, I could see [...]]]></description>
			<content:encoded><![CDATA[<p>I was giving an Ada talk this afternoon. The room was quite packed with students although not full. They were mainly 3rd year sem 1. Most of them were looking at technologies that they could work with their FYP (Final Year Project).</p>
<p>While I regaled them with fascinating true facts of Ada, I could see various reactions on their innocent and ignorant faces. Almost half of them gave an expression of &#8220;What is Ada going to do with my project?&#8221;, &#8220;What is Ada? Never heard of it.&#8221; or &#8220;Ada is old technology and is unpopular.&#8221; It was years of experience telling me not to waste too much time with such audiences. I quickly skimmed through some technical facts which they wouldn&#8217;t understand and continue regaling them with some interesting facts.</p>
<p>Finally, I had come to the end of the talk. It was the questions and answers session. No one had asked any questions except a girl who asked me about C# after the talk session was over. I explained to her the benefits of Ada over C# but she said she would have to start all over again. Again, my instinct told me not to waste time with such attitude and I turned my focus onto the two students whom I am supervising now. I continued with them a discussion of their project.</p>
<p>Unlike a couple of years back, I was too over-enthusiastic about Ada. I would talk regardless of audience reactions. After a few talks and a seminar this year, I find that I have changed. My enthusiasm is parallel to audience reaction.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2008/07/09/hello-what-is-ada/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mathematics &#8211; The Systematic Reasoning</title>
		<link>http://adrianhoe.com/adrianhoe/2008/05/21/mathematics-the-systematic-reasoning/</link>
		<comments>http://adrianhoe.com/adrianhoe/2008/05/21/mathematics-the-systematic-reasoning/#comments</comments>
		<pubDate>Tue, 20 May 2008 17:50:58 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[Call Me a Geek]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[Pascal]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Apple II]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Commodore]]></category>
		<category><![CDATA[CP/M]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[FORTRAN]]></category>
		<category><![CDATA[systematic discipline]]></category>
		<category><![CDATA[systematic reasoning]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/?p=716</guid>
		<description><![CDATA[I remembered the way my mathematic teachers taught maths in class. Although none of them explained why we must learn maths, as it was the way supposed to be, they taught me systematic problem solving. I began to appreciate the beauty of mathematics when I started immersing myself in programming. The algorithm development and language [...]]]></description>
			<content:encoded><![CDATA[<p>I remembered the way my mathematic teachers taught maths in class. Although none of them explained why we must learn maths, as it was the way supposed to be, they taught me systematic problem solving. I began to appreciate the beauty of mathematics when I started immersing myself in programming. The algorithm development and language constructs which are based on mathematics fascinate me with its beauty.</p>
<p>A good programming language teaches us systematic discipline and systematic reasoning. The first programming language which I learned was Commodore BASIC. I hated that. I learned half way (as the matter of fact, 2 days) and I switched to Apple Basic. In the mid 1980s, Apple II was the most popular home computer after Commodore VIC 20. Apple II that ran Apple DOS caught on the wagon very fast. The most common programming tool on Apple II was of course Apple BASIC. That was my first programming language and I had written many programs with it.</p>
<p>Then I was exposed to FORTRAN 77. The language construct was pretty much like Apple BASIC. I caught on with FORTRAN pretty fast. Then under some influences from friends whom I met at the computer center, I learned Apple Pascal. We challenged one another to increase the boot speed of Apple DOS. We rewrote Apple DOS with Apple Pascal and evidently increased the booting speed of Apple DOS.</p>
<p>Pascal is a very structured language (compared to Apple BASIC and FORTRAN 77) invented by Professor Niklaus Wirth to teach students programming and  systematic reasoning. The structural construct of the language enable the programmer to think of the problem in a structural approach. Pascal cultivates structural discipline in solving programming problems. Pascal has provided me most of the necessary training in systematic discipline and systematic reasoning in solving problems.</p>
<p>When CP/M was introduced on Apple II, I was able to use UCSD Pascal on CP/M enabled Apple II machines. It won&#8217;t be long before IBM and IBM compatibles (8086) stirred up a turmoil with MS-DOS. Then, Turbo Pascal (by Borland) emerged. Turbo Pascal was the lightest and fastest compiler at that time. I became addicted in writing computer programs with Turbo Pascal.</p>
<p>Then I caught on with C and C++ and began to develop software with Borland&#8217;s Turbo C/C++ compiler. When MS Windows became a de-facto standard on every desktop computers, I dwelled into Borland&#8217;s Delphi (based on Object Pascal) to develop GUI applications.</p>
<p>During Apple CP/M era, I was exposed to Ada. I discovered Ada compiler by accident in another computer shop. I bought the program without thinking twice. Of course, it was a pirated copy. There was no copyright law then. But thanks to the pirated Ada compiler, otherwise I would not know such beautiful programming language has ever existed!</p>
<p>In 1995, I started to learn Ada when books were available. In no time, I fell in love with Ada until today. Whenever I was told or perhaps requested to look at computer programs written in any other languages, e.g. PHP, Visual Basic, C/C++ and etc., I feel that represent an insult to mind trained in systematic reasoning as in Pascal papers which Professor Wirth wrote.</p>
<p>Ada and Pascal are very alike because Ada developers had adopted Pascal&#8217;s structural language construct. Both Ada and Pascal clearly represent logical expression without any difficulties. Both languages are constructed heavily based on mathematic concepts and thus enforce systematic discipline and systematic reasoning.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2008/05/21/mathematics-the-systematic-reasoning/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>China&#8217;s proven world class competency</title>
		<link>http://adrianhoe.com/adrianhoe/2008/04/13/chinas-proven-world-class-competency/</link>
		<comments>http://adrianhoe.com/adrianhoe/2008/04/13/chinas-proven-world-class-competency/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 05:20:55 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[China]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Humanity]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[snow hazard]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2008/02/15/chinas-proven-world-class-competency/</guid>
		<description><![CDATA[During the snow hazard in China this February, the Chinese government had successfully managed the natural disaster and crisis with much professionalism in such a short period of time. According to an unconfirmed source, the Chinese government managed to develop a Disaster Management System in just 5 days. 75 software engineers from the Chinese military [...]]]></description>
			<content:encoded><![CDATA[<p>During the snow hazard in China this February, the Chinese government had successfully managed the natural disaster and crisis with much professionalism in such a short period of time. According to an unconfirmed source, the Chinese government managed to develop a Disaster Management System in just 5 days. 75 software engineers from the Chinese military worked around the clock for 5 days to bring up a web based Disaster Management System to collect, manage, disseminate, coordinate, and to provide command and control to the military disaster relieve team during the recent snow hazard.</p>
<p>The system was developed using Ada, AWS (Ada Web Server) with a little of PHP and Perl. The system deploys a MySQL database running on Linux. The system is hooked up to air-borne SAR (Synthetic Aperture Radar) for real-time acquisition of landscaping information in snow hazard affected area to help assessing the damage of rail ways, roads, housing and forest. The Chinese army engineering company was dispatched by the system to areas in need of assistance.</p>
<p>I have yet to receive further details of how the system works and probably will not. Anyway, that shows the Chinese ability and responsiveness in dealing with natural disaster. Hail China!</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2008/04/13/chinas-proven-world-class-competency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coding War or Extinction of Human Race?</title>
		<link>http://adrianhoe.com/adrianhoe/2007/12/18/coding-war-or-extinction-of-human-race/</link>
		<comments>http://adrianhoe.com/adrianhoe/2007/12/18/coding-war-or-extinction-of-human-race/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 08:28:31 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Call Me a Geek]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[command and control]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[missile]]></category>
		<category><![CDATA[multi-threaded]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/12/18/coding-war-or-extinction-of-human-race/</guid>
		<description><![CDATA[When I stumbled on this story about a software engineer and his encounter of a bug in a missile launch command and control system, I read with delight because it has been a while since I read an exciting piece of story about Ada. On the other hand, I was so nervous because our extinction [...]]]></description>
			<content:encoded><![CDATA[<p>When I stumbled on this story about a software engineer and his encounter of a bug in a missile launch command and control system, I read with delight because it has been a while since I read an exciting piece of story about Ada. On the other hand, I was so nervous because our extinction might just be a string away.</p>
<p>The story is about a software engineer trying to maintain a 400KSLOC legacy system when the OS and compiler version were upgraded. You can read the full story <a href="http://blog.kickin-the-darkness.com/2007/12/coding-war-story-whats-your-point.html" target="_blank">here</a>.</p>
<p>It is pretty exciting to read about the job of working on the legacy Ada code of such mission critical system. Why was the error occurring? What would be the consequence if the missile launch test failed? What if the missile were launched &#8220;accidentally&#8221;?</p>
<p>I believe, one day, the human race will extinct as was portrait in the movie Terminator. The extinction will be due to an error in a software, or rather the negligence or ignorant of a software engineer.</p>
<p>What the story tells us is that it appeared to be some 20 lines of code  which caused the upheaval this Thanksgiving. May be it is really Thanksgiving for giving the human race another chance to survive. So, do what you want to do most, enjoy life while you can.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2007/12/18/coding-war-or-extinction-of-human-race/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Leopard unleashed!</title>
		<link>http://adrianhoe.com/adrianhoe/2007/10/28/leopard-unleashed/</link>
		<comments>http://adrianhoe.com/adrianhoe/2007/10/28/leopard-unleashed/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 14:46:18 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Leopard]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/10/28/leopard-unleashed/</guid>
		<description><![CDATA[Apple has unleashed Leopard (Mac OS 10.5) last week. It&#8217;s an awesome operating system beating all other OS flat out! New features such as time machine, desktop space, interoperability with Apple Mail and many more. Time Machine is a repository with version control system to keep track all the changes to your files and directories. [...]]]></description>
			<content:encoded><![CDATA[<p>Apple has unleashed Leopard (Mac OS 10.5) last week. It&#8217;s an awesome operating system beating all other OS flat out! New features such as time machine, desktop space, interoperability with Apple Mail and many more.</p>
<p>Time Machine is a repository with version control system to keep track all the changes to your files and directories. When you plug in a FireWire hard disk, Leopard will automatically version all your files and directories onto the external hard disk. You are able to go back in time to look for a file (or directory), which you have deleted or modified, and to restore them.</p>
<p>Desktop Space gives you more desktop spaces to organize your works on the screen. It makes switching from task to task simple and easy with a click of the mouse.</p>
<p>It will be a nice upgrade but if you are developing software with Ada, unfortunately, you have to wait for a while. Ada does not come with xcode yet. The folks at MacAda is still working on a stable and working version of Ada compiler.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2007/10/28/leopard-unleashed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO &#8211; Building GtkAda project with xcode</title>
		<link>http://adrianhoe.com/adrianhoe/2007/10/07/howto-building-gtkada-project-with-xcode/</link>
		<comments>http://adrianhoe.com/adrianhoe/2007/10/07/howto-building-gtkada-project-with-xcode/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 03:35:43 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[Call Me a Geek]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Carbon]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[gnat]]></category>
		<category><![CDATA[GtkAda]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/10/04/howto-building-gtkada-project-with-xcode/</guid>
		<description><![CDATA[My current project (here) requires to develop a GUI application for displaying some JPEG images. I intended to develop a native Mac OS X GUI application using Carbon or Cocoa. Since there is no Cocoa binding in Ada, I narrowed down my option to Carbon. I hit on the wall of frustration where Carbon binding [...]]]></description>
			<content:encoded><![CDATA[<p>My current project (<a href="http://adrianhoe.com/adrianhoe/2007/09/25/adrenaline-hack/">here</a>) requires to develop a GUI application for displaying some JPEG images. I intended to develop a native Mac OS X GUI application using Carbon or Cocoa. Since there is no Cocoa binding in Ada, I narrowed down my option to Carbon. I hit on the wall of frustration where Carbon binding on <a href="http://macada.org">MacAda.org</a> is very old and supports only gnat-3.3 and PPC (I hope I am not wrong on this).</p>
<p>I have to turn to Gtk+ which will require GtkAda and X11 on Mac OS X. I compiled my test code written for GtkAda very well on console. But when I imported the codes into xcode project, it did not compile. I got the following errors:</p>
<pre><code>error: "gtk.ads" must be recompiled ("a-except.ads" has been modified)
error: "gdk.ads" must be recompiled ("a-except.ads" has been modified)
error: "glib.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-object.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-type_conversion_hooks.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada.ads" must be recompiled ("system.ads" has been modified)
error: "gtkada-bindings.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada-c.adb" must be recompiled ("system.ads" has been modified)
...
</code></pre>
<p>I sought help from <a href="http://hermes.gwu.edu/archives/gnat-osx.html">GNAT-OSX mailing list</a> (<a href="http://hermes.gwu.edu/cgi-bin/wa?A1=ind0709&amp;L=gnat-osx">September 2007</a> archive), but to no avail. I spent many days investigating the cause but to find out that gtkada source codes would be compiled and produced .ali and .o files in the build directory when I used gnatmake to build my GtkAda application.</p>
<pre><code>$ gnatmake testproject.adb `gtkada-config`
</code></pre>
<p>To build a GtkAda project in xcode, follow the instructions below:</p>
<ol style="text-indent: 0px">
<li>In the project browser, under the Group &amp; Files column, locate Targets and the your project name. Right click your project name and select Add Link Binary With Libraries. Select GtkAda libraries from <em>/opt/local/lib/gtkada</em> and necessary libraries from /opt/local/lib.</li>
<li>Select your project name and click on the Info button. In Build tab, select Search Paths under Collection. Include <em>/opt/local/include/gtkada</em> in Header Search Paths. Also include <em>/opt/local/lib</em> and <em>/opt/local/lib/gtkada</em> in Library Search Paths.</li>
<li><span style="text-decoration: line-through;">Select Source in your project. Select Add to Project &#8230; in Project menu. Include all the GtkAda source files in </span><em><span style="text-decoration: line-through;">/opt/local/include/gtkada</span></em><span style="text-decoration: line-through;">.</span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2007/10/07/howto-building-gtkada-project-with-xcode/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Xcode 2.3 and gcc-4.2 (Ada)</title>
		<link>http://adrianhoe.com/adrianhoe/2006/07/13/xcode-23-and-gcc-42-ada/</link>
		<comments>http://adrianhoe.com/adrianhoe/2006/07/13/xcode-23-and-gcc-42-ada/#comments</comments>
		<pubDate>Wed, 12 Jul 2006 16:33:00 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[Call Me a Geek]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[gnat]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/blog/?p=26</guid>
		<description><![CDATA[I have finally decided to update to Xcode 2.3 and gcc-4.2. There is not much information about how to install except from the MacAda mailing list. So, I decided to post the How-To here. Here are the procedures: Uninstall previous Xcode installation by $ sudo perl /Developer/Tools/uninstall-devtools.pl Restart the computer Download and install Xcode 2.3 [...]]]></description>
			<content:encoded><![CDATA[<p>I have finally decided to update to Xcode 2.3 and gcc-4.2. There is not much information about how to install except from the MacAda mailing list. So, I decided to post the How-To here.</p>
<p>Here are the procedures:</p>
<ol style="text-indent:0px;">
<li>Uninstall previous Xcode installation by
<pre><code>$ sudo perl /Developer/Tools/uninstall-devtools.pl</code></pre>
</li>
<li>Restart the computer</li>
<li>Download and install Xcode 2.3</li>
<li>Download and install <a href="http://macada.org/Downloads/Compiler/gnat-gcc-3.3-1650-tiger-installer-20050521.dmg.sitx">gcc-3.3 Ada compiler</a> from <a href="http://macada.org">MacAda<br />
</a></li>
<li>Download and install <a href="http://homepage.mac.com/WebObjects/FileSharing.woa/54/wo/YOZtiBpVyrndx8Xb.1/0.2.1.2.26.31.97.0.35.0.1.1.1?user=awreynolds&amp;fpath=Ada&amp;templatefn=FileSharing7.html">gcc-4.2 Ada compiler</a></li>
<li>Unzip and untar the gcc-4.2 package with
<pre><code>$ tar -zxvf fsf-ppc-gcc-4.2.0-20060429.tgz</code></pre>
<p>or</p>
<pre><code>$ tar -zxvf fsf-i686-ada-4.2-20060409.tgz</code></pre>
<p>depending if you are using PowerPC or Intel Mac.</li>
<li>Move the directory ada-4.2 to /usr/local</li>
<li>Download and install <a href="http://maxao.free.fr/xcode-ada-plugin/">Ada Plugin for Xcode</a> and follow the instructions.</li>
</ol>
<p>I tested Xcode by compiling some projects and it is great. But I still cannot manage to build Ada dynamic library with it. It looks like some problems with the flags. Here&#8217;s the error and warning messages I got:</p>
<pre><code>warning -L: directory name (/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/darwin/default) does not exist
unknown flag: -Wl, -single_module</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2006/07/13/xcode-23-and-gcc-42-ada/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solution for building dynamic shared Ada library with Xcode</title>
		<link>http://adrianhoe.com/adrianhoe/2006/07/09/solution-for-building-dynamic-shared-ada-library-with-xcode/</link>
		<comments>http://adrianhoe.com/adrianhoe/2006/07/09/solution-for-building-dynamic-shared-ada-library-with-xcode/#comments</comments>
		<pubDate>Sun, 09 Jul 2006 14:51:00 +0000</pubDate>
		<dc:creator>Adrian Hoe</dc:creator>
				<category><![CDATA[Ada]]></category>
		<category><![CDATA[Call Me a Geek]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[gnat]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/blog/?p=13</guid>
		<description><![CDATA[Finally, I got some answer from the mailing list. It is a problem with Xcode 2.2 and gcc 3.3 and it seems like an update to Xcode 2.3 and gcc/gnat 4.2 is inevitable. gcc/gnat 4.2 compiler Xcode-Ada plugin The reason I am skeptical about software update is that I have a number of on going [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, I got some answer from the mailing list. It is a problem with Xcode 2.2 and gcc 3.3 and it seems like an update to Xcode 2.3 and gcc/gnat 4.2 is inevitable.</p>
<ul>
<li><a href="http://homepage.mac.com/awreynolds">gcc/gnat 4.2 compiler</a></li>
<li><a href="http://maxao.free.fr/xcode-ada-plugin/">Xcode-Ada plugin</a></li>
</ul>
<p>The reason I am skeptical about software update is that I have a number of on going development. A simple tiny glitch in the new update will cause big havoc especially after all the recompilation of source codes.</p>
<p>Anyhow, I am glad to hear the solution and I will update my development tools soon after I have made a few confirmation.</p>
]]></content:encoded>
			<wfw:commentRss>http://adrianhoe.com/adrianhoe/2006/07/09/solution-for-building-dynamic-shared-ada-library-with-xcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

