Re: D for the Win

2014-08-24 Thread Iain Buclaw via Digitalmars-d-announce
On 24 Aug 2014 16:26, "ketmar via Digitalmars-d-announce" < digitalmars-d-announce@puremagic.com> wrote: > > On Sun, 24 Aug 2014 16:16:43 +0100 > Iain Buclaw via Digitalmars-d-announce > wrote: > > > That's because floor isn't an intrinsic. The crippling speed issue > > was the fact that floor co

Re: D for the Win

2014-08-24 Thread ketmar via Digitalmars-d-announce
On Sun, 24 Aug 2014 16:16:43 +0100 Iain Buclaw via Digitalmars-d-announce wrote: > That's because floor isn't an intrinsic. The crippling speed issue > was the fact that floor computed and returned at real precision. i'm testing on x86, and the difference between 'call floorf' and inlining is si

Re: D for the Win

2014-08-24 Thread Iain Buclaw via Digitalmars-d-announce
On 24 Aug 2014 14:09, "ketmar via Digitalmars-d-announce" < digitalmars-d-announce@puremagic.com> wrote: > > On Sun, 24 Aug 2014 12:51:10 + > Mike via Digitalmars-d-announce > wrote: > > > 5. Using C's floor instead of D's floor. - very significant (why?) > gcc/clang inlines floorf(). > > gdc

Re: D for the Win

2014-08-24 Thread Mike via Digitalmars-d-announce
On Sunday, 24 August 2014 at 14:09:03 UTC, Mike wrote: I'm guessing the dependency is probably due to our configure/build of GDC. I'm using Arch Linux 64's default GDC from their repository. Perhaps it's configured in a way that has these optimizations on by default. It probably should.

Re: D for the Win

2014-08-24 Thread ketmar via Digitalmars-d-announce
On Sun, 24 Aug 2014 14:09:02 + Mike via Digitalmars-d-announce wrote: > 64's default GDC i think that 64-bit gcc/gdc turns sse optimisations on anyway, 'cause there is no x86_64-capable CPUs without sse. and i'm on x86 arch. signature.asc Description: PGP signature

Re: D for the Win

