Re: Unit Testing in Action

2017-10-24 Thread Ali Çehreli via Digitalmars-d-announce
On 10/24/2017 07:15 PM, Walter Bright wrote: On 10/24/2017 3:06 PM, Ali Çehreli wrote: It would be very useful if the compiler could do that automatically. On 10/24/2017 2:58 PM, qznc wrote: > The information is there just not expressed in a useable way. The problem is how to display it in

Re: Note from a donor

2017-10-24 Thread Walter Bright via Digitalmars-d
On 10/24/2017 6:20 AM, Andrei Alexandrescu wrote: * better dll support for Windows. It's been there, but it breaks repeatedly because it is not in the test suite.

Re: call Pascal DLL functions from D

2017-10-24 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 25 October 2017 at 03:12:56 UTC, Oleg B wrote: Hello. I have DLL written on Pascal and "headers" for use it (types and functions signatures definitions). How I can port "headers" to D? Calling convention is `stdcall` (`extern (Windows)` for D), arguments of some functions is

Re: Advice requested for fixing issue 17914

2017-10-24 Thread safety0ff via Digitalmars-d
On Wednesday, 25 October 2017 at 01:26:10 UTC, Brian Schott wrote: I've been reading the Fiber code and (so far) that seems seems to be reasonable. Can anybody think of a reason that this would be a bad idea? I'd rather not create a pull request for a design that's not going to work because

[Issue 11714] Improve error message for wrongly initialized thread-local class instances

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11714 calex changed: What|Removed |Added CC|

[Issue 17932] [scope] __traits(compiles, stmt) cannot test scope violations

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17932 calex changed: What|Removed |Added CC|

[Issue 17077] Unexpected optlink termination

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17077 Walter Bright changed: What|Removed |Added Hardware|x86_64 |x86 --

[Issue 10780] Optlink doesn't work on shared folder in VirtualBox

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10780 Walter Bright changed: What|Removed |Added Hardware|All |x86

[Issue 15183] Unexpected OPTLINK Termination at EIP=00425CF0

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15183 Walter Bright changed: What|Removed |Added Hardware|x86_64 |x86 --

Re: call Pascal DLL functions from D

2017-10-24 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 25 October 2017 at 03:12:56 UTC, Oleg B wrote: Calling convention is `stdcall` (`extern (Windows)` for D), arguments of some functions is structs of structs and etc with static array fields: Fun fact, D has extern(Pascal): https://dlang.org/spec/attribute.html#linkage I

[Issue 12054] PATH env. var longer than 1022 characters breaks OPTLINK search path

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12054 Walter Bright changed: What|Removed |Added Hardware|All |x86

[Issue 3327] OPTLINK and the librarian fail to see a symbol in a library

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3327 Walter Bright changed: What|Removed |Added Hardware|Other |x86 --

[Issue 5215] Crash with empty program

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5215 Walter Bright changed: What|Removed |Added Hardware|Other |x86 --

[Issue 4823] CodeView: Thread local variables are stored as shared globals

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4823 Walter Bright changed: What|Removed |Added Hardware|Other |x86 --

[Issue 16129] Linker error when using zero length array

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16129 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7997] Optlink issues 'Index Range' error with static zero length array

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7997 Walter Bright changed: What|Removed |Added CC|

[Issue 16855] Global void[0] causes OPTLINK Error when passed as ref Parameter

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16855 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16129] Linker error when using zero length array

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16129 Walter Bright changed: What|Removed |Added CC|

[Issue 15213] Unexpected OPTLINK Termination at EIP = 0040347E

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15213 Walter Bright changed: What|Removed |Added Hardware|x86_64 |x86 --

[Issue 13172] optimize and rawread cause symbol undefined errors

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13172 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7997] Optlink issues 'Index Range' error with static zero length array

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7997 Walter Bright changed: What|Removed |Added Summary|Optlink crash with static |Optlink issues

