Re: TechEmpower Web Framework Performance Comparison Round 13 -- vibe.d non-starter?

2016-11-24 Thread Daniel Kozak via Digitalmars-d
On Thursday, 17 November 2016 at 17:49:09 UTC, sanjayss wrote: https://www.techempower.com/benchmarks/#section=data-r13=ph=json anyone know why vibe.d is shown as "Did not complete" in all tests? So I have investigated it and find out the reason is probably some memory leak. It is

Re: OT: for (;;) {} vs while (true) {}

2016-11-24 Thread unDEFER via Digitalmars-d
Why you consider only 2 options? Use "do {} while (true);" :-)

Re: the best language I have ever met(?)

2016-11-24 Thread MGW via Digitalmars-d-learn
On Wednesday, 23 November 2016 at 18:54:35 UTC, Igor Shirkalin wrote: Igor, is the good Russian-speaking forum https://vk.com/vk_dlang. There are articles on GUI and other aspects of dlang.

Re: ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-24 Thread Patrick Schluter via Digitalmars-d
On Thursday, 24 November 2016 at 20:22:00 UTC, Timon Gehr wrote: On 24.11.2016 20:49, qznc wrote: Although, the article [0] does not say that literally, it sounds like an integer overflow: After trawling through mountains of data, the European Space Agency said Wednesday that while much of

[Issue 16771] Depreciation of implicit string concatenation in 2.072

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16771 Sprink changed: What|Removed |Added CC||sprink.nore...@gmail.com

Re: Vibe.D - log requests and responses

2016-11-24 Thread Saurabh Das via Digitalmars-d-learn
On Thursday, 24 November 2016 at 07:57:47 UTC, Jacob Carlborg wrote: On 2016-11-24 07:29, Saurabh Das wrote: [...] Yes. You can configure the logging on the HTTPServerSettings [1] instance. If you look at the documentation, the first four fields are related to logging. Use "accessLogFile"

[Issue 16771] New: Depreciation of implicit string concatenation in 2.072

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16771 Issue ID: 16771 Summary: Depreciation of implicit string concatenation in 2.072 Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity:

[Issue 16602] Implicit string concatenation and precedence of ~

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16602 Joseph M Rice changed: What|Removed |Added CC||ricej...@gmail.com ---

[Issue 16478] Don't allow to!T() in constraint

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16478 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b46ca983f217cb319e94848cb168e246c1ac9f92 Fix Issue 16478 - Don't allow to!T() in constraint Use

Re: mixin templates as ailas paramters

2016-11-24 Thread Nicholas Wilson via Digitalmars-d-learn
On Friday, 25 November 2016 at 01:08:38 UTC, ketmar wrote: On Friday, 25 November 2016 at 00:43:25 UTC, Nicholas Wilson wrote: works like a charm: mixin template Foo(T) { int z = 42; } auto Bar(alias a) () { mixin a!int; return z; } void main () { writeln(Bar!Foo); } Hmm, maybe i

Re: mixin templates as ailas paramters

2016-11-24 Thread ketmar via Digitalmars-d-learn
On Friday, 25 November 2016 at 00:43:25 UTC, Nicholas Wilson wrote: works like a charm: mixin template Foo(T) { int z = 42; } auto Bar(alias a) () { mixin a!int; return z; } void main () { writeln(Bar!Foo); }

Re: OT: for (;;) {} vs while (true) {}

2016-11-24 Thread Andrei Alexandrescu via Digitalmars-d
On 11/24/2016 05:09 PM, Dennis Ritchie wrote: On Thursday, 24 November 2016 at 22:04:00 UTC, LiNbO3 wrote: As you can see [1] the `while (true)` is lowered into `for (;true;)` so it's all about what construct pleases you the most. [1]

mixin templates as ailas paramters

2016-11-24 Thread Nicholas Wilson via Digitalmars-d-learn
Is there any reason why mixin template Foo(T) { } Struct Bar(ailas a) { mixin a!int } doesn't work? It gives an error saying that mixin templates are not normal templates. I hacked around this by making Bar take an enumeration and then "static switch"ing on it to select the correct

Re: Mir Random [WIP]

