[Issue 15045] New: [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15045 Issue ID: 15045 Summary: [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch Product: D Version: D2 Hardware: All OS: All

Re: shared array?

2015-09-11 Thread Prudence via Digitalmars-d-learn
On Friday, 11 September 2015 at 20:30:37 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 20:06:53 UTC, Prudence wrote: Can you back up this claim? Not saying your lying, I'd just like to know it's true for a fact? The list of things that trigger the GC is pretty short. See the

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2015-09-11 Thread Daniel N via Digitalmars-d
On Friday, 11 September 2015 at 20:29:56 UTC, Vladimir Panteleev wrote: https://github.com/D-Programming-Language/phobos/pull/3631 Apparently it was decided at DConf 2015 to remove std.stream and friends from Phobos. But these modules have been left untouched (i.e. they're "stable") for a

Re: best way to memoize a range?

2015-09-11 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 11 September 2015 at 13:31:06 UTC, John Colvin wrote: On Friday, 11 September 2015 at 13:09:33 UTC, Laeeth Isharc wrote: obviously it's trivial to do with a little aa cache. and I know I can memoize a function, and turn the memoized version into an infinite range. but suppose I

Re: Beta D 2.068.2-b1

2015-09-11 Thread Marco Leise via Digitalmars-d-announce
Am Thu, 10 Sep 2015 05:37:48 +0200 schrieb Martin Nowak : > Due to a regression in 2.068.1 we'll directly follow up with an > unplanned point release 2.068.2. > This is the beta for that point release. > > http://downloads.dlang.org/pre-releases/2.x/2.068.2/ > >

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2015-09-11 Thread Brian Schott via Digitalmars-d
On Friday, 11 September 2015 at 20:29:56 UTC, Vladimir Panteleev wrote: Apparently it was decided at DConf 2015 to remove std.stream and friends from Phobos. Kill it with fire.

Re: Operator overloading or alternatives to expression templates

2015-09-11 Thread Jonathan M Davis via Digitalmars-d
On Friday, 11 September 2015 at 19:41:41 UTC, Martin Nowak wrote: Does anyone have a different idea how to make a nice query language? db.get!Person.where!(p => p.age > 21 && p.name == "Peter") Don't the suggestions for DSLs generally revolve around using string mixins to use whatever syntax

Re: Better lambdas!!!!!!!!!!

2015-09-11 Thread Jonathan M Davis via Digitalmars-d
On Friday, 11 September 2015 at 20:25:19 UTC, Ola Fosheim Grøstad wrote: On Friday, 11 September 2015 at 11:44:13 UTC, Russel Winder wrote: For example https://issues.dlang.org/show_bug.cgi?id=5710 If C++ interop is still important, maybe it would be a good idea to adopt C++ style lambdas.

Re: Operator overloading or alternatives to expression templates

2015-09-11 Thread Timon Gehr via Digitalmars-d
On 09/11/2015 09:40 PM, Martin Nowak wrote: I find the reasons for turining down my ER a bit moot. ... +1. [Issue 14593 – operator overloading can't be used with expression templates](https://issues.dlang.org/show_bug.cgi?id=14593) AFAIK expression templates are the primary choice tom

Re: shared array?

2015-09-11 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 11 September 2015 at 21:58:28 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 21:48:14 UTC, Prudence wrote: Oh really?!?! I thought slicing used the GC? Is this a recent development or always been that way? Always been that way. A D slice is just a C pointer + length

Re: friends with phobos, workaround?

2015-09-11 Thread Daniel N via Digitalmars-d-learn
On Thursday, 10 September 2015 at 13:19:08 UTC, Adam D. Ruppe wrote: On Thursday, 10 September 2015 at 08:22:29 UTC, Daniel N wrote: this(string caller = __MODULE__)(int val) if(caller == "std.conv") // Use scoped!Awesome That's disgustingly genius. I'm a bit jealous I didn't think of

Re: shared array?

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 11 September 2015 at 21:48:14 UTC, Prudence wrote: Oh really?!?! I thought slicing used the GC? Is this a recent development or always been that way? Always been that way. A D slice is just a C pointer + length packed together. A slice simply increments the pointer and/or

[Issue 15016] Structs with opDispatch cannot be emplaced

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15016 --- Comment #3 from Martin Nowak --- It seems that __traits(parent, s.opDispatch!"__xpostblit") is broken as well. --

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2015-09-11 Thread Martin Nowak via Digitalmars-d
On 09/11/2015 11:47 PM, Daniel N wrote: > maybe if it was moved to DUB, it wouldn't be that disruptive? Yes, please add it to http://code.dlang.org/packages/undead at least.

Re: Better lambdas!!!!!!!!!!

2015-09-11 Thread Jonathan M Davis via Digitalmars-d
On Friday, 11 September 2015 at 20:16:42 UTC, Timon Gehr wrote: On 09/10/2015 08:23 PM, Jonathan M Davis wrote: That's one of the main reasons that I hate the idea of named arguments. It's more stuff that's part of the API, more public stuff that you have to name correctly and risk

Re: std.allocator ready for some abuse

2015-09-11 Thread Andrei Alexandrescu via Digitalmars-d
On 09/11/2015 06:32 PM, bitwise wrote: On Friday, 25 October 2013 at 00:00:36 UTC, Andrei Alexandrescu wrote: On 10/24/13 2:38 PM, Namespace wrote: On Thursday, 24 October 2013 at 21:31:42 UTC, Namespace wrote: Awesome! Will Appender get an option to use a suitable allocator? A dream of me,

Huge output size for simple programs

2015-09-11 Thread NX via Digitalmars-d-learn
I compile a simple hello world program in C and the results: hello_world.o -> 1.5 KB hello_world (linux executable) -> 8.5 KB Then I compile a simple hello world program in D (using DMD) and the results: hello_world.o -> 9.3 KB hello_world (linux executable) -> 575.9 KB Then I compile a

[Issue 15037] New: method TypeInfo.init shadows built-in init property

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15037 Issue ID: 15037 Summary: method TypeInfo.init shadows built-in init property Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: Huge output size for simple programs

2015-09-11 Thread Daniel N via Digitalmars-d-learn
On Friday, 11 September 2015 at 11:15:33 UTC, NX wrote: I compile a simple hello world program in C and the results: hello_world.o -> 1.5 KB hello_world (linux executable) -> 8.5 KB If you care about binary sizes, use ldc2: ldc 225544 bytes (stripped + writeln) ldc 175736 bytes (stripped +

Re: Better lambdas!!!!!!!!!!

2015-09-11 Thread ZombineDev via Digitalmars-d
On Friday, 11 September 2015 at 08:02:21 UTC, Russel Winder wrote: On Thu, 2015-09-10 at 20:51 +, Adam D. Ruppe via Digitalmars-d wrote: […] The string lambdas Phobos supports basically does this: `b < a*b` would work in there. These are falling out of favor with the new syntax in the

Re: Version for windows/console compilation?

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 11 September 2015 at 04:30:44 UTC, Prudence wrote: I'm using Visual D and I assume it takes care of all this. It works so that's not a huge problem. If it is taking care of the linker switch, then you gain nothing but more complicated and fragile code by writing a WinMain! I was

Re: Reasons to use D

2015-09-11 Thread Namespace via Digitalmars-d
On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation

Re: Reasons to use D

2015-09-11 Thread via Digitalmars-d
On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation

Re: Huge output size for simple programs

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 11 September 2015 at 11:15:33 UTC, NX wrote: hello_world (linux executable) -> 13 MB !!! Try running `strip yourexecutable` on all compilers, but on gdc it should make the biggest difference. It brings debugging info and exported symbols. Is this because whole GC implementation

Re: Reasons to use D

2015-09-11 Thread David DeWitt via Digitalmars-d
On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation

[Issue 15039] New: Algebraic cannot store a Typedef along with Typedef'ed type

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15039 Issue ID: 15039 Summary: Algebraic cannot store a Typedef along with Typedef'ed type Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Reasons to use D

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 11 September 2015 at 13:51:55 UTC, Adam D. Ruppe wrote: jQuery has burned me in the past. BTW this is the lesson I've learned: have a couple examples for the most common case, ready to be copy/pasted AND explicitly call out the weird edge cases with examples learned from debugging

Re: Reasons to use D

2015-09-11 Thread via Digitalmars-d
On Friday, 11 September 2015 at 13:41:23 UTC, Ola Fosheim Grøstad wrote: Ruby and Python have their documentation on Slashdot... StackOverflow... Duh...

Re: Hello World Example with Glade?

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 11 September 2015 at 14:00:30 UTC, Mike McKee wrote: I finally got it to compile with your help, guys! :) Here's what I had to type: # dmd test1.d -L-ldl -I/usr/include/dmd/gtkd3 `pkg-config --cflags --libs gtkd3` Don't forget to answer yourself on SO too!

Re: best way to memoize a range?

2015-09-11 Thread John Colvin via Digitalmars-d-learn
On Friday, 11 September 2015 at 13:09:33 UTC, Laeeth Isharc wrote: obviously it's trivial to do with a little aa cache. and I know I can memoize a function, and turn the memoized version into an infinite range. but suppose I have a lazy function that returns a finite range, and its expensive

Re: Reasons to use D

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 11 September 2015 at 13:35:07 UTC, Namespace wrote: JQuery, PHP, C++? That the nicest docs I've ever seen. C++ tends to be nice, yes. PHP isn't really any better than D, at least not when I was using it a few years ago. jQuery has burned me in the past. Take this page for

Re: Hello World Example with Glade?

2015-09-11 Thread Mike McKee via Digitalmars-d-learn
On Friday, 11 September 2015 at 09:07:37 UTC, Jordi Sayol wrote: On there is the "pkg-config" section: I finally got it to compile with your help, guys! :) Here's what I had to type: # dmd test1.d -L-ldl -I/usr/include/dmd/gtkd3 `pkg-config --cflags --libs

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2015-09-11 Thread Jonathan M Davis via Digitalmars-d
On Friday, 11 September 2015 at 23:06:16 UTC, Jonathan M Davis wrote: So, I intend to open a PR to fix the targeted removal time (probably this evening) so that it's not quite so quick Here's the PR: https://github.com/D-Programming-Language/phobos/pull/3647 - Jonathan M Davis

[Issue 15035] Possible regression between 2.068.0 and 2.068.1 (2.068.2-b1 also)

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15035 Tomáš Chaloupka changed: What|Removed |Added Status|NEW |RESOLVED

Re: Multidimension AA's and remove

2015-09-11 Thread NX via Digitalmars-d-learn
On Saturday, 12 September 2015 at 03:44:50 UTC, Prudence wrote: At the very least: Is T[][S] an associative array with keys of type S and values of an array of type T or is it backwards? Also, how to disambiguate Thanks. Indeed. void main() { import std.stdio : writeln,

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2015-09-11 Thread Jonathan M Davis via Digitalmars-d
On Saturday, 12 September 2015 at 04:50:06 UTC, Jonathan M Davis wrote: On Friday, 11 September 2015 at 23:06:16 UTC, Jonathan M Davis wrote: So, I intend to open a PR to fix the targeted removal time (probably this evening) so that it's not quite so quick Here's the PR:

Re: A collection of DIPs

2015-09-11 Thread via Digitalmars-d
On Friday, 11 September 2015 at 01:04:56 UTC, Brandon Ragland wrote: There was a lovely article by a fellow for his PhD on how D garbage collector was literally killing his JavaScript engine, It was a she :-). Some people have focused on the GC, but you actually need to change the strategy

Re: Hello World Example with Glade?

2015-09-11 Thread Gary Willoughby via Digitalmars-d-learn
On Friday, 11 September 2015 at 07:13:22 UTC, Mike McKee wrote: I'm having trouble installing GtkD on Ubuntu Linux 14.04. Here's an old guide I wrote years ago. It might be a little out of date but may help you put things together:

Lazy sort

2015-09-11 Thread ixid via Digitalmars-d-learn
Does sort have to be eager or would it be possible to have a lazy version? It's messy to always have to use array and leap in and out of lazy operations within a UFCS chain. Surely as many functions as possible should be optionally lazy.

Re: Lazy sort

2015-09-11 Thread Chris via Digitalmars-d-learn
On Friday, 11 September 2015 at 10:41:16 UTC, ixid wrote: Does sort have to be eager or would it be possible to have a lazy version? It's messy to always have to use array and leap in and out of lazy operations within a UFCS chain. Surely as many functions as possible should be optionally

Re: Lazy sort

2015-09-11 Thread via Digitalmars-d-learn
On Friday, 11 September 2015 at 10:41:16 UTC, ixid wrote: Does sort have to be eager or would it be possible to have a lazy version? It's messy to always have to use array and leap in and out of lazy operations within a UFCS chain. Surely as many functions as possible should be optionally

Is this a bug?

2015-09-11 Thread Rene Zwanenburg via Digitalmars-d-learn
The following fails to compile with an 'cannot deduce function from argument types' error. When using an array of something other than TypeInfo_Class everything works as expected. void main() { import std.algorithm.mutation : remove; TypeInfo_Class[] arr;

Re: Is this a bug?

2015-09-11 Thread anonymous via Digitalmars-d-learn
On Friday 11 September 2015 12:33, Rene Zwanenburg wrote: > The following fails to compile with an 'cannot deduce function > from argument types' error. When using an array of something > other than TypeInfo_Class everything works as expected. > > void main() > { > import

Reasons to use D

2015-09-11 Thread Chris via Digitalmars-d
Out of curiosity I searched for "reasons to use D" and I found this: http://blog.pluralsight.com/d-programming-language-explained This paragraph called my attention: "At the same time, D doesn’t get all New Age on you: It doesn’t try to be multi-paradigm, it doesn’t claim “five percent

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-11 Thread rcorre via Digitalmars-d-announce
On Friday, 11 September 2015 at 08:22:20 UTC, Kagamin wrote: On Friday, 11 September 2015 at 02:17:25 UTC, rcorre wrote: @nogc void donFancyHat(Enumap!(Attribute, int) map) { map.charisma += 1; } BTW, what this means? Isn't Enumap a value type? Correct, the parameter should be passed by ref

Re: Reasons to use D

2015-09-11 Thread Jack Stouffer via Digitalmars-d
On Friday, 11 September 2015 at 11:52:20 UTC, Chris wrote: Out of curiosity I searched for "reasons to use D" and I found this: http://blog.pluralsight.com/d-programming-language-explained This paragraph called my attention: "At the same time, D doesn’t get all New Age on you: It doesn’t

[Issue 14859] static declared array with more than 16MB size should be allowed in struct and class declaration

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

[Issue 15036] New: SimpleDllMain assumes various symbols are available unqualified

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15036 Issue ID: 15036 Summary: SimpleDllMain assumes various symbols are available unqualified Product: D Version: D2 Hardware: All OS: Windows Status: NEW

[Issue 14859] static declared array with more than 16MB size should be allowed in struct and class declaration

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14859 nx changed: What|Removed |Added Priority|P1 |P2 --

Re: Member function pointers

2015-09-11 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 11 September 2015 at 00:37:35 UTC, data man wrote: On Thursday, 10 September 2015 at 16:24:52 UTC, Vladimir Panteleev wrote: ... Heh. My fault. Fixed (though it'll stick for that post in some views). Correct a "D-Runtime" topic, please. It is not updated. Not sure what you

Re: Lazy sort

2015-09-11 Thread deed via Digitalmars-d-learn
On Friday, 11 September 2015 at 10:41:16 UTC, ixid wrote: Does sort have to be eager or would it be possible to have a lazy version? It's messy to always have to use array and leap in and out of lazy operations within a UFCS chain. Surely as many functions as possible should be optionally

Re: std.experimental.testing formal review

2015-09-11 Thread Atila Neves via Digitalmars-d
On Friday, 11 September 2015 at 10:02:22 UTC, NVolcz wrote: On Wednesday, 9 September 2015 at 15:20:41 UTC, Robert burner Schadek wrote: This post marks the start of the two week review process of std.experimental.testing. Some questions from a Java programmer: How would I go about making

Re: Better lambdas!!!!!!!!!!

2015-09-11 Thread Russel Winder via Digitalmars-d
On Fri, 2015-09-11 at 11:32 +, ZombineDev via Digitalmars-d wrote: > On Friday, 11 September 2015 at 08:02:21 UTC, Russel Winder wrote: > > On Thu, 2015-09-10 at 20:51 +, Adam D. Ruppe via > > Digitalmars-d wrote: > > > […] > > > > > > The string lambdas Phobos supports basically does

Re: Compile all-of-dub?

2015-09-11 Thread ZombineDev via Digitalmars-d
On Wednesday, 9 September 2015 at 08:26:59 UTC, qznc wrote: ... https://github.com/MartinNowak/project_tester

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-11 Thread rcorre via Digitalmars-d-announce
On Friday, 11 September 2015 at 04:30:31 UTC, SimonN wrote: Since I have been using "ref val" in the first loop, I expected the output to be instead: e1: 101 e2: 102 e3: 103 e1: 104 e2: 105 e3: 106 -- Simon Yep, as I was looking at the constness thing, I realized

Re: Operator overloading or alternatives to expression templates

2015-09-11 Thread H. S. Teoh via Digitalmars-d
On Fri, Sep 11, 2015 at 07:47:42PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > On 09/11/2015 03:40 PM, Martin Nowak wrote: > >I find the reasons for turining down my ER a bit moot. > > > >[Issue 14593 – operator overloading can't be used with expression >

[Issue 15044] [Reg 2.068.0] destroy might leak memory

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15044 Martin Nowak changed: What|Removed |Added CC||k.hara...@gmail.com ---

[Issue 15019] [ICE] Heisencrash on OS X 32-bit with non-trivial projects

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15019 --- Comment #12 from Vladimir Panteleev --- WIP here, will continue tomorrow: https://github.com/CyberShadow/dmd/commits/valgrind-20150912 --

Multidimension AA's and remove

2015-09-11 Thread Prudence via Digitalmars-d-learn
Error: template std.algorithm.mutation.remove cannot deduce function from argument types !()(bool delegate(void*, uint, uint, int)[], void), candidates are: std.algorithm.mutation.remove(SwapStrategy s = SwapStrategy.stable, Range, Offset...)(Range range, Offset offset) if (s !=

Re: Operator overloading or alternatives to expression templates

2015-09-11 Thread Andrei Alexandrescu via Digitalmars-d
On 09/11/2015 08:03 PM, H. S. Teoh via Digitalmars-d wrote: Needless to say, I did not have the patience (nor persistence!) to decipher those error messages; most of my efforts lay in copying textbook examples from the documentation and modifying them piece by piece, checking their compilability

Re: Better lambdas!!!!!!!!!!

2015-09-11 Thread Prudence via Digitalmars-d
On Thursday, 10 September 2015 at 18:02:36 UTC, Ali Çehreli wrote: On 09/10/2015 10:55 AM, Prudence wrote: > How bout this: > > void myfunc(double delegate(int i, int z, float f)) {} > > > myfunc((int i, int z, float f) { return i*z*f; } } > > vs > > myfunc({ return i*z*f; }) // Names of

Re: Is this a bug?

2015-09-11 Thread Rene Zwanenburg via Digitalmars-d-learn
On Friday, 11 September 2015 at 11:26:49 UTC, anonymous wrote: On Friday 11 September 2015 12:33, Rene Zwanenburg wrote: The following fails to compile with an 'cannot deduce function from argument types' error. When using an array of something other than TypeInfo_Class everything works as

Re: Better lambdas!!!!!!!!!!

2015-09-11 Thread Pierre Krafft via Digitalmars-d
On Saturday, 12 September 2015 at 01:03:54 UTC, Prudence wrote: On Thursday, 10 September 2015 at 18:02:36 UTC, Ali Çehreli wrote: On 09/10/2015 10:55 AM, Prudence wrote: > How bout this: > > void myfunc(double delegate(int i, int z, float f)) {} > > > myfunc((int i, int z, float f) {

Re: Reasons to use D

2015-09-11 Thread skoppe via Digitalmars-d
On Friday, 11 September 2015 at 19:54:55 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 15:30:05 UTC, Sebastiaan Koppe wrote: Does it have to do with char encodings? Not the issue I hit. Ah, forget about my suggestion, I misread something on the link you send. So when it said

Re: Operator overloading or alternatives to expression templates

2015-09-11 Thread deadalnix via Digitalmars-d
On Saturday, 12 September 2015 at 00:27:45 UTC, Andrei Alexandrescu wrote: On 09/11/2015 08:03 PM, H. S. Teoh via Digitalmars-d wrote: Needless to say, I did not have the patience (nor persistence!) to decipher those error messages; most of my efforts lay in copying textbook examples from the

Re: Better lambdas!!!!!!!!!!

2015-09-11 Thread Prudence via Digitalmars-d
On Saturday, 12 September 2015 at 02:13:11 UTC, Pierre Krafft wrote: On Saturday, 12 September 2015 at 01:03:54 UTC, Prudence wrote: On Thursday, 10 September 2015 at 18:02:36 UTC, Ali Çehreli wrote: On 09/10/2015 10:55 AM, Prudence wrote: > How bout this: > > void myfunc(double delegate(int

Re: std.allocator ready for some abuse

2015-09-11 Thread bitwise via Digitalmars-d
On Friday, 11 September 2015 at 23:13:16 UTC, Andrei Alexandrescu wrote: On 09/11/2015 06:32 PM, bitwise wrote: On Friday, 25 October 2013 at 00:00:36 UTC, Andrei Alexandrescu wrote: On 10/24/13 2:38 PM, Namespace wrote: On Thursday, 24 October 2013 at 21:31:42 UTC, Namespace wrote: Awesome!

Re: Operator overloading or alternatives to expression templates

2015-09-11 Thread Andrei Alexandrescu via Digitalmars-d
On 09/11/2015 03:40 PM, Martin Nowak wrote: I find the reasons for turining down my ER a bit moot. [Issue 14593 – operator overloading can't be used with expression templates](https://issues.dlang.org/show_bug.cgi?id=14593) AFAIK expression templates are the primary choice tom implement SIMD

[Issue 15044] [Reg 2.068.0] destroy might leak memory

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15044 --- Comment #1 from Martin Nowak --- This breaks b/c of the following semantic analysis issue. Vector.semantic dup.semantic RefCounted!Vector.semantic (return type) RefCounted!Vector buildOpAssign RefCounted!Vector.dtor.semantic3

Re: std.allocator ready for some abuse

2015-09-11 Thread Andrei Alexandrescu via Digitalmars-d
On 09/11/2015 07:46 PM, bitwise wrote: On Friday, 11 September 2015 at 23:13:16 UTC, Andrei Alexandrescu wrote: On 09/11/2015 06:32 PM, bitwise wrote: On Friday, 25 October 2013 at 00:00:36 UTC, Andrei Alexandrescu wrote: On 10/24/13 2:38 PM, Namespace wrote: On Thursday, 24 October 2013 at

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2015-09-11 Thread Jonathan M Davis via Digitalmars-d
On Friday, 11 September 2015 at 23:32:01 UTC, Andrei Alexandrescu wrote: Undead is a great idea at least because it's a good place to park documentation for legacy code. In fact we should move undead to the dlang repo (now it's in digitalmars). Makes sense. Let's let std.stream lay low for a

Re: Reasons to use D

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 03:52:11 UTC, skoppe wrote: That is not the only way it behaves differently. jQuery's html() will actually execute inline script, whereas innerHTML won't. I'm pretty sure it is the other way around...

Re: std.experimental.testing formal review

2015-09-11 Thread John Colvin via Digitalmars-d
On Friday, 11 September 2015 at 11:27:59 UTC, Atila Neves wrote: On Friday, 11 September 2015 at 10:02:22 UTC, NVolcz wrote: Is it possible to categorize tests? D's module system does that already. Along with things like version(unittestFeatureA) or version(unittestPrecision)

Re: Huge output size for simple programs

2015-09-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 11, 2015 11:15:31 NX via Digitalmars-d-learn wrote: > I compile a simple hello world program in C and the results: > > hello_world.o -> 1.5 KB > hello_world (linux executable) -> 8.5 KB > > > Then I compile a simple hello world program in D (using DMD) and > the results: > >

best way to memoize a range?

2015-09-11 Thread Laeeth Isharc via Digitalmars-d-learn
obviously it's trivial to do with a little aa cache. and I know I can memoize a function, and turn the memoized version into an infinite range. but suppose I have a lazy function that returns a finite range, and its expensive to calculate. can I use Phobos to produce a memoized range? So

Re: using std.algorithm to find intersection of DateTime[][] arg

2015-09-11 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 10 September 2015 at 11:58:10 UTC, deed wrote: On Wednesday, 9 September 2015 at 20:28:35 UTC, Laeeth Isharc wrote: I have a DateTime[][] arg ... I would like to find the intersection of the dates. A suggestion: auto minLength = arg.map!(a => a.length).reduce!min; auto

Re: best way to memoize a range?

2015-09-11 Thread Jakob Ovrum via Digitalmars-d-learn
On Friday, 11 September 2015 at 13:09:33 UTC, Laeeth Isharc wrote: obviously it's trivial to do with a little aa cache. and I know I can memoize a function, and turn the memoized version into an infinite range. but suppose I have a lazy function that returns a finite range, and its expensive

Re: shared array?

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 11 September 2015 at 04:28:52 UTC, Prudence wrote: I thought about that but then I have to rely on the GC for some simple things. Doesn't seem like the right way to go. Since it is static, it will never be collected anyway, so you could just use it and it'll work for convenience

Re: Lazy sort

2015-09-11 Thread ixid via Digitalmars-d-learn
On Friday, 11 September 2015 at 11:08:29 UTC, Ola Fosheim Grøstad wrote: On Friday, 11 September 2015 at 10:41:16 UTC, ixid wrote: Does sort have to be eager or would it be possible to have a lazy version? It's messy to always have to use array and leap in and out of lazy operations within a

Re: Reasons to use D

2015-09-11 Thread Chris via Digitalmars-d
On Friday, 11 September 2015 at 12:07:47 UTC, Jack Stouffer wrote: It's ironic, BECAUSE D is multi-paradigm it allows the author to believe it's not. When you have a C like syntax and a language that allows you to write your Java like code, and if you don't know about ranges, then I can

Re: Reasons to use D

2015-09-11 Thread via Digitalmars-d
On Friday, 11 September 2015 at 11:52:20 UTC, Chris wrote: Out of curiosity I searched for "reasons to use D" and I found this: http://blog.pluralsight.com/d-programming-language-explained This paragraph called my attention: "At the same time, D doesn’t get all New Age on you: It doesn’t

Re: Huge output size for simple programs

2015-09-11 Thread John Colvin via Digitalmars-d-learn
On Friday, 11 September 2015 at 11:15:33 UTC, NX wrote: I compile a simple hello world program in C and the results: hello_world.o -> 1.5 KB hello_world (linux executable) -> 8.5 KB Then I compile a simple hello world program in D (using DMD) and the results: hello_world.o -> 9.3 KB

[Issue 15038] New: Associative Array .get property const vs immutable

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15038 Issue ID: 15038 Summary: Associative Array .get property const vs immutable Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: Reasons to use D

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation for virtually everything else I've ever used too. I'd take D's over

Re: Lazy sort

2015-09-11 Thread via Digitalmars-d-learn
On Friday, 11 September 2015 at 12:23:52 UTC, ixid wrote: Yes, I was reading about heapsort. I was only thinking about the usability POV (I mean isn't reduced pretty much an eager operation that accepts a lazy input? Why can't sort do that?) but it could also offer some performance improvement

[Issue 15031] rdmd should force rebuild when --compiler changes

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15031 Vladimir Panteleev changed: What|Removed |Added Keywords||pull

[Issue 15031] rdmd should force rebuild when --compiler changes

2015-09-11 Thread via Digitalmars-d-bugs
should force rebuild when --compiler changes https://github.com/D-Programming-Language/tools/commit/44e843e8bd4206766cccfea9a2988c4df2da9955 Merge pull request #175 from CyberShadow/pull-20150911-145139 fix Issue 15031 - rdmd should force rebuild when --compiler changes --

Re: Reasons to use D

2015-09-11 Thread Bahman Movaqar via Digitalmars-d
On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: "3. The documentation poor." I agree but so is the documentation for virtually everything else I've ever used too. I'd take D's over Ruby's for example. Couldn't help but to drop in and count two exceptions: Racket's

Re: shared array?

2015-09-11 Thread Prudence via Digitalmars-d-learn
On Friday, 11 September 2015 at 13:12:14 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 04:28:52 UTC, Prudence wrote: I thought about that but then I have to rely on the GC for some simple things. Doesn't seem like the right way to go. Since it is static, it will never be collected

[Issue 14765] [Reg2.068.0] Rangified functions no longer accept types that implicitly cast to string

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14765 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 15027] cannot pass arguments of type DirEntry to std.file functions

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15027 Vladimir Panteleev changed: What|Removed |Added CC|

Re: Reasons to use D

2015-09-11 Thread Bahman Movaqar via Digitalmars-d
On Friday, 11 September 2015 at 11:52:20 UTC, Chris wrote: Out of curiosity I searched for "reasons to use D" and I found this: [...] The article is not that old, you know (May 2014). I recall when Scala came out, somebody published[1] a "intro/review" on Scala where he said "Scala is

Re: Reasons to use D

2015-09-11 Thread via Digitalmars-d
On Friday, 11 September 2015 at 13:51:55 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 13:35:07 UTC, Namespace wrote: JQuery, PHP, C++? That the nicest docs I've ever seen. C++ tends to be nice, yes. PHP isn't really any better than D, at least not when I was using it a few years

Re: Version for windows/console compilation?

2015-09-11 Thread Mike Parker via Digitalmars-d-learn
On Friday, 11 September 2015 at 04:30:44 UTC, Prudence wrote: I'm simply creating my own version flags in VD properties. Not the best way because I'll have to remember to set the flags every time I use the library or I'll get errors about stuff missing. I was hoping D had a flag to

Re: Huge output size for simple programs

2015-09-11 Thread NX via Digitalmars-d-learn
On Friday, 11 September 2015 at 13:45:03 UTC, Adam D. Ruppe wrote: Just D's isn't preinstalled so it carries what it needs with the executable for broadest compatibility. You could dynamically link if you like (`-defaultlib=libphobos2.so` on dmd linux) So I did some testing: # dmd

Re: Huge output size for simple programs

2015-09-11 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 11 September 2015 at 14:30:00 UTC, NX wrote: One question: Why? use the map viewer to get more info: http://thecybershadow.net/d/mapview/ use dmd -map to create the file it wants

Re: shared array?

2015-09-11 Thread Prudence via Digitalmars-d-learn
On Friday, 11 September 2015 at 07:41:10 UTC, Kagamin wrote: I get only one error: Error: non-shared method std.container.array.Array!(void delegate()).Array.~this is not callable using a shared object. It will try to destruct the array on program termination, but it requires the destructor

[Issue 15031] rdmd should force rebuild when --compiler changes

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15031 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15035] Possible regression between 2.068.0 and 2.068.1 (2.068.2-b1 also)

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15035 Vladimir Panteleev changed: What|Removed |Added CC|

[Issue 15019] [ICE] Heisencrash with -fPIC and non-trivial projects

2015-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15019 Vladimir Panteleev changed: What|Removed |Added CC|

<    1   2   3   >