D still has some work with publicity

2017-09-15 Thread Wulfklaue via Digitalmars-d
A recent posting comparing programming languages and there energy efficiency: https://sites.google.com/view/energy-efficiency-languages/results What language that can be in the top is missing? Only one guess needed. Its not hard to figure out without going to the description, that the

Re: The case for integer overflow checks?

2017-09-15 Thread Guillaume Piolat via Digitalmars-d
On Friday, 15 September 2017 at 12:04:27 UTC, Kagamin wrote: Do you hope to see such code? Since width can't be negative, C programmer would use unsigned integer for it, and you can't prohibit overflow for unsigned integer. It is unfixable for array length, because unsigned integers are

Re: The case for integer overflow checks?

2017-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 15 September 2017 at 12:04:27 UTC, Kagamin wrote: Since width can't be negative, C programmer would use unsigned integer for it That's often a big mistake. Lots of people do it... but you shouldn't, exactly because of the wraparound behavior.

[Issue 9591] std.typetuple.staticApplyMap

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9591 --- Comment #3 from Steven Schveighoffer --- (In reply to Steven Schveighoffer from comment #2) > Is there an "Instantiate" > template that could be used in place of ApplyLeft inside the ApplyWith > template? That might be more

Re: D still has some work with publicity

2017-09-15 Thread rikki cattermole via Digitalmars-d
On 15/09/2017 1:19 PM, Wulfklaue wrote: A recent posting comparing programming languages and there energy efficiency: https://sites.google.com/view/energy-efficiency-languages/results What language that can be in the top is missing? Only one guess needed. Its not hard to figure out without

Re: Known reasons why D crashes without any message?

2017-09-15 Thread Suliman via Digitalmars-d
On Friday, 15 September 2017 at 06:22:01 UTC, Swoorup Joshi wrote: On Wednesday, 13 September 2017 at 10:20:48 UTC, Thorsten Sommer wrote: Dear Community, My student assistant and I working on an artificial intelligence library in D for a while. This library is part of my PhD thesis in order

Re: [OT] this is why you shouldn't serialize everything

2017-09-15 Thread Shachar Shemesh via Digitalmars-d
On 14/09/17 22:26, Meta wrote: On Wednesday, 13 September 2017 at 07:08:42 UTC, Shachar Shemesh wrote: On 11/09/17 12:56, Kagamin wrote: Then it turns out that when you serialize "everything", you also serialize the undo buffer. So you can read things that someone wrote and then erased in the

Re: Access Violation when passing the result of a C function directly to a D function?

2017-09-15 Thread Vadim Lopatin via Digitalmars-d-learn
On Friday, 15 September 2017 at 04:01:13 UTC, Timothy Foster wrote: I'm compiling on Windows 7 x64, DMD32 D Compiler v2.075.1 and I'm using Derelict Fmod to handle audio in my application. Every Fmod function returns an int telling me if the function ran okay, or if there was an error. I've

Re: The case for integer overflow checks?

2017-09-15 Thread Kagamin via Digitalmars-d
On Friday, 15 September 2017 at 08:46:57 UTC, Guillaume Piolat wrote: int width = parse_width_from_stream(); // eg: 131072 int height = parse_height_from_stream(); // eg: 131073 Do you hope to see such code? Since width can't be negative, C programmer would use unsigned integer

[Issue 9591] std.typetuple.staticApplyMap

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9591 Steven Schveighoffer changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: D missing from analysis of energy efficient languages

2017-09-15 Thread Wulfklaue via Digitalmars-d
On Friday, 15 September 2017 at 14:00:00 UTC, Nordlöw wrote: https://sites.google.com/view/energy-efficiency-languages/results How can we make D more established in this domain? Posted it a few hours ago. Its not that D is not established in this domain but that the author of the energy

Re: Internal error mixing templates and CTFE

2017-09-15 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 15 September 2017 at 05:58:47 UTC, David Bennett wrote: Hi Guys, I've been playing around with CTFE today to see how far I would push it but I'm having an issue appending to an array on a struct in CTFE from a template: [...] are you using ucent ?

[Issue 9591] std.typetuple.staticApplyMap

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9591 Steven Schveighoffer changed: What|Removed |Added Keywords||pull --- Comment

