Re: Force inline

2017-02-20 Thread Daniel Kozak via Digitalmars-d-learn
Dne 21.2.2017 v 08:31 Johan Engelen via Digitalmars-d-learn napsal(a): On Monday, 20 February 2017 at 13:16:15 UTC, Jonathan M Davis wrote: dmd is great for fast compilation and therefore it's great for development. However, while it produces decent binaries, and it may very well do certain

Re: Force inline

2017-02-20 Thread Johan Engelen via Digitalmars-d-learn
On Monday, 20 February 2017 at 13:16:15 UTC, Jonathan M Davis wrote: dmd is great for fast compilation and therefore it's great for development. However, while it produces decent binaries, and it may very well do certain optimizations better than the gcc or llvm backends do This I find hard

[Issue 17131] [Reg 2.074] Fiber.state collides with differently attributed function in derived class

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17131 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 17195] [Reg 2.074] isFloatingPoint!cfloat is now true

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17195 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 17216] OSX: `rdmd -shared -oflibfun.dylib fun.d` and otool -L libfun.dylib points to libfun.dylib.tmp

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17216 --- Comment #2 from Timothee Cour --- workaround: `-L-install_name -Llibfun.dylib` --

[Issue 17196] [Reg 2.074] isUnsigned!bool now true

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17196 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 17216] OSX: `rdmd -shared -oflibfun.dylib fun.d` and otool -L libfun.dylib points to libfun.dylib.tmp

2017-02-20 Thread via Digitalmars-d-bugs
hee.co...@gmail.com --- Comment #1 from Timothee Cour <timothee.co...@gmail.com> --- same with latest: DMD64 D Compiler v2.073.1 rdmd build 20170220 --

[Issue 17216] New: OSX: `rdmd -shared -oflibfun.dylib fun.d` and otool -L libfun.dylib points to libfun.dylib.tmp

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17216 Issue ID: 17216 Summary: OSX: `rdmd -shared -oflibfun.dylib fun.d` and otool -L libfun.dylib points to libfun.dylib.tmp Product: D Version: D2 Hardware: x86 OS:

Re: dmd -v=json for machine readable output (and parsing dmd.conf)

2017-02-20 Thread Chris Wright via Digitalmars-d
On Mon, 20 Feb 2017 19:08:14 -0800, Timothee Cour via Digitalmars-d wrote: > Could we have a `dmd -v=json` ? Can you put together a sketch of what this would look like?

Re: Step into in debugging.

2017-02-20 Thread ANtlord via Digitalmars-d
On Monday, 20 February 2017 at 13:55:57 UTC, ANtlord wrote: Hello! I care for project DCD. I've wanted to fix some issue in it very long time ago. But when I get a little bit of free time I encounter one big problem for me. I can't debug it using GDB. I can't go through call stack because I

dmd -v=json for machine readable output (and parsing dmd.conf)

2017-02-20 Thread Timothee Cour via Digitalmars-d
Could we have a `dmd -v=json` ? Related: would be nice to also show (in json output) fields including dflags and lflags to avoid having to do the work that the compiler already did: `dmd | grep 'Config file'` Config file: path/to/etc/dmd.conf followed py parsing the contents of `dmd.conf`

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread ketmar via Digitalmars-d-learn
"H. S. Teoh via Digitalmars-d-learn" wrote: On Mon, Feb 20, 2017 at 05:39:30PM +, ketmar via Digitalmars-d-learn wrote: foreach (auto n; arr) oops. good job, auto! Haha... in this case you want to actually just drop `auto` completely. :-D But yeah, there are some funny inconsistencies

Re: dmd -Wl=comma_separated_linker_flags (cf clang++ -Wl, comma_separated_linker_flags)

2017-02-20 Thread Timothee Cour via Digitalmars-d
relying on the shell (especially involving arrays) seems like a bad idea: not portable, easy to mess up: `dmd -L{-lbar,-Ldir,--export-dynamic}` works but what if it's stored in $lflags: lflags="-lbar,-Ldir,--export-dynamic" the function to convert $lflags to a dmd-appropriate flag is not so

