Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 22:03:14 UTC, Satoshi wrote: or I have simple class class View { this(Rectangle frame) {...} this(float, float, float, float) { ... } this(Point, Size) { ... } } then struct Point, Size and Rectangle (Point, Size) now I need to write 2 overloads for View class

Re: {DMD-AST-Tool} For beginning DDMD hackers

2016-11-22 Thread Stefan Koch via Digitalmars-d
On Wednesday, 23 November 2016 at 07:11:56 UTC, ANtlord wrote: On Saturday, 12 November 2016 at 10:26:53 UTC, Stefan Koch wrote: Hi Guys, I have written a small utility called dmd-ast-tool. It can be used to quickly generate boilerplate code for dmd-ast-visitors. Originally it was only

Re: Detect that a child is waiting for input

2016-11-22 Thread Shachar Shemesh via Digitalmars-d
On 20/11/16 14:21, unDEFER wrote: Hello! I'm using pipeProcess() to create a process: pipes = pipeProcess(["bash", "-c", BASH_COMMAND], Redirect.stdin | Redirect.stdout | Redirect.stderr); Is it possible detect that the child is waiting for input on stdin? I can't find decision even for C. I

Re: {DMD-AST-Tool} For beginning DDMD hackers

2016-11-22 Thread ANtlord via Digitalmars-d
On Saturday, 12 November 2016 at 10:26:53 UTC, Stefan Koch wrote: Hi Guys, I have written a small utility called dmd-ast-tool. It can be used to quickly generate boilerplate code for dmd-ast-visitors. Originally it was only written for my personal use, it used to work with a handwritten

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Era Scarecrow via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 16:05:35 UTC, Satoshi wrote: Sorry, but D seems to be worse and worse day by day. This should be resolved by language and not doing it by template function. Same thing should be applied for maybe monad and tuples. I'm reminded of trying to follow the rules

Re: Mir Random [WIP]

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Wednesday, 23 November 2016 at 05:58:47 UTC, Ilya Yaroshenko wrote: On Tuesday, 22 November 2016 at 23:55:01 UTC, Andrei Alexandrescu wrote: On 11/22/16 1:31 AM, Ilya Yaroshenko wrote: - `opCall` API instead of range interface is used (similar to C++) This seems like a gratuitous

Re: Mir Random [WIP]

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 22 November 2016 at 23:55:01 UTC, Andrei Alexandrescu wrote: On 11/22/16 1:31 AM, Ilya Yaroshenko wrote: - `opCall` API instead of range interface is used (similar to C++) This seems like a gratuitous departure from common D practice. Random number generators are most naturally

Re: How do we accelerate the development of precise GC, RC and so on?

2016-11-22 Thread Adam Wilson via Digitalmars-d
Dsby wrote: On Tuesday, 22 November 2016 at 11:20:10 UTC, Jack Applegame wrote: We look forward to sane GC over the years. How do we accelerate the development of precise GC, RC and so on? Maybe we should organize a fundraiser on Kickstarter or somewhere else? I'm not ready to write precise GC,

Re: Mir Random [WIP]

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Wednesday, 23 November 2016 at 00:44:26 UTC, Joseph Rushton Wakeling wrote: On Tuesday, 22 November 2016 at 06:31:45 UTC, Ilya Yaroshenko wrote: - 64-bit Mt19937 is default for 64-bit targets This means that seemingly identical code will produce different results depending on whether

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Wednesday, 23 November 2016 at 01:18:09 UTC, Walter Bright wrote: On 11/22/2016 8:07 AM, Steven Schveighoffer wrote: On 11/22/16 8:31 AM, Ilya Yaroshenko wrote: 2. Why bsf and bsr do NOT use hardware instructions anymore? They should unless there is no hardware instruction available. I

Re: D developer jobs

