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

[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: {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: !!!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: 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: 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

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: 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: 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: {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 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: 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: 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: !!!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 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 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: 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: 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: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: 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: Const/Immutable Slicing Syntax

2016-11-22 Thread Jack Applegame via Digitalmars-d-learn
cast(const) x[]; cast(immutable) x[];

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: mixin template RvalueRef()// <-- DOES NOT TAKE A PARAMETER ANY MORE { alias T = typeof(this); static assert (is(T == struct)); @nogc @safe ref const(T) byRef() const pure nothrow return Why do you need to

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: Let me know if it's not the equivalent of the original. Ali Nice. What about putting this in a druntime or phobos PR, making it standardized?

Re: Char representation

2016-11-22 Thread Stefan Koch 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

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

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
Hey all, 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 should work without linking with

[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

Get return type of a template function without instantiating it

2016-11-22 Thread Yuxuan Shui via Digitalmars-d-learn
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 instantiate it.

Beta D 2.072.1-b1

2016-11-22 Thread Martin Nowak via Digitalmars-d-announce
First beta for the 2.072.1 point release. This version resolves a number of regressions and bugs in the 2.072.0 release. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.072.1.html Please report any bugs at https://issues.dlang.org -Martin

Re: Dlang dynamic compilation

2016-11-22 Thread Minty Fresh via Digitalmars-d-announce
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 Very cool. Although @runtimeCompile does peeve me, as it seems unnecessarily verbose (being longer than any other attribute, I think). I'd

Char representation

2016-11-22 Thread RazvanN via Digitalmars-d-learn
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 Range is char[], wchar[], dchar[], string, wstring, dstring

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 Ali Çehreli via Digitalmars-d-learn
On 11/22/2016 05:06 AM, 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 const(T) byRef() const pure

Re: Char representation

2016-11-22 Thread Daniel Kozak via Digitalmars-d-learn
Dne 22.11.2016 v 14:29 RazvanN via Digitalmars-d-learn napsal(a): 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

Re: Char representation

2016-11-22 Thread Daniel Kozak via Digitalmars-d-learn
Dne 22.11.2016 v 14:29 RazvanN via Digitalmars-d-learn napsal(a): 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

[Issue 16711] New: unittest writefln

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16711 Issue ID: 16711 Summary: unittest writefln Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1

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

2016-11-22 Thread Nicholas Wilson 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: !!!Please add intrinsics module for DMD DRuntime!!!

2016-11-22 Thread Ilya Yaroshenko via Digitalmars-d
[1] https://github.com/libmir/mir-random

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: Get return type of a template function without instantiating it

2016-11-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, November 22, 2016 12:21:18 Yuxuan Shui via Digitalmars-d-learn wrote: > Is there a way to get a template function return type with > instantiating it? The return type is independent of the template > arguments. No. There _is_ no function unless the template is instantiated. Remember

Re: Char representation

2016-11-22 Thread rikki cattermole via Digitalmars-d-learn
On 23/11/2016 2:29 AM, 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 Range is char[], wchar[],

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.

Re: How to muldiv in D?

2016-11-22 Thread Kagamin via Digitalmars-d-learn
Yep, I need muldiv for long values on x86-64.

[Issue 12429] SIMD vector type errors are too eager

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12429 yebblies changed: What|Removed |Added Resolution|WONTFIX |DUPLICATE --- Comment #6

[Issue 8425] Missing line number and module name that can't use core.simd

2016-11-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8425 yebblies changed: What|Removed |Added CC||john.loughran.colvin@gmail.

Const/Immutable Slicing Syntax

2016-11-22 Thread Nordlöw via Digitalmars-d-learn
What's the cleanest way of doing const or immutable slicing in D? My first thought is cast((const typeof(x))x)[] cast((immutable typeof(x))x)[] but that's too verbose for my/taste. Is there a Phobos function for this?

mqtt client id

2016-11-22 Thread kushal bhattacharya via Digitalmars-d-learn
hi, I am totally following what hivemq and mqtt specs are telling.But i have confusion regarding their implementation.In mqtt specs they are suggesing to generate random client id if cleansession flag is true and not for cleansession flag being false.My question is how do i really implement

Re: Is there a way to identfy Windows version?

2016-11-22 Thread Bauss via Digitalmars-d-learn
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 Windows API to do it. A quick search turned up GetVersion

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

2016-11-22 Thread Pjotr Prins via Digitalmars-d
On Monday, 21 November 2016 at 19:23:23 UTC, Stefan Koch wrote: I will try to reproduce and fix the issue. We are also working on a new GNU Guix package for ldc latest. More on that soon.

Re: How to muldiv in D?

2016-11-22 Thread rumbu via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 08:54:36 UTC, Kagamin wrote: Yep, I need muldiv for long values on x86-64. Quick and dirty assembler: version(D_InlineAsm_X86_64): long muldiv(long a, long b, long c) { //windows RCX, RDX, R8 //linux RDI, RSI, RDX version(Windows) {

Re: Dlang dynamic compilation

2016-11-22 Thread Nordlöw via Digitalmars-d-announce
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 8047] important opcodes missing from core/simd.d

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

[Issue 12430] non compile-time __simd opcode causes ICE

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

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

2016-11-22 Thread Jack Applegame via Digitalmars-d
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 willing to donate to those who are ready.

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

2016-11-22 Thread Johan Engelen via Digitalmars-d
On Tuesday, 22 November 2016 at 10:30:00 UTC, Pjotr Prins wrote: We are also working on a new GNU Guix package for ldc latest. More on that soon. We are very close to finishing 1.1.0-beta4. Because beta3 has serious regressions, please wait until beta4. Thanks, Johan

[Issue 13851] ICE with simd assignment to void16 vector

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

[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

[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 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

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.

[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

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: !!!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: 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 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: !!!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 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.

[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

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: 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.

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?

[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: 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 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. *** --

[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 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 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 --

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: 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: 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: 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

[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 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: 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

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

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

[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. --

[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 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 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: 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

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: !!!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 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

  1   2   >