Re: dmd codegen improvements

2015-08-19 Thread via Digitalmars-d
On Wednesday, 19 August 2015 at 10:50:24 UTC, Ola Fosheim Grøstad wrote: Well… I can't argue with what you find interesting. Memory throughput and pipeline bubbles are the key bottlenecks these days. And just to stress this point: if you code is spending 50% of the time waiting for memory

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread via Digitalmars-d
On Wednesday, 19 August 2015 at 10:09:33 UTC, Chris wrote: Well, maybe that's exactly what the designers of C did, they didn't slavishly follow the convention that the result of the computation is notated to the right. Maybe they thought, 'Uh, actually, wouldn't it be handier to see

Re: Programming in D paper book is available for purchase

2015-08-19 Thread extrawurst via Digitalmars-d-announce
On Wednesday, 19 August 2015 at 00:57:32 UTC, Ali Çehreli wrote: I am very happy! :) It will be available on many other distribution channels like Amazon in a few days as well but the following is the link that pays me the most royalty: [...] Awesome! Ordered! ;)

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread via Digitalmars-d
On Wednesday, 19 August 2015 at 13:02:50 UTC, Chris wrote: Yes, I forgot, it does. But why not `x++`? I never understood why. As if most people were too stpid to grasp the concept that `x++` is the same as `x += 1` (which is intellectually as 'challenging' as `x++`, by the way). I don't

Re: dmd codegen improvements

2015-08-19 Thread Dmitry Olshansky via Digitalmars-d
On 18-Aug-2015 15:37, Vladimir Panteleev wrote: I think stability of the DMD backend is a goal of much higher value than the performance of the code it emits. DMD is never going to match the code generation quality of LLVM and GCC, which have had many, many man-years invested in them. Working on

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread Kagamin via Digitalmars-d
On Wednesday, 19 August 2015 at 11:42:54 UTC, Ola Fosheim Grøstad wrote: Has the argument that tpye-to-the-right is easier for beginners has ever been proven? It is much easier to read when you have longer types. Old languages tended to have not so long types (libraries and programs were

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/19/2015 09:40 AM, Jonathan M Davis wrote: But I do think that that whole deal about partial ordering is just bizarre. If == is true, = and = should always be true and vice versa. Similarly, if any of them are false, all three of them should be false. If you want to do something else, then

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/19/2015 04:04 AM, H. S. Teoh via Digitalmars-d wrote: On Wed, Aug 19, 2015 at 01:12:33AM +, Adam D. Ruppe via Digitalmars-d wrote: I just saw this link come by my desktop and I thought it was an interesting read because D does a lot of these things too, and avoids some of them:

[Issue 14935] [Operator Overloading] Wrong description on overloading a[]

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14935 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #1 from

[Issue 14935] [Operator Overloading] Wrong description on overloading a[]

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14935 --- Comment #3 from ag0ae...@gmail.com --- (In reply to Ryuichi OHORI from comment #2) The version I used is 2.067. Works for me with 2.067, too. What error are you getting? --

Re: Programming in D paper book is available for purchase

2015-08-19 Thread dnewbie via Digitalmars-d-announce
On Wednesday, 19 August 2015 at 00:57:32 UTC, Ali Çehreli wrote: I am very happy! :) Ordered Thank You Ali.

[Issue 14932] The language specification does not define what the shared attribute does

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14932 Sobirari Muhomori dfj1es...@sneakemail.com changed: What|Removed |Added Keywords||spec --

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, 19 August 2015 at 12:01:35 UTC, Timon Gehr wrote: On 08/19/2015 09:40 AM, Jonathan M Davis wrote: But I do think that that whole deal about partial ordering is just bizarre. If == is true, = and = should always be true and vice versa. Similarly, if any of them are false, all

[Issue 14663] shared library test - link_linkdep - segfaults on FreeBSD 10

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14663 --- Comment #8 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c011a559128e0c069140df4f7b3afd670403b081 fix Issue 14663 - shared

