Descent plugin for Eclipse editor

2010-12-23 Thread user
Hi The link to Descent plugin for Eclipse editor is not working: http://www.esperanto.org.ar/d/descent.ui.zip Did it move? Thanks in advance.

Re: dmd 1.066 and 2.051 release

2010-12-23 Thread Steven Schveighoffer
Walter Bright Wrote: This is another bug fix release. http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.066.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.051.zip I think it was overlooked on the changelog but red

Re: dmd 1.066 and 2.051 release

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 10:27 PM, Steven Schveighoffer wrote: Walter Bright Wrote: This is another bug fix release. http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.066.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.051.zip I think

Re: dmd 1.066 and 2.051 release

2010-12-23 Thread Walter Bright
Andrei Alexandrescu wrote: On 12/23/10 10:27 PM, Steven Schveighoffer wrote: Walter Bright Wrote: This is another bug fix release. http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.066.zip http://www.digitalmars.com/d/2.0/changelog.html

Re: dmd 1.066 and 2.051 release

2010-12-23 Thread bearophile
Andrei: Apologies for that. This is a major addition! Walter, I just updated the changelog, would you mind updating the website? Thanks, and many thanks to Steve who contributed the most complex container yet to std.container! I suggest to add a RedBlackTree example usage (a little program)

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Lutger Blijdestijn
I meant to link this, it includes all benchmarks and ranks gdc at 5th place and dmd at 8 (from 2008): http://shootout.alioth.debian.org/debian/benchmark.php?test=alllang=all

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Lutger Blijdestijn
Andreas Mayer wrote: Walter Bright Wrote: I notice you are using doubles in D. dmd currently uses the x87 to evaluate doubles, and on some processors the x87 is slow relative to using the XMM instructions. Also, dmd's back end doesn't align the doubles on 16 byte boundaries, which can also

Re: Why is D slower than LuaJIT?

2010-12-23 Thread bearophile
Andrei: I'm thinking what to do about iota, which has good features but exacts too much cost on tight loop performance. One solution would be to define iota to be the simple, forward range that I defined as Iota2 in my previous post. Then, we need a different name for the full-fledged iota

Re: What's the problem in opensourcing htod?