[Issue 6678] optlink crash with large array of structs

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6678 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6397] D1: Empty const string causes bad obj

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6397 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

call Pascal DLL functions from D

2017-10-24 Thread Oleg B via Digitalmars-d-learn
Hello. I have DLL written on Pascal and "headers" for use it (types and functions signatures definitions). How I can port "headers" to D? Calling convention is `stdcall` (`extern (Windows)` for D), arguments of some functions is structs of structs and etc with static array fields:

[Issue 5950] [AA] Linker problem with AA.get()

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5950 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 5215] Crash with empty program

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5215 Walter Bright changed: What|Removed |Added Keywords||Optlink --

[Issue 4823] CodeView: Thread local variables are stored as shared globals

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4823 Walter Bright changed: What|Removed |Added Keywords||Optlink

[Issue 4541] Intrinsic functions do not have pointers

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4541 Walter Bright changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 4315] Invalid object file created when appending const char[0] to char[]

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4315 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 4176] Link error in switch with 4 or more cases and no default

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4176 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 4010] dmd should support linkers other than OPTLINK

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4010 Walter Bright changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 3094] incorrect previous definition error

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3094 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 2249] DMD can't handle include paths with spaces in them

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2249 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 1404] Link failure with template mixin and function literal

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1404 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 1327] Long environment variable value causes link failure.

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1327 Walter Bright changed: What|Removed |Added Keywords||Optlink

Re: Advice requested for fixing issue 17914

2017-10-24 Thread Brian Schott via Digitalmars-d
On Tuesday, 24 October 2017 at 21:49:10 UTC, qznc wrote: My question wrt to the bug: Why is munmap/freeStack called in the destructor? Could be done right after termination? I've been reading the Fiber code and (so far) that seems seems to be reasonable. Can anybody think of a reason that

Re: So why double to float conversion is implicit ?

2017-10-24 Thread codephantom via Digitalmars-d
On Wednesday, 25 October 2017 at 01:06:40 UTC, codephantom wrote: Consensus within groups is kind of important actually...it encourages harmony and coherence..with which.. there is no group. if only we could edit our post to correct it...when's that going to happen btw. ;-) of course I

Re: So why double to float conversion is implicit ?

2017-10-24 Thread codephantom via Digitalmars-d
On Tuesday, 24 October 2017 at 16:28:03 UTC, Fool wrote: @all: It is sad to see how parts of the community are losing their distance to the project and even put a gloss on completely absurd design decisions. Consensus within groups is kind of important actually...it encourages harmony and

[Issue 17935] New: [scope] auto-generated destructor not scope aware

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17935 Issue ID: 17935 Summary: [scope] auto-generated destructor not scope aware Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: safe

Re: Getting a safe path for a temporary file

2017-10-24 Thread Ali Çehreli via Digitalmars-d-learn
On 10/22/2017 06:41 PM, Shriramana Sharma wrote: > On Sunday, 22 October 2017 at 15:21:37 UTC, Shriramana Sharma wrote: >> For my program right now I'm using a souped-up version using a static >> array: >> >> char[20] name = "/tmp/XX"; Literal strings have a '\0' attached, which does not

Re: DMD Callstacks

2017-10-24 Thread user1234 via Digitalmars-d-learn
On Tuesday, 24 October 2017 at 06:49:37 UTC, abad wrote: On Monday, 23 October 2017 at 12:41:09 UTC, Márcio Martins wrote: What is everyone doing to get proper file name and line number info for callstacks with DMD? addr2line just gives me ??:0 You could try compiling with the

Re: Named arguments

2017-10-24 Thread jmh530 via Digitalmars-d
On Tuesday, 24 October 2017 at 20:36:00 UTC, H. S. Teoh wrote: [snip] it would be more self-documenting if written as: // (Hypothetical syntax) auto x = foo(width: 1, height: 2, userId: 3); What about something that's a little uglier, but could be done with D magic? For