2016-11-22 Thread Adam Wilson via Digitalmars-d
eugene wrote: hello everyone, could you, please, tell do any jobs(full-time or freelance) exist for junior D developers? This page might be off assistance. These are all the known corps using D. Some have hiring links. https://dlang.org/orgs-using-d.html -- Adam Wilson IRC: LightBender

Re: How do we accelerate the development of precise GC, RC and so on?

2016-11-22 Thread Dsby via Digitalmars-d
On Tuesday, 22 November 2016 at 11:20:10 UTC, Jack Applegame wrote: We look forward to sane GC over the years. How do we accelerate the development of precise GC, RC and so on? Maybe we should organize a fundraiser on Kickstarter or somewhere else? I'm not ready to write precise GC, but I'm

Re: What is going on with the ubuntu/debian debacle ?

2016-11-22 Thread deadalnix via Digitalmars-d
On Tuesday, 22 November 2016 at 21:19:13 UTC, H. S. Teoh wrote: On Sat, Nov 19, 2016 at 11:03:05PM +, deadalnix via Digitalmars-d wrote: A lot of users are reporting errors on debian and ubuntu. .o generated by dmd do not link and libphobos.a is unusable. This is very bad and we should

[Issue 16724] New: RandomCover.popFront is a no-op for the first call

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16724 Issue ID: 16724 Summary: RandomCover.popFront is a no-op for the first call Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

Re: DConf 2017: Bigger, Badder, and Berliner! Call for Submissions now open

2016-11-22 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 11/19/16 4:17 PM, Andy Smith wrote: Until branding for the 2017 conf is sorted out/agreed would it be a big deal to 'steal' the cool purple D rocket branding from the 2016 site? (Changing the 6 to a 7 obviously). If you switch between the two pages ( 2016 vs 2017 ). 2017 currently looks

Re: Mir Random [WIP]

2016-11-22 Thread ketmar via Digitalmars-d
On Wednesday, 23 November 2016 at 01:28:11 UTC, Andrei Alexandrescu wrote: On 11/22/16 7:44 PM, Joseph Rushton Wakeling wrote: These days it's debatable whether Mersenne Twister of _any_ word size is the optimal choice for a default RNG Interesting. Could you please add a couple of links

Re: Mir Random [WIP]

2016-11-22 Thread Andrei Alexandrescu via Digitalmars-d
On 11/22/16 7:30 PM, John Colvin wrote: On Tuesday, 22 November 2016 at 23:55:01 UTC, Andrei Alexandrescu wrote: On 11/22/16 1:31 AM, Ilya Yaroshenko wrote: - `opCall` API instead of range interface is used (similar to C++) This seems like a gratuitous departure from common D practice.

Re: Mir Random [WIP]

2016-11-22 Thread Andrei Alexandrescu via Digitalmars-d
On 11/22/16 7:36 PM, Joseph Rushton Wakeling wrote: * random _generators_, i.e. sources of uniformly distributed random bits: - random _engines_ (seedable, pseudo-random algorithms) - random _devices_ (non-deterministic sources of uniformly distributed bits) * random

Re: Mir Random [WIP]

