[Issue 13372] traits parent does not work on eponymous templates

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13372 --- Comment #4 from Mike Franklin --- (In reply to Basile B. from comment #2) > = > import std.meta; > > template Parent(T) > { > alias Parent = AliasSeq!(__traits(parent, T))[0]; > } > > unittest > { > class

Re: LDC 1.7.0

2018-01-28 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Saturday, 27 January 2018 at 21:42:49 UTC, aberba wrote: [...] Ubuntu 16.04 This is a long-term support distribution. Don't expect those to have actual tip versions of any SW package! They rely on stabe versions that don't have the latest features but only those very well tested.

Re: questions around mutating range algorithms, const, and return ref

2018-01-28 Thread Ali Çehreli via Digitalmars-d-learn
On 01/28/2018 02:52 PM, aliak wrote: > Hello, I'm trying to write a function called "pull" that, given 2 > ranges, "pull"s the values from range 2 out of range 1. I'm not sure if > I'm doing it correctly though, and I have some questions so any help is > appreciated. This is what I have: > > ref

Re: How programmers transition between languages

2018-01-28 Thread jmh530 via Digitalmars-d
On Monday, 29 January 2018 at 04:58:49 UTC, Jonathan M Davis wrote: It would be interesting to know, but I question how valid the conclusions are just getting information from github like that. For instance, I came from C++ to D. However, I never used github before D's developement moved to

Re: parallelism

2018-01-28 Thread Arun Chandrasekaran via Digitalmars-d-learn
On Sunday, 28 January 2018 at 04:44:23 UTC, thedeemon wrote: On Saturday, 27 January 2018 at 20:49:43 UTC, Arun Chandrasekaran wrote: But really I'm not sure why you want static foreach here I was just trying to see if static foreach can be used here, but well, you showed that it's not

Re: How programmers transition between languages

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 29, 2018 04:18:12 jmh530 via Digitalmars-d wrote: > On Monday, 29 January 2018 at 03:22:54 UTC, Ola Fosheim Grøstad > > wrote: > > On Sunday, 28 January 2018 at 23:09:00 UTC, Michael wrote: > >> by the whole target audience. Rust, on the other hand, seems > >> to be picking up

Re: How programmers transition between languages

2018-01-28 Thread jmh530 via Digitalmars-d
On Monday, 29 January 2018 at 03:22:54 UTC, Ola Fosheim Grøstad wrote: On Sunday, 28 January 2018 at 23:09:00 UTC, Michael wrote: by the whole target audience. Rust, on the other hand, seems to be picking up those who have left Go. I guess some go to Rust after working with Go, but the

Re: How programmers transition between languages

2018-01-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 28 January 2018 at 23:09:00 UTC, Michael wrote: by the whole target audience. Rust, on the other hand, seems to be picking up those who have left Go. I guess some go to Rust after working with Go, but the transition matrix linked above suggests that the trend has been that people

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread jmh530 via Digitalmars-d
On Monday, 29 January 2018 at 00:18:40 UTC, H. S. Teoh wrote: Still, it's strange that given the number of people who demand first class IDE support, there are so few who are willing to contribute to improving it. It's probably that they view programming languages as a tool to get things

Re: Pull requests to stable will no longer close bugzilla issues immediately

2018-01-28 Thread Seb via Digitalmars-d-announce
On Sunday, 28 January 2018 at 19:44:36 UTC, Steven Schveighoffer wrote: Just a note to all those who may have a PR that targets stable, even if you properly put in a commit message the instruction to close a bugzilla issue, it will NOT be closed until the commit is merged into master. The

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 16:18:40 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 28, 2018 at 05:13:15PM -0700, Jonathan M Davis via Digitalmars-d wrote: > > Either way, more folks need to put some time and/or money towards IDE > > development for D, or the folks who want first class IDE

Re: enforce (i > 0) for i = int.min does not throw