[Issue 17934] [scope] scopeness entrypoint for unique/ref-counted missing

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17934 --- Comment #1 from Martin Nowak --- Even if `l` is not inferred as scope, it should be a local with limited lifetime. The return value `l.front` should have that same lifetime b/c of `return scope`. Both of them should be shorter as

Re: Advice requested for fixing issue 17914

2017-10-24 Thread Brian Schott via Digitalmars-d
On Tuesday, 24 October 2017 at 14:28:01 UTC, Steven Schveighoffer wrote: A failing use case would help. Fixing a bug when you can't reproduce is difficult. -Steve I've attached one to the bug report.

[Issue 17934] New: [scope] scopeness entrypoint for unique/ref-counted missing

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17934 Issue ID: 17934 Summary: [scope] scopeness entrypoint for unique/ref-counted missing Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 15324] symbol is already defined / size of symbol changed

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15324 Walter Bright changed: What|Removed |Added See Also|

[Issue 17332] optilink or dmd bug

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17332 Walter Bright changed: What|Removed |Added See Also|

[Issue 17332] optilink or dmd bug

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17332 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16687] Win COFF: Duplicate COMDAT on overloaded templated function

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16687 Walter Bright changed: What|Removed |Added CC|

[Issue 17914] Accidental per-process limit of fiber uses

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17914 --- Comment #1 from briancsch...@gmail.com --- Minimal test case: void main() { import std.concurrency : Generator, yield; import std.stdio : File, writeln; auto f = File("/proc/sys/vm/max_map_count", "r"); ulong n;

[Issue 16687] Win COFF: Duplicate COMDAT on overloaded templated function

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16687 Walter Bright changed: What|Removed |Added CC|

Re: Note from a donor

2017-10-24 Thread jmh530 via Digitalmars-d
On Tuesday, 24 October 2017 at 21:11:37 UTC, Andre Pany wrote: In general I agree with you that coff is the way to go. I just dislike the consequences. Today you just download the dmd Windows zip, extract it and you have a running compiler. Nice, self contained and a good advertisement for

Re: Unit Testing in Action

2017-10-24 Thread Ali Çehreli via Digitalmars-d-announce
On 10/24/2017 01:51 PM, Walter Bright wrote: > On 10/23/2017 4:44 AM, Martin Nowak wrote: > There would be a separate coverage count for line 3 which would be the > sum of counts for (api2 == 2) and (api3 == 3). > > Generally, if this is inadequate, just split the expression into more > lines.

Re: Named arguments

2017-10-24 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 24, 2017 13:36:00 H. S. Teoh via Digitalmars-d wrote: > On Tue, Oct 24, 2017 at 01:22:41PM -0600, Jonathan M Davis via > > It also wouldn't play well with separate compilation unless the > > parameter names were mangled into the function names, and symbol names > > in D are

Re: Advice requested for fixing issue 17914

2017-10-24 Thread qznc via Digitalmars-d
On Monday, 23 October 2017 at 16:56:32 UTC, Brian Schott wrote: Context: https://issues.dlang.org/show_bug.cgi?id=17914 I need to get this issue resolved as soon as possible so that the fix makes it into the next compiler release. Because it involves cleanup code in a class destructor a

[Issue 16660] Deprecate/Remove Optlink as Default Linker on Windows

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16660 Walter Bright changed: What|Removed |Added Severity|major |enhancement --

[Issue 16334] dmd producing invalid OMF file

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16334 Walter Bright changed: What|Removed |Added CC|

[Issue 11869] Optlink doesn't detects strings duplicate

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11869 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17881] Provide mechanism to preallocate memory from the GC

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17881 --- Comment #10 from Andrei Alexandrescu --- (In reply to Steven Schveighoffer from comment #8) > What I am looking for, > though, is the high-level API of "I have 20 million T's I want to allocate, > give me them properly

Re: Note from a donor

