Re: revamped candydoc

2012-10-11 Thread Jacob Carlborg
On 2012-10-11 22:16, Aziz K. wrote: On Thu, 11 Oct 2012 21:33:15 +0200, Jacob Carlborg wrote: If you're using git you could add Tango as a submodule. I'm talking about Tango-D2 here, I heard you're porting Dil to D2. It might be possible for D1 as well using git svn. Interesting, I didn't r

Re: revamped candydoc

2012-10-11 Thread Jacob Carlborg
On 2012-10-11 22:16, Aziz K. wrote: Interesting, I didn't realize until now that you can do that with git. Is it possible to set the external git repo to a specific commit? I'll consider this option. Thanks! That's the whole point, it's locked to a specific commit and you need to "force" upda

Re: How many std.concurrency receivers?

2012-10-11 Thread Charles Hixson
On 10/11/2012 01:49 PM, Sean Kelly wrote: On Oct 10, 2012, at 6:55 PM, Charles Hixson wrote: TDPL quotes the recommendation from an Erlang book "Have LOTS of threads!", but doesn't really say how to guess at an order of magnitude of what's reasonable for D std.concurrency. People on Erlang

Re: How many std.concurrency receivers?

2012-10-11 Thread Sean Kelly
On Oct 11, 2012, at 12:39 PM, thedeemon wrote: > My biggest concern here is with this number of agents communicating to each > other via message passing it would mean huge number of memory allocations for > the messages, but in current D runtime allocation is locking (and GC too), so > it may

Re: About demangling

2012-10-11 Thread Alex Rønne Petersen
On 11-10-2012 22:56, Sean Kelly wrote: On Oct 11, 2012, at 6:17 AM, Lubos Pintes wrote: Hi, Can someone point me to some source with information about name demangling when compiling some D program and the famous linker error 42 appears? Filter the symbol names through core.demangle. We e

Re: About demangling

2012-10-11 Thread Sean Kelly
On Oct 11, 2012, at 6:17 AM, Lubos Pintes wrote: > Hi, > Can someone point me to some source with information about name demangling > when compiling some D program and the famous linker error 42 appears? Filter the symbol names through core.demangle.

Re: How many std.concurrency receivers?

2012-10-11 Thread Sean Kelly
On Oct 10, 2012, at 6:55 PM, Charles Hixson wrote: > > TDPL quotes the recommendation from an Erlang book "Have LOTS of threads!", > but doesn't really say how to guess at an order of magnitude of what's > reasonable for D std.concurrency. People on Erlang say that 100's of > thousands of thr

Re: How many std.concurrency receivers?

2012-10-11 Thread Charles Hixson
On 10/11/2012 11:04 AM, thedeemon wrote: On Thursday, 11 October 2012 at 16:09:20 UTC, Charles Hixson wrote: Hmmm...what I'm trying to build is basically a cross between a weighted directed graph and a neural net, with some features of each, but not much in common. Very light-weight processes w

Re: revamped candydoc

2012-10-11 Thread Aziz K.
On Thu, 11 Oct 2012 21:33:15 +0200, Jacob Carlborg wrote: If you're using git you could add Tango as a submodule. I'm talking about Tango-D2 here, I heard you're porting Dil to D2. It might be possible for D1 as well using git svn. Interesting, I didn't realize until now that you can do

Re: How many std.concurrency receivers?

2012-10-11 Thread Russel Winder
On Thu, 2012-10-11 at 21:26 +0200, thedeemon wrote: > On Thursday, 11 October 2012 at 18:43:37 UTC, Russel Winder wrote: > > > Can't this be done now using tasks and a threadpool from > > std.parallel? > > As far as I understand that would essentially mean a single queue > of tasks which is acc

Re: How many std.concurrency receivers?

2012-10-11 Thread thedeemon
My biggest concern here is with this number of agents communicating to each other via message passing it would mean huge number of memory allocations for the messages, but in current D runtime allocation is locking (and GC too), so it may kill all the parallelism if reactions to messages are sh

Re: revamped candydoc