[Issue 17215] New: ICE(cgcod.c:findreg) with SIMD and -O -inline

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17215 Issue ID: 17215 Summary: ICE(cgcod.c:findreg) with SIMD and -O -inline Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ice

Re: Multiplatform development[DOUBT]

2017-02-20 Thread Adam D. Ruppe via Digitalmars-d-learn
Yes, D works on the major desktop platforms easily. There isn't an ANSI standard but there's just one D language.

Re: CTFE Status 2

2017-02-20 Thread Stefan Koch via Digitalmars-d
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: Currently I am having trouble caused by a bug in dmds inliner that only happens on when dmd is compiled as a 32bit executable until I have isolated / fixed this development is slowed down. I am slowly narrowing down on the

Multiplatform development[DOUBT]

2017-02-20 Thread wiki via Digitalmars-d-learn
A friend of mine asked me a question today if D is multiplatform I particularly believe it is but I wanted to know the opinion of who has already developed the most time in it and even of the developers because I looked for some cisa on the net about such subject and did not find anything that

Re: dmd -Wl=comma_separated_linker_flags (cf clang++ -Wl, comma_separated_linker_flags)

2017-02-20 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 21 February 2017 at 00:33:27 UTC, Timothee Cour wrote: Just use shell expansions? dmd -Wl,-{lbar,Ldir,-export-dynamic,pie} This doesn't work : unrecognized switch '-Wl...' On Sun, Dec 11, 2016 at 3:36 PM, Guillaume Boucher via Digitalmars-d wrote:

New libcurl.dll builder needed

2017-02-20 Thread brocolis via Digitalmars-d
I'm used to build the libcurl.dll that is bundled with dmd, but now I will move so a new libcurl.dll builder is needed. Task: - watch https://curl.haxx.se/download.html - when a new version is released, build libcurl.dll & libcurl.lib (32 & 64 bit). see [1] - make a .zip, upload it to the

[Issue 17212] std.regex doesn't ignore whitespace after character classes, even when compiling with "x"

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17212 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/62cf615dda64274c4f07b2c92a008baa132073ac Fix issue 17212 std.regex doesn't ignore whitespace

[Issue 17212] std.regex doesn't ignore whitespace after character classes, even when compiling with "x"

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

Re: dmd -Wl=comma_separated_linker_flags (cf clang++ -Wl, comma_separated_linker_flags)

2017-02-20 Thread Timothee Cour via Digitalmars-d
> Just use shell expansions? > dmd -Wl,-{lbar,Ldir,-export-dynamic,pie} This doesn't work : unrecognized switch '-Wl...' On Sun, Dec 11, 2016 at 3:36 PM, Guillaume Boucher via Digitalmars-d wrote: > On Sunday, 11 December 2016 at 21:39:26 UTC, Timothee Cour wrote:

Re: align(n) outside struct useless?

2017-02-20 Thread kinke via Digitalmars-d-learn
On Monday, 20 February 2017 at 22:45:09 UTC, Adam D. Ruppe wrote: I don't believe it does anything (except perhaps pad bytes again) for a stack-defined struct. LDC does respect explicit type-alignments when allocating instances on the stack. The instances are obviously padded to their full

Re: align(n) outside struct useless?

2017-02-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 20 February 2017 at 20:45:27 UTC, Michael Coulombe wrote: I can't figure out how to set the alignment of a struct using align(n) on the outside of the struct. align(n) on the outside of a struct will pad the struct as a whole to meet that size requirement. So it changes the sizeof

[Issue 17212] std.regex doesn't ignore whitespace after character classes, even when compiling with "x"

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17212 Dmitry Olshansky changed: What|Removed |Added Keywords||pull

[Issue 17212] std.regex doesn't ignore whitespace after character classes, even when compiling with "x"

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17212 --- Comment #1 from Markus Laker --- The bug seems to have been introduced in 2.072.0. --

Re: align(n) outside struct useless?