2016-11-22 Thread Andrei Alexandrescu via Digitalmars-d
On 11/22/16 7:44 PM, Joseph Rushton Wakeling wrote: These days it's debatable whether Mersenne Twister of _any_ word size is the optimal choice for a default RNG Interesting. Could you please add a couple of links about that? -- Andrei

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Walter Bright via Digitalmars-d
On 11/22/2016 8:07 AM, Steven Schveighoffer wrote: On 11/22/16 8:31 AM, Ilya Yaroshenko wrote: 2. Why bsf and bsr do NOT use hardware instructions anymore? They should unless there is no hardware instruction available. I believe the software implementation is only a fallback when this is the

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Walter Bright via Digitalmars-d
On 11/22/2016 9:05 AM, Ilya Yaroshenko wrote: In addition, i need to be sure that an intrinsics function is always inlined (without -inline flag too). If it is a supported intrinsic, it is always inlined. There'd be no purpose to it otherwise :-)

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Walter Bright via Digitalmars-d
On 11/22/2016 3:07 PM, Johan Engelen wrote: On Tuesday, 22 November 2016 at 22:57:22 UTC, Iain Buclaw wrote: It's a compilers job is to detect code patterns and emit suitable instructions for them. :-) None of the compilers detect the body code pattern. That is correct as far as bsf/bsr are

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread rikki cattermole via Digitalmars-d
On 23/11/2016 1:46 PM, Walter Bright wrote: On 11/22/2016 5:31 AM, Ilya Yaroshenko wrote: Please add a module (core.intrinsics ?) which will contain all DMD intrinsics similar to ldc.intrinsics. After each DMD release it is not clear what is intrinsics and what is not. I need BSF intrinsics for

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Walter Bright via Digitalmars-d
On 11/22/2016 10:57 AM, tsbockman wrote: Your test fails because you aren't actually using `core.bitop`. Intrinsics are detected based on fully qualified names. As soon as you copy `bsf()` and `bsr()` outside of `core.bitop`, the FQN changes and they're not intrinsics anymore. That is

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Walter Bright via Digitalmars-d
On 11/22/2016 9:07 AM, Ilya Yaroshenko wrote: No, LDC and GDC cannot detect it. Proof - https://godbolt.org/g/bsAFU8 . Current LDC DRuntime uses intrinsics instead of software implementation. Consider the code: import core.bitop; int foo(int v) { return core.bitop.bsf(v); }

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Walter Bright via Digitalmars-d
On 11/22/2016 5:31 AM, Ilya Yaroshenko wrote: Please add a module (core.intrinsics ?) which will contain all DMD intrinsics similar to ldc.intrinsics. After each DMD release it is not clear what is intrinsics and what is not. I need BSF intrinsics for Better C library Mir Random [1], which

Re: Mir Random [WIP]

2016-11-22 Thread Joseph Rushton Wakeling via Digitalmars-d
On Tuesday, 22 November 2016 at 06:31:45 UTC, Ilya Yaroshenko wrote: - 64-bit Mt19937 is default for 64-bit targets This means that seemingly identical code will produce different results depending on whether it's compiled for 64-bit or 32-bit. Is that really worth it, when anyone who

Re: Mir Random [WIP]

2016-11-22 Thread Joseph Rushton Wakeling via Digitalmars-d
On Tuesday, 22 November 2016 at 06:31:45 UTC, Ilya Yaroshenko wrote: # Integer uniform generators [WIP] # Real uniform generators [WIP] # Nonuniform generators [WIP] As we discussed in relation to Seb's project, I think this is a problematic conceptualization of the best way to

Re: Mir Random [WIP]

2016-11-22 Thread John Colvin via Digitalmars-d
On Tuesday, 22 November 2016 at 23:55:01 UTC, Andrei Alexandrescu wrote: On 11/22/16 1:31 AM, Ilya Yaroshenko wrote: - `opCall` API instead of range interface is used (similar to C++) This seems like a gratuitous departure from common D practice. Random number generators are most naturally

Re: Mir Random [WIP]

2016-11-22 Thread Joseph Rushton Wakeling via Digitalmars-d
On Tuesday, 22 November 2016 at 23:55:01 UTC, Andrei Alexandrescu wrote: On 11/22/16 1:31 AM, Ilya Yaroshenko wrote: - `opCall` API instead of range interface is used (similar to C++) This seems like a gratuitous departure from common D practice. Random number generators are most naturally

Re: Mir Random [WIP]