Re: Known reasons why D crashes without any message?

2017-09-15 Thread apz28 via Digitalmars-d
On Friday, 15 September 2017 at 06:22:01 UTC, Swoorup Joshi wrote: On Wednesday, 13 September 2017 at 10:20:48 UTC, Thorsten Sommer wrote: Dear Community, My student assistant and I working on an artificial intelligence library in D for a while. This library is part of my PhD thesis in order

Re: Known reasons why D crashes without any message?

2017-09-15 Thread Neia Neutuladh via Digitalmars-d
On Wednesday, 13 September 2017 at 10:20:48 UTC, Thorsten Sommer wrote: Besides the unit tests, the main program is now able to startup but crashes after a while without any message at all. No stack trace, no exception, nothing. Obviously, this makes it hard to debug anything... You mention

lazy import, an alternative to DIP 1005

2017-09-15 Thread Jonathan Marler via Digitalmars-d
DIP 1005 proposes a solution to prevent loading in modules that don't need to be loaded, thereby decreasing the overall compile time. Here's an example taken from the DIP: with (import std.stdio) void process(File input) ; with (import std.range) struct Buffered(Range) if (isInputRange!Range)

Re: D missing from analysis of energy efficient languages

2017-09-15 Thread jmh530 via Digitalmars-d
On Friday, 15 September 2017 at 15:22:26 UTC, Wulfklaue wrote: Posted it a few hours ago. Its not that D is not established in this domain but that the author of the energy efficiency test used all the code from benchmarksgame.alioth.debian.org. And D has been missing from that benchmark

DIP 1006--More selective control over contracts--Formal Review Begins

2017-09-15 Thread Mike Parker via Digitalmars-d-announce
The community feedback phase of the Formal Review for DIP 1006, "Providing more selective control over contracts", is now underway. Please visit the review thread in the General forum for the details. http://forum.dlang.org/post/rolxkrmfpvygivyum...@forum.dlang.org

Re: lazy import, an alternative to DIP 1005

2017-09-15 Thread Jonathan Marler via Digitalmars-d
On Friday, 15 September 2017 at 14:45:01 UTC, Jonathan Marler wrote: ... Wanted to add that I believe we could also make "selective imports" lazy, either be default or possibly by adding a modifier like "lazy" if non-lazy imports are still useful. lazy import std.stdio : File; lazy import

Re: failed loading freetype 2.6 via derelict-ft

2017-09-15 Thread Spacen via Digitalmars-d-learn
On Friday, 15 September 2017 at 05:16:55 UTC, Mike Parker wrote: On Wednesday, 13 September 2017 at 22:18:07 UTC, Mike Parker wrote: Missing symbols usually mean a version mismatch. The latest DerelictFT requires FreeType 2.6 or later. It could also mean your shared library was compiled

Re: lazy import, an alternative to DIP 1005

2017-09-15 Thread jmh530 via Digitalmars-d
On Friday, 15 September 2017 at 14:45:01 UTC, Jonathan Marler wrote: Note that instead of introducing the "lazy" modifier here, we could just modify static imports to be lazy which would mean no new syntax and every benefits from the feature without changing their code, that is, if they are

Re: The case for integer overflow checks?

2017-09-15 Thread Neia Neutuladh via Digitalmars-d
On Friday, 15 September 2017 at 12:33:56 UTC, Adam D. Ruppe wrote: On Friday, 15 September 2017 at 12:04:27 UTC, Kagamin wrote: Since width can't be negative, C programmer would use unsigned integer for it That's often a big mistake. Lots of people do it... but you shouldn't, exactly because

[Issue 8219] File.writeln is slow

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8219 Steven Schveighoffer changed: What|Removed |Added CC|

DIP 1006--More selective control over contracts--Formal Review

2017-09-15 Thread Mike Parker via Digitalmars-d
The first stage of the formal review for DIP 1006 [1], "Providing more selective control over contracts", is now underway. From now until 11:59 PM ET on September 29(3:59 AM GMT on September 30), the community has the opportunity to provide last-minute feedback. If you missed the preliminary

Re: extern(C) enum

