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
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
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.
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
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
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
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
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
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
https://issues.dlang.org/show_bug.cgi?id=9591
Steven Schveighoffer changed:
What|Removed |Added
Status|RESOLVED|REOPENED
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
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 ?
https://issues.dlang.org/show_bug.cgi?id=9591
Steven Schveighoffer changed:
What|Removed |Added
Keywords||pull
--- Comment
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
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
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)
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
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
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
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
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
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
https://issues.dlang.org/show_bug.cgi?id=8219
Steven Schveighoffer changed:
What|Removed |Added
CC|
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
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
https://sites.google.com/view/energy-efficiency-languages/results
How can we make D more established in this domain?
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
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
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
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
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
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
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
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
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
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
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
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?
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
https://issues.dlang.org/show_bug.cgi?id=14569
Simen Kjaeraas changed:
What|Removed |Added
Status|NEW |RESOLVED
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.
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
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
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
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
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
https://issues.dlang.org/show_bug.cgi?id=17829
Walter Bright changed:
What|Removed |Added
Keywords||betterC
--
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
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
https://issues.dlang.org/show_bug.cgi?id=17828
David Bennett changed:
What|Removed |Added
Keywords||ice
--
https://issues.dlang.org/show_bug.cgi?id=17795
--- Comment #1 from Walter Bright ---
https://github.com/dlang/dmd/pull/7137
--
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
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
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:
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
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
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.
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,
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
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? ;)
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.
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
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:
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))
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.
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
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 +
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
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
https://issues.dlang.org/show_bug.cgi?id=17829
--- Comment #1 from Walter Bright ---
https://github.com/dlang/druntime/pull/1917
--
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.
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.
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
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
https://issues.dlang.org/show_bug.cgi?id=5229
Walter Bright changed:
What|Removed |Added
CC|
75 matches
Mail list logo