2016-11-24 Thread Joseph Rushton Wakeling via Digitalmars-d
On Thursday, 24 November 2016 at 08:36:41 UTC, Andrea Fontana wrote: On Wednesday, 23 November 2016 at 17:31:58 UTC, Kagamin wrote: On Wednesday, 23 November 2016 at 01:28:11 UTC, Andrei Alexandrescu wrote: Interesting. Could you please add a couple of links about that? -- Andrei

Re: Linking g++ compiled object files

2016-11-24 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 24 November 2016 at 20:09:29 UTC, Rubikoid wrote: So, is there any way to use gcc/g++ under windows? DMD can work with COFF objects when given -m32mscoff when compiling 32-bit and -m64 for 64-bit. In both cases, yoi will need the Microsoft linker and SDK intalled. However, when

Re: OT: for (;;) {} vs while (true) {}

2016-11-24 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 24 November 2016 at 22:04:00 UTC, LiNbO3 wrote: As you can see [1] the `while (true)` is lowered into `for (;true;)` so it's all about what construct pleases you the most. [1] https://github.com/dlang/dmd/blob/cd451ceae40d04f7371e46df1c955fd914f3085f/src/statementsem.d#L357 OK,

Re: OT: for (;;) {} vs while (true) {}

2016-11-24 Thread LiNbO3 via Digitalmars-d
On Thursday, 24 November 2016 at 21:57:15 UTC, Dennis Ritchie wrote: Hi all, In the source code, written in D, is often used in the design of the `for (;;) { ... }` Maybe someone has specific examples of translation of code in asm, where `while (true) { ... }` or `for (;;) { ... }` affect

OT: for (;;) {} vs while (true) {}

2016-11-24 Thread Dennis Ritchie via Digitalmars-d
Hi all, In the source code, written in D, is often used in the design of the `for (;;) { ... }` Maybe someone has specific examples of translation of code in asm, where `while (true) { ... }` or `for (;;) { ... }` affect the performance or cross-platform programs. It would be interesting

[Issue 16770] New: rang de basanti -18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16770 Issue ID: 16770 Summary: rang de basanti -18003819788-quickbooks-support-phone-number-quickbook s Product: D Version: D2 Hardware: x86 OS:

[Issue 16769] New: Tu Hi Hai -18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16769 Issue ID: 16769 Summary: Tu Hi Hai -18003819788-quickbooks-support-phone-number-quickbook s Product: D Version: D2 Hardware: x86 OS: Windows

[Issue 16768] New: kuch to hai -18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16768 Issue ID: 16768 Summary: kuch to hai -18003819788-quickbooks-support-phone-number-quickbook s Product: D Version: D2 Hardware: x86 OS:

Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Jot via Digitalmars-d-learn
On Thursday, 24 November 2016 at 20:18:16 UTC, Jot wrote: On Thursday, 24 November 2016 at 17:46:38 UTC, ag0aep6g wrote: On 11/24/2016 06:15 PM, Jot wrote: I think you are failing to realize the first axiom I presented. I only updated dmd2. This shouldn't change the object and library files.

Re: Updated D then undefined symbols in vibed

2016-11-24 Thread ag0aep6g via Digitalmars-d-learn
On 11/24/2016 09:18 PM, Jot wrote: And dmd2.exe does not recognize that an object file is out of date? Seems like a bug to me... I don't know enough about these things to make definite statements, but I wouldn't expect dmd to detect such situations. Do object file formats have ways to store

Re: ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-24 Thread Timon Gehr via Digitalmars-d
On 24.11.2016 20:49, qznc wrote: Although, the article [0] does not say that literally, it sounds like an integer overflow: After trawling through mountains of data, the European Space Agency said Wednesday that while much of the mission went according to plan, a computer that measured the

Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Jot via Digitalmars-d-learn
On Thursday, 24 November 2016 at 17:46:38 UTC, ag0aep6g wrote: On 11/24/2016 06:15 PM, Jot wrote: I think you are failing to realize the first axiom I presented. I only updated dmd2. This shouldn't change the object and library files. They should essentially compile to the same thing and it

Re: Linking g++ compiled object files

2016-11-24 Thread Rubikoid via Digitalmars-d-learn
On Thursday, 24 November 2016 at 17:37:51 UTC, Basile B. wrote: * Under windows 32 bit: - create the object: Use digital mars C/C++ (dmc) to create an OMF object (GCC would produce COFF) then - link: dmd test.d test.obj So, is there any way to use gcc/g++ under windows? Note that

ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-24 Thread qznc via Digitalmars-d
Although, the article [0] does not say that literally, it sounds like an integer overflow: After trawling through mountains of data, the European Space Agency said Wednesday that while much of the mission went according to plan, a computer that measured the rotation of the lander hit a