2017-10-24 Thread solidstate1991 via Digitalmars-d
On Tuesday, 24 October 2017 at 13:37:09 UTC, rikki cattermole wrote: On 24/10/2017 2:25 PM, Mike Parker wrote: On Tuesday, 24 October 2017 at 13:20:10 UTC, Andrei Alexandrescu wrote: * better dll support for Windows. This one is on a lot of wish lists. It definitely needs to be a target

Re: Note from a donor

2017-10-24 Thread Andre Pany via Digitalmars-d
On Tuesday, 24 October 2017 at 20:27:26 UTC, Adam Wilson wrote: On 10/24/17 07:14, Kagamin wrote: On Tuesday, 24 October 2017 at 13:20:10 UTC, Andrei Alexandrescu wrote: * RSA Digital Signature Validation in Phobos https://issues.dlang.org/show_bug.cgi?id=16510 the blocker for botan was

Re: Unit Testing in Action

2017-10-24 Thread Walter Bright via Digitalmars-d-announce
On 10/23/2017 4:44 AM, Martin Nowak wrote: On Saturday, 21 October 2017 at 22:50:51 UTC, Walter Bright wrote: Coverage would give: 1|    x = 2; 2|    if (x == 1 || x == 2) I.e. the second line gets an execution count of 2. By contrast, 1|    x = 1; 1|    if (x == 1 || x == 2) Interesting

Re: My two cents