2010-12-23 Thread BLS
On 23/12/2010 05:34, Mariusz Gliwiński wrote: wig looks interesting. Again, it strips const so probably D1 (i just skipped D1, it wasn't interesting enough for me to switch from widely used languages so don't know it's feature-set) and it's using tango, but looks promising. SWIG 4 D uses

Re: Should Tuple!( T, name ) be implicitly castable to Tuple!T?

2010-12-23 Thread bearophile
Simen kjaeraas: 1: Tuple!(int, a) a; Tuple!int b; b = a; IMO, this is good and correct. A tuple without field names is to me a mere black box with data inside, and throwing some other data in there is ok. I agree. 2: Tuple!( int, a ) a; Tuple!int b; a = b; This, I am not so

How is the D programming language financed?

2010-12-23 Thread Thomas Mader
I would be interested in how the D programming language is financed as a project? As it seems the core projects at the moment are dmd, druntime and phobos. All of these are in a very active state with multiple contributors when judging the revision logs. I guess many of these contributors are

Re: rdmd and extern(C)

2010-12-23 Thread spir
On Thu, 23 Dec 2010 01:31:29 -0500 Nick Sabalausky a...@a.a wrote: Looks like a good enhancement for rdmd. That it doesn't fail successfully is a bug. May I suggest that rmdm prints out the command it sends to dmd (even when successful)? Not only it's educative but it should provide the

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Pelle Månsson
On 12/22/2010 11:04 PM, Andreas Mayer wrote: To see what performance advantage D would give me over using a scripting language, I made a small benchmark. It consists of this code: auto L = iota(0.0, 1000.0); auto L2 = map!a / 2(L); auto L3 = map!a + 2(L2); auto V =

Re: Why is D slower than LuaJIT?

2010-12-23 Thread spir
On Wed, 22 Dec 2010 20:16:45 -0600 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Thanks for posting the numbers. That's a long time, particularly considering that the two map instances don't do anything. So the bulk of the computation is: auto L = iota(0.0, 1000.0); auto V

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Simen kjaeraas
spir denis.s...@gmail.com wrote: There is a point I don't understand here: Iota is a range-struct template, with void popFront() { current += step; } So, how does the computation of an arbitrary element at a given index affect looping speed? For mappings (and any kind of

Re: Why is D slower than LuaJIT?

2010-12-23 Thread bearophile
Simen kjaeraas: With floating-point numbers, the above solution does not always work. The type is known at compile time, so you can split the algorithm in two with a static if, and do something else if it's an integral type. Bye, bearophile

Re: How is the D programming language financed?

2010-12-23 Thread Justin Johansson
On 23/12/10 22:06, Thomas Mader wrote: I would be interested in how the D programming language is financed as a project? As it seems the core projects at the moment are dmd, druntime and phobos. All of these are in a very active state with multiple contributors when judging the revision logs. I

Re: Why is D slower than LuaJIT?

2010-12-23 Thread spir
On Wed, 22 Dec 2010 22:14:34 -0600 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I then replaced iota's implementation with a simpler one that's a forward range. Then the performance became exactly the same as for the simple loop. After having watched Iota's very general

Re: Why is D slower than LuaJIT?

2010-12-23 Thread spir
On Wed, 22 Dec 2010 23:22:56 -0600 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I'm thinking what to do about iota, which has good features but exacts too much cost on tight loop performance. One solution would be to define iota to be the simple, forward range that I defined as

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Jonathan M Davis
On Thursday 23 December 2010 05:22:55 spir wrote: On Wed, 22 Dec 2010 23:22:56 -0600 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I'm thinking what to do about iota, which has good features but exacts too much cost on tight loop performance. One solution would be to define

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Simen kjaeraas
bearophile bearophileh...@lycos.com wrote: Simen kjaeraas: With floating-point numbers, the above solution does not always work. The type is known at compile time, so you can split the algorithm in two with a static if, and do something else if it's an integral type. Absolutely.

Re: Why is D slower than LuaJIT?

2010-12-23 Thread spir
On Thu, 23 Dec 2010 05:29:32 -0800 Jonathan M Davis jmdavisp...@gmx.com wrote: On Thursday 23 December 2010 05:22:55 spir wrote: On Wed, 22 Dec 2010 23:22:56 -0600 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I'm thinking what to do about iota, which has good features but

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Simen kjaeraas
spir denis.s...@gmail.com wrote: On Wed, 22 Dec 2010 23:22:56 -0600 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I'm thinking what to do about iota, which has good features but exacts too much cost on tight loop performance. One solution would be to define iota to be the simple,

Re: Why is D slower than LuaJIT?

2010-12-23 Thread spir
On Thu, 23 Dec 2010 14:40:13 +0100 Simen kjaeraas simen.kja...@gmail.com wrote: What kind of thingie does i..j actually construct as of now? Nothing. The syntax only works in foreach and opSlice. However, this works: final abstract class Intervals { struct Interval( T ) {

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/22/10 11:40 PM, Brad Roberts wrote: Since the timing code isn't here, I'm assuming you guys are doing the testing around the whole app. While that might be interesting, it's hiding an awfully large and important difference, application startup time. C has very little, D quite a bit more,

Re: rdmd and extern(C)

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 12:31 AM, Nick Sabalausky wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message news:iethab$2dj...@digitalmars.com... On 12/22/10 12:13 PM, spir wrote: Hello, Is it possible use rdmd (to automagically link against imported D modules), when also calling C funcs?

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 2:52 AM, bearophile wrote: Andrei: I'm thinking what to do about iota, which has good features but exacts too much cost on tight loop performance. One solution would be to define iota to be the simple, forward range that I defined as Iota2 in my previous post. Then, we need a

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/22/10 8:16 PM, Andrei Alexandrescu wrote: On 12/22/10 4:04 PM, Andreas Mayer wrote: To see what performance advantage D would give me over using a scripting language, I made a small benchmark. It consists of this code: auto L = iota(0.0, 1000.0); auto L2 = map!a / 2(L); auto L3 =

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 6:57 AM, bearophile wrote: Simen kjaeraas: With floating-point numbers, the above solution does not always work. The type is known at compile time, so you can split the algorithm in two with a static if, and do something else if it's an integral type. That's what the code

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 7:04 AM, spir wrote: On Wed, 22 Dec 2010 22:14:34 -0600 Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: I then replaced iota's implementation with a simpler one that's a forward range. Then the performance became exactly the same as for the simple loop. After having

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 6:22 AM, spir wrote: On Wed, 22 Dec 2010 20:16:45 -0600 Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: Thanks for posting the numbers. That's a long time, particularly considering that the two map instances don't do anything. So the bulk of the computation is: auto L =

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/22/10 4:04 PM, Andreas Mayer wrote: To see what performance advantage D would give me over using a scripting language, I made a small benchmark. It consists of this code: auto L = iota(0.0, 1000.0); auto L2 = map!a / 2(L); auto L3 = map!a + 2(L2); auto V = reduce!a +

Re: Is std.demangle usable?

2010-12-23 Thread kenji hara
I tested this issue. I think mangledName does not support nested function. I'll try to resolve it. Kenji Hara 2010/12/23 Andrej Mitrovic n...@none.none: import std.stdio; import std.demangle; import std.traits; void main() {    void test()    {    }    auto mystr = mangledName!(test);

Re: Is std.demangle usable?

2010-12-23 Thread Stanislav Blinov
23.12.2010 7:49, Andrej Mitrovic пишет: On 12/23/10, Sean Kellys...@invisibleduck.org wrote: Okay, I'm about to check in this change. With it, demangle works on the string you supplied provided it's prefixed with _D8 or D8. Simply having demangle4mainFAAyaZv4testMFZv isn't a complete symbol.

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Simen kjaeraas
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://www.dsource.org/projects/phobos/changeset/2231 BTW, shouldn't range constructors call .save for forward ranges? This one certainly doesn't. -- Simen

Re: What's the problem in opensourcing htod?

2010-12-23 Thread Andrej Mitrovic
I think you just need to pass a flag to SWIG when building it to get D2 support. I've done it a few days ago.. On 12/23/10, BLS windev...@hotmail.de wrote: On 23/12/2010 05:34, Mariusz Gliwiński wrote: wig looks interesting. Again, it strips const so probably D1 (i just skipped D1, it wasn't

Re: Is std.demangle usable?

2010-12-23 Thread Andrej Mitrovic
On 12/23/10, Stanislav Blinov bli...@loniir.ru wrote: Do you mean it works with _D3 even for mangled name starting with demangle? It shouldn't. 3 is a character count of the following name. No, I meant without demangle, so that's fine. I beleive the hex part at the end is a hash that is used

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 10:09 AM, Simen kjaeraas wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I decided to check in the map cache removal. We discussed it a fair amount among Phobos devs. I have no doubts caching might help in certain cases, but it does lead to surprising performance

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 10:14 AM, Simen kjaeraas wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://www.dsource.org/projects/phobos/changeset/2231 BTW, shouldn't range constructors call .save for forward ranges? This one certainly doesn't. Currently higher-order ranges assume that

Re: rdmd and extern(C)

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 5:23 AM, spir wrote: On Thu, 23 Dec 2010 01:31:29 -0500 Nick Sabalauskya...@a.a wrote: Looks like a good enhancement for rdmd. That it doesn't fail successfully is a bug. May I suggest that rmdm prints out the command it sends to dmd (even when successful)? Not only it's

Re: How is the D programming language financed?

2010-12-23 Thread Thomas Mader
Am 2010-12-23 13:57, schrieb Justin Johansson: On 23/12/10 22:06, Thomas Mader wrote: I would be interested in how the D programming language is financed as a project? As it seems the core projects at the moment are dmd, druntime and phobos. All of these are in a very active state with multiple

Re: Is std.demangle usable?

2010-12-23 Thread kenji hara
Sorry, current dmd does't provide the mangled name from function symbol. see http://d.puremagic.com/issues/show_bug.cgi?id=2774 2010/12/24 kenji hara k.hara...@gmail.com: I tested this issue. I think mangledName does not support nested function. I'll try to resolve it. Kenji Hara

Re: Is std.demangle usable?

2010-12-23 Thread Andrej Mitrovic
Okay, thanks for letting me know! On 12/23/10, kenji hara k.hara...@gmail.com wrote: Sorry, current dmd does't provide the mangled name from function symbol. see http://d.puremagic.com/issues/show_bug.cgi?id=2774 2010/12/24 kenji hara k.hara...@gmail.com: I tested this issue. I think

Re: rdmd and extern(C)

2010-12-23 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:ievlbg$el...@digitalmars.com... On 12/23/10 12:31 AM, Nick Sabalausky wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message news:iethab$2dj...@digitalmars.com... On 12/22/10 12:13 PM, spir wrote:

Re: rdmd and extern(C)

2010-12-23 Thread Nick Sabalausky
Nick Sabalausky a...@a.a wrote in message news:if04me$1vp...@digitalmars.com... Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:ievlbg$el...@digitalmars.com... On 12/23/10 12:31 AM, Nick Sabalausky wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in

Re: How is the D programming language financed?

2010-12-23 Thread Eric Poggel
On 12/23/2010 7:57 AM, Justin Johansson wrote: On 23/12/10 22:06, Thomas Mader wrote: I would be interested in how the D programming language is financed as a project? As it seems the core projects at the moment are dmd, druntime and phobos. All of these are in a very active state with multiple

Re: How is the D programming language financed?

2010-12-23 Thread spir
On Thu, 23 Dec 2010 17:41:06 +0100 Thomas Mader thomas.ma...@gmail.com wrote: I think it's very important for D to step into the corporate world to get more stability, a bigger community and therefore a stronger toolchain. For this to happen companies need trust in the future of the project

Re: How is the D programming language financed?

2010-12-23 Thread Thomas Mader
Am 2010-12-23 21:01, schrieb spir: On Thu, 23 Dec 2010 17:41:06 +0100 Thomas Maderthomas.ma...@gmail.com wrote: I think it's very important for D to step into the corporate world to get more stability, a bigger community and therefore a stronger toolchain. For this to happen companies need

Re: How is the D programming language financed?

2010-12-23 Thread Jonathan M Davis
On Thursday 23 December 2010 12:43:11 Thomas Mader wrote: Am 2010-12-23 21:01, schrieb spir: On Thu, 23 Dec 2010 17:41:06 +0100 Thomas Maderthomas.ma...@gmail.com wrote: I think it's very important for D to step into the corporate world to get more stability, a bigger community and

Re: How is the D programming language financed?

2010-12-23 Thread Steven Schveighoffer
On Thu, 23 Dec 2010 15:43:11 -0500, Thomas Mader thomas.ma...@gmail.com wrote: Am 2010-12-23 21:01, schrieb spir: On Thu, 23 Dec 2010 17:41:06 +0100 Thomas Maderthomas.ma...@gmail.com wrote: I think it's very important for D to step into the corporate world to get more stability, a bigger

Re: How is the D programming language financed?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 3:21 PM, Steven Schveighoffer wrote: On Thu, 23 Dec 2010 15:43:11 -0500, Thomas Mader thomas.ma...@gmail.com wrote: Am 2010-12-23 21:01, schrieb spir: On Thu, 23 Dec 2010 17:41:06 +0100 Thomas Maderthomas.ma...@gmail.com wrote: I think it's very important for D to step into the

Re: How is the D programming language financed?

2010-12-23 Thread Adam D. Ruppe
Andrei Alexandrescu wrote: I think the bread and butter support is as rock solid in both languages. I agree. For my day to day work, I'm pretty conservative in the use of the language; 90% of my code is probably best characterized as a better C. Interestingly though, I use a template of some

Re: How is the D programming language financed?

2010-12-23 Thread Caligo
You got me excited, so I decided to give GDC another try. I cloned the repo, and using GCC 4.4.5, it compiled without errors. I started following the examples in TDPL, but the Stat program on page 22 gives the following errors: t1.d:33: Error: void has no value t1.d:33: Error: incompatible types

Re: How is the D programming language financed?

2010-12-23 Thread Iain Buclaw
== Quote from Caligo (iteronve...@gmail.com)'s article --001636e0a9cc00219904981c2ad9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You got me excited, so I decided to give GDC another try. I cloned the repo, and using GCC 4.4.5, it compiled without

Re: How is the D programming language financed?

2010-12-23 Thread Iain Buclaw
== Quote from Iain Buclaw (ibuc...@ubuntu.com)'s article == Quote from Caligo (iteronve...@gmail.com)'s article --001636e0a9cc00219904981c2ad9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You got me excited, so I decided to give GDC another try. I

Re: How is the D programming language financed?

2010-12-23 Thread Andrej Mitrovic
On 12/24/10, Caligo iteronve...@gmail.com wrote: You got me excited, so I decided to give GDC another try. I cloned the repo, and using GCC 4.4.5, it compiled without errors. I started following the examples in TDPL, but the Stat program on page 22 gives the following errors: t1.d:33:

Re: How is the D programming language financed?

2010-12-23 Thread Andrej Mitrovic
On 12/24/10, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Use stdin.readf: And don't forget to catch those exceptions! import std.exception, std.stdio, std.conv; void main(string[] args) { try { for (double x; stdin.readf( %s , x) == 1;) { writeln(x);

Re: How is the D programming language financed?

2010-12-23 Thread Caligo
On Thu, Dec 23, 2010 at 5:38 PM, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 12/24/10, Caligo iteronve...@gmail.com wrote: You got me excited, so I decided to give GDC another try. I cloned the repo, and using GCC 4.4.5, it compiled without errors. I started following the

Re: How is the D programming language financed?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 5:50 PM, Caligo wrote: On Thu, Dec 23, 2010 at 5:38 PM, Andrej Mitrovic andrej.mitrov...@gmail.com mailto:andrej.mitrov...@gmail.com wrote: On 12/24/10, Caligo iteronve...@gmail.com mailto:iteronve...@gmail.com wrote: You got me excited, so I decided to give GDC

Re: How is the D programming language financed?

2010-12-23 Thread Caligo
I hope I didn't miss anything; I copied it from the book. import std.stdio, std.exception; interface Stat{ void accumulate(double x); void postprocess(); double result(); } class Min : Stat{ private double min = double.max; void accumulate(double x){ if( x min ){

Re: How is the D programming language financed?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 6:11 PM, Caligo wrote: I hope I didn't miss anything; I copied it from the book. Looking good, I reproduced the exception as a miscommunication between readf and parse. Give me a little time to look into this. Andrei

Re: How is the D programming language financed?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 6:11 PM, Caligo wrote: I hope I didn't miss anything; I copied it from the book. [snip] http://www.dsource.org/projects/phobos/changeset/2233 Don't forget to call your program stats.d or put a module stats declaration at its top. Andrei

Re: How is the D programming language financed?

2010-12-23 Thread Andrej Mitrovic
On 12/24/10, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Don't forget to call your program stats.d or put a module stats declaration at its top. Andrei Hardcoding module names in our code?! I beg to differ, sir! module testmodule; import std.string : split; import std.stdio :

Re: How is the D programming language financed?

2010-12-23 Thread Caligo
Thanks, Andrei. You're the best. On Thu, Dec 23, 2010 at 9:14 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 12/23/10 6:11 PM, Caligo wrote: I hope I didn't miss anything; I copied it from the book. [snip] http://www.dsource.org/projects/phobos/changeset/2233 Don't

Re: How is the D programming language financed?

2010-12-23 Thread Andrei Alexandrescu
On 12/23/10 9:35 PM, Andrej Mitrovic wrote: module testmodule; import std.string : split; import std.stdio : writeln; string modulename = split(.stringof)[1]; void main() { writeln(modulename); } What the... I didn't know you can do that. Thanks for the tip! Andrei

Re: How is the D programming language financed?

2010-12-23 Thread Caligo
I don't get it. How is it able to get the name of the module like that? On Thu, Dec 23, 2010 at 9:35 PM, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 12/24/10, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Don't forget to call your program stats.d or put a module stats

assocArray.remove() gives strange error

2010-12-23 Thread Mariusz Gliwiński
When i compile: codetype[key2][key1] assocArray1; assocArray1[key1].remove(key2);/code everything is ok, but building codetype[key2][key1] assocArray1; return (assocArray1[key1].remove(key2));/code gives codedmd: expression.c:817: void expToCBuffer(OutBuffer*, HdrGenState*, Expression*, PREC):

Re: Why is D slower than LuaJIT?

2010-12-23 Thread Jimmy Cao
I hope that in the future more implementations in D can be compared for performance against their equivalent Lua translations. It seems that LuaJIT is a super speedy dynamic language, and it is specifically designed to break into the performance ranges of optimized static languages, which makes it

Re: How is the D programming language financed?

2010-12-23 Thread Daniel Gibson
Am 23.12.2010 23:18, schrieb Andrei Alexandrescu: I wonder how stable D2 is when used as a better D1, i.e. making conservative use of new features. I think the bread and butter support is as rock solid in both languages. Depends on what parts of Phobos you use, I guess. For example the

Re: What's the problem in opensourcing htod?

2010-12-23 Thread Jimmy Cao
On Thu, Dec 23, 2010 at 10:29 AM, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I think you just need to pass a flag to SWIG when building it to get D2 support. I've done it a few days ago.. On 12/23/10, BLS windev...@hotmail.de wrote: On 23/12/2010 05:34, Mariusz Gliwiński wrote:

Array of closures assign

2010-12-23 Thread bearophile
This D2 program compiles with no errors: void delegate()[1] foo; void main() { int n; foo[0] = { n++; }; } But this one: void delegate()[1] foo; void main() { int n; foo[] = [{ n++; }]; } test.d(4): Error: cannot implicitly convert expression ([delegate void() { n++; }

Re: Strange socket error

2010-12-23 Thread Bob Cowdery
Hi Heywood Thankyou for your time. Yes I agree making the call blocking does stop the exceptions churning. Unfortunately the application stops accepting data now because after the first incoming transfer from the web socket client it sees data on the listening socket and promptly blocks on it and

Re: double - double[]... | feature or bug?

2010-12-23 Thread spir
On Thu, 23 Dec 2010 00:34:41 -0600 Christopher Nicholson-Sauls ibisbase...@gmail.com wrote: On 12/22/10 15:06, Andrej Mitrovic wrote: Oooh. That cought me off guard, sorry. Thanks Steve. I'll concede that the syntax can be odd at first, but it also enables some interesting things.

Re: double - double[]... | feature or bug?

2010-12-23 Thread bearophile
spir: While I understand some may consider this a nice feature, for me this is an enormous bug. A great way toward code obfuscation. I like D among other reasons because it's rather clear compared to other languages of the family. The main problem here is that I have never felt the need of

import from subdir

2010-12-23 Thread spir
Hello, Say I have a project with the following tree structure: [app] app.d util.d [test] test.d [data] data.d Is there a way to import util data from test? Denis -- -- -- -- -- -- -- vit esse estrany ☣ spir.wikidot.com

Re: import from subdir

2010-12-23 Thread Jonathan M Davis
On Thursday 23 December 2010 04:38:56 spir wrote: Hello, Say I have a project with the following tree structure: [app] app.d util.d [test] test.d [data] data.d Is there a way to import util data from test? Use the -I flag when

Re: is this the expected output

2010-12-23 Thread Dmitry Olshansky
On 23.12.2010 3:40, g g wrote: Thanks for the answers what I did is this ( i feel that it is quite clumsy): Node* x = cast(Node*) (GC.malloc(Node.sizeof)); *x = xa; x.up = curnode; ... which could be improved: Node* x = new Node(...);//paste your constructor

Re: import from subdir

2010-12-23 Thread spir
On Thu, 23 Dec 2010 05:26:57 -0800 Jonathan M Davis jmdavisp...@gmx.com wrote: On Thursday 23 December 2010 04:38:56 spir wrote: Hello, Say I have a project with the following tree structure: [app] app.d util.d [test] test.d [data]

DMD2 out parameters

2010-12-23 Thread Pete
Hi, I'm not sure if this is already a widely known phenomenon but I ran across a little gotcha yesterday regarding floating point out parameters using DMD2. A year or so ago I wrote a ray tracer using DMD1. A few months ago I tried compiling and running it using DMD2. It was 50% slower. This

Re: DMD2 out parameters

2010-12-23 Thread Pete
//If you initialise f to 0 before calling func then it all works quickly again Actually I think this is a red herring. I don't think initialising f helps

Re: double - double[]... | feature or bug?

2010-12-23 Thread Andrej Mitrovic
On 12/23/10, bearophile bearophileh...@lycos.com wrote: spir: While I understand some may consider this a nice feature, for me this is an enormous bug. A great way toward code obfuscation. I like D among other reasons because it's rather clear compared to other languages of the family. The

Re: Strange socket error

2010-12-23 Thread Heywood Floyd
Hi! I see. I think my previous answer was a bit naive—I didn't appreciate the full scope of the problem. Sorry for that, but you know, internet is fast, snap snap : ) Ok, for now I'm afraid I don't have any more to add. (An isolated example would of course help greatly!) All I can say is,

Re: double - double[]... | feature or bug?

2010-12-23 Thread Don
bearophile wrote: spir: While I understand some may consider this a nice feature, for me this is an enormous bug. A great way toward code obfuscation. I like D among other reasons because it's rather clear compared to other languages of the family. The main problem here is that I have

Do we already have full compile time / runtime separation?

2010-12-23 Thread Mariusz Gliwiński
Hello, I've been trying to manage this on my own for like 2 days but still couldn't do that, and because my brain just suddenly turned-off, I would ask You for some guidance. The thing is: I'd like to make some kind of messaging in my application. So, there is - interface Msg - classes that

Re: double - double[]... | feature or bug?

2010-12-23 Thread Steven Schveighoffer
On Thu, 23 Dec 2010 12:34:45 -0500, Don nos...@nospam.com wrote: bearophile wrote: spir: While I understand some may consider this a nice feature, for me this is an enormous bug. A great way toward code obfuscation. I like D among other reasons because it's rather clear compared to other

Vim: Anyone using taglist.vim with D?

2010-12-23 Thread Andrej Mitrovic
I know there's a few people here that use Vim, so has anyone succesfully used the taglist.vim plugin with D? Ctags work for me (on XP), but I can't get taglist to work with D. It does work with C/CPP files, but it seems to ignore D files. I'm asking before I try to modify the plugin, because

Re: DMD2 out parameters

2010-12-23 Thread Don
Pete wrote: Ok, i've done some more investigating and it appears that in DMD2 a float NaN is 0x7FE0 (in dword format) but when it initialises a float 'out' parameter it initialises it with 0x7FA0H. This causes an FPU trap which is where the time is going. This looks like a bug to me. Can

Re: DMD2 out parameters

2010-12-23 Thread Johann MacDonagh
On 12/23/2010 12:19 PM, Pete wrote: Ok, i've done some more investigating and it appears that in DMD2 a float NaN is 0x7FE0 (in dword format) but when it initialises a float 'out' parameter it initialises it with 0x7FA0H. This causes an FPU trap which is where the time is going. This

Re: import from subdir

2010-12-23 Thread CrypticMetaphor
On 12/23/2010 1:38 PM, spir wrote: Is there a way to import util data from test? I think this should work: util.d first line: module util; data.d first line module data.data; test.d first lines module test.test; import util; import data.data;

Re: Undefined references when linking to C library

2010-12-23 Thread Peter Federighi
Jonathan M Davis wrote: Did you wrap the C declarations in an extern(C) block? Without that, it's going to think that your variables are D variables not C variables. The same goes for any functions - _especially_ for the functions. In fact, a large portion of - in not all of - your gpm.d

Re: Memory allocation faile on string concat

2010-12-23 Thread Steven Schveighoffer
On Thu, 11 Nov 2010 07:42:36 -0500, Steven Schveighoffer schvei...@yahoo.com wrote: On Wed, 10 Nov 2010 23:33:58 -0500, Xie xiema...@gmail.com wrote: OK, this actually makes sense to me. It's a manifestation of this issue: http://d.puremagic.com/issues/show_bug.cgi?id=3929 I'm think -

Re: Do we already have full compile time / runtime separation?

2010-12-23 Thread Jonathan M Davis
On Thursday 23 December 2010 01:11:40 Mariusz Gliwiński wrote: Hello, I've been trying to manage this on my own for like 2 days but still couldn't do that, and because my brain just suddenly turned-off, I would ask You for some guidance. The thing is: I'd like to make some kind of

Re: import from subdir

2010-12-23 Thread Jonathan M Davis
On Thursday 23 December 2010 11:30:40 CrypticMetaphor wrote: On 12/23/2010 1:38 PM, spir wrote: Is there a way to import util data from test? I think this should work: util.d first line: module util; data.d first line module data.data; test.d first lines module

Re: Vim: Anyone using taglist.vim with D?

2010-12-23 Thread Andrej Mitrovic
Got it working! I just needed to create an extra variable for taglists. I'm using this: let tlist_d_settings='d;c:classes;d:macro definitions;e:enumerators (values inside an enumeration);f:function definitions;g:enumeration names;l:local variables [off];m:class, struct, and union

Re: Undefined references when linking to C library

2010-12-23 Thread Jonathan M Davis
On Thursday 23 December 2010 11:38:28 Peter Federighi wrote: Jonathan M Davis wrote: Did you wrap the C declarations in an extern(C) block? Without that, it's going to think that your variables are D variables not C variables. The same goes for any functions - _especially_ for the

Re: Undefined references when linking to C library

2010-12-23 Thread Jérôme M. Berger
Peter Federighi wrote: Jonathan M Davis wrote: Did you wrap the C declarations in an extern(C) block? Without that, it's going to think that your variables are D variables not C variables. The same goes for any functions - _especially_ for the functions. In fact, a large portion of - in

Re: [D1] type of type

2010-12-23 Thread %u
Should have been this: void func(type t){ new t(); }

Re: DMD2 out parameters

2010-12-23 Thread Pete
I noticed this on an Intel Core 2. I skipped the pentium 4 generation :)

Re: Undefined references when linking to C library

2010-12-23 Thread wrzosk
On 23.12.2010 20:38, Peter Federighi wrote: Jonathan M Davis wrote: Did you wrap the C declarations in an extern(C) block? Without that, it's going to think that your variables are D variables not C variables. The same goes for any functions - _especially_ for the functions. In fact, a large

Re: Undefined references when linking to C library

2010-12-23 Thread Peter Federighi
wrzosk wrote: I've had simmilar issue a few days ago. The problem is that global values from C should be marked shared in D extern int val; - extern (C) shared int val; or maybe __gshared. Both makes linking stage finishes with success. Jerome M. Berger wrote: I think gpm_zerobased,

  1   2   >