2018-01-28 Thread Seb via Digitalmars-d-learn
On Sunday, 28 January 2018 at 19:17:49 UTC, Steven Schveighoffer wrote: On 1/27/18 9:50 AM, ag0aep6g wrote: Wow, that looks really bad. Apparently, dmd implements `i < 0` as a `i >> 31`. I.e., it shifts the bits to the right so far that only the sign bit is left. This is ok. But it

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread H. S. Teoh via Digitalmars-d
On Sun, Jan 28, 2018 at 05:13:15PM -0700, Jonathan M Davis via Digitalmars-d wrote: > On Sunday, January 28, 2018 15:06:49 H. S. Teoh via Digitalmars-d wrote: [...] > > But the thing is, this is not a proprietary language where people > > are paid to do the grunt work. It's unrealistic to expect

Re: Looks like wrong error message

2018-01-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, January 28, 2018 16:08:17 H. S. Teoh via Digitalmars-d-learn wrote: > On Sun, Jan 28, 2018 at 10:53:39PM +, welkam via Digitalmars-d-learn wrote: > > On Sunday, 28 January 2018 at 20:42:52 UTC, Jonathan M Davis wrote: > [...] > > > > However, you're not going to get an error

Re: Looks like wrong error message

2018-01-28 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Jan 28, 2018 at 10:53:39PM +, welkam via Digitalmars-d-learn wrote: > On Sunday, 28 January 2018 at 20:42:52 UTC, Jonathan M Davis wrote: [...] > > However, you're not going to get an error message that says anything > > like "the arguments aren't the same type." The compiler doesn't >

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 15:06:49 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 28, 2018 at 09:02:36AM -0700, Jonathan M Davis via > > It is true though that most of the core developers around here favor > > editors like vim or emacs and would prefer to focus their efforts on > > the

[Issue 18312] string concatenation with -betterC fails with linker errors

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18312 Steven Schveighoffer changed: What|Removed |Added Keywords||betterC ---

[Issue 18312] string concatenation with -betterC fails with linker errors

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18312 --- Comment #2 from Mike Franklin --- > What is the expected result? If TypeInfo is indeed required to perform string concatenation, then the compiler should emit a compile-time error by checking the `global.params.usetypeinfo`

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread H. S. Teoh via Digitalmars-d
On Sun, Jan 28, 2018 at 09:02:36AM -0700, Jonathan M Davis via Digitalmars-d wrote: [...] > I have yet to find an IDE where I didn't feel like I was playing with > primitive tools in comparison to vim. And as such, it's that much weirder to > me for someone want to use an IDE. But it _does_ take

Re: How programmers transition between languages

2018-01-28 Thread Michael via Digitalmars-d
On Sunday, 28 January 2018 at 15:36:17 UTC, bachmeier wrote: On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: Most people at my university, outside of the computer science department, that are using languages like Python and R and MATLAB the most, are very aware of Rust and Go, but

Re: Looks like wrong error message

2018-01-28 Thread welkam via Digitalmars-d-learn
On Sunday, 28 January 2018 at 20:42:52 UTC, Jonathan M Davis wrote: There is nothing incorrect about the error message. The compiler looked at all of the functions in the overload set, and it found none that matched. The reason that it found none that matched was because it couldn't find any

questions around mutating range algorithms, const, and return ref

2018-01-28 Thread aliak via Digitalmars-d-learn
Hello, I'm trying to write a function called "pull" that, given 2 ranges, "pull"s the values from range 2 out of range 1. I'm not sure if I'm doing it correctly though, and I have some questions so any help is appreciated. This is what I have: ref pull(R1, R2)(return ref R1 r1, R2 r2) {

Re: run.dlang.io can now display ASM + AST + IR

2018-01-28 Thread Bastiaan Veelo via Digitalmars-d-announce
On Sunday, 28 January 2018 at 17:06:36 UTC, Seb wrote: CTRL+Enter -> run Thanks for reading my mind! You people are awesome.

Re: rdmd main.d leads to Segmentation fault

2018-01-28 Thread Timoses via Digitalmars-d-learn
On Saturday, 27 January 2018 at 21:04:07 UTC, Kagamin wrote: On Friday, 26 January 2018 at 22:40:29 UTC, Timoses wrote: Program received signal SIGSEGV, Segmentation fault. 0x00432e04 in _d_dso_registry () (gdb) bt #0 0x00432e04 in _d_dso_registry () #1 0x00431c63 in ?? () #2 0x0045c08b in

