import std.conv;
void main()
{
float a = 1.23f;
double b = to!float(1.23);
assert (a == b); // ???
}
Should the assert fail or not ? (Please reply without trying first).
If your reply is yes, should
assert (a == to!float(1.23))
fail or not ?
I'm bringing this up, because dmd and
On 1.6.2014 14:45, bearophile wrote:
It's a bad question. Generally to compare floating point values for
equality use std.math.feqrel.
So it's just a coincidence, that GDC, LDC x86 and also DMD x86_64
doesn't fail ?
And this bug https://issues.dlang.org/show_bug.cgi?id=12831
should be marked
On 1.6.2014 16:42, Famous wrote:
from string should be the same, exacly, always. Casting a float to
double should be deterministic as well.
void main()
{
float a = 1.234f;
double b = 1.234;
assert (a == cast(float) b); // fails in DMD x86, works in GDC, LDC
}
Maybe enhancement
On 1.6.2014 18:02, Famous wrote:
This is different. The decimal 1.234 cannot be exacly represented as
radix-2 floating-point number. In your example above, a and b are not
equal. They are both approximations to 1.234 but the value of b is
Still feels iffy to me. If you add:
On Friday, 27 February 2015 at 07:08:26 UTC, Ali Çehreli wrote:
What version of gdb is needed and is that version easy to
install?
Something from late 2014 or newer is the best (7.8.50-cvs or
7.9.50-cvs) as it has got Ian's patches merged, but even an old
stock Debian gdb (7.4.1) works
On Wednesday, 4 March 2015 at 11:32:40 UTC, Dennis Ritchie wrote:
Hi.
It's normal for Windows?
You have to set your console encoding to UTF-8 first.
You can do it by command chcp 65001 or by calling Windows API
function:
extern(Windows) BOOL SetConsoleOutputCP( UINT );
SetConsoleOutputCP(
For reference, it was this PR:
https://github.com/D-Programming-Language/phobos/pull/3089
which fixed the same issue for me.
On Tuesday, 15 September 2015 at 15:28:23 UTC, Andrew Brown wrote:
A very naive question: would it be possible in this case to
backport it into gdc/ldc by copying the pull request and
building the compiler from source, or would this get me into a
world of pain?
Cherry-picking should work and
On Tuesday, 15 September 2015 at 13:56:37 UTC, Andrwe Brown wrote:
I'm trying to read a file line by line, and I get a
core.exception.InvalidMemoryOperationError@(0), even after
https://issues.dlang.org/show_bug.cgi?id=13856
Try DMD 2.068, it has got fixed byLine implementation.
Is this intended or known issue ? It works with 2.066.
SList!int gslist = [1,2,3,4,5,6]; // broken since 2.067
// Error: reinterpreting cast from NodeWithoutPayload* to Node* is not
supported in CTFE
DList!int gdlist = [1,2,3,4,5,6]; // broken since 2.067
// Error: non-constant expression ...
Dne 19. 9. 2015 v 18:41 Russel Winder via Digitalmars-d-learn napsal(a):
> Indeed, it works well. Well for LDC. DMD and GDC are still broken. My
> GDC problems are deeper that this code: Debian packages seem to have
> weird problems and Fedora do not package GDC.
All I need to do to make your
Dne 20. 9. 2015 v 11:55 Jacob Carlborg napsal(a):
> I guess I can use __traits(compiles) to check if typedef and then insert
> the "static if" with a string mixing. But is there a better way to do this?
__VERSION__ ?
--
mk
# netstat -npl | grep mysql
unix 2 [ ACC ] STREAM LISTENING 239449
6293/mysqld /opt/lampp/var/mysql/mysql.sock
Mysql defaults to unix socket, you need to add
bind-address=127.0.0.1 to my.cnf [mysqld] section.
Thanks,
Cleverson
Call SetConsoleOutputCP(CP_UTF8).
No, this may appear to to work, but in reality, it's broken. The
only reliable way is to convert to the native windows codepage.
On Monday, 10 October 2016 at 19:31:14 UTC, Cleverson Casarin
Uliana wrote:
Hi Martin, indeed, here in my workplace Windows machine there
is no "CP_UTF_8" codepage, nor there is 65001. I was waiting to
codepage 65001 (UTF8) should be available on all modern Windows.
You can try command cp
Windows. You can try command cp 65001 in the console window
chcp 65001
On Monday, 17 October 2016 at 15:45:56 UTC, ANtlord wrote:
GDB 7.7.1
Use latest GDB, 7.10 has got much better D support.
On Friday, 9 December 2016 at 16:50:05 UTC, unDEFER wrote:
And in mini program it works and shows diagnostic message.
Where my diagnostic message in more complicate program???
Try redirecting stdout and stderr to a file(s). There are cases
when the console itself can crash.
On Friday, 29 December 2017 at 11:14:39 UTC, zabruk70 wrote:
AFAIK, Windows GUI have no ANSI/OEM problem.
You can use Unicode.
Be advised there are some problems with console UTF-8
input/output in Windows. The most usable is Win10 new console
window but I recommend to use Windows API
On Wednesday, 17 April 2019 at 16:27:02 UTC, Adam D. Ruppe wrote:
Each individual process eats ~30-100 MB, but that times 60 =
trouble. They start off small, like 5 MB, and grow over weeks
or months, so it isn't something I can easily isolate in a
Do you run GC.minimize ?
On Monday, 29 July 2019 at 22:31:01 UTC, kinke wrote:
Switching the console code page to UTF-8, and then restoring
the original one before termination. See
https://github.com/ldc-developers/ldc/pull/3086/commits/5915534530fa095e7e5d58bcfb4ad100d249bbca#diff-c59e7716a40a08ce42f141c738f2c311. You
21 matches
Mail list logo