2012-10-11 Thread Jacob Carlborg
On 2012-10-11 17:01, Aziz K. wrote: Hi, You might also want to check out my solution to generating documentation for D projects. I've just run DIL on Phobos2 and uploaded the files to my Dropbox account: http://dl.dropbox.com/u/17101773/doc/phobos2/index.html I liked the style that the Tango

Re: revamped candydoc

2012-10-11 Thread Jacob Carlborg
On 2012-10-11 20:08, Aziz K. wrote: I'll be happy to help you compile DIL yourself. That way I can see where my assumptions are false and my instructions are lacking and make it work for different platforms and needs. I've been considering just copying Tango's files to my src folder, because it w

Re: How many std.concurrency receivers?

2012-10-11 Thread thedeemon
On Thursday, 11 October 2012 at 18:43:37 UTC, Russel Winder wrote: Can't this be done now using tasks and a threadpool from std.parallel? As far as I understand that would essentially mean a single queue of tasks which is accessed concurrently by workers hungry of work (one point of locking)

Re: Splitting a string on multiple tokens

2012-10-11 Thread Dmitry Olshansky
On 11-Oct-12 06:40, ixid wrote: On Wednesday, 10 October 2012 at 02:21:05 UTC, jerro wrote: On Wednesday, 10 October 2012 at 00:18:17 UTC, ixid wrote: Is there an effective way of splitting a string with a set of tokens? Splitter feels rather limited and multiple passes gives you an array of ar

Re: How many std.concurrency receivers?

2012-10-11 Thread Russel Winder
On Thu, 2012-10-11 at 20:04 +0200, thedeemon wrote: […] > Here's how I would try to approach a task of having thousands of > independent agents with current std.concurrency. Each agent > (cell) is represented by some data structure and its main > function which gets one message as input, reacts

Re: revamped candydoc

2012-10-11 Thread Aziz K.
I'll be happy to help you compile DIL yourself. That way I can see where my assumptions are false and my instructions are lacking and make it work for different platforms and needs. I've been considering just copying Tango's files to my src folder, because it would make compiling much easie

Re: How many std.concurrency receivers?

2012-10-11 Thread thedeemon
On Thursday, 11 October 2012 at 16:09:20 UTC, Charles Hixson wrote: Hmmm...what I'm trying to build is basically a cross between a weighted directed graph and a neural net, with some features of each, but not much in common. Very light-weight processes would be ideal. The only communication

Re: revamped candydoc

