Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Is tango.io.protocol missing in tango-r5121?

Moderators: kris

Posted: 11/11/09 16:04:34

Today I downloaded and built the new tango-r5121.

Building with bob.exe worked very well (Win XP Pro SP3 / dmd 1.051):

1. Unpack trunk-r5121.zip to d:\trunk

2. cd d:\trunk

3. build\bin\win32\bob -vu -r=dmd -c=dmd -l=tango -p=windows -o="-release -O" .

With the new dmd+tango I also built dsss-r945 and tangobos-r65 (with some changes) - just fine.

Now I tested some of my apps (using tango, tangobos (std.regexp, std.string, std.stdio, std.stream) and dwin-r332 (dwin.text.Properties, dwin.database.sqlite, dwin.text.pcre.RegExp?) - also fine.

But building minid-r589 failed because tango.io.protocol.* is no more.

Has it been (re)moved by purpose or has it just been forgotten?

Author Message

Posted: 11/11/09 18:05:29

Well tango.io.protocol moved to mango by now. I don't understand why as I loved it to see it in tango and we're heavily using it. One doesn't needs to talk about it when it actually works perfectly out. So kris whats about getting it back into tango? I fully understand that the cluster stuff moved into mango, but low level protocol writer?

Come on bring it back, please ;-)

P.S. It was one of the awesome things that motivated us to join the tango community in the very beginning!

Posted: 11/11/09 18:16:57

I would be very happy to see it back, too...

Posted: 11/11/09 21:04:08 -- Modified: 11/12/09 05:21:10 by
kris

wow, we didn't know tango.io.protocol had fans :)

Protocol turned out to be a wart in Tango - partly because of D semantics (lack of struct interface, lack of vararg-by-reference), partly because it depends heavily on Buffer, and partly because it's a bit unwieldy. This relegates it to being only a partial solution to the serialization problem, and we'd rather have a comprehensive solution.

Guess this needs more thought ...

(here's a revised version without the dependency on Buffer. Please add further ideas and suggestions to the ticket ... thanks!)

Posted: 11/12/09 11:19:04

well, great post. yeah it had fans ;-). anyway, as far as I know fawzi has a nice new solution for the serialization thingy developed and tested on his multi-multi-multi... core system. maybe he wants to integrate it into tango as a replacement? he said it even support json as a serialization as far as i can remember.

Posted: 11/12/09 11:21:52 -- Modified: 11/12/09 11:23:41 by
lars_kirchhoff

I would like to keep it in tango.. It became quite handy in some situation and improvements wouldn't hurt, would it ;-)?

/lars

Posted: 11/12/09 15:42:27

OK then, update and more questions.

I downloaded mango-r1133.

Current mango doesn't build with current tango-r5122 - there are several issues (and no, I don't want to complain. I know that it's work in progress ;-)

Putting mango in my import path, MiniD could be made to dsss-build with mango.io.protocol and at least my MiniD examples seem to work.

After some search I found this 0_99_9_BreakingChanges document. (I think, adding a link to this wiki page might be useful). Are there any other change logs or release notes?

The preliminary build instructions don't work on windows (just a minor problem: You must type build\bin\win32\bob instead of build/bin/win32/bob). Should I edit the wiki page?

Posted: 11/13/09 01:29:24

HeiHon wrote:

OK then, update and more questions.

I downloaded mango-r1133.

Current mango doesn't build with current tango-r5122 - there are several issues (and no, I don't want to complain. I know that it's work in progress ;-)

Putting mango in my import path, MiniD could be made to dsss-build with mango.io.protocol and at least my MiniD examples seem to work.

After some search I found this 0_99_9_BreakingChanges document. (I think, adding a link to this wiki page might be useful). Are there any other change logs or release notes?

The preliminary build instructions don't work on windows (just a minor problem: You must type build\bin\win32\bob instead of build/bin/win32/bob). Should I edit the wiki page?

It would be much much grateful if you would like to write a short tutorial on how to compile & build all these bundles together to set up a Tango workspace.I have been struggling for dozens of times and fianlly ,died.

Regards, Sam

Posted: 11/13/09 03:14:44