Re: Mir Random [WIP]

2016-11-24 Thread Timon Gehr via Digitalmars-d
On 24.11.2016 14:50, Kagamin wrote: On Thursday, 24 November 2016 at 12:02:22 UTC, John Colvin wrote: Because it's correct. If a.length is larger than int.max then cast(int)a.length will half the time be negative and therefore a simple rightshift would not be equivalent to division by 2. It

[Issue 16767] New: jai ho -18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16767 Issue ID: 16767 Summary: jai ho -18003819788-quickbooks-support-phone-number-quickbook s Product: D Version: D2 Hardware: x86 OS: Windows

[Issue 16766] New: hare rama -18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16766 Issue ID: 16766 Summary: hare rama -18003819788-quickbooks-support-phone-number-quickbook s Product: D Version: D2 Hardware: x86 OS: Windows

Re: Mir Random [WIP]

2016-11-24 Thread Ilya Yaroshenko via Digitalmars-d
On Thursday, 24 November 2016 at 17:04:43 UTC, John Colvin wrote: If druntime was initialised by default using __attribute__((constructor)) for static and linker .init for shared libraries, would that be good enough for you*? I feel like you're limiting your design choices because of a

Re: Template specialization question

2016-11-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On Thursday, 24 November 2016 at 17:59:55 UTC, ag0aep6g wrote: Took me a bit to find it, but it is documented: "If both a template with a sequence parameter and a template without a sequence parameter exactly match a template instantiation, the template without a TemplateSequenceParameter

Re: Template specialization question

2016-11-24 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 24 November 2016 at 17:47:04 UTC, Steven Schveighoffer wrote: void foo(T)(T t){writeln("a");} void foo(T...)(T t){writeln("b");} foo(1); Compiles? If so, which prints out? I was surprised by the answer. I can't find docs for it. Is the behavior intended? -Steve That is

[Issue 16765] New: bhag lo ab -18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16765 Issue ID: 16765 Summary: bhag lo ab -18003819788-quickbooks-support-phone-number-quickbook s Product: D Version: D2 Hardware: x86 OS: Windows

[Issue 16764] New: `hashOf` is misleading, error-prone, and useless

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16764 Issue ID: 16764 Summary: `hashOf` is misleading, error-prone, and useless Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: critical

Re: Template specialization question

2016-11-24 Thread ag0aep6g via Digitalmars-d-learn
On 11/24/2016 06:47 PM, Steven Schveighoffer wrote: void foo(T)(T t){writeln("a");} void foo(T...)(T t){writeln("b");} foo(1); Compiles? If so, which prints out? I was surprised by the answer. I can't find docs for it. Is the behavior intended? Took me a bit to find it, but it is

Template specialization question

2016-11-24 Thread Steven Schveighoffer via Digitalmars-d-learn
void foo(T)(T t){writeln("a");} void foo(T...)(T t){writeln("b");} foo(1); Compiles? If so, which prints out? I was surprised by the answer. I can't find docs for it. Is the behavior intended? -Steve

Re: Updated D then undefined symbols in vibed

2016-11-24 Thread ag0aep6g via Digitalmars-d-learn
On 11/24/2016 06:15 PM, Jot wrote: I think you are failing to realize the first axiom I presented. I only updated dmd2. This shouldn't change the object and library files. They should essentially compile to the same thing and it shouldn't matter. As far as I can tell, this isn't generally

Re: Linking g++ compiled object files

2016-11-24 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 23 November 2016 at 19:49:35 UTC, Rubikoid wrote: For example, i have test.cpp: #include void test() { printf("test\n"); } And test.d: import std.stdio; extern (C++) void test(); void main() { test(); readln(); } How i should compile test.cpp using g++ to link it

[Issue 16763] New: Associative array literal inside array or AA literal doesn't work as initializer if variable type is known

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16763 Issue ID: 16763 Summary: Associative array literal inside array or AA literal doesn't work as initializer if variable type is known Product: D Version: D2 Hardware: All

Re: CTFE Status