2012-10-11 Thread Dan
On Thursday, 11 October 2012 at 16:45:08 UTC, Aziz K. wrote: It's very easy to use DIL for doc generation (at least I try hard to make it so.) In your case you'd just have to run this command (use -I as well if required): dil ddoc path/to/output/ package1/*.d package2/*.d -v --kandil -hl

Re: Unable to understand this compiler error

2012-10-11 Thread bearophile
Anyway, this seems a compiler bug, so probably it should be added to bugzilla. http://d.puremagic.com/issues/show_bug.cgi?id=8802

Re: Latest Version of Ali's Book

2012-10-11 Thread Ali Çehreli
On 10/11/2012 09:28 AM, Martin Drasar wrote: On 11.10.2012 18:17, Paul wrote: Anyone know where I can find the latest version of Ali Çehreli's D book? Thanks. Hi Paul, I thinks that the latest version is always on Ali's webpage... http://ddili.org/ders/d.en/index.html Martin I have six mo

Re: revamped candydoc

2012-10-11 Thread Aziz K.
It's very easy to use DIL for doc generation (at least I try hard to make it so.) In your case you'd just have to run this command (use -I as well if required): dil ddoc path/to/output/ package1/*.d package2/*.d -v --kandil -hl Check out http://code.google.com/p/dil/wiki/Kandil for more in

Re: Latest Version of Ali's Book

2012-10-11 Thread Martin Drasar
On 11.10.2012 18:17, Paul wrote: > Anyone know where I can find the latest version of Ali Çehreli's D book? > Thanks. Hi Paul, I thinks that the latest version is always on Ali's webpage... http://ddili.org/ders/d.en/index.html Martin

Latest Version of Ali's Book

2012-10-11 Thread Paul
Anyone know where I can find the latest version of Ali Çehreli's D book? Thanks.

Re: How many std.concurrency receivers?

2012-10-11 Thread Charles Hixson
On 10/11/2012 12:09 AM, thedeemon wrote: On Thursday, 11 October 2012 at 02:21:01 UTC, Charles Hixson wrote: I haven't been able to get an idea of how many std.concurrency receivers is reasonable. Currently in std.concurrency each "receiver" lives in its own OS thread, so they are very expensi

Re: revamped candydoc

2012-10-11 Thread Dan
On Thursday, 11 October 2012 at 15:25:37 UTC, Aziz K. wrote: Hi, You might also want to check out my solution to generating documentation for D projects. Many thanks Aziz. The produced documentation is very nice! How hard is it to set up to create that documentation. It may be what I'm lookin

Re: floating point divide

2012-10-11 Thread Damian
On Thursday, 11 October 2012 at 15:21:01 UTC, bearophile wrote: Damian: I come from a pascal background and we could use: divintegral division operator / floating point division operator Two operators for the two different operations is a design better than C, that is bug-prone.

Re: revamped candydoc

2012-10-11 Thread Aziz K.
Hi, You might also want to check out my solution to generating documentation for D projects. I've just run DIL on Phobos2 and uploaded the files to my Dropbox account: http://dl.dropbox.com/u/17101773/doc/phobos2/index.html Where else would you get a PDF of everything in Phobos2, but here (7

Re: floating point divide

2012-10-11 Thread bearophile
Damian: I come from a pascal background and we could use: divintegral division operator / floating point division operator Two operators for the two different operations is a design better than C, that is bug-prone. So my question is, how does D force floating point division on int

Re: floating point divide

2012-10-11 Thread Aziz K.
int n1 = 10, n2 = 2; float f = (n1+0.0f)/n2; Casting n1 to float would also work, but I hope the compiler is smart enough to optimize away the plus expression.

floating point divide

2012-10-11 Thread Damian
I come from a pascal background and we could use: divintegral division operator / floating point division operator So my question is, how does D force floating point division on integrals? At the moment i do this, but i was hoping for an easier way: int n1 = 10, n2 = 2; float f = cast

Re: About demangling

2012-10-11 Thread Jacob Carlborg
On 2012-10-11 15:17, Lubos Pintes wrote: Hi, Can someone point me to some source with information about name demangling when compiling some D program and the famous linker error 42 appears? Thank This page contains the reference for the name mangling: http://dlang.org/abi.html -- /Jacob Carlb

revamped candydoc

2012-10-11 Thread Dan
Looking to get nice D documentation generation setup. According to this, candydoc is revamped. http://www.digitalmars.com/d/archives/digitalmars/D/announce/Revamp_of_CandyDOC_23131.html I have vibed installed and tried to use this candydoc. I try to follow instructions and attempt to get a bit

Re: Why are scope variables being deprecated?

2012-10-11 Thread Don Clugston
On 11/10/12 02:30, Piotr Szturmaj wrote: Jonathan M Davis wrote: On Thursday, October 11, 2012 01:24:40 Piotr Szturmaj wrote: Could you give me an example of preventing closure allocation? I think I knew one but I don't remember now... Any time that a delegate parameter is marked as scope, th

About demangling

2012-10-11 Thread Lubos Pintes
Hi, Can someone point me to some source with information about name demangling when compiling some D program and the famous linker error 42 appears? Thank

Re: How many std.concurrency receivers?

2012-10-11 Thread Russel Winder
On Thu, 2012-10-11 at 09:09 +0200, thedeemon wrote: > On Thursday, 11 October 2012 at 02:21:01 UTC, Charles Hixson > wrote: > > I haven't been able to get an idea of how many std.concurrency > > receivers is reasonable. > > Currently in std.concurrency each "receiver" lives in its own OS > thre

Re: How many std.concurrency receivers?

2012-10-11 Thread thedeemon
On Thursday, 11 October 2012 at 02:21:01 UTC, Charles Hixson wrote: I haven't been able to get an idea of how many std.concurrency receivers is reasonable. Currently in std.concurrency each "receiver" lives in its own OS thread, so they are very expensive, 4-10 is fine, 100 may be possible bu