Re: rdmd main.d leads to Segmentation fault

2018-01-28 Thread Timoses via Digitalmars-d-learn
On Saturday, 27 January 2018 at 01:23:44 UTC, Fra Mecca wrote: On Friday, 26 January 2018 at 22:40:29 UTC, Timoses wrote: Hey, simple hello world crashes with segfault: [...] Where did you get the D toolchain? Got it from here: http://d-apt.sourceforge.net/ with $ apt-get install

Re: assert and enforce both compiled out with -release

2018-01-28 Thread Ali Çehreli via Digitalmars-d-learn
On 01/28/2018 11:31 AM, Steven Schveighoffer wrote: >> Fixed it through the "Improve this page" link on that Phobos page: >> >>https://github.com/dlang/phobos/blob/master/std/exception.d >> >> Ali > > Hm... it appears that you committed directly to the branch. Even if > changing docs, you

[Issue 18279] rt.util.utf does not properly reserve buffer in toUTF16/toUTF16z

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18279 --- Comment #2 from Steven Schveighoffer --- (In reply to Steven Schveighoffer from comment #1) > PR: https://github.com/dlang/druntime/pull/2065 Already open PR: https://github.com/dlang/druntime/pull/2053 --

Re: Looks like wrong error message

2018-01-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, January 28, 2018 20:02:48 welkam via Digitalmars-d-learn wrote: > Error says that it cant deduce function from argument types but > in reality it fails to meet function template constraints. In > this case !is(CommonType!(staticMap!(ElementType, > staticMap!(Unqual, Ranges))) == void) >

Re: How programmers transition between languages

2018-01-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: I find it fascinating that C# is in the "languages to avoid" section, because from my perspective it's receiving more and more adoption as the modern alternative to Java, in a way that Go and Rust are not. Different markets and all of

Looks like wrong error message

2018-01-28 Thread welkam via Digitalmars-d-learn
Error says that it cant deduce function from argument types but in reality it fails to meet function template constraints. In this case !is(CommonType!(staticMap!(ElementType, staticMap!(Unqual, Ranges))) == void) In human terms it means that arguments are not the same type. Is this require

Re: D generates large assembly for simple function

2018-01-28 Thread welkam via Digitalmars-d-learn
On Sunday, 28 January 2018 at 14:33:04 UTC, Johan Engelen wrote: Careful with these comparisons guys. Know what you are looking at. Wise words

Pull requests to stable will no longer close bugzilla issues immediately

2018-01-28 Thread Steven Schveighoffer via Digitalmars-d-announce
Just a note to all those who may have a PR that targets stable, even if you properly put in a commit message the instruction to close a bugzilla issue, it will NOT be closed until the commit is merged into master. The decision to do this was based on the amount of "spam" the bugzilla issues

Re: vibe.d compatible with d3 or pixieJS

2018-01-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/28/18 11:45 AM, Mark wrote: Hello! As the title suggests, I'm looking for the answer to this question. I've searched / asked it on the vibe forums, but nobody has answered. vibe.d is a server, and it serves javascript just fine. I've experimented with vibe, and I would like to build a

Re: assert and enforce both compiled out with -release

2018-01-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/27/18 9:31 AM, Ali Çehreli wrote: On 01/27/2018 05:52 AM, kdevel wrote: > https://dlang.org/phobos/std_exception.html#enforce states: > > | Also, do not use enforce inside of contracts (i.e. inside of in and > out blocks > | and invariants), because they will be compiled out when

[Issue 18315] wrong code for `i > 0`

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18315 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #4

Re: enforce (i > 0) for i = int.min does not throw

2018-01-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/27/18 9:50 AM, ag0aep6g wrote: Wow, that looks really bad. Apparently, dmd implements `i < 0` as a `i >> 31`. I.e., it shifts the bits to the right so far that only the sign bit is left. This is ok. But it implements `i > 0` as `(-i) >> 31`. That would be correct if negation would

[Issue 18312] string concatenation with -betterC fails with linker errors

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18312 Steven Schveighoffer changed: What|Removed |Added CC|

