Ye Olde Ramblings

Current topic is the development of a toy language to test a few syntax ideas.
237 comments
1 followers
359 entries
Advertisement
Telastyn
June 30, 2008
Tangent: Cleaning up my mess.
Everyone is going out of town this weekend except for me, so I'll have the long weekend to drink mountain dew, eat swedish fish and work on Tangent. w00t.

As a lead up to that, I had tonight free so it went to do some cleanup work on the method declaration bits. There were... probably 4 major proble…
232 views
Telastyn
June 20, 2008
Tangent: Milestone 4 - Methods
Its nice to be able to get back to work after being sick for a few days. Very productive both at work, and at hobby work today. Tangent's Hello World now works:


public static void main(){
print "Hello World";
}




Not very impressive, I know. And if I actually had dotNet importing working better, it'd…
247 views
Telastyn
June 14, 2008
Tangent vs Scala
Doing some research today on some stuff for Tangent (because the amusing sites have been blocked at work), I found that the stuff I've been terming mixins for Tangent are more appropriately called traits (since they may hold state). That yielded a nice ton of more info and links.

The most important …
335 views
Telastyn
June 11, 2008
Milestone 3 and then some.
I hit milestone 3 a few days ago. Local variable declaration works (for ints at least). Initialization, default values, scope.

Tonight I had free so worked quickly on milestone 4 (method declarations). About 45 minutes and I had the grammar setup and the first testcase:


public static void foo(){
286 views
Telastyn
June 09, 2008
Tangent: Local Variable Roadblock.
Local variable declarations quickly got complex. First, I underestimated the work involved. Second, I am an idiot (and made a poor design choice). Third, I got greedy (and remembered I should probably implement op-assign properly).

The good news is that I'll end up with a lot more done than I expect…
253 views
Telastyn
June 05, 2008
Tangent: Local Variable Declarations
I added in local variable declarations to the Tangent syntax.

Unfortunately they don't quite line up with C#, mostly because types can act as unary operators. type foo = bar; becomes a bit ambiguous if type can act as a unary op. Is it a variable declaration, or is foo supposed to be a param to typ…
190 views
Telastyn
June 03, 2008
Tangent: Milestone 2
Milestone 1: ~3 months
Milestone 2: ~3 days

(and another 4 weeks making things work beyond my one arbitrary test and after further use reminds me that I am an idiot)

Tangent now parses and interprets literals:


// a = "moo." above
// print defined in journal entries below
{
print "bleat. " 3.14 " " 42 …
198 views
Telastyn
June 01, 2008
Milestone 1 (for real this time)
After 45 mins more debugging:

And it turns out the instance binding was working fine and the return statements were also working well. The problem was that I was using the instance of the method for all that, but executing the code from the template. I know that doesn't really make sense.... I'm pre…
169 views
Telastyn
May 31, 2008
Tangent: One step forward, one step back (again)
So I tracked down the problem with the gobblers.

I wasn't nicely keeping track of wildcards' (paren statements) effective type, so they kinda got dropped. [reworked wildcard class to include that, and cache results]

And then when I un-flattened the token stream, I wasn't checking if the token was alr…
181 views
Telastyn
May 29, 2008
Tangent: One step forward, One step back
After the (admittedly unsurprising) partial failure of my car's brake system and the resultant hours at the garage, I got some Tangent work done.

The primary work of the day was refactoring the identifier resolution/overload-ambiguity checking into separate bits. Part of the problem of "just make it…
173 views
Telastyn
May 17, 2008
Tangent: Milestone 1 and mechanics.
I see milestone 1 on the horizon. Tangent now compiles raw source into code-dom-ish sort of structures which can be run. Type declarations are still hardcoded, and method groups have a bug where they don't get default initialized. Once that bug is fixed and I see code work I'll hit milestone one. A…
195 views
Telastyn
May 15, 2008
Tangent: Creeping towards hello world.
Work on Tangent progresses more rapidly now. I have the infrastructure in place and tested... a little independently. But now I have 5 disparate parts (parsing, tokens, type inference, types, code-dom-ish stuff) and none of them work together. They're well designed though, so the steps of stringin…
154 views
Telastyn
May 07, 2008
Tangent: Operator Constraints & cd review
One of the kinda awkward problems in C# is the lack of a 'numeric' constraint for lack of a better definition. If you make a generic T, you can't do a+b since they might be objects... or something else where that doesn't make sense. And you can't provide a type constraint since int/float/etc don't …
201 views
Telastyn
April 26, 2008
Tangent: Generics 1
Generics are a pain to implement. Or rather generic methods (as most languages implement them) complicate matters quite a bit. I had one implementation that worked, but made generic methods infeasible as other languages implement them (a simple replacement akin to C++ style templates for type expre…
234 views
Telastyn
April 19, 2008
Tangent: Further tokens
Progress on Tangent continues slowly. I added support for member access and parenthetical expressions to the code that takes a series of tokens and builds a sane abstract syntax tree.

(where string a,b,c and (string,string) tupleab are defined)

c = a + b;
c = string.concat tupleab;
c = string.concat(a,…
194 views
Telastyn
April 14, 2008
Tangent: Parsing
I have today off and completely for my own use. I'm not a big fan of vacations, and using my time for just a personal day is so nice.

This morning then was work on Tangent. Whimsy pushed me to work on simple parsing for expressions. Not quite sure why since it's not the next step in the work (thoug…
218 views
Telastyn
April 11, 2008
Tangent: Expressions
One of the key desires which evolved with my toy language Tangent was to allow fairly arbitrary operators. As long as a method met a certain signature, the language should allow it to be used as an operator.

This moves a lot of the expression parsing from the parser proper into the syntax checking p…
186 views
Telastyn
April 06, 2008
Method Groups in Tangent.

(true(),false()) select bool() == Ambiguous - True:True
(true(),false()) select false() == false() - True:True
(true(),false()) select true() == true() - True:True
(true(),false()) select null() == Undefinded - True:True
(true(),void(true)) select true() == true() - True:True
(true(),void(true)) select…
238 views
Telastyn
April 02, 2008
...

...

WARNING: There may be naughty words that follow. You've been warned.

I've had a little bit of a rough time getting to where I am. I made the mistake of not studying computer science in college. Then I made the mistake of going to college early (before I was ready as it turns out), and did not finish…
264 views
Telastyn
March 24, 2008
Tangent continues.
In honor of this little tangent I'm taking in doing something useful, I've decided to name the little hobby language 'Tangent' until I can think of something better.

So far I've accomplished quite a bit. Unfortunately the vast majority of that is proving that I am indeed an idiot. The rest is mostly…
284 views
Telastyn
March 12, 2008
Tangent 1.5
The whimsy to knock together a toy language is still around. It only seems to grow looking into other languages like F#/Ruby/Python which all make me want to vomit and/or kill more or less. F# is the least offensive, probably because it's the most alien (and the alien things make sense).

But I've sp…
293 views
Telastyn
March 05, 2008
Adventures in F# Part 1.5
Holy crap, a comment!

In other news, I dabbled a little more with F# over the past days. The BigInt stuff seems to be missing a lot, and the intellisense on stuff seems wonky. For list/List at least, it tends to oscillate between three visible types; only one really containing the useful (if sometim…
227 views
Telastyn
March 03, 2008
Firewalls
My work decided over the weekend to lock down everything outgoing except port 80. This is the same place that requires "new" passwords every month. And requires papers in-triplicate before assigning people laptops.

Because clearly any determined internal attacker won't think of printing anything out…
250 views
Telastyn
February 24, 2008
Adventures in F#  Part 1
I finished my first F# app in about 2 hours. No feedback at deadline and it's been pushed off the main page. Alas.

I am a little disappointed so far. Pattern matching, which seems to be one of the big things promoted as functional stuff to learn seems at face value to be not much more than nicer syn…
237 views
Telastyn
February 21, 2008
Tangent.
Two weeks have gone by, which means my whimsy as directed me elsewhere. No wonder I can't get anything done... I got another drive to do programming language development, which is dumb since I didn't have the follow-through to get the plain C# parser working fully to extend that. Also dumb since I…
258 views
Telastyn
February 11, 2008
The March of War! (eat snackysmores...)
Or progress anyways. My long weekend of free time comes to a close tomorrow, alas.

Food Processing now processes. Mostly. Tiles may now hold buildings. Added building fields. Added some clusterfark to allow arbitrary building types to message properties over a network. Added a field to define food s…
212 views
Telastyn
February 07, 2008
Mmm...  forbidden donut.
After clearing up a bug with my test immortal monkey unit, I added the Food Processing Phase to Moe turn processing. Not much processing is being done yet alas; it's being blocked mostly by the lack of buildings and thus granaries as well as the lack of happiness (and thus what defines 'hungry' rat…
294 views
Telastyn
February 06, 2008
Insights of old code.
I have my evenings to myself for the rest of the week and a mostly empty weekend. I'm very near the end of the shoot yourself in the head game and I have a large bag of red swedish fish. Based on this, I started back into Moe with the hope of getting some headway in the nice lull time.


Working with …
285 views
Telastyn
January 30, 2008
Penny Arcaded!
I just went through and picked up Armageddon Empires based on the little I read from today's Penny Arcade link. My hobby project is pretty much exactly the sort of market this game is in (hex based strategy on the PC by an indie sort of developer and priced accordingly) which means:

1. I'm intereste…
252 views
Telastyn
January 19, 2008
Parser Debugging.
Debugging parsers sucks nards.

I redid the PrimaryExpression parser for C#3.0 because my parsing framework doesn't handle left recursion. I then spent the rest of the day looking into why it didn't work. Turns out I forgot to put .Optional after the parser declaration for the postfix(++/--) operator…
255 views
Advertisement

Popular Blogs

shawnhar
Generalist
101 Entries
9 Followers
15 Entries
10 Followers
johnhattan
Programmer
1,277 Entries
47 Followers
ApochPiQ
Generalist
628 Entries
44 Followers
dgreen02
Generalist
338 Entries
56 Followers
Advertisement