<?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>Java - Base Six</title>
	<atom:link href="https://base6.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>https://base6.com/</link>
	<description>James Furness&#039;s blog</description>
	<lastBuildDate>Sun, 05 Dec 2010 18:49:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.3.1</generator>
	<item>
		<title>Tungsten FSM: A lightweight Java finite state machine library</title>
		<link>https://base6.com/2010/12/05/tungsten-fsm-a-lightweight-java-finite-state-machine-library/</link>
					<comments>https://base6.com/2010/12/05/tungsten-fsm-a-lightweight-java-finite-state-machine-library/#comments</comments>
		
		<dc:creator><![CDATA[James Furness]]></dc:creator>
		<pubDate>Sun, 05 Dec 2010 18:36:00 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[finite state machine]]></category>
		<category><![CDATA[fsm]]></category>
		<category><![CDATA[tungsten]]></category>
		<guid isPermaLink="false">https://base6.com/?p=136</guid>

					<description><![CDATA[<p>I recently came across Tungsten FSM whilst looking for an off the shelf FSM implementation. Ideally I was looking for something which was a lightweight and no-frills but robust FSM implementation, and Tungsten FSM seemed to exactly fit the bill. All configuration is done in code, so no messing around with XML files, and the [&#8230;]</p>
<p>The post <a href="https://base6.com/2010/12/05/tungsten-fsm-a-lightweight-java-finite-state-machine-library/">Tungsten FSM: A lightweight Java finite state machine library</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>I recently came across <a href="http://sourceforge.net/apps/mediawiki/tungsten/index.php?title=Introduction_to_Tungsten_Finite_State_Machine_Library">Tungsten FSM</a> whilst looking for an off the shelf FSM implementation. Ideally I was looking for something which was a lightweight and no-frills but robust FSM implementation, and Tungsten FSM seemed to exactly fit the bill. All configuration is done in code, so no messing around with XML files, and the implementation itself is only a handful of classes with only one dependency (log4j).</p>
<p>All in all worked out very well, and it seems to do exactly what it promises. The support for sub-states is useful to cut down on config bloat by defining common transitions on a parent state.</p>
<p>If I were to nitpick it would have been nice to see generics used to avoid needing to cast the entities/events, however this would arguably bloat the Tungsten source somewhat. It would have also been nice to be able to specify an &#8220;ignore&#8221; type transition which could be specified on a parent state to ignore an event rather than having to define transitions on all sub states of the parent state for an event in order to ignore it and stay in the same state.</p><p>The post <a href="https://base6.com/2010/12/05/tungsten-fsm-a-lightweight-java-finite-state-machine-library/">Tungsten FSM: A lightweight Java finite state machine library</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://base6.com/2010/12/05/tungsten-fsm-a-lightweight-java-finite-state-machine-library/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Calculating floating point epsilon/precision in Java</title>
		<link>https://base6.com/2010/06/24/calculating-floating-point-epsilonprecision-in-java/</link>
		
		<dc:creator><![CDATA[James Furness]]></dc:creator>
		<pubDate>Thu, 24 Jun 2010 10:25:44 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[approximation]]></category>
		<category><![CDATA[epsilon]]></category>
		<category><![CDATA[floating point arithmetic]]></category>
		<category><![CDATA[machine representation]]></category>
		<guid isPermaLink="false">https://base6.com/?p=96</guid>

					<description><![CDATA[<p>Floating point arithmetic/rounding can be somewhat painful, made worse by the fact that the epsilon (error) in the machine representation of floating point varies depending on the exponent (i.e. how large/small the number being represented is): Normalized numbers when Base = 2, Precision = 3, Exponents = -1 to 2 [Goldberg91] A very comprehensive paper [&#8230;]</p>
<p>The post <a href="https://base6.com/2010/06/24/calculating-floating-point-epsilonprecision-in-java/">Calculating floating point epsilon/precision in Java</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Floating point arithmetic/rounding can be somewhat painful, made worse by the fact that the epsilon (error) in the machine representation of floating point varies depending on the exponent (i.e. how large/small the number being represented is):</p>
<div id="attachment_102" class="wp-caption aligncenter" style="width: 545px"><img decoding="async" class="size-full wp-image-102" title="Normalized numbers when Base = 2, Precision = 3, Exponents = -1 to 2" src="https://base6.com/files/2010/06/ncg_goldberg251.gif" alt="" width="535" height="62" /></p>
<p class="wp-caption-text">Normalized numbers when Base = 2, Precision = 3, Exponents = -1 to 2 [<a href="http://docs.sun.com/source/806-3568/ncg_goldberg.html">Goldberg91</a>]</p>
</div>
<p>A very comprehensive paper (from which the above image is taken) is available <a href="http://docs.sun.com/source/806-3568/ncg_goldberg.html">here</a>. In previous teams we have implemented our own functions to derive an approximation of the epsilon from the number to be represented, however I discovered recently to my surprise that such a function was added to Java in 1.5: <a href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#ulp%28double%29">Math.ulp</a>!</p><p>The post <a href="https://base6.com/2010/06/24/calculating-floating-point-epsilonprecision-in-java/">Calculating floating point epsilon/precision in Java</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>JMM Synopsis</title>
		<link>https://base6.com/2009/09/15/jmm-synopsis/</link>
		
		<dc:creator><![CDATA[James Furness]]></dc:creator>
		<pubDate>Tue, 15 Sep 2009 10:32:49 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Doug Lea]]></category>
		<category><![CDATA[JMM]]></category>
		<guid isPermaLink="false">https://base6.com/?p=77</guid>

					<description><![CDATA[<p>Useful synopsis of the Java Memory Model from Doug Lea &#8211; in particular the clearest explanation I have found so far of the meaning of &#8220;happens-before&#8221;, and some useful definitions which helped to get a concrete idea of the semantics around safe-publication of variables through Thread.start()&#8230;</p>
<p>The post <a href="https://base6.com/2009/09/15/jmm-synopsis/">JMM Synopsis</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><a href="http://gee.cs.oswego.edu/dl/cpj/JMMsynopsis.html">Useful synopsis</a> of the Java Memory Model from <a href="http://gee.cs.oswego.edu/dl/">Doug Lea</a> &#8211; in particular the clearest explanation I have found so far of the meaning of &#8220;happens-before&#8221;, and some useful definitions which helped to get a concrete idea of the semantics around safe-publication of variables through Thread.start()&#8230;</p><p>The post <a href="https://base6.com/2009/09/15/jmm-synopsis/">JMM Synopsis</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>NonBlockingHashMap</title>
		<link>https://base6.com/2009/06/15/nonblockinghashmap/</link>
		
		<dc:creator><![CDATA[James Furness]]></dc:creator>
		<pubDate>Mon, 15 Jun 2009 08:12:31 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Azul]]></category>
		<category><![CDATA[ConcurrentHashMap]]></category>
		<category><![CDATA[lib-high-scale]]></category>
		<category><![CDATA[non-blocking]]></category>
		<category><![CDATA[NonBlockingHashMap]]></category>
		<guid isPermaLink="false">https://base6.com/?p=29</guid>

					<description><![CDATA[<p>Just came across this, looks like it has been around on Sourceforge for a while as part of lib-high-scale. Designed for large numbers of CPUs (e.g. Azul hardware), but microbenchmarks claim a small improvement over ConcurrentHashMap even on 2 CPUs.</p>
<p>The post <a href="https://base6.com/2009/06/15/nonblockinghashmap/">NonBlockingHashMap</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Just came across this, looks like it has been around on Sourceforge for a while as part of <a href="http://high-scale-lib.sourceforge.net/">lib-high-scale</a>. Designed for large numbers of CPUs (e.g. <a href="http://www.azulsystems.com/">Azul</a> hardware), but <a href="http://www.azulsystems.com/events/javaone_2007/2007_LockFreeHash.pdf">microbenchmarks</a> claim a small improvement over <a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentHashMap.html">ConcurrentHashMap</a> even on 2 CPUs.</p><p>The post <a href="https://base6.com/2009/06/15/nonblockinghashmap/">NonBlockingHashMap</a> first appeared on <a href="https://base6.com/">Base Six</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