Re: How programmers transition between languages

2018-01-28 Thread Laeeth Isharc via Digitalmars-d
On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: I do worry that, having been using D for about 3 1/2 years now, that the perceptions of D outside of this community don't seem to be changing much. It does seem to make a huge difference to have a big company behind a language, purely

[Issue 18309] std.process.pipeProcess should warn if the buffer is full

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18309 Steven Schveighoffer changed: What|Removed |Added CC|

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 18:11:09 arturg via Digitalmars-d wrote: > On Sunday, 28 January 2018 at 17:51:19 UTC, Jonathan M Davis > > wrote: > > Hmm. Thanks. I'll have to check that out. I haven't done > > anything with folds in ages. > > > > Fortunately, I don't have to do anything with python

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread arturg via Digitalmars-d
On Sunday, 28 January 2018 at 17:51:19 UTC, Jonathan M Davis wrote: Hmm. Thanks. I'll have to check that out. I haven't done anything with folds in ages. Fortunately, I don't have to do anything with python right now though. The main reason that I used it before was so that I could have

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 17:32:30 arturg via Digitalmars-d wrote: > On Sunday, 28 January 2018 at 16:02:36 UTC, Jonathan M Davis > > wrote: > >> Erm, you do realize that Vim has built-in commands for > >> navigating nested brackets and parentheses, right? And > >> automatic bracket closing is

[Issue 18289] static function and access frame

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18289 Steven Schveighoffer changed: What|Removed |Added CC|

Re: String Switch Lowering

2018-01-28 Thread Benjamin Thaut via Digitalmars-d
Am 27.01.2018 um 08:40 schrieb Walter Bright: This clearly should be in bugzilla. https://issues.dlang.org/show_bug.cgi?id=18324 -- Kind Regards Benjamin Thaut

[Issue 18279] rt.util.utf does not properly reserve buffer in toUTF16/toUTF16z

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18279 Steven Schveighoffer changed: What|Removed |Added Keywords||pull

[Issue 18324] New: String switch lowering geneartes really long symbol names

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18324 Issue ID: 18324 Summary: String switch lowering geneartes really long symbol names Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread arturg via Digitalmars-d
On Sunday, 28 January 2018 at 16:02:36 UTC, Jonathan M Davis wrote: Erm, you do realize that Vim has built-in commands for navigating nested brackets and parentheses, right? And automatic bracket closing is just a macro away. You don't even need a plugin for that. LOL. One of the reasons

Re: How programmers transition between languages

2018-01-28 Thread Paulo Pinto via Digitalmars-d
On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: On Friday, 26 January 2018 at 09:02:03 UTC, Ola Fosheim Grøstad wrote: While this analysis of language popularity on Github is enlightening: http://www.benfrederickson.com/ranking-programming-languages-by-github-users/ I found the

Re: Class member function calls inside ctor and dtor

2018-01-28 Thread Timon Gehr via Digitalmars-d
On 28.01.2018 02:13, Jonathan M Davis wrote: Yes, but you can have that problem even without getting inheritance involve. For instance, class C { immutable string s; this() { s = foo(); } string foo() { return s ~ "foo"; } } When foo is

Re: run.dlang.io can now display ASM + AST + IR

2018-01-28 Thread Seb via Digitalmars-d-announce
On Saturday, 27 January 2018 at 02:33:19 UTC, Mike Franklin wrote: On Saturday, 27 January 2018 at 01:31:45 UTC, Seb wrote: https://github.com/dlang-tour/core/pull/649 It's fixed now. I have also increased the maximal output limit to 500.000 bytes - I hope that's enough for everyone :O

vibe.d compatible with d3 or pixieJS

2018-01-28 Thread Mark via Digitalmars-d-learn
Hello! As the title suggests, I'm looking for the answer to this question. I've searched / asked it on the vibe forums, but nobody has answered. I'm not familiar enough with JS frameworks / vibe to really know how this would (not) work together. I've experimented with vibe, and I would

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

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15482 --- Comment #9 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/f9e92a011953bf4fef0e4ef34e898ba14796b93d fix issue 15482 - new uuid.d forbids to link

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

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15482 github-bugzi...@puremagic.com changed: What|Removed |Added Status|REOPENED|RESOLVED