2017-02-20 Thread Ali Çehreli via Digitalmars-d-learn
On 02/20/2017 12:45 PM, Michael Coulombe wrote: I can't figure out how to set the alignment of a struct using align(n) on the outside of the struct. Only align on the fields (default or annotated) seems to work. I get the same results back to at least DMD 2.065... Is this a bug or am I using it

Re: Returning the address of a reference return value in @safe code - 2.072 regression?

2017-02-20 Thread Jack Stouffer via Digitalmars-d-learn
On Monday, 20 February 2017 at 20:54:31 UTC, Jack Stouffer wrote: On Monday, 20 February 2017 at 20:49:43 UTC, Johan Engelen wrote: ... Yeah, this is another regression caused by DIP1000. Christ. For the record, the current list of regressions caused by DIP1000

[Issue 17213] [REG2.072] take address of ref return value @safe

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17213 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment

[Issue 17153] std.container.array.Array cannot be used in @nogc code

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17153 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/2a97fb42345ff1f238510e0ca03c08497d530d53 Merge pull request #5036 from JackStouffer/nogc-Array

Re: Returning the address of a reference return value in @safe code - 2.072 regression?

2017-02-20 Thread Jack Stouffer via Digitalmars-d-learn
On Monday, 20 February 2017 at 20:49:43 UTC, Johan Engelen wrote: ... Yeah, this is another regression caused by DIP1000. Christ.

[Issue 17190] [REG2.072] isNumeric!string conflict std.traits std.string

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17190 Johan Engelen changed: What|Removed |Added Keywords||industry --

[Issue 17213] [REG2.072] take address of ref return value @safe

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17213 Johan Engelen changed: What|Removed |Added Keywords||industry --

[Issue 17214] std.array.Appender has an unnecessary indirection

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17214 Jack Stouffer changed: What|Removed |Added Keywords||trivial --

[Issue 17214] New: std.array.Appender has an unnecessary indirection

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17214 Issue ID: 17214 Summary: std.array.Appender has an unnecessary indirection Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Returning the address of a reference return value in @safe code - 2.072 regression?

