Re: D is crap

2016-07-02 Thread rikki cattermole via Digitalmars-d
Here is what I'm going to say and people will probably just reiterate it. 1) Report problems. Can't be fixed if we don't know it. 2) We're working on it. No really, I get it, you want to have a GUI toolkit yesterday but I don't think you understand just how expensive it is dependency wise. Its

D is crap

2016-07-02 Thread D is crap via Digitalmars-d
Sorry, I've spend the last month trying my best to get simple shit done. At every turn there is some problem that has to be dealt with that is unrelated to my actual work. Be it the IDE, debugging, the library, or user shared code, it is just crap. D cannot be used successfully for semi-large

[Issue 16228] Insufficient diagnostics for wrong application of DIP25

2016-07-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16228 --- Comment #2 from Walter Bright --- BTW, you'll see errors diagnosed if @safe is added. Leaving off @safe disables safety checks. --

[OT] Checked opCast

2016-07-02 Thread Timon Gehr via Digitalmars-d
On 02.07.2016 14:26, Andrei Alexandrescu wrote: How would you reshape this? It's important that the call to hook is physically at the end of the function and issued just in that place, and that the code does not do any redundant work. U hook(U, T)(T value) { return U.init; } U opCast(U, T)(T

Re: Passing structs to functions

2016-07-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 2 July 2016 at 21:23:57 UTC, Namespace wrote: passing by value is only a good solution if your struct is really small. It's not uncommon for optimizers to generate the same code either way regardless of what you write.

[Issue 16228] Insufficient diagnostics for wrong application of DIP25

2016-07-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16228 Walter Bright changed: What|Removed |Added Keywords||pull, safe

Re: Stacking policies