2017-09-15 Thread bitwise via Digitalmars-d-learn
On Friday, 15 September 2017 at 07:24:34 UTC, Jonathan M Davis wrote: On Friday, September 15, 2017 04:15:57 bitwise via Digitalmars-d-learn wrote: I translated the headers for FreeType2 to D, and in many cases, enums are used as struct members. If I declare an extern(C) enum in D, is it

D missing from analysis of energy efficient languages

2017-09-15 Thread Nordlöw via Digitalmars-d
https://sites.google.com/view/energy-efficiency-languages/results How can we make D more established in this domain?

Re: extern(C) enum

2017-09-15 Thread bitwise via Digitalmars-d-learn
On Friday, 15 September 2017 at 06:57:31 UTC, rikki cattermole wrote: On 15/09/2017 5:15 AM, bitwise wrote: I translated the headers for FreeType2 to D, and in many cases, enums are used as struct members. If I declare an extern(C) enum in D, is it guaranteed to have the same underlying type

Re: extern(C) enum

2017-09-15 Thread Timothy Foster via Digitalmars-d-learn
On Friday, 15 September 2017 at 15:35:48 UTC, bitwise wrote: On Friday, 15 September 2017 at 07:24:34 UTC, Jonathan M Davis wrote: On Friday, September 15, 2017 04:15:57 bitwise via Digitalmars-d-learn wrote: I translated the headers for FreeType2 to D, and in many cases, enums are used as

Re: extern(C) enum

2017-09-15 Thread nkm1 via Digitalmars-d-learn
On Friday, 15 September 2017 at 19:21:02 UTC, Timothy Foster wrote: I believe C enum size is implementation defined. A C compiler can pick the underlying type (1, 2, or 4 bytes, signed or unsigned) that fits the values in the enum. No, at least, not C99. See 6.4.4.3: "An identifier declared

Re: The case for integer overflow checks?

2017-09-15 Thread Guillaume Piolat via Digitalmars-d
On Friday, 15 September 2017 at 16:04:08 UTC, Neia Neutuladh wrote: The last solution that I can think of, specific to this type of thing, is to use the result to allocate a bounds-checked array, where the allocation function yields the appropriately sized array. You'll get an array bounds

Re: The case for integer overflow checks?

2017-09-15 Thread Guillaume Piolat via Digitalmars-d
Point taken about proper allocator with returned size. It's indeed a minority of cases in regular D. On Friday, 15 September 2017 at 16:39:46 UTC, Kagamin wrote: It's not because nobody knows about buffer overflows. C leaves the task on the programmer, and the task is too huge for manual

Re: extern(C) enum

