Re: Binding rvalues to ref [WAS: I close BIP27. I won't be pursuing BIPs anymore]

2016-10-20 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 20 October 2016 at 01:04:35 UTC, Jonathan M Davis wrote: The transitivity of const shoot stuff in the foot pretty thoroughly in a number of cases. A prime example would be ranges, because they have to be mutated to be iterated over. If the function actually took a range directly,

Re: Static Length Propagation of Ranges

2016-10-20 Thread ZombineDev via Digitalmars-d-learn
On Thursday, 20 October 2016 at 16:25:53 UTC, Meta wrote: On Thursday, 20 October 2016 at 13:05:05 UTC, Nordlöw wrote: On Thursday, 20 October 2016 at 12:38:40 UTC, Nordlöw wrote: ElementType!R[n] arrayN(size_t n, R)(R r) { assert(r.length == n); typeof(return) dst; import

[Issue 9275] [GC] removeRoot hits assert(0) instead of being a no-op (as documented)

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9275 safety0ff.bugz changed: What|Removed |Added Keywords||bootcamp

[Issue 12625] implicit slicing of RValue static array should be illegal

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12625 ZombineDev changed: What|Removed |Added Keywords||safe --

Re: Binding temporaries to ref [WAS: I close BIP27. I won't be pursuing BIPs anymore]

2016-10-20 Thread Walter Bright via Digitalmars-d
On 10/20/2016 2:53 PM, Andrei Alexandrescu wrote: The combinatorial explosion was one core motivation for C++ rvalue references. I think the authors of the would-be DIP would do good to be conversant with that proposal. -- Andrei "However, as the number of free parameters grows (as in bind

Re: Dustmite can't handle my memory segfault

2016-10-20 Thread Vladimir Panteleev via Digitalmars-d-learn
On Thursday, 20 October 2016 at 21:33:59 UTC, Nordlöw wrote: I need your help here, I'm complete stuck. Vladimir? If you see output even after redirecting stdout and stderr, the program is probably writing to /dev/tty or similar. I'm not sure what the "proper" way is to run a program

Re: Sorted ranges in combined sorted order?

2016-10-20 Thread Ali Çehreli via Digitalmars-d-learn
On 10/20/2016 02:15 PM, Nordlöw wrote: On Thursday, 20 October 2016 at 21:14:14 UTC, Nordlöw wrote: Given a range of ranges where individual ranges are already Ahh, my mistake. It's https://dlang.org/phobos/std_algorithm_setops.html#.NWayUnion you're looking for, right? Thanks! That's

Re: Binding temporaries to ref [WAS: I close BIP27. I won't be pursuing BIPs anymore]

2016-10-20 Thread Andrei Alexandrescu via Digitalmars-d
On 10/20/2016 04:57 PM, Walter Bright wrote: On 10/20/2016 12:49 PM, Andrei Alexandrescu wrote: On 10/20/2016 06:23 AM, Ethan Watson wrote: Suitable enough for simple functions. But beyond that becomes maintenance hell. I agree this workaround has a combinatorial problem. Yes, Ethan made a

Re: Why are homepage examples too complicated?

2016-10-20 Thread Andrei Alexandrescu via Digitalmars-d
On 10/20/2016 04:16 PM, Karabuta wrote: On Thursday, 20 October 2016 at 19:52:32 UTC, Andrei Alexandrescu wrote: On 10/20/2016 03:48 PM, Karabuta wrote: On Thursday, 20 October 2016 at 14:04:06 UTC, Andrei Alexandrescu wrote: On 10/20/2016 07:38 AM, Nick Treleaven wrote: On Sunday, 16

Re: [OT] Re: Binding rvalues to const ref in D

2016-10-20 Thread Steven Schveighoffer via Digitalmars-d
On 10/20/16 5:07 PM, Nick Sabalausky wrote: I think I'm going to try to put out first-try pass at a new API in a separate branch, try to get that out as soon as I can, and post it for experimentation/feedback. Awesome! Looking forward to it. -Steve

Dustmite can't handle my memory segfault

2016-10-20 Thread Nordlöw via Digitalmars-d-learn
I'm struggling with finding a memory management problem in my latest array container (non-RC just C++-style) at https://github.com/nordlow/phobos-next/blob/master/src/array_ex.d When I run the program separately my terminal spits out *** Error in `./array_ex': corrupted double-linked list:

mysql-native v0.1.7

2016-10-20 Thread Nick Sabalausky via Digitalmars-d-announce
Minor update to mysql-native: A client driver for MySQL/MariaDB written natively in D from scratch via the published protocol specs, with no dependency on the C MySQL client library. Supports either Phobos or Vide.d sockets (works with or without Vibe.d).

Re: Sorted ranges in combined sorted order?

2016-10-20 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 20 October 2016 at 21:14:14 UTC, Nordlöw wrote: Given a range of ranges where individual ranges are already Ahh, my mistake. It's https://dlang.org/phobos/std_algorithm_setops.html#.NWayUnion you're looking for, right?

Re: Sorted ranges in combined sorted order?

2016-10-20 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 20 October 2016 at 20:49:38 UTC, Ali Çehreli wrote: Given a range of ranges where individual ranges are already sorted, is there anything in Phobos that can visit the combined range in sorted order? Although the range elements are not necessarily arrays, e.g. [ [ 3, 10, 20 ]

Re: [OT] Re: Binding rvalues to const ref in D

2016-10-20 Thread Nick Sabalausky via Digitalmars-d
On 10/20/2016 04:32 PM, Steven Schveighoffer wrote: On 10/20/16 12:50 PM, Nick Sabalausky wrote: You can't bind individual values? Is there something wrong with "bindParameter(value, paramIndex)"? (I mean, besides the fact that it takes a ref, and, like the rest of the lib, isn't really

Re: Binding temporaries to ref [WAS: I close BIP27. I won't be pursuing BIPs anymore]

2016-10-20 Thread Walter Bright via Digitalmars-d
On 10/20/2016 12:49 PM, Andrei Alexandrescu wrote: On 10/20/2016 06:23 AM, Ethan Watson wrote: Suitable enough for simple functions. But beyond that becomes maintenance hell. I agree this workaround has a combinatorial problem. Yes, Ethan made a good point I hadn't thought of. And any DIP

Sorted ranges in combined sorted order?

2016-10-20 Thread Ali Çehreli via Digitalmars-d-learn
Given a range of ranges where individual ranges are already sorted, is there anything in Phobos that can visit the combined range in sorted order? Although the range elements are not necessarily arrays, e.g. [ [ 3, 10, 20 ] [ 1, 2, 7 ] [ 5, 6 ] ] The elements should appear

Re: Comparing compilation time of random code in C++, D, Go, Pascal and Rust

2016-10-20 Thread Walter Bright via Digitalmars-d-announce
On 10/20/2016 9:20 AM, eugene wrote: could you give facts that on linux it is ok? You can find out by writing a program to generate 100,000 functions and compile the result on linux.

Re: [OT] Re: Binding rvalues to const ref in D

2016-10-20 Thread Steven Schveighoffer via Digitalmars-d
On 10/20/16 12:50 PM, Nick Sabalausky wrote: On 10/20/2016 09:33 AM, Steven Schveighoffer wrote: Yes, it does work. However, one thing that I *sorely* miss is the ability to simply bind an individual value. At the moment, in order to bind a value, you have to pass an array of Variant for all

I can't use nodejs anymore. Please vibe.d, don't follow that path

2016-10-20 Thread Karabuta via Digitalmars-d
This is actually a nodejs project's dependencies for a small code-base. { "name": "Houston", "version": "0.3.0", "description": "Backend for AppHub", "main": "build/houston/index.js", "dependencies": { "babel-core": "^6.9.1", "babel-loader": "^6.2.5",

Re: Why are homepage examples too complicated?

2016-10-20 Thread Karabuta via Digitalmars-d
On Thursday, 20 October 2016 at 19:52:32 UTC, Andrei Alexandrescu wrote: On 10/20/2016 03:48 PM, Karabuta wrote: On Thursday, 20 October 2016 at 14:04:06 UTC, Andrei Alexandrescu wrote: On 10/20/2016 07:38 AM, Nick Treleaven wrote: On Sunday, 16 October 2016 at 16:07:19 UTC, Nick Treleaven

Re: d.godbolt.org compiler explorer now has LDC too

2016-10-20 Thread ZombineDev via Digitalmars-d-announce
On Thursday, 20 October 2016 at 08:23:33 UTC, Johan Engelen wrote: https://twitter.com/mattgodbolt/status/788890061949509632 The compiler explorer at https://d.godbolt.org now also features LDC! Now you can view the assembly output of GDC and LDC side-by-side, for example:

Re: Why are homepage examples too complicated?

2016-10-20 Thread Andrei Alexandrescu via Digitalmars-d
On 10/20/2016 03:48 PM, Karabuta wrote: On Thursday, 20 October 2016 at 14:04:06 UTC, Andrei Alexandrescu wrote: On 10/20/2016 07:38 AM, Nick Treleaven wrote: On Sunday, 16 October 2016 at 16:07:19 UTC, Nick Treleaven wrote: I think this example is a bit awkward for D newbies to decipher. I

Binding temporaries to ref [WAS: I close BIP27. I won't be pursuing BIPs anymore]

2016-10-20 Thread Andrei Alexandrescu via Digitalmars-d
On 10/20/2016 06:23 AM, Ethan Watson wrote: On Wednesday, 19 October 2016 at 10:32:56 UTC, Walter Bright wrote: Better: void f(ref Vector v); void f(Vector v) { f(v); } f(Vector(10,20,30)); Suitable enough for simple functions. But beyond that becomes maintenance hell. I agree

Re: Why are homepage examples too complicated?

2016-10-20 Thread Karabuta via Digitalmars-d
On Thursday, 20 October 2016 at 14:04:06 UTC, Andrei Alexandrescu wrote: On 10/20/2016 07:38 AM, Nick Treleaven wrote: On Sunday, 16 October 2016 at 16:07:19 UTC, Nick Treleaven wrote: I think this example is a bit awkward for D newbies to decipher. I think here we are showing D's ctRegex;

[Issue 9275] [GC] removeRoot hits assert(0) instead of being a no-op (as documented)

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9275 Nemanja Boric <4bur...@gmail.com> changed: What|Removed |Added CC||4bur...@gmail.com ---

[Issue 1001] print stack trace (in debug mode) when program die

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1001 Andrei Alexandrescu changed: What|Removed |Added Assignee|nob...@puremagic.com

[Issue 1001] print stack trace (in debug mode) when program die

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1001 Andrei Alexandrescu changed: What|Removed |Added Assignee|lucia.mcojoc...@gmail.com |nob...@puremagic.com

Re: Binding rvalues to const ref in D

2016-10-20 Thread bitwise via Digitalmars-d
On Wednesday, 19 October 2016 at 15:18:36 UTC, Atila Neves wrote: [...] On the one hand some people want rvalues to bind to const ref. I can only assume that they want this because they want to pass rvalues to a function efficiently [...] struct Vector { float x, y, z; } In games/real-time

Re: Checkedint ready for one more round of reviews

2016-10-20 Thread Andrei Alexandrescu via Digitalmars-d
On 10/19/2016 10:10 PM, Andrei Alexandrescu wrote: On 10/19/16 6:19 PM, Lurker wrote: On Wednesday, 19 October 2016 at 17:09:35 UTC, Andrei Alexandrescu wrote: Just made one more pass through it addressing concerns and adding a new policy (Throw). Reviews welcome. Let's get this through Scylla

Re: [OT] Re: Binding rvalues to const ref in D

2016-10-20 Thread Nick Sabalausky via Digitalmars-d
On 10/20/2016 09:33 AM, Steven Schveighoffer wrote: Yes, it does work. However, one thing that I *sorely* miss is the ability to simply bind an individual value. At the moment, in order to bind a value, you have to pass an array of Variant for all the values. I currently have a whole wrapper

[Issue 8829] std.algorithm.find fails to take advantage of SortedRange

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8829 Andrei Alexandrescu changed: What|Removed |Added Assignee|nob...@puremagic.com

Re: Typesafe variadic argument taking struct

2016-10-20 Thread Meta via Digitalmars-d-learn
On Thursday, 20 October 2016 at 14:29:53 UTC, Satoshi wrote: Oh, really? I didn't notice that... (sarcasm) If I change struct Foo to class Foo it works. It's because for some weird reason, this type of varargs allows implicit construction of an object. I don't know why, it's just a feature

Re: Typesafe variadic argument taking struct

2016-10-20 Thread Satoshi via Digitalmars-d-learn
On Thursday, 20 October 2016 at 16:04:00 UTC, Nordlöw wrote: On Thursday, 20 October 2016 at 12:48:34 UTC, Satoshi wrote: Hello, why ... cannot be used with structs? struct Foo { this(int a) { } } void bar(Foo foo...) { } bar(42); Being explicit about these things makes complex code

Re: Static Length Propagation of Ranges

2016-10-20 Thread Meta via Digitalmars-d-learn
On Thursday, 20 October 2016 at 13:05:05 UTC, Nordlöw wrote: On Thursday, 20 October 2016 at 12:38:40 UTC, Nordlöw wrote: ElementType!R[n] arrayN(size_t n, R)(R r) { assert(r.length == n); typeof(return) dst; import std.algorithm.mutation : copy; r.copy(dst[]); return dst; }

[Issue 8087] Improve clarity of std.algorithm documentation

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8087 Andrei Alexandrescu changed: What|Removed |Added Assignee|nob...@puremagic.com

[Issue 8799] Give example of Tuple mapped to a function

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8799 Andrei Alexandrescu changed: What|Removed |Added Assignee|nob...@puremagic.com

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-20 Thread Dicebot via Digitalmars-d
On 10/17/2016 05:44 AM, deadalnix wrote: > On Monday, 17 October 2016 at 02:08:44 UTC, Dicebot wrote: >> Listen, I understand you are not interested in spending loads of time >> on boring polishing of formalities. We all do this in our spare time >> so that is to be expected. >> > > I spent fuck

Re: gdc in Linux distros recommended?

2016-10-20 Thread ketmar via Digitalmars-d
On Thursday, 20 October 2016 at 16:03:32 UTC, Nick Sabalausky wrote: On 10/20/2016 08:21 AM, ketmar wrote: On Thursday, 20 October 2016 at 05:43:47 UTC, Nick Sabalausky wrote: Not sure what your point is here. If you're writing a library and want to avoid giving your users deprecation messages

[Issue 16574] [REG 2.072.0-b1] Unexplained errors about functions that overridde anything

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16574 --- Comment #12 from b2.t...@gmx.com --- By the way Mr Nowak, I like to see how you're involved. But for this particular regression, maybe Kenji Hara could get in... If at a certain point he's not able to fix the new compiler feature:

Re: I close DIP27. I won't be pursuing DIPs anymore

2016-10-20 Thread Dicebot via Digitalmars-d
On 10/18/2016 02:40 AM, David Soria Parra wrote: > On Monday, 17 October 2016 at 21:52:32 UTC, Andrei Alexandrescu wrote: >> Thanks, David. Hope you're doing well! I was curious about one thing - >> is there some scrutiny going into the PIPs before Guido reviews them? >> Right now we seem to have

Re: gdc in Linux distros recommended?

2016-10-20 Thread Nick Sabalausky via Digitalmars-d
On 10/20/2016 08:21 AM, ketmar wrote: On Thursday, 20 October 2016 at 05:43:47 UTC, Nick Sabalausky wrote: Not sure what your point is here. If you're writing a library and want to avoid giving your users deprecation messages due to the import changes, then you need to test on 2.070 or newer.

Re: Typesafe variadic argument taking struct

2016-10-20 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 20 October 2016 at 12:48:34 UTC, Satoshi wrote: Hello, why ... cannot be used with structs? struct Foo { this(int a) { } } void bar(Foo foo...) { } bar(42); Being explicit about these things makes complex code more clear.

Re: rt_init, rt_term and _initCount

2016-10-20 Thread Benjamin Thaut via Digitalmars-d
On Thursday, 20 October 2016 at 08:44:09 UTC, Ethan Watson wrote: On Thursday, 20 October 2016 at 07:17:49 UTC, Benjamin Thaut wrote: Any suggestions how to solve this problem? Who are other platforms doing it? Would this also be a bigger problem if people use LoadLibrary and don't

Re: Binding rvalues to const ref in D

2016-10-20 Thread Manu via Digitalmars-d
On 20 October 2016 at 21:07, Ethan Watson via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thursday, 20 October 2016 at 10:36:16 UTC, Manu wrote: > >> DIP25 introduced return ref to address this issue. Just annotate it >> correctly? >> > > I mean, it'll work, but it's not the most

Re: Typesafe variadic argument taking struct

2016-10-20 Thread Satoshi via Digitalmars-d-learn
On Thursday, 20 October 2016 at 12:52:42 UTC, rikki cattermole wrote: On 21/10/2016 1:48 AM, Satoshi wrote: Hello, why ... cannot be used with structs? struct Foo { this(int a) { } } void bar(Foo foo...) { } bar(42); Because an int is not a Foo. Oh, really? I didn't notice that...

Re: About debugging (again)

2016-10-20 Thread ANtlord via Digitalmars-d-learn
On Monday, 17 October 2016 at 19:17:25 UTC, Basile B. wrote: On Monday, 17 October 2016 at 19:14:49 UTC, ANtlord wrote: redirect to ddemangle, that's its job. Do you know the way how to redirect? I've tried as you have written above and this makes impossible to type any command to gdb.

Re: Why are homepage examples too complicated?

2016-10-20 Thread Chris via Digitalmars-d
On Thursday, 20 October 2016 at 14:04:06 UTC, Andrei Alexandrescu wrote: On 10/20/2016 07:38 AM, Nick Treleaven wrote: On Sunday, 16 October 2016 at 16:07:19 UTC, Nick Treleaven wrote: I think this example is a bit awkward for D newbies to decipher. I think here we are showing D's ctRegex;

Re: Why are homepage examples too complicated?

2016-10-20 Thread Andrei Alexandrescu via Digitalmars-d
On 10/20/2016 07:38 AM, Nick Treleaven wrote: On Sunday, 16 October 2016 at 16:07:19 UTC, Nick Treleaven wrote: I think this example is a bit awkward for D newbies to decipher. I think here we are showing D's ctRegex; dropping the functional map and lambdas would make this more universally

Re: [OT] Re: Binding rvalues to const ref in D

2016-10-20 Thread Steven Schveighoffer via Digitalmars-d
On 10/20/16 2:38 AM, Nick Sabalausky wrote: On 10/19/2016 07:04 PM, Chris Wright wrote: Right. For instance, binding query parameters with mysql-native. The thing you're binding is passed by reference and I'm not sure why. It's been like that since mysql-native's original release, by the

[Issue 16629] New: [Reg 2.072] scope is stripped from some parameters

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16629 Issue ID: 16629 Summary: [Reg 2.072] scope is stripped from some parameters Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression

Re: Why are homepage examples too complicated?

2016-10-20 Thread Chris via Digitalmars-d
On Thursday, 20 October 2016 at 11:38:04 UTC, Nick Treleaven wrote: On Sunday, 16 October 2016 at 16:07:19 UTC, Nick Treleaven wrote: I think this example is a bit awkward for D newbies to decipher. I think here we are showing D's ctRegex; dropping the functional map and lambdas would make

Re: Static Length Propagation of Ranges

2016-10-20 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 20 October 2016 at 12:38:40 UTC, Nordlöw wrote: ElementType!R[n] arrayN(size_t n, R)(R r) { assert(r.length == n); typeof(return) dst; import std.algorithm.mutation : copy; r.copy(dst[]); return dst; } Is there a place for part of this logic in Phobos? I'm

Re: Typesafe variadic argument taking struct

2016-10-20 Thread rikki cattermole via Digitalmars-d-learn
On 21/10/2016 1:48 AM, Satoshi wrote: Hello, why ... cannot be used with structs? struct Foo { this(int a) { } } void bar(Foo foo...) { } bar(42); Because an int is not a Foo.

[Issue 15482] new uuid.d forbids to link statically with other libraries

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15482 --- Comment #6 from Manu --- Okay... so, extern to them and remove the definitions in druntime? --

Typesafe variadic argument taking struct

2016-10-20 Thread Satoshi via Digitalmars-d-learn
Hello, why ... cannot be used with structs? struct Foo { this(int a) { } } void bar(Foo foo...) { } bar(42);

[Issue 15482] new uuid.d forbids to link statically with other libraries

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15482 --- Comment #5 from Martin Nowak --- (In reply to Manu from comment #4) It's probably just a mistake from adding the Windows headers. --

Re: Static Length Propagation of Ranges

2016-10-20 Thread Nordlöw via Digitalmars-d-learn
On Wednesday, 19 October 2016 at 19:39:46 UTC, Nordlöw wrote: On Wednesday, 19 October 2016 at 19:01:50 UTC, Meta wrote: https://goo.gl/t9m3YK I'm actually pretty impressed that this kind of code can be written in D. Thanks! Add at

Re: Any recent success with SWIG?

2016-10-20 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-10-19 18:38, Ryan wrote: I would like to use a library with a c interface from D (gdal actually), but I can't find any bindings. I've looked at htod, but I also see that gdal has project maintained SWIG interfaces and SWIG claims to work with D (both D1 and D2). So I installed the

Re: why std.stdio.File is a struct?

2016-10-20 Thread ketmar via Digitalmars-d
On Thursday, 20 October 2016 at 07:40:05 UTC, Jonathan M Davis wrote: In general, in D, if you don't need inheritance and polymorphism, you probably shouldn't be using a class. and even if you need, most of the time it is better to write templated free functions with constraints instead. ;-)

Re: gdc in Linux distros recommended?

2016-10-20 Thread ketmar via Digitalmars-d
On Thursday, 20 October 2016 at 05:43:47 UTC, Nick Sabalausky wrote: And GDC is using the 2.068 feature set, plus a lot of bug fixes from later versions. I guess you could call it 2.068.5. :-) Maybe there's a certain amount of truth to that, but not completely: In all my projects anyway,

Re: Please say hello to our third team member: Razvan Nitu

2016-10-20 Thread Mark via Digitalmars-d-announce
Welcome, Razvan! On Tuesday, 18 October 2016 at 18:21:31 UTC, Andrei Alexandrescu wrote: Hi everyone, Please join me in welcoming Razvan Nitu to our fledgling team of Romanian graduate students. Razvan has already some solid industrial experience and has a broad area of interests such as

Re: Why are homepage examples too complicated?

2016-10-20 Thread Nick Treleaven via Digitalmars-d
On Sunday, 16 October 2016 at 16:07:19 UTC, Nick Treleaven wrote: I think this example is a bit awkward for D newbies to decipher. I think here we are showing D's ctRegex; dropping the functional map and lambdas would make this more universally understood.

[Issue 5118] Stack traces should properly handle nested functions

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5118 Nemanja Boric <4bur...@gmail.com> changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16628] Special case std.algorithm.equal for known empty or infinite ranges

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16628 Nick Treleaven changed: What|Removed |Added Keywords||pull URL|

Re: Request: Hardened system tutorial/patch

2016-10-20 Thread Daniel Kozak via Digitalmars-d
On Thursday, 20 October 2016 at 11:12:24 UTC, Daniel Kozak wrote: On Wednesday, 19 October 2016 at 12:51:46 UTC, Lodovico Giaretta wrote: Hi! As you might have noticed, Ubuntu 16.10 joins the community of hardened systems by shipping GCC 6.2 with PIE enabled by default. This is a wonderful

Re: Request: Hardened system tutorial/patch

2016-10-20 Thread Daniel Kozak via Digitalmars-d
On Wednesday, 19 October 2016 at 12:51:46 UTC, Lodovico Giaretta wrote: Hi! As you might have noticed, Ubuntu 16.10 joins the community of hardened systems by shipping GCC 6.2 with PIE enabled by default. This is a wonderful security choice Maybe it is not so perfect security choice

[Issue 16628] New: Special case std.algorithm.equal for known empty or infinite ranges

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16628 Issue ID: 16628 Summary: Special case std.algorithm.equal for known empty or infinite ranges Product: D Version: D2 Hardware: x86 OS: Windows Status:

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-20 Thread Namespace via Digitalmars-d
On Thursday, 20 October 2016 at 10:23:40 UTC, Ethan Watson wrote: On Wednesday, 19 October 2016 at 10:32:56 UTC, Walter Bright wrote: Better: void f(ref Vector v); void f(Vector v) { f(v); } f(Vector(10,20,30)); Suitable enough for simple functions. But beyond that becomes

Re: Binding rvalues to const ref in D

2016-10-20 Thread Ethan Watson via Digitalmars-d
On Thursday, 20 October 2016 at 10:36:16 UTC, Manu wrote: DIP25 introduced return ref to address this issue. Just annotate it correctly? I mean, it'll work, but it's not the most secure method to rely on the programmer remembering to do it.

Re: Binding rvalues to const ref in D

2016-10-20 Thread Manu via Digitalmars-d
On 20 October 2016 at 20:16, Ethan Watson via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Wednesday, 19 October 2016 at 21:19:03 UTC, Atila Neves wrote: > >> On Wednesday, 19 October 2016 at 15:58:23 UTC, Chris Wright wrote: >> >>> So it seems like the compiler could take care of

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-20 Thread Ethan Watson via Digitalmars-d
On Wednesday, 19 October 2016 at 10:32:56 UTC, Walter Bright wrote: Better: void f(ref Vector v); void f(Vector v) { f(v); } f(Vector(10,20,30)); Suitable enough for simple functions. But beyond that becomes maintenance hell. For example: void func2( ref const( Vector ) v1, ref

Re: Binding rvalues to const ref in D

2016-10-20 Thread Ethan Watson via Digitalmars-d
On Wednesday, 19 October 2016 at 21:19:03 UTC, Atila Neves wrote: On Wednesday, 19 October 2016 at 15:58:23 UTC, Chris Wright wrote: So it seems like the compiler could take care of this by only providing lvalue references but automatically creating those temporary variables for me. It's going

Re: d.godbolt.org compiler explorer now has LDC too

2016-10-20 Thread Johan Engelen via Digitalmars-d-announce
On Thursday, 20 October 2016 at 08:23:33 UTC, Johan Engelen wrote: The compiler explorer at https://d.godbolt.org now also features LDC! By the way, adding DMD should be doable. It looks like the code already supports objdump'ing a generated binary if assembly output is not available. Matt

Re: d.godbolt.org compiler explorer now has LDC too

2016-10-20 Thread Martin Tschierschke via Digitalmars-d-announce
On Thursday, 20 October 2016 at 08:23:33 UTC, Johan Engelen wrote: https://twitter.com/mattgodbolt/status/788890061949509632 The compiler explorer at https://d.godbolt.org now also features LDC! Now you can view the assembly output of GDC and LDC side-by-side, for example:

Re: Please say hello to our third team member: Razvan Nitu

2016-10-20 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-10-18 20:21, Andrei Alexandrescu wrote: Razvan has already some solid industrial experience and has a broad area of interests such as low-level kernel-level development, networking, Perhaps a task that is too big, but how about a new network package/module that does not depend on

Re: Conditional Compilation Multiple Versions

2016-10-20 Thread Claude via Digitalmars-d-learn
On Saturday, 13 June 2015 at 12:21:50 UTC, ketmar wrote: On Fri, 12 Jun 2015 20:41:59 -0400, bitwise wrote: Is there a way to compile for multiple conditions? Tried all these: version(One | Two){ } version(One || Two){ } version(One && Two){ } version(One) | version(Two){ } version(One) ||

Re: why std.stdio.File is a struct?

2016-10-20 Thread Kagamin via Digitalmars-d
On Thursday, 20 October 2016 at 07:40:05 UTC, Jonathan M Davis wrote: User-defined types that manage system resources are pretty much always better off as structs so that they can have deterministic destruction. They could be reference counted classes if it played well with the language.

Re: rt_init, rt_term and _initCount

2016-10-20 Thread Patrick Schluter via Digitalmars-d
On Thursday, 20 October 2016 at 07:17:49 UTC, Benjamin Thaut wrote: This is a topic really specific to druntime, I don't know a better place to put it though. rt_init increases the _initCount and rt_term decreases it and only terminates the runtime in case the _initCount reaches zero (see

Re: Meta-programming: iterating over a container with different types

2016-10-20 Thread Claude via Digitalmars-d-learn
On Friday, 23 September 2016 at 12:55:42 UTC, deed wrote: // Maybe you can try using std.variant? Thanks for your answer. However I cannot use variants, as I have to store the components natively in a void[] array (for cache coherency reasons). So I found a way to solve that problem:

Re: Why are homepage examples too complicated?

2016-10-20 Thread Chris via Digitalmars-d
On Wednesday, 19 October 2016 at 09:51:50 UTC, Benjiro wrote: The current homepage example is in my option, right between group 2 and 3. And its disregarding group one and two. What about setting up snippets about things people want to know about straight away like: 1. OOP 2. Functional

Re: Why are homepage examples too complicated?

2016-10-20 Thread Chris via Digitalmars-d
On Wednesday, 19 October 2016 at 20:46:08 UTC, Karabuta wrote: On Wednesday, 19 October 2016 at 09:28:28 UTC, Benjiro wrote: On Tuesday, 18 October 2016 at 20:51:24 UTC, Karabuta wrote: [...] True. Anybody can make a website. A website that is efficient, takes time. A stupid travel booking

[Issue 13282] __libc_current_sigrtmax is not accessible from module linux

2016-10-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13282 Nemanja Boric <4bur...@gmail.com> changed: What|Removed |Added Status|NEW |RESOLVED

Re: rt_init, rt_term and _initCount

2016-10-20 Thread Ethan Watson via Digitalmars-d
On Thursday, 20 October 2016 at 07:17:49 UTC, Benjamin Thaut wrote: Any suggestions how to solve this problem? Who are other platforms doing it? Would this also be a bigger problem if people use LoadLibrary and don't FreeLibrary after?

d.godbolt.org compiler explorer now has LDC too

2016-10-20 Thread Johan Engelen via Digitalmars-d-announce
https://twitter.com/mattgodbolt/status/788890061949509632 The compiler explorer at https://d.godbolt.org now also features LDC! Now you can view the assembly output of GDC and LDC side-by-side, for example: https://godbolt.org/g/y24RGI cheers, Johan

Re: Comparing compilation time of random code in C++, D, Go, Pascal and Rust

2016-10-20 Thread Walter Bright via Digitalmars-d-announce
On 10/19/2016 10:05 AM, Gary Willoughby wrote: D was doing well but in the larger examples the D compiler crashed: "Error: more than 32767 symbols in object file". The article didn't say it crashed. That message only occurs for Win32 object files - it's a limitation of the OMF file format.

Re: why std.stdio.File is a struct?

2016-10-20 Thread Jonathan M Davis via Digitalmars-d
On Thursday, October 20, 2016 06:59:12 lumpyzhu via Digitalmars-d wrote: > std.stdio.File has reference counter inside, > why not std.stdio.File is class? By using a struct with a reference count, you get deterministic destruction, and the file will be closed as soon as the reference count hits

Re: Render SVG To Display And Update Periodically

2016-10-20 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 20 October 2016 at 04:52:11 UTC, Jason C. Wells wrote: This is probably a general programming question. I'll follow up here since this thread is the inspiration for my current question. When attempting to compile simpledisplay.d, I get the following: C:\...\dlang\arsd-master>dmd

rt_init, rt_term and _initCount

2016-10-20 Thread Benjamin Thaut via Digitalmars-d
This is a topic really specific to druntime, I don't know a better place to put it though. rt_init increases the _initCount and rt_term decreases it and only terminates the runtime in case the _initCount reaches zero (see dmain2.d) The problem now is as follows. Each dynamic library that is

why std.stdio.File is a struct?

2016-10-20 Thread lumpyzhu via Digitalmars-d
std.stdio.File has reference counter inside, why not std.stdio.File is class?

[OT] Re: Binding rvalues to const ref in D

2016-10-20 Thread Nick Sabalausky via Digitalmars-d
On 10/19/2016 07:04 PM, Chris Wright wrote: Right. For instance, binding query parameters with mysql-native. The thing you're binding is passed by reference and I'm not sure why. It's been like that since mysql-native's original release, by the original author, some years ago. I suspect

Re: gdc in Linux distros recommended?

2016-10-20 Thread Marco Leise via Digitalmars-d
Am Wed, 19 Oct 2016 19:25:39 + schrieb TheGag96 : > On Wednesday, 19 October 2016 at 03:29:10 UTC, Marco Leise wrote: > > On the other hand LDC subjectively offers a couple more D > > specific enhancements, like turning GC allocations into stack > > allocations in

Re: Binding rvalues to const ref in D

2016-10-20 Thread Ali Çehreli via Digitalmars-d
On 10/19/2016 10:53 PM, Nick Sabalausky wrote: > [C++] just simply wants to *be* > D, takes a couple drunken steps in that direction, and falls flat on its > face. That's too funny! :D Ali