[Issue 14663] shared library test - link_linkdep - segfaults on FreeBSD 10

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14663 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

An Unusual Idea: import std;

2015-08-19 Thread via Digitalmars-d
I just got an idea: What about providing a top-level package.d in std? import std; // use potentially everything in Phobos: // with having to care about which import to use - This would make complete working tutorials even smaller - And newbies could easier experiment will all the

Re: Empty struct, any runtime cost?

2015-08-19 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 19 August 2015 at 09:54:33 UTC, SimonN wrote: Hi, in a release-like build, I'm using the tharsis profiler, which is a frame-based profiler. Zone is a RAII struct that measures how long its own lifetime is. with (Zone(my_profiler, zone name to appear in output)) {

[Issue 14896] x64 codegen problem when using -O

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14896 Sobirari Muhomori dfj1es...@sneakemail.com changed: What|Removed |Added Keywords||wrong-code --

[Issue 14935] New: [Operator Overloading] Wrong description on overloading a[]

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14935 Issue ID: 14935 Summary: [Operator Overloading] Wrong description on overloading a[] Product: D Version: D2 Hardware: All URL: http://dlang.org/

[Issue 14935] [Operator Overloading] Wrong description on overloading a[]

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14935 --- Comment #2 from Ryuichi OHORI r.97...@gmail.com --- The version I used is 2.067. If this is a change it must be listed on ChangeLog anyway, but I couldn't find it. The document goes 'opIndex' for about an year, since this commit:

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread Chris via Digitalmars-d
On Wednesday, 19 August 2015 at 11:42:54 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 19 August 2015 at 10:09:33 UTC, Chris wrote: Well, maybe that's exactly what the designers of C did, they didn't slavishly follow the convention that the result of the computation is notated to the right.

Re: dmd codegen improvements

2015-08-19 Thread Dmitry Olshansky via Digitalmars-d
On 19-Aug-2015 15:53, Jacob Carlborg wrote: On 2015-08-19 00:55, Walter Bright wrote: Exactly. That's why people just want to type -O and it optimizes. So why not just -pgo that does that you described above? +1 for -pgo to use trace.log in the same folder that way running -profile

Re: An Unusual Idea: import std;

2015-08-19 Thread via Digitalmars-d
On Wednesday, 19 August 2015 at 13:45:32 UTC, Per Nordlöw wrote: The parsing overhead on my machine is somewhere between 0.5 and 1 second. I recall that Andrei has mentioned plans on further DMD optimizations that will delay lexing and/or parsing of templates until they are referenced. Only

Re: Programming in D paper book is available for purchase

2015-08-19 Thread BBasile via Digitalmars-d-announce
On Wednesday, 19 August 2015 at 00:57:32 UTC, Ali Çehreli wrote: I am very happy! :) It will be available on many other distribution channels like Amazon in a few days as well but the following is the link that pays me the most royalty: https://www.createspace.com/5618128 This revision

[Issue 14935] [Operator Overloading] Wrong description on overloading a[]

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14935 ag0ae...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: dmd codegen improvements

2015-08-19 Thread Jacob Carlborg via Digitalmars-d
On 2015-08-19 15:00, Dmitry Olshansky wrote: +1 for -pgo to use trace.log in the same folder that way running -profile folowed by -pgo will just work (tm). I was thinking something the compiler would handle everything automatically in one command with the -pgo flag present. If necessary,

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, 19 August 2015 at 12:03:08 UTC, Timon Gehr wrote: On 08/19/2015 02:01 PM, Timon Gehr wrote: On 08/19/2015 09:40 AM, Jonathan M Davis wrote: If == is true, = and = should always be true and vice versa. Similarly, if any of them are false, all three of them should be false.

Re: dmd codegen improvements

