<?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>Hawk Software</title>
	<atom:link href="http://hawksoft.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://hawksoft.com/blog</link>
	<description>Programming, web design, and more</description>
	<lastBuildDate>Wed, 02 May 2012 03:15:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Tools every web developer should have</title>
		<link>http://hawksoft.com/blog/2012/tools-every-web-developer-should-have-652.shtml</link>
		<comments>http://hawksoft.com/blog/2012/tools-every-web-developer-should-have-652.shtml#comments</comments>
		<pubDate>Wed, 02 May 2012 03:14:32 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=652</guid>
		<description><![CDATA[I was a programmer first, then a web developer, and I think it might give others like myself an advantage at times.  In this day of WYSIWYG web page editors, templates, and content management systems (CMS), many web developers never get intimate with the actual HTML/XHTML code anymore.  Sure, they might look in the code [...]]]></description>
			<content:encoded><![CDATA[<p>I was a programmer first, then a web developer, and I think it might give others like myself an advantage at times.  In this day of WYSIWYG web page editors, templates, and content management systems (CMS), many web developers never get intimate with the actual HTML/XHTML code anymore.  Sure, they might look in the code window from time to time, but many totally rely on their editor/CMS to take care of the details.  That is, until things suddenly go wrong or they need to perform a site-wide change that cannot be easily implemented by altering the style sheet or the include files.  It is times like these that don&#8217;t phase me, because I always have diff and search-and-replace tools at the ready.<span id="more-652"></span></p>
<p>Diff is available on Unix-like systems and on Windows as WinDiff (supplied with some versions of Microsoft Visual Studio) or <a href="http://winmerge.org/">WinMerge</a>.  Diff is short for difference; open up two text files and diff will immediately show you what lines are different between them.  Programmers use diff all the time.  For example, I will compare the current version of source files to the last version to make sure all the changes were documented.  Or another programer might submit an updated file to me, and I can diff my copy to the submitted copy to see exactly what was changed before I accept the changes.</p>
<p>A search-and-replace tool can find text in multiple files, and replace it with something else.  It is like the find-and-replace you can perform with most text editors, except you can replace that text in hundreds or thousands of text files at once.  For example, as a programmer I might have a function named cleanupString(), but as the code matures that function is actually acts more like validateString().  I can use a search-and-replace tool to change that function name quickly in all my source files without opening each one up.</p>
<p>Now, how can these tools this help web developers?  Let&#8217;s start off with my recent use of diff.  I have a friend who is creating dozens of web pages for her work-group using a Dreamweaver template supplied by her organization. The template uses sever side includes (SSI) to add consistent headers and footers on all pages.  She had been doing OK until quite suddenly all her pages became &#8216;broken&#8217;.  She consulted with her IT department&#8217;s webmaster and was told she had altered the template and would need to start over and recreate all her pages!</p>
<p>She was not looking forward to the days of work ahead, but I told her to recreate just <strong>one</strong> page, and then send me a copy of that page (and all the includes and style sheets) and the broken page.  I used WinDiff to quickly see that Dreamweaver had modified one of the include files so that it was a stand-alone web page, which &#8216;broke&#8217; all her pages.  I showed her how to fix the page by removing the extra HTML code from the include file, and her pages were fixed!</p>
<p>For a search-and-replace example: I took over a website years ago which had over 150 pages that were completely static; no use of SSI at all.  The pages had been created over a period of about five years, and some inconsistencies had crept in.  Menus, headers, and footers varied slightly from page to page, and to make things worse, the organization was going to adopt a new template within a year.</p>
<p>I used BK ReplaceEm (now called <a href="http://www.ecobyte.com/replacetext/">Replace Text</a>) to clean up the inconsistencies and make use of SSI like the new template would.  The result was easier to maintain pages, and then when it was time to convert to the new template I did that with the help of BK ReplaceEm in just a couple of days.</p>
<p>These two tools have saved me hundreds of hours over the last 5 years, and they can save you time too.</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2012/tools-every-web-developer-should-have-652.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The new C11 standard, and how it will affect HawkThreads</title>
		<link>http://hawksoft.com/blog/2012/the-new-c11-standard-and-how-it-will-affect-hawkthreads-641.shtml</link>
		<comments>http://hawksoft.com/blog/2012/the-new-c11-standard-and-how-it-will-affect-hawkthreads-641.shtml#comments</comments>
		<pubDate>Tue, 17 Apr 2012 01:33:26 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=641</guid>
		<description><![CDATA[I had not been following the status of the proposed C1x standard very closely, so I was surprised when I read on Dr. Dobb&#8217;s Journal that C11 had been completed late last year by ISO/IEC.  Finally, as C compilers are updated to the new standard, C programmers will be able to make portable threaded programs [...]]]></description>
			<content:encoded><![CDATA[<p>I had not been following the status of the proposed C1x standard very closely, so I was surprised when I read on <a href="http://drdobbs.com">Dr. Dobb&#8217;s Journal</a> that C11 had been completed late last year by ISO/IEC.  Finally, as C compilers are updated to the new standard, C programmers will be able to make portable threaded programs without using an external library to support Unix-like systems and Windows.  Of course, don&#8217;t hold your breath for Microsoft to fully support C11; they still don&#8217;t fully support C99!</p>
<p>So, how does this effect HawkThreads?  I had been planning to deprecate the HawkThreads API because I felt that yet-another-thread-library was not in the best long-term interest of my projects.  I had planned to just use Posix threads, and force Windows developers to use <a href="http://sourceware.org/pthreads-win32/">Pthreads-w32</a> (a very good implementation, but it requires an extra DLL), but I have other thoughts now.<span id="more-641"></span></p>
<p>As I looked at the C11 thread API, it looked very similar to the simple HawkThreads API.  C11 has threads, mutexes, conditions, and thread specific storage functions.  C11 has more functions, like timed conditions and locks, but it should not add that much more code.</p>
<p>C11 API:</p>
<pre id="LC116">void call_once(once_flag *flag, void (*func)(void));</pre>
<pre id="LC118">int cnd_broadcast(cnd_t *cond);</pre>
<pre id="LC119">void cnd_destroy(cnd_t *cond);</pre>
<pre id="LC120">int cnd_init(cnd_t *cond);</pre>
<pre id="LC121">int cnd_signal(cnd_t *cond);</pre>
<pre id="LC122">int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt);</pre>
<pre id="LC123">int cnd_wait(cnd_t *cond, mtx_t *mtx);</pre>
<pre id="LC125">void mtx_destroy(mtx_t *mtx);</pre>
<pre id="LC126">int mtx_init(mtx_t *mtx, int type);</pre>
<pre id="LC127">int mtx_lock(mtx_t *mtx);</pre>
<pre id="LC128">int mtx_timedlock(mtx_t *mtx, const xtime *xt);</pre>
<pre id="LC129">int mtx_trylock(mtx_t *mtx);</pre>
<pre id="LC130">int mtx_unlock(mtx_t *mtx);</pre>
<pre id="LC132">int thrd_create(thrd_t *thr, thrd_start_t func, void *arg);</pre>
<pre id="LC133">thrd_t thrd_current(void);</pre>
<pre id="LC134">int thrd_detach(thrd_t thr);</pre>
<pre id="LC135">int thrd_equal(thrd_t thr0, thrd_t thr1);</pre>
<pre id="LC136">void thrd_exit(int res);</pre>
<pre id="LC137">int thrd_join(thrd_t thr, int *res);</pre>
<pre id="LC138">void thrd_sleep(const xtime *xt);</pre>
<pre id="LC139">void thrd_yield(void);</pre>
<pre id="LC141">int tss_create(tss_t *key, tss_dtor_t dtor);</pre>
<pre id="LC142">void tss_delete(tss_t key);</pre>
<pre id="LC143">void *tss_get(tss_t key);</pre>
<pre id="LC144">int tss_set(tss_t key, void *val);</pre>
<pre id="LC146">int xtime_get(xtime *xt, int base);</pre>
<p>So, on top of the other code I am working on, I will be creating a major 2.0 update to HawkThreads to provide a (mostly) C11 interface so that it can be used on platforms that do not yet have a C11 compliant compiler.  I say mostly because I am not fully sold on the way conditions are handled in C11 (or in Posix for that matter).  Perhaps I just need to understand the choice of including a mutex when signalling and waiting on a condition.  I will study it more and get back to you. . .</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2012/the-new-c11-standard-and-how-it-will-affect-hawkthreads-641.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Status and direction for HawkNL library</title>
		<link>http://hawksoft.com/blog/2012/status-and-direction-for-hawknl-library-575.shtml</link>
		<comments>http://hawksoft.com/blog/2012/status-and-direction-for-hawknl-library-575.shtml#comments</comments>
		<pubDate>Wed, 04 Apr 2012 02:38:48 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[News HawkNL]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=575</guid>
		<description><![CDATA[First, for the many users of the HawkNL 1.x series, after over seven years of inactivity I am working on a new 1.7 beta update which will fix some recently discovered endian and 64-bit OS issues.  The update will also contain an update to HawkThreads which I created in 2006 but never released. It is [...]]]></description>
			<content:encoded><![CDATA[<p>First, for the many users of the HawkNL 1.x series, after over seven years of inactivity I am working on a new 1.7 beta update which will fix some recently discovered endian and 64-bit OS issues.  The update will also contain an update to HawkThreads which I created in 2006 but never released.</p>
<p>It is interesting that I had already discovered a way to avoid the 64-bit issues in my preliminary work on HawkFloat, so that part is easy.  I think it is also finally time to switch over to the GPL 3.o, and all my new projects will use this almost 5-year old license (how time flies!).</p>
<p>Now to HawkNL 2.0:</p>
<p><span id="more-575"></span> NL 2.0 will have several changes, which will include removal of features which have crept in but are better to be in the utility library, HawkNLU, new layered source code so that all platform specific code will be in a single header file, IPv6 support, and a simpler API.</p>
<p>Some features which will be moved to NLU are reliable packets and socket statistics.  These are really too high a level for NL, and their removal will reduce the need for threading API use to just mutexes.</p>
<p>Some features to be removed altogether are the never completed serial, modem, and parallel drivers, and an option to remove the loopback driver since most people prefer to use the IP driver with localhost.  I plan to also remove the IPX code, and simply let people use the 1.X series if they really want IPX.</p>
<p>More details will emerge as coding continues. . .</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2012/status-and-direction-for-hawknl-library-575.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast software floating point code &#8211; Part 2</title>
		<link>http://hawksoft.com/blog/2012/fast-software-floating-point-code-part-2-604.shtml</link>
		<comments>http://hawksoft.com/blog/2012/fast-software-floating-point-code-part-2-604.shtml#comments</comments>
		<pubDate>Wed, 21 Mar 2012 02:36:31 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=604</guid>
		<description><![CDATA[If you have not already read part 1, do so now to set the stage. . . A floating point number is composed of three parts: the sign bit, the exponent, and the mantissa (or significand). I will represent these as S, E, and M, respectively. The IEEE float is composed of a sign bit, [...]]]></description>
			<content:encoded><![CDATA[<p>If you have not already read <a href="http://hawksoft.com/blog/2012/fast-software-floating-point-code-part-1-596.shtml">part 1</a>, do so now to set the stage. . .</p>
<p>A floating point number is composed of three parts: the sign bit, the exponent, and the mantissa (or significand). I will represent these as S, E, and M, respectively. The IEEE float is composed of a sign bit, 8 bits for exponent, and 23 bits for the mantissa (1S-8E-23M). The IEEE double float is 1S-11E- 52M, and the IEEE half float is 1S-5E-10M.</p>
<p>The <a href="http://www.codeproject.com/Articles/146057/Minimalist-Floating-Point-Type">Small Floating Point</a> (SFP) format is 8E-1S-7M (note the order). It preserves the 8 bits of exponent from the IEEE float, and moves the sign bit next to the mantissa, thus creating a natural break along a byte boundary. Preserving the byte boundaries helps to reduce the number of masking and shifting operations in a software implementation.<span id="more-604"></span></p>
<p>I am proposing two floating formats: Hfloat, 7E-1S-8M; and Hdouble, 7E-1S-16M. Yes, that second format is just 24 bits (the first 8 bits are unused/ignored), but my reasoning will become apparent as you read on. In these new formats, the exponent is signed (not a biased unsigned number like in IEEE formats), and it is at the front so a simple shift will pack or unpack it while preserving the sign. Converting from an Hfloat to an Hdouble is a simple shift. The mantissa does NOT include an implicit leading <strong>1</strong>, which allows us to do away with the special case of <a href="http://en.wikipedia.org/wiki/Denormal_number">denormal numbers</a> and the associated code complexity at the expense of 0.3 bits of precision (see chart below).</p>
<p>&nbsp;</p>
<pre>Float      Mantissa   Digits of</pre>
<pre>Format       Bits     Precision</pre>
<pre>IEEE half    10+1       3.3</pre>
<pre>IEEE float   23+1       7.2</pre>
<pre>SFP          8+1        2.7</pre>
<pre>Hfloat       8          2.4</pre>
<pre>Hdouble      16         4.8</pre>
<p>The Hdouble is just that; double the digits of precision compared to an Hfloat. Also, by limiting it to 16 mantissa bits, only a 32-bit integer is needed to perform a multiply, resulting in faster performance and less code. Since the exponents are the same, there is more code reuse, which will result in fewer lines of code and fewer potential bugs.</p>
<p>I said there were two new float types, the Hfloat and the Hdouble, but there is actually a third type that can help in common digital signal processing (DSP): the Haccumulator, which is used as an accumulator for a multiply-accumulate function. It is a structure which contains a byte and a 32-bit integer to hold 7E-1S-32M, and it will be converted to an Hfloat or Hdouble before further use.</p>
<p>The last thing to mention in this post is that there is no support for the IEEE NaN, positive and negative infinity, or exceptions. All functions saturate (to the maximum or minimum value), which helps to eliminate divide by zero (which will be equal to the max value if it does occur). Now that I have the specs flushed our fairly well, it is time to begin coding. . .</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2012/fast-software-floating-point-code-part-2-604.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Pi Day!</title>
		<link>http://hawksoft.com/blog/2012/happy-pi-day-615.shtml</link>
		<comments>http://hawksoft.com/blog/2012/happy-pi-day-615.shtml#comments</comments>
		<pubDate>Wed, 14 Mar 2012 20:59:58 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=615</guid>
		<description><![CDATA[3.141592653589793238462643383279502884197169399375105820974944592307816406286 208998628034825342117067982148086513282306647093844609550582231725359408128481 117450284102701938521105559644622948954930381964428810975665933446128475648233 786783165271201909145648566923460348610454326648213393607260249141273724587006 606315588174881520920962829254091715364367892590360011330530548820466521384146 951941511609433057270365759591953092186117381932611793105118548074462379962749 567351885752724891227938183011949129833673362440656643086021394946395224737190 702179860943702770539217176293176752384674818467669405132000568127145263560827 785771342757789609173637178721468440901224953430146549585371050792279689258923 542019956112129021960864034418159813629774771309960518707211349999998372978049 951059731732816096318595024459455346908302642522308253344685035261931188171010 003137838752886587533208381420617177669147303598253490428755468731159562863882 353787593751957781857780532171226806613001927876611195909216420198938095257201 065485863278865936153381827968230301952035301852968995773622599413891249721775 283479131515574857242454150695950829533116861727855889075098381754637464939319 255060400927701671139009848824012858361603563707660104710181942955596198946767 837449448255379774726847104047534646208046684259069491293313677028989152104752 162056966024058038150193511253382430035587640247496473263914199272604269922796 782354781636009341721641219924586315030286182974555706749838505494588586926995 690927210797509302955321165344987202755960236480665499119881834797753566369807 426542527862551818417574672890977772793800081647060016145249192173217214772350 141441973568548161361157352552133475741849468438523323907394143334547762416862 518983569485562099219222184272550254256887671790494601653466804988627232791786 085784383827967976681454100953883786360950680064225125205117392984896084128488 626945604241965285022210661186306744278622039194945047123713786960956364371917 287467764657573962413890865832645995813390478027590099465764078951269468398352 595709825822620522489407726719478268482601476990902640136394437455305068203496 252451749399651431429809190659250937221696461515709858387410597885959772975498 930161753928468138268683868942774155991855925245953959431049972524680845987273 644695848653836736222626099124608051243884390451244136549762780797715691435997 700129616089441694868555848406353422072225828488648158456028506016842739452267 467678895252138522549954666727823986456596116354886230577456498035593634568174 324112515076069479451096596094025228879710893145669136867228748940560101503308 617928680920874760917824938589009714909675985261365549781893129784821682998948 722658804857564014270477555132379641451523746234364542858444795265867821051141]]></description>
			<content:encoded><![CDATA[<p>3.141592653589793238462643383279502884197169399375105820974944592307816406286 208998628034825342117067982148086513282306647093844609550582231725359408128481 117450284102701938521105559644622948954930381964428810975665933446128475648233 <span id="more-615"></span>786783165271201909145648566923460348610454326648213393607260249141273724587006 606315588174881520920962829254091715364367892590360011330530548820466521384146 951941511609433057270365759591953092186117381932611793105118548074462379962749 567351885752724891227938183011949129833673362440656643086021394946395224737190 702179860943702770539217176293176752384674818467669405132000568127145263560827 785771342757789609173637178721468440901224953430146549585371050792279689258923 542019956112129021960864034418159813629774771309960518707211349999998372978049 951059731732816096318595024459455346908302642522308253344685035261931188171010 003137838752886587533208381420617177669147303598253490428755468731159562863882 353787593751957781857780532171226806613001927876611195909216420198938095257201 065485863278865936153381827968230301952035301852968995773622599413891249721775 283479131515574857242454150695950829533116861727855889075098381754637464939319 255060400927701671139009848824012858361603563707660104710181942955596198946767 837449448255379774726847104047534646208046684259069491293313677028989152104752 162056966024058038150193511253382430035587640247496473263914199272604269922796 782354781636009341721641219924586315030286182974555706749838505494588586926995 690927210797509302955321165344987202755960236480665499119881834797753566369807 426542527862551818417574672890977772793800081647060016145249192173217214772350 141441973568548161361157352552133475741849468438523323907394143334547762416862 518983569485562099219222184272550254256887671790494601653466804988627232791786 085784383827967976681454100953883786360950680064225125205117392984896084128488 626945604241965285022210661186306744278622039194945047123713786960956364371917 287467764657573962413890865832645995813390478027590099465764078951269468398352 595709825822620522489407726719478268482601476990902640136394437455305068203496 252451749399651431429809190659250937221696461515709858387410597885959772975498 930161753928468138268683868942774155991855925245953959431049972524680845987273 644695848653836736222626099124608051243884390451244136549762780797715691435997 700129616089441694868555848406353422072225828488648158456028506016842739452267 467678895252138522549954666727823986456596116354886230577456498035593634568174 324112515076069479451096596094025228879710893145669136867228748940560101503308 617928680920874760917824938589009714909675985261365549781893129784821682998948 722658804857564014270477555132379641451523746234364542858444795265867821051141</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2012/happy-pi-day-615.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast software floating point code &#8211; Part 1</title>
		<link>http://hawksoft.com/blog/2012/fast-software-floating-point-code-part-1-596.shtml</link>
		<comments>http://hawksoft.com/blog/2012/fast-software-floating-point-code-part-1-596.shtml#comments</comments>
		<pubDate>Wed, 14 Mar 2012 03:44:50 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=596</guid>
		<description><![CDATA[Hardware floating point is taken for granted by today&#8217;s programmers, but it has not always been so.  I remember programming 80286/386 CPUs that did not have hardware floating point hardware, and back then the accepted alternative for many programs, especially games, was fixed point math.  But fixed point math is HARD.  It is hard for [...]]]></description>
			<content:encoded><![CDATA[<p>Hardware floating point is taken for granted by today&#8217;s programmers, but it has not always been so.  I remember programming 80286/386 CPUs that did not have hardware floating point hardware, and back then the accepted alternative for many programs, especially games, was fixed point math.  But fixed point math is HARD.  It is hard for many programmers to understand, then it is hard to convert an entire code base from floating to fixed.  So I have been looking at other ways to speed up software floating point code, hopefully enough so that many projects will not need to be converted to fixed point to run at a decent speed.</p>
<p>I am not going into a description of floating and fixed point math right now, so if you are not familiar with them you can read <a href="http://en.wikipedia.org/wiki/Floating_point">this floating point article</a> and/or <a href="http://en.wikipedia.org/wiki/Fixed-point_arithmetic">this fixed point article</a>.  For this post, I will begin by highlighting a few of the reasons software floating point math, specifically IEEE 754 conforming floating point, is so slow in software. <span id="more-596"></span></p>
<p>The IEEE 754 standard was originally designed to support 32 and 64 bit floating point numbers, and the spec is very tight to insure that calculations on any supported platform will result in the same values.  It was also created with scientists in mind, who often deal with very small and very large numbers.  The spec provides for special values including negative and positive infinity, NaN (Not a Number), and denormal numbers.  There are are also several rounding modes which must be supported.</p>
<p>Implementing all the above takes a lot of code, and requires many special cases which slows down calculations.  Also, for many signal processing tasks involving image and sound processing, the range of even a 32-bit float is more than needed.  This was partially addressed in the latest IEEE 754-2008 revision which support 16-bit floats.  However, these new 16-bit floats still have all the overhead of the original spec, and they do not have a very large range; they can only represent values up to +-65504, or just less than an unsigned short integer.</p>
<p>In my research I have found a library which is close: <a href="http://www.codeproject.com/Articles/146057/Minimalist-Floating-Point-Type">Small Floating Point (SFP)</a>.   At first glance it looked like it could be a great start.  The library uses a modified 16-bit format, which is designed on byte boundaries to reduce masking and shifting, and it has increased range at the expense of some precision.  However, the code uses something called &#8220;Primitive C&#8221;, which is hard to read, but intended to be easier to port to assembly.  The code also uses shift based multiply and divide because it is targeted for 8-bit CPUs.</p>
<p>So, next time, I will outline my goals for a new 16-bit floating point library that targets modern 32-bit ARM CPUs that have hardware integer multiply and divide.  I will also talk about the precision/range tradeoffs I went through in choosing my 16-bit float format, and how it affects final code.</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2012/fast-software-floating-point-code-part-1-596.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reports of my demise are exaggerated, and other random stuff</title>
		<link>http://hawksoft.com/blog/2012/reports-of-my-demise-are-exaggerated-and-other-random-stuff-583.shtml</link>
		<comments>http://hawksoft.com/blog/2012/reports-of-my-demise-are-exaggerated-and-other-random-stuff-583.shtml#comments</comments>
		<pubDate>Fri, 20 Jan 2012 04:10:10 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=583</guid>
		<description><![CDATA[OK, I admit it; I became addicted to Tom&#8217;s Hardware Forums! In my defense, I love helping people, and I love a challenge.  And Tom&#8217;s also has those cool and addicting medals and points. . .Good, but very bad! So, now that my forum status is officially Addict, I will try to back off a [...]]]></description>
			<content:encoded><![CDATA[<p>OK, I admit it; I became addicted to <a href="http://www.tomshardware.com/forum/">Tom&#8217;s Hardware Forums</a>! In my defense, I love helping people, and I love a challenge.  And Tom&#8217;s also has those cool and addicting medals and points. . .Good, but very bad!</p>
<p>So, now that my forum status is officially Addict, I will try to back off a little and spend more time on programing.  I think I have some interesting things in store for you.<span id="more-583"></span></p>
<p>First, there are some speech codecs which are now likely unencumbered by Intellectual Property (IP) rights, in other words, patents. Many speech related patents have been expiring over the last few years.  Others, like GSM Half-Rate, have IP that is either tied to the GSM cellular network protocols, or are so vague they are likely unenforceable; more about that another time.</p>
<p>Second, I have been rethinking fixed point math.  It is just TOO hard to convert anything other than small trivial programs from floating to fixed point so they run on ARM and other CPUs without hardware floating point (also called vector instructions).  There is a LOT of time involved converting code, testing, tracking down under and over flows, etc. Yes, I can do it, and have done it, but I am not sure I want to spend the time to converting another project. However, there ARE other ways to speed up floating point calculations by an order of magnitude; more on that another time.</p>
<p>Third, I still love 3D graphics.  I miss programming in OpenGL, but I want a useful challenge also. Despite the ever increasing availability of 3D hardware, even on such things as phones, I still feel there is a need for a small fast software OpenGL library. My inspiration is from  <a href="http://bellard.org/TinyGL/">TinyGL</a>, but mine might be more like OpenGL ES.  I also envision  some options like no copy of textures to reduce memory use, and to force all memory allocations to be approved and made by the application.  More on this also.</p>
<p>Fourth, yes, I have disabled comments.  The bots were becoming annoying, and you can easily email anyway.  So don&#8217;t be shy, send me an email, and tell me what you think about some of these potential projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2012/reports-of-my-demise-are-exaggerated-and-other-random-stuff-583.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Status and direction for HawkVoice library</title>
		<link>http://hawksoft.com/blog/2011/status-and-direction-for-hawkvoice-library-573.shtml</link>
		<comments>http://hawksoft.com/blog/2011/status-and-direction-for-hawkvoice-library-573.shtml#comments</comments>
		<pubDate>Tue, 14 Jun 2011 02:13:32 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[News Hawkvoice]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=573</guid>
		<description><![CDATA[After a long hiatus, work has begun again on my HawkVoice library, and there will be a change in focus and direction. But before explaining the changes, I need to quickly review how HawkVoice began in the first place, because I never planned to become an &#8216;expert&#8217; in open source speech compression.  It began all [...]]]></description>
			<content:encoded><![CDATA[<p>After a long hiatus, work has begun again on my HawkVoice library, and there will be a change in focus and direction. But before explaining the changes, I need to quickly review how HawkVoice began in the first place, because I never planned to become an &#8216;expert&#8217; in open source speech compression.  It began all about networking with HawkNL.<span id="more-573"></span></p>
<p>I began HawkNL back in 2000 with the goal to produce a cross platform, and easy to use, alternative to Microsoft&#8217;s DirectPlay.  Developers liked it, but some asked about DirectPlaySound, which allowed a speech channel to be added to a DirectPlay connection. So, within months, I was searching for free and open source speech codecs.  The high level API, HawkVoice, was to be dependent on HawkNLU, which was to be built on top of HawkNL.  In order for people to directly use  the HawkVoice codecs I created HawkVoiceDI (Direct Interface), which has been used in dozens of projects.</p>
<p>Now, here we are, DirectPlay is deprecated, and most people are using their own frameworks for network communications, so HawkVoiceDI will now become HawkVoice, and it will simply be an easy to use speech compression library with a few helper functions to help add voice chat to applications.  The larger goal of integration with HawkNLU is now history.</p>
<p>Now the main focus of HawkVoice will be the codecs, with a little work on helper functions.  I am looking at improving the current codecs, and adding some more.  For example, years ago when I added GSM I was more worried about the total cycles per second for encoding/deciding, and if the sound quality was not noticeably degraded it was OK.  I will start off fresh with reference GSM code and improve it ONLY WHILE THE OUTPUT IS STILL BIT EXACT.  The same goes for LPC-10, and perhaps others.</p>
<p>I am also seeing that more people want to use wide-band codecs (16 kHz sample rate) rather than narrow band (8 kHz sample rate), and I have two codecs I am checking right now that look promising.  Of course, hand held devices are really taking off, so all new codecs will be fixed point to run on ARM CPUs.</p>
<p>I will be updated the HawkVoice web pages soon with more details.</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2011/status-and-direction-for-hawkvoice-library-573.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hell just froze over?  Microsoft pushing platform neutral apps?</title>
		<link>http://hawksoft.com/blog/2011/hell-just-froze-over-microsoft-pushing-platform-neutral-apps-567.shtml</link>
		<comments>http://hawksoft.com/blog/2011/hell-just-froze-over-microsoft-pushing-platform-neutral-apps-567.shtml#comments</comments>
		<pubDate>Tue, 07 Jun 2011 02:48:38 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=567</guid>
		<description><![CDATA[If you are interested in Windows news at all you have seen the presentation on Windows 8 (Win8). I was shocked, not by the new touch screen based user interface (UI), nor by the fact that it will be the default UI on the desktop. Go desktop touch screens! (I admit it, I have tried [...]]]></description>
			<content:encoded><![CDATA[<p>If you are interested in Windows news at all you have seen the presentation  on Windows 8 (Win8).  I was shocked, not by the new touch screen based user interface (UI), nor by the fact that it will be the default UI on the desktop.  Go desktop touch screens! (I admit it, I have tried to activate a menu or application by touching my desktop screen after spending too many hours on my Android tablet)<span id="more-567"></span></p>
<p>No, it was Microsoft&#8217;s description of the new native Win8 apps, which are built on HTML 5 and JavaScript.  HTML 5?  JavaScript??  And I thought Microsoft was pushing HTML 5 compliance and JavaScript performance just for the web!  Now we know the REAL story; it is to speed up native Win8 apps.  Microsoft can finally realize it&#8217;s dream of applications being interpreted.  No, it&#8217;s not NET like they originally pushed, but with JavaScript virtually ALL web developers will be able to create native Win8 apps.</p>
<p>This is a strong, but risky move; not the type that Microsoft has been know for in recent years.  The potential positive aspects I see are the huge increase in the developer talent pool I already mentioned,  increased app security, lower development costs, easier to target desktop-pad-phone-console, and easier app store integration.</p>
<p>However, the negatives for Microsoft (and a boon for others) could be easier to port apps to other platforms (Linux, Android, MacOS) and consumer backlash against the new UI.  Of course, we have no idea yet how Microsoft will package Win8 apps, or how they might restrict them.  And perhaps consumers have become so used to their portable devices that they will welcome the same interface on the desktop.</p>
<p>There is speculation Microsoft will simply use HTML Applications (HTAs), which have been supported since IE 5, but have remained fairly obscure.   Since all but trivial apps will require various resources, images, sounds files, etc., they may already have an archive container chosen to more easily package everything up.  Whatever the format, unless they have figured out some way to lock in developers to Win8, perhaps some mandatory copyrighted JavaScript classes, developers will easily create the same functionality on other platforms.  And I wonder how long before other browsers decide to support HTAs?</p>
<p>I have been saying for years that JavaScript was under appreciated, and the great speed increases in today&#8217;s browsers has helped to keep it as the #1 language of the web (you thought that was Java?).   I look forward to using JavaScript in desktop apps.</p>
<p>Yes, Win8 really surprised me, but I can&#8217;t wait to see if Microsoft is the one surprised in the end.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2011/hell-just-froze-over-microsoft-pushing-platform-neutral-apps-567.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The HTML 5 video codec war of misinformation</title>
		<link>http://hawksoft.com/blog/2011/the-html-5-video-codec-war-of-misinformation-548.shtml</link>
		<comments>http://hawksoft.com/blog/2011/the-html-5-video-codec-war-of-misinformation-548.shtml#comments</comments>
		<pubDate>Tue, 24 May 2011 01:41:55 +0000</pubDate>
		<dc:creator>Phil Frisbie, Jr.</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://hawksoft.com/blog/?p=548</guid>
		<description><![CDATA[I have been sting back quietly taking all this  so far, but no more!  Whether you are for the free open source WebM (VP8) video codec the the free (for now) H.264 video codec, you SHOULD be worried about the outcome.  An extended war could delay the advancement of video on the web, just like [...]]]></description>
			<content:encoded><![CDATA[<p>I have been sting back quietly taking all this  so far, but no more!  Whether you are for the free open source WebM (VP8) video codec the the free (for now) H.264 video codec, you SHOULD be worried about the outcome.  An extended war could delay the advancement of video on the web, just like to extended war over Blu-ray and HD-DVD has left the Blu-ray camp with and empty victory; Disney is finally boosting its Blu-ray sales with combo packs which include a DVD &#8220;for portable use&#8221;.<span id="more-548"></span></p>
<p>Personally, I would be happy with either WebM or a REALLY free version of H.264.   If the MPEG LA really wants H.264 to become the  standard then they should allow it to be used forever for free on the web, both for encoding and decoding.  That would end the war right now, and relegate WebM to a blip in web history.</p>
<p>What really bothers me, however, is all the misinformation pro-H.264 experts are distributing. For example, the article which sparked this post  is in SD Times, a magazine I read from cover to cover.  The February 2011 issue has an article on the current war, and I cannot help to comment on some remarks that IDC program director Al Hilwa said.</p>
<p>First, Hilwa begins by stating that Google&#8217;s motivation to support only WebM is all about license fees, which perhaps is true, but ignores Google&#8217;s past support of free software in general, and the freedom which comes from free and open source software.</p>
<p>Then he really shows his agenda by stating &#8220;They want unencumbered technology, which is an idealistic view that doesn&#8217;t square with our system of intellectual property.&#8221;  Software patents are another issue, and if it is truly not possible to create a codec free of patented technology then it is another sign that our software patent system is broken.  He then says WebM is only as good as the first patent lawsuit. Yes, hear comes the FUD (Fear, Uncertainty, Doubt)!</p>
<p>The final straw for me was when he asks the question &#8220;&#8230;will content providers such as Hulu and Netflix support an open codec, which might be easier to hack?&#8221;  I hope he was misquoted on that one, because rights management is totally separate from the codec.  Windows is closed source, and we all know how secure it is. . .</p>
]]></content:encoded>
			<wfw:commentRss>http://hawksoft.com/blog/2011/the-html-5-video-codec-war-of-misinformation-548.shtml/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

