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
March 16, 2009
Links and progress
Happened across a nice (new) article by Bruce Eckel that I think very aptly describes C++ (and Java) in today's world. Always refreshing to see someone who is published explain something more clearly and concisely than I could.

I also happened across the Fan programming language a few weeks ago, but…
711 views
Telastyn
March 14, 2009
Victory!
No Tangent work today.

Spent the evening dominating a mtg draft tournament with one card.
553 views
Telastyn
March 12, 2009
Tangent: Mines!
I did a quick little update to fix infix operators that yield, and everything went to hell. I mean Console.WriteLine stopped working. A tiny program that used to take half a second to compile is now taking 11 minutes, and pukes null reference exceptions...

I fixed the first problem, and the second m…
503 views
Telastyn
March 10, 2009
Tangent: Improved .NET Imports
Minor update. The built-in types now are imported fully from whatever .NET assemblies you have rather than hard-coded into the language. The current importer can deal with any type that has a default constructor, or is static/abstract/etc, or is System.String. It imports the default constructor an…
380 views
Telastyn
March 09, 2009
Tangent: Little fixes.
A number of little bug fixes tonight. A little added functionality.

This used to be broken, but now works:


public class int{
public this is even => bool { ... }
}




Name resolution on .NET types failed if I tried to do it early on in compilation. (fixed)
Making a method group of 'this' methods di…
385 views
Telastyn
March 08, 2009
Tangent: Statics
Had a little extra time tonight to work on static methods and variables, and now they work:


public class foo{
public string bar = "moo.";

public static int baz = 6;
public static genFoo(string initValue) => foo {
local foo rtn = new foo;

rtn.bar = initValue;
return(rtn);
}
}

public static main…
509 views
Telastyn
March 08, 2009
Tangent: Invisible Progress
Not much to report on the Tangent front. Partially it's because of lack of time, partially because it's in a bug-fix cycle. A lot of the work is making things that haven't even made it into a release yet (or were invisibly borked in the last release) work properly. And discovering more things that …
422 views
Telastyn
March 02, 2009
Tangent: Method Tests Part 3
A few of the fruits from the last big refactoring to show today. Phrases now can act as generators, and delegates can nicely deal with generators:



public static nums() => yields<int>{ yield(0); yield(1); yield(2); }
public static some nums => yields<int&g…
372 views
Telastyn
March 01, 2009
Tangent: Method Tests Part 2
Not much time for hobby this weekend. I managed to setup some delegates and make sure they work like they're supposed to. The example code, which includes infix delegates and a quick example of the partial application built into the language:


public static foo() => void{ print "foo.";}
public …
470 views
Telastyn
February 26, 2009
Tangent: Method Tests Part 1
The first little batch of method tests/examples are done and working:


public static foo() => void{ print "foo.";}
public static bar(string s) => void{ print s;}
public static baz(string s, int i) => void{ print s i;}
public static phrase(string s) (int i) => void{ print s i;}
public s…
355 views
Telastyn
February 25, 2009
Tangent: Phrase Refactor, Part 1
I have basic phrases working again with the new syntax:


public static foo()=>void{
print "foo.";
}

public static bar(string s)=>void{
print s;
}

public static baz(string s, int i)=>void{
print s i;
}

public static phrase(string s) (int i)=>void{
print s i;
}

