Re: BitArray shift left/right confusion.

2017-12-28 Thread Bastiaan Veelo via Digitalmars-d-learn
On Wednesday, 27 December 2017 at 20:45:49 UTC, Biotronic wrote: BitArray is apparently a mess. Thanks for your confirmation, digging and reporting issues https://issues.dlang.org/show_bug.cgi?id=18133 and https://issues.dlang.org/show_bug.cgi?id=18134 (Turns out we both live in the same

Re: how to localize console and GUI apps in Windows

2017-12-28 Thread zabruk70 via Digitalmars-d-learn
you can just set console CP to UTF-8: https://github.com/CyberShadow/ae/blob/master/sys/console.d

Re: Don't expect class destructors to be called at all by the GC

2017-12-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, December 28, 2017 10:37:09 H. S. Teoh via Digitalmars-d-learn wrote: > On Sun, Dec 24, 2017 at 02:07:26PM -0700, Jonathan M Davis via > Digitalmars-d-learn wrote: [...] > > > Regardless, even if it were the case that it were guaranteed that all > > finalizers were run when the

Re: how to localize console and GUI apps in Windows

2017-12-28 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Dec 28, 2017 at 05:56:32PM +, Andrei via Digitalmars-d-learn wrote: > There is one everlasting problem writing Cyrillic programs in Windows: > Microsoft consequently invented two much different code pages for > Russia and other Cyrillic-alphabet countries: first was MSDOS-866 (and >

Re: Don't expect class destructors to be called at all by the GC

2017-12-28 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Dec 24, 2017 at 02:07:26PM -0700, Jonathan M Davis via Digitalmars-d-learn wrote: [...] > Regardless, even if it were the case that it were guaranteed that all > finalizers were run when the program exited, it would still be > terrible practice to rely on it. It's trivial to end up in a

how to localize console and GUI apps in Windows

2017-12-28 Thread Andrei via Digitalmars-d-learn
There is one everlasting problem writing Cyrillic programs in Windows: Microsoft consequently invented two much different code pages for Russia and other Cyrillic-alphabet countries: first was MSDOS-866 (and alike), second Windows-1251. Nowadays MS Windows uses first code page for console

Re: How do I set a class member value by its name in a string?

2017-12-28 Thread Marc via Digitalmars-d-learn
Always helpful. Thank you very much guys.

Re: Getting error in dmd testsuite

2017-12-28 Thread Thomas Mader via Digitalmars-d-learn
On Sunday, 27 August 2017 at 14:04:18 UTC, Joakim wrote: That module tests linking with C++ files, looks like you have some symbols that don't match up. That's weird, because those normally work with gcc. For each of them, use the readelf command from binutils to compare the symbols

Re: druntime memory unittest fails

2017-12-28 Thread Thomas Mader via Digitalmars-d-learn
On Thursday, 28 December 2017 at 10:25:01 UTC, Seb wrote: On Thursday, 28 December 2017 at 10:23:38 UTC, Thomas Mader wrote: Hello, on NixOS the druntime memory unittest fails at 'assert(z is null);' (https://github.com/dlang/druntime/blob/v2.075.1/src/core/memory.d#L899) Does anyone have

Re: How do I set a class member value by its name in a string?

2017-12-28 Thread Mengu via Digitalmars-d-learn
On Wednesday, 27 December 2017 at 23:47:14 UTC, Biotronic wrote: [...] much, much better. thanks biotronic.

Re: float.max + 1.0 does not overflow

2017-12-28 Thread Dave Jones via Digitalmars-d-learn
On Wednesday, 27 December 2017 at 14:14:42 UTC, Benjamin Thaut wrote: On Wednesday, 27 December 2017 at 13:40:28 UTC, rumbu wrote: Is that normal? It computes the difference between float.max and the next smaller reprensentable number in floating point. The difference printed by the program

Re: DLang Tour : Functions as arguments

2017-12-28 Thread Seb via Digitalmars-d-learn
On Thursday, 28 December 2017 at 10:20:59 UTC, Basile B. wrote: On Thursday, 28 December 2017 at 01:37:16 UTC, Tony wrote: On this page: https://tour.dlang.org/tour/en/basics/delegates there is: void doSomething(int function(int, int)

druntime memory unittest fails

2017-12-28 Thread Thomas Mader via Digitalmars-d-learn
Hello, on NixOS the druntime memory unittest fails at 'assert(z is null);' (https://github.com/dlang/druntime/blob/v2.075.1/src/core/memory.d#L899) Does anyone have a clue how that can happen? Thomas

Re: druntime memory unittest fails

2017-12-28 Thread Seb via Digitalmars-d-learn
On Thursday, 28 December 2017 at 10:23:38 UTC, Thomas Mader wrote: Hello, on NixOS the druntime memory unittest fails at 'assert(z is null);' (https://github.com/dlang/druntime/blob/v2.075.1/src/core/memory.d#L899) Does anyone have a clue how that can happen? Thomas Use master:

Re: DLang Tour : Functions as arguments

2017-12-28 Thread Basile B. via Digitalmars-d-learn
On Thursday, 28 December 2017 at 01:37:16 UTC, Tony wrote: On this page: https://tour.dlang.org/tour/en/basics/delegates there is: void doSomething(int function(int, int) doer) { // call passed function doer(5,5); }

Re: Is this an okay representation of a dynamically sized Matrix, to be used for HMM matrices m = (A,B)

2017-12-28 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 28 December 2017 at 01:34:10 UTC, Enjoys Math wrote: Code: module matrix; import std.array; struct Matrix(E) { private: E[][]; this() { } void deleteRow(int i) { E = E[0..i] ~ E[i..$]; } void deleteColumn(int j) { for (int i=0; i <