2015-08-19 Thread Jacob Carlborg via Digitalmars-d
On 2015-08-19 00:55, Walter Bright wrote: Exactly. That's why people just want to type -O and it optimizes. So why not just -pgo that does that you described above? -- /Jacob Carlborg

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/19/2015 02:01 PM, Timon Gehr wrote: On 08/19/2015 09:40 AM, Jonathan M Davis wrote: If == is true, = and = should always be true and vice versa. Similarly, if any of them are false, all three of them should be false. Missed this. No, that is not how it should work, but I guess it's

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread via Digitalmars-d
On Wednesday, 19 August 2015 at 12:01:41 UTC, Kagamin wrote: Just switch your editor to RTL mode, haha. Indeed. Except the variable name is caught in the middle of the type and the assignment. I've started to carefully align my variable names at ~ row 40 in my C++ code.

Re: std.data.json formal review

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/18/2015 12:21 AM, Andrei Alexandrescu wrote: - JSONValue should offer a byToken range, which offers the contents of the value one token at a time. For example, [ 1, 2, 3 ] offers the '[' token followed by three numeric tokens with the respective values followed by the ']' token. What

[Issue 14896] x64 codegen problem when using -O

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14896 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #4 from

[Issue 14935] [Operator Overloading] Wrong description on overloading a[]

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14935 --- Comment #4 from Ryuichi OHORI r.97...@gmail.com --- Ah, it seems I mis-minimized my code using older ones in http://dpaste.dzfl.pl/ Here is an example 2.065 doesn't compile: http://dpaste.dzfl.pl/fork/d52a0e0a2163 I'm not sure but I was getting

Re: An Unusual Idea: import std;

2015-08-19 Thread via Digitalmars-d
On Wednesday, 19 August 2015 at 13:32:03 UTC, Per Nordlöw wrote: I just got an idea: What about providing a top-level package.d in std? Further, it would be a powerful showcase for the semantically aware D user-experience, enabled by its unique parsing performance. The parsing overhead on

Re: else if for template constraints

2015-08-19 Thread Steven Schveighoffer via Digitalmars-d
On 8/17/15 6:44 PM, anonymous wrote: On Monday, 17 August 2015 at 22:32:10 UTC, Idan Arye wrote: On Monday, 17 August 2015 at 21:27:47 UTC, Meta wrote: [...] At that point, couldn't you just use static if inside the body of the template instead of using template constraints? No. Consider

Re: dmd codegen improvements

2015-08-19 Thread anonymous via Digitalmars-d
On Tuesday, 18 August 2015 at 10:45:49 UTC, Walter Bright wrote: So if you're comparing code generated by dmd/gdc/ldc, and notice something that dmd could do better at (1, 2 or 3), please let me know. Often this sort of thing is low hanging fruit that is fairly easily inserted into the back

Re: Programming in D paper book is available for purchase

2015-08-19 Thread via Digitalmars-d-announce
On Wednesday, 19 August 2015 at 00:57:32 UTC, Ali Çehreli wrote: It will be available on many other distribution channels like Amazon in a few days as well but the following is the link that pays me the most royalty: https://www.createspace.com/5618128 Ali, congratulations on releasing

Re: Safely extend the size of a malloced memory block after realloc

2015-08-19 Thread Steven Schveighoffer via Digitalmars-d
On 8/18/15 1:51 AM, Benjamin Thaut wrote: On Monday, 17 August 2015 at 19:38:21 UTC, Steven Schveighoffer wrote: On 8/17/15 3:27 PM, Benjamin Thaut wrote: Consider the following code void* mem = malloc(500); GC.addRange(mem, 500); mem = realloc(mem, 512); // assume the pointer didn't change

[Issue 14925] replaceInPlace fail compilation

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14925 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/3f8b910e2c2834d2f87a543dc39692fe03a69c92 Fix issue 14925 --

[Issue 12748] ICE: Using typeof(S.init[0]) in type name specialization.

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12748 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||ice, pull

Re: An Unusual Idea: import std;

2015-08-19 Thread Kagamin via Digitalmars-d
http://forum.dlang.org/post/mmntkn$9ta$1...@digitalmars.com ?

