D – Vincenzo's hacks http://vincenzo-ampolo.net hacks, researches, thoughts Thu, 12 Mar 2015 07:52:30 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.3 56100434 Gdc with dmd 2.015 frontend dstress results http://vincenzo-ampolo.net/2010/01/30/gdc-with-dmd-2-015-frontend-dstress-results/ http://vincenzo-ampolo.net/2010/01/30/gdc-with-dmd-2-015-frontend-dstress-results/#comments Fri, 29 Jan 2010 23:15:09 +0000 http://goshawknest.wordpress.com/?p=84

It’s a while that this article have been a draft. Now i just have time to finish it. So here it’s!

Last week gdc was been ported to match the dmd frontend version 2.015. I’ve wrote in the newsgroup [news.digitalmars.com] about a way to test the gdc compiler. I didn’t obtain an answer by Walter Bright yet, maybe he didn’t look at it yet cuz he was busy releasing the new dmd version 2.033 and 2.034. It seems that for now the best way to test a d compiler is using dstress, a test suite of d programs. So i got tried to run dstress on my laptop, it was running from 10 hours when i decided to stop and make it run in a remote pentium dual core 64bit server. I’ve then contacted ChristianK, who work at the ldc compiler, and i asked him the script he used in formatting in html way the dstress output, like the dstress output for ldc. He gave me the script 🙂 So here is the dstress output of gdc 2.015. hope you will find it useful: http://vincenzo-ampolo.net/gdc/

As you can see, gdc is still far away to be a stable compiler but it’s moving, after its reborn, to be a good compiler.

There have been some hints on the digitalmars newsgroup about the integration of the compiler on the main gcc tree since a developer of gcc with committing rights. I’m working to make it possible. Unfortunately it’s not a good time for me due to my university exams.

]]>
http://vincenzo-ampolo.net/2010/01/30/gdc-with-dmd-2-015-frontend-dstress-results/feed/ 2 84
New ldc d compiler + tango packages for Ubuntu Karmic! http://vincenzo-ampolo.net/2009/11/08/new-ldc-d-compiler-tango-packages-for-ubuntu-karmic/ http://vincenzo-ampolo.net/2009/11/08/new-ldc-d-compiler-tango-packages-for-ubuntu-karmic/#comments Sun, 08 Nov 2009 12:38:37 +0000 http://goshawknest.wordpress.com/?p=86

Yesterday Arthur Loiret announced on the #d.tango channel on Freenode.net that he did some work in packaging ldc and tango. I’ve been working on it for a while, but when i started developing gdc i didn’t maintain that work anymore.

Since Arthur gave me all the needed files to reproduce the packages, i’ve updated the PPA for ldc + tango set. New packages are of revision 1586 of ldc and 5027 of tango.

Detailed instructions in how to install those packages can be found at the Ldc Ubuntu packages page. Let me know if you have troubles with those packages!

]]>
http://vincenzo-ampolo.net/2009/11/08/new-ldc-d-compiler-tango-packages-for-ubuntu-karmic/feed/ 2 86
Funds for gdc ;) http://vincenzo-ampolo.net/2009/10/20/funds-for-gdc/ http://vincenzo-ampolo.net/2009/10/20/funds-for-gdc/#comments Tue, 20 Oct 2009 14:47:31 +0000 http://goshawknest.wordpress.com/?p=80 Today i received a very good mail which stated that what we are doing in developing gdc is appreciated.

The mail is from Tomasz Stachewicz, the developer of RuDy project to enable and ease writing Ruby native extensions in D programming language.

After congratulating for the work we are doing, he stated something new: “Is there a book wishlist or donation account I could use to word my appreciation in a more material way?

If i’m not wrong (sorry i’m not a native English speaker), he is asking for an account for a donation. I think that maybe he is not the only one which wants to give some founds to the gdc project…


Well… If everybody agrees (well for now me, Michael and David Friedman, the ones which did work for gdc) i can get this moneys with paypal (or with one of the pay-for-feature websites). Moneys will be reserved to develop gdc in a issue/task basis (for porting gdc to lastest gcc you take X, for updating to dmd version Y you take Z and so on)

Of course i don’t think that gdc is so famous to make a lot of people contribute to it, but i think that we should decide about this issue to allow

people to support the gdc project.