Re: Efficient way to pass struct as parameter

2018-01-28 Thread Marco Leise via Digitalmars-d-learn
Am Wed, 3 Jan 2018 10:57:13 -0800 schrieb Ali Çehreli : > On 01/03/2018 10:40 AM, Patrick Schluter wrote: > > On Tuesday, 2 January 2018 at 23:27:22 UTC, H. S. Teoh wrote: > >> > >> When it comes to optimization, there are 3 rules: profile, profile, > >> profile. I used

Re: How programmers transition between languages

2018-01-28 Thread Russel Winder via Digitalmars-d
On Sun, 2018-01-28 at 15:36 +, bachmeier via Digitalmars-d wrote: > […] > I'd say Julia is getting a lot more attention than Rust or Go for > those users. And rightfully so. I am still not sure Julia is getting traction outside a few communities. Python still seems to be the language of

Re: D, Rust, and GTK+ [was How programmers transition between languages]

2018-01-28 Thread Russel Winder via Digitalmars-d
On Fri, 2018-01-26 at 20:31 +, John Gabriele via Digitalmars-d wrote: > […] > > With Rust's extra complexity (over D) of ownership/borrowing, > lifetimes, and no GC, although we may currently see a push for > more Rust in Gnome for system-level code, I think D may beat it > for writing

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 00:27:51 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 28, 2018 at 12:03:38AM +, Benny via Digitalmars-d wrote: > [...] > > > The problem is Teoh that learning a language in Vim or a IDE are two > > totally different things. > > > > I used to program in Notepad

Re: How programmers transition between languages

2018-01-28 Thread bachmeier via Digitalmars-d
On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: Most people at my university, outside of the computer science department, that are using languages like Python and R and MATLAB the most, are very aware of Rust and Go, but not D. I'd say Julia is getting a lot more attention than

What libraries should run.dlang.io support?

2018-01-28 Thread Seb via Digitalmars-d
As I just addded emsi_containers to it, I was wondering what other libraries would be useful for you? (For performance reasons, a selected list of libraries is pre-compiled [1].) https://github.com/dlang-tour/core/wiki/Runnable-DUB-packages provides an overview of what's currently supported.

[Issue 18318] std.net.curl.download silently ignores non-2xx http statuses

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18318 Aravinda changed: What|Removed |Added CC|

[Issue 17941] arity (and probably others) only consider the first lexically present function

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17941 Simen Kjaeraas changed: What|Removed |Added Component|dmd |phobos

[Issue 18314] std.traits.getSymbolsByUDA only considers the first symbol of an overload set

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18314 Simen Kjaeraas changed: What|Removed |Added Keywords||pull

Re: The daily D riddle

2018-01-28 Thread Timon Gehr via Digitalmars-d
On 28.01.2018 15:59, Jonathan M Davis wrote: On Sunday, January 28, 2018 01:52:58 Walter Bright via Digitalmars-d wrote: On 1/28/2018 12:36 AM, H. S. Teoh wrote: Is there a practical use case for which this is actually useful? Generic code, where a member function doesn't need the instance

Re: The daily D riddle

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 01:52:58 Walter Bright via Digitalmars-d wrote: > On 1/28/2018 12:36 AM, H. S. Teoh wrote: > > Is there a practical use case for which this is actually useful? > > Generic code, where a member function doesn't need the instance to perform > its task. Maybe there's a

Re: D generates large assembly for simple function

2018-01-28 Thread Johan Engelen via Digitalmars-d-learn
On 01/27/2018 11:42 AM, Matt wrote: Godbolt link: https://godbolt.org/g/t5S976 Careful with these comparisons guys. Know what you are looking at. Rust does not eliminate setting the framepointer register, and so it looks "bad" [1]. Clang also sets the framepointer for macOS ABI regardless of

Re: How programmers transition between languages