[Issue 14934] GC interface doesn't allow safe extension of a memory range

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14934 --- Comment #2 from Martin Nowak c...@dawg.eu --- Maybe there could be a dead-lock in acquiring the GC lock in a critical region. Need to recheck that. --

[Issue 14934] GC interface doesn't allow safe extension of a memory range

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14934 Martin Nowak c...@dawg.eu changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: Safely extend the size of a malloced memory block after realloc

2015-08-19 Thread Benjamin Thaut via Digitalmars-d
On Wednesday, 19 August 2015 at 14:45:31 UTC, Steven Schveighoffer wrote: In the case where the pointer changes, you are in trouble. The original memory is now free, which means it can be overwritten by something else (either the C heap or some other thread that reallocates it). Then if your

Re: Programming in D paper book is available for purchase

2015-08-19 Thread anonymous via Digitalmars-d-announce
On Wednesday, 19 August 2015 at 15:53:27 UTC, Luís Marques wrote: On Wednesday, 19 August 2015 at 00:57:32 UTC, Ali Çehreli wrote: [...] Ali, congratulations on releasing such a complete book on D! I know this took you an immense effort, as these things always do, but the results speak

[Issue 14934] GC interface doesn't allow safe extension of a memory range

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14934 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: [OT] Sharp Regrets: Top 10 Worst C# Features

2015-08-19 Thread Kagamin via Digitalmars-d
On Wednesday, 19 August 2015 at 12:32:32 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 19 August 2015 at 12:01:41 UTC, Kagamin wrote: Just switch your editor to RTL mode, haha. Indeed. Except the variable name is caught in the middle of the type and the assignment. Well, if you have three

[Issue 14936] New: Dividing by a power of 2 slow on 32bit

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14936 Issue ID: 14936 Summary: Dividing by a power of 2 slow on 32bit Product: D Version: D2 Hardware: x86 OS: Linux Status: NEW Severity: enhancement

Re: dmd codegen improvements

2015-08-19 Thread Iain Buclaw via Digitalmars-d
On 18 August 2015 at 12:45, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: Martin ran some benchmarks recently that showed that ddmd compiled with dmd was about 30% slower than when compiled with gdc/ldc. This seems to be fairly typical. I'm interested in ways to reduce

Re: dmd codegen improvements

2015-08-19 Thread Walter Bright via Digitalmars-d
On 8/19/2015 7:34 AM, anonymous wrote: I have a about 30 lines of numerical code (using real) where the gap is about 200%-300% between ldc/gdc and dmd (linux x86_64). In fact dmd -O etc is at the level of ldc/gdc without any optimizations and dmd without -0 is even slower. With double instead of

Re: dmd codegen improvements

2015-08-19 Thread Walter Bright via Digitalmars-d
On 8/19/2015 9:53 AM, Iain Buclaw via Digitalmars-d wrote: https://issues.dlang.org/show_bug.cgi?id=14936 (Consider this my contribution to your low hanging fruit) Thanks!

Re: std.data.json formal review

2015-08-19 Thread Andrei Alexandrescu via Digitalmars-d
On 8/19/15 8:42 AM, Timon Gehr wrote: On 08/18/2015 12:21 AM, Andrei Alexandrescu wrote: - JSONValue should offer a byToken range, which offers the contents of the value one token at a time. For example, [ 1, 2, 3 ] offers the '[' token followed by three numeric tokens with the respective

Re: dmd codegen improvements

2015-08-19 Thread jmh530 via Digitalmars-d
On Wednesday, 19 August 2015 at 17:25:13 UTC, deadalnix wrote: Apple is invested in LLVM. For other thing you mention, WebAssembly is an AST representation, which is both dumb and do not look like anything like LLVM IR. I saw more similarity between wasm and SPIR-V than LLVM, but it

Re: dmd codegen improvements