tomni: there are a handful of serialization 'solutions' out there, and they all try to get around various limitations in the language. Each have their pros and cons, and currently none are ideal :)

Posted: 11/14/09 18:58:10

samsam698 wrote:

It would be much much grateful if you would like to write a short tutorial

So here is how I set up my tango workspace.

I don't think that it is "The Right Way" (TM) to do it, but "It Works For Me" (TM).

This is a looong post and I know that it doesn't really fit here.

@Moderators: Please feel free to move it to a better place (or delete it due to general lack of quality). But let samsam698 know where it was moved to ;-)

I installed digital mars C and D and tango to the root of drive d: resulting in two folders for all binaries and sources etc.:

d:\dm - Digital mars C d:\dmd - Digital mars D and tango etc.

During installation I built everything in a folder d:\trunk.

When you use other locations you have to replace d:\ in the following examples with your locations.

1. digital mars c compiler

Get latest digital mars c compiler suite from

http://www.digitalmars.com/download/freecompiler.html

I use three parts:

Digital Mars C/C++ Compiler Version 8.50:

http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm850c.zip

Basic Utilities:

http://ftp.digitalmars.com/bup.zip

beta test C++ Compiler Version 8.51:

http://ftp.digitalmars.com/Digital_Mars_C++/Patch/beta.zip

Unzip all zip files to d:\

This will create a folder d:\dm

2. digital mars d 1.0

Get latest digital mars d 1.0 compiler from

http://www.digitalmars.com/d/1.0/index.html or http://www.digitalmars.com/d/1.0/changelog.html

Version D 1.052:

http://ftp.digitalmars.com/dmd.1.052.zip

Unzip to d:\

This will create a folder d:\dmd

Add (append)

;d:\dmd\windows\bin;d:\dm\bin

to your windows search path. Important: The first link.exe and make.exe found on your search path must be the digital mars link.exe and make.exe.

Verify that the programs can be found via your search path.

Open a command window (Start/Run - cmd) and type: link -h, then make -h and then dmd.

You should see something like:

D:\>link -h
OPTLINK (R) for Win32  Release 8.00.2
Copyright (C) Digital Mars 1989-2009  All rights reserved.
...


D:\>make -h
Digital Mars Make Version 5.05
Copyright (C) Digital Mars 1985-2004.  All Rights Reserved.
Written by Walter Bright  www.digitalmars.com
...


D:\trunk>dmd
Digital Mars D Compiler v1.052
Copyright (c) 1999-2009 by Digital Mars written by Walter Bright
...

Optional: Save a copy of the original d:\dmd\windows\bin\sc.ini as e.g. sc_dmd.ini

3. dsss/rebuild

Get latest dsss from

http://www.dsource.org/projects/dsss/browser/trunk http://www.dsource.org/projects/dsss/changeset/945/trunk?old_path=%2F&format=zip

Unzip to d:\

This will create a folder d:\trunk

The makefile for dsss will fail unless there is a folder with the winbins.

So:

Create a new folder d:\trunk\winbins

Download all files from

http://www.dsource.org/projects/dsss/browser/winbins

into the folder d:\trunk\winbins

Now modify d:\trunk\Makefile.dmd.win

The first line reads

PREFIX=C:\\dsss

Change that to

PREFIX=D:\\dmd\\windows

Open a command window (Start/Run - cmd) and type:

d:
cd \trunk
make install -fMakefile.dmd.win

This should build and install dsss/rebuild to d:\dmd\windows\bin

Leave the command window open.

When you plan to use tango as your default environment: Modify d:\dmd\windows\etc\rebuild\default

The first line reads

profile=dmd-win

Change that to

profile=dmd-win-tango

Delete everything in d:\trunk.

4. tango

Get latest tango from

http://www.dsource.org/projects/tango/browser/trunk http://www.dsource.org/projects/tango/changeset/5148/trunk?old_path=%2F&format=zip

Unzip to d:\

In your still open command window type:

build\bin\win32\bob -vu -r=dmd -c=dmd -l=tango -p=windows -o="-release -O" .

This will build tango.lib, the release version of tango.

Now type:

build\bin\win32\bob -vu -r=dmd -c=dmd -l=tango-dbg -p=windows -o="-debug -g" .