2018-01-28 Thread Michael via Digitalmars-d
On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: On Friday, 26 January 2018 at 09:02:03 UTC, Ola Fosheim Grøstad wrote: [...] I find it fascinating that C# is in the "languages to avoid" section, because from my perspective it's receiving more and more adoption as the modern

Re: How programmers transition between languages

2018-01-28 Thread Michael via Digitalmars-d
On Friday, 26 January 2018 at 09:02:03 UTC, Ola Fosheim Grøstad wrote: While this analysis of language popularity on Github is enlightening: http://www.benfrederickson.com/ranking-programming-languages-by-github-users/ I found the older analysis of how programmers transition (or adopt new

Re: std_exception.html#enforce: example does not compile

2018-01-28 Thread Seb via Digitalmars-d-learn
On Saturday, 27 January 2018 at 21:27:44 UTC, kdevel wrote: On Saturday, 27 January 2018 at 20:33:46 UTC, Jonathan M Davis wrote: Shall I file a bug report? Yes. https://issues.dlang.org/show_bug.cgi?id=18319 Thanks. Addressed and already merged: https://github.com/dlang/phobos/pull/6080

Re: assert and enforce both compiled out with -release

2018-01-28 Thread rjframe via Digitalmars-d-learn
On Sun, 28 Jan 2018 00:59:12 +, lobo wrote: > On Saturday, 27 January 2018 at 22:53:37 UTC, Ali Çehreli wrote: >> On 01/27/2018 10:33 AM, kdevel wrote: >> >>> I suggest the deletion of the sentence "Use assert in contracts." >> >> Done. >> >> Ali > > Wait, no this isn't right, is it? Enforce

Re: How programmers transition between languages

2018-01-28 Thread rjframe via Digitalmars-d
On Sun, 28 Jan 2018 11:44:05 +, Ola Fosheim Grøstad wrote: > The reference interpreter doesn't make much use of static type > information. I think it makes sense to have separate type checkers until > this new aspect of Python has reached maturity. That doesn't prevent > third parties to

[Issue 18322] void fun(string file=__FILE_FULL_PATH__)() returns relative path (pointing to nowhere)

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18322 --- Comment #1 from Jonathan Marler --- Fix here: https://github.com/dlang/dmd/pull/7798 --

Re: String Switch Lowering