2015-08-19 Thread Jacob Carlborg via Digitalmars-d
On 2015-08-18 12:45, Walter Bright wrote: Martin ran some benchmarks recently that showed that ddmd compiled with dmd was about 30% slower than when compiled with gdc/ldc. This seems to be fairly typical. Not sure how the compilers behave in this case but what about devirtualization? Since I

Re: dmd codegen improvements

2015-08-19 Thread deadalnix via Digitalmars-d
On Wednesday, 19 August 2015 at 09:26:43 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 19 August 2015 at 08:22:58 UTC, Dmitry Olshansky wrote: Also DMD's backend strives to stay fast _and_ generate fine machine code. Getting within 10% of GCC/LLVM and being fast is IMHO both possible and

Re: dmd codegen improvements

2015-08-19 Thread Jacob Carlborg via Digitalmars-d
On 2015-08-18 23:43, Walter Bright wrote: I wonder how many people actually use the llvm profile guided optimizations. I suspect very, very few. In Xcode there's a checkbox for PGO in the build configuration. Should be just as easy to enable as any other build setting. -- /Jacob Carlborg

Re: std.data.json formal review

2015-08-19 Thread Jacob Carlborg via Digitalmars-d
On 2015-08-19 19:29, Andrei Alexandrescu wrote: Forgot about those. The invariant is that byToken should return a sequence of tokens that, when parsed, produces the originating object. That should be possible without the comma tokens in this case? -- /Jacob Carlborg

Re: Empty struct, any runtime cost?

2015-08-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-08-19 16:05, Nicholas Wilson wrote: I'd be surprised if it didn't, but you can always check the disassembly. If for some reason either the compiler doesn't remove it (it never removes classes btw but not sure about structs) or the linker doesn't discard it you can try -gcsections ( or

[Issue 14936] Dividing by a power of 2 slow on 32bit

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14936 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Keywords||performance

Re: Programming in D paper book is available for purchase

2015-08-19 Thread Walter Bright via Digitalmars-d-announce
On 8/18/2015 5:57 PM, Ali Çehreli wrote: I am very happy! :) It will be available on many other distribution channels like Amazon in a few days as well but the following is the link that pays me the most royalty: https://www.createspace.com/5618128 This revision has many corrections and

Re: dmd codegen improvements

2015-08-19 Thread Paulo Pinto via Digitalmars-d
On Wednesday, 19 August 2015 at 18:41:07 UTC, Walter Bright wrote: On 8/19/2015 11:03 AM, Jacob Carlborg wrote: Not sure how the compilers behave in this case but what about devirtualization? Since I think most developers compile their D programs with all files at once there should be pretty

Re: dmd codegen improvements

2015-08-19 Thread Walter Bright via Digitalmars-d
On 8/19/2015 11:03 AM, Jacob Carlborg wrote: Not sure how the compilers behave in this case but what about devirtualization? Since I think most developers compile their D programs with all files at once there should be pretty good opportunities to do devirtualization. It's true that if

Re: dmd codegen improvements

2015-08-19 Thread deadalnix via Digitalmars-d
On Wednesday, 19 August 2015 at 18:26:45 UTC, jmh530 wrote: On Wednesday, 19 August 2015 at 17:25:13 UTC, deadalnix wrote: Apple is invested in LLVM. For other thing you mention, WebAssembly is an AST representation, which is both dumb and do not look like anything like LLVM IR. I saw more

[Issue 14937] New: Slow code compared to ldc/gdc on calculation with real variables

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14937 Issue ID: 14937 Summary: Slow code compared to ldc/gdc on calculation with real variables Product: D Version: D2 Hardware: x86_64 OS: Linux Status:

Re: dmd codegen improvements

2015-08-19 Thread anonymous via Digitalmars-d
On Wednesday, 19 August 2015 at 17:30:13 UTC, Walter Bright wrote: On 8/19/2015 7:34 AM, anonymous wrote: I have a about 30 lines of numerical code (using real) where the gap is about 200%-300% between ldc/gdc and dmd (linux x86_64). In fact dmd -O etc is at the level of ldc/gdc without any