2016-11-22 Thread Andrei Alexandrescu via Digitalmars-d
On 11/22/16 1:31 AM, Ilya Yaroshenko wrote: - `opCall` API instead of range interface is used (similar to C++) This seems like a gratuitous departure from common D practice. Random number generators are most naturally modeled in D as infinite ranges. -- Andrei

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Andrei Alexandrescu via Digitalmars-d
On 11/22/16 1:57 PM, tsbockman wrote: Your test fails because you aren't actually using `core.bitop`. Intrinsics are detected based on fully qualified names. As soon as you copy `bsf()` and `bsr()` outside of `core.bitop`, the FQN changes and they're not intrinsics anymore. Thanks, didn't know

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Guillaume Piolat via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 16:57:28 UTC, kink wrote: I hate this 'idiom' too (just a clumsy workaround for something that should work out of the box), but the non-bindability of rvalues to ref params and the associated dispute is veeery old, nothing new, so I don't agree that the

D IDE - Coedit 3 first beta

2016-11-22 Thread Basile B. via Digitalmars-d-announce
- Changelog: https://gist.github.com/BBasile/5dfb21fd6bd5848922867633eb4136f5 - Github release page: https://github.com/BBasile/Coedit/releases/tag/3_beta_1 Note that this announce is short on purpose. It's a pre-release, however I've build the usual binaries, see second link. You want to

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Johan Engelen via Digitalmars-d
On Tuesday, 22 November 2016 at 22:57:22 UTC, Iain Buclaw wrote: On 22 November 2016 at 23:29, Daniel Kozak via Digitalmars-d wrote: Dne 22.11.2016 v 17:36 Andrei Alexandrescu via Digitalmars-d napsal(a): The intent is to have the compiler detect the pattern and

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Iain Buclaw via Digitalmars-d
On 22 November 2016 at 23:29, Daniel Kozak via Digitalmars-d wrote: > Dne 22.11.2016 v 17:36 Andrei Alexandrescu via Digitalmars-d napsal(a): > > >> On 11/22/2016 11:28 AM, Ilya Yaroshenko wrote: >>> >>> They are always software >>>

Re: DIP 1003: remove `body` as a keyword

2016-11-22 Thread Timon Gehr via Digitalmars-d-announce
On 22.11.2016 20:05, Meta wrote: On Tuesday, 22 November 2016 at 15:11:04 UTC, Sönke Ludwig wrote: Am 21.11.2016 um 22:19 schrieb Timon Gehr: 3 is ambiguous. Can you give an example? I'm curious as well. I considered that option 3 might be ambiguous but I managed to convince myself that it

Re: Detect that a child is waiting for input

2016-11-22 Thread wobbles via Digitalmars-d
On Monday, 21 November 2016 at 07:29:55 UTC, unDEFER wrote: On Sunday, 20 November 2016 at 21:03:57 UTC, John Colvin wrote: If blocking is an error, you could close stdin and assuming the process checks the error codes correctly No, I mean blocking is not error. One method to find it, run

D developer jobs

2016-11-22 Thread eugene via Digitalmars-d
hello everyone, could you, please, tell do any jobs(full-time or freelance) exist for junior D developers?

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Daniel Kozak via Digitalmars-d
Dne 22.11.2016 v 17:36 Andrei Alexandrescu via Digitalmars-d napsal(a): On 11/22/2016 11:28 AM, Ilya Yaroshenko wrote: They are always software https://github.com/dlang/druntime/blob/master/src/core/bitop.d --Ilya The intent is to have the compiler detect the pattern and insert the code.

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #19 from Ketmar Dark --- actually, i believe that no merges from stable to master should be done at all. if hotfix is applicable to both branches, it should go to both branches, first in master, and then,

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Iain Buclaw via Digitalmars-d
On 22 November 2016 at 18:07, Ilya Yaroshenko via Digitalmars-d wrote: > On Tuesday, 22 November 2016 at 16:52:40 UTC, Johan Engelen wrote: >> >> On Tuesday, 22 November 2016 at 16:36:13 UTC, Andrei Alexandrescu wrote: >>> >>> On 11/22/2016 11:28 AM, Ilya Yaroshenko

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #18 from hst...@quickfur.ath.cx --- @Steven: I see your point about preventing redundant fixes. But it's still confusing that a bug has been resolved as fixed, yet the bug persists in master. :-) Is there a way for bugzilla to indicate

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Satoshi via Digitalmars-d-learn
or I have simple class class View { this(Rectangle frame) {...} this(float, float, float, float) { ... } this(Point, Size) { ... } } then struct Point, Size and Rectangle (Point, Size) now I need to write 2 overloads for View class taking 4 floats or (Point, Size) and this must do in every

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #17 from Steven Schveighoffer --- (In reply to Ketmar Dark from comment #15) > the whole process is broken: under no circumstances any hotfix that is > applicable both to master and to stable can land in stable

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Satoshi via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 19:16:56 UTC, Ali Çehreli wrote: On 11/22/2016 08:05 AM, Satoshi wrote: I don't have extensive experience with other languages. In fact, the only other languages that I can claim proficiency are C and C++. (I also know Python just enough to find it incredible

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #16 from Steven Schveighoffer --- (In reply to Ketmar Dark from comment #15) > the whole process is broken: under no circumstances any hotfix that is > applicable both to master and to stable can land in stable

