<?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>Radian Programming Language</title>
	<atom:link href="http://www.radian-lang.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.radian-lang.org</link>
	<description>A programming language for parallel computing</description>
	<lastBuildDate>Fri, 18 May 2012 20:21:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Encapsulation and private members</title>
		<link>http://www.radian-lang.org/2012/05/encapsulation-and-private-members/</link>
		<comments>http://www.radian-lang.org/2012/05/encapsulation-and-private-members/#comments</comments>
		<pubDate>Fri, 18 May 2012 20:21:06 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=477</guid>
		<description><![CDATA[In the year since I last poked at this issue, I&#8217;ve been using the Python-inspired convention that identifiers beginning with an underscore should be considered private, expecting that I would eventually come up with some language mechanism for making this more than just a suggestion.
In the meantime, Google&#8217;s Dart language came along with a clever [...]]]></description>
			<content:encoded><![CDATA[<p>In the year since <a href="http://www.radian-lang.org/2011/03/access-specifiers/">I last poked at this issue</a>, I&#8217;ve been using the Python-inspired convention that identifiers beginning with an underscore should be considered private, expecting that I would eventually come up with some language mechanism for making this more than just a suggestion.</p>
<p>In the meantime, <a href="http://www.dartlang.org/docs/language-tour/">Google&#8217;s Dart language</a> came along with a clever little twist that <a href="http://www.dartlang.org/docs/language-tour/#libraries-private-members">offers exactly what I need</a>. In a nutshell, identifiers which begin with an underscore are private to the module that declared them: the compiler mangles the strings so that two modules both referring to _foo will actually end up using ABC_foo and XYZ_foo.</p>
<p>This solution neatly sidesteps much of the complexity that typically comes along with scope control by shifting its attention from the class level up to the module level. Instead of managing fine-grained scope control with public/private/protected and friend declarations, you just put related objects into a file together and separate unrelated objects into different files.  There&#8217;s no need for any extra keywords, and it grounds the scoping system in something very concrete. It also aligns well with the compiler&#8217;s optimization needs, since compilation units are equivalent to scope boundaries. </p>
<p>The semantics I&#8217;ve chosen are based on symbols, not just on identifiers: that is, the compiler must apply name-mangling whenever it generates any symbol value, whether it came from some declaration or from a symbol literal. This means it&#8217;s possible to insert private keys into a map shared across modules, for example, or to return unique private cookie values. Other modules can certainly pass these private symbol values around, but there is no way for any other module to generate one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/05/encapsulation-and-private-members/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minor addition: rational literals</title>
		<link>http://www.radian-lang.org/2012/05/minor-addition-rational-literals/</link>
		<comments>http://www.radian-lang.org/2012/05/minor-addition-rational-literals/#comments</comments>
		<pubDate>Fri, 11 May 2012 05:18:48 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Progress]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=475</guid>
		<description><![CDATA[I needed a break from the long, slow grind that is the generator system, so I decided to make non-integer numeric literals work. Radian already has support for rational numbers, so this was a matter of plumbing the data through from the lexer to the runtime library so that you can create one directly instead [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a break from the long, slow grind that is the generator system, so I decided to make non-integer numeric literals work. Radian already has support for rational numbers, so this was a matter of plumbing the data through from the lexer to the runtime library so that you can create one directly instead of computing it from a pair of integers. Nothing fancy, but it&#8217;s nice to polish up another little detail.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/05/minor-addition-rational-literals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Context assignment inside generator control blocks</title>
		<link>http://www.radian-lang.org/2012/04/context-assignment-inside-generator-control-blocks/</link>
		<comments>http://www.radian-lang.org/2012/04/context-assignment-inside-generator-control-blocks/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 22:03:17 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=471</guid>
		<description><![CDATA[This asynchronous decomposition project may well be the most difficult piece of coding I have ever done. The code is a mess, but it is at least a self-contained mess, and I am confident that I will be able to clean it up as I continue to develop the system. The goal is to let [...]]]></description>
			<content:encoded><![CDATA[<p>This asynchronous decomposition project may well be the most difficult piece of coding I have ever done. The code is a mess, but it is at least a self-contained mess, and I am confident that I will be able to clean it up as I continue to develop the system. The goal is to let you do anything inside a generator that you would be able to do inside an ordinary function, save that you <code>yield</code> values instead of assigning a <code>result</code>. The trouble is that the semantic environment inside a generator is so different from a plain function that none of this comes for free: it will all feel the same when you write the code, but there&#8217;s a lot of generator-specific machinery underneath making the illusion work.</p>
<p>My latest step is that one can now assign a new value from inside an if-block to a variable which was defined outside it, even when that if-block happens to live inside a generator. That is, if-then blocks inside generators now behave exactly the same as if-then blocks inside any other kind of function. (This completes the project I mentioned <a href="http://www.radian-lang.org/2012/04/slow-progress-on-async-blocks/">on the 17th</a>.)</p>
<p>The next step in the generator project is to reimplement the while loop. You can put a while loop inside a generator right now, but you can&#8217;t yield from it; allowing you to yield from the loop means I need to provide a way to pause a loop and then resume it later, from any of a number of possible yield statements. </p>
<p>So why is all this so difficult? There is a fairly well-understood strategy for implementing asynchronous generators in an imperative, object-oriented language. You  turn the whole generator into a state machine: you create a class, hoist all the local variables up as members in that class, and give the object a &#8220;state&#8221; member which tells you which yield statement executed last. &#8220;Yield&#8221; sets the state member and then returns a value. On the next call to the function, a big switch statement picks out the appropriate case branch, and you pick up where you left off. It&#8217;s not by any means trivial, but a number of languages have done this and the technique is well understood.</p>
<p>Asynchronous generators, in a functional language, are a matter of continuations and lazy evaluation. Again, it&#8217;s not a trivial thing, but you don&#8217;t have to worry about object mutation or context assignment, so once you have your dataflow graph you can just pick the node that returns the value and wrap it with all of its dependencies into a function, and there&#8217;s your continuation. This is, again, well understood, and has been done in many languages.</p>
<p>The problem with doing this in Radian is that it combines the difficulties of both approaches. It looks like an object-oriented language with mutable state, but its internal semantics are based on pure functions and immutable data. I can&#8217;t use the typical object-oriented strategy because the semantics offer no way to represent a &#8216;goto&#8217;, and therefore I can&#8217;t make a single function with multiple entrypoints. Nor is there any sensible way to add such a &#8216;goto&#8217; given the existing constraints on the design. The generator has to be decomposed into as many separate fragments as there are yield statements, functional-style. That&#8217;s fine, but Radian lets you do crazy things like &#8220;assign a value to a variable&#8221;, which means that this function decomposer has to keep careful track of data flow across multiple invocations of multiple functions so that it can make sure that the right values show up in the right places with the right names. It makes my head hurt. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/04/context-assignment-inside-generator-control-blocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update to LLVM 3.0</title>
		<link>http://www.radian-lang.org/2012/04/update-to-llvm-3-0/</link>
		<comments>http://www.radian-lang.org/2012/04/update-to-llvm-3-0/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 05:27:15 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=468</guid>
		<description><![CDATA[I&#8217;ve just committed a patch which upgrades the Radian codebase to use LLVM 3.0. If you are tracking the repository, you might want to consider upgrading too.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just committed a patch which upgrades the Radian codebase to use <a href="http://llvm.org/releases/3.0/docs/ReleaseNotes.html">LLVM 3.0</a>. If you are tracking the repository, you might want to consider upgrading too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/04/update-to-llvm-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slow progress on async blocks</title>
		<link>http://www.radian-lang.org/2012/04/slow-progress-on-async-blocks/</link>
		<comments>http://www.radian-lang.org/2012/04/slow-progress-on-async-blocks/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 23:22:21 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Progress]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=465</guid>
		<description><![CDATA[Decomposing a function into a sequence of asynchronous computations is hard.
The current problem is finding a way of passing values computed in a branch of an if-block, which has been nested inside an async block, on to the asynchronous segment following the end of the if-block. 
]]></description>
			<content:encoded><![CDATA[<p>Decomposing a function into a sequence of asynchronous computations is <em>hard</em>.</p>
<p>The current problem is finding a way of passing values computed in a branch of an if-block, which has been nested inside an async block, on to the asynchronous segment following the end of the if-block. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/04/slow-progress-on-async-blocks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Internal organization for async blocks</title>
		<link>http://www.radian-lang.org/2012/04/459/</link>
		<comments>http://www.radian-lang.org/2012/04/459/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 01:35:22 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Progress]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=459</guid>
		<description><![CDATA[The day job has kept me busier than usual for the last two months, but it&#8217;s a new quarter and I have some room to breathe once again. I don&#8217;t have any new milestones to report, but I am forging ahead on the asynchronous blocks, and I find that leaving the problem to stew for [...]]]></description>
			<content:encoded><![CDATA[<p>The day job has kept me busier than usual for the last two months, but it&#8217;s a new quarter and I have some room to breathe once again. I don&#8217;t have any new milestones to report, but I am forging ahead on the asynchronous blocks, and I find that leaving the problem to stew for a while has left me with a simpler, clearer project. Some small part of my mind must have kept on picking at this while I focused on other things, because the complexity has all fallen away and it&#8217;s now obvious which direction to go. I&#8217;ve restructured the semantic analyzer, providing a straightforward way for each scope to provide its own custom statement semantics, which will allow me to transparently reinterpret control-flow statements when they occur inside an asynchronous block context.</p>
<p>This design does complicate the actual language semantics, since the <code>if</code>, <code>for</code>, and <code>while</code> loops have two completely different implementations depending on where you use them, but the result, as perceived by the human programmer, should be comparable. That is, by reusing the same syntax for complementary but separate semantics, the async block scheme should be much easier to learn.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/04/459/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mulling a small syntax change</title>
		<link>http://www.radian-lang.org/2012/02/mulling-a-small-syntax-change/</link>
		<comments>http://www.radian-lang.org/2012/02/mulling-a-small-syntax-change/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 20:14:25 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Syntax]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=453</guid>
		<description><![CDATA[Radian has three sorts of definitions: variables which hold a value and can be reassigned, constants which hold a value and cannot be reassigned, and functions which may have parameters and can be invoked to return a value. (Objects, methods, generators, and tasks are all different types of functions.)
Constants bug me because they aren&#8217;t really [...]]]></description>
			<content:encoded><![CDATA[<p>Radian has three sorts of definitions: <i>variables</i> which hold a value and can be reassigned, <i>constants</i> which hold a value and cannot be reassigned, and <i>functions</i> which may have parameters and can be invoked to return a value. (Objects, methods, generators, and tasks are all different types of functions.)</p>
<p>Constants bug me because they aren&#8217;t really constant in the sense I am used to from C++. The definition can&#8217;t be changed, but its value certainly may, when it is defined in terms of variables. What&#8217;s more, the difference between a constant and a one-line function without parameters is so slight that I can&#8217;t think of any way you could tell the difference in code.</p>
<p>The change I&#8217;m pondering would be to ditch <code>const</code> entirely, then split the one-line function form apart from the block form. The new one-line simple definition statement would use the keyword <code>def</code>, borrowed of course from Python and Ruby. The zero-parameter form of this statement would be equivalent to the current <code>const</code> and to the current single-line parameterless <code>function</code>.</p>
<p>This change would regularize the syntax somewhat, in that each leading keyword would then unambiguously introduce either a single-line statement or a multi-line block. I haven&#8217;t been using <code>const</code> much because it often feels wrong, especially as an object member, where the &#8220;constant&#8221; is often defined in terms of variables; I think I might use <code>def</code> somewhat more.</p>
<p>The downside is that programmers familiar with Python or Ruby might find it jarring to find their familiar <code>def</code> keyword set to a similar but rather more restricted use. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/02/mulling-a-small-syntax-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8216;yield from&#8217; works now</title>
		<link>http://www.radian-lang.org/2012/02/yield-from-works-now/</link>
		<comments>http://www.radian-lang.org/2012/02/yield-from-works-now/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 06:08:25 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Progress]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=450</guid>
		<description><![CDATA[The async features continue to be my major focus of development. I&#8217;ve just pushed a couple of commits that make the yield from statement work. Where the plain yield statement produces a single value in the generator&#8217;s sequence of outputs, the yield from statement splices an entire sequence into the output stream. 
An identical feature [...]]]></description>
			<content:encoded><![CDATA[<p>The async features continue to be my major focus of development. I&#8217;ve just pushed a couple of commits that make the <code>yield from</code> statement work. Where the plain <code>yield</code> statement produces a single value in the generator&#8217;s sequence of outputs, the <code>yield from</code> statement splices an entire sequence into the output stream. </p>
<p>An identical feature <a href="http://mail.python.org/pipermail/python-dev/2012-January/115471.html">showed up in Python</a> a couple of weeks ago, though that language has offered the simple <code>yield</code> statement for a decade now. I chose to head straight for the enhanced form of yield because I intend to use it as a foundation for the rest of the generator feature: any control-flow block nested in a generator will itself become a generator, and its container will implicitly <code>yield from</code> this nested block. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/02/yield-from-works-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release 0.1.1</title>
		<link>http://www.radian-lang.org/2012/02/release-0-1-1/</link>
		<comments>http://www.radian-lang.org/2012/02/release-0-1-1/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 05:19:23 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=448</guid>
		<description><![CDATA[I made a couple of stupid mistakes in yesterday&#8217;s build, so I&#8217;ve tagged and uploaded version 0.1.1.

 Removed debug spew when inserting or doing lookups on a map object. 
String literal comparison no longer returns spurious &#8220;false&#8221; results when comparing two equal strings. This also caused map lookups to fail.

]]></description>
			<content:encoded><![CDATA[<p>I made a couple of stupid mistakes in yesterday&#8217;s build, so I&#8217;ve tagged and uploaded <a href="/download/">version 0.1.1</a>.</p>
<ul>
<li> Removed debug spew when inserting or doing lookups on a map object. </li>
<li>String literal comparison no longer returns spurious &#8220;false&#8221; results when comparing two equal strings. This also caused map lookups to fail.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/02/release-0-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release 0.1.0</title>
		<link>http://www.radian-lang.org/2012/01/release-0-1-0/</link>
		<comments>http://www.radian-lang.org/2012/01/release-0-1-0/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 03:59:28 +0000</pubDate>
		<dc:creator>Mars</dc:creator>
				<category><![CDATA[Progress]]></category>

		<guid isPermaLink="false">http://www.radian-lang.org/?p=441</guid>
		<description><![CDATA[I&#8217;ve just tagged v0.1.0 in the git repository and uploaded a new Mac OS X binary build. Changes since last month&#8217;s release 0.0.0:

 A string is a sequence of characters, not a sequence of bytes. When iterating over the characters in a string literal, the contents are no longer returned as individual UTF-8 bytes, but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just tagged <code>v0.1.0</code> in the git repository and uploaded a new Mac OS X binary build. Changes since last month&#8217;s release 0.0.0:</p>
<ul>
<li> A string is a sequence of characters, not a sequence of bytes. When iterating over the characters in a string literal, the contents are no longer returned as individual UTF-8 bytes, but as Unicode code points. </li>
<li>Symbol lookup time is now O(log n) in the worst case, not O(n), since the  index is now an AA-tree rather than an unbalanced binary tree.</li>
<li>A race condition in the symbol allocator has been corrected; it is no longer possible to get duplicate symbols when the first lookup happens simultaneously on different processors.</li>
<li><code>io.print</code> function emits UTF-8 byte streams instead of mangling non-ASCII characters.</li>
<li>The identifiers <code>task</code>, <code>generator</code>, and <code>yield</code> have been reserved for use as syntax keywords.</li>
<li>String literals implement a <code>compare_to</code> method, which allows them to be compared and used as keys in a map container. This method uses a simple ordinal comparison, not one of the specific Unicode-defined lexical comparisons.</li>
<li><code>Import</code> statement allows an optional aliasing clause, where the local symbol has a different name than the symbol defined in the target module. The complete syntax is:<br />
	<code>&#039;import&#039; identifier [&#039;=&#039; identifier] [&#039;from&#039; expression]</code><br />
As with all declarations, the first identifier token is the declared name; the optional second identifier specifies the target to import. </li>
<li>Expressions can now be split and continued on the next line after any binop token, including the comma and period tokens. Comments between a binop token and the end of line will be ignored.</li>
<li>Tuples implement the <code>sequence</code> interface.</li>
<li>Map constructor no longer tries to double up as a set constructor. Entries must have both a key and a value.</li>
<li>Unary operators (negate, not, poison, and yield) no longer parse an entire expression instead of a single term. This caused baffling precedence errors.</li>
<li>Numerics package supports rational as well as integer arithmetic. Division of two integers will now yield a rational number instead of truncating the remainder and returning an integer.  Rational numbers are represented as a pair of integers, numerator and denominator. Rational numbers are normalized such that the numerator and denominator have no common factors and the denominator is always positive and greater than 1.<br />
Number type has two new predicates: <code>rational?</code>, which is currently true for all numbers, and <code>integer?</code>, which is true only for integral values. The shifting and bitwise arithmetic operations are only defined for integers, not for all rationals.</li>
<li>Functions in the <code>number</code> module allow rounding of rational numbers in three modes: <code>ceiling</code> rounds toward positive infinity, <code>floor</code> rounds toward negative infinity, and <code>truncate</code> rounds toward zero.</li>
<li><code>Sign</code> function in the <code>number</code> module returns -1 for negative numbers, 1 for positive numbers, and 0 for all numbers which are equal to zero.</li>
<li>New <code>generator</code> block type lets you define a function which returns a<br />
sequence. The generator supplies each value in the sequence by executing a  <code>yield</code> statement. This is not very useful, as you cannot put yield statements  inside nested loops or conditionals, but it is a sign of things to come.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.radian-lang.org/2012/01/release-0-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

