FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dsss

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Wed May 02, 2007 9:33 am    Post subject: dsss Reply with quote

Hi, I'm in the process of familiarizing myself with the current API. I'm impressed with your work! Maybe I'll start with a tetris clone or something like that...

To make life easier, have you considered dsss? I've been able to (almost) build the whole thing from svn and got me a working asteroids. It really pays off when you can do 'dsss build --doc' and voila there is the whole candydoc thing (beats my old script).

In the future, it would be nice to install arc over the net along with derelict.

Anyway this is how the dsss.conf files could look like for arc:

arc\dsss.conf
Quote:

name=arc
[arc]
type=sourcelibrary
exclude = arc\particle\particle.d

To compile, install and install all dependencies: Very Happy
arc\dsss build
arc\dsss install
arc\dsss net deps

particles.d seem to be broken, and when trying to build a binary library I get some forward references in redblacktree.d. This is unfortunatly also the case for generating documentation it seems, so there I excluded the physics path too (which causes the error).

arc/examples/asteroids/dsss.conf
Quote:

name=asteroids
requires=arc
[asteroids.d]
type=binary

Compile with:
arc/examples/asteroids/dsss build

Some tweaks can be done, but when the forward reference errors could be sorted out supporting dsss is as easy as adding a few small dsss.conf files to the appropiate paths. Documentation and latest derelict installation over the net for free.
Back to top
View user's profile Send private message
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Wed May 02, 2007 10:05 am    Post subject: Reply with quote

Quote:
To make life easier, have you considered dsss?


Yes, I definitely want to make building arc with dsss possible starting with arc 0.2. So thanks for looking into it!

Quote:
particles.d seem to be broken, and when trying to build a binary library I get some forward references in redblacktree.d. This is unfortunatly also the case for generating documentation it seems, so there I excluded the physics path too (which causes the error).


It's possible that particles.d isn't really up to date at the moment. What's causing the forward reference errors? (and didn't D do away with forward references?)

Thanks for helping! Smile
Back to top
View user's profile Send private message
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Wed May 02, 2007 10:44 am    Post subject: Reply with quote

indeed, particle.d imports some non-existing stuff.


Forward references are still an issue with template code.

The errors messages I get:
arc\templates\redblacktree.d(397): class arc.templates.redblacktree.RedBlackTree!(Arbiter ).RedBlackTree.Node has forward references
arc\templates\redblacktree.d(274): template instance arc.templates.redblacktree.RedBlackTree!(Arbiter ) error instantiating

RedBlackTree!(Arbiter ) is instantiated from arc\physics\world.d

I'm not sure whether this error is caused by a bug, the way dsss builds the library or some limitation with templates in a library.
Back to top
View user's profile Send private message
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Wed May 02, 2007 10:57 am    Post subject: Reply with quote

How can I reproduce these errors?

Compiling with rebuild just works and compiling world.d and redblacktree.d with dmd -c works too. What exactly is DSSS trying to do that produces the errors?

Well, remote bugfixing is not exactly efficient. Eventually, I'll install DSSS myself and try it; if you manage to fix that problem (maybe by rearranging Node's data members?), feel free to submit a patch!
Back to top
View user's profile Send private message
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Wed May 02, 2007 11:07 am    Post subject: Reply with quote

You're right, I'll send a patch when / if I can figure it out, perhaps tomorrow.

If I don't succeed before you want to tackle it, the problem may be related to this bug in dmd:
http://www.digitalmars.com/d/archives/digitalmars/D/bugs/Issue_945_New_template_forward_reference_with_named_nested_struct_only_10304.html

If it is, that would explain that it doesn't always occur (different linking order).


Last edited by Lutger on Wed May 02, 2007 5:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Wed May 02, 2007 11:55 am    Post subject: Reply with quote

DSSS ticket

http://www.dsource.org/projects/arclib/ticket/32#preview

We'll be looking more into DSSS as the release gets closer.
Back to top
View user's profile Send private message AIM Address
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Wed May 02, 2007 5:46 pm    Post subject: Reply with quote

That's cool, I'll check out the ticket system in the future.

Regarding the forward reference problem, I've found a solution but not really the problem Rolling Eyes

Uncomment 'import arc.physics.world;' in arc.physics.mybody and arc will build fine with dsss as a binary library.

This breaks a circular dependency, perhaps that caused an error where dmd used with dsss in this way could not resolve a forward reference. I hope to find the cause of it, I hate it when I solve problems without knowing how I did it...
Back to top
View user's profile Send private message
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Fri May 04, 2007 4:03 pm    Post subject: Reply with quote

I committed that change.
Back to top
View user's profile Send private message
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Fri May 11, 2007 2:15 pm    Post subject: Reply with quote

I have added DSSS (not net, only local) support to ArcLib, see http://www.dsource.org/projects/arclib/ticket/32 .
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group