2017-02-20 Thread Johan Engelen via Digitalmars-d-learn
This code compiles with 2.071, but not with 2.072 nor 2.073: ``` struct S { int i; auto ref foo() @safe { return i; } auto bar() @safe { return (); // <-- Error } } void main() { auto s = S(); s.bar();

align(n) outside struct useless?

2017-02-20 Thread Michael Coulombe via Digitalmars-d-learn
I can't figure out how to set the alignment of a struct using align(n) on the outside of the struct. Only align on the fields (default or annotated) seems to work. I get the same results back to at least DMD 2.065... Is this a bug or am I using it wrong? align(32) struct A { ubyte padding; }

[Issue 17213] New: [REG2.072] take address of ref return value @safe

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17213 Issue ID: 17213 Summary: [REG2.072] take address of ref return value @safe Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression

[Issue 17212] New: std.regex doesn't ignore whitespace after character classes, even when compiling with "x"

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17212 Issue ID: 17212 Summary: std.regex doesn't ignore whitespace after character classes, even when compiling with "x" Product: D Version: D2 Hardware: x86_64 OS:

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Feb 20, 2017 at 05:39:30PM +, ketmar via Digitalmars-d-learn wrote: > Ali Çehreli wrote: > > > Correction: It's actually the 'auto attribute' in D with the > > venerable responsibility of "The auto attribute is used when there > > are no other attributes and type inference is

Re: The end of curl (in phobos)

2017-02-20 Thread Cym13 via Digitalmars-d
On Sunday, 19 February 2017 at 04:00:33 UTC, Gavin wrote: On Friday, 6 May 2016 at 08:32:03 UTC, Robert burner Schadek wrote: As discussed yesterday at DConf, curl in phobos must go. The plan is as follows. 1. undocument everything curl related in may 2016 2. deprecate everything curl related

[Issue 9395] Allow deprecated statement in enum members

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9395 Jonathan M Davis changed: What|Removed |Added CC|

[Issue 17211] deprecated is not consistently allowed on local declarations

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17211 Jonathan M Davis changed: What|Removed |Added Keywords|

[Issue 17211] New: deprecated is not consistently allowed on local declarations

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17211 Issue ID: 17211 Summary: deprecated is not consistently allowed on local declarations Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 17210] DMD's Failure to Inline Calls in std.array.Appender.put Cause 3x Slowdown

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17210 --- Comment #1 from Jack Stouffer --- Created attachment 1637 --> https://issues.dlang.org/attachment.cgi?id=1637=edit Appender Benchmark --

[Issue 17210] New: DMD's Failure to Inline Calls in std.array.Appender.put Cause 3x Slowdown

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17210 Issue ID: 17210 Summary: DMD's Failure to Inline Calls in std.array.Appender.put Cause 3x Slowdown Product: D Version: D2 Hardware: All OS: All

[Issue 14840] [2.068.0-b2] failure to inline functions with loops

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14840 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: Class Order Style

2017-02-20 Thread Jolly James via Digitalmars-d-learn
On Monday, 20 February 2017 at 13:50:26 UTC, ketmar wrote: just add ddoc documentation to 'em, and then it doesn't matter in which order they are declared: people will generate documentation to find out how to use your code. ;-) ah okay, thx But what about this? class A { private: int

Re: Problem posting replies on forum?

2017-02-20 Thread H. S. Teoh via Digitalmars-d
On Mon, Feb 20, 2017 at 08:34:43AM -0800, Ali Çehreli via Digitalmars-d wrote: > On 02/20/2017 07:13 AM, timmyjose wrote: > > > I'm seeing some issues when posting replies to posts. > > Not answering your question but the forums are actually newsgroups > (NNTP). It's possible to be relatively

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread Ali Çehreli via Digitalmars-d-learn
On 02/20/2017 07:00 AM, timmyjose wrote: > slice can be spawned off into a brand new array upon assigning data to > it (in the book "Learning D", which I find very nice so far). It's not assigning data to a slice, but adding elements to it: It *may* spawn off a new array. You can use .capacity

Re: Force inline

2017-02-20 Thread ketmar via Digitalmars-d-learn
H. S. Teoh wrote: Having said all that, though, have you used a profiler to determine whether or not your performance bottleneck is really at the function in question? I find that 90% of the time what I truly believe should be inlined actually doesn't make much difference; the bottleneck is

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Feb 20, 2017 at 03:00:05PM +, timmyjose via Digitalmars-d-learn wrote: [...] > Just one question about the compilers though - I read on the Wiki that > there are three main compiler distros - dmd, ldc, and gdc. I code > primarily on a mac, and I have installed both dmd and ldc. A lot

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread ketmar via Digitalmars-d-learn
Ali Çehreli wrote: Correction: It's actually the 'auto attribute' in D with the venerable responsibility of "The auto attribute is used when there are no other attributes and type inference is desired." Good job, auto! :o) foreach (auto n; arr) oops. good job, auto!

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread Ali Çehreli via Digitalmars-d-learn
On 02/20/2017 06:44 AM, timmyjose wrote: > 3). Not so much a fan of "auto", but it does have its uses, of course. For completeness, D's 'auto' does not have the same meaning as C++'s auto. Wait... it actually has! :) But with the meaning of the 'auto' keyword from the olden C days: automatic

Re: Force inline

2017-02-20 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Feb 20, 2017 at 05:16:15AM -0800, Jonathan M Davis via Digitalmars-d-learn wrote: [...] > Regardless, if performance is your #1 concern, then I would suggest > that you compile with ldc and not dmd. [...] +1. If you are concerned about performance enough to worry whether the compiler

Re: Problem posting replies on forum?

2017-02-20 Thread timmyjose via Digitalmars-d
On Monday, 20 February 2017 at 16:34:43 UTC, Ali Çehreli wrote: On 02/20/2017 07:13 AM, timmyjose wrote: > I'm seeing some issues when posting replies to posts. Not answering your question but the forums are actually newsgroups (NNTP). It's possible to be relatively happier with a newsreader

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread timmyjose via Digitalmars-d-learn
On Monday, 20 February 2017 at 15:27:16 UTC, ag0aep6g wrote: On 02/20/2017 03:44 PM, timmyjose wrote: Things I don't like so much: 1). The std.range: iota function(?) is pretty nice, but the naming seems a bit bizarre, but quite nice to use. Yeah, the name is weird. A little googling

Re: Problem posting replies on forum?

2017-02-20 Thread Ali Çehreli via Digitalmars-d
On 02/20/2017 07:13 AM, timmyjose wrote: > I'm seeing some issues when posting replies to posts. Not answering your question but the forums are actually newsgroups (NNTP). It's possible to be relatively happier with a newsreader like Thunderbird. :) These work for me: Server:

Re: Getting nice print of struct for debugging

2017-02-20 Thread Martin Tschierschke via Digitalmars-d-learn
On Monday, 20 February 2017 at 16:18:58 UTC, Paul Backus wrote: On Monday, 20 February 2017 at 16:04:17 UTC, Martin Tschierschke wrote: Hello, I have a little program where I am filling a struct with values from an regex match. Now I want to display the content of the struct for debugging

Re: Getting nice print of struct for debugging

2017-02-20 Thread Paul Backus via Digitalmars-d-learn
On Monday, 20 February 2017 at 16:04:17 UTC, Martin Tschierschke wrote: Hello, I have a little program where I am filling a struct with values from an regex match. Now I want to display the content of the struct for debugging purpose. I believe the easiest way to do this is to define a

Getting nice print of struct for debugging

2017-02-20 Thread Martin Tschierschke via Digitalmars-d-learn
Hello, I have a little program where I am filling a struct with values from an regex match. Now I want to display the content of the struct for debugging purpose. If struct is named MyStruct I can print a list of the field names with: foreach(fieldname;FieldNameTuple!MyStruct){writef("%s

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread ag0aep6g via Digitalmars-d-learn
On 02/20/2017 03:44 PM, timmyjose wrote: Things I don't like so much: 1). The std.range: iota function(?) is pretty nice, but the naming seems a bit bizarre, but quite nice to use. Yeah, the name is weird. A little googling suggests it comes from C++ [1] which took it from APL. 2). The

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread timmyjose via Digitalmars-d-learn
On Monday, 20 February 2017 at 14:54:58 UTC, Adam D. Ruppe wrote: On Monday, 20 February 2017 at 14:44:41 UTC, timmyjose wrote: My confusion is this - the declaration of the array is arr [last-dimension]...[first-dimension], but the usage is arr[first-dimension]...[last-dimension]. Am I

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread timmyjose via Digitalmars-d-learn
On Monday, 20 February 2017 at 14:52:43 UTC, ketmar wrote: timmyjose wrote: Suppose I have a simple 2 x 3 array like so: import std.stdio; import std.range: iota; void main() { // a 2 x 3 array int [3][2] arr; foreach (i; iota(0, 2)) { foreach(j; iota(0, 3)) {

Problem posting replies on forum?

2017-02-20 Thread timmyjose via Digitalmars-d
Hello! I'm seeing some issues when posting replies to posts. The captcha doesn't seem to appear when clicking "send" directly, but does appear when clicking "save and preview" first. Upon solving the captcha, sometimes the page gets stuck in a loop with "sending message to server" (something

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread ketmar via Digitalmars-d-learn
timmyjose wrote: Very interesting reading about your experiences! tnx. ;-) one thing I've observed is that so far (very very early of course) D appears to be a lot more intuitive than C++ yeah. i almost finished writing my own nntp/email client (actually, i'm writing this post with it).

Terminix 1.5.0 Released

2017-02-20 Thread Gerald via Digitalmars-d-announce
I'm pleased to announce that Terminix 1.5.0 has been released. Terminix is a GTK3 tiling terminal emulator for Linux which follows the Gnome Human Interface Guidelines (HIG). More information about Terminix can be found here: https://gnunn1.github.io/terminix-web/ The following changes have

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread timmyjose via Digitalmars-d-learn
On Sunday, 19 February 2017 at 12:45:49 UTC, ketmar wrote: timmyjose wrote: a). So the GC is part of the runtime even if we specify @nogc yes. GC is basically just a set of functions and some supporting data structures, it is compiled in druntime. @nogc doesn't turn it off, if says that

[Issue 17209] New: Fix warning: public symbol is undocumented

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17209 Issue ID: 17209 Summary: Fix warning: public symbol is undocumented Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 20 February 2017 at 14:44:41 UTC, timmyjose wrote: My confusion is this - the declaration of the array is arr [last-dimension]...[first-dimension], but the usage is arr[first-dimension]...[last-dimension]. Am I missing something here? I've never understood how anyone could

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread ketmar via Digitalmars-d-learn
timmyjose wrote: Suppose I have a simple 2 x 3 array like so: import std.stdio; import std.range: iota; void main() { // a 2 x 3 array int [3][2] arr; foreach (i; iota(0, 2)) { foreach(j; iota(0, 3)) { arr[i][j] = i+j; }

[Issue 17208] New: Fix warning: variable is never used

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17208 Issue ID: 17208 Summary: Fix warning: variable is never used Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread timmyjose via Digitalmars-d-learn
On Sunday, 19 February 2017 at 12:31:51 UTC, ag0aep6g wrote: On 02/19/2017 12:51 PM, timmyjose wrote: a). So the GC is part of the runtime even if we specify @nogc Yup. @nogc is per function, not per program. Other functions are allowed to use the GC. b). Do we manually trigger the GC

Re: Create doc simultaneously with compilation

2017-02-20 Thread kinke via Digitalmars-d-learn
On Sunday, 19 February 2017 at 22:44:54 UTC, Satoshi wrote: Why is not possible to create documentation, compile code and generate header files simultaneously? When I pass -D and -Dd flags to ldc2 command it won't create doc until I don't pass -o- flag too. That is an LDC bug which has been

[Issue 17198] rdmd does not recompile when --extra-file is added

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17198 --- Comment #2 from ag0ae...@gmail.com --- (In reply to ag0aep6g from comment #1) > Fix: https://github.com/dlang/tools/pull/218 Superseded by . --

Found on Reddit: D language gets more points than C++ in DigitalWhip benchmark on Windows.

2017-02-20 Thread Ali Çehreli via Digitalmars-d-announce
https://www.reddit.com/r/programming/comments/5v43p6/d_language_gets_more_points_than_c_in_digitalwhip/ Ali

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread timmyjose via Digitalmars-d-learn
On Sunday, 19 February 2017 at 03:17:08 UTC, Seb wrote: On Saturday, 18 February 2017 at 21:09:20 UTC, ag0aep6g wrote: 5. Supposing I devote the time and energy and get up to speed on D, would the core language team be welcoming if I feel like I can contribute? Absolutely. Anyone is welcome

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread timmyjose via Digitalmars-d-learn
On Sunday, 19 February 2017 at 12:40:10 UTC, Guillaume Piolat wrote: On Saturday, 18 February 2017 at 20:15:55 UTC, timmyjose wrote: My rudimentary knowledge of the D ecosystem tells me that there is a GC in D, but that can be turned off. Is this correct? Also, some threads online mention that

Re: Hello, folks! Newbie to D, have some questions!

2017-02-20 Thread timmyjose via Digitalmars-d-learn
On Sunday, 19 February 2017 at 15:22:50 UTC, bachmeier wrote: On Saturday, 18 February 2017 at 20:15:55 UTC, timmyjose wrote: 4. I have heard good reports of D's metaprogramming capabilities (ironically enough, primarily from a thread on the Rust user group), and coming from a Common Lisp (and

Re: Android LDC in a Container

2017-02-20 Thread Andre Pany via Digitalmars-d-announce
On Sunday, 19 February 2017 at 23:16:20 UTC, Nick Sabalausky (Abscissa) wrote: On 01/15/2017 12:40 PM, Andre Pany wrote: Hi, on Dockerhub I published a repository which makes it really easy to develop Android applications using LDC and Joakims work. The repository contains Android 1.1.0

Step into in debugging.

2017-02-20 Thread ANtlord via Digitalmars-d
Hello! I care for project DCD. I've wanted to fix some issue in it very long time ago. But when I get a little bit of free time I encounter one big problem for me. I can't debug it using GDB. I can't go through call stack because I get a number of issues. Long story short I've decided to

Re: Class Order Style

2017-02-20 Thread ketmar via Digitalmars-d-learn
Jolly James wrote: How to sort the members of a class? like: 1. properties then 2. private 3. methods 4. ctors ... and so on. are there any recommendations? And what is better? just add ddoc documentation to 'em, and then it doesn't matter in which order they are declared: people will

Re: Force inline

2017-02-20 Thread ketmar via Digitalmars-d-learn
Moritz Maxeiner wrote: I don't know, but I'd guess that the length of a function is not as important for the consideration of being inlined as its semantics. yep. basically, dmd doesn't like anything other than very simple if/else conditions. sometimes it likes if (cond0) return n0; else if

Class Order Style

2017-02-20 Thread Jolly James via Digitalmars-d-learn
How to sort the members of a class? like: 1. properties then 2. private 3. methods 4. ctors ... and so on. are there any recommendations? And what is better? class A { private: int a; int b; public: int c; int d; } or class A { private { int a; int b; }

[Issue 17207] New: Zero-parameter '@property' function should be marked 'const', 'inout', or 'immutable'.

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17207 Issue ID: 17207 Summary: Zero-parameter '@property' function should be marked 'const', 'inout', or 'immutable'. Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Force inline

2017-02-20 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 20 February 2017 at 12:47:43 UTC, berni wrote: pragma(inline, true) doesn't work out well: int bar; void main(string[] args) { if (foo()) {} } bool foo() { pragma(inline, true) if (bar==1) return false; if (bar==2) return false; return true; } with dmd -inline

Re: Force inline

2017-02-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, February 20, 2017 12:47:43 berni via Digitalmars-d-learn wrote: > with > > > dmd -inline test.d > > I get > > > test.d(8): Error: function test.foo cannot inline function > > When I remove -inline, it compiles, but seems not to inline. I > cannot tell from this small example, but with

[Issue 17206] New: Checks that opEquals and toHash are both defined or neither are defined

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17206 Issue ID: 17206 Summary: Checks that opEquals and toHash are both defined or neither are defined Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Force inline

2017-02-20 Thread berni via Digitalmars-d-learn
On Sunday, 19 February 2017 at 20:00:00 UTC, Daniel Kozak wrote: Dne 19.2.2017 v 20:19 berni via Digitalmars-d-learn napsal(a): Is it possible to force a function to be inlined? Comparing a C++ and a D program, the main difference in speed (about 20-30%) is, because I manage to force g++ to

Re: Android LDC in a Container

2017-02-20 Thread Rory McGuire via Digitalmars-d-announce
On Mon, Feb 20, 2017 at 1:16 AM, Nick Sabalausky (Abscissa) via Digitalmars-d-announce wrote: > I haven't actually had a chance to try either this or Joakims's stuff by > itself, although I am interested. Can you describe how this repo simplifies > things?

[Issue 17198] rdmd does not recompile when --extra-file is added

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17198 ag0ae...@gmail.com changed: What|Removed |Added Keywords||pull CC|

Re: Create doc simultaneously with compilation

2017-02-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 19, 2017 22:44:54 Satoshi via Digitalmars-d-learn wrote: > Why is not possible to create documentation, compile code and > generate header files simultaneously? > > When I pass -D and -Dd flags to ldc2 command it won't create doc > until I don't pass -o- flag too. I don't know

[Issue 17048] [REG 2.071] Synchronized class methods give warnings for RMW operations

2017-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17048 anonymous4 changed: What|Removed |Added Severity|regression |enhancement ---