update to Dlang HDF5 format bindings/wrappers

2015-08-19 Thread Laeeth Isharc via Digitalmars-d-announce
What is HDF5, and why should you use it ? http://www.hdfgroup.org/why_hdf/ (My summary): - very large data sets, very fast access requirements, and complex datasets - share data across variety of platforms - many open-source and commercial tools that understand HDF - self-describing

Re: Presentation Intro to D: What works?

2015-08-19 Thread qznc via Digitalmars-d
On Thursday, 25 June 2015 at 12:39:11 UTC, qznc wrote: Looks like I will give a talk about D to our local Functional Programming User Group in August. Feel free to join, if you can be in Karlsruhe, Germany:

Re: std.data.json formal review

2015-08-19 Thread Andrei Alexandrescu via Digitalmars-d
On 8/19/15 1:59 PM, Jacob Carlborg wrote: On 2015-08-19 19:29, Andrei Alexandrescu wrote: Forgot about those. The invariant is that byToken should return a sequence of tokens that, when parsed, produces the originating object. That should be possible without the comma tokens in this case?

Dumping the contents of memory to a file

2015-08-19 Thread Lewis via Digitalmars-d
I was wondering if there was a way to dump the contents of the heap to a file. If the heap is guaranteed to be in one contiguous chunk, then all I would need is: - The start address of the heap - The current size of the heap If it is not in one contiguous chunk, then it might be a little

Re: Programming in D paper book is available for purchase

2015-08-19 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 8/18/15 8:57 PM, Ali Çehreli wrote: I am very happy! :) [snip] As you should. This is a great achievement. Congratulations! -- Andrei

Re: dmd codegen improvements

2015-08-19 Thread deadalnix via Digitalmars-d
On Wednesday, 19 August 2015 at 18:47:21 UTC, Paulo Pinto wrote: On Wednesday, 19 August 2015 at 18:41:07 UTC, Walter Bright wrote: On 8/19/2015 11:03 AM, Jacob Carlborg wrote: Not sure how the compilers behave in this case but what about devirtualization? Since I think most developers compile

Re: dmd codegen improvements

2015-08-19 Thread Iain Buclaw via Digitalmars-d
On 19 August 2015 at 21:00, deadalnix via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 19 August 2015 at 18:47:21 UTC, Paulo Pinto wrote: On Wednesday, 19 August 2015 at 18:41:07 UTC, Walter Bright wrote: On 8/19/2015 11:03 AM, Jacob Carlborg wrote: Not sure how the

[Issue 14937] Slow code compared to ldc/gdc on calculation with real variables

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14937 --- Comment #1 from secondaryacco...@web.de --- Created attachment 1543 -- https://issues.dlang.org/attachment.cgi?id=1543action=edit compressed benchmark input file reduced benchmark input file to pass size limit. --

Re: dmd codegen improvements

2015-08-19 Thread qznc via Digitalmars-d
On Wednesday, 19 August 2015 at 11:22:09 UTC, Dmitry Olshansky wrote: On 18-Aug-2015 15:37, Vladimir Panteleev wrote: I think stability of the DMD backend is a goal of much higher value than the performance of the code it emits. DMD is never going to match the code generation quality of LLVM

Re: Dumping the contents of memory to a file

2015-08-19 Thread qznc via Digitalmars-d
On Wednesday, 19 August 2015 at 19:05:09 UTC, Lewis wrote: I was wondering if there was a way to dump the contents of the heap to a file. If the heap is guaranteed to be in one contiguous chunk, then all I would need is: - The start address of the heap - The current size of the heap If it

2.068.0 regression?

2015-08-19 Thread sigod via Digitalmars-d
Consider this code: ``` struct Test { string to; void test() { import core.time; auto value = [to: to]; // Error: can't have associative array of void } } void main() {} ``` In 2.068.0 compilation fails. Works in 2.065 and 2.067.1.

Re: dmd codegen improvements

