<?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>eric the fruitbat &#187; Tech*</title>
	<atom:link href="http://www.cogitolingua.net/blog/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cogitolingua.net/blog</link>
	<description>Sounding out the Noosphere.</description>
	<lastBuildDate>Fri, 03 Feb 2012 23:40:56 +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>A Configurable Keyboard</title>
		<link>http://www.cogitolingua.net/blog/2012/01/21/a-configurable-keyboard/</link>
		<comments>http://www.cogitolingua.net/blog/2012/01/21/a-configurable-keyboard/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 11:24:50 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Self]]></category>
		<category><![CDATA[Tech*]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=1236</guid>
		<description><![CDATA[<p class="wp-caption-text">Ideal Key Layout</p> <p>For a long time, I have hated the layout on all keyboards I&#8217;ve ever laid hands on. It&#8217;s not just that I prefer Dvorak to Qwerty; it&#8217;s that the slanting of the rows causes an awkward bending of the left wrist, that the space key is far too large when you [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1239" class="wp-caption alignright" style="width: 310px"><a href="http://www.cogitolingua.net/blog/wp-content/uploads/2012/01/keyboard.png"><img src="http://www.cogitolingua.net/blog/wp-content/uploads/2012/01/keyboard-300x111.png" alt="" title="Ideal Key Layout" width="300" height="111" class="size-medium wp-image-1239" /></a><p class="wp-caption-text">Ideal Key Layout</p></div>
<p>For a long time, I have hated the layout on all keyboards I&#8217;ve ever laid hands on. It&#8217;s not just that I prefer Dvorak to Qwerty; it&#8217;s that the slanting of the rows causes an awkward bending of the left wrist, that the space key is far too large when you only ever hit it in one spot; that of the keys such as Esc, Meta, Hyper, and Ctrl you can find a board which gets some right, but not all. For a long time I&#8217;ve pined for a keyboard with a layout like that depicted on the right.</p>
<p>I want a split keyboard, that slants the rows slightly, to favor of the natural angle at which your forearms approach anything directly in front of you. I removed the space, turning it into two individual normal-sized keys under resting position of the thumbs. Inside the thumbs arc we place the modifiers: Meta, Hyper and Ctrl. Although this might make Meta-Ctrl difficult to press (use a thumb for each), it does easily allow any of these three to be combined with Shift.</p>
<p>I am not the only one to have really specific demands as to the layout of my keys. Any internet search reveals many hackers with the same obsessions. Unfortunately, we each want a slightly different layout. Fortunately, we will actually pay a high price (because it&#8217;s actually a low price when amortized over a year of with use more than 4 hours every day) and we&#8217;ll spend the day to customize it.</p>
<p>There&#8217;s been a big advancement in multi-touch surfaces. So, you don&#8217;t actually need switches and circuitry to build a keyboard any more. Really, you just need a set of keys that can bang a point onto a multi-touch surface. The surface records an x,y position of the strike, and software takes care of the physical coordinate to key-code mapping. Multi-touch takes care of chording (a necessary feature for shift and other modifier keys).</p>
<p>My last idea of a <a href="http://www.cogitolingua.net/blog//2007/09/16/end-of-the-keyboard/">multi-touch surface keyboard</a> didn&#8217;t have any hardware for tactile feedback. But this one is different, we get to keep the tactile feel, because the physical stand-alone keys can be spring-buckling, scissor, or whatever: as long as it can bring down a strong point on the multi-touch surface.</p>
<p>Even if nobody ever picks up on the multi-touch surface keyboard, the above layout can still be mass produced as shown. I think most people will find it easy to adapt to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2012/01/21/a-configurable-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Business as an Investment</title>
		<link>http://www.cogitolingua.net/blog/2011/12/29/business-as-an-investment/</link>
		<comments>http://www.cogitolingua.net/blog/2011/12/29/business-as-an-investment/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 07:27:58 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Comp*]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Investment]]></category>
		<category><![CDATA[Tech*]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[start-up]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=1104</guid>
		<description><![CDATA[<p>I finished my reading of Mike Maloney&#8217;s Guide to Investing in Gold and Silver, partially to get an idea of how he got started in the business of bullion. He&#8217;s actually had several businesses throughout his life, including one where he designed &#8220;stereo amplification electronics were selected as one of five permanent exhibits at the [...]]]></description>
			<content:encoded><![CDATA[<p>I finished my reading of Mike Maloney&#8217;s Guide to Investing in Gold and Silver, partially to get an idea of how he got started in the business of bullion. He&#8217;s actually had several businesses throughout his life, including one where he designed &#8220;stereo amplification electronics were selected as one of five permanent exhibits at the royal Victoria &#038; Albert Museum in London&#8221;[<a href="http://wealthcycles.com/about/michael-maloney">WealthCycles</a>]. The last chapter contained what I was looking for. Starting with a goal to accumulate high-cash-flow apartments, he decided (based on research) to invest in the gold and silver cycle as it was building momentum (~2001). He also realized that further leverage could be obtained in the gold and sliver mining company stocks, and in starting a business that would do well during the cycle. Promoting the book, and joining Robert Kiyosaki&#8217;s team are icing on the cake.</p>
<p>Clearly, he didn&#8217;t position himself without some self-education. He had good reasons (stock market was languishing) to uncover information about the next cycle. As a practiced entrepreneur he knew both how to form and promote the new business: it was really only a question of figuring out which business would be the most profitable. He&#8217;s now quite passionate about the data he&#8217;s collected, and in helping others to profit from the information.</p>
<p>But you don&#8217;t achieve that kind of success without some up-front costs and research, together with the tenacity to carry through on the plan.</p>
<p>Recently, I&#8217;ve been trying to figure out what is the best manner in which I can use my existing capital (education about programming, dedication to reading/learning more, and passion for clearly explaining it to others) to build myself a stable future. On the one hand I could get a regular job either as a programmer at a large tech company (producing more for them that I receive in salary) or as an instructor a college/university (collecting considerably less in salary). But neither of these options gives me the autonomy I desire. Besides which, I think that Kahn Academy, has shown us that a revolution in education is afoot.</p>
<p>So, my current plan is to find a way of effectively educating people about programming: to provide them with the skills that allow them to join the class of highly compensated professional programmers. If I can uncover a mechanism that scales, so that revenues are less a function of the time I spend talking and more a function of the skills instilled in others: then I think I can build a stable, reliable income. The mechanism that scales well seems to be short self-contained videos about language features and design patterns accompanied by an XP workshop to build the interpersonal skills and practice.</p>
<p>What I learned from Mike: Building a business on the boom cycle leverages your gains.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2011/12/29/business-as-an-investment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Homoiconic Dichotomy and Interactive Publications</title>
		<link>http://www.cogitolingua.net/blog/2011/08/23/homoiconic-dichotomy-and-interactive-publications/</link>
		<comments>http://www.cogitolingua.net/blog/2011/08/23/homoiconic-dichotomy-and-interactive-publications/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 10:11:37 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Punditry]]></category>
		<category><![CDATA[Strange Loop]]></category>
		<category><![CDATA[Tech*]]></category>
		<category><![CDATA[homoiconic]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[publishing]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=732</guid>
		<description><![CDATA[<p>Both Linguistics and Computer Science have some concern about the difference between form and meaning. This difference is usually introduced in a syntax vs semantics lecture. I would like to show that it actually occurs in a wide variety of circumstances.</p> Form Meaning Domain Syntax Semantics Linguistics (grammars), Computer Science (Parsing) Language Thought Cognitive Science, [...]]]></description>
			<content:encoded><![CDATA[<p>Both Linguistics and Computer Science have some concern about the difference between form and meaning. This difference is usually introduced in a syntax vs semantics lecture. I would like to show that it actually occurs in a wide variety of circumstances.</p>
<table>
<tr>
<th>Form</th>
<th>Meaning</th>
<th>Domain</th>
</tr>
<tr>
<td>Syntax</td>
<td>Semantics</td>
<td>Linguistics (grammars), Computer Science (Parsing)</td>
</tr>
<tr>
<td>Language</td>
<td>Thought</td>
<td>Cognitive Science, Artificial Intelligence, <a href="http://en.wikipedia.org/wiki/Sapir-Whorf_hypothesis">Sapir-Whorf Hypothesis</a></td>
</tr>
<tr>
<td>Data</td>
<td>Code</td>
<td>Compilers, Interpreters, <a href="http://en.wikipedia.org/wiki/Metacircular_Interpreter">Metacircular Evaluators</a></td>
</tr>
<tr>
<td>Document</td>
<td>Application</td>
<td>Web 2.0</td>
</tr>
</table>
<p>Key to this topics is an interesting observation, for the syntax of any language to have meaning, there must exist an interpreter. For spoken languages, the interpreter is a brain (conventionally human, though the statistical models of machine learning experts are pushing the capabilities of electronic brains). In my own field of computer science, we&#8217;ve recognized that via a side-effect of the <a href="http://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis">Church-Turing Hypothesis</a>, formal languages can be turned to inspect themselves in a <a href="http://en.wikipedia.org/wiki/Strange_loop">Strange Loop</a>.</p>
<p>Lisp gives the most compelling example of this structural curiosity: For the underlying data structure of Lisp programs, the list, is syntactically represented in the exact same manner as Lisp programs themselves. This property makes the language <a href="http://en.wikipedia.org/wiki/Homoiconic">homoiconic</a>. The advantages are philosophically far-reaching: it makes very easy the ability to have code-writing-code, because a program can treat another function as data, manipulating it and restructuring it, until a new function is produced as a result.</p>
<p>Of course, if the system is allowed to point at itself, we have <a href="http://en.wikipedia.org/wiki/Self-modifying_code">self-modifying code</a>. And all the dangers, and advantages, and clever tricks that implies. I bring up this point, because of that last item: the difference between a document and an application is steadily blurring on the Web. It started with a desire for documents to have some level of interactivity, and has crescendoed into mail, maps, and even gaming (thanks to HTML5 canvas). But what&#8217;s really going on is, JavaScript, which is embedded in a document, has access to the document, and can modify the contents on the fly, in response to user input. It&#8217;s a self-modifying document (that can interact with the world through REST API&#8217;s, XmlHttpRequest, post/get webforms, etc).</p>
<p>[I just want to bury in here a mention of the <a href="csrc.nist.gov/publications/nistpubs/800-28-ver2/SP800-28v2.pdf">Guidelines on Active Content and Mobile Code</a> which focuses on the security implication of readily available, barely containable, documents with embedded code ]</p>
<p>Even if JavaScript, by chance, has some self-describing features as witnessed by JSON. I think the better medium would have been something Lisp or Scheme-like. We could port a publishing framework such as <a href="http://www.nongnu.org/skribilo/">Skribilo</a> to the web pretty easily. Just write a scheme interpreter in javascript, provide hooks for the html generator backend so that connects to its own page, and ship! Because Lisp and Scheme have some better theoretical underpinnings (due to their closeness to the lambda calculus) we ought to be able to get better security by moving our documents to such a form. At the very least though, we will definitely have an easier time maintaining our document/app chimeras.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2011/08/23/homoiconic-dichotomy-and-interactive-publications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Future of Publishing should be Skribilo</title>
		<link>http://www.cogitolingua.net/blog/2011/08/18/the-future-of-publishing-should-be-skribilo/</link>
		<comments>http://www.cogitolingua.net/blog/2011/08/18/the-future-of-publishing-should-be-skribilo/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 23:28:29 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Language]]></category>
		<category><![CDATA[Punditry]]></category>
		<category><![CDATA[Tech*]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=699</guid>
		<description><![CDATA[<p>Finally, I found something that looks like it could suitably replace LaTeX! It&#8217;s called Skribilo and features all of the goodness observed in a previous post about using a Lisp-like syntax instead of that crufty HTML/XML nonsense.</p> ]]></description>
			<content:encoded><![CDATA[<p>Finally, I found something that looks like it could suitably replace LaTeX! It&#8217;s called <a href="http://www.nongnu.org/skribilo/">Skribilo</a> and features all of the goodness observed in a <a href="http://www.cogitolingua.net/blog//2010/12/21/the-future-of-the-web-should-be-lisp/">previous post</a> about using a Lisp-like syntax instead of that crufty HTML/XML nonsense.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2011/08/18/the-future-of-publishing-should-be-skribilo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cool stuff to look at</title>
		<link>http://www.cogitolingua.net/blog/2011/08/06/cool-stuff-to-look-at/</link>
		<comments>http://www.cogitolingua.net/blog/2011/08/06/cool-stuff-to-look-at/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 23:08:10 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Comp*]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[People]]></category>
		<category><![CDATA[Tech*]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=625</guid>
		<description><![CDATA[<p>Steve Yegge gave a nice talk at OSCON, What would you do with your own Google?, compelling us all to focus on math, stats, machine learning, and the understanding the core fundamentals. We should be working to make the world a better place! Use our knowledge of scaling and systems, to solve big, important problems [...]]]></description>
			<content:encoded><![CDATA[<p>Steve Yegge gave a nice talk at OSCON, <a href="http://www.youtube.com/watch?v=vKmQW_Nkfk8">What would you do with your own Google?</a>, compelling us all to focus on math, stats, machine learning, and the understanding the core fundamentals. We should be working to make the world a better place! Use our knowledge of scaling and systems, to solve big, important problems (medicine, cancer, etc.) not on optimizing ads or cat pictures. From this talk, I think we should all spend an hour each day on learning and self-improvement!</p>
<p>Alan Kay has a nice talk, <a href="http://tele-task.de/archive/video/flash/14029/">Programming and Scaling</a> (<a href="http://lambda-the-ultimate.org/node/4325">also at LtU</a>), where he carefully, and patiently explains that our software today is tinker-toys. We haven&#8217;t raised our level of consciousness, we aren&#8217;t innovating ideas, and our languages aren&#8217;t powerful enough. I like this because, at the end of the talk he demonstrates how to stitch pieces together with greater effect: <a href="">OMeta</a>.</p>
<p>Ungar has a video given at Stanford called <a href="">Self and Self: Whys and Wherefores</a> where he shows clips demonstrating the Alternate Reality Kit . The ARK, in my opinion, represents alot of what Kay has been doing in Squeak. Ungar, uses these clips to argue that &#8220;simplicity begats uniformity begats malleability&#8221; (Randy Smith). When designing a system, we should try to keep it small and elegant. This is not just an aesthetic issue, but it&#8217;s an engineering complexity issue. By striving to keep the system small, we factor out the core ideas behind the system. This helps use to explicitly identify the underlying similarities of what we are trying to model. This uniformity make for a better system,  and gives it a cohesive framework. You&#8217;ll notice the same lesson is available from Unix, where Thompson and Ritchie credit the idea of &#8216;piping&#8217; with a fundamentally better means of program interactivity, and the &#8216;file object&#8217; as the enabler. (The file interface was later improved in the Plan 9 OS). The uniformity can also be brought to the fore, by language. A core language for expressing the core ideas. You should also not add to the design of the language by looking at clever examples that show off the feature. Instead, step back, and see if the new rules fit in with the principles of the system.</p>
<p>These demos of old systems (especially the <a href="http://en.wikipedia.org/wiki/The_Mother_of_All_Demos">Mother of All Demos</a> (<a href="http://www.youtube.com/watch?v=JfIgzSoTMOs">vid</a>)), really pack a punch. It kills me to think that we&#8217;ve been getting it wrong for so long. The mediocre triumphs because our brains are too slow. As Kay observes in the talk above: We can&#8217;t conceptualize our future except by baby-step-iteration of the present. This is a sad state of affairs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2011/08/06/cool-stuff-to-look-at/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Const-correctness</title>
		<link>http://www.cogitolingua.net/blog/2011/02/16/const-correctness/</link>
		<comments>http://www.cogitolingua.net/blog/2011/02/16/const-correctness/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 03:55:23 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Comp*]]></category>
		<category><![CDATA[Information Flow]]></category>
		<category><![CDATA[Tech*]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=453</guid>
		<description><![CDATA[<p>One of my fellow lab-mates has already posted about const-correctness, because of some similar issues. My work today, takes it a tiny bit further into sheer insanity.</p> <p>If you don&#8217;t start your program off using a const-correctness discipline, it&#8217;s very likely that you will find yourself in a world of hurt when you try to [...]]]></description>
			<content:encoded><![CDATA[<p>One of my fellow lab-mates has <a href="http://gforge.ssllab.org/~tmjackso/wordpress/archives/309">already posted</a> about const-correctness, because of some similar issues. My work today, takes it a tiny bit further into sheer insanity.</p>
<p>If you don&#8217;t start your program off using a const-correctness discipline, it&#8217;s very likely that you will find yourself in a world of hurt when you try to add it in later. I hit something like this today. In our system we have these labels, which are managed by a Factory and which are supposed to be immutable. Because all the labels are managed by a factory, we have a whole bunch of pointers:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">JSFlowLabel <span style="color: #000040;">*</span>lab <span style="color: #000080;">=</span> ...</pre></div></div>

<p>Although no bugs have come up as a result, we should have decided a long time ago, to enforce the immutable semantics with the compiler. So, after seeing a few suspicious lines today, (which turned out to be fine, but which raised my paranoia alarms) I decided that we should add const. Beginning with the Factory that produces these:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">JSFlowLabel <span style="color: #0000ff;">const</span><span style="color: #000040;">*</span> JSFlowLabel<span style="color: #008080;">::</span><span style="color: #007788;">create</span><span style="color: #008000;">&#40;</span>...<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>...<span style="color: #008000;">&#125;</span></pre></div></div>

<p>Followed by a hundred changes to code like the above, and a few method call modifications.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">JSFlowLabel <span style="color: #0000ff;">const</span> <span style="color: #000040;">*</span>lab <span style="color: #000080;">=</span> ...
&nbsp;
<span style="color: #007788;">JSFlowLabel</span><span style="color: #008080;">::</span><span style="color: #007788;">join</span><span style="color: #008000;">&#40;</span>JSFlowLabel <span style="color: #0000ff;">const</span> <span style="color: #000040;">*</span>lab1, JSFlowLabel <span style="color: #0000ff;">const</span> <span style="color: #000040;">*</span>lab2<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>...<span style="color: #008000;">&#125;</span></pre></div></div>

<p>But, of course, just when you think you are nearing completion, there&#8217;s some line lurking somewhere to bite you.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">js<span style="color: #008080;">::</span><span style="color: #007788;">Value</span> val <span style="color: #000080;">=</span> ...
<span style="color: #007788;">JSFlowLabel</span> <span style="color: #0000ff;">const</span> <span style="color: #000040;">*</span>lab <span style="color: #000080;">=</span> ...
&nbsp;
<span style="color: #007788;">val</span>.<span style="color: #007788;">setPrivate</span><span style="color: #008000;">&#40;</span>lab<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>And what, pray tell, is the signature of <code>setPrivate(...)</code> ?</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">void</span> setPrivate<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span> <span style="color: #000040;">*</span>data<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>Oh, well that&#8217;s easy to fix, I think to myself. I&#8217;ll just overload a <code>const</code> version and dispatch.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">void</span> setPrivate<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">void</span> <span style="color: #0000ff;">const</span> <span style="color: #000040;">*</span>data<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
    setPrivate<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">const_cast</span><span style="color: #000080;">&lt;</span><span style="color: #0000ff;">void</span> <span style="color: #000040;">*</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>data<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>Having got this far, I still have some hope things will work out. I start the compiler to test my changes, and wonder a bit about what deep ruminations about data have led the compiler to draw such a sharp philosophical distinction between <code>void</code> and <code>const void</code>. And despite these wonderful distinctions, I&#8217;m still never allowed to make data of type <code>void</code>, only functions that can return a <code>void</code> whatever that means, &#8230; wait, can I have a function returning a <code>const void</code>? If I continue this line of thought, will I become as useless as a philosopher? Does enough rumination about <code>void</code> type your thoughts as <code>void</code>? Is the brain-rot setting in? Will I ever be able to recover the damage C++ has caused me?. Oh, yeah, back to my story&#8230;</p>
<p>So, I was thinking things might work themselves out, and (at worst) I&#8217;d have to make a few more wrapper overloads to some system-level functions. But NO! my very sanity was soon challenged by the compiler:</p>
<pre lang="">
../jsfun.cpp:1158: error: call of overloaded ‘setPrivate(NULL)’ is ambiguous
../jsobj.h:742: note: candidates are: void JSObject::setPrivate(void*)
../jsobj.h:747: note:                 void JSObject::setPrivate(const void*)
</pre>
<p>At this point my all my thoughts were dumped to <code>/dev/null</code>. The C++ typing system is clearly more depraved than I am, so it wins this round!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2011/02/16/const-correctness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Future of the Web should be Lisp</title>
		<link>http://www.cogitolingua.net/blog/2010/12/21/the-future-of-the-web-should-be-lisp/</link>
		<comments>http://www.cogitolingua.net/blog/2010/12/21/the-future-of-the-web-should-be-lisp/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 08:25:25 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Punditry]]></category>
		<category><![CDATA[Tech*]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=424</guid>
		<description><![CDATA[<p>I was reading Steve Yegge&#8217;s drunken rant on The Emacs Problem. It wasn&#8217;t able to convince me that Lisp was a great language for text processing, but it did convince me that Lisp is a fantastic language for data interchange. Especially, if that data happens to have hierarchical structure. Say for example, something like HTML.</p> [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading Steve Yegge&#8217;s drunken rant on <a href="http://sites.google.com/site/steveyegge2/the-emacs-problem">The Emacs Problem</a>. It wasn&#8217;t able to convince me that Lisp was a great language for text processing, but it did convince me that Lisp is a fantastic language for data interchange. Especially, if that data happens to have hierarchical structure. Say for example, something like HTML.</p>
<p>Steve was kind enough to point out a really nice XML logfile example, which I reproduce here:</p>
<table>
<tr>
<td>
<pre>&lt;<font color="#0000ff">?</font><font color="#b22222">xml</font> <font color="#a0522d">version</font>=<font color="#0000ff">"</font>1.0<font color="#0000ff">"</font> <font color="#a0522d">encoding</font>=<font color="#0000ff">"</font>utf-8<font color="#0000ff">"</font> <font color="#a0522d">standalone</font>=<font color="#0000ff">"</font>no<font color="#0000ff">"</font><font color="#0000ff">?&gt;</font>
&lt;<font color="#0000ff">!</font><font color="#b22222">DOCTYPE</font> log <font color="#b22222">SYSTEM</font> <font color="#0000ff">"</font>logger.dtd<font color="#0000ff">"&gt;</font>
&lt;<font color="#b22222">log&gt;</font>
&lt;<font color="#b22222">record&gt;</font>
  &lt;<font color="#b22222">date&gt;</font>2005-02-21T18:57:39&lt;<font color="#b22222">/</font><font color="#b22222">date&gt;</font>
  &lt;<font color="#b22222">millis&gt;</font>1109041059800&lt;<font color="#b22222">/</font><font color="#b22222">millis&gt;</font>
  &lt;<font color="#b22222">sequence&gt;</font>1&lt;<font color="#b22222">/</font><font color="#b22222">sequence&gt;</font>
  &lt;<font color="#b22222">logger&gt;</font><font color="#0000ff">&lt;</font><font color="#b22222">/</font><font color="#b22222">logger&gt;</font>
  &lt;<font color="#b22222">level&gt;</font>SEVERE&lt;<font color="#b22222">/</font><font color="#b22222">level&gt;</font>
  &lt;<font color="#b22222">class&gt;</font>java.util.logging.LogManager$RootLogger&lt;<font color="#b22222">/</font><font color="#b22222">class&gt;</font>
  &lt;<font color="#b22222">method&gt;</font>log&lt;<font color="#b22222">/</font><font color="#b22222">method&gt;</font>
  &lt;<font color="#b22222">thread&gt;</font>10&lt;<font color="#b22222">/</font><font color="#b22222">thread&gt;</font>
  &lt;<font color="#b22222">message&gt;</font>A very very bad thing has happened!&lt;<font color="#b22222">/</font><font color="#b22222">message&gt;</font>
  &lt;<font color="#b22222">exception&gt;</font>
    &lt;<font color="#b22222">message&gt;</font>java.lang.Exception&lt;<font color="#b22222">/</font><font color="#b22222">message&gt;</font>
    &lt;<font color="#b22222">frame&gt;</font>
      &lt;<font color="#b22222">class&gt;</font>logtest&lt;<font color="#b22222">/</font><font color="#b22222">class&gt;</font>
      &lt;<font color="#b22222">method&gt;</font>main&lt;<font color="#b22222">/</font><font color="#b22222">method&gt;</font>
      &lt;<font color="#b22222">line&gt;</font>30&lt;<font color="#b22222">/</font><font color="#b22222">line&gt;</font>
    &lt;<font color="#b22222">/</font><font color="#b22222">frame&gt;</font>
  &lt;<font color="#b22222">/</font><font color="#b22222">exception&gt;</font>
&lt;<font color="#b22222">/</font><font color="#b22222">record&gt;</font>
&lt;<font color="#b22222">/</font><font color="#b22222">log&gt;</font>
</pre>
</td>
<td>
<pre>(<font color="firebrick">log</font>
'(<font color="firebrick">record</font>
  (<font color="firebrick">date</font> <font color="RoyalBlue">"2005-02-21T18:57:39"</font>)
  (<font color="firebrick">millis</font> 1109041059800)
  (<font color="firebrick">sequence</font> 1)
  (<font color="firebrick">logger</font> nil)
  (<font color="firebrick">level</font> <font color="red">'SEVERE</font>)
  (<font color="firebrick">class</font> <font color="RoyalBlue">"java.util.logging.LogManager$RootLogger"</font>)
  (<font color="firebrick">method</font> <font color="DarkGreen">'log</font>)
  (<font color="firebrick">thread</font> 10)
  (<font color="firebrick">message</font> <font color="RoyalBlue">"A very very bad thing has happened!"</font>)
  (<font color="firebrick">exception</font>
    (<font color="firebrick">message</font> <font color="RoyalBlue">"java.lang.Exception"</font>)
    (<font color="firebrick">frame</font>
      (<font color="firebrick">class</font> <font color="RoyalBlue">"logtest"</font>)
      (<font color="firebrick">method</font> <font color="DarkGreen">'main</font>)
      (<font color="firebrick">line</font> 30)))))
</pre>
</td>
</tr>
</table>
<p>What&#8217;s super-amazingly-awesome about this transformation is three-fold:</p>
<ol>
<li>The transformation is structure-preserving.</li>
<li>The syntax is orders of magnitude simpler.</li>
<li>The tags can be interpreted as Lisp functions.</li>
</ol>
<p>Let&#8217;s focus on these in more detail:<br />
Because the transformation is structure-preserving, the transition is theoretically achievable. The Web is currently a huge stinking polyglot of HTML, XML, XHTML, JavaScript, XHTTPRequest. It&#8217;s been festering, and each time someone scratches an itch, we all have to deal with that solution and it&#8217;s interactions with existing technologies. Right now we have a huge Tower of Babal, and the web browser has to support it all!</p>
<p>In my work as a web security researcher, I&#8217;ve come to the conclusion that the root of code injection attacks is precisely this polyglot monstrosity! If the web had a simpler, unified syntax for all it&#8217;s technologies, many of these problems would go away, and the remaining ones could be more easily mitigated. No more special cases, means less buggy code, fewer opportunities for things to go wrong, and a lower profile exposed to attacks.</p>
<p>Finally, because we&#8217;ve encoded the HTML data as a set of Lisp lists: the document can easily become self-modifying! HTML was envisioned to hold static documents, and roughly describe their structure to a browser that would render it. This worked well back in the early days, when all we had was some ascii pr0n, Star Trek lore, and home pages of CERN employees. But over time, as more people started using the web, we craved more exciting things. For example all the people on Geocities wanted that &lt;blink&gt; tag that made we want to scratch out my own eyes by prevented that by triggering an epileptic fit.</p>
<p>Eventually, businesses got in on the action. And they had frighteningly different demands: they wanted more automation, they wanted glitz that would attract users. It wasn&#8217;t enough to have a server-side script create and deliver a page based on what&#8217;s currently present in the inventory database. No! What they wanted was User Interaction. How do you make HTML more dynamic? You have to give it the ability to self-modify. But HTML isn&#8217;t a programming language, it&#8217;s a document layout language!</p>
<p>Enter JavaScript. Netscape (now Mozilla) birthed a language that would allow HTML pages to self-modify and self-introspect, and respond to user interactions. People, Businesses, Everybody just ate it up. There&#8217;s more JavaScript now than any other language.</p>
<p>Not only has the introduction of JavaScript compounded the polyglot problem, it introduced a whole new class of security risks because of the self-modifying capabilities. Now, your browser actually downloads code from anywhere on the web, and happily executes it. Demand for dynamic content so overwhelmed folks at the time that nobody seriously questioned the security risks! A very common attack nowadays is the XSS attack. If you can find a way to get JavaScript onto a page (say by posting it on a web forum) then you can take control of every browser that sets eyes on that page. This was how <a href="http://namb.la/popular/tech.html">Samy (my Hero!) took out MySpace</a>.</p>
<p>I&#8217;m not going to spend any more space here arguing against the idea of a self-modifying document. It&#8217;s way too late for that. AJAX applications like maps and mail are way too useful.</p>
<p>Let&#8217;s look at where the web is currently headed. I&#8217;ve heard about using web architecture as a service. I&#8217;ve heard about it using it for application delivery. The natural extension here is that your browser becomes the next operating-system in a box. But is this nasty polyglot, ad-hoc model of languages and their unholy spaghetti of interaction really the way to achieve that? It&#8217;s probably going to happen anyway. We can already see how: nobody writes HTML and JavaScript now, it&#8217;s all machine generated. Generated by Rails, and other web frameworks. When machine architectures became too tedious, we stopped programming assembly. We let the compilers figure it out. Now that web programming has become a nightmare, we turn to the frameworks to save us. Let the frameworks figure it out. The frameworks have become the compilers of the web.</p>
<p>But if you are really just going to machine generate so much&#8230; Why stick with the crufty interfaces? Why not replace it with, what I now consider the best data-interchange format of all time? Is Lisp really that bad?</p>
<p>There&#8217;s one other feature that Steve mentioned in his article that I haven&#8217;t addressed yet. Suppose that we decide to replace that HTML with Lisp, then what? How do we get back those dynamic pages? Well, look at that example again. Go on, look. I&#8217;ll wait.</p>
<p>It&#8217;s in Lisp. That means it&#8217;s potentially executable. Each of those entries, log, record, date, etc&#8230; can be a Lisp function. For HTML, we&#8217;d have the DOM structure, and each item in it would be executable. Some convenient hooks into the renderer, and your Lispified HTML renders itself! Another hook, say for the script tag, and your document becomes self-modifiable! We&#8217;re missing none of the dynamic content, just making it easier to parse and manipulate. I think if we switched we could build cathedrals on this stuff!</p>
<p>So please! What the web really needs is for this hideous architectural and syntactic nightmare to be slain like the monster it&#8217;s become! Since HTML really started as a document encoding format that focused on hierarchical structure, there&#8217;s no reason we can&#8217;t switch this to Lisp, like in Yegge&#8217;s logfile example. We lose none of the structure, and gain in simplified syntax. We loose none of the functionality, and gain enormously in our ability to parse, manipulate, transform the document. Further, since Lisp is so elegant, we can also do more of the analyses required for securing, optimizing, and jit-compiling.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2010/12/21/the-future-of-the-web-should-be-lisp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Love the RAID</title>
		<link>http://www.cogitolingua.net/blog/2010/01/05/love-the-raid/</link>
		<comments>http://www.cogitolingua.net/blog/2010/01/05/love-the-raid/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 05:05:42 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Self]]></category>
		<category><![CDATA[Tech*]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=315</guid>
		<description><![CDATA[<p>Remember that desktop machine that I assembled way back when? My paranoia led me to arrange the disk layout as follows: 2 drives in a mirror that will hold the primary system, and 4 drives in a RAID 5 for storage. The mirror was arranged by partitioning each of the drives into three sections: one [...]]]></description>
			<content:encoded><![CDATA[<p>Remember that <a href="http://www.cogitolingua.net/blog//2008/09/09/a-modest-proposal-for-a-home-server/">desktop machine</a> that I assembled way back when? My paranoia led me to arrange the disk layout as follows: 2 drives in a mirror that will hold the primary system, and 4 drives in a RAID 5 for storage. The mirror was arranged by partitioning each of the drives into three sections: one for root, one for swap, one for /home. The root and /home sections were each placed into their own mirror RAID. I&#8217;m now quite glad that I&#8217;m so very paranoid.</p>
<p>Last week, while I was working on re-writing that compiler, I decided to upgrade my system (I felt oppressed by my software). I usually advise all my friends: &#8220;Don&#8217;t upgrade your computer, it will break everything.&#8221; It would have been good to follow my own advise. After the upgrade, grub was all wonkers and I couldn&#8217;t figure out how to fix it easily and get back to the compiler work. So, I figured the quickest solution was to completely re-install the system.</p>
<p>Easiest path to getting a new system, that has close to the same functionality of the old system is quite simple when you don&#8217;t have to worry about making extra backup copies of your stuff! I broke the mirror RAID, and installed a new system on one of the drives! Then any settings that I don&#8217;t quite like, or configurations that need to be maintained (such as the one for this website, and for Xorg) I can copy over when I identify the problem. When everything is all hunky-dory, then I can also re-establish the RAID.</p>
<p>Best part about splitting the root from the /home, is that all my user preferences and settings don&#8217;t have to be touched during the entire process! As soon as all the packages I wanted were installed in the new system (via <code>dpkg --(get|set)-selections</code>) I could simply login and pick up where I left off.</p>
<p>The total time before I could get back to programming: 1/2 day. I love Linux!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2010/01/05/love-the-raid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Xmas for Myself</title>
		<link>http://www.cogitolingua.net/blog/2009/11/22/xmas-for-myself/</link>
		<comments>http://www.cogitolingua.net/blog/2009/11/22/xmas-for-myself/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 01:31:22 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Self]]></category>
		<category><![CDATA[Tech*]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=306</guid>
		<description><![CDATA[<p>It&#8217;s become somewhat a habit of mine to purchase for myself some sorta technology each Xmas. I&#8217;m usually the one to make the purchase myself, because I&#8217;m pretty much the only one that knows what I want and need. One of the curses of being so introverted, is that nobody knows what gifts to give [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s become somewhat a habit of mine to purchase for myself some sorta technology each Xmas. I&#8217;m usually the one to make the purchase myself, because I&#8217;m pretty much the only one that knows what I want and need. One of the curses of being so introverted, is that nobody knows what gifts to give you. The situation is complicated by the the plethora of options available in the tech industry and its very rapid change, my family just isn&#8217;t inclined to keep up. They shouldn&#8217;t get all the blame though, as every time they ask what I want, I haven&#8217;t kept up with the industry enough either.</p>
<p>Last year I bought myself a <a href="http://www.cogitolingua.net/blog//2008/09/09/a-modest-proposal-for-a-home-server/">nice quad-core desktop machine</a>, that required its own assembly. I had to get a specific case, so that would hold 6 HD&#8217;s, 4 in a RAID5 and 2 in a RAID1. I remember spending probably about 2 weeks going through all the options and choices, doing price/performance comparisons, etc, etc. My desires are really too specific for anyone but myself to buy a good Xmas present. That machine, is still working today, serving up this website, and hosting a large collection of media. Since I purchased it I&#8217;ve wanted to run use the quad core for heavy-duty computing, but only wound up doing that <a href="http://www.cogitolingua.net/blog//2009/03/17/revisiting-cascade/">once</a>. I still have (long dated) plans to do stock market calculations though!</p>
<p>So, today and yesterday I spent several hours browsing the netbook offerings. I&#8217;m pretty sure that I want one of these things now. Last year, the market didn&#8217;t quite fit my needs. What I&#8217;d really like to have is</p>
<ul>
<li>a decent keyboard</li>
<li>HD screen 1366&#215;768 resolution, with LED backlight</li>
<li>Long battery life</li>
<li>Built-in GPS</li>
<li>Wifi, 802.11a/b/g/n</li>
<li>Bluetooth, even though I have no bluetooth devices</li>
<li>magnetic power plug, but Apple seems to have the monopoly on these, and isn&#8217;t licensing</li>
<li>Internet everywhere, without paying hideous $30+/mo. service charges</li>
<li>a Solid State Drive, because 5400rpm makes virtual memory paging take too long</li>
<li>a processor that can actually do work</li>
</ul>
<p>It seems that enough of these requirements are fulfilled by the Acer Aspire as1410-8414. While HD video playback isn&#8217;t as good as a normal desktop, it&#8217;s really the screen size that I care about. I need that space for plenty amounts of text. I assume that if the provided HD is too slow for my tastes I can upgrade in 6months to a SSD, and more RAM. My current laptop, Toshiba Satellite U205-S5057, has a Core 2 Duo, and has held up quite nicely for 3 years now. It&#8217;s unfortunate drawbacks are some finickiness with suspend/sleep, and battery life. I think that the season is right for an upgrade. I&#8217;ll be downgrading to a Core 2 Solo, but the higher number of pixels, and longer battery life make it all worthwhile.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/eRXtTG-HIp4&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/eRXtTG-HIp4&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2009/11/22/xmas-for-myself/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>High-Tech Life</title>
		<link>http://www.cogitolingua.net/blog/2009/07/27/high-tech-life/</link>
		<comments>http://www.cogitolingua.net/blog/2009/07/27/high-tech-life/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 02:07:59 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Tech*]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=239</guid>
		<description><![CDATA[<p>There are many things associated with a high-tech lifestyle. Most of these things are electronic: cellphone, kindle, PDA, laptop, video-conferencing, etc. I think it&#8217;s the more subtle things that actually matter more. The things that aren&#8217;t visible, that are often overlooked, but which actually have a large impact.</p> <p>Today an article came out on slashdot [...]]]></description>
			<content:encoded><![CDATA[<p>There are many things associated with a high-tech lifestyle. Most of these things are electronic: cellphone, kindle, PDA, laptop, video-conferencing, etc. I think it&#8217;s the more subtle things that actually matter more. The things that aren&#8217;t visible, that are often overlooked, but which actually have a large impact.</p>
<p>Today an article came out on slashdot about a <a href="http://science.slashdot.org/story/09/07/25/2115255/Bacterial-Computer-Solves-Hamiltonian-Path-Problem?from=rss">Bacterial Computer that can Solves the Hamiltonian Path Problem</a> This article, of course, led me awander on the internet, whereupon I read about <a href="http://en.wikipedia.org/wiki/Antibubble">Antibubbles!</a> and a company called <a href="http://www.zubbles.com/">Zubbles</a>.</p>
<p>Zubbles are <em>fascinating</em>. Colored bubbles. The idea is deceptively simple, but let&#8217;s think about how color in bubbles is formed. Bubble typically have a rainbow shine to them because of variations in the bubble film, that resonate with different frequencies of light. Suppose that you wanted only a single color instead of an ever-changing rainbow.</p>
<p>There are two options:</p>
<ol>
<li>produce a film that has a specific thickness that&#8217;s the color you want.</li>
<li>add a colored dye to the soap solution.</li>
</ol>
<p>The Zubbles company chose option (2), but still had a great deal of technical details to work out. The chosen dye must be soluble, non-toxic, can&#8217;t interfere with surface-tension properties necessary for bubble formation, and shouldn&#8217;t get colored dye all over everything the bubbles might land and pop on. Remarkably, bright chemists were able to <a href="http://en.wikipedia.org/wiki/Zubbles">solve</a> these problems. The found a set of dye&#8217;s that remain in-tact until the bubble pops. The popping has enough energy that it causes a carbon ring within the dye to open up. When the ring is broken the dye loses its color.</p>
<p>About ten years of experimenting, for a deceptively simple children&#8217;s toy. Science is awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2009/07/27/high-tech-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