This will build tango-dbg.lib, the debug version of tango.

Move d:\trunk\tango.lib and d:\trunk\tango-dbg.lib to d:\dmd\windows\lib

Create a new folder d:\dmd\windows\import

Move the files LICENSE.txt, object.di and README.txt from d:\trunk to d:\dmd\windows\import Move the folders std and tango from d:\trunk to d:\dmd\windows\import

Modify d:\dmd\windows\bin\sc.ini:

The original version is:

[Version]
version=7.51 Build 020

[Environment]
LIB="%@P%\..\lib";\dm\lib
DFLAGS="-I%@P%\..\..\src\phobos"
LINKCMD=%@P%\link.exe

Change that to:

[Version]
version=7.51 Build 020

[Environment]
LIB="%@P%\..\lib";\dm\lib
DFLAGS="-I%@P%\..\import" -version=Tango -defaultlib=tango.lib -debuglib=tango-dbg.lib -L+tango.lib
LINKCMD=%@P%\link.exe

Optional: Save a copy of this d:\dmd\windows\bin\sc.ini as e.g. sc_tango.ini

Now you should be able to build apps with dmd (or dsss build) and tango.

Delete everything in d:\trunk.

5. tangobos

Get latest tangobos from

http://www.dsource.org/projects/tangobos/browser/trunk http://www.dsource.org/projects/tangobos/changeset/65/trunk?old_path=%2F&format=zip

Unzip to d:\

Modify lines 47 and 48 of d:\trunk\std\c\stdlib.d:

Lines 47 and 48 read:

    const int EXIT_SUCCESS = 0;	///
    const int EXIT_FAILURE = 1;	/// ditto

Change that to:

//    const int EXIT_SUCCESS = 0;	///
//    const int EXIT_FAILURE = 1;	/// ditto

Modify lines 1006 and 1272 of d:\trunk\std\format.d:

Line 1006 reads:

            s = tis.xtoString(argptr);

Change that to:

            s = tis.xtoString();

Line 1272 reads:

		    s = tis.xtoString(p_args);

Change that to:

		    s = tis.xtoString();

In your still open command window type:

dsss build

This will build crc32.lib, tangobos-etc.lib and tangobos.lib.

Move d:\trunk\crc32.lib, d:\trunk\tangobos-etc.lib and d:\trunk\tangobos.lib to d:\dmd\windows\lib

Move the files crc32.d, phoboslicense.txt and README from d:\trunk to d:\dmd\windows\import Move the folders etc and std from d:\trunk to d:\dmd\windows\import

Rename file D:\dmd\windows\import\std\intrinsic.di to D:\dmd\windows\import\std\_tango_intrinsic.di Rename file D:\dmd\windows\import\std\stdarg.di to D:\dmd\windows\import\std\_tango_stdarg.di Rename file D:\dmd\windows\import\std\c\stdarg.di to D:\dmd\windows\import\std\c\_tango_stdarg.di

Modify d:\dmd\windows\bin\sc.ini:

Line 6 reads:

DFLAGS="-I%@P%\..\import" -version=Tango -defaultlib=tango.lib -debuglib=tango-dbg.lib -L+tango.lib

Change that to:

DFLAGS="-I%@P%\..\import" -version=Tango -defaultlib=tango.lib -debuglib=tango-dbg.lib -L+tango.lib -L+tangobos.lib -L+tangobos-etc.lib

Optional: Save a copy of this d:\dmd\windows\bin\sc.ini as e.g. sc_tangobos.ini

Now you should be able to build apps with dsss and tango and (at least some parts of) phobos.

Delete everything in d:\trunk.

6. dwin

Get latest dwin from

http://www.dsource.org/projects/dwin/browser/trunk http://www.dsource.org/projects/dwin/changeset/332/trunk?old_path=%2F&format=zip

Unzip to d:\

At the monent building dwin fails because there are some files missing. But you can still use parts of dwin when you build your apps with dsss (or xfbuild).

So:

Rename d:\trunk\lib\Readme.txt to d:\trunk\lib\Readme_dwin.txt.

In d:\trunk\lib delete files gdi32.lib, Kernel32.Lib and user32.lib Move all remaining files from d:\trunk\lib to d:\dmd\windows\lib

