Sunday, May 4, 2008

Tango backtrace hack another way

As you all know, Tango backtrace hack was available through our tango patcher. Unfortunately there were some problems with using it, therefor we decided to publish patched tango libs for each release (starting with 0.99.6). You can download tango hacked *.lib files from our download page.

Any questions or problems, can be solved by sending me an email, joining #team0xf irc channel on freenode server or by leaving comment here. Please don't ask questions about team0xf backtrace hack on #d.tango.

If you are new to backtrace hack concept, you can read my article how and why to use it.

Thursday, April 24, 2008

Phobos backtrace hack for dmd 1.029

This time just after the release of newest dmd I uploaded newest phobos backtrace hack. As always you can download it from our download site.

If you are new to backtrace hack concept, you can read my article how and why to use them.

Wednesday, April 2, 2008

D in Torun (Poland)

Hello, I was waiting a while to write this post, because I needed to gather all the data.

Since November, team0xf organized D workshops at our university. The attendants were students and staff working at the university. For those of you who know Polish, there are videos and presentations from the workshops on the workshop page.

That was the mid-phase of D expansion at our university - the first step was our project, Deadlock, which made people start asking about D etc. The final phase began this semester. "Programming in D" is now an official course. Despite the fact that it is a "subject of choice", over 100 students subscribed and now are attending lectures and laboratories.

Also, D is considered as an equal language to other languages on other classes, so we are all able to code projects in it like in c++, java or python.

Team0xf is cooperating with a lecturer - dr Rafal Bocian - so the class is up to date. The runtime library used during labs is Tango. Labs are conducted by dr Rafal Bocian and MC Leszek Rybicki, who was most helpful with workshop organization.

Tuesday, April 1, 2008

GC Benchmark

Some time ago, there was a GC benchmark done among the programming languages. I did then, Tango version of D candidate for this test. I was asked to check if the benchmark is still up to date. It was. Since I haven't write about it here, I will do now.

Code is simple, and created only for GC examination. Test was made with dmd 1.028, Tango trunk version (revision 3410) and Phobos that comes with 1.028 on my personal IBM T41 laptop. Both compiled with:

build -release -inline -cleanup -O

Tango result:

real 0m14.091s user 0m0.010s sys 0m0.020s
real 0m14.000s user 0m0.020s sys 0m0.000s
real 0m14.180s user 0m0.020s sys 0m0.000s
real 0m13.389s user 0m0.010s sys 0m0.010s
real 0m13.410s user 0m0.020s sys 0m0.030s
avg: 13.814

Phobos results:
real 0m19.058s user 0m0.010s sys 0m0.010s
real 0m20.649s user 0m0.020s sys 0m0.000s
real 0m19.378s user 0m0.010s sys 0m0.010s
real 0m18.617s user 0m0.010s sys 0m0.010s
real 0m18.626s user 0m0.020s sys 0m0.000s
avg: 19.266

As you see GC is much faster in Tango than in Phobos.

Code:
class TreeNode {
int item;
TreeNode left, right;

this(int item, TreeNode left=null, TreeNode right=null) {
this.item = item;
this.left = left;
this.right = right;
}

int check() {
return left is null ? item : item + left.check - right.check;
}
}

TreeNode makeTree(int item, int depth) {
if (depth > 0){
return new TreeNode(item, makeTree(2*item-1, depth-1), makeTree(2*item, depth-1));
} else {
return new TreeNode(item);
}
}

void main(char[][] args) {
const minDepth = 4;
int n = 16;
int maxDepth = (minDepth + 2) > n ? minDepth + 2 : n;

int check = makeTree(0, maxDepth + 1).check;

auto longLivedTree = makeTree(0, maxDepth);

for (int depth = minDepth; depth <= maxDepth; depth += 2){ int iterations = 1 << (maxDepth - depth + minDepth); check = 0; for (int i = 1; i <= iterations; i++) check += (makeTree(i, depth)).check + (makeTree(-i, depth)).check; } }

Wednesday, March 19, 2008

Phobos backtrace hack for dmd 1.028

Sorry for keeping you waiting, but real life sometimes can be time consuming too ;) Anyway, I just uploaded newest dmd phobos backtrace hack. As always you can download it from our download site.

If you are new to backtrace hack concept, you can read my article how and why to use them.

D planet

How many of you know, there is a great page, created by Anders Bergh, combining all off the articles comming from D related blogs. To see it - visit http://planet.dprogramming.com/ .
Idea of planet is very simple: it's combining all the rss from D related blogs to one blog, with RSS, so you can have only one feed to read all cool blogs. If you have D related blog and want your posts to be shown on the planet D, you should use this link , or contact Anders Bergh personally.

D in China

I was asked by yidabu to mention how greatly D society is growing in China. They have some pages where you can look for help and interesting articles when you know their language:

Title: D语言中国
Description: D Programming Language China
URL:
http://www.d-programming-language-china.org/

Title: D语言论坛
URL:
http://bbs.d-programming-language-china.org/
Description: Chinese support forum for the D Programming Languae



I've also added them to the links on the right of the page. Great work yidabu!