2016-11-24 Thread Stefan Koch via Digitalmars-d
I have just discovered breakage of basic operations. I will need regression tests, some time soon.

Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Jot via Digitalmars-d-learn
On Thursday, 24 November 2016 at 16:49:20 UTC, Rene Zwanenburg wrote: On Thursday, 24 November 2016 at 16:17:19 UTC, Jot wrote: Any more ideas? Obviously something isn't getting linked in in the VS project. This is definitely a stale object file problem. From that error message it appears to

Re: Mir Random [WIP]

2016-11-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 November 2016 at 16:09:23 UTC, Ilya Yaroshenko wrote: On Thursday, 24 November 2016 at 13:45:40 UTC, Jonathan M Davis wrote: Alternatively, you could just do rndGen().take(1).front, and as long as rndGen() gives you a reference type, it works just fine. Unfortunately,

Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 24 November 2016 at 16:17:19 UTC, Jot wrote: Any more ideas? Obviously something isn't getting linked in in the VS project. This is definitely a stale object file problem. From that error message it appears to use the .dub directory to store object files of your dependencies.

Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Jot via Digitalmars-d-learn
On Thursday, 24 November 2016 at 10:04:36 UTC, Rene Zwanenburg wrote: On Thursday, 24 November 2016 at 09:52:32 UTC, Jot wrote: Seems like someone decided to screw up a lot of people by removing a lot of stuff ;/ I guess I should learn my lesson about assuming a "stable" dmd release won't

[Issue 16762] New: yuvike6-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16762 Issue ID: 16762 Summary: yuvike6-18003819788-quickbooks-support-phone-number-qu ickbooks Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

[Issue 16761] New: helicopter-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16761 Issue ID: 16761 Summary: helicopter-18003819788-quickbooks-support-phone-number -quickbooks Product: D Version: D2 Hardware: x86 OS: Windows Status:

[Issue 16760] New: msdhoni-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16760 Issue ID: 16760 Summary: msdhoni-18003819788-quickbooks-support-phone-number-qu ickbooks Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

[Issue 16759] New: karde chadai-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16759 Issue ID: 16759 Summary: karde chadai-18003819788-quickbooks-support-phone-number-qui ckbooks Product: D Version: D2 Hardware: x86 OS:

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

2016-11-24 Thread Timon Gehr via Digitalmars-d-announce
On 24.11.2016 12:35, Sönke Ludwig wrote: Am 23.11.2016 um 21:32 schrieb Timon Gehr: On 23.11.2016 11:15, Sönke Ludwig wrote: scope (exit) { assert(n > 0); } { n += 1; } This is not a counterexample, because the block statement following the scope statement is not part of

Re: Mir Random [WIP]

2016-11-24 Thread Ilya Yaroshenko via Digitalmars-d
On Thursday, 24 November 2016 at 13:45:40 UTC, Jonathan M Davis wrote: Alternatively, you could just do rndGen().take(1).front, and as long as rndGen() gives you a reference type, it works just fine. Unfortunately, std.random did not use reference types for its ranges. _That_ is the big

Re: Detect that a child is waiting for input

2016-11-24 Thread unDEFER via Digitalmars-d
The program which stops even run without "&": #!/usr/bin/rdmd import std.stdio; import std.file; import std.string; import core.sys.posix.unistd; import core.stdc.errno; import core.stdc.string; void main() { int res = core.sys.posix.unistd.tcsetpgrp(0, getppid()); if (res != 0) {

Re: D IDE - Coedit 3 first beta

2016-11-24 Thread Basile B. via Digitalmars-d-announce
On Thursday, 24 November 2016 at 08:46:28 UTC, Dmitry wrote: On Tuesday, 22 November 2016 at 23:38:53 UTC, Basile B. wrote: https://github.com/BBasile/Coedit/releases/tag/3_beta_1 Menu always flickering https://dl.dropboxusercontent.com/u/78963719/D/other/coedit.gif Win7 x64 (I din't

Re: Catch block not hit in unittest

2016-11-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 24, 2016 15:41:12 Lucia Cojocaru via Digitalmars-d- learn wrote: > I was able to hack my way around it. In druntime there are other > modules which need the exact same thing and have their own > assertThrown template: >

Re: Catch block not hit in unittest