2015-08-19 Thread Walter Bright via Digitalmars-d
On 8/19/2015 12:39 PM, anonymous wrote: The problem are not the 30 lines + white space but the input file used in my benchmark. The whole benchmark programm has 115 lines including empty lines and braces. The input file is 4.8 MB large. Anyway the raw asm generated by the different compiler may

Re: 2.068.0 regression?

2015-08-19 Thread sigod via Digitalmars-d
On Wednesday, 19 August 2015 at 21:32:17 UTC, Adam D. Ruppe wrote: On Wednesday, 19 August 2015 at 21:26:34 UTC, sigod wrote: Consider this code: Not a regression per se - core.time just introduced a new `to` function that is conflicting with your variable name because you imported

Re: dmd codegen improvements

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/18/2015 12:45 PM, Walter Bright wrote: Martin ran some benchmarks recently that showed that ddmd compiled with dmd was about 30% slower than when compiled with gdc/ldc. This seems to be fairly typical. I'm interested in ways to reduce that gap. There are 3 broad kinds of optimizations

Re: 2.068.0 regression?

2015-08-19 Thread deadalnix via Digitalmars-d
On Wednesday, 19 August 2015 at 23:18:04 UTC, Timon Gehr wrote: On 08/20/2015 01:06 AM, Dicebot wrote: On Wednesday, 19 August 2015 at 22:33:23 UTC, Timon Gehr wrote: It's a bug in local imports. This is the ticket: https://issues.dlang.org/show_bug.cgi?id=10378 Seems to fit into existing

Re: Nested public imports - bug or feature?