This message is on the news.digitalmars.com NG too.

]]>
http://vincenzo-ampolo.net/2009/10/20/funds-for-gdc/feed/ 1 80
Gdc D2 with GCC 4.3.4 sees light http://vincenzo-ampolo.net/2009/09/20/gdc-d2-with-gcc-4-3-4-sees-light/ http://vincenzo-ampolo.net/2009/09/20/gdc-d2-with-gcc-4-3-4-sees-light/#comments Sun, 20 Sep 2009 10:30:43 +0000 http://goshawknest.wordpress.com/?p=75 I’ve been working with ldc for a long time. I enjoyed it, i helped the development with tickets and hacking ldc a bit. I even tried to compile Tango as shared library but i got an error, probably caused by the compiler since people reported that in gdc they were able to do it. I then started guessing if llvm is so stable as it seems and if it can substitute the gnu compiler collection. Then i came to these llvm vs gcc benchmarks. Well the result is that llvm is not so fast and reliable as promised. In the same days, a message posted on the D newsgroup got me. I started thinking that resurrection gdc is the only way to make a stable and reliable compiler accepted in the FOSS community for the D programming language. But it should resurrect it should implement the D2 specs: there are no other compilers than dmd which support D2 around. So, me and Michael joined to the challenge to work on gdc 😀

We got the lastest working branch of gdc, the one who relies on gcc 4.3.1. We then copied in our repository in bitbucket and applied some changes, after two days of works, gdc for D2.014 worked under gcc 4.3.4 (there were some problems in the default version when compiling the Phobos library). As a proof that it works look at it 😀

goshawk@earth:/tmp/test/usr/local/gcc-4.3/bin$ ./gdc ~/test.d
goshawk@earth:/tmp/test/usr/local/gcc-4.3/bin$ ./a.out
Hello World, Reloaded

goshawk@earth:/tmp/test/usr/local/gcc-4.3/bin$ ./gdc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure –prefix=/usr/local/gcc-4.3 –enable-languages=c,d,c++ –disable-multilib –disable-shared
Thread model: posix
gcc version 4.3.4 (GCC)

Nice, isn’t it?

Now while Michael is focusing in fixing the D1 part, i started merging the lastest dmd D2 compiler in gdc. Making a diff against dmd2.014 and gdc2.014 i’m applying all the necessary patches in gdc for D2 2.032.

We opened a dedicated IRC channel in irc.freenode.net #d.gdc. Feel free to join!

You can find full instructions in how to compile gdc in our wiki page.

Any help, documentation, word on this challenge is appreciated. See you soon 😀

]]>
http://vincenzo-ampolo.net/2009/09/20/gdc-d2-with-gcc-4-3-4-sees-light/feed/ 4 75
D programming language reaches Intel http://vincenzo-ampolo.net/2009/08/26/d-programming-language-reaches-intel/ http://vincenzo-ampolo.net/2009/08/26/d-programming-language-reaches-intel/#comments Wed, 26 Aug 2009 07:10:24 +0000 http://goshawknest.wordpress.com/?p=69 Andrei Alexandrescu, one of the people behind the development of the D programming language, have been interviewed by Intel in a 10 mins interview. He introduces the D programming language and shows the path which has been followed in designing the language.

You can also read the full article.

]]>
http://vincenzo-ampolo.net/2009/08/26/d-programming-language-reaches-intel/feed/ 1 69
How to install Eclipse+Descent+Ldc D programming language compiler and configure auto completition http://vincenzo-ampolo.net/2009/08/25/how-to-install-eclipsedescentldc-d-programming-language-compiler-and-configure-auto-completition/ http://vincenzo-ampolo.net/2009/08/25/how-to-install-eclipsedescentldc-d-programming-language-compiler-and-configure-auto-completition/#comments Tue, 25 Aug 2009 09:27:27 +0000 http://goshawknest.wordpress.com/?p=67 Hi, i’ve just done a small video in how to being productive with the D programming language.

The video is actually on YouTube and shows, step by step, how to set up a perfect and complete IDE for the D programming language.