2017-10-24 Thread Rainer Schuetze via Digitalmars-d
On 23.10.2017 22:47, Walter Bright wrote: On 10/18/2017 1:56 AM, Satoshi wrote: Unable to publish closed source library without workaround and ugly PIMPL design. Consider this: --- file s.d   struct S {     int x;     this(int x) { this.x = x; }     int getX() {

Re: Named arguments

2017-10-24 Thread H. S. Teoh via Digitalmars-d
On Tue, Oct 24, 2017 at 01:22:41PM -0600, Jonathan M Davis via Digitalmars-d wrote: [...] > Personally, I don't want them in D. If you have enough arguments that > it matters, then the function probably has too many parameters or too > many similar parameters. If a function has too many

Re: My two cents

2017-10-24 Thread Walter Bright via Digitalmars-d
On 10/24/2017 3:36 AM, Satoshi wrote: Can you provide an example? I'd start with https://dlang.org/spec/interface.html You'll see the same thing with Windows COM programming, and using interfaces in Java. view.di interface View { void render(); } View createView();

Re: Named arguments

2017-10-24 Thread jmh530 via Digitalmars-d
On Tuesday, 24 October 2017 at 19:22:41 UTC, Jonathan M Davis wrote: Personally, I don't want them in D. If you have enough arguments that it matters, then the function probably has too many parameters or too many similar parameters. And as a library writer, I don't want to have the

Re: Note from a donor

2017-10-24 Thread Adam Wilson via Digitalmars-d
On 10/24/17 07:14, Kagamin wrote: On Tuesday, 24 October 2017 at 13:20:10 UTC, Andrei Alexandrescu wrote: * RSA Digital Signature Validation in Phobos https://issues.dlang.org/show_bug.cgi?id=16510 the blocker for botan was OMF support. IMO, the correct solution here is to deprecate OMF and

Re: iopipe alpha 0.0.1 version

2017-10-24 Thread Dmitry Olshansky via Digitalmars-d-announce
On Tuesday, 24 October 2017 at 19:05:02 UTC, Martin Nowak wrote: On Tuesday, 24 October 2017 at 14:47:02 UTC, Steven Schveighoffer wrote: iopipe provides "infinite" lookahead, which is central to its purpose. The trouble with bolting that on top of ranges, as you said, is that we have to copy

Re: My two cents

2017-10-24 Thread Jonathan M Davis via Digitalmars-d
On Monday, October 23, 2017 13:18:21 Guillaume Piolat via Digitalmars-d wrote: > On Monday, 23 October 2017 at 11:39:58 UTC, Martin Nowak wrote: > >> Every-symbol-public-by-default in Posix is annoying though :) > > > > We agreed on hidden visibility by default for everything that's > > not

Re: My two cents

2017-10-24 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 24, 2017 18:53:49 Martin Nowak via Digitalmars-d wrote: > On Monday, 23 October 2017 at 13:18:21 UTC, Guillaume Piolat > > wrote: > >> By any means, if someone wants to help here, get in touch with > >> Benjamin Thaut and me. > >> This has been lingering around for way to long,

Re: Named arguments

2017-10-24 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, October 24, 2017 17:30:27 Andrey via Digitalmars-d wrote: > Hello, why there are no named arguments for functions like, for > > example, in kotlin i.e.: > > int sum(in int a, in int b) { > > > > return a + b; > > > > } > > > > sum(a = 1, b = 2); Named arguments are not something

Re: iopipe alpha 0.0.1 version

2017-10-24 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 24 October 2017 at 14:47:02 UTC, Steven Schveighoffer wrote: iopipe provides "infinite" lookahead, which is central to its purpose. The trouble with bolting that on top of ranges, as you said, is that we have to copy everything out of the range, which necessarily buffers somehow

Re: My two cents

2017-10-24 Thread Martin Nowak via Digitalmars-d
On Monday, 23 October 2017 at 11:58:14 UTC, Laeeth Isharc wrote: Bountysource went quiet, though I started contributing to it. I wonder if there is a better way for commercial users to say what they might be willing to pay for and how much. At best talk to Andrei, maybe you have a good idea

Re: My two cents

2017-10-24 Thread Martin Nowak via Digitalmars-d
On Monday, 23 October 2017 at 13:18:21 UTC, Guillaume Piolat wrote: By any means, if someone wants to help here, get in touch with Benjamin Thaut and me. This has been lingering around for way to long, and Benjamin alone has a hard time pushing this. Would Bountysource help be adequate? Not

Re: My two cents

2017-10-24 Thread Martin Nowak via Digitalmars-d
On Tuesday, 24 October 2017 at 09:56:50 UTC, rikki cattermole wrote: scope+ref+out as arguments would be a no-no. Now if we could ditch registers usage crossing before/after yield, we wouldn't need to do 'patching' like fibers do. That's basically what asnyc/await does, some implementations

Re: Note from a donor

2017-10-24 Thread Joakim via Digitalmars-d
On Tuesday, 24 October 2017 at 17:31:06 UTC, Ali Çehreli wrote: On 10/24/2017 09:37 AM, H. S. Teoh wrote: > On Tue, Oct 24, 2017 at 09:20:10AM -0400, Andrei Alexandrescu via Digitalmars-d wrote: >> A person who donated to the Foundation made a small wish list known. >> Allow me to relay it: >>

Re: Address problem

2017-10-24 Thread Ali Çehreli via Digitalmars-d-learn
On 10/24/2017 10:47 AM, Gheorghe Gabriel wrote: > writeln(&_i); That's the address of the local variable _i. You can think of class (and interface) variables as pointers to class objects. > I need that I["s"] to have the same address like c. The way to get the address of the

[Issue 17901] FreeBSD 10.3: AssertError@std/experimental/allocator/building_blocks/region.d(652)

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17901 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17901] FreeBSD 10.3: AssertError@std/experimental/allocator/building_blocks/region.d(652)

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17901 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/71ed13678d682c0cc446067703cb0e464e7ff2ac Fix issue 17901 - FreeBSD SbrkRegion alignment

Re: writeln double precision

2017-10-24 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Oct 24, 2017 at 04:59:04PM +, jmh530 via Digitalmars-d-learn wrote: > On Tuesday, 24 October 2017 at 16:18:03 UTC, H. S. Teoh wrote: > > > > I have never seen a programming language in which dividing two > > integers yields a float or double. Either numbers default to a > > floating

Re: So why double to float conversion is implicit ?