2018-01-28 Thread Seb via Digitalmars-d
On Saturday, 27 January 2018 at 23:12:01 UTC, H. S. Teoh wrote: On Sat, Jan 27, 2018 at 09:22:07PM +, timotheecour via Digitalmars-d wrote: [...] ``` 28 dscanner0x00010d59f428 @safe void ... I proposed a compile-time introspected getopt() replacement

Re: The daily D riddle

2018-01-28 Thread Seb via Digitalmars-d
On Sunday, 28 January 2018 at 11:41:44 UTC, Daniel Kozak wrote: https://run.dlang.io/is/gVL0g7 On Sun, Jan 28, 2018 at 12:23 PM, Seb via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Sunday, 28 January 2018 at 06:44:28 UTC, Timothee Cour wrote: why is `a.init` even legal?

Re: How programmers transition between languages

2018-01-28 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 28 January 2018 at 00:31:18 UTC, rjframe wrote: On Sat, 27 Jan 2018 22:59:17 +, Ola Fosheim Grostad wrote: On Saturday, 27 January 2018 at 13:56:35 UTC, rjframe wrote: If you use an IDE or analysis/lint tool, you'll get type checking. The interpreter will happily ignore those

Re: The daily D riddle

2018-01-28 Thread Daniel Kozak via Digitalmars-d
https://run.dlang.io/is/gVL0g7 On Sun, Jan 28, 2018 at 12:23 PM, Seb via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Sunday, 28 January 2018 at 06:44:28 UTC, Timothee Cour wrote: > >> why is `a.init` even legal? (instead of typeof(a).init) >> likewise the following compiles, but IMO

[Issue 18319] std.exception: enforce example does not compile

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18319 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/f4ccf68f2619f30d8fc684c6053625c13b311447 Fix Issue 18319 - std.exception: enforce example does

[Issue 18319] std.exception: enforce example does not compile

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

Re: String Switch Lowering

2018-01-28 Thread Kagamin via Digitalmars-d
On Saturday, 27 January 2018 at 23:12:01 UTC, H. S. Teoh wrote: I proposed a compile-time introspected getopt() replacement before https://github.com/jasonwhite/darg this?

Re: The daily D riddle

2018-01-28 Thread Seb via Digitalmars-d
On Sunday, 28 January 2018 at 06:44:28 UTC, Timothee Cour wrote: why is `a.init` even legal? (instead of typeof(a).init) likewise the following compiles, but IMO should not: class A{ void fun(this a){}} (instead we should have typeof(this) How about deprecating these lax syntaxes? they serve no

[Issue 17832] std.random.choice cannot be used with other random generators

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17832 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/db5c1c84b9b344c28214463f7c94f83580363ded Addresses Issue 17832 Random choice default argument

[Issue 17832] std.random.choice cannot be used with other random generators

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17832 github-bugzi...@puremagic.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

Re: The daily D riddle

2018-01-28 Thread Walter Bright via Digitalmars-d
On 1/28/2018 12:36 AM, H. S. Teoh wrote: Is there a practical use case for which this is actually useful? Generic code, where a member function doesn't need the instance to perform its task.

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 28 January 2018 at 08:40:35 UTC, Basile B. wrote: On Thursday, 25 January 2018 at 15:20:15 UTC, Benny wrote: You know you're not the first coming with this topic. I've developped a theory. You guys are looking for excuses to not get into D. If IDE were okay you would find something

Re: The daily D riddle

2018-01-28 Thread H. S. Teoh via Digitalmars-d
On Sun, Jan 28, 2018 at 12:27:52AM -0800, Walter Bright via Digitalmars-d wrote: > On 1/28/2018 12:05 AM, Jonathan M Davis wrote: > > As to _why_ it works, I don't know - it seems like a bad idea to me > > - but it does. > > It's so your code needn't care whether it is a static member or not, >

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Basile B. via Digitalmars-d
On Thursday, 25 January 2018 at 15:20:15 UTC, Benny wrote: After months doing a different project, i need a programming language for a new client with specific needs. D comes to mind. As usual that involves downloading the compiler (dmd and ldc). So, lets install Visual Studio Code: * Code-D

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread H. S. Teoh via Digitalmars-d
On Sun, Jan 28, 2018 at 12:03:38AM +, Benny via Digitalmars-d wrote: [...] > The problem is Teoh that learning a language in Vim or a IDE are two > totally different things. > > I used to program in Notepad because i grew up with PHP and knew it > like the back of my hand. The result was very

[Issue 18323] New: deprecate `void fun(this a)` (instead: typeof(this)) ; `var.init` (instead: typeof(var).init)

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18323 Issue ID: 18323 Summary: deprecate `void fun(this a)` (instead: typeof(this)) ; `var.init` (instead: typeof(var).init) Product: D Version: D2 Hardware: x86 OS:

Re: The daily D riddle

2018-01-28 Thread Walter Bright via Digitalmars-d
On 1/28/2018 12:05 AM, Jonathan M Davis wrote: As to _why_ it works, I don't know - it seems like a bad idea to me - but it does. It's so your code needn't care whether it is a static member or not, just the implementer of the class needs to care.

Re: The daily D riddle

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Saturday, January 27, 2018 23:40:16 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 28, 2018 at 12:04:42AM -0700, Jonathan M Davis via Digitalmars-d wrote: > > On Saturday, January 27, 2018 23:44:40 Jonathan M Davis via > > Digitalmars-d > > > wrote: > [...] > > > > It does exactly what I'd

[Issue 18322] void fun(string file=__FILE_FULL_PATH__)() returns relative path (pointing to nowhere)

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18322 Timothee Cour changed: What|Removed |Added CC|

[Issue 18322] New: void fun(string file=__FILE_FULL_PATH__)() returns relative path (pointing to nowhere)

2018-01-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18322 Issue ID: 18322 Summary: void fun(string file=__FILE_FULL_PATH__)() returns relative path (pointing to nowhere) Product: D Version: D2 Hardware: x86 OS: Mac OS X