Hope you enjoy… See you!

]]>
http://vincenzo-ampolo.net/2009/08/25/how-to-install-eclipsedescentldc-d-programming-language-compiler-and-configure-auto-completition/feed/ 4 67
D programming language recension by Andy Glew http://vincenzo-ampolo.net/2009/07/18/d-programming-language-recension-by-andy-glew/ http://vincenzo-ampolo.net/2009/07/18/d-programming-language-recension-by-andy-glew/#respond Sat, 18 Jul 2009 22:07:00 +0000 http://goshawknest.wordpress.com/?p=65 Here is an important review by a skilled programmer ad Andy Clew.

The result is simple:

D is definitely interesting. Whether or not it will take off, I do not know. But it certainly has some nice features. If irt were ubiquitous, I would use it.

]]>
http://vincenzo-ampolo.net/2009/07/18/d-programming-language-recension-by-andy-glew/feed/ 0 65
Ldc D programming language compiler daily builds for ubuntu and debian http://vincenzo-ampolo.net/2009/05/17/ldc-d-programming-language-compiler-daily-builds-for-ubuntu-and-debian/ http://vincenzo-ampolo.net/2009/05/17/ldc-d-programming-language-compiler-daily-builds-for-ubuntu-and-debian/#respond Sun, 17 May 2009 14:13:24 +0000 http://goshawknest.wordpress.com/?p=48

Hi,

From one week this program runs at midnight at my pc:

import tango.io.Stdout;
import tango.sys.Process;
import tango.time.WallClock;
import tango.text.convert.Format;
import tango.io.FileConduit;

int main(char[][] args)
{
auto fields = WallClock.toDate;
char[] pkgversion = Format.convert(“{:D4}{:D2}{:D2}”, fields.date.year, fields.date.month, fields.date.day);

auto p = new Process(“bash -c “rm -fr ldc-hg*””, null);
p.execute;
p.wait;
p = new Process(“hg clone http://hg.dsource.org/projects/ldc ldc”, null);
p.execute;
p.wait();
p = new Process(“rm -fr ldc/.hg”, null);
p.execute;
p.wait;
p = new Process(“rsync -r tango ldc/”, null);
p.execute;
p.wait;
p = new Process(“mv ldc ldc-hg-0.9.1~”~pkgversion~”+tango-0.99.8.dfsg”, null);
p.execute;
p.wait;
p = new Process(“tar -czf ldc-hg_0.9.1~”~pkgversion~”+tango-0.99.8.dfsg.orig.tar.gz ldc-hg-0.9.1~”~pkgversion~”+tango-0.99.8.dfsg”,null);
p.execute;
p.wait;
p = new Process(“rsync -r debian ldc-hg-0.9.1~”~pkgversion~”+tango-0.99.8.dfsg/”, null);
p.execute;
p.wait;

char[] changelog =
“ldc-hg (0.9.1~”~pkgversion~”+tango-0.99.8.dfsg-0ppa1) karmic; urgency=low

* Daily build of ldc hg

— Vincenzo Ampolo <[email protected]>  Thu, 30 Apr 2009 18:28:06 +0200n”;

auto fileChangelog = new FileConduit (“ldc-hg-0.9.1~”~pkgversion~”+tango-0.99.8.dfsg/debian/changelog”, FileConduit.WriteCreate);
fileChangelog.output.write(changelog);
fileChangelog.close;

return 0;
}

It’s a D programming language program that fetches ldc sources, add the tango library 0.99.8 to the source tree and create a valid soruce tree suitable for debuild -S and dput. Thanks to it i’m building every night packages of the ldc compiler which are stored in d-language-packagers ppa. To use it is very easy as you can read directly from the ldc project page in packages for ubuntu and debian section.

Feel free to contact me if something does not work correctly ! 🙂

]]>
http://vincenzo-ampolo.net/2009/05/17/ldc-d-programming-language-compiler-daily-builds-for-ubuntu-and-debian/feed/ 0 48
ldc and libtango-gdc-dev packages for ubuntu/debian in ppa http://vincenzo-ampolo.net/2009/05/06/ldc-and-libtango-gdc-dev-packages-for-ubuntudebian-in-ppa/ http://vincenzo-ampolo.net/2009/05/06/ldc-and-libtango-gdc-dev-packages-for-ubuntudebian-in-ppa/#respond Tue, 05 May 2009 23:08:06 +0000 http://goshawknest.wordpress.com/?p=44 Hi, ldc and libtango-gdc-dev are in d language packagers ppa from some time ago now.