2017-10-24 Thread Andrei Alexandrescu via Digitalmars-d
On 10/24/2017 12:28 PM, Fool wrote: On Tuesday, 24 October 2017 at 14:28:20 UTC, Basile B. wrote:     float f0 = cos(2 * PI /  1.123548789545545646452154L);     float f1 = cos(cast(float)(2 * PI / 1.123548789545545646452154L)); [...] but paradoxically the first is more accurate. There is no

Address problem

2017-10-24 Thread Gheorghe Gabriel via Digitalmars-d-learn
Hi, --- interface I { } I[string] i; class C : I { this() { i["s"] = this; foreach (_i; i) { writeln(&_i); } foreach (ref _i; i) { writeln(&_i); } } } void main() { C c =

Named arguments

2017-10-24 Thread Andrey via Digitalmars-d
Hello, why there are no named arguments for functions like, for example, in kotlin i.e.: int sum(in int a, in int b) { return a + b; } sum(a = 1, b = 2);

Re: Note from a donor

2017-10-24 Thread Ali Çehreli via Digitalmars-d
On 10/24/2017 09:37 AM, H. S. Teoh wrote: > On Tue, Oct 24, 2017 at 09:20:10AM -0400, Andrei Alexandrescu via Digitalmars-d wrote: >> A person who donated to the Foundation made a small wish list known. >> Allow me to relay it: >> >> * RSA Digital Signature Validation in Phobos > [...] > > This

Re: writeln double precision

2017-10-24 Thread Ali Çehreli via Digitalmars-d-learn
On 10/24/2017 09:59 AM, Arun Chandrasekaran wrote: >>> On Monday, 23 October 2017 at 18:08:43 UTC, Ali Çehreli wrote: >>> > The rule is that every expression has a type and 22/7 is int. > I'm just questioning the reasoning behind why D does it this way and if > it is for compatibility or if

Re: My two cents

2017-10-24 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 24 October 2017 at 16:02:56 UTC, flamencofantasy wrote: On Tuesday, 24 October 2017 at 05:40:06 UTC, Dmitry Olshansky wrote: On Tuesday, 24 October 2017 at 04:26:42 UTC, Adam Wilson wrote: [...] I’ll throw in my 2 rubbles. I actually worked on a VM that has async/await feature

Re: writeln double precision

2017-10-24 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 24 October 2017 at 16:18:03 UTC, H. S. Teoh wrote: I have never seen a programming language in which dividing two integers yields a float or double. Either numbers default to a floating point type, in which case you begin with floats in the first place, or division is integer

Re: writeln double precision

2017-10-24 Thread Arun Chandrasekaran via Digitalmars-d-learn
On Tuesday, 24 October 2017 at 16:18:03 UTC, H. S. Teoh wrote: On Tue, Oct 24, 2017 at 10:02:11AM +, Arun Chandrasekaran via Digitalmars-d-learn wrote: On Monday, 23 October 2017 at 18:08:43 UTC, Ali Çehreli wrote: > On 10/23/2017 07:22 AM, Arun Chandrasekaran wrote: > > [...] > The rule is

Re: Note from a donor

2017-10-24 Thread H. S. Teoh via Digitalmars-d
On Tue, Oct 24, 2017 at 09:20:10AM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > A person who donated to the Foundation made a small wish list known. > Allow me to relay it: > > * RSA Digital Signature Validation in Phobos [...] This is going to be a tricky one. I'm very wary of

Re: writeln double precision

2017-10-24 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Oct 24, 2017 at 10:02:11AM +, Arun Chandrasekaran via Digitalmars-d-learn wrote: > On Monday, 23 October 2017 at 18:08:43 UTC, Ali Çehreli wrote: > > On 10/23/2017 07:22 AM, Arun Chandrasekaran wrote: > > > [...] > > The rule is that every expression has a type and 22/7 is int. > >

Re: So why double to float conversion is implicit ?

2017-10-24 Thread Fool via Digitalmars-d
On Tuesday, 24 October 2017 at 14:28:20 UTC, Basile B. wrote: float f0 = cos(2 * PI / 1.123548789545545646452154L); float f1 = cos(cast(float)(2 * PI / 1.123548789545545646452154L)); [...] but paradoxically the first is more accurate. There is no paradox. That's comparing apples

Re: My two cents

2017-10-24 Thread flamencofantasy via Digitalmars-d
On Tuesday, 24 October 2017 at 05:40:06 UTC, Dmitry Olshansky wrote: On Tuesday, 24 October 2017 at 04:26:42 UTC, Adam Wilson wrote: [...] I’ll throw in my 2 rubbles. I actually worked on a VM that has async/await feature built-in (Dart language). It is a plain syntax sugar for

Re: So why double to float conversion is implicit ?

2017-10-24 Thread Basile B. via Digitalmars-d
On Saturday, 21 October 2017 at 20:17:12 UTC, NX wrote: I was working on some sort of math library for use in graphical computing and I wrote something like this: const float PiOver2 = (atan(1.0) * 4) / 2; Interestingly enough, I realized that atan() returns double (in this case) but wait,

Re: Caching D compiler - preview version

2017-10-24 Thread Dmitry Olshansky via Digitalmars-d-announce
On Tuesday, 24 October 2017 at 14:17:32 UTC, Dmitry Olshansky wrote: On Tuesday, 24 October 2017 at 13:29:12 UTC, Mike Parker wrote: On Tuesday, 24 October 2017 at 13:19:15 UTC, Dmitry Olshansky wrote: What is dcache? It's a patch for dmd that enables a *persistent* shared-memory hash-map,

Re: iopipe alpha 0.0.1 version

2017-10-24 Thread Steven Schveighoffer via Digitalmars-d-announce
On 10/24/17 5:32 AM, Martin Nowak wrote: On Monday, 23 October 2017 at 16:34:19 UTC, Steven Schveighoffer wrote: On 10/21/17 6:33 AM, Martin Nowak wrote: On 10/19/2017 03:12 PM, Steven Schveighoffer wrote: On 10/19/17 7:13 AM, Martin Nowak wrote: On 10/13/2017 08:39 PM, Steven Schveighoffer

Re: LDC 1.5.0-beta1

2017-10-24 Thread kinke via Digitalmars-d-announce
On Monday, 23 October 2017 at 22:43:15 UTC, Guillaume Piolat wrote: So far my benchmark scripts are Windows-only so no LTO is available AFAIK. I can work on providing such measures (or any flags you want) on OSX in the future. I performed an extremely rudimentary -flto=full test on Win64 for

[Issue 17933] New: Warn in case of implicit truncating float conversion

2017-10-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17933 Issue ID: 17933 Summary: Warn in case of implicit truncating float conversion Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: Advice requested for fixing issue 17914

2017-10-24 Thread Steven Schveighoffer via Digitalmars-d
On 10/23/17 12:56 PM, Brian Schott wrote: Context: https://issues.dlang.org/show_bug.cgi?id=17914 I need to get this issue resolved as soon as possible so that the fix makes it into the next compiler release. Because it involves cleanup code in a class destructor a design change may be

Re: So why double to float conversion is implicit ?

2017-10-24 Thread Basile B. via Digitalmars-d
On Tuesday, 24 October 2017 at 01:22:57 UTC, codephantom wrote: On Monday, 23 October 2017 at 21:51:24 UTC, Basile B. wrote: --- /** * Wraps a floating point type that doesn't follow D permissive float conversion * rules. * * In D, as in C++, implicit conversion from $(D double) to $(D

Re: LDC 1.5.0-beta1

2017-10-24 Thread Guillaume Piolat via Digitalmars-d-announce
On Monday, 23 October 2017 at 22:57:00 UTC, Nicholas Wilson wrote: would it help to have them grouped/filterable by category? e.g. $ldc2 -help-hidden=category Perhaps, but the sheer amount of customizability makes you wish for a superoptimizer for compiler flags (hard to do this generically

  1   2   >