<?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>David Brunton</title>
	<atom:link href="http://davidbrunton.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidbrunton.com</link>
	<description>And... we&#039;re back.  Again.</description>
	<lastBuildDate>Sun, 15 Jan 2012 22:19:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Things Made</title>
		<link>http://davidbrunton.com/2012/01/15/things-made/</link>
		<comments>http://davidbrunton.com/2012/01/15/things-made/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 22:08:09 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=627</guid>
		<description><![CDATA[Finished my first batch of knotweed dye, dyed a cotton shirt.  Doesn&#8217;t look great, thought not bat for a first attempt I guess: Still wet from the knotweed dyeing vat. Made my first commit to @eikeon&#8217;s hu repository, also not &#8230; <a href="http://davidbrunton.com/2012/01/15/things-made/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Finished my first batch of knotweed dye, dyed a cotton shirt.  Doesn&#8217;t look great, thought not bat for a first attempt I guess:</p>
<div class="mceTemp mceIEcenter">
<dl class="wp-caption aligncenter" style="width: 594px;">
<dt class="wp-caption-dt"><a href="http://davidbrunton.com/wp-content/uploads/2012/01/shirt.jpg"><img class="size-large wp-image-628" title="T Shirt, knotweed dye" src="http://davidbrunton.com/wp-content/uploads/2012/01/shirt-1024x682.jpg" alt="ugly brown t-shirt" width="584" height="388" /></a></dt>
</dl>
<div style="text-align: left; padding-left: 30px;"><span style="color: #666666; font-family: Georgia, serif;"><span style="font-size: 12px; line-height: 17px;">Still wet from the knotweed dyeing vat.</span></span></div>
</div>
<p>Made my first commit to <a href="http://github.com/eikeon/hu/">@eikeon&#8217;s hu repository</a>, also not great, but also not bad for a first attempt, I guess.</p>
<p>Thought more about how to keep better track of things we&#8217;re making, came up with the idea of keeping a &#8220;log&#8221; on the &#8220;web&#8221; and maybe calling it a &#8220;web log&#8221; or just a &#8220;blog&#8221; for short.  I think this last idea may be the one that makes me millions.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2012/01/15/things-made/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Be Opinionated</title>
		<link>http://davidbrunton.com/2011/12/11/how-to-be-opinionated/</link>
		<comments>http://davidbrunton.com/2011/12/11/how-to-be-opinionated/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 11:17:29 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=609</guid>
		<description><![CDATA[The way you&#8217;re doing it now sucks.  Do it my way, and unicorns will shit gumdrops on your doorstep.  It&#8217;s not that hard; nobody does it because of some obvious-but-overlooked nuance discovered only by me.]]></description>
			<content:encoded><![CDATA[<p>The way you&#8217;re doing it now sucks.  Do it my way, and unicorns will shit gumdrops on your doorstep.  It&#8217;s not that hard; nobody does it because of some obvious-but-overlooked nuance discovered only by me.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/12/11/how-to-be-opinionated/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>In The Beginning Was The Word</title>
		<link>http://davidbrunton.com/2011/11/27/in-the-beginning-was-the-word/</link>
		<comments>http://davidbrunton.com/2011/11/27/in-the-beginning-was-the-word/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 17:33:34 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Code]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=599</guid>
		<description><![CDATA[This post started as an email to @eikeon.  Our conversations on language design are moving forward at a lumbering pace, and I want to make sure that some of them are set down, for two reasons: so we don&#8217;t forget &#8230; <a href="http://davidbrunton.com/2011/11/27/in-the-beginning-was-the-word/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post started as an email to <a href="http://eikeon.com">@eikeon</a>.  Our conversations on language design are moving forward at a lumbering pace, and I want to make sure that some of them are set down, for two reasons: so we don&#8217;t forget where we are, and so later we can look back and see how far we&#8217;ve come.</p>
<h1>Term</h1>
<p>We have talked about terms as a centerpiece of our language.  One reason for this is to craft a language that is oriented around humans, who generally seem to have an easy time with the concept of a term.  But it is not particularly problematic to think of a term as an object or a function or even a closure if you&#8217;re wired that way, e.g. you are a being made partly of wires.</p>
<h1>Alphabet</h1>
<p>The term has a label, which is just a contiguous sequence of characters.  We haven&#8217;t talked a lot about which alphabet we&#8217;ll use, but I&#8217;m guessing it will either be something Unicode-ish, or we will leave it open to the lexer.  If we do the latter, the alphabet will be a set of letters from which terms may be spelled (e.g. {a, b, c, d, e, f}).</p>
<h1>Lexicon</h1>
<p>For any given program, there is a corresponding list of entries, which are the lexicon for the program.  The entries are terms which must be spelled with whatever alphabet is used.  No terms may be used in the program that are not in the lexicon.  The list of terms contains a corresponding list of definitions- zero or more per term.</p>
<h1>Entries</h1>
<p>A an entry is either empty (the term may only be replaced with itself) or contains two parts: its shape and its definition.  The shape of an entry can be thought of as its part of speech, or as a named graph with the term at the center.  The definition, when it exists, consists of one or more sentences.</p>
<h1>Part of Speech</h1>
<p>The part of speech, or named graph, is part of a grammar.  The grammar of a language describes which parts of speech may be employed in sentences.  A part of speech &#8220;connects&#8221; to other parts of speech (or named graphs).  This can be thought of as the local structure on an abstract syntax tree for those more inclined to think that way, e.g. robots.</p>
<h1>Sentence</h1>
<p>A sentence is a collection of terms that are evaluated concurrently.  This is not to say that word order in a sentence is unimportant, as the first term encountered is the first one for which evaluation begins, and subsequent terms in the sentence may rely upon this fact.</p>
<h1>Paragraphs, etc.</h1>
<p>Sentences may be collected together into groups and called a paragraph.  A paragraph, simply put, is a group of sentences over which side effects may be relied upon to persist.  To the extent that paragraphs are collected together into larger collections (a section, perhaps, or a chapter) the larger collection is a group of paragraphs over which side effects of the paragraph may be relied upon to persist.</p>
<h1>Side Effects</h1>
<p>That word, &#8220;side effects&#8221; is also at the center of this language.  Terms do not return a value like a function or a method- instead, they transform into something else, and register this transformation with the other terms.  In this sense, each term can be thought of as a simple callback if you&#8217;re inclined that way, e.g. you are Donald Knuth or someone smarter than me, at least.</p>
<h1>Concurrency</h1>
<p>When we say the word &#8220;concurrent&#8221; it is as a counterpoint to the word &#8220;sequential.&#8221;  As such, the statement &#8220;A, then B, then C,&#8221; is different from the statement &#8220;All of A, B, C.&#8221;  In the former, perhaps B depends upon A, and C upon B.  In the latter, each depends upon the other (or none depend upon any, if you prefer to think about it that way, e.g. you are way out there).</p>
<h1>Fragments</h1>
<p>Last, but not least, a sentence fragment may not be parseable.  Think of book titles or recipe ingredients- these are intentionally fragments.  When a fragment is not meant to be parsed, this is a way of registering that it will be used subsequently, and it is not considered part of a paragraph.  E.g. no side-effects persist, but the fragment itself is kept around for use later in the program.  A fragment has an implicit part of speech (shape, but not a named graph, since it has no name).</p>
<h1>Lexing</h1>
<p>Lexing is the process of looking sequentially through a sentence and chopping it into terms.  This process requires a lexicon.  Note: lexing, lexicon.  The lexer consumes letters until it finds a term.  It then passes this term to a parser instance and branches.  One branch starts on a new term for that first parser instance, and the other continues to consume letters until it can be certain there is no alternative lexing.  If it finds an additional possibility, it passes the term to an alternative parser instance.  As such, lexing is deterministic, but it also may yield more than one parser instance.</p>
<h1>Parsing</h1>
<p>Each parser instance is given a set of terms by the lexer.  As they are encountered, each term is looked up in the lexicon, where zero ore more definitions are present.  If there are zero definitions present, the term is replaced with itself.  If there is one definition present, the term is replaced with that definition.  If there are two or more definitions present, the parser chooses which to use by examining the part of speech and seeing which will work in the context of the current sentence.  If this cannot be determined, the parser branches again, and both are tried.</p>
<h1>Compiling</h1>
<p>The process of compiling is essentially going through all the possibilities and following them to the bottom until every single term is replaceable only by itself.  Once this has been completed, the entirety of the program is represented by a graph of terms, where the shape of the graph locally is determined by a part-of-speech.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/11/27/in-the-beginning-was-the-word/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mathematical Logic for Children</title>
		<link>http://davidbrunton.com/2011/11/22/mathematical-logic-for-children/</link>
		<comments>http://davidbrunton.com/2011/11/22/mathematical-logic-for-children/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 12:47:08 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=597</guid>
		<description><![CDATA[Children seem to have this innate sense of the sweet spot between practicality and abstraction which is well suited to mathematical thinking. Given the Roman number II, the integer 2, the real number 2.0, the word pair, children seem to &#8230; <a href="http://davidbrunton.com/2011/11/22/mathematical-logic-for-children/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Children seem to have this innate sense of the sweet spot between practicality and abstraction which is well suited to mathematical thinking.</p>
<p>Given the Roman number II, the integer 2, the real number 2.0, the word pair, children seem to understand the relationship between them.  Children seem to know how two chairs and two people are the same.  In the bath last night, my two-year-old asked for one of her &#8220;guys&#8221; and when I gave it to her she pointed at the other one and said &#8220;two guys.&#8221;  Then she pointed at herself and said, &#8220;I&#8217;m two!&#8221;</p>
<p>What is the sameness between those two guys and the two years she&#8217;s lived and the two fingers she holds up proudly each time she uses that word?  Where does that sameness break down?</p>
<p>If I give her three sticks and she counts them, she counts to three.  If I break one of the sticks in half, she understands I haven&#8217;t added or subtracted any substance from her stick pile, but she also understands that predicates are needed when we talk about the four sticks we now have: two whole sticks and two half sticks.  If I ask &#8220;how many sticks are there?&#8221; she could answer a bunch of different ways: 4, 3, 2, or some other answer I haven&#8217;t thought of.  In order to settle on the same answer, we have to have a conversation about what we mean by &#8220;stick&#8221; &#8211; just a whole stick?  any part of a stick?  the number of sticks before one was divided?</p>
<p>Mathematical logic in children seems to be something that develops early and is surprisingly capable without too much intervention.  Wonder what it is that we do to change that?</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/11/22/mathematical-logic-for-children/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free School</title>
		<link>http://davidbrunton.com/2011/11/21/free-school/</link>
		<comments>http://davidbrunton.com/2011/11/21/free-school/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 02:47:52 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[freeschool]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=593</guid>
		<description><![CDATA[The proof of learning is knowing. The proof of knowing is teaching. The proof of teaching is another&#8217;s learning.]]></description>
			<content:encoded><![CDATA[<p>The proof of learning is knowing.</p>
<p>The proof of knowing is teaching.</p>
<p>The proof of teaching is another&#8217;s learning.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/11/21/free-school/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I Do Not Stand Up for Stallman</title>
		<link>http://davidbrunton.com/2011/11/01/i-do-not-stand-up-for-stallman/</link>
		<comments>http://davidbrunton.com/2011/11/01/i-do-not-stand-up-for-stallman/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 04:15:35 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Code]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=571</guid>
		<description><![CDATA[There has been an interesting little tempest in a teapot in the Free Software community, which has resulted in some blog responses: Why I Stand Up For Stallman I Also Stand Up For Stallman I have a slightly different perspective &#8230; <a href="http://davidbrunton.com/2011/11/01/i-do-not-stand-up-for-stallman/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There has been an interesting little tempest in a teapot in the Free Software community, which has resulted in some blog responses:</p>
<ul>
<li><a title="Why I stand Up for Stallman" href="http://scripting.com/stories/2011/10/31/whyIStandUpForStallman.html">Why I Stand Up For Stallman</a></li>
<li><a title="I Also Stand Up for Stallman" href="http://raganwald.posterous.com/i-also-stand-up-for-stallman">I Also Stand Up For Stallman</a></li>
</ul>
<p>I have a slightly different perspective on this.  I do not stand up for Stallman, because he has no need of my support in this regard.  Stallman is perfectly capable of standing up for himself, but seems to consider it beneath him to spend time on it.  Instead, he spends his efforts standing up for <a href="http://fsf.org">Free Software</a>.</p>
<p>He&#8217;s not some kid to feel sorry for, he&#8217;s a fucking MacArthur genius.  He invented Emacs.  He wrote the GPL.  He founded the Free Software movement.  He&#8217;s taken on huge corporations and tyrants and all other manner of adversaries (and friends) with their slings and arrows affecting him like water affects a duck&#8217;s ass.  He dines with presidents and prime ministers.</p>
<p>The origin of all this kerfluffle is some email that&#8217;s going around which makes Richard sound particular about his accommodations when he comes to town to give a FREE SPEECH.  Well, let me say this: Richard stayed at my place in DC during some such speeches, and he never once complained about anything.  At the time I lived in a bachelor shit-hole in a neighborhood in DC that was basically an open-air drug market.  Not.  One.  Complaint.</p>
<p>A fucking MacArthur genius, sleeping on my couch, in my shit-hole apartment, and the only thing he ever asked for was fucking wifi.</p>
<p>I don&#8217;t stand up for Stallman, I look up to Stallman.</p>
<p>Way up.</p>
<p>If you don&#8217;t, it means one of two things: either you don&#8217;t know about Stallman, or you&#8217;re a tool.  I don&#8217;t stand up for Stallman, but I look up to him.  And I run GNU/Linux, and I use Free Software.</p>
<p>Because Stallman said so, that&#8217;s why.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/11/01/i-do-not-stand-up-for-stallman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Notes on Concurrency</title>
		<link>http://davidbrunton.com/2011/10/23/more-notes-on-concurrency/</link>
		<comments>http://davidbrunton.com/2011/10/23/more-notes-on-concurrency/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 12:59:40 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=575</guid>
		<description><![CDATA[Indefinite pronouns got me thinking about concurrency patterns a bit more: any all some none one few fewer many more neither most such That&#8217;s not all of them, but it&#8217;s a good start.  Indefinite pronouns, roughly speaking, are what allows &#8230; <a href="http://davidbrunton.com/2011/10/23/more-notes-on-concurrency/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Indefinite pronouns got me thinking about concurrency patterns a bit more:</p>
<ul>
<li>any</li>
<li>all</li>
<li>some</li>
<li>none</li>
<li>one</li>
<li>few</li>
<li>fewer</li>
<li>many</li>
<li>more</li>
<li>neither</li>
<li>most</li>
<li>such</li>
</ul>
<p>That&#8217;s not all of them, but it&#8217;s a good start.  Indefinite pronouns, roughly speaking, are what allows us in English to signify operations on a list somewhat less&#8230; definitely&#8230; than otherwise.</p>
<p>These are the parallel equivalents of the Boolean operators we all know and love.  And, or, not, so, xor, nand, nor, etc.  Of course many of the Boolean operators operate most naturally on a list of two items, and the indefinite operators work well on lists of indeterminate length (in some cases, literally indeterminate, in that they could work on a list that hasn&#8217;t been counted at all).</p>
<p>Now, the difficulty here is that with software, indefinite logic requires us to do a bit more bookkeeping than straight Boolean logic.  For instance, when I do something like &#8220;a and b&#8221; with Boolean logic, I just evaluate a.  If a returns true, I evaluate b.  If b returns true, the whole statement is true.  Everything can be done sequentially, and programmers know to rely on the short-circuiting nature of the operation.</p>
<p>On the other hand, if I say &#8220;all a, b&#8221; I kick off concurrent evaluations of both at the same time (even if under the covers the machinery that takes care of this runs sequentially, or optimizes to run the faster one first or the more likely to fail one earlier).  If b immediately returns false, I need some way to tell a to stop evaluating, which might save considerable time and effort.</p>
<p>The Go programming language has some nice primitives built in for both operations (e.g. kicking off parallel computations, and for communicating between the various sub-processes).  The &#8220;go&#8221; term indicates parallel execution, and the &lt;- operator on a channel indicates communications back.</p>
<p>Of course with a thousand nested parallel calls, interspersed with plain old Boolean logic, there may be quite a bit of this going on, but it also may happen that most the calls get shut down before doing much.</p>
<p>The code might look something like this:</p>
<pre>and(a, b, c, all(c, d, any(e, f, g)), some(h, i))</pre>
<p>Here, the term and indicates sequential execution, the term all can be thought of as a parallel short-circuiting and, the any can be thought of as a parallel short-circuiting or, and the term some can be thought of as another variety of parallel or, which maybe doesn&#8217;t short-circuit as quickly.</p>
<p>I think programmers would grok this if it were presented in a reasonable fashion.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/10/23/more-notes-on-concurrency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Musings on Concurrency</title>
		<link>http://davidbrunton.com/2011/10/22/musings-on-concurrency/</link>
		<comments>http://davidbrunton.com/2011/10/22/musings-on-concurrency/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 13:30:52 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Code]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=572</guid>
		<description><![CDATA[Programming languages have long-since learned to short-circuit sequential operations.  In damn near any language, if I do the following: thing one &#38;&#38; thing two I only get to thing two if thing one evaluates true.  Even if you&#8217;re not a &#8230; <a href="http://davidbrunton.com/2011/10/22/musings-on-concurrency/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Programming languages have long-since learned to short-circuit sequential operations.  In damn near any language, if I do the following:</p>
<blockquote><p>thing one &amp;&amp; thing two</p></blockquote>
<p>I only get to thing two if thing one evaluates true.  Even if you&#8217;re not a programmer, you probably do this in practice.  Consider:</p>
<blockquote><p>If it&#8217;s dry and warm, we&#8217;ll play outside.</p></blockquote>
<p>Which means, if I get to the first part of the sentence, and see that it&#8217;s raining, I can just kind of disregard the rest.  I don&#8217;t have to even read to see what we were going to do if it were dry and warm, because it&#8217;s not dry.  We do the same sort of thing with &#8220;or.&#8221;  Consider:</p>
<blockquote><p>We&#8217;ll play outside if it&#8217;s wet or if it&#8217;s dry.</p></blockquote>
<p>If it&#8217;s wet outside, we don&#8217;t even need to read the last part of that sentence.  We short-circuit the final operation, because it&#8217;s not necessary for evaluating the truth of the whole construct.  The short-circuiting pattern is important for computers, because in the best-case scenario, it can save a some of computation.</p>
<p>In fact, if you imagine a sentence that includes a list to be evaluated in short-circuit mode, it can save a whole lot of computation:</p>
<blockquote><p>We&#8217;ll play outside if it&#8217;s wet or if it&#8217;s dry or if it&#8217;s cold or if it&#8217;s hot or if there&#8217;s a hurricane.</p></blockquote>
<p>Chances are, we&#8217;re going to play outside, and if it&#8217;s wet, we save the trouble of evaluating all the subsequent possibilities.</p>
<p>Now, for computers, there are some downsides to doing this.  For instance, it&#8217;s expected that in order to save time and in order to keep everything consistent, these operations need to happen sequentially.  A &amp;&amp; B &amp;&amp; C is different than B &amp;&amp; C &amp;&amp; A, even if the operations don&#8217;t have any side effects.  If there are side effects of the computations, the situation is even worse, since in one case maybe you get the side effects of A and B, and in the other you get the side effects of B and C.</p>
<p>If you&#8217;re not a programmer, you can skip the part about side effects without any side effects, I think.</p>
<p>What we&#8217;re missing is a systematic way of thinking about short-circuit operations that can happen in any order, and can happen either sequentially or out of sequence or concurrently.  It&#8217;s not that there isn&#8217;t special built-in machinery to do this in particular languages, but for a polyglot like me, there&#8217;s very little overlap between one way of thinking about it and another.</p>
<p>The funny thing is, English has a great many ways of designating a list as a short-circuit concurrency operation:</p>
<ul>
<li>any</li>
<li>all</li>
<li>none</li>
<li>one</li>
<li>some</li>
<li>more</li>
<li>fewer</li>
</ul>
<p>If you&#8217;re going to the store and I give you a list, I can gesture at the list with any of these words to let you know when you can quit.  &#8221;Any&#8221; of the items means you can stop when you find the first one.  &#8221;All&#8221; means you can get them in any order, but you need to get all of them.</p>
<p>We should be able to do the same thing, specifying a kind of concurrency and a kind of short-circuiting in programs with the same kind of shorthand.  Imagine I have a list of operations to perform, but I only care that at least six of them happen.  Or I know that if any of them fail, I can stop all of them.  Or if any of them succeed I can stop all of them.</p>
<p>I think that&#8217;s a level at which a programmer (at least the kind of programmer I am, which is to say one with more hubris and laziness than usual) should interact with a language&#8217;s underlying concurrency model.</p>
<p>Larry Wall put this idea into Perl 6, though I&#8217;m not convinced the semantics are exactly right.  For instance, I&#8217;m not sure if I should generally be saying:</p>
<blockquote><p>someMethod(any(1,2,3))</p></blockquote>
<p>or</p>
<blockquote><p>any(someMethod(1), someMethod(2), someMethod(3))</p></blockquote>
<p>The former looks terse at first glance, but requires a lot of bookkeeping inside of someMethod that might be avoided, particularly in languages that don&#8217;t have the notion of a Junction (that&#8217;s what he calls this kind of construct) baked in.  The latter looks verbose at first glance, but one can imagine cases where it would be useful to evaluate several different methods and/or put some syntactic sugar around the actual call.</p>
<p>I can also imagine a kind of chaining of these terms together in a way that creates a massively concurrent operation that can return quite quickly in the best-case scenario:</p>
<blockquote><p>if any(all(none(1,0,0), all(1,1,1), one(1,1,1)), any(1,0,1))</p>
<p>then someMethod()</p></blockquote>
<p>This could use the same truth-logic as usual boolean algebra, but could also short-circuit efficiently in a way that would be more difficult (or require more sophisticated machinery) if those same calls were the usual ands and ors that we would use in such code.</p>
<p>I don&#8217;t think the machinery for this is too complicated.  It would, of course, matter how the underlying concurrency was managed.  In something like Go or Erlang, it would probably be quite fast, and in something that required a heavier process for each unit of concurrency, it would probably only be worthwhile in the case of heavy computations that could benefit from the short-circuiting.</p>
<p>Last, but not least, I can imagine mixing this together with a bit of map-reduce.  So, if I do something like:</p>
<blockquote><p>all(someMethod(&#8220;foo&#8221;), someMethod(&#8220;bar&#8221;))</p></blockquote>
<p>I can write these methods to also stash a result somewhere (nasty side-effect, that) but only use it if the computations complete successfully according to the all operator (e.g. none of them return false and all of them return).</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/10/22/musings-on-concurrency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coming Out Day</title>
		<link>http://davidbrunton.com/2011/10/11/coming-out-day/</link>
		<comments>http://davidbrunton.com/2011/10/11/coming-out-day/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 21:29:51 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=365</guid>
		<description><![CDATA[[one wee little edit: if you're reading this on the front page, read the version with comments, which are worth a couple posts by themselves] When I started college, there were a series of peer counselling sessions, structured to gently introduce &#8230; <a href="http://davidbrunton.com/2011/10/11/coming-out-day/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>[<em>one wee little edit: if you're reading this on the front page, read <a title="Coming Out Day" href="http://davidbrunton.com/2011/10/11/coming-out-day/">the version with comments</a>, which are worth a couple posts by themselves</em>]</p>
<p>When I started college, there were a series of peer counselling sessions, structured to gently introduce the (possibly sheltered) 17- and 18-year-olds to some of the more jarring differences between a (possibly sheltered) high school classroom, and life at college.  The session I remember most vividly was run by what is now called the Queer Students and Allies (QSA).</p>
<p>It was next door too our suite, in the RA&#8217;s living room, and twelve or fifteen of us sat around in a circle on the floor with a couple older students leading a discussion group on a pretty wide range of topics.  Each of the topics seemed tailored to gently prod some of the more heteronormative ideals of the first-years.  Perhaps the most thought-provoking point in the discussion was when the peer counselors asked us to go around in a circle and say, &#8220;Hi I&#8217;m so-and-so, and I&#8217;m gay.&#8221;</p>
<p>I think the idea was to provide a safe environment where two things could happen: people who wanted to say it in the worst way could say so in a context that felt pretty safe (after all, everyone&#8217;s doing it&#8230;); and people who didn&#8217;t want to say it could see what it felt like anyway.  We duly went around the room, until one kid just wouldn&#8217;t say it.  Instead he said, &#8220;Hi, I&#8217;m David, and I&#8217;m not going to say that.&#8221;</p>
<p>He was the only one.</p>
<p>He was me.</p>
<p>I&#8217;ve thought about that day a lot of times since then.  That summer I went home and smugly told the story to a friend at church, reveling in my steadfastness and righteousness.  Like a Pharisee.</p>
<blockquote><p>Hi, I&#8217;m David, and I&#8217;m gay.</p></blockquote>
<p>I&#8217;m sorry I didn&#8217;t say it that day.  I&#8217;m sorry I subsequently bragged about it.  And I&#8217;m especially sorry to have made it harder to say for the people who really needed to.  I&#8217;m older now, and I suppose the stakes are lower: I&#8217;m not worried that some of the people reading this will only read that one sentence:</p>
<blockquote><p>Hi, I&#8217;m David, and I&#8217;m gay.</p></blockquote>
<p>After going around in a circle, the peer counselors asked, &#8220;What did that feel like?&#8221;  Almost twenty years later, I&#8217;m proud to say, I felt like an ass.  I felt like an ass when I didn&#8217;t say it, and I felt like an ass when I bragged about it, and I feel like an ass admitting that I thought it made me a good Christian.  So, in addition to saying</p>
<blockquote><p>Hi I&#8217;m David and I&#8217;m gay.</p></blockquote>
<p>I have one more thing to say: if you believe in God, and you&#8217;re gay, well, God loves your gay self, too.  And we&#8217;re not talking about a love-the-sinner-hate-the-sin kind of love, we&#8217;re talking about loving part and parcel.  And you know what, everyone (gay or straight or neither or both) who believes in God finds that last part hard to take sometimes, so just get over yourself.</p>
<p>Yeah, I said it, God loves you.  And I&#8217;m sorry it&#8217;s so controversial.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/10/11/coming-out-day/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Proceedings of the Ad Hoc Meeting of the Outer Banks Cosmological Society</title>
		<link>http://davidbrunton.com/2011/10/09/proceedings-of-the-ad-hoc-meeting-of-the-outer-banks-cosmological-society/</link>
		<comments>http://davidbrunton.com/2011/10/09/proceedings-of-the-ad-hoc-meeting-of-the-outer-banks-cosmological-society/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 17:55:16 +0000</pubDate>
		<dc:creator>dbrunton</dc:creator>
				<category><![CDATA[Outer Banks Cosmological Society]]></category>
		<guid isPermaLink="false">http://davidbrunton.com/?p=557</guid>
		<description><![CDATA[I think I know most of the people who read this blog.  Sure, there&#8217;s the occasional drive-by-clicking from reddit or google, but for the most part, you&#8217;re my family, friends, and coworkers.  It&#8217;s a comforting and sometimes surprising realization that &#8230; <a href="http://davidbrunton.com/2011/10/09/proceedings-of-the-ad-hoc-meeting-of-the-outer-banks-cosmological-society/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I think I know most of the people who read this blog.  Sure, there&#8217;s the occasional drive-by-clicking from reddit or google, but for the most part, you&#8217;re my family, friends, and coworkers.  It&#8217;s a comforting and sometimes surprising realization that there are more than two of you.</p>
<p>At a family vacation some years back, I dubbed the lot of you the Outer Banks Cosmological Society.  This all happened inside my head, and in a conversation with Maggie, so don&#8217;t feel bad if you didn&#8217;t already know you were a member.  It&#8217;s a loose association anyhow.</p>
<p>Those conversations, which I&#8217;ve had with pretty much all of you a time or two, I have come to think of as Ad Hoc Meetings.  This blog, for the most part, is the Proceedings of those Meetings.</p>
<p>You get my drift.  I&#8217;m the Editor of a Prestigious Journal, not just a Schlub With a Blog.</p>
<p>For most my life, and most the ten or so years I&#8217;ve had a website, this is the sort of thing I wouldn&#8217;t mention to people without winking, because, let&#8217;s face it, it&#8217;s a funny way to look at the world.  But I think most of us do it a little bit, and I think we should all do it more.</p>
<p>So, welcome to the Outer Banks Cosmological Society.</p>
<p>That is all.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidbrunton.com/2011/10/09/proceedings-of-the-ad-hoc-meeting-of-the-outer-banks-cosmological-society/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.952 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-06 08:18:50 -->