2016-11-24 Thread Lucia Cojocaru via Digitalmars-d-learn
On Thursday, 24 November 2016 at 14:47:32 UTC, Jonathan M Davis wrote: On Thursday, November 24, 2016 13:42:25 Kagamin via Digitalmars-d-learn wrote: Linux? Probably another bug. Try this: unittest { import core.exception : UnicodeException; void f() { string ret;

Re: Catch block not hit in unittest

2016-11-24 Thread Lucia Cojocaru via Digitalmars-d-learn
On Thursday, 24 November 2016 at 15:18:40 UTC, Ryan wrote: On Thursday, 24 November 2016 at 13:42:25 UTC, Kagamin wrote: Linux? Probably another bug. Try this: unittest { import core.exception : UnicodeException; void f() { string ret; int i = -1; ret ~= i;

[Issue 16758] New: Variant.opIndex result not modified after opAssign

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16758 Issue ID: 16758 Summary: Variant.opIndex result not modified after opAssign Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal

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

2016-11-24 Thread WM.H via Digitalmars-d-announce
On Saturday, 19 November 2016 at 21:16:15 UTC, Dicebot wrote: DIP 1003 is merged to the queue and open for public informal feedback. PR: https://github.com/dlang/DIPs/pull/48 Initial merged document: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1003.md If you want the change to be

Re: Catch block not hit in unittest

2016-11-24 Thread Ryan via Digitalmars-d-learn
On Thursday, 24 November 2016 at 13:42:25 UTC, Kagamin wrote: Linux? Probably another bug. Try this: unittest { import core.exception : UnicodeException; void f() { string ret; int i = -1; ret ~= i; } try { f(); }

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

2016-11-24 Thread meppl via Digitalmars-d-announce
Indentation syntax If we have an optional indentation syntax one day, those anonymous looking scopes behind functions may become weird things. int div(int a, int b) in { assert(b != 0); } { return a / b; } indentation: int div( int a, int b) in: assert( b != 0) : return a / b

Re: Catch block not hit in unittest

2016-11-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 24, 2016 13:42:25 Kagamin via Digitalmars-d-learn wrote: > Linux? Probably another bug. > Try this: > unittest > { > import core.exception : UnicodeException; > void f() > { > string ret; > int i = -1; > ret ~= i; > } > >

Re: A simplification of the RvalueRef idiom

2016-11-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 24, 2016 00:35:39 TheGag96 via Digitalmars-d-learn wrote: > 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 > >>

Re: Mir Random [WIP]

2016-11-24 Thread Jonathan M Davis via Digitalmars-d
On Thursday, November 24, 2016 13:54:50 Kagamin via Digitalmars-d wrote: > On Thursday, 24 November 2016 at 13:45:40 UTC, Jonathan M Davis > > wrote: > > How so? Because someone might call range.front again without > > bothering to call popFront? > > That's what everything in std.algorithm does.

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

2016-11-24 Thread Jonathan M Davis via Digitalmars-d-announce
On Saturday, November 19, 2016 21:16:15 Dicebot via Digitalmars-d-announce wrote: > DIP 1003 is merged to the queue and open for public informal > feedback. > > PR: https://github.com/dlang/DIPs/pull/48 > Initial merged document: > https://github.com/dlang/DIPs/blob/master/DIPs/DIP1003.md > > If

Re: Mir Random [WIP]

2016-11-24 Thread Kagamin via Digitalmars-d
On Thursday, 24 November 2016 at 13:45:40 UTC, Jonathan M Davis wrote: How so? Because someone might call range.front again without bothering to call popFront? That's what everything in std.algorithm does.

Re: Mir Random [WIP]

2016-11-24 Thread Kagamin via Digitalmars-d
On Thursday, 24 November 2016 at 12:02:22 UTC, John Colvin wrote: Because it's correct. If a.length is larger than int.max then cast(int)a.length will half the time be negative and therefore a simple rightshift would not be equivalent to division by 2. It can't be possibly correct when

Re: Mir Random [WIP]

2016-11-24 Thread Jonathan M Davis via Digitalmars-d
On Thursday, November 24, 2016 09:05:34 Kagamin via Digitalmars-d wrote: > On Wednesday, 23 November 2016 at 21:33:53 UTC, Jonathan M Davis > > wrote: > > though I think that using the comma operator like that is > > deprecated now. Adding a helper function such as > > > > auto getNext(R)(ref R

Re: Catch block not hit in unittest

2016-11-24 Thread Kagamin via Digitalmars-d-learn
Linux? Probably another bug. Try this: unittest { import core.exception : UnicodeException; void f() { string ret; int i = -1; ret ~= i; } try { f(); } catch(UnicodeException e) { assert(e.msg == "Invalid UTF-8

[Issue 16757] New: chal kat le-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16757 Issue ID: 16757 Summary: chal kat le-18003819788-quickbooks-support-phone-number-quickbo oks Product: D Version: D2 Hardware: x86 OS: Windows

[Issue 16756] New: re sultan-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16756 Issue ID: 16756 Summary: re sultan-18003819788-quickbooks-support-phone-number-qui ckbooks Product: D Version: D2 Hardware: x86 OS: Windows

[Issue 16755] New: jhandu baam-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16755 Issue ID: 16755 Summary: jhandu baam-18003819788-quickbooks-support-phone-number-quick books Product: D Version: D2 Hardware: x86 OS: Windows

[Issue 16754] New: nach ke dikha-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16754 Issue ID: 16754 Summary: nach ke dikha-18003819788-quickbooks-support-phone-number-quic kbooks Product: D Version: D2 Hardware: x86 OS:

[Issue 16753] New: nach ke dikha-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16753 Issue ID: 16753 Summary: nach ke dikha-18003819788-quickbooks-support-phone-number-quic kbooks Product: D Version: D2 Hardware: x86 OS:

[Issue 16752] New: basanti-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16752 Issue ID: 16752 Summary: basanti-18003819788-quickbooks-support-phone-number-qu ickbooks Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

[Issue 16491] Forward referencing and static/shared static module constructors break initialisation

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16491 --- Comment #7 from anonymous4 --- If it didn't use runtime data, it could be computed at compile time. --

[Issue 16751] New: khulla-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16751 Issue ID: 16751 Summary: khulla-18003819788-quickbooks-support-phone-number-qui ckbooks Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

[Issue 16750] New: rakhtahu-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16750 Issue ID: 16750 Summary: rakhtahu-18003819788-quickbooks-support-phone-number-q uickbooks Product: D Version: D2 Hardware: x86 OS: Windows Status:

[Issue 16749] New: Bhulla-18003819788-quickbooks-support-phone-number-quickbooks

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16749 Issue ID: 16749 Summary: Bhulla-18003819788-quickbooks-support-phone-number-qui ckbooks Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

Re: Detect that a child is waiting for input

2016-11-24 Thread Shachar Shemesh via Digitalmars-d
You can detect whether another process received a signal by ptracing it. If you are only ptracing for signals, then the performance penalty shouldn't be too severe. Shachar On 24/11/16 12:35, unDEFER wrote: On Wednesday, 23 November 2016 at 07:18:27 UTC, Shachar Shemesh wrote: The shell

[Issue 16747] Cannot have stack allocated classes in @safe code

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16747 --- Comment #2 from Walter Bright --- https://github.com/dlang/dmd/pull/6279 --

[Issue 16747] Cannot have stack allocated classes in @safe code

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16747 --- Comment #1 from Walter Bright --- Regression discovered by Mathias Lang --

[Issue 16195] delete should be @system

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16195 Walter Bright changed: What|Removed |Added See Also|

[Issue 16747] Cannot have stack allocated classes in @safe code

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16747 Walter Bright changed: What|Removed |Added See Also|

[Issue 16747] New: Cannot have stack allocated classes in @safe code

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16747 Issue ID: 16747 Summary: Cannot have stack allocated classes in @safe code Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression

Re: Switch ignores case (?)

2016-11-24 Thread ketmar via Digitalmars-d-learn
On Thursday, 24 November 2016 at 11:40:24 UTC, Antonio Corbi wrote: Could it be possible to ping M. Nowak to include the fix for this bug (due to its importance) in the final 2.072.1 release? there is no real fix yet. what i provided is a quick hack, not tested on anything except GNU/Linux,

Re: Mir Random [WIP]

2016-11-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 November 2016 at 10:41:44 UTC, Kagamin wrote: On Thursday, 24 November 2016 at 10:16:11 UTC, John Colvin wrote: I was talking about andrei's example. He has a cast(int) in it before the division. And you think that compilation of cast(int)a.length/2 to 3 instructions is

Catch block not hit in unittest

2016-11-24 Thread Lucia Cojocaru via Digitalmars-d-learn
Hello, I am trying to assert the fact that a UnicodeException is thrown by the piece of code added in this PR: https://github.com/dlang/druntime/pull/1696/files The unittest is in druntime/src/rt/lifetime.d: unittest { import core.exception : UnicodeException; try {

[Issue 10235] Grammar does not contain a rule for function declarations

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10235 anonymous4 changed: What|Removed |Added See Also|

[Issue 4720] contracts don't work on function definitions

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4720 anonymous4 changed: What|Removed |Added See Also|

Re: spam in bugzilla

2016-11-24 Thread Kagamin via Digitalmars-d-learn
Maybe connect a service like https://twitter.com/StopForumSpam ?

Re: Switch ignores case (?)

2016-11-24 Thread Antonio Corbi via Digitalmars-d-learn
On Wednesday, 23 November 2016 at 22:13:38 UTC, ketmar wrote: On Wednesday, 23 November 2016 at 22:00:58 UTC, Steven Schveighoffer wrote: I can't see why you need to deal with the glue layer at all -- just tell the glue layer that it's a list of strings and not dstrings ;) 'cause that is how

[Issue 7996] Refuse std.math.isnan() on not floating point values?

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7996 RazvanN changed: What|Removed |Added CC|

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

2016-11-24 Thread Sönke Ludwig via Digitalmars-d-announce
Am 23.11.2016 um 21:32 schrieb Timon Gehr: On 23.11.2016 11:15, Sönke Ludwig wrote: scope (exit) { assert(n > 0); } { n += 1; } This is not a counterexample, because the block statement following the scope statement is not part of the scope statement. I.e. if anything, it

Re: Detect that a child is waiting for input

2016-11-24 Thread unDEFER via Digitalmars-d
Here is good information about difference between foreground process groups and background: https://www.win.tue.nl/~aeb/linux/lk/lk-10.html Shortly, there is only one process group which is foreground, you can get it with tcgetpgrp(fd) or set it with tcsetpgrp(fd,pgrp). To setup process group

[Issue 5995] string append negative integer causes segfault

2016-11-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5995 --- Comment #18 from Lucia Cojocaru --- As Andrei suggested, here is the quick fix: PR https://github.com/dlang/druntime/pull/1696 Language design changes should be discussed with Walter and Andrei in depth. --

Re: Mir Random [WIP]

2016-11-24 Thread Kagamin via Digitalmars-d
On Thursday, 24 November 2016 at 10:16:11 UTC, John Colvin wrote: I was talking about andrei's example. He has a cast(int) in it before the division. And you think that compilation of cast(int)a.length/2 to 3 instructions is optimized just fine? How is it better that one shift?

Re: Detect that a child is waiting for input

2016-11-24 Thread unDEFER via Digitalmars-d
On Wednesday, 23 November 2016 at 07:18:27 UTC, Shachar Shemesh wrote: The shell does that for background processes. I think it takes away the TTY from its children, and this way, when they try to read from stdin, they get SIGSTOP from the system. I'm not sure what the precise mechanism is.

Re: Switch ignores case (?)

2016-11-24 Thread Chris via Digitalmars-d-learn
On Thursday, 24 November 2016 at 10:12:40 UTC, ketmar wrote: thanks. tbh, i am surprised myself -- it is completely fubared, but nobody noticed. maybe that says something about real-world useability of dstring/wstring... ;-) Well, I came across it, because I wanted to work around

Re: CTFE Status

2016-11-24 Thread Stefan Koch via Digitalmars-d
On Monday, 21 November 2016 at 19:19:50 UTC, Stefan Koch wrote: On Monday, 21 November 2016 at 19:11:58 UTC, Anonymouse wrote: On Sunday, 20 November 2016 at 09:02:30 UTC, Stefan Koch wrote: On Saturday, 19 November 2016 at 11:22:18 UTC, Stefan Koch wrote: [...] I would buy you a beer but

Re: Mir Random [WIP]

2016-11-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 November 2016 at 10:14:27 UTC, Kagamin wrote: On Thursday, 24 November 2016 at 09:46:16 UTC, John Colvin wrote: That's because of the cast(int), dividing by two is optimised just fine. What about Andrei's example? I was talking about andrei's example. He has a cast(int) in

  1   2   >