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…
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…
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:
Not very impressive, I know. And if I actually had dotNet importing working better, it'd…
public static void main(){
print "Hello World";
}
Not very impressive, I know. And if I actually had dotNet importing working better, it'd…
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 …
The most important …
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:
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(){
…
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…
The good news is that I'll end up with a lot more done than I expect…
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…
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…
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:
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 …
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…
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…
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…
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…
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…
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…
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…
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…
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 …
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…
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)
(where string a,b,c and (string,string) tupleab are defined)
c = a + b;
c = string.concat tupleab;
c = string.concat(a,…
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…
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…
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…
This moves a lot of the expression parsing from the parser proper into the syntax checking p…
(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…
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…
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…
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…
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…
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…
But I've sp…
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…
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…
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…
Because clearly any determined internal attacker won't think of printing anything out…
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…
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…
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…
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…
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…
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…
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 …
Working with …
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…
1. I'm intereste…
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…
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…
Advertisement
Popular Blogs
Advertisement