2017-09-15 Thread jmh530 via Digitalmars-d-learn
On Friday, 15 September 2017 at 18:20:06 UTC, Jonathan M Davis wrote: It is my understanding that for both C and C++, an enum is always an int (unless you're talking about enum classes in C++). The size of an int can change based on your architecture, but AFAIK, all of the architectures

Re: The case for integer overflow checks?

2017-09-15 Thread Kagamin via Digitalmars-d
On Friday, 15 September 2017 at 12:25:10 UTC, Guillaume Piolat wrote: Well here I don't think so: this attack is used to adress a very large space, while having a very small actually allocated memory space. Bounds would be too large to matter. As long as it works in bounds it should be more

Re: DIP 1006--More selective control over contracts--Formal Review

2017-09-15 Thread Neia Neutuladh via Digitalmars-d
On Friday, 15 September 2017 at 14:25:56 UTC, Mike Parker wrote: The first stage of the formal review for DIP 1006 [1], "Providing more selective control over contracts", is now underway. From now until 11:59 PM ET on September 29(3:59 AM GMT on September 30), the community has the opportunity

Re: Ranges suck!

2017-09-15 Thread bitwise via Digitalmars-d-learn
On Thursday, 14 September 2017 at 23:53:20 UTC, Your name wrote: [...] I understand your frustration. The fact that "inout" is actually a keyword makes it hard not to think that some very strange fetishes were at play during the creation of this language. As a whole though, the language

Re: extern(C) enum

2017-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 15, 2017 15:35:48 bitwise via Digitalmars-d-learn wrote: > On Friday, 15 September 2017 at 07:24:34 UTC, Jonathan M Davis > > wrote: > > On Friday, September 15, 2017 04:15:57 bitwise via > > > > Digitalmars-d-learn wrote: > >> I translated the headers for FreeType2 to D, and

Re: Access Violation when passing the result of a C function directly to a D function?

2017-09-15 Thread Timothy Foster via Digitalmars-d-learn
On Friday, 15 September 2017 at 10:33:55 UTC, Vadim Lopatin wrote: On Friday, 15 September 2017 at 04:01:13 UTC, Timothy Foster wrote: [...] Probably you have to use const char * msg when interfacing with C. string is a struct - size_t length and const char * value The string doesn't touch

Re: Access Violation when passing the result of a C function directly to a D function?

2017-09-15 Thread Kagamin via Digitalmars-d-learn
On Friday, 15 September 2017 at 04:01:13 UTC, Timothy Foster wrote: am I required to save the result of a C function to variable before passing it into another function or? No. You probably have stack corruption. Does it crash if FMOD_System_Create returns ok?

Re: Access Violation when passing the result of a C function directly to a D function?

2017-09-15 Thread Timothy Foster via Digitalmars-d-learn
On Friday, 15 September 2017 at 16:55:27 UTC, Kagamin wrote: On Friday, 15 September 2017 at 04:01:13 UTC, Timothy Foster wrote: am I required to save the result of a C function to variable before passing it into another function or? No. You probably have stack corruption. Does it crash if

[Issue 14569] BigInt is not compatible with the type of immutable (char) and has a problem when converting from a type immutable(char)

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14569 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

Re: Known reasons why D crashes without any message?

2017-09-15 Thread Swoorup Joshi via Digitalmars-d
On Wednesday, 13 September 2017 at 10:20:48 UTC, Thorsten Sommer wrote: Dear Community, My student assistant and I working on an artificial intelligence library in D for a while. This library is part of my PhD thesis in order to perform several experiments to push the state of the art.

[Issue 17829] New: core.stdc.errno does not work with -betterC

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17829 Issue ID: 17829 Summary: core.stdc.errno does not work with -betterC Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: Known reasons why D crashes without any message?

2017-09-15 Thread Daniel Kozak via Digitalmars-d
http://vibed.org/docs#handling-segmentation-faults this should help On Fri, Sep 15, 2017 at 8:17 AM, Thorsten Sommer via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > Thank you very much for the different approaches. Vladimir, I installed > the GDB today and try to gain new insights with

Re: extern(C) enum

2017-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 15, 2017 04:15:57 bitwise via Digitalmars-d-learn wrote: > I translated the headers for FreeType2 to D, and in many cases, > enums are used as struct members. > > If I declare an extern(C) enum in D, is it guaranteed to have the > same underlying type and size as it would for

Re: extern(C) enum

2017-09-15 Thread rikki cattermole via Digitalmars-d-learn
On 15/09/2017 5:15 AM, bitwise wrote: I translated the headers for FreeType2 to D, and in many cases, enums are used as struct members. If I declare an extern(C) enum in D, is it guaranteed to have the same underlying type and size as it would for a C compiler on the same platform? No need

Re: Internal error mixing templates and CTFE

2017-09-15 Thread Andrea Fontana via Digitalmars-d-learn
On Friday, 15 September 2017 at 05:58:47 UTC, David Bennett wrote: Is this an error in dmd, and should I open a bug report? Internal error is always a bug, so it should be reported! Andrea

[Issue 17829] core.stdc.errno does not work with -betterC

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17829 Walter Bright changed: What|Removed |Added Keywords||betterC --

Re: Known reasons why D crashes without any message?

2017-09-15 Thread Thorsten Sommer via Digitalmars-d
Thank you very much for the different approaches. Vladimir, I installed the GDB today and try to gain new insights with it. Rikki, we are aware of the advantages of LDC. But first of all we want the program to run with DMD. After that we would then switch to LDC. I have already introduced

[Issue 17828] New: [ICE] Internal error: ddmd/backend/cgcs.c 352 - CTFE appending to an array on a struct from a template

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17828 Issue ID: 17828 Summary: [ICE] Internal error: ddmd/backend/cgcs.c 352 - CTFE appending to an array on a struct from a template Product: D Version: D2 Hardware: x86_64

[Issue 17828] [ICE] Internal error: ddmd/backend/cgcs.c 352 - CTFE appending to an array on a struct from a template

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17828 David Bennett changed: What|Removed |Added Keywords||ice --

[Issue 17795] [scope] Scope errors not detected in ~= operation

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17795 --- Comment #1 from Walter Bright --- https://github.com/dlang/dmd/pull/7137 --

Re: Internal error mixing templates and CTFE

2017-09-15 Thread David Bennett via Digitalmars-d-learn
On Friday, 15 September 2017 at 07:12:36 UTC, Andrea Fontana wrote: Internal error is always a bug, so it should be reported! I have opened a issue: https://issues.dlang.org/show_bug.cgi?id=17828

[Issue 17828] [ICE] Internal error: ddmd/backend/cgcs.c 352 - CTFE appending to an array on a struct from a template

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17828 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #1 from

Internal error mixing templates and CTFE

2017-09-15 Thread David Bennett via Digitalmars-d-learn
Hi Guys, I've been playing around with CTFE today to see how far I would push it but I'm having an issue appending to an array on a struct in CTFE from a template: ``` struct Content{ string[] parts; } void add_part_to_content(Content content, string s)(){ content.parts ~= "Part:

The case for integer overflow checks?

2017-09-15 Thread Guillaume Piolat via Digitalmars-d
As a die-hard native programmer I was always disgusted by integer overflow checks and array bounds checks. Littering code with branches everywhere? Just let me go as fast possible please! Last week I was explained by security people how a part of vulnerabilities todays are attacks on image

Re: extern(C) enum

2017-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 15, 2017 19:04:56 jmh530 via Digitalmars-d-learn wrote: > On Friday, 15 September 2017 at 18:20:06 UTC, Jonathan M Davis > > wrote: > > It is my understanding that for both C and C++, an enum is > > always an int (unless you're talking about enum classes in > > C++). The size

Re: The case for integer overflow checks?

2017-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2017 5:00 PM, bitwise wrote: On Friday, 15 September 2017 at 21:21:01 UTC, Walter Bright wrote: https://dlang.org/phobos/std_experimental_checkedint.html Will this ever be integrated directly into the compiler? No plans to do so.

How to get DnD to work in GTKD?

2017-09-15 Thread Joseph via Digitalmars-d-learn
This is my code: TargetEntry te = new TargetEntry("test", GtkTargetFlags.OTHER_APP, 0); w.dragDestSet(GtkDestDefaults.ALL, [te], GdkDragAction.COPY); w.addOnDragDataReceived((dragContext, x, y, selectionData, info, time, widget) { writeln("ok1"); }); w.addOnDragDrop((dragContext, x, y,

Re: Convert user input string to Regex

2017-09-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 16 September 2017 at 03:18:31 UTC, Ky-Anh Huynh wrote: Is there a way to transform user input string to a regular expression? For example, I want to write a `grep`-like program import std.regex; auto re = regex(user_pattern, user_flags); You'll probably want to split it on the

Re: Unum rebuttal

2017-09-15 Thread Timon Gehr via Digitalmars-d
On 15.09.2017 05:49, Walter Bright wrote: The bottom line is there is no magic solution to floating point problems. What about implicit precision-tampering? ;)

Re: Unum rebuttal

2017-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2017 7:53 PM, Timon Gehr wrote: What about implicit precision-tampering? ;) User error, do not pass Go, do not collect $200. --- That reminds me, we do have a solution for the rounding issue: https://github.com/dlang/druntime/pull/1621 It's been drifting there for over a year.

Re: Unum rebuttal

2017-09-15 Thread Nick Barbalich via Digitalmars-d
On Friday, 15 September 2017 at 03:49:02 UTC, Walter Bright wrote: The bottom line is there is no magic solution to floating point problems. Unums just trade one set of problems for another. Walter so what do you see as the trade-offs as being ? Nick

Convert user input string to Regex

2017-09-15 Thread Ky-Anh Huynh via Digitalmars-d-learn
Hi, Is there a way to transform user input string to a regular expression? For example, I want to write a `grep`-like program ``` mygrep -E '/pattern/i' file.txt ``` and here the user's parameter `/pattern/i` would be converted to a Regex object. Fyi, in Ruby, `to_regexp` is a useful gem:

Re: Unum rebuttal

2017-09-15 Thread Timon Gehr via Digitalmars-d
On 15.09.2017 06:14, Joseph wrote: ... How can be be taken seriously if his rebuttle has basic mistakes and typos? :-) https://people.eecs.berkeley.edu/~wkahan/EndErErs.pdf page 5: (y - sqrt(y^2 + 1)) - 1/(y + sqrt(y^2 + 1)) is not zero for all y. I assume he means at (y - sqrt(y^2 + 1))

Re: extern(C) enum

2017-09-15 Thread Timothy Foster via Digitalmars-d-learn
On Friday, 15 September 2017 at 19:35:50 UTC, nkm1 wrote: On Friday, 15 September 2017 at 19:21:02 UTC, Timothy Foster wrote: I believe C enum size is implementation defined. A C compiler can pick the underlying type (1, 2, or 4 bytes, signed or unsigned) that fits the values in the enum.

Binary serialization of a struct

2017-09-15 Thread Joseph via Digitalmars-d-learn
Are there any simple direct serialization libraries where I can mark elements of a class or struct that I want serialized with an attribute and it will take care of all the rest(including recursive structures, arrays, etc) then deserialize back in to the structs? I want something straight

Re: Unum rebuttal

2017-09-15 Thread Joseph via Digitalmars-d
On Saturday, 16 September 2017 at 02:27:23 UTC, Timon Gehr wrote: On 15.09.2017 06:14, Joseph wrote: ... How can be be taken seriously if his rebuttle has basic mistakes and typos? :-) https://people.eecs.berkeley.edu/~wkahan/EndErErs.pdf page 5: (y - sqrt(y^2 + 1)) - 1/(y + sqrt(y^2 +

Re: lazy import, an alternative to DIP 1005

2017-09-15 Thread Jonathan Marler via Digitalmars-d
On Friday, 15 September 2017 at 15:45:56 UTC, jmh530 wrote: On Friday, 15 September 2017 at 14:45:01 UTC, Jonathan Marler wrote: Note that instead of introducing the "lazy" modifier here, we could just modify static imports to be lazy which would mean no new syntax and every benefits from

Re: The case for integer overflow checks?

2017-09-15 Thread Walter Bright via Digitalmars-d
On 9/15/2017 1:46 AM, Guillaume Piolat wrote: If overflow checks happen to be more or less cheap like (surprinsingly) array bounds checks are, it could be a nice thing to pay for. https://dlang.org/phobos/std_experimental_checkedint.html

[Issue 17829] core.stdc.errno does not work with -betterC

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17829 --- Comment #1 from Walter Bright --- https://github.com/dlang/druntime/pull/1917 --

Re: extern(C) enum

2017-09-15 Thread bitwise via Digitalmars-d-learn
On Friday, 15 September 2017 at 19:35:50 UTC, nkm1 wrote: On Friday, 15 September 2017 at 19:21:02 UTC, Timothy Foster wrote: I believe C enum size is implementation defined. A C compiler can pick the underlying type (1, 2, or 4 bytes, signed or unsigned) that fits the values in the enum.

Re: The case for integer overflow checks?

2017-09-15 Thread bitwise via Digitalmars-d
On Friday, 15 September 2017 at 21:21:01 UTC, Walter Bright wrote: On 9/15/2017 1:46 AM, Guillaume Piolat wrote: If overflow checks happen to be more or less cheap like (surprinsingly) array bounds checks are, it could be a nice thing to pay for.

Re: failed loading freetype 2.6 via derelict-ft

2017-09-15 Thread Mike Parker via Digitalmars-d-learn
On Friday, 15 September 2017 at 16:04:52 UTC, Spacen wrote: Thanks for the reply that is exactly it. I downloaded several dlls from the internet, and then decided to build it myself. I see there is a bzip configuration option but I'll need to read the documentation and presumably bzip gets

[Issue 17814] bad output of "static foreach" with -vcg-ast

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17814 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/4317772a132873b9b0cf527312fe8b35e8b11265 fix Issue 17814 - bad output of "static foreach" with

[Issue 5229] Inaccurate parsing of floating-point literals

2017-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5229 Walter Bright changed: What|Removed |Added CC|