public static main()=>void{
foo(…
444 views
Telastyn
February 23, 2009
FLU!
Not dead. Mostly. Last week was sacrificed to the flu. Re-working a large/nasty method continues. Operators work again, and I found a few little bugs that never worked in the first place. Operators are now auto-detected by where you put the name of the method in the phrase:


foo(int x, int y) => i…
531 views
Telastyn
February 15, 2009
Tangent: Explicit Symbols.
So much for all that time during the week I was going to have to work on the Tangent cleanup... I did get a little time this morning and added a small feature that's going to be needed with the changes to how method declarations are dealt with.

In 0.25 you can specify literal identifiers to be par…
487 views
Telastyn
February 11, 2009
Tangent: Smash Syntax! (part 1)
Before we get to coding work, news and opinions. My workplace laid off a small percentage of its workforce. Mostly the most expensive workforce (definitely not me!). Unfortunately that tends to be the most skilled of the workforce. How a company can continue to survive such clearly braindead execut…
419 views
Telastyn
February 08, 2009
Detour with a mop.
My work at making generators able to be declared as phrases took a little detour today when I realized that I couldn't read the build method code anymore. Making phrases work was a good deal of hackery; copy/paste/edit/tweak until it worked. Type parameterization and yield got added onto that. The …
386 views
Telastyn
February 07, 2009
Workday: Victory (mostly)
(see below for the problem in detail)

The bug has been squashed. The problem was in the loop element; during the upgrade of them to properly deal with yield-blocks I made a mistake in how the predicate is processed. It was doing:


while( predicate && I'm not supposed to yield control ){
do …
401 views
Telastyn
February 07, 2009
Printf debugging for the win.
After 40 minutes in a debugger tracing through 'bytecode' (not really bytecode, but elemental runtime stuff), I found that the inner generator was at 1 by the time main printed 0. So somewhere the inner generator was being run twice before the outer generator actually returned control to main.

Make…
421 views
Telastyn
February 07, 2009
Day of work: Entry 1
After a late awakening, I set into work on Tangent. As a warmup, I added support for the modulo operator (%). Takes two ints, returns the remainder; no big deal. Then came adding an automatic return at the end of yield blocks so the last value wasn't yielded twice. No problem.

I then figured that I …
398 views
Telastyn
February 06, 2009
Weekend work
I've unfortunately been busy the past week with social nicety and recouping from yield. I fixed up a little left over bug with it, and have (nearly) the entire weekend to myself for Tangent work. I added a wiki entry for coming features in the next release (and linked in the journal header).

First s…
398 views
Telastyn
January 27, 2009
Tangent: Yield, part 4
Tonight I had a tiny bit of spare time to devote to tracking down the yield bug. Turned out to be three little bugs. The first was a mistake in pulling the stackframes off during the actual yield call. It kept the top frame pointing to itself for restart rather than just letting it restart. The sec…
419 views
Telastyn
January 26, 2009
Tangent: Yield, part 3
Lots of time tonight to work on Tangent and get yield working. Lots of trying to follow spaghetti stack in a debugger to see where and how yield methods don't work. My brain hurts...

I have yield working in source, sort of. If you try and yield from inside a nested block, and then re-call the method…
285 views
Telastyn
January 23, 2009
Tangent: Yield, part 2
yield sucks. I mean it's good and all, but implementing it is deceptively tricky. There's a few ways to do it, and they're all (from as far as I can tell) about the same level of difficulty/trickiness. And none of them really fit into the nice stack based execution frame of mind.

There's three main…
324 views
Telastyn
January 21, 2009
Tangent: foreach.
I finished a working solution to the nested block variable access bug. Probably not the best solution, but it works. As you might expect by the name, variables declared more than two blocks deep now don't cause runtime errors.


That also means C# style foreach now works:


public static void main(){
loc…
279 views
Telastyn
January 19, 2009
Tangent: foreach beginnings
As usual, I'm not as bright as I think. the yield stuff ran into a roadblock because the vague design proved not viable for anything beyond the simplest case. And it's not the sort of thing that you can just look up... Full coroutines are not the sort of thing I want (or rather want to dedicate th…
298 views
Telastyn
January 10, 2009
Tangent: Yield, part 1
Not much Tangent work recently. Recouping from work fires and rebuilding social currency. Tonight though I got a little work in, moving along to the yield keyword/behavior now that iterators work. I added behavior to the block code to allow the yield behavior rather than requiring the method get re…
254 views
Telastyn
January 07, 2009
Tangent: Enumerable interface, part 3.
The battle versus IEnumerable has been won!

The type (and IEnumerator) imports nicely now. It's nicely specialized within List, and is all nice and typesafe. The following example code compiles and runs nicely:


public static void main(){
local List<int> x = new List<int>;

x.Add(1);
x.Add…
247 views
Telastyn
January 04, 2009
Tangent: Enumerable interface, part 2.
Another night, another hour of Tangent work. FlattenHierarchy in GetMembers in the reflection libs seems to not work/apply to interfaces. I added something manually to flatten an interface to include the interfaces it inherits. IEnumerable and IEnumerator now import as they should. List::GetEnumera…
251 views
Telastyn
January 04, 2009
Tangent: Bugs and Enumeration
I had a little time this evening to get back into Tangent work. Mostly I found bugs; or at least things that didn't work surrounding this-methods ( operator() overloading for those familiar with C++) and inheritance. And with methods in generic types. And with string importing...

So I filed in the b…
286 views
Telastyn
January 02, 2009
Bugs!
Took a quick look at Tangent tonight, managed to not do much more than open 6 bug reports. Good to keep such things documented, bad that I've been so scattershot in getting things done. I happened across a nice list of beginner style exercises. I think that will be a good reference for example Tang…
297 views
Telastyn
December 28, 2008
Bleh!
I wanted to get some Tangent work done over the holidays, but the star-crossed work project from hell arose from its state of half-death to suck more time and energy. That and the usual social niceties prevented me from doing anything more than design work while driving about.

I realized though tha…
344 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