2014-08-24 Thread Mike via Digitalmars-d-announce
On Sunday, 24 August 2014 at 14:04:22 UTC, ketmar via Digitalmars-d-announce wrote: On Sun, 24 Aug 2014 13:44:07 + Mike via Digitalmars-d-announce wrote: p.s. what i did is this: auto tm = Timer(); tm.start; foreach (; 0..100) { auto n2d = Noise2DContext(0); foreach (i; 0..

Re: D for the Win

2014-08-24 Thread ketmar via Digitalmars-d-announce
On Sun, 24 Aug 2014 13:44:07 + Mike via Digitalmars-d-announce wrote: p.s. what i did is this: auto tm = Timer(); tm.start; foreach (; 0..100) { auto n2d = Noise2DContext(0); foreach (i; 0..100) { foreach (y; 0..256) { foreach (x; 0..256) { auto v = n2d.

Re: D for the Win

2014-08-24 Thread ketmar via Digitalmars-d-announce
On Sun, 24 Aug 2014 13:44:07 + Mike via Digitalmars-d-announce wrote: hm. for my "GDC 4.9.1. git HEAD" #6 has no effect at all. p.s. it's unfair to specify "-msse3 -mfpmath=sse" for gcc and not for gdc. gdc can use this flags too! (yeah, the effect is great: sse3 variant is ~2.5 times faster

Re: D for the Win

2014-08-24 Thread bearophile via Digitalmars-d-announce
Mike: Then I add change only #6 above, and remove the excessive function attributes, Maybe I'll make a pull request for it. I don't think users should have to decorate their code like a Christmas tree I don't agree, function attributes are not excessive, they are idiomatic in D. Bye, be

Re: D for the Win

2014-08-24 Thread Mike via Digitalmars-d-announce
On Sunday, 24 August 2014 at 13:13:58 UTC, ketmar via Digitalmars-d-announce wrote: On Sun, 24 Aug 2014 12:51:10 + Mike via Digitalmars-d-announce wrote: ps. 6. This change (https://github.com/nsf/pnoise/commit/baadfe20c7ae6aa900cb0e4188aa9d20bea95918) with GDC has no effect at all.

Re: D for the Win

2014-08-24 Thread ketmar via Digitalmars-d-announce
On Sun, 24 Aug 2014 12:51:10 + Mike via Digitalmars-d-announce wrote: ps. > 6. This change > (https://github.com/nsf/pnoise/commit/baadfe20c7ae6aa900cb0e4188aa9d20bea95918) > with GDC has no effect at all. signature.asc Description: PGP signature

Re: D for the Win

2014-08-24 Thread ketmar via Digitalmars-d-announce
On Sun, 24 Aug 2014 12:51:10 + Mike via Digitalmars-d-announce wrote: > 5. Using C's floor instead of D's floor. - very significant (why?) gcc/clang inlines floorf(). gdc generates calls to floor() in both cases, C floor() is just faster. i.e. gdc fails to see that floor() can be converted t

Re: D for the Win

2014-08-24 Thread Mike via Digitalmars-d-announce
On Sunday, 24 August 2014 at 09:24:55 UTC, Jacob Carlborg wrote: On 2014-08-24 10:53, bearophile wrote: Dicebot: In reddit thread one of commenters complained about D performance and linked this benchmark : That benchmark found a small performance bug in ldc2, that I reported, but I think

Re: D for the Win

2014-08-24 Thread Kagamin via Digitalmars-d-announce
On Sunday, 24 August 2014 at 09:24:55 UTC, Jacob Carlborg wrote: The numbers in the benchmark has just been updated. DMD is behind C. GDC is the fastest of all and LDC is ahead of Clang but behind GCC. Seems pretty good to me. D and C versions use different random number generators.

Re: D for the Win

2014-08-24 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-08-24 10:53, bearophile wrote: Dicebot: In reddit thread one of commenters complained about D performance and linked this benchmark : That benchmark found a small performance bug in ldc2, that I reported, but I think it's not yet fixed. The numbers in the benchmark has just been upd

Re: D for the Win

2014-08-24 Thread bearophile via Digitalmars-d-announce
Dicebot: In reddit thread one of commenters complained about D performance and linked this benchmark : That benchmark found a small performance bug in ldc2, that I reported, but I think it's not yet fixed. Rust has fixed a different smaller performance bug uncovered by that benchmark. By

Re: D for the Win

2014-08-23 Thread Mike via Digitalmars-d-announce
On Sunday, 24 August 2014 at 02:19:18 UTC, Dicebot wrote: On Saturday, 23 August 2014 at 16:28:33 UTC, Adam D. Ruppe wrote: Author posted part 2 http://tomerfiliba.com/blog/dlang-part2/ In reddit thread one of commenters complained about D performance and linked this benchmark : https://gith

Re: D for the Win

2014-08-23 Thread Dicebot via Digitalmars-d-announce
On Saturday, 23 August 2014 at 16:28:33 UTC, Adam D. Ruppe wrote: Author posted part 2 http://tomerfiliba.com/blog/dlang-part2/ In reddit thread one of commenters complained about D performance and linked this benchmark : https://github.com/nsf/pnoise I tried running it and don't see anythin

Re: D for the Win

2014-08-23 Thread Andrej Mitrovic via Digitalmars-d-announce
On 8/23/14, Adam D. Ruppe via Digitalmars-d-announce wrote: > Author posted part 2 http://tomerfiliba.com/blog/dlang-part2/ If I read that right it seems they're using D in his startup? Pretty cool. A bit of googling reveals the company's name is "Weka.IO".

Re: D for the Win

2014-08-23 Thread Adam D. Ruppe via Digitalmars-d-announce
Author posted part 2 http://tomerfiliba.com/blog/dlang-part2/

Re: D for the Win

2014-08-22 Thread deadalnix via Digitalmars-d-announce
On Thursday, 21 August 2014 at 12:08:06 UTC, Dicebot wrote: On Thursday, 21 August 2014 at 12:05:40 UTC, ketmar via Digitalmars-d-announce wrote: ... Please, this is not important enough to argue here. And fairly common. The French one propose to use foreigner's blood to water the fields.

Re: D for the Win

2014-08-21 Thread Walter Bright via Digitalmars-d-announce
On 8/20/2014 3:02 PM, anonymous wrote: [...] I agree with Dicebot. Let's not go there.

Re: D for the Win

2014-08-21 Thread Gary Willoughby via Digitalmars-d-announce
http://en.wikipedia.org/wiki/Godwin's_law

Re: D for the Win

2014-08-21 Thread anonymous via Digitalmars-d-announce
On Thursday, 21 August 2014 at 12:05:40 UTC, ketmar via Digitalmars-d-announce wrote: On Thu, 21 Aug 2014 11:48:32 + anonymous via Digitalmars-d-announce wrote: It's pretty much the Nazi anthem. oh, really? Yes, really. let's see. current German anthem: [...] and so on. pretty inn

Re: D for the Win

2014-08-21 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 12:08:05 + Dicebot via Digitalmars-d-announce wrote: > Please, this is not important enough to argue here. ah, excuse me. it's so easy to drag me into such talks... mea culpa. signature.asc Description: PGP signature

Re: D for the Win

2014-08-21 Thread Dicebot via Digitalmars-d-announce
On Thursday, 21 August 2014 at 12:05:40 UTC, ketmar via Digitalmars-d-announce wrote: ... Please, this is not important enough to argue here.

Re: D for the Win

2014-08-21 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 11:48:32 + anonymous via Digitalmars-d-announce wrote: > It's pretty much the Nazi anthem. oh, really? let's see. current German anthem: Einigkeit und Recht und Freiheit für das deutsche Vaterland! Danach lasst uns alle streben brüderlich mit Herz und Hand! and so on. pr

Re: D for the Win

2014-08-21 Thread anonymous via Digitalmars-d-announce
On Wednesday, 20 August 2014 at 22:57:21 UTC, Paulo Pinto wrote: As a Portuguese living in Germany, I would say not everyone knows that outside Germany. Certainly. As I said, from an Israeli it's probably benign. I guess if aynthing, it's meant to be jokingly provoking towards Germans. I don't

Re: D for the Win

2014-08-21 Thread anonymous via Digitalmars-d-announce
On Thursday, 21 August 2014 at 01:51:11 UTC, ketmar via Digitalmars-d-announce wrote: i always wonder how good people at finding various offences I'm not offended. and fascims everywhere. It's pretty much the Nazi anthem. It doesn't get much more fascist than that. Of course, someone can pl

Re: D for the Win

2014-08-21 Thread Ola Fosheim Gr via Digitalmars-d-announce
On Thursday, 21 August 2014 at 08:47:50 UTC, Jacob Carlborg wrote: Isn't that multiple arguments to opIndex? Probably, I was just trying to be funny :P There should be a tutorial "D for perl programmers of the 90s"...

Re: D for the Win

2014-08-21 Thread Rory McGuire via Digitalmars-d-announce
On Thu, Aug 21, 2014 at 10:47 AM, Jacob Carlborg via Digitalmars-d-announce wrote: > On 21/08/14 10:37, Ola Fosheim Gr wrote:Isn't that multiple arguments to > opIndex? > > -- > /Jacob Carlborg > mm, yes I believe you are right. http://dlang.org/operatoroverloading.html#ArrayOps

Re: D for the Win

2014-08-21 Thread Rory McGuire via Digitalmars-d-announce
What is really awesome about this is that his code actually worked, the mixing of operator overloads, opDispatch and rarely used features(e.g. comma op). D has come a long way in the last decade. On Thu, Aug 21, 2014 at 10:40 AM, ketmar via Digitalmars-d-announce < digitalmars-d-announce@puremag

Re: D for the Win

2014-08-21 Thread Jacob Carlborg via Digitalmars-d-announce
On 21/08/14 10:37, Ola Fosheim Gr wrote: Now the comma-operator has to stay because removing it is a severe breaking change. Isn't that multiple arguments to opIndex? -- /Jacob Carlborg

Re: D for the Win

2014-08-21 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 08:37:30 + Ola Fosheim Gr via Digitalmars-d-announce wrote: > Now the comma-operator has to stay because removing it is a > severe breaking change. but we can abuse opIndex and/or opSlice too! ;-) signature.asc Description: PGP signature

Re: D for the Win

2014-08-21 Thread Ola Fosheim Gr via Digitalmars-d-announce
On Thursday, 21 August 2014 at 08:31:49 UTC, Nick Sabalausky wrote: link[$.rel = "foobar", $.type = "text/css"]; That's a lot of syntax abuse there! Still, if it works for him, great, who am I to complain? At the end of the day, it's just a tool. Now the comma-operator has to stay because

Re: D for the Win

2014-08-21 Thread Nick Sabalausky via Digitalmars-d-announce
On 8/20/2014 6:57 PM, Paulo Pinto wrote: Am 21.08.2014 00:02, schrieb anonymous: No, no, "Dlang Dlang Über Alles" is a take on "Deutschland Deutschland über alles" (Germany Germany over everything), the first verse of the national anthem as sung in Nazi times. I was actually worried if the aut

Re: D for the Win

2014-08-21 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 04:31:31 -0400 Nick Sabalausky via Digitalmars-d-announce wrote: > Yea, this *statement* really made me go o_O > > link[$.rel = "foobar", $.type = "text/css"]; > > That's a lot of syntax abuse there! but it's fun! we all used to think that "$ should mean 'length'" and he

Re: D for the Win

2014-08-21 Thread Nick Sabalausky via Digitalmars-d-announce
On 8/20/2014 5:39 PM, Peter Alexander wrote: Ha, that opDollar thing in the HTML generator is the nastiest D hack I've seen :-P Yea, this *statement* really made me go o_O link[$.rel = "foobar", $.type = "text/css"]; That's a lot of syntax abuse there! Still, if it works for him, great, w

Re: D for the Win

2014-08-20 Thread eles via Digitalmars-d-announce
On Wednesday, 20 August 2014 at 22:02:31 UTC, anonymous wrote: On Wednesday, 20 August 2014 at 21:43:26 UTC, Walter Bright wrote: On 8/20/2014 2:33 PM, anonymous wrote: Dlang Dlang Über Alles as a German, O_O I'm not surprised that the German programming community has taken to D. After all

Re: D for the Win

2014-08-20 Thread eles via Digitalmars-d-announce
On Wednesday, 20 August 2014 at 21:43:26 UTC, Walter Bright wrote: On 8/20/2014 2:33 PM, anonymous wrote: Dlang Dlang Über Alles as a German, O_O I'm not surprised that the German programming community has taken to D. After all, German cars all have those "D" stickers on them :-) French

Re: D for the Win

2014-08-20 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 00:57:27 +0200 Paulo Pinto via Digitalmars-d-announce wrote: > Specially the younger generations, they just use it because it sounds > cool. and fun. they don't fear that old dead dog anymore, they making fun of it. signature.asc Description: PGP signature

Re: D for the Win

2014-08-20 Thread ketmar via Digitalmars-d-announce
On Wed, 20 Aug 2014 22:02:31 + anonymous via Digitalmars-d-announce wrote: > From a German author that would be an embracement of fascism. i always wonder how good people at finding various offences and fascims everywhere. i bet that such people are glad to censor Hašek's "The Good Soldier Š

Re: D for the Win

2014-08-20 Thread Paulo Pinto via Digitalmars-d-announce
Am 21.08.2014 00:02, schrieb anonymous: On Wednesday, 20 August 2014 at 21:43:26 UTC, Walter Bright wrote: On 8/20/2014 2:33 PM, anonymous wrote: Dlang Dlang Über Alles as a German, O_O I'm not surprised that the German programming community has taken to D. After all, German cars all have t

Re: D for the Win

2014-08-20 Thread anonymous via Digitalmars-d-announce
On Wednesday, 20 August 2014 at 21:43:26 UTC, Walter Bright wrote: On 8/20/2014 2:33 PM, anonymous wrote: Dlang Dlang Über Alles as a German, O_O I'm not surprised that the German programming community has taken to D. After all, German cars all have those "D" stickers on them :-) No, no,

Re: D for the Win

2014-08-20 Thread bearophile via Digitalmars-d-announce
Andrei: http://tomerfiliba.com/blog/dlang/ struct PascalString { Field!ubyte length; Also see if UDAs plus compile-time introspection is helpful. auto stream = cast(ubyte[])"\x05hello".dup; Perhaps this is enough, and avoids one allocation: immutable stream = "\x05hello".re

Re: D for the Win

2014-08-20 Thread Walter Bright via Digitalmars-d-announce
On 8/20/2014 2:21 PM, Andrei wrote: stumbled on this blog post: http://tomerfiliba.com/blog/dlang/ looked like something worth posting to r/programming, so I did http://www.reddit.com/r/programming/comments/2e49tm/d_for_the_win/

Re: D for the Win

2014-08-20 Thread Walter Bright via Digitalmars-d-announce
On 8/20/2014 2:33 PM, anonymous wrote: Dlang Dlang Über Alles as a German, O_O I'm not surprised that the German programming community has taken to D. After all, German cars all have those "D" stickers on them :-)

Re: D for the Win

2014-08-20 Thread Peter Alexander via Digitalmars-d-announce
Ha, that opDollar thing in the HTML generator is the nastiest D hack I've seen :-P

Re: D for the Win

2014-08-20 Thread anonymous via Digitalmars-d-announce
Dlang Dlang Über Alles as a German, O_O

D for the Win

2014-08-20 Thread Andrei via Digitalmars-d-announce
stumbled on this blog post: http://tomerfiliba.com/blog/dlang/ looked like something worth posting to r/programming, so I did