Re: Voting For std.experimental.ndslice

2015-12-29 Thread Jack Stouffer via Digitalmars-d
On Monday, 28 December 2015 at 14:42:43 UTC, Ilya Yaroshenko wrote: On Monday, 28 December 2015 at 11:13:57 UTC, Martin Nowak wrote: We're branching for 2.070 soon, would be nice if this can make it, but only if it's really ready. Whooohooo! Thanks! Ilya I'm writing a blog post giving an

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 29 December 2015 at 16:28:52 UTC, Robert burner Schadek wrote: On Tuesday, 29 December 2015 at 16:11:00 UTC, Ilya Yaroshenko wrote: OK, lets discuss every function. That is acceptably the problem. It is not about the documentation of the functions it is about the documentation

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 29 December 2015 at 18:08:52 UTC, Andrei Alexandrescu wrote: On 12/29/2015 11:28 AM, Robert burner Schadek wrote: On Tuesday, 29 December 2015 at 16:11:00 UTC, Ilya Yaroshenko wrote: OK, lets discuss every function. That is acceptably the problem. It is not about the

virtual destructor in C++ integration: bug or me being stupid?

2015-12-29 Thread Atila Neves via Digitalmars-d-learn
cpp.cpp: class Oops { public: virtual ~Oops() {} virtual int number() const { return 42; } }; Oops* newOops() { return new Oops; } d.d: import std.stdio; extern(C++) { interface Oops { int number() const; } Oops newOops(); } void main() { auto oops =

Re: pl0stuff an optimizing pl0 > c transcompiler

2015-12-29 Thread Stefan Koch via Digitalmars-d-announce
On Tuesday, 29 December 2015 at 04:37:44 UTC, Nick B wrote: Would you know what is required to get good performance ? I can guess. However without actually implementing it my guess is as good as any. I would probably look at HHVM, and see what is easy to reimplement in D.

Re: virtual destructor in C++ integration: bug or me being stupid?

2015-12-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 29 December 2015 at 18:32:23 UTC, Atila Neves wrote: The problem here is that I don't know what the workaround is. The one I used (well, last time I tried this) was to just put a dummy function in the D interface that is a placeholder for it. interface C++Class { // at the

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 29 December 2015 at 17:17:05 UTC, Jack Stouffer wrote: On Monday, 28 December 2015 at 14:42:43 UTC, Ilya Yaroshenko wrote: On Monday, 28 December 2015 at 11:13:57 UTC, Martin Nowak wrote: We're branching for 2.070 soon, would be nice if this can make it, but only if it's really

[Issue 15483] static if prevents inlining

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15483 --- Comment #1 from thomas.bock...@gmail.com --- Perhaps related: https://issues.dlang.org/show_bug.cgi?id=15159 --

[Issue 15483] New: static if prevents inlining

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15483 Issue ID: 15483 Summary: static if prevents inlining Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Andrei Alexandrescu via Digitalmars-d
On 12/29/2015 11:28 AM, Robert burner Schadek wrote: On Tuesday, 29 December 2015 at 16:11:00 UTC, Ilya Yaroshenko wrote: OK, lets discuss every function. That is acceptably the problem. It is not about the documentation of the functions it is about the documentation binding the functions

Re: Better docs for D (WIP)

2015-12-29 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 29 December 2015 at 14:26:48 UTC, Rikki Cattermole wrote: Okay, I remember you saying something a bit different on IRC (at least to my understanding). Well, I'm still a bit iffy on it, to attach a name I used the first member of the enum which might not pass review muster in dmd

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 29 December 2015 at 15:42:32 UTC, Robert burner Schadek wrote: On Monday, 28 December 2015 at 22:39:45 UTC, Ilya Yaroshenko wrote: 1. First paragraph was replaced by your variant. 2. Binary representation was moved to Slice type documentation. 3. Small "Quick Start" was added, so

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 29 December 2015 at 16:11:00 UTC, Ilya Yaroshenko wrote: OK, lets discuss every function. That is acceptably the problem. It is not about the documentation of the functions it is about the documentation binding the functions together and the documentation giving the idea of the

[Issue 15159] Static nested function prevent inlining

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15159 thomas.bock...@gmail.com changed: What|Removed |Added CC||thomas.bock...@gmail.com ---

Re: reduce a BitArray[]

2015-12-29 Thread Alex Parrill via Digitalmars-d-learn
On Tuesday, 29 December 2015 at 09:26:31 UTC, Alex wrote: The problem is, that the last line with the reduce does not compile. Why? If you get an error, it is imperative that you tell us what it is. For the record, this code: import std.bitmanip; import std.stdio;

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 29 December 2015 at 14:51:37 UTC, Márcio Martins wrote: On Tuesday, 29 December 2015 at 13:54:56 UTC, Jack Stouffer wrote: On Tuesday, 29 December 2015 at 13:30:47 UTC, Márcio Martins wrote: If I am reading the code right, the number of dimensions must always be known at compile

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 29 December 2015 at 13:30:47 UTC, Márcio Martins wrote: On Tuesday, 29 December 2015 at 07:45:14 UTC, Ilya Yaroshenko wrote: On Monday, 28 December 2015 at 22:39:45 UTC, Ilya Yaroshenko wrote: On Monday, 28 December 2015 at 21:43:35 UTC, Robert burner Schadek wrote: [...] Agreed

Re: reduce a BitArray[]

2015-12-29 Thread Daniel Kozak via Digitalmars-d-learn
V Tue, 29 Dec 2015 17:42:26 + Alex Parrill via Digitalmars-d-learn napsáno: > On Tuesday, 29 December 2015 at 09:26:31 UTC, Alex wrote: > > The problem is, that the last line with the reduce does not > > compile. Why? > > If you get an error, it is

[Issue 15483] static if prevents inlining

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15483 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||performance CC|

[Issue 14255] Since DMD is used to build idgen, one can't have dmd.conf for dev and system wide.

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14255 --- Comment #7 from hst...@quickfur.ath.cx --- https://github.com/D-Programming-Language/dmd/pull/5325 --

Unexpected ' ' when converting from type string to type int

2015-12-29 Thread Michael S via Digitalmars-d-learn
Hello, thanks for stopping in. I am fuddling through some exercises on a certain website, and I have come across a very frustrating bug I can't seem to fix. The Problem: Given a square matrix of size N×N, calculate the absolute difference between the sums of its diagonals. Sample Input: 3

Re: Unexpected ' ' when converting from type string to type int

2015-12-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 30 December 2015 at 01:36:56 UTC, Michael S wrote: auto matrix_size = readln; Change that to auto matrix_size = readln.strip; and you should be in business. readln() returns any leading spaces and the newline character at the end of the line too, which is why to is

Re: Voting For std.experimental.ndslice

2015-12-29 Thread MrSmith via Digitalmars-d
On Tuesday, 29 December 2015 at 21:19:19 UTC, Jack Stouffer wrote: On Tuesday, 29 December 2015 at 17:38:06 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 December 2015 at 17:17:05 UTC, Jack Stouffer wrote: ... First draft: http://jackstouffer.com/hidden/nd_slice.html Please critique. Looks

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 29 December 2015 at 21:19:19 UTC, Jack Stouffer wrote: On Tuesday, 29 December 2015 at 17:38:06 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 December 2015 at 17:17:05 UTC, Jack Stouffer wrote: On Monday, 28 December 2015 at 14:42:43 UTC, Ilya Yaroshenko wrote: On Monday, 28 December

Re: Better docs for D (WIP)

2015-12-29 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 12/29/2015 10:20 AM, Adam D. Ruppe wrote: On Tuesday, 29 December 2015 at 14:26:48 UTC, Rikki Cattermole wrote: Okay, I remember you saying something a bit different on IRC (at least to my understanding). Well, I'm still a bit iffy on it, to attach a name I used the first member of the

Re: Better docs for D (WIP)

2015-12-29 Thread Rikki Cattermole via Digitalmars-d-announce
On 30/12/15 1:32 PM, Andrei Alexandrescu wrote: On 12/29/2015 10:20 AM, Adam D. Ruppe wrote: On Tuesday, 29 December 2015 at 14:26:48 UTC, Rikki Cattermole wrote: Okay, I remember you saying something a bit different on IRC (at least to my understanding). Well, I'm still a bit iffy on it, to

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Wednesday, 30 December 2015 at 00:24:38 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 December 2015 at 21:19:19 UTC, Jack Stouffer wrote: On Tuesday, 29 December 2015 at 17:38:06 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 December 2015 at 17:17:05 UTC, Jack Stouffer wrote: [...] Thank you

Re: vibe.d benchmarks

2015-12-29 Thread Nick B via Digitalmars-d
On Monday, 28 December 2015 at 13:10:59 UTC, Charles wrote: On Monday, 28 December 2015 at 12:24:17 UTC, Ola Fosheim Grøstad wrote: https://www.techempower.com/benchmarks/ The entries for vibe.d are either doing very poorly or fail to complete. Maybe someone should look into this? Sönke is

[Issue 14255] Since DMD is used to build idgen, one can't have dmd.conf for dev and system wide.

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14255 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

Re: Unexpected ' ' when converting from type string to type int

2015-12-29 Thread Michael S via Digitalmars-d-learn
On Wednesday, 30 December 2015 at 01:38:32 UTC, Adam D. Ruppe wrote: On Wednesday, 30 December 2015 at 01:36:56 UTC, Michael S wrote: auto matrix_size = readln; Change that to auto matrix_size = readln.strip; and you should be in business. readln() returns any leading spaces and the

Re: Better docs for D (WIP)

2015-12-29 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 30 December 2015 at 00:32:31 UTC, Andrei Alexandrescu wrote: Then why document it? Just on principle, a documentation tool probably shouldn't be limiting the author's ability to document... This might just be a bug in dmd btw. Looking at the ddoc spec page, it says

[Issue 14255] Since DMD is used to build idgen, one can't have dmd.conf for dev and system wide.

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14255 --- Comment #6 from hst...@quickfur.ath.cx --- Got bitten by this today. I have an old version of dmd for bootstrapping purposes in /usr/src/d/install, and git checkout of dmd in /usr/src/d/dmd. This setup used to work fine, except that recently, due

Re: Article on D for CVu or Overload

2015-12-29 Thread Ali Çehreli via Digitalmars-d
On 12/29/2015 05:31 AM, Russel Winder via Digitalmars-d wrote: > BTW Any preferences as to what to do with the other two copies? I was > wondering about handing them out at ACCU 2016 as prizes for something > or other. Thank you! That sounds great. Or you can do anything else that you want

Re: pl0stuff an optimizing pl0 > c transcompiler

2015-12-29 Thread Nick B via Digitalmars-d-announce
On Tuesday, 29 December 2015 at 17:59:15 UTC, Stefan Koch wrote: On Tuesday, 29 December 2015 at 04:37:44 UTC, Nick B wrote: Would you know what is required to get good performance ? I can guess. However without actually implementing it my guess is as good as any. I would probably look at

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 29 December 2015 at 17:38:06 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 December 2015 at 17:17:05 UTC, Jack Stouffer wrote: On Monday, 28 December 2015 at 14:42:43 UTC, Ilya Yaroshenko wrote: On Monday, 28 December 2015 at 11:13:57 UTC, Martin Nowak wrote: We're branching for 2.070

[Issue 12233] Attempting to use TypeInfo.init results in a compiler error due to lack of 'this'.

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12233 --- Comment #5 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/04700217971964fdc8edb1798eaa669ec37fa7e9 rename TypeInfo's

Re: Is stdout.flush() unsafe?

2015-12-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/29/15 4:57 AM, tsbockman wrote: Trying to compile this: void main() @safe { import std.stdio; stdout.flush(); } Fails with this message: Error: safe function 'main' cannot access __gshared data 'stdout' Is this necessary? If so, what are the synchronization requirements for

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya via Digitalmars-d
On Wednesday, 30 December 2015 at 01:03:39 UTC, Ilya Yaroshenko wrote: On Wednesday, 30 December 2015 at 00:24:38 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 December 2015 at 21:19:19 UTC, Jack Stouffer wrote: On Tuesday, 29 December 2015 at 17:38:06 UTC, Ilya Yaroshenko wrote: On Tuesday, 29

Re: Better docs for D (WIP)

2015-12-29 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 12/29/2015 09:09 PM, Adam D. Ruppe wrote: Putting one item per page is far more important than I even realized before getting into this. We already have that: https://dlang.org/library/std/array/join.html If I search for dlang array join that the third hit on google if I'm logged in, and

Re: vibe.d benchmarks

2015-12-29 Thread Charles via Digitalmars-d
On Tuesday, 29 December 2015 at 22:49:36 UTC, Nick B wrote: On Monday, 28 December 2015 at 13:10:59 UTC, Charles wrote: On Monday, 28 December 2015 at 12:24:17 UTC, Ola Fosheim Grøstad wrote: https://www.techempower.com/benchmarks/ The entries for vibe.d are either doing very poorly or fail

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Jack Stouffer via Digitalmars-d
On Wednesday, 30 December 2015 at 00:24:38 UTC, Ilya Yaroshenko wrote: Awesome! Please find my notes below. Thanks for the feedback. Good thing I posted this here before releasing it. Funny thing, when I made the D example use the mean lambda function, it got way faster. Even with the

Re: Better watch out! D runs on watchOS!

2015-12-29 Thread Dan Olson via Digitalmars-d-announce
Jacob Carlborg writes: > On 2015-12-28 20:02, Dan Olson wrote: > >> That is Plan B.2 > > I'm working on implementing native TLS for OS X in DMD. I think I've > figured out how everything works. Unless you already know how it > works, I could tell you what I have figured out. I know

pragma(inline)

2015-12-29 Thread Ilya via Digitalmars-d-learn
Hi, Does `pragma(inline, true)` force DMD compiler to inline function when `-inline` was _not_ defined? I am failing to get a good disassembled code with obj2asm/otool :-( Best, Ilya

Re: Microsoft officially documents pdb format

2015-12-29 Thread Joakim via Digitalmars-d
On Friday, 30 October 2015 at 07:19:14 UTC, rsw0x wrote: https://github.com/Microsoft/microsoft-pdb Well, they finally added CodeView support to llvm, good to see them coming around: http://phoronix.com/scan.php?page=news_item=Microsoft-Adds-LLVM-CodeView Somebody should probably check the

Re: We need a good code font for the function signatures on dlang.org

2015-12-29 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/2015 04:06 PM, Jack Stouffer wrote: On Thursday, 17 December 2015 at 13:59:14 UTC, Andrei Alexandrescu wrote: On 12/17/2015 03:07 AM, Mike Parker wrote: On Wednesday, 16 December 2015 at 21:05:27 UTC, Andrei Alexandrescu wrote: What would be a good code font to use for those?

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya Yaroshenko via Digitalmars-d
On Wednesday, 30 December 2015 at 06:16:23 UTC, Jack Stouffer wrote: On Wednesday, 30 December 2015 at 00:24:38 UTC, Ilya Yaroshenko wrote: [...] Thanks for the feedback. Good thing I posted this here before releasing it. [...] means in your code is lazy variable :) You may want to made

reduce a BitArray[]

2015-12-29 Thread Alex via Digitalmars-d-learn
Hi there, a silly question from me for the turn of the year... I apparently missing the forest through the trees. The first part of the code works as expected: [code] int[] arr8 = [1,2,3,4,5]; int sum = 0; foreach(int summand; arr8) { sum += summand; }

Re: Is there a FIX engine written in D?

2015-12-29 Thread Dejan Lekic via Digitalmars-d
https://github.com/libtrading/libtrading/blob/master/docs/quickstart.md Nice project - I did not know about it! Thanks! Major problem in writing a library which implements FIX protocols is lack of a good XML package. Yes, we have std.xml but it is far from good, and as we all know, it needs

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 29 December 2015 at 13:30:47 UTC, Márcio Martins wrote: If I am reading the code right, the number of dimensions must always be known at compile time, right? Not necessarily. The dimensions for this slice are computed at runtime. ``` auto slice = 1000.iota.sliced(5, 6, 7); ```

Re: Mockup of my doc dream ideas

2015-12-29 Thread Dejan Lekic via Digitalmars-d
Adam, I wonder could we also have information since what Phobos version particular symbol is available from. For an example, from which version of Phobos we have findSkip() ??

Re: Better docs for D (WIP)

2015-12-29 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 29 December 2015 at 05:00:48 UTC, Rikki Cattermole wrote: From what Adam has said, definitely won't be happening with DDOC. There is simply no symbol to attach the comment to. Well, not definitely, it was really easy to do in libdparse (a two line diff) and probably similarly

Re: Better watch out! D runs on watchOS!

2015-12-29 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-12-28 20:02, Dan Olson wrote: That is Plan B.2 I'm working on implementing native TLS for OS X in DMD. I think I've figured out how everything works. Unless you already know how it works, I could tell you what I have figured out. -- /Jacob Carlborg

Re: Article on D for CVu or Overload

2015-12-29 Thread Russel Winder via Digitalmars-d
On Mon, 2015-12-28 at 11:12 -0800, Ali Çehreli via Digitalmars-d wrote: > […] > CVu is for ACCU members only but Overload is freely available online > as  > well (both are actually print magazines): > >    http://accu.org/index.php/journal > > Quoting from the most-recent Overload PDF: > >    

Re: Article on D for CVu or Overload

2015-12-29 Thread Russel Winder via Digitalmars-d
On Mon, 2015-12-28 at 18:14 +, Jakob Jenkov via Digitalmars-d wrote: >  […] > What would the topics be? Anything to do with programming that a professional programmer would be interested. CVu is the membership magazine/journal of ACCU but does a lot of technical content. Overload was the

[Issue 15482] New: new uuid.d forbids to link statically with other libraries

2015-12-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15482 Issue ID: 15482 Summary: new uuid.d forbids to link statically with other libraries Product: D Version: D2 Hardware: All OS: Windows Status: NEW

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Márcio Martins via Digitalmars-d
On Tuesday, 29 December 2015 at 13:54:56 UTC, Jack Stouffer wrote: On Tuesday, 29 December 2015 at 13:30:47 UTC, Márcio Martins wrote: If I am reading the code right, the number of dimensions must always be known at compile time, right? Not necessarily. The dimensions for this slice are

Re: Redesign of dlang.org

2015-12-29 Thread Jacob Carlborg via Digitalmars-d
On 2015-12-27 21:42, anonymous wrote: The caret seems to be a bit high maybe, but otherwise that's how it's supposed to look. Feel free to criticize, of course. Aha, then there's no problem :) -- /Jacob Carlborg

Re: Better docs for D (WIP)

2015-12-29 Thread Rikki Cattermole via Digitalmars-d-announce
On 30/12/15 3:24 AM, Adam D. Ruppe wrote: On Tuesday, 29 December 2015 at 05:00:48 UTC, Rikki Cattermole wrote: From what Adam has said, definitely won't be happening with DDOC. There is simply no symbol to attach the comment to. Well, not definitely, it was really easy to do in libdparse (a

Is stdout.flush() unsafe?

2015-12-29 Thread tsbockman via Digitalmars-d-learn
Trying to compile this: void main() @safe { import std.stdio; stdout.flush(); } Fails with this message: Error: safe function 'main' cannot access __gshared data 'stdout' Is this necessary? If so, what are the synchronization requirements for access to `stdout`?

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Márcio Martins via Digitalmars-d
On Tuesday, 29 December 2015 at 07:45:14 UTC, Ilya Yaroshenko wrote: On Monday, 28 December 2015 at 22:39:45 UTC, Ilya Yaroshenko wrote: On Monday, 28 December 2015 at 21:43:35 UTC, Robert burner Schadek wrote: [...] Agreed 1. First paragraph was replaced by your variant. 2. Binary

Re: Mockup of my doc dream ideas

2015-12-29 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 29 December 2015 at 14:13:54 UTC, Dejan Lekic wrote: Adam, I wonder could we also have information since what Phobos version particular symbol is available from. For an example, from which version of Phobos we have findSkip() ?? Yeah, I was thinking about that too. The info isn't