2015-08-19 Thread Walter Bright via Digitalmars-d
On 8/13/2015 6:12 AM, Dicebot wrote: Right now this works: ``D struct Std { public import std.stdio; } void main() { Std.writeln(Nice!); } ``` I want to use it as an import hygiene idiom but not entirely sure if this behavior can be relied upon (or it is just a side effect of imports

Re: Nested public imports - bug or feature?

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/20/2015 01:25 AM, Walter Bright wrote: I want to use it as an import hygiene idiom but not entirely sure if this behavior can be relied upon (or it is just a side effect of imports being implemented as aliases currently). It has nothing to do with aliases. Imports work the same way as

Re: 2.068.0 regression?

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/20/2015 12:04 AM, Dicebot wrote: And yes, this is indeed regression but of a kind unavoidable with D module system so there isn't anything that can be done here but adjusting your code, sadly. It's a bug.

Re: Programming in D paper book is available for purchase

2015-08-19 Thread Ali Çehreli via Digitalmars-d-announce
On 08/18/2015 05:57 PM, Ali Çehreli wrote: the following is the link that pays me the most royalty: https://www.createspace.com/5618128 It's available on Amazon as well and it already comes with a discount! WAT? :)

Re: 2.068.0 regression?

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/19/2015 11:26 PM, sigod wrote: Consider this code: ``` struct Test { string to; void test() { import core.time; auto value = [to: to]; // Error: can't have associative array of void } } void main() {} ``` In 2.068.0 compilation fails. Works in

Re: 2.068.0 regression?

2015-08-19 Thread deadalnix via Digitalmars-d
On Wednesday, 19 August 2015 at 23:29:26 UTC, Timon Gehr wrote: On 08/20/2015 01:20 AM, deadalnix wrote: On Wednesday, 19 August 2015 at 23:18:04 UTC, Timon Gehr wrote: On 08/20/2015 01:06 AM, Dicebot wrote: On Wednesday, 19 August 2015 at 22:33:23 UTC, Timon Gehr wrote: It's a bug in local

automatically verifying code samples in phobos docs

2015-08-19 Thread Laeeth Isharc via Digitalmars-d-learn
Should this be done? How? I sent a pull request for the std.net.curl docs. They all talk about assigning the results of web requests to strings, but at least on my setup this does not work (cannot assign char[] to string). I was trying to walk someone else through using this and it was

[Issue 10378] Local imports hide local symbols

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10378 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #12 from

[Issue 14912] Move initialisation of GC'd struct and class data from the callee to the caller

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14912 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Keywords||performance

Re: 2.068.0 regression?

2015-08-19 Thread Dicebot via Digitalmars-d
On Wednesday, 19 August 2015 at 22:33:23 UTC, Timon Gehr wrote: It's a bug in local imports. This is the ticket: https://issues.dlang.org/show_bug.cgi?id=10378 Seems to fit into existing shadowing semantics. If this is a bug we may need a new spec.

Re: 2.068.0 regression?

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/20/2015 01:06 AM, Dicebot wrote: On Wednesday, 19 August 2015 at 22:33:23 UTC, Timon Gehr wrote: It's a bug in local imports. This is the ticket: https://issues.dlang.org/show_bug.cgi?id=10378 Seems to fit into existing shadowing semantics. There's no precedent for symbols shadowed by

Re: 2.068.0 regression?

2015-08-19 Thread Timon Gehr via Digitalmars-d
On 08/20/2015 01:20 AM, deadalnix wrote: On Wednesday, 19 August 2015 at 23:18:04 UTC, Timon Gehr wrote: On 08/20/2015 01:06 AM, Dicebot wrote: On Wednesday, 19 August 2015 at 22:33:23 UTC, Timon Gehr wrote: It's a bug in local imports. This is the ticket:

Re: dmd codegen improvements

2015-08-19 Thread rsw0x via Digitalmars-d
On Wednesday, 19 August 2015 at 20:54:39 UTC, qznc wrote: On Wednesday, 19 August 2015 at 11:22:09 UTC, Dmitry Olshansky wrote: On 18-Aug-2015 15:37, Vladimir Panteleev wrote: [...] How about stress-testing with some simple fuzzer: 1. Generate a sequence of pluasable expressions/functions.

Re: 2.068.0 regression?

2015-08-19 Thread Dicebot via Digitalmars-d
And yes, this is indeed regression but of a kind unavoidable with D module system so there isn't anything that can be done here but adjusting your code, sadly.

Re: 2.068.0 regression?

2015-08-19 Thread Dicebot via Digitalmars-d
On Wednesday, 19 August 2015 at 21:56:22 UTC, sigod wrote: ``` T to(string units, T, D)(D td) ``` But what compiler does with this function? How `void` appears in the error message? There are no arguments used thus `to` is resolved as plain template symbol, not a function. Template that

[Issue 14937] Slow code compared to ldc/gdc on calculation with real variables

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14937 --- Comment #2 from secondaryacco...@web.de --- Created attachment 1544 -- https://issues.dlang.org/attachment.cgi?id=1544action=edit full benchmark code for reduced input file The attached input file contains 1400 example vectors. This benchmark

Re: 2.068.0 regression?

2015-08-19 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 19 August 2015 at 21:26:34 UTC, sigod wrote: Consider this code: Not a regression per se - core.time just introduced a new `to` function that is conflicting with your variable name because you imported core.time in a more local scope. You can just do [to: this.to] to

Re: dmd codegen improvements

2015-08-19 Thread tsbockman via Digitalmars-d
On Tuesday, 18 August 2015 at 10:45:49 UTC, Walter Bright wrote: Martin ran some benchmarks recently that showed that ddmd compiled with dmd was about 30% slower than when compiled with gdc/ldc. This seems to be fairly typical. I'm interested in ways to reduce that gap. There are 3 broad

[Issue 14937] Slow code compared to ldc/gdc on calculation with real variables

2015-08-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14937 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Keywords||performance

scriptlike v0.9.3

2015-08-19 Thread Nick Sabalausky via Digitalmars-d-announce
Minor update to scriptlike: Utility library to aid in writing script-like programs in D. Homepage and features: https://github.com/Abscissa/scriptlike On DUB: http://code.dlang.org/packages/scriptlike API Reference: http://semitwist.com/scriptlike Full Changelog:

  1   2   >