Here is the way you can install ldc 🙂 (the same applies for libtango-gdc-dev)

goshawk@earth:~$ sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 0xac6c83ad38a437abfc26a14af273e44ecde3fa2e
[sudo] password for goshawk:
Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /etc/apt/secring.gpg –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –recv-keys –keyserver keyserver.ubuntu.com 0xac6c83ad38a437abfc26a14af273e44ecde3fa2e
gpg: requesting key CDE3FA2E from hkp server keyserver.ubuntu.com
gpg: key CDE3FA2E: public key “Launchpad PPA for D Programming Language Applications Packagers” imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
goshawk@earth:~$ sudo nano /etc/apt/sources.list
goshawk@earth:~$ sudo apt-get update
Hit http://it.archive.ubuntu.com jaunty Release.gpg

[…]

Fetched 78.0kB in 1s (77.0kB/s)
Reading package lists… Done
goshawk@earth:~$ sudo apt-get install ldc
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libconfig++6
The following NEW packages will be installed:
ldc libconfig++6
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 7525kB of archives.
After this operation, 32.5MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ppa.launchpad.net jaunty/main libconfig++6 1.3.1-1ubuntu1 [38.8kB]
Get:2 http://ppa.launchpad.net jaunty/main ldc 0.9.1~20090403.dfsg-0ubuntu2 [7486kB]
Fetched 7525kB in 7s (995kB/s)
Selecting previously deselected package libconfig++6.
(Reading database … 120004 files and directories currently installed.)
Unpacking libconfig++6 (from …/libconfig++6_1.3.1-1ubuntu1_amd64.deb) …
Selecting previously deselected package ldc.
Unpacking ldc (from …/ldc_0.9.1~20090403.dfsg-0ubuntu2_amd64.deb) …
Processing triggers for man-db …
Setting up libconfig++6 (1.3.1-1ubuntu1) …

Setting up ldc (0.9.1~20090403.dfsg-0ubuntu2) …
Processing triggers for libc6 …
ldconfig deferred processing now taking place
goshawk@earth:~$

Well, now you have ldc installed.

I just did a d program to fetch the lastest ldc trunk, package it, and put on ppa. I’m testing it in these days, and when my exams will finish (soon 🙂 ) daily packages will be available! 🙂

Bye.

]]>
http://vincenzo-ampolo.net/2009/05/06/ldc-and-libtango-gdc-dev-packages-for-ubuntudebian-in-ppa/feed/ 0 44
Ldc: debian and ubuntu packages for x86 and x86_64 (amd64) http://vincenzo-ampolo.net/2009/04/07/ldc-debian-and-ubuntu-packages-for-x86-and-x86_64-amd64/ http://vincenzo-ampolo.net/2009/04/07/ldc-debian-and-ubuntu-packages-for-x86-and-x86_64-amd64/#comments Tue, 07 Apr 2009 21:17:01 +0000 http://goshawknest.wordpress.com/?p=30 UPDATE:

To install the package on ubuntu, you need to install the libconfig++6 package from debian.

We are working to put ldc on debian and ubuntu.

In the meantime packages for x86 and x86_64 are ready and can be freely downloaded, you just need to install them and you can start compiling any source like in this example:

goshawk@earth:~/Documents/Projects/MOTU/ldc/d1/ldc$ sudo dpkg -i  ldc_0.9.1~20090403.dfsg-1_amd64.deb
Selecting previously deselected package ldc.
(Reading database … 236469 files and directories currently installed.)
Unpacking ldc (from ldc_0.9.1~20090403.dfsg-1_amd64.deb) …
Setting up ldc (0.9.1~20090403.dfsg-1) …
Processing triggers for man-db …
goshawk@earth:~/Documents/Projects/MOTU/ldc/d1/ldc$ cd
goshawk@earth:~$

goshawk@earth:~$ cat test.d
import  tango.io.Console;

void    main()
{
Cout(“Hello, World”).newline;
}

goshawk@earth:~$ ldc test.d
goshawk@earth:~$ ./test
Hello, World
goshawk@earth:~$

🙂

]]>
http://vincenzo-ampolo.net/2009/04/07/ldc-debian-and-ubuntu-packages-for-x86-and-x86_64-amd64/feed/ 2 30