[Issue 16611] std.traits.fullyQualifiedName fails with error 'Unrecognized type const(void)'

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16611 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/a636bb6bb00e54fda367bd3c452db2ced0ca9df6 Fix Issue 16611 - 'Unrecognized type const(void)' error

[Issue 16611] std.traits.fullyQualifiedName fails with error 'Unrecognized type const(void)'

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16611 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: What is going on with the ubuntu/debian debacle ?

2016-11-22 Thread H. S. Teoh via Digitalmars-d
On Sat, Nov 19, 2016 at 11:03:05PM +, deadalnix via Digitalmars-d wrote: > A lot of users are reporting errors on debian and ubuntu. .o generated > by dmd do not link and libphobos.a is unusable. > > This is very bad and we should consider a hotfix. Is someone on it ? FWIW, I'm using

Re: PDF generation in D?

2016-11-22 Thread o3o via Digitalmars-d
On Thursday, 10 November 2016 at 22:30:34 UTC, Karabuta wrote: Hello community, does anyone have on something for PDF generation in D? I may need a PDF generation library in a vibe.d project I'm working on. :) Try http://code.dlang.org/packages/harud, a D binding to libharu.

Re: Char representation

2016-11-22 Thread RazvanN via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 14:23:28 UTC, Jonathan M Davis wrote: On Tuesday, November 22, 2016 13:29:47 RazvanN via Digitalmars-d-learn wrote: [...] You misunderstand. char[] is a dynamic array of char, wchar[] is a dynamic array of wchar[], and dchar[] is a dynamic array of dchar.

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread ketmar via Digitalmars-d
On Tuesday, 22 November 2016 at 19:43:14 UTC, Ilya Yaroshenko wrote: Why do you think it can? 'cause it is in compiler sources.

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 22 November 2016 at 19:29:30 UTC, tsbockman wrote: On Tuesday, 22 November 2016 at 19:27:11 UTC, Ilya Yaroshenko wrote: On Tuesday, 22 November 2016 at 18:57:59 UTC, tsbockman wrote: Your test fails because you aren't actually using `core.bitop`. Intrinsics are detected based on

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread tsbockman via Digitalmars-d
On Tuesday, 22 November 2016 at 19:27:11 UTC, Ilya Yaroshenko wrote: On Tuesday, 22 November 2016 at 18:57:59 UTC, tsbockman wrote: Your test fails because you aren't actually using `core.bitop`. Intrinsics are detected based on fully qualified names. As soon as you copy `bsf()` and `bsr()`

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 22 November 2016 at 18:57:59 UTC, tsbockman wrote: On Tuesday, 22 November 2016 at 17:07:08 UTC, Ilya Yaroshenko wrote: No, LDC and GDC cannot detect it. Proof - https://godbolt.org/g/bsAFU8 . Current LDC DRuntime uses intrinsics instead of software implementation. Ilya Your

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Ali Çehreli via Digitalmars-d-learn
On 11/22/2016 08:05 AM, Satoshi wrote: > Sorry, but D seems to be worse and worse day by day. I don't have extensive experience with other languages. In fact, the only other languages that I can claim proficiency are C and C++. (I also know Python just enough to find it incredible how it's

