<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments for cdiggins.com</title>
	<link>http://cdiggins.com</link>
	<description>Christopher Diggins</description>
	<pubDate>Wed, 14 May 2008 23:01:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>

	<item>
		<title>Comment on The Cat&#8217;s Progress - Slow and Stealthy by cdiggins</title>
		<link>http://cdiggins.com/2007/07/27/the-cats-progress-slow-and-stealthy/#comment-608</link>
		<author>cdiggins</author>
		<pubDate>Fri, 03 Aug 2007 12:50:29 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/27/the-cats-progress-slow-and-stealthy/#comment-608</guid>
					<description>Thank you very much orcmid! I hope our physical paths cross again.</description>
		<content:encoded><![CDATA[<p>Thank you very much orcmid! I hope our physical paths cross again.</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Type of literals and constructing hash-tables at compile-time. by Tom Cahalan</title>
		<link>http://cdiggins.com/2007/07/05/type-of-literals-and-constructing-hash-tables-at-compile-time/#comment-604</link>
		<author>Tom Cahalan</author>
		<pubDate>Sat, 28 Jul 2007 19:55:59 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/05/type-of-literals-and-constructing-hash-tables-at-compile-time/#comment-604</guid>
					<description>Well you see it would all have to be done at run time, rather than compiletime, unless 

the compiler uses what it knows and figures stuff out.  You see I wasn't going to 

actually have constants, just variables that act like constants.  For example you have 

type A and you declare B:

A B; //B is a variable of type A and/or a subtype of A

WHich is it?  Subtype or variable?  Depends on perspective.  So then if you wanted to 

treat B as a type you could do this:

B b1; B b2; B b3

You can assign bx to by because they are all on the same level.  You can assign any of 

the b's to B, and it would slice off anything extra.  You would be unable to assign B to 

 the b's, because the b's might have extra members that you would be unable to fill.

So that would lead to some crazy stuff.  Remember type/variable A?  Well what if you 

assign C to A?  Now B has changed type/supertype!

How would this be implemented?  I'm thinking that every object would have a pointer to a 

parent and a hashtable for its local members.  There would be an add_member function.

Object Person;
Person.add_member(string name);
Person Joe;
Joe.name="Joe";
Person Teacher;
Teacher.add_member(int grade_level);
Teacher.add_member(string subject_taught);
Teacher Bob;
Bob const_bob;


So now you can see that you can assign const_bob to Bob, but not vice-versa.  You could 

assign Teacher to Joe and vice-versa but that would be bad, very bad.  Something like 

this would be interesting but is not at all the direction that I wanted to go.

So anyway my language is designed to be a lot like C++ but with simpler syntax and some new features: tuples, first class functions, and multiple dispatch.

so I came up with my syntax first (it used to be with the identifier first, but that was 

harder to parse)

int i; //int
int@ ip; //int pointer
int-&#62;int f; //function taking an int and returning an int
(int,int)-&#62;(int,int) g; //function taking a tuple of ints and returing two ints

I am still not sure how I want to do templates or macros but I know that I will add them 

soon and that I want them to be tuple friendly.  Thus I needed a way to package a tuple 

into a singular thing (object, type, etc...).  So if you make an array (array will be a container in the library, not a built in metatype) of int:

array(int) a;

you need to be able to do something like this:

array(int,float,int) a; 

but then you aren't providing the same number of elements to the template.  That made me 

introduce boxing:

array([int,float,int) b;

oh and the parenthesis are uneccessary, because they only affect precedence.  They have 

no other meaning.  So if all templates assume boxed arguments you would write:

array[int] a;
array[int,float,int] b;

You see when you call functions like this:

f(x)

it is no different than:

f x

because there is an implied adjacency operator.  If two things are next to each other 

there is assumed to be an invisible operator between them.  So in the syntax tree there 

would be an adj node with f as its left node and x as its right.

You see everything is an expression.  There are no statements like in C++.  The 

semicolon is used as an operator.  Unlike most operators which can evaluate their 

arguments in either order, it always evaluates its left and then its right, and then it 

returns its right argument.

So this is legal (but ill-advised code):

sin(DoSomething();pi)

first it does something, then it passes pi to the sine function.  The semicolon is kind 

of a complement to the comma (tuple) operator.  The comma evaluates its arguments in 

either order and then returns both as a tuple.  So you could write code like this:

f(); g(); h()

so call them in order, or like this:

f(), g(), h()

and allow the compiler to call them in any order.  I may introduce the ,, operator to 

allow for simulataneous execution:

f(),, g(),, h()

but that is in the future if ever.  By combining , ; and ( ) to control grouping you can 

create a lot of different execution graphs.  The notion of which statement comes before 

another gets tricky.  For any given statement there will be some which come before it, 

some which come after, and some which don't come before or after.  I figured out some 

rules for it to work.  So you can't use a value unless it comes before, but you can make a pointer or declare a variable.

The main reason that ( ) is used only for precedence is that every operator has one meaning.  You don't need anywhere near as much context to figure things out as you would in C++.  This also meant that I had to give up prefix operators.  Only infix, outfix (the () [] and {} operators) and postfix.

Making functions first class objects has a lot of implications.  For example you decide to make a global variable as follows:

(int numerator, int denominator) -&#62; (int quotient, int remainder) DivMod
{
	quotient=numerator/denomination,
	remainder=numerator%denominator
}


Ok so far so good, you have a function of type (int,int)-&#62;(int,int)
Now what if you want a member of a class C to have a member of type (int,int)-&#62;(int,int), what then?
Maybe you want that member to be a method, with access to a "this" pointer.  Maybe you don't, maybe you want to be able to assign your DivMod function to it.  What if you want the function to be a method, and then you want to be able to assign it to a global variable.  Should it be able to access its object?  Should it be able to reseat itself into another object of the same type?  Too many issues.  I probably could have solved them well enough, but I just decided to eliminate the "this" pointer and so no more methods.  If a class has functions as members those members have no special status.  Afterall, if you have a Person type and he has four Legs, those Legs don't automatically know about the Person that they are a part of.  They might have a reference or a pointer, but only if the programmer provides it.  So I got rid of the "this" pointer.  With multiple dispatch you aren't even treating the "this" special anyway.

Now I wanted to be able to return functions, have them access local variables, etc...  As I'm sure that you are aware this causes problems when your variables are on the stack.  I didn't want to throw everything on the heap and go with a garbage collected language either.  That was departing from C++ too much.  So all variables are on the stack, but scopes are on the heap.  Whenever a function is called a secret scope node is created.  It has three members: a parent pointer, a frame pointer, and a reference count.  Like so:


()-&#62;() A
{
	int x;
	x=4;
	
	()-&#62;( (int)-&#62;(int) c ) B
	{
		c=(int y)-&#62;(int z){z=y*x};

	};

	int-&#62;int b;
	C = B();

	print C(5); //prints 20
	x=6;
	print C(5); //prints 30
}

if X is an function object, and X' is a call to X, and X'' is the node created by the prologue of X'

when A is called it has a node object A''.  A'' contains a frame pointer to the locals of A.  B is a local variable accessable by an offset from that pointer.  B has two private members: a pointer to some x86 code and a pointer to A''.  When B is called the invocation is B'.  It creates a node B''.  B'' gets its parent pointer from object B.  Thus B' can use A' variables.  B' creates variable C, a function object.  One of the members of C is the pointer to B''.  When B' returns and assigns c to b, the stack for B' is cleaned up but B' remains because C has a reference to it.  When C is called it too has a node, and it can access x by following the chain of nodes.  It does not capture the x, it can get to it.  This is kind of like static chains but not on the stack.

Oh and you can leave the type off of functions, at least if they take no arguments.  For example: {5} is a function of type: ()-&#62;(int) that always returns 5.  {doThis();thenThat()} is of type ()-&#62;(), assuming that thenThat returns void.  A block with  no return type specified returns the value of the internal expression.  I am thinking of adding in arguments too, like this: {$1(int)+$2(int)} which would be the same as: (int x, int y)-&#62;(int z){z=x+y}.  However that is a lot of work so it is likely to be in a later release.

Lately I have been thinking about making boxes of variable declarations into class literals, so you could do this:

[int x, int y] p;
p.x=5;


So [int,int] would be a type literal but not a class literal, and there would be some sort of implicit conversion

so:

p=[6,7] would work, but you couldn't do this:

[int,int] q;
q=p; // [int x, int y] is not converatble to [int,int]

But you could throw the unboxing operator in there, and then rebox it:

q=[p`];

As for progress, first I wrote the tokenizer, then the parser.  The parser was only 650 lines of C++.  I found a great program called graphviz so I can see the parse trees too.  Then I wrote something to order things by when they are temporarlly (remember the ; and , operators).  Then I started writting x86 so that I would know what code I had to generate but I had some trouble.  I was getting frustrated so I am taking a year off.  This will give me time to think over how I want to do templates, Also that class literal idea was in my head but I hadn't thought of it yet so it was bothering me.  So right now I am making a video game with C++.  I will start back on my language next father's day (since that is when I decided to take a year off).</description>
		<content:encoded><![CDATA[<p>Well you see it would all have to be done at run time, rather than compiletime, unless </p>
<p>the compiler uses what it knows and figures stuff out.  You see I wasn&#8217;t going to </p>
<p>actually have constants, just variables that act like constants.  For example you have </p>
<p>type A and you declare B:</p>
<p>A B; //B is a variable of type A and/or a subtype of A</p>
<p>WHich is it?  Subtype or variable?  Depends on perspective.  So then if you wanted to </p>
<p>treat B as a type you could do this:</p>
<p>B b1; B b2; B b3</p>
<p>You can assign bx to by because they are all on the same level.  You can assign any of </p>
<p>the b&#8217;s to B, and it would slice off anything extra.  You would be unable to assign B to </p>
<p> the b&#8217;s, because the b&#8217;s might have extra members that you would be unable to fill.</p>
<p>So that would lead to some crazy stuff.  Remember type/variable A?  Well what if you </p>
<p>assign C to A?  Now B has changed type/supertype!</p>
<p>How would this be implemented?  I&#8217;m thinking that every object would have a pointer to a </p>
<p>parent and a hashtable for its local members.  There would be an add_member function.</p>
<p>Object Person;<br />
Person.add_member(string name);<br />
Person Joe;<br />
Joe.name=&#8221;Joe&#8221;;<br />
Person Teacher;<br />
Teacher.add_member(int grade_level);<br />
Teacher.add_member(string subject_taught);<br />
Teacher Bob;<br />
Bob const_bob;</p>
<p>So now you can see that you can assign const_bob to Bob, but not vice-versa.  You could </p>
<p>assign Teacher to Joe and vice-versa but that would be bad, very bad.  Something like </p>
<p>this would be interesting but is not at all the direction that I wanted to go.</p>
<p>So anyway my language is designed to be a lot like C++ but with simpler syntax and some new features: tuples, first class functions, and multiple dispatch.</p>
<p>so I came up with my syntax first (it used to be with the identifier first, but that was </p>
<p>harder to parse)</p>
<p>int i; //int<br />
int@ ip; //int pointer<br />
int-&gt;int f; //function taking an int and returning an int<br />
(int,int)-&gt;(int,int) g; //function taking a tuple of ints and returing two ints</p>
<p>I am still not sure how I want to do templates or macros but I know that I will add them </p>
<p>soon and that I want them to be tuple friendly.  Thus I needed a way to package a tuple </p>
<p>into a singular thing (object, type, etc&#8230;).  So if you make an array (array will be a container in the library, not a built in metatype) of int:</p>
<p>array(int) a;</p>
<p>you need to be able to do something like this:</p>
<p>array(int,float,int) a; </p>
<p>but then you aren&#8217;t providing the same number of elements to the template.  That made me </p>
<p>introduce boxing:</p>
<p>array([int,float,int) b;</p>
<p>oh and the parenthesis are uneccessary, because they only affect precedence.  They have </p>
<p>no other meaning.  So if all templates assume boxed arguments you would write:</p>
<p>array[int] a;<br />
array[int,float,int] b;</p>
<p>You see when you call functions like this:</p>
<p>f(x)</p>
<p>it is no different than:</p>
<p>f x</p>
<p>because there is an implied adjacency operator.  If two things are next to each other </p>
<p>there is assumed to be an invisible operator between them.  So in the syntax tree there </p>
<p>would be an adj node with f as its left node and x as its right.</p>
<p>You see everything is an expression.  There are no statements like in C++.  The </p>
<p>semicolon is used as an operator.  Unlike most operators which can evaluate their </p>
<p>arguments in either order, it always evaluates its left and then its right, and then it </p>
<p>returns its right argument.</p>
<p>So this is legal (but ill-advised code):</p>
<p>sin(DoSomething();pi)</p>
<p>first it does something, then it passes pi to the sine function.  The semicolon is kind </p>
<p>of a complement to the comma (tuple) operator.  The comma evaluates its arguments in </p>
<p>either order and then returns both as a tuple.  So you could write code like this:</p>
<p>f(); g(); h()</p>
<p>so call them in order, or like this:</p>
<p>f(), g(), h()</p>
<p>and allow the compiler to call them in any order.  I may introduce the ,, operator to </p>
<p>allow for simulataneous execution:</p>
<p>f(),, g(),, h()</p>
<p>but that is in the future if ever.  By combining , ; and ( ) to control grouping you can </p>
<p>create a lot of different execution graphs.  The notion of which statement comes before </p>
<p>another gets tricky.  For any given statement there will be some which come before it, </p>
<p>some which come after, and some which don&#8217;t come before or after.  I figured out some </p>
<p>rules for it to work.  So you can&#8217;t use a value unless it comes before, but you can make a pointer or declare a variable.</p>
<p>The main reason that ( ) is used only for precedence is that every operator has one meaning.  You don&#8217;t need anywhere near as much context to figure things out as you would in C++.  This also meant that I had to give up prefix operators.  Only infix, outfix (the () [] and {} operators) and postfix.</p>
<p>Making functions first class objects has a lot of implications.  For example you decide to make a global variable as follows:</p>
<p>(int numerator, int denominator) -&gt; (int quotient, int remainder) DivMod<br />
{<br />
	quotient=numerator/denomination,<br />
	remainder=numerator%denominator<br />
}</p>
<p>Ok so far so good, you have a function of type (int,int)-&gt;(int,int)<br />
Now what if you want a member of a class C to have a member of type (int,int)-&gt;(int,int), what then?<br />
Maybe you want that member to be a method, with access to a &#8220;this&#8221; pointer.  Maybe you don&#8217;t, maybe you want to be able to assign your DivMod function to it.  What if you want the function to be a method, and then you want to be able to assign it to a global variable.  Should it be able to access its object?  Should it be able to reseat itself into another object of the same type?  Too many issues.  I probably could have solved them well enough, but I just decided to eliminate the &#8220;this&#8221; pointer and so no more methods.  If a class has functions as members those members have no special status.  Afterall, if you have a Person type and he has four Legs, those Legs don&#8217;t automatically know about the Person that they are a part of.  They might have a reference or a pointer, but only if the programmer provides it.  So I got rid of the &#8220;this&#8221; pointer.  With multiple dispatch you aren&#8217;t even treating the &#8220;this&#8221; special anyway.</p>
<p>Now I wanted to be able to return functions, have them access local variables, etc&#8230;  As I&#8217;m sure that you are aware this causes problems when your variables are on the stack.  I didn&#8217;t want to throw everything on the heap and go with a garbage collected language either.  That was departing from C++ too much.  So all variables are on the stack, but scopes are on the heap.  Whenever a function is called a secret scope node is created.  It has three members: a parent pointer, a frame pointer, and a reference count.  Like so:</p>
<p>()-&gt;() A<br />
{<br />
	int x;<br />
	x=4;</p>
<p>	()-&gt;( (int)-&gt;(int) c ) B<br />
	{<br />
		c=(int y)-&gt;(int z){z=y*x};</p>
<p>	};</p>
<p>	int-&gt;int b;<br />
	C = B();</p>
<p>	print C(5); //prints 20<br />
	x=6;<br />
	print C(5); //prints 30<br />
}</p>
<p>if X is an function object, and X&#8217; is a call to X, and X&#8221; is the node created by the prologue of X&#8217;</p>
<p>when A is called it has a node object A&#8221;.  A&#8221; contains a frame pointer to the locals of A.  B is a local variable accessable by an offset from that pointer.  B has two private members: a pointer to some x86 code and a pointer to A&#8221;.  When B is called the invocation is B&#8217;.  It creates a node B&#8221;.  B&#8221; gets its parent pointer from object B.  Thus B&#8217; can use A&#8217; variables.  B&#8217; creates variable C, a function object.  One of the members of C is the pointer to B&#8221;.  When B&#8217; returns and assigns c to b, the stack for B&#8217; is cleaned up but B&#8217; remains because C has a reference to it.  When C is called it too has a node, and it can access x by following the chain of nodes.  It does not capture the x, it can get to it.  This is kind of like static chains but not on the stack.</p>
<p>Oh and you can leave the type off of functions, at least if they take no arguments.  For example: {5} is a function of type: ()-&gt;(int) that always returns 5.  {doThis();thenThat()} is of type ()-&gt;(), assuming that thenThat returns void.  A block with  no return type specified returns the value of the internal expression.  I am thinking of adding in arguments too, like this: {$1(int)+$2(int)} which would be the same as: (int x, int y)-&gt;(int z){z=x+y}.  However that is a lot of work so it is likely to be in a later release.</p>
<p>Lately I have been thinking about making boxes of variable declarations into class literals, so you could do this:</p>
<p>[int x, int y] p;<br />
p.x=5;</p>
<p>So [int,int] would be a type literal but not a class literal, and there would be some sort of implicit conversion</p>
<p>so:</p>
<p>p=[6,7] would work, but you couldn&#8217;t do this:</p>
<p>[int,int] q;<br />
q=p; // [int x, int y] is not converatble to [int,int]</p>
<p>But you could throw the unboxing operator in there, and then rebox it:</p>
<p>q=[p`];</p>
<p>As for progress, first I wrote the tokenizer, then the parser.  The parser was only 650 lines of C++.  I found a great program called graphviz so I can see the parse trees too.  Then I wrote something to order things by when they are temporarlly (remember the ; and , operators).  Then I started writting x86 so that I would know what code I had to generate but I had some trouble.  I was getting frustrated so I am taking a year off.  This will give me time to think over how I want to do templates, Also that class literal idea was in my head but I hadn&#8217;t thought of it yet so it was bothering me.  So right now I am making a video game with C++.  I will start back on my language next father&#8217;s day (since that is when I decided to take a year off).</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on The Cat&#8217;s Progress - Slow and Stealthy by orcmid</title>
		<link>http://cdiggins.com/2007/07/27/the-cats-progress-slow-and-stealthy/#comment-603</link>
		<author>orcmid</author>
		<pubDate>Sat, 28 Jul 2007 14:58:53 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/27/the-cats-progress-slow-and-stealthy/#comment-603</guid>
					<description>I missed my chance to say "buon viaggio" in person, so I am pleased there's still a chance to do it here.

Have a great time in graduate school and keep teaching the cat to meow!</description>
		<content:encoded><![CDATA[<p>I missed my chance to say &#8220;buon viaggio&#8221; in person, so I am pleased there&#8217;s still a chance to do it here.</p>
<p>Have a great time in graduate school and keep teaching the cat to meow!</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Type of literals and constructing hash-tables at compile-time. by cdiggins</title>
		<link>http://cdiggins.com/2007/07/05/type-of-literals-and-constructing-hash-tables-at-compile-time/#comment-601</link>
		<author>cdiggins</author>
		<pubDate>Fri, 27 Jul 2007 18:22:55 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/05/type-of-literals-and-constructing-hash-tables-at-compile-time/#comment-601</guid>
					<description>Hi Tom,

You didn't find that the approach made your type system more powerful? In general it should enable certain kinds of metaprogramming. The programmer can use constant values as compile time flags.

Tell me more about your language. I am always interested in new language designs.</description>
		<content:encoded><![CDATA[<p>Hi Tom,</p>
<p>You didn&#8217;t find that the approach made your type system more powerful? In general it should enable certain kinds of metaprogramming. The programmer can use constant values as compile time flags.</p>
<p>Tell me more about your language. I am always interested in new language designs.</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Type of literals and constructing hash-tables at compile-time. by Tom Cahalan</title>
		<link>http://cdiggins.com/2007/07/05/type-of-literals-and-constructing-hash-tables-at-compile-time/#comment-599</link>
		<author>Tom Cahalan</author>
		<pubDate>Fri, 27 Jul 2007 01:24:17 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/05/type-of-literals-and-constructing-hash-tables-at-compile-time/#comment-599</guid>
					<description>I had this same idea for the language that I am designing!  I didn't want modifiers mucking up my syntax and so I ended up with the easiest way to make a constant would be to make them subtypes.  This also leads to a prototype approach to subclasses.  You see if you have your traditional Person class with a Student subtype:

Person p;
Student s;

p=s; //legal
s=p; //not legal

int i;
42 n;
42 m;
i=n; //legal
n=1; //not legal
n=m; //legal

However while the idea is cool it didn't really do much for my language so I cut quickly.</description>
		<content:encoded><![CDATA[<p>I had this same idea for the language that I am designing!  I didn&#8217;t want modifiers mucking up my syntax and so I ended up with the easiest way to make a constant would be to make them subtypes.  This also leads to a prototype approach to subclasses.  You see if you have your traditional Person class with a Student subtype:</p>
<p>Person p;<br />
Student s;</p>
<p>p=s; //legal<br />
s=p; //not legal</p>
<p>int i;<br />
42 n;<br />
42 m;<br />
i=n; //legal<br />
n=1; //not legal<br />
n=m; //legal</p>
<p>However while the idea is cool it didn&#8217;t really do much for my language so I cut quickly.</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Butler Lampson - Haven&#8217;t heard of him? by cdiggins</title>
		<link>http://cdiggins.com/2007/07/25/butler-lampson-havent-heard-of-him/#comment-598</link>
		<author>cdiggins</author>
		<pubDate>Thu, 26 Jul 2007 23:33:20 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/25/butler-lampson-havent-heard-of-him/#comment-598</guid>
					<description>Thanks a lot for the link Anthony.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the link Anthony.</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on The Problem with the Cat Type System by cdiggins</title>
		<link>http://cdiggins.com/2007/07/25/the-problem-with-the-cat-type-system/#comment-597</link>
		<author>cdiggins</author>
		<pubDate>Thu, 26 Jul 2007 17:10:22 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/25/the-problem-with-the-cat-type-system/#comment-597</guid>
					<description>I'm still struggling with the issues. Once I have a working version, I'll be able to post more about it. For now, this is an interesting an relevant paper I believe: 
http://research.microsoft.com/Users/luca/Papers/BasicTypechecking.pdf</description>
		<content:encoded><![CDATA[<p>I&#8217;m still struggling with the issues. Once I have a working version, I&#8217;ll be able to post more about it. For now, this is an interesting an relevant paper I believe:<br />
<a href="http://research.microsoft.com/Users/luca/Papers/BasicTypechecking.pdf" rel="nofollow">http://research.microsoft.com/Users/luca/Papers/BasicTypechecking.pdf</a></p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Future Plans for Cat 0.17 and Meta-Comments by cdiggins</title>
		<link>http://cdiggins.com/2007/07/18/future-plans-for-cat-017-and-meta-comments/#comment-595</link>
		<author>cdiggins</author>
		<pubDate>Thu, 26 Jul 2007 16:27:37 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/18/future-plans-for-cat-017-and-meta-comments/#comment-595</guid>
					<description>I just realized that this was an older post, and lacked the trailing ":" characters which I just added. See: http://cdiggins.com/wp-content/uploads/2007/07/code_viewer.jpg for a picutre of the current code viewer showing meta-comments. 

Also take a look at: http://cat-language.googlecode.com/svn/trunk/standard.cat to see the current state of the standard library will full annotations.</description>
		<content:encoded><![CDATA[<p>I just realized that this was an older post, and lacked the trailing &#8220;:&#8221; characters which I just added. See: <a href="http://cdiggins.com/wp-content/uploads/2007/07/code_viewer.jpg" rel="nofollow">http://cdiggins.com/wp-content/uploads/2007/07/code_viewer.jpg</a> for a picutre of the current code viewer showing meta-comments. </p>
<p>Also take a look at: <a href="http://cat-language.googlecode.com/svn/trunk/standard.cat" rel="nofollow">http://cat-language.googlecode.com/svn/trunk/standard.cat</a> to see the current state of the standard library will full annotations.</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Future Plans for Cat 0.17 and Meta-Comments by cdiggins</title>
		<link>http://cdiggins.com/2007/07/18/future-plans-for-cat-017-and-meta-comments/#comment-594</link>
		<author>cdiggins</author>
		<pubDate>Thu, 26 Jul 2007 16:24:13 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/18/future-plans-for-cat-017-and-meta-comments/#comment-594</guid>
					<description>The structure of meta-comments is indicated by indentation. The words "desc" and "test" are not hard-coded into the syntax, they are identified as tree node labels by the trailing ":" character. The format I decided to use for meta-comments is inspired by YAML and Python. I welcome alternative suggestions. You can have multiple lines breaks in node content.</description>
		<content:encoded><![CDATA[<p>The structure of meta-comments is indicated by indentation. The words &#8220;desc&#8221; and &#8220;test&#8221; are not hard-coded into the syntax, they are identified as tree node labels by the trailing &#8220;:&#8221; character. The format I decided to use for meta-comments is inspired by YAML and Python. I welcome alternative suggestions. You can have multiple lines breaks in node content.</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Future Plans for Cat 0.17 and Meta-Comments by Colin</title>
		<link>http://cdiggins.com/2007/07/18/future-plans-for-cat-017-and-meta-comments/#comment-591</link>
		<author>Colin</author>
		<pubDate>Thu, 26 Jul 2007 12:33:18 +0000</pubDate>
		<guid>http://cdiggins.com/2007/07/18/future-plans-for-cat-017-and-meta-comments/#comment-591</guid>
					<description>I really like your idea of placing all this meta information where the code is, at least this is _useful_ meta information, not like most JavaDoc comments you find these days...

Do I understand correctly that the format of the meta data is based on either detecting certain keywords like "desc" and "semantics", which makes future extensions very hard, or on the whitespace (line ending), which makes it impossible to format longer descriptions?

In general I would like to get rid of tokenisation, and discussions on code indentation etc., see also http://www.umbrialogic.com/hirsch-strings-beta.pdf , but that needs some better tools than we have today...

...after all, why can't everybody's editor present the source as it is configured, rather than how the source was saved?

Back to the subject, another meta data that I could imagine useful to add to at least some functions is their runtime complexity. Imagine a compiler switch that allows you to choose between "best average case time complexity" or "best guaranteed worst case time complexity" for equivalent algorithms...

Enough ;-)

Ciao, Colin</description>
		<content:encoded><![CDATA[<p>I really like your idea of placing all this meta information where the code is, at least this is _useful_ meta information, not like most JavaDoc comments you find these days&#8230;</p>
<p>Do I understand correctly that the format of the meta data is based on either detecting certain keywords like &#8220;desc&#8221; and &#8220;semantics&#8221;, which makes future extensions very hard, or on the whitespace (line ending), which makes it impossible to format longer descriptions?</p>
<p>In general I would like to get rid of tokenisation, and discussions on code indentation etc., see also <a href="http://www.umbrialogic.com/hirsch-strings-beta.pdf" rel="nofollow">http://www.umbrialogic.com/hirsch-strings-beta.pdf</a> , but that needs some better tools than we have today&#8230;</p>
<p>&#8230;after all, why can&#8217;t everybody&#8217;s editor present the source as it is configured, rather than how the source was saved?</p>
<p>Back to the subject, another meta data that I could imagine useful to add to at least some functions is their runtime complexity. Imagine a compiler switch that allows you to choose between &#8220;best average case time complexity&#8221; or &#8220;best guaranteed worst case time complexity&#8221; for equivalent algorithms&#8230;</p>
<p>Enough ;-)</p>
<p>Ciao, Colin</p>
]]></content:encoded>
				</item>
</channel>
</rss>