2016-07-02 Thread ZombineDev via Digitalmars-d
On Saturday, 2 July 2016 at 21:37:12 UTC, ZombineDev wrote: On Saturday, 2 July 2016 at 20:48:51 UTC, Andrei Alexandrescu wrote: So I'm working on this checked integral thing and starting to really get into the possibilities offered by DbI. One core operation is "stacking" two policies on top

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 2 July 2016 at 15:15:39 UTC, Guillaume Boucher wrote: U opCast(U, T)(T payload) { import std.traits; enum Tsizeof = is(T==bool) ? 0 : T.sizeof; enum Usizeof = is(U==bool) ? 0 : U.sizeof; enum noCheck = isUnsigned!T == isUnsigned!U && Tsizeof <=

Re: integral to floating point conversion

2016-07-02 Thread Simen Kjaeraas via Digitalmars-d
On Saturday, 2 July 2016 at 20:49:27 UTC, Andrei Alexandrescu wrote: On 7/2/16 4:30 PM, Walter Bright wrote: On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote: So what's the fastest way to figure that an integral is convertible to a floating point value precisely (i.e. no other integral converts

Re: Stacking policies

2016-07-02 Thread ZombineDev via Digitalmars-d
On Saturday, 2 July 2016 at 20:48:51 UTC, Andrei Alexandrescu wrote: So I'm working on this checked integral thing and starting to really get into the possibilities offered by DbI. One core operation is "stacking" two policies on top of each other, i.e. an operation is first offered to the

Re: integral to floating point conversion

2016-07-02 Thread ketmar via Digitalmars-d
On Saturday, 2 July 2016 at 20:17:59 UTC, Andrei Alexandrescu wrote: So what's the fastest way to figure that an integral is convertible to a floating point value precisely (i.e. no other integral converts to the same floating point value)? Thanks! -- Andrei bool isConvertible(T) (long n)

Re: Passing structs to functions

2016-07-02 Thread Namespace via Digitalmars-d-learn
Just for you, a slightly adapted version: import std.stdio; struct A { public int id = 0; this(int id) { this.id = id; } ref A byRef() { return this; } } void foo(ref const A a) {

Re: integral to floating point conversion

2016-07-02 Thread Walter Bright via Digitalmars-d
On 7/2/2016 1:49 PM, Andrei Alexandrescu wrote: On 7/2/16 4:30 PM, Walter Bright wrote: On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote: So what's the fastest way to figure that an integral is convertible to a floating point value precisely (i.e. no other integral converts to the same floating

Re: Passing structs to functions

2016-07-02 Thread Namespace via Digitalmars-d-learn
On Saturday, 2 July 2016 at 21:19:04 UTC, ketmar wrote: On Saturday, 2 July 2016 at 21:17:33 UTC, Namespace wrote: On Saturday, 2 July 2016 at 21:15:29 UTC, ketmar wrote: On Saturday, 2 July 2016 at 21:05:18 UTC, Namespace wrote: Try this little trick: or don't. such pointers to structs are

Re: integral to floating point conversion

2016-07-02 Thread MakersF via Digitalmars-d
On Saturday, 2 July 2016 at 20:49:27 UTC, Andrei Alexandrescu wrote: On 7/2/16 4:30 PM, Walter Bright wrote: On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote: So what's the fastest way to figure that an integral is convertible to a floating point value precisely (i.e. no other integral converts

Re: Passing structs to functions

2016-07-02 Thread ketmar via Digitalmars-d-learn
On Saturday, 2 July 2016 at 21:17:33 UTC, Namespace wrote: On Saturday, 2 July 2016 at 21:15:29 UTC, ketmar wrote: On Saturday, 2 July 2016 at 21:05:18 UTC, Namespace wrote: Try this little trick: or don't. such pointers to structs are *dangerous*. Either that "dangerous" thing or 2^N

Re: Passing structs to functions

2016-07-02 Thread ketmar via Digitalmars-d-learn
On Saturday, 2 July 2016 at 20:40:00 UTC, Adam D. Ruppe wrote: Using ref is wasteful there regardless just take an ordinary Point (even const is optional if it is all value but it doesn't hurt). I think a lot of C++ programmers overuse references. If you're passing a large thing, it

Re: Passing structs to functions

2016-07-02 Thread Namespace via Digitalmars-d-learn
On Saturday, 2 July 2016 at 21:15:29 UTC, ketmar wrote: On Saturday, 2 July 2016 at 21:05:18 UTC, Namespace wrote: Try this little trick: or don't. such pointers to structs are *dangerous*. Either that "dangerous" thing or 2^N template bloat.

Re: Passing structs to functions

2016-07-02 Thread ketmar via Digitalmars-d-learn
On Saturday, 2 July 2016 at 21:05:18 UTC, Namespace wrote: Try this little trick: or don't. such pointers to structs are *dangerous*.

Re: Passing structs to functions

2016-07-02 Thread Namespace via Digitalmars-d-learn
On Saturday, 2 July 2016 at 19:40:53 UTC, phant0m wrote: On Saturday, 2 July 2016 at 19:25:37 UTC, ketmar wrote: note the first "()", though: this is effectively a template function, which compiler will instantiate either with "ref" or without it. Yeah, I've noticed it. Always using function

Re: integral to floating point conversion

2016-07-02 Thread Andrei Alexandrescu via Digitalmars-d
On 7/2/16 4:30 PM, Walter Bright wrote: On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote: So what's the fastest way to figure that an integral is convertible to a floating point value precisely (i.e. no other integral converts to the same floating point value)? Thanks! -- Andrei Test that its

Stacking policies

2016-07-02 Thread Andrei Alexandrescu via Digitalmars-d
So I'm working on this checked integral thing and starting to really get into the possibilities offered by DbI. One core operation is "stacking" two policies on top of each other, i.e. an operation is first offered to the first one, and then the second one. Here's an excerpt: struct

Re: Passing structs to functions

2016-07-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 2 July 2016 at 20:24:12 UTC, phant0m wrote: I took a simple task (for D learning purposes): to implement a Point template "class" (something like Qt's QPoint). Using ref is wasteful there regardless just take an ordinary Point (even const is optional if it is all value but

Re: integral to floating point conversion

2016-07-02 Thread Walter Bright via Digitalmars-d
On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote: So what's the fastest way to figure that an integral is convertible to a floating point value precisely (i.e. no other integral converts to the same floating point value)? Thanks! -- Andrei Test that its absolute value is <= the largest unsigned

Re: Passing structs to functions

2016-07-02 Thread phant0m via Digitalmars-d-learn
On Saturday, 2 July 2016 at 19:46:53 UTC, Adam D. Ruppe wrote: On Saturday, 2 July 2016 at 18:37:06 UTC, phant0m wrote: How should I pass a struct variable in D effectively? Passing by value is often the most efficient. It depends on what exactly you have in the struct. From the point of

integral to floating point conversion

2016-07-02 Thread Andrei Alexandrescu via Digitalmars-d
So what's the fastest way to figure that an integral is convertible to a floating point value precisely (i.e. no other integral converts to the same floating point value)? Thanks! -- Andrei

scone v1.1.0

2016-07-02 Thread vladdeSV via Digitalmars-d-announce
//scone, Simple Console Engine is a Windows console API, made for easier CLI application development. https://github.com/vladdeSV/scone Today, at v1.1.0, some pretty big additions for scone were introduced, the two main points being * UI libray * Localization Biggest addition is the UI

Re: Passing structs to functions

2016-07-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 2 July 2016 at 18:37:06 UTC, phant0m wrote: How should I pass a struct variable in D effectively? Passing by value is often the most efficient. It depends on what exactly you have in the struct.

Re: Passing structs to functions

2016-07-02 Thread phant0m via Digitalmars-d-learn
On Saturday, 2 July 2016 at 19:25:37 UTC, ketmar wrote: note the first "()", though: this is effectively a template function, which compiler will instantiate either with "ref" or without it. Yeah, I've noticed it. Always using function template for this use case seems like a weird idea.

Re: Passing structs to functions

2016-07-02 Thread ketmar via Digitalmars-d-learn
On Saturday, 2 July 2016 at 18:47:31 UTC, phant0m wrote: On Saturday, 2 July 2016 at 18:43:51 UTC, ketmar wrote: void boo() (in auto ref MyStruct s) { ... } this will accept both lvalues and rvalues, and will avoid copying if it can. Thank you! Could you please explain what does "auto" in

Re: Passing structs to functions

2016-07-02 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Jul 02, 2016 at 06:47:31PM +, phant0m via Digitalmars-d-learn wrote: > On Saturday, 2 July 2016 at 18:43:51 UTC, ketmar wrote: > > void boo() (in auto ref MyStruct s) { ... } > > > > this will accept both lvalues and rvalues, and will avoid copying if > > it can. > > Thank you! Could

Re: Bug in D type inferencing

2016-07-02 Thread Hiemlick Hiemlicker via Digitalmars-d
On Saturday, 2 July 2016 at 08:02:30 UTC, John Colvin wrote: On Saturday, 2 July 2016 at 01:20:35 UTC, Hiemlick Hiemlicker wrote: public struct Foo { public void Create(T)(uint delegate(T) c, T param) { } } Foo f; f.Create((x) { }, "asdf"); cannot deduce

Re: Thunking problems with arch issues

2016-07-02 Thread Hiemlick Hiemlicker via Digitalmars-d-learn
On Saturday, 2 July 2016 at 01:51:03 UTC, rikki cattermole wrote: Couple of things could be happening. 1) Alignments are off, aligning of data really really matters Where? I rewrote the code to use size_t and same problem. If alignments were off chances are it wouldn't exhibit the issues in

Re: Passing structs to functions

2016-07-02 Thread phant0m via Digitalmars-d-learn
On Saturday, 2 July 2016 at 18:43:51 UTC, ketmar wrote: void boo() (in auto ref MyStruct s) { ... } this will accept both lvalues and rvalues, and will avoid copying if it can. Thank you! Could you please explain what does "auto" in this context mean?

Re: Passing structs to functions

2016-07-02 Thread ketmar via Digitalmars-d-learn
void boo() (in auto ref MyStruct s) { ... } this will accept both lvalues and rvalues, and will avoid copying if it can.

Passing structs to functions

2016-07-02 Thread phant0m via Digitalmars-d-learn
I came from a C++ world, so I'm used to passing structs by a const reference (I mean the case, where a function argument isn't changed by the function). C++ allows passing a temporary (rvalue) to a function, which accepts a const reference. D doesn't allow this. All I have found is a message

unit-threaded v0.6.19 - preliminary support for property-based testing

2016-07-02 Thread Atila Neves via Digitalmars-d-announce
http://code.dlang.org/packages/unit-threaded After merging code from Robert's fork I added some support for property-based testing. There's no shrinking yet and user-defined types aren't supported. Right now most if not all primitive types are, as well as string, wstring, dstring and arrays

Re: static __gshared struct

2016-07-02 Thread Hiemlick Hiemlicker via Digitalmars-d-learn
On Saturday, 2 July 2016 at 03:54:26 UTC, Mike Parker wrote: On Saturday, 2 July 2016 at 00:08:10 UTC, Hiemlick Hiemlicker wrote: I use a struct with static members so I do not have to instantiate it. It is essentially a singleton. I want all the variables to be __gshared. I guess I have

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Andrei Alexandrescu via Digitalmars-d
On 07/02/2016 11:15 AM, Guillaume Boucher wrote: Your function does redundant work. E.g. opCast!(int, ubyte) should not require any checks. I also don't understand why opCast!(int, ubyte) is not allowed. It's an adapted fragment from a larger function that handles other cases separately. --

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Johan Engelen via Digitalmars-d
On Saturday, 2 July 2016 at 14:03:29 UTC, Andrei Alexandrescu wrote: Nice, thanks. I've tried to not rely too much on mixing statically-known and dynamically-known Boolean expressions. Can I safely assume that all compilers will generate good code for such? I'd be very surprised if not

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Guillaume Boucher via Digitalmars-d
On Saturday, 2 July 2016 at 15:15:39 UTC, Guillaume Boucher wrote: E.g. opCast!(int, ubyte) should not require any checks. Or opCast!(long, int) and opCast!(int, int).

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Guillaume Boucher via Digitalmars-d
On Saturday, 2 July 2016 at 12:26:34 UTC, Andrei Alexandrescu wrote: How would you reshape this? It's important that the call to hook is physically at the end of the function and issued just in that place, and that the code does not do any redundant work. Your function does redundant work.

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Andrei Alexandrescu via Digitalmars-d
On 07/02/2016 09:23 AM, Johan Engelen wrote: On Saturday, 2 July 2016 at 12:26:34 UTC, Andrei Alexandrescu wrote: How would you reshape this? Maybe: U opCast(U, T)(T payload) { import std.traits; enum descriptiveName = !isUnsigned!T && isUnsigned!U && T.sizeof <= U.sizeof;

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Johan Engelen via Digitalmars-d
On Saturday, 2 July 2016 at 12:26:34 UTC, Andrei Alexandrescu wrote: How would you reshape this? Maybe: U opCast(U, T)(T payload) { import std.traits; enum descriptiveName = !isUnsigned!T && isUnsigned!U && T.sizeof <= U.sizeof; enum unsT_sigU = isUnsigned!T && !isUnsigned!U;

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Andrei Alexandrescu via Digitalmars-d
On 07/02/2016 02:45 AM, Patrick Schluter wrote: On Friday, 1 July 2016 at 20:09:30 UTC, Andrei Alexandrescu wrote: On 7/1/16 3:43 PM, Patrick Schluter wrote: On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16224 -- Andrei That

Re: Implementing a cache

2016-07-02 Thread Lodovico Giaretta via Digitalmars-d-learn
On Saturday, 2 July 2016 at 12:10:28 UTC, qznc wrote: I want to implement some caching for HTTP GET requests. Basically a map of URL to content. A cache needs some additional meta data (size, age, etc). There seem to be two basic data structures available: Associative array (AA) or red black

Re: Properties for unittests

2016-07-02 Thread Seb via Digitalmars-d
On Saturday, 2 July 2016 at 11:50:15 UTC, qznc wrote: On Saturday, 2 July 2016 at 11:27:57 UTC, Lodovico Giaretta wrote: On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta wrote: What emerged in a previous thread[1], unittests that can't be @safe have to be explicitly marked @system,

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Saturday, 2 July 2016 at 07:04:28 UTC, Patrick Schluter wrote: On Friday, 1 July 2016 at 20:30:30 UTC, Steven Schveighoffer wrote: On 7/1/16 4:08 PM, Andrei Alexandrescu wrote: On 7/1/16 2:46 PM, Steven Schveighoffer wrote: On 7/1/16 2:15 PM, Andrei Alexandrescu wrote: On 7/1/16 2:05 PM,

Implementing a cache

2016-07-02 Thread qznc via Digitalmars-d-learn
I want to implement some caching for HTTP GET requests. Basically a map of URL to content. A cache needs some additional meta data (size, age, etc). There seem to be two basic data structures available: Associative array (AA) or red black tree (RBT). With AA cache eviction is inefficient.

Re: -dip25 switch: time to make it always on?

2016-07-02 Thread Walter Bright via Digitalmars-d
On 7/2/2016 2:55 AM, Dicebot wrote: I have submitted a short summary of that ng.learn thread here : https://issues.dlang.org/show_bug.cgi?id=16228 Thanks! I'll fix them. My overall opinion of DIP25 is that it must not become part of language mainline for two reasons: 1) Implementation is

Re: Properties for unittests

2016-07-02 Thread qznc via Digitalmars-d
On Saturday, 2 July 2016 at 11:27:57 UTC, Lodovico Giaretta wrote: On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta wrote: What emerged in a previous thread[1], unittests that can't be @safe have to be explicitly marked @system, so that it is obvious to the reader that the

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Chris via Digitalmars-d
On Friday, 1 July 2016 at 20:06:39 UTC, Andrei Alexandrescu wrote: What is the condition? -- Andrei `while`'s job is it to test for a condition and loop while the condition is true, even if the condition is `true` or `0`. So -cov does the right thing. It checks whether this part of the

Re: Properties for unittests

2016-07-02 Thread Lodovico Giaretta via Digitalmars-d
On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta wrote: What emerged in a previous thread[1], unittests that can't be @safe have to be explicitly marked @system, so that it is obvious to the reader that the functionalities tested are not @safe. [1]

Re: Properties for unittests

2016-07-02 Thread Lodovico Giaretta via Digitalmars-d
On Saturday, 2 July 2016 at 11:03:16 UTC, qznc wrote: In general, it is a good idea to make unittests @safe and @nogc in Phobos. When reviewing a pull request, we should check that. There is a pull request [0] which annotates @system. Why would you do that? Is that somehow a desirable thing?

Properties for unittests

2016-07-02 Thread qznc via Digitalmars-d
In general, it is a good idea to make unittests @safe and @nogc in Phobos. When reviewing a pull request, we should check that. There is a pull request [0] which annotates @system. Why would you do that? Is that somehow a desirable thing? Should a reviewer check for that? The spec for

Re: Does a Interpretation-Engine fit in phobos ?

2016-07-02 Thread Stefan Koch via Digitalmars-d
On Saturday, 2 July 2016 at 09:22:48 UTC, Joakim Brännström wrote: On Saturday, 2 July 2016 at 08:11:48 UTC, Stefan Koch wrote: The Bytecode interpreter is now CTFEable :) Good job Stefan. The PR looks really interesting. I'll be looking into using your engine I future projects so I hope

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 1 July 2016 at 20:08:30 UTC, Andrei Alexandrescu wrote: To remove that feedback would mess up someone else's use case. This argument is phony. Unconvinced. -- Andrei If you are hellbent on using a loop to execute a scope once, do something that makes it clear at the top of the

Re: DConf Videos

2016-07-02 Thread Dicebot via Digitalmars-d
>> I've reminded Dylan about it. Should be out soon, but no exact ETA. > > Still no word? Sorry for the waiting :( Aiming for the middle of coming week but that requires Dylan to not be distracted by something urgent and irrelevant.

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Dicebot via Digitalmars-d
On 07/01/2016 07:30 PM, Andrei Alexandrescu wrote: > https://issues.dlang.org/show_bug.cgi?id=16224 -- Andrei Works as it should, nothing to fix.

Re: -dip25 switch: time to make it always on?

2016-07-02 Thread Dicebot via Digitalmars-d
On 06/29/2016 02:53 PM, Walter Bright wrote: > On 6/29/2016 3:02 AM, Dicebot wrote: >> See this d.learn discussion >> (http://forum.dlang.org/thread/vtvtukooicwspxzzo...@forum.dlang.org) >> for example >> of diagnostics problems I am talking about. > > Please post bug reports to bugzilla. Brad

[Issue 16228] New: Insufficient diagnostics for wrong application of DIP25

2016-07-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16228 Issue ID: 16228 Summary: Insufficient diagnostics for wrong application of DIP25 Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Does a Interpretation-Engine fit in phobos ?

2016-07-02 Thread Joakim Brännström via Digitalmars-d
On Saturday, 2 July 2016 at 08:11:48 UTC, Stefan Koch wrote: The Bytecode interpreter is now CTFEable :) Good job Stefan. The PR looks really interesting. I'll be looking into using your engine I future projects so I hope that it will be available in some way or another :) // Joakim

[Issue 16227] New: std.numeric unit tests fail when run in isolation

2016-07-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16227 Issue ID: 16227 Summary: std.numeric unit tests fail when run in isolation Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor

Re: Does a Interpretation-Engine fit in phobos ?

2016-07-02 Thread Stefan Koch via Digitalmars-d
On Thursday, 30 June 2016 at 23:27:10 UTC, lobo wrote: On Thursday, 30 June 2016 at 11:09:10 UTC, ketmar wrote: On Thursday, 30 June 2016 at 10:36:44 UTC, qznc wrote: Off-topic: Is it possible/feasible/desirable to let dmd use dub packages? please, no. not everybody out there is dub fan.

Re: Bug in D type inferencing

2016-07-02 Thread John Colvin via Digitalmars-d
On Saturday, 2 July 2016 at 01:20:35 UTC, Hiemlick Hiemlicker wrote: public struct Foo { public void Create(T)(uint delegate(T) c, T param) { } } Foo f; f.Create((x) { }, "asdf"); cannot deduce arguments compiler error. Surely D can figure out that T is a

Re: string encryption

2016-07-02 Thread John Colvin via Digitalmars-d
On Friday, 1 July 2016 at 23:11:34 UTC, Hiemlick Hiemlicker wrote: On Friday, 1 July 2016 at 22:55:21 UTC, qznc wrote: On Friday, 1 July 2016 at 22:23:23 UTC, Hiemlick Hiemlicker wrote: It seems D won't replace encrypt("This string will still end up in the binary"); with

Re: Bug in D type inferencing

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Saturday, 2 July 2016 at 01:20:35 UTC, Hiemlick Hiemlicker wrote: public struct Foo { public void Create(T)(uint delegate(T) c, T param) { } } Foo f; f.Create((x) { }, "asdf"); I'm a D noob so take it with a very big grain of salt, but I think that

Re: -dip25 switch: time to make it always on?

2016-07-02 Thread Walter Bright via Digitalmars-d
On 7/1/2016 6:28 PM, Jonathan M Davis via Digitalmars-d wrote: https://issues.dlang.org/show_bug.cgi?id=16226 https://github.com/dlang/dmd/pull/5900 DMD will go ahead and infer the 'return' attribute when it is inferring other attributes for a function. This helps a lot to reduce the number

[Issue 16226] -dip25 doesn't work if the return type is not explicit

2016-07-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16226 Walter Bright changed: What|Removed |Added CC|

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Saturday, 2 July 2016 at 06:45:37 UTC, Patrick Schluter wrote: On Friday, 1 July 2016 at 20:09:30 UTC, Andrei Alexandrescu wrote: On 7/1/16 3:43 PM, Patrick Schluter wrote: On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16224 --

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Friday, 1 July 2016 at 20:30:30 UTC, Steven Schveighoffer wrote: On 7/1/16 4:08 PM, Andrei Alexandrescu wrote: On 7/1/16 2:46 PM, Steven Schveighoffer wrote: On 7/1/16 2:15 PM, Andrei Alexandrescu wrote: On 7/1/16 2:05 PM, Chris wrote: On Friday, 1 July 2016 at 16:30:41 UTC, Andrei

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Friday, 1 July 2016 at 20:09:30 UTC, Andrei Alexandrescu wrote: On 7/1/16 3:43 PM, Patrick Schluter wrote: On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16224 -- Andrei That do { } while(0) construct is ridiculous.

Re: daffodil, a D image processing library

2016-07-02 Thread Relja Ljubobratovic via Digitalmars-d-announce
On Friday, 1 July 2016 at 21:18:28 UTC, Vladimir Panteleev wrote: Generally most use cases for using an image library can be divided into: 1. You have full control over the images being loaded. This is the case when you're loading graphical assets for your application which otherwise