Delete folder d:\trunk\lib

Create a new folder d:\dmd\windows\import\dwin

Move all files and folders from d:\trunk to d:\dmd\windows\import\dwin

Now you should be able to build apps with dsss and tango and (at least some parts of) phobos and dwin.

7. minid

This is a bit hairy at the moment due to some breaking changes in current tango.

Expect that to become much easier in near future.

Get latest mango from

http://www.dsource.org/projects/mango/browser/trunk http://www.dsource.org/projects/mango/changeset/1133/trunk?old_path=%2F&format=zip

Unzip to d:\

Current mango doesn't build with current tango.

So: Create a new folder d:\dmd\windows\import\mango

Move folder d:\trunk\mango to d:\dmd\windows\import

Delete everything in d:\trunk.

Get latest minid from

http://www.dsource.org/projects/minid/browser/trunk http://www.dsource.org/projects/minid/changeset/591/trunk?old_path=%2F&format=zip

Unzip to d:\

Modify line 31 of d:\trunk\minid\ex.d:

Line 31 reads:

import tango.io.protocol.Reader;

Change that to:

import mango.io.protocol.Reader;

Modify line 31 of d:\trunk\minid\moduleslib.d:

Line 31 reads:

import tango.io.protocol.Reader;

Change that to:

import mango.io.protocol.Reader;

Modify lines 30 and 31 of d:\trunk\minid\serialization.d:

Lines 30 and 31 read:

import tango.io.protocol.Reader;
import tango.io.protocol.Writer;

Change that to:

import mango.io.protocol.Reader;
import mango.io.protocol.Writer;

Modify line 28 of d:\trunk\minidc.d:

Line 28 reads:

import tango.io.protocol.Writer;

Change that to:

import mango.io.protocol.Writer;

Modify line 3 of d:\trunk\test.d:

Line 3 reads:

import tango.core.stacktrace.TraceExceptions;

Change that to:

import tango.core.tools.TraceExceptions;

Mango and all these changes to minid are due to breaking changes in tango.

Normally there should be no need for that.

Minid addons:

I use two addons to minid - net.d and pcre.d:

Get net.d, pcre.d and libpcre.dll from http://www.dsource.org/projects/minid/browser/extra/minid/addons

Create a new folder d:\trunk\minid\addons

Move net.d and pcre.d into the new folder d:\trunk\minid\addons

Move libpcre.dll to d:\dmd\windows\bin

In your still open command window type:

dsss build -d

(You must use -d because some functions in tango are now deprecated).

This will build DD-minid.lib, mdcl.exe, mdtest.exe and minidc.exe.

Move d:\trunk\DD-minid.lib to d:\dmd\windows\lib

Move d:\trunk\mdcl.exe and d:\trunk\minidc.exe to d:\dmd\windows\bin

Move the folder minid from d:\trunk to d:\dmd\windows\import

Delete everything in d:\trunk.

8. Windows bindings

Get all bindings from

http://www.dsource.org/projects/bindings/browser/trunk http://www.dsource.org/projects/bindings/changeset/331/trunk?old_path=%2F&format=zip

Unzip to d:\

I only use some bindings for windows.

So: Move the folder win32 from d:\trunk to d:\dmd\windows\import

Delete everything in d:\trunk.

Have fun!

Posted: 11/16/09 01:28:45 -- Modified: 11/16/09 01:34:58 by
samsam698 -- Modified 5 Times

Hi HeiHon:Really appreciated!You've given me the world!

Btw,just wanna know if you have also setup any workable GUI library?Personally I prefer DWT2 because it's native,and,cross-platform.But don't know whether it can be built under the newest DMD and Tango.

Regards, Sam

Posted: 11/26/09 15:41:18

samsam698 wrote:

Btw,just wanna know if you have also setup any workable GUI library?

Hmm, this is now getting really off topic ;-)

I don't do big GUI things and I don't do GUI things on a regular basis.

For my smallish GUI stuff I used DFL because I found it the smallest and leanest GUI library.

The newest version I managed to put together was: dmd_1.037 + tango-r4164 + dfl-0.98

If I had to do bigger GUI things I probably would try to put together a working environment with DWT and tango.