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…
I also happened across the Fan programming language a few weeks ago, but…
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…
I fixed the first problem, and the second m…
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…
A number of little bug fixes tonight. A little added functionality.
This used to be broken, but now works:
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…
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…
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…
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 …
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 …
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(…
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…
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…
In 0.25 you can specify literal identifiers to be par…
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…
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 …
(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:
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 …
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…
Make…
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 …
I then figured that I …
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…
First s…
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…
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…
I have yield working in source, sort of. If you try and yield from inside a nested block, and then re-call the method…
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…
There's three main…
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:
That also means C# style foreach now works:
public static void main(){
loc…
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…
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…
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:
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…
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…
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…
So I filed in the b…
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…
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…
I realized though tha…
Advertisement
Popular Blogs
Advertisement