Re: DIP 1003: remove `body` as a keyword

2016-11-22 Thread Meta via Digitalmars-d-announce
On Tuesday, 22 November 2016 at 15:11:04 UTC, Sönke Ludwig wrote: Am 21.11.2016 um 22:19 schrieb Timon Gehr: 3 is ambiguous. Can you give an example? I'm curious as well. I considered that option 3 might be ambiguous but I managed to convince myself that it wouldn't be. I'm guessing

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread tsbockman via Digitalmars-d
On Tuesday, 22 November 2016 at 17:07:08 UTC, Ilya Yaroshenko wrote: No, LDC and GDC cannot detect it. Proof - https://godbolt.org/g/bsAFU8 . Current LDC DRuntime uses intrinsics instead of software implementation. Ilya Your test fails because you aren't actually using `core.bitop`.

Re: PDF generation in D?

2016-11-22 Thread Vasudev Ram via Digitalmars-d
On Tuesday, 22 November 2016 at 18:49:51 UTC, Vasudev Ram wrote: - check out libharu - it is an open source C library for PDF P.S. I just saw here: http://code.dlang.org/packages/fpdf that they say "If you don't need to be able to import PDFs, you may want to check out harud" - which by

Re: Complex numbers are harder to use than in C

2016-11-22 Thread Marduk via Digitalmars-d-learn
On Sunday, 20 November 2016 at 11:46:04 UTC, Marc Schütz wrote: Try placing it outside the function. Method call syntax doesn't work with nested functions, see here: https://dlang.org/spec/function.html#pseudo-member "The reason why local symbols are not considered by UFCS, is to avoid

Re: Complex numbers are harder to use than in C

2016-11-22 Thread Marduk via Digitalmars-d-learn
On Sunday, 20 November 2016 at 12:08:23 UTC, Ilya Yaroshenko wrote: You can use builtin complex numbers (cfloat/cdouble/creal). The idea of std.complex is wrong . Mir GLAS uses builtin complex numbers and I don't think they will be really deprecated. --Ilya Good to know! The builtin syntax

Re: PDF generation in D?

2016-11-22 Thread Vasudev Ram via Digitalmars-d
On Thursday, 10 November 2016 at 22:30:34 UTC, Karabuta wrote: Hello community, does anyone have on something for PDF generation in D? I may need a PDF generation library in a vibe.d project I'm working on. :) Hi, I did read all the replies posted up to now. Posting a few alternative

Re: implementing --version?

2016-11-22 Thread mab-on via Digitalmars-d-learn
Thanks! These tips are exactly what i needed :)

[Issue 16705] TaskPool.reduce fails to compile "cannot get frame pointer to D main"

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16705 ZombineDev changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #15 from Ketmar Dark --- the whole process is broken: under no circumstances any hotfix that is applicable both to master and to stable can land in stable first. --

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #14 from hst...@quickfur.ath.cx --- Eventually all fixes in stable get merged to master. It's just that in the interim, I'm wondering whether bugs that still exist in master should be kept open until the merge happens, or as soon as

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 Ketmar Dark changed: What|Removed |Added See Also|https://issues.dlang.org/sh |

