arsd errors on windows

2019-10-16 Thread Greatsam4sure via Digitalmars-d-learn
from my project root directory dub add arsd-official This is added to dub.json "arsd-official": "~>4.0.3" just run the project gives Fetching arsd-official 4.0.3 (getting selected version)... Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86_64. arsd-official:cgi 4.0.3:

Re: std.algorithm.cmp doesn't seem to support numeric types?

2019-10-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 16 October 2019 at 21:34:35 UTC, Dennis wrote: Except that e.g. -2 - int.max underflows to int.max suggesting that int.max < -2. Eh yeah, it would be something you should check in opCmp. But this is how it is actually implemented on the processor itself, just the cpu happens to

Re: std.algorithm.cmp doesn't seem to support numeric types?

2019-10-16 Thread Ali Çehreli via Digitalmars-d-learn
On 10/16/2019 02:34 PM, Dennis wrote: > Except that e.g. -2 - int.max underflows to int.max suggesting that > int.max < -2. Timon had corrected me on that point a while back, so I had added the following warning at http://ddili.org/ders/d.en/operator_overloading.html#ix_operator_overloading.

Re: std.algorithm.cmp doesn't seem to support numeric types?

2019-10-16 Thread Dennis via Digitalmars-d-learn
On Wednesday, 16 October 2019 at 20:07:10 UTC, Adam D. Ruppe wrote: Notice that the docs say "a negative value" rather than -1 specifically. That's because the implementation for integers an be as simple as return a - b; // if b > a, you get a negative value Except that e.g. -2 - int.max und

Re: std.algorithm.cmp doesn't seem to support numeric types?

2019-10-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 16 October 2019 at 19:25:18 UTC, DNoob wrote: I'm just learning D, so it's very possible that I'm missing a more appropriate function that exists elsewhere, but basically I found today that while I could easily write a cmp function that worked for everything, the one in std.algori

Re: std.algorithm.cmp doesn't seem to support numeric types?

2019-10-16 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 16 October 2019 at 19:25:18 UTC, DNoob wrote: I'm just learning D, so it's very possible that I'm missing a more appropriate function that exists elsewhere, but basically I found today that while I could easily write a cmp function that worked for everything, the one in std.algori

std.algorithm.cmp doesn't seem to support numeric types?

2019-10-16 Thread DNoob via Digitalmars-d-learn
I'm just learning D, so it's very possible that I'm missing a more appropriate function that exists elsewhere, but basically I found today that while I could easily write a cmp function that worked for everything, the one in std.algorithm doesn't seem to: import std.stdio, std.algorithm; pure

Re: Uninstalling DMG file

2019-10-16 Thread Jacob Carlborg via Digitalmars-d-learn
On 2019-10-16 05:30, Joel wrote: Everything seems to be working again - yay! Great. If you see a lot of warnings when linking, I have a PR for that [1]. [1] https://github.com/dlang/dmd/pull/10476 -- /Jacob Carlborg

Re: A proper WAT moment

2019-10-16 Thread Jacob Carlborg via Digitalmars-d-learn
On 2019-10-15 09:06, John Colvin wrote: And all the other ones in my example that access members without an instance that also compile? There's something pretty strange about the rules here. The thing is that it should be possible to access a non-static member without an instance because it

Re: struct Foo may not define both a rvalue constructor and a copy constructor

2019-10-16 Thread drug via Digitalmars-d-learn
On 10/16/19 6:40 PM, rikki cattermole wrote: On 17/10/2019 4:29 AM, drug wrote: struct Foo { this(ref const(Foo) other) {} this(const(Foo) other) {} } I'm trying to update dmd version and starting from 2.086 my code doesn't compile due to the error above. What is the reason of that?

Re: Undefined symbol: _dyld_enumerate_tlv_storage (OSX)

2019-10-16 Thread nazriel via Digitalmars-d-learn
On Friday, 11 October 2019 at 11:38:27 UTC, Jacob Carlborg wrote: On 2019-10-10 20:12, Robert M. Münch wrote: I have two project I want to compile and both times get this error: Undefined symbols for architecture x86_64:  "_dyld_enumerate_tlv_storage", referenced from: __d_dyld_getTLSRa

Re: struct Foo may not define both a rvalue constructor and a copy constructor

2019-10-16 Thread rikki cattermole via Digitalmars-d-learn
On 17/10/2019 4:29 AM, drug wrote: struct Foo {     this(ref const(Foo) other) {}     this(const(Foo) other) {} } I'm trying to update dmd version and starting from 2.086 my code doesn't compile due to the error above. What is the reason of that? Copy constructors were added (sort of like p

struct Foo may not define both a rvalue constructor and a copy constructor

2019-10-16 Thread drug via Digitalmars-d-learn
struct Foo { this(ref const(Foo) other) {} this(const(Foo) other) {} } I'm trying to update dmd version and starting from 2.086 my code doesn't compile due to the error above. What is the reason of that? Is it temporarily situation?

Re: Blog Post #79: Notebook, Part III - Customized Tabs, Part I

2019-10-16 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 16 October 2019 at 07:46:42 UTC, Antonio Corbi wrote: Hope this helps. Thanks, Antonio. I'll check this out. I'll work up a demo based on this stuff and put it in the gtkdcoding queue.

How to write correct multi-threaded code?

2019-10-16 Thread Andrey Zherikov via Digitalmars-d-learn
I'm trying to write multi-threaded code that uses mutexes, condition variables and atomics but I've got confused how to do this correctly. Everything I found so far include a lot of casting to/from shared even for the objects that are supposed to be shared (like mutex and condition variable).

Re: Mixin and introspection ordering

2019-10-16 Thread Dennis via Digitalmars-d-learn
On Wednesday, 16 October 2019 at 10:09:51 UTC, Sebastiaan Koppe wrote: Do we want to be able to catch things in their 'before' state? Or is it a bug? The 'before' and 'after' are implementation details showing up as a result of underspecification. Module level declarations are supposed to be

Re: Mixin and introspection ordering

2019-10-16 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Tuesday, 15 October 2019 at 19:50:33 UTC, Paul Backus wrote: On Tuesday, 15 October 2019 at 19:19:58 UTC, Sebastiaan Koppe wrote: You would expect 2 to print `tuple(a)` as well, but it doesn't. Don't know if it is a bug. Any time you use a construct that mutates the AST (template mixin, st

Re: Blog Post #79: Notebook, Part III - Customized Tabs, Part I

2019-10-16 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 15 October 2019 at 22:02:35 UTC, WebFreak001 wrote: On Tuesday, 15 October 2019 at 20:03:00 UTC, Ron Tarrant wrote: ... Do you have links for these? thanks! :p both the packages can simply be found on dub: https://code.dlang.org/search?q=glade Not sure if there are other ways