[Issue 16102] [REG2.070] struct dtor replace value on stack

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16102 Ketmar Dark changed: What|Removed |Added See Also|https://issues.dlang.org/sh |

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #10 from hst...@quickfur.ath.cx --- Is it customary to close bugs once they are fixed in stable, even though the fix has not yet been merged to git HEAD? --

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #11 from hst...@quickfur.ath.cx --- 'cos this is not yet working in git HEAD. --

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 22 November 2016 at 16:52:40 UTC, Johan Engelen wrote: On Tuesday, 22 November 2016 at 16:36:13 UTC, Andrei Alexandrescu wrote: On 11/22/2016 11:28 AM, Ilya Yaroshenko wrote: They are always software https://github.com/dlang/druntime/blob/master/src/core/bitop.d --Ilya The intent

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 22 November 2016 at 16:36:13 UTC, Andrei Alexandrescu wrote: On 11/22/2016 11:28 AM, Ilya Yaroshenko wrote: They are always software https://github.com/dlang/druntime/blob/master/src/core/bitop.d --Ilya The intent is to have the compiler detect the pattern and insert the code.

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread kink via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 16:05:35 UTC, Satoshi wrote: Sorry, but D seems to be worse and worse day by day. This should be resolved by language and not doing it by template function. I hate this 'idiom' too (just a clumsy workaround for something that should work out of the box), but

[Issue 5995] string append negative integer causes segfault

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5995 --- Comment #17 from Steven Schveighoffer --- There are two problems, one is that the OP's code compiles, the other is that it segfaults. Arguably, fixing the first problem will fix the second. But just fixing the second leaves

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Johan Engelen via Digitalmars-d
On Tuesday, 22 November 2016 at 16:36:13 UTC, Andrei Alexandrescu wrote: On 11/22/2016 11:28 AM, Ilya Yaroshenko wrote: They are always software https://github.com/dlang/druntime/blob/master/src/core/bitop.d --Ilya The intent is to have the compiler detect the pattern and insert the code.

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Andrei Alexandrescu via Digitalmars-d
On 11/22/2016 11:28 AM, Ilya Yaroshenko wrote: They are always software https://github.com/dlang/druntime/blob/master/src/core/bitop.d --Ilya The intent is to have the compiler detect the pattern and insert the code. dmd does that IIRC (why is asm.dlang.org not working again?) and so does

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 22 November 2016 at 16:07:39 UTC, Steven Schveighoffer wrote: On 11/22/16 8:31 AM, Ilya Yaroshenko wrote: Philosophical Questions: 1. Why hight level stuff like BitRange is in core.bitop, but not in std.bitmanip? If it should be in core, why it is public? I wrote BitRange to

[Issue 5995] string append negative integer causes segfault

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5995 --- Comment #16 from Andrei Alexandrescu --- This bug has a simple fix - throw a runtime exception (e.g. by onUnicodeError) instead of assert(0). We shouldn't change language rules on account of this. Thanks! --

Re: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Steven Schveighoffer via Digitalmars-d
On 11/22/16 8:31 AM, Ilya Yaroshenko wrote: Philosophical Questions: 1. Why hight level stuff like BitRange is in core.bitop, but not in std.bitmanip? If it should be in core, why it is public? I wrote BitRange to help with cycle detection. It was related to using the btc/btr/bt functions on

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Satoshi via Digitalmars-d-learn
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote: First, a reminder that we have this great resource of D idioms: https://p0nce.github.io/d-idioms/#Rvalue-references:-Understanding-auto-ref-and-then-not-using-it The link above has an idiom of mixing in a byRef() member function

Re: Memory allocation failed. Why?

2016-11-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/21/16 11:53 AM, ag0aep6g wrote: On Monday, 21 November 2016 at 16:37:32 UTC, Kagamin wrote: Anything in .data and .bss sections and stack. See https://issues.dlang.org/show_bug.cgi?id=15723 Ok, not an actual reference then, but a false pointer. Yes. 100 million bytes is 1/40 of all

Re: Is there a way to identfy Windows version?

2016-11-22 Thread rumbu via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 11:00:52 UTC, Bauss wrote: On Monday, 21 November 2016 at 09:11:39 UTC, Jonathan M Davis wrote: On Monday, November 21, 2016 08:57:11 Bauss via Digitalmars-d-learn wrote: [...] Phobos doesn't have anything like that, but you can use the C functions from the

Re: Char representation

2016-11-22 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 13:29:47 UTC, RazvanN wrote: Given the following code: char[5] a = ['a', 'b', 'c', 'd', 'e']; alias Range = char[]; writeln(is(ElementType!Range == char)); One would expect that the program will print true. In fact, it prints false and I noticed that if

[Issue 5995] string append negative integer causes segfault

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5995 --- Comment #15 from Steven Schveighoffer --- Lucia, I think nothing should implicitly cast to dchar. Not bool, int, or even char or wchar. But something this drastic needs approval from Walter and Andrei. Of course, we

Re: DIP 1003: remove `body` as a keyword

2016-11-22 Thread Sönke Ludwig via Digitalmars-d-announce
Am 21.11.2016 um 22:19 schrieb Timon Gehr: 3 is ambiguous. Can you give an example?

Re: D with CygWin

2016-11-22 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 21 November 2016 at 06:38:00 UTC, unDEFER wrote: 1) recompile all dmd libraries including snn.lib with replacing open->_open, close->_close, remove->_remove. What if you just wrote wrapper functions or better yet, linker aliases?

Re: Dlang dynamic compilation

2016-11-22 Thread Faux Amis via Digitalmars-d-announce
On 2016-11-22 12:51, Nordlöw wrote: On Monday, 21 November 2016 at 18:59:17 UTC, Ivan Butygin wrote: Hacked ldc sources are here: https://github.com/Hardcode84/ldc/tree/runtime_compile This could be used to accelerate genetic algorithms at run-time.

[Issue 16698] std.regex.matchFirst corrupts stack

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16698 ag0ae...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #9 from ag0ae...@gmail.com --- *** Issue 16698 has been marked as a duplicate of this issue. *** --

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Guillaume Piolat via Digitalmars-d-learn
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote: Let me know if it's not the equivalent of the original. Ali I've changed the idiom, thanks. The place to discuss this is the d-idioms bugtracker, else I would have skipped this message.

Re: Char representation

2016-11-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, November 22, 2016 13:29:47 RazvanN via Digitalmars-d-learn wrote: > Given the following code: > > char[5] a = ['a', 'b', 'c', 'd', 'e']; > alias Range = char[]; > writeln(is(ElementType!Range == char)); > > One would expect that the program will print true. In fact, it > prints

[Issue 5995] string append negative integer causes segfault

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5995 Lucia Cojocaru changed: What|Removed |Added Assignee|nob...@puremagic.com

[Issue 5995] string append negative integer causes segfault

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5995 Lucia Cojocaru changed: What|Removed |Added Component|druntime|dmd --

[Issue 5995] string append negative integer causes segfault

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5995 Lucia Cojocaru changed: What|Removed |Added CC|

[Issue 13927] optimizer hangs in optelem with SIMD initialization

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13927 Walter Bright changed: What|Removed |Added Keywords||pull

Re: Get return type of a template function without instantiating it

2016-11-22 Thread Meta via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 12:21:18 UTC, Yuxuan Shui wrote: Is there a way to get a template function return type with instantiating it? The return type is independent of the template arguments. I'm asking because there's potentially recursive template instantiation if I do try to

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Namespace via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 13:06:27 UTC, Nordlöw wrote: On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote: mixin template RvalueRef()// <-- DOES NOT TAKE A PARAMETER ANY MORE { alias T = typeof(this); static assert (is(T == struct)); @nogc @safe ref

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread Nordlöw via Digitalmars-d-learn
On Monday, 21 November 2016 at 20:04:51 UTC, Ali Çehreli wrote: ref const(T) byRef() const pure nothrow return Add when DIP-1000 has been implemented into compiler this should be `scope`-qualified aswell, right?

Re: Char representation

2016-11-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 13:29:47 UTC, RazvanN wrote: Is this a bug? The language is sane. The standard library is not alas, it is insane by design, so not a bug.

  1   2   >