Re: GC: Memory keeps growing

2015-04-15 Thread Chris via Digitalmars-d-learn
On Wednesday, 15 April 2015 at 11:48:26 UTC, Rikki Cattermole wrote: On 15/04/2015 11:44 p.m., Chris wrote: My garbage collected app starts with ~10 MB in memory, however with every execution of code it grows by at least 0.2 MB (or more depending on the input). Although I can see memory being

Re: GC: Memory keeps growing

2015-04-15 Thread Rikki Cattermole via Digitalmars-d-learn
On 16/04/2015 12:03 a.m., Chris wrote: On Wednesday, 15 April 2015 at 11:48:26 UTC, Rikki Cattermole wrote: On 15/04/2015 11:44 p.m., Chris wrote: My garbage collected app starts with ~10 MB in memory, however with every execution of code it grows by at least 0.2 MB (or more depending on the

Re: How D could gain more traction?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 13:18:55 UTC, Panke wrote: There will always be a better solution in the future than the implementation included in the standard library today. However that is no argument against the kitchen sink. That's dodging the foundational issue which is that different

Re: rant D's makefiles... /rant

2015-04-15 Thread Russel Winder via Digitalmars-d
On Mon, 2015-04-13 at 21:35 +, weaselcat via Digitalmars-d wrote: […] For the amount of complaining about make, there sure has been little process in making a better make. Isn't that the whole point, something better than make is not make, it is something else. -- Russel.

Re: How D could gain more traction?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 12:36:16 UTC, Rikki Cattermole wrote: Nope. Good API isn't good enough. For things like window creation, image library ext. If they ain't in phobos, it ain't gonna get used. That's my experience with Devisualization anyway. Go, Dart, Python and Javascript are

Re: How D could gain more traction?

2015-04-15 Thread Rikki Cattermole via Digitalmars-d
On 16/04/2015 12:00 a.m., Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Wednesday, 15 April 2015 at 11:45:37 UTC, XavierAP wrote: I understand such a library collection would have many holes right now, but movement also creates its own momentum. I just think

Re: How D could gain more traction?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 13:06:26 UTC, weaselcat wrote: See: python, many people actively avoid using the standard library in favor of third party libraries that accomplish the same task. Some third party libaries are considered defacto standard and are shipped with distributions or

Re: How D could gain more traction?

2015-04-15 Thread Tobias Pankrath via Digitalmars-d
On Wednesday, 15 April 2015 at 13:40:36 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 15 April 2015 at 13:18:55 UTC, Panke wrote: There will always be a better solution in the future than the implementation included in the standard library today. However that is no argument against the kitchen

Re: How D could gain more traction?

2015-04-15 Thread XavierAP via Digitalmars-d
On Wednesday, 15 April 2015 at 13:19:32 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 15 April 2015 at 13:06:26 UTC, weaselcat wrote: See: python, many people actively avoid using the standard library in favor of third party libraries that accomplish the same task. Some third party libaries

Re: Converting void* to D array

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/15/15 8:35 AM, CraigDillabaugh wrote: On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer wrote: immutable blocksize = GByte.sizeof * x_block_size * y_block_size; auto buffer = malloc(blocksize)[0..blocksize]; Also, you don't need to cast pointers to void *. Should be able

Re: How D could gain more traction?

2015-04-15 Thread XavierAP via Digitalmars-d
Exactly, and with the overlapping efforts the result is less than the division among the parts, because none of them reach critical mass. But this has already been kind of done in the past regarding Tango vs. Phobos. I think it would be good to extend the same guidance to a gradually growing

Re: EMSI is hiring a D developer

2015-04-15 Thread Baz via Digitalmars-d-announce
On Wednesday, 15 April 2015 at 08:32:10 UTC, wobbles wrote: On Wednesday, 15 April 2015 at 07:27:51 UTC, Abdulhaq wrote: On Tuesday, 14 April 2015 at 16:17:37 UTC, Justin Whear wrote: EMSI is hiring for an Engineer II to work on D codebases: https:// emsi.bamboohr.com/jobs/view.php?id=30

[Issue 14436] Optimizer fails to remove comparison loop when comparing array against null

2015-04-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14436 --- Comment #4 from yebblies yebbl...@gmail.com --- By empty array do you mean empty array literal? eg assert(x != []); --

Re: GC: Memory keeps growing

2015-04-15 Thread Rikki Cattermole via Digitalmars-d-learn
On 15/04/2015 11:44 p.m., Chris wrote: My garbage collected app starts with ~10 MB in memory, however with every execution of code it grows by at least 0.2 MB (or more depending on the input). Although I can see memory being freed (say it goes up to 32 MB and drops to 14 MB), it keeps on growing

Re: How D could gain more traction?

2015-04-15 Thread CraigDillabaugh via Digitalmars-d
On Wednesday, 15 April 2015 at 12:00:54 UTC, Ola Fosheim Grøstad wrote: clip Yes, there is a lot of overlap in the D community: 4 D compiler projects, a bunch of IDE projects, a bunch of GUI library projects, a bunch of (basic) game engine projects... All rather large in scope if you want

Re: How D could gain more traction?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 14:01:54 UTC, XavierAP wrote: That list is small compared to the whole of available Python libraries, but what you can do with it is already enormously more than you can do with Phobos or CRT+STL. If D had half of it people would be using it... Yes, it is the

Re: D AutoCompletion: is ycmd integration valuable?

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/15 9:15 AM, rcorre wrote: For those who don't know, ycmd (https://github.com/Valloric/ycmd) is an editor-agnostic completion engine that aims to reduce a lot of the duplicate code written for handling autocompletions in different language/editor combinations. A long time ago, there was

Re: How D could gain more traction?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 11:45:37 UTC, XavierAP wrote: I understand such a library collection would have many holes right now, but movement also creates its own momentum. I just think it would be good that dlang.org provided some more guidance. Yes, there is a lot of overlap in the D

Re: How D could gain more traction?

2015-04-15 Thread weaselcat via Digitalmars-d
On Wednesday, 15 April 2015 at 09:57:29 UTC, John Colvin wrote: On Wednesday, 15 April 2015 at 09:39:09 UTC, XavierAP wrote: Nowadays a standard library should include classes or functions, not only for data structures, algorithms etc., but also for: GUI cross-platform creation, graphics,

D AutoCompletion: is ycmd integration valuable?

2015-04-15 Thread rcorre via Digitalmars-d
For those who don't know, ycmd (https://github.com/Valloric/ycmd) is an editor-agnostic completion engine that aims to reduce a lot of the duplicate code written for handling autocompletions in different language/editor combinations. A long time ago, there was a request to get D support

Re: How D could gain more traction?

2015-04-15 Thread Panke via Digitalmars-d
The problem with a kitchen sink approach is that you have to make sure the libraries stay up to date - and phobos already has a few rotting modules. Which modules do you mean? There are some modules that are considered to have a bad design or lacking implementation, but none that do not

[Issue 14436] Optimizer fails to remove comparison loop when comparing array against null

2015-04-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14436 Marc Schütz schue...@gmx.net changed: What|Removed |Added Status|RESOLVED|REOPENED CC|

Re: How D could gain more traction?

2015-04-15 Thread XavierAP via Digitalmars-d
I understand such a library collection would have many holes right now, but movement also creates its own momentum. I just think it would be good that dlang.org provided some more guidance. I don't know, I hope to get some time on lazy Sundays to finally read Alexandrescu's book which I

Re: D Hackathon: April 25 - May 1

2015-04-15 Thread Russel Winder via Digitalmars-d
On Tue, 2015-04-14 at 08:01 -0700, Andrei Alexandrescu via Digitalmars-d wrote: […] Sadly I can't make it because newborn. -- Andrei Of course. Pete Goodliffe has stepped into the breach. -- Russel. = Dr Russel

Re: Converting void* to D array

2015-04-15 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer wrote: On 4/15/15 12:47 AM, Daniel Kozak wrote: On Wednesday, 15 April 2015 at 04:43:39 UTC, Daniel Kozák wrote: On Wed, 15 Apr 2015 04:24:20 + Craig Dillabaugh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com

Re: Converting void* to D array

2015-04-15 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer wrote: clip Depends on what GByte is. If it doesn't contain pointers (I'm assuming its probably ubyte?), then it won't be scanned. clip -Steve Yes, GByte is an alias for ubyte.

Re: D AutoCompletion: is ycmd integration valuable?

2015-04-15 Thread weaselcat via Digitalmars-d
On Wednesday, 15 April 2015 at 15:12:00 UTC, Steven Schveighoffer wrote: On 4/15/15 10:47 AM, weaselcat wrote: DCD has been usable from vim for a looong time, when was the last time you tried? Dconf 2014. I'm sure with more elbow grease I could get it to work. But I shouldn't have to ;)

Re: D AutoCompletion: is ycmd integration valuable?

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/15 10:47 AM, weaselcat wrote: DCD has been usable from vim for a looong time, when was the last time you tried? Dconf 2014. I'm sure with more elbow grease I could get it to work. But I shouldn't have to ;) Give me a dmg that I can drag or script that I can run, I'm good. -Steve

Re: D AutoCompletion: is ycmd integration valuable?

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/15 11:13 AM, weaselcat wrote: On Wednesday, 15 April 2015 at 15:12:00 UTC, Steven Schveighoffer wrote: On 4/15/15 10:47 AM, weaselcat wrote: DCD has been usable from vim for a looong time, when was the last time you tried? Dconf 2014. I'm sure with more elbow grease I could get it

Re: CTFE UFCs?

2015-04-15 Thread bitwise via Digitalmars-d-learn
On Tue, 14 Apr 2015 12:46:40 -0400, ketmar ket...@ketmar.no-ip.org wrote: On Tue, 14 Apr 2015 11:20:38 -0400, bitwise wrote: i believe that you can't do what you want in a way you want, 'cause UFCS is not working for template args. but you can do this: alias base(alias CC) =

Re: Can we get rid of non-raw write?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 14:47:46 UTC, armando sano wrote: Reviving old topic... It is possible to force stdout to write in binary mode on Windows, see https://msdn.microsoft.com/en-us/library/tw4k6df8.aspx In C, the solution is: - #include stdio.h #include

Re: Detect the bug in the following code

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/15 10:44 AM, Idan Arye wrote: import std.stdio; struct Foo { bool registered = false; void register(int x) { writeln(Registering , x); register = true; } } void main() { Foo foo; foo.register(10); } Easy, the bug is in DMD improperly

Re: std.reflection prototype

2015-04-15 Thread bitwise via Digitalmars-d
On Wed, 15 Apr 2015 05:31:24 -0400, Jacob Carlborg d...@me.com wrote: It needs to be possible to set and get a value of an instance variable based on it's name, through runtime reflection. It also needs to bypass protection, i.e. private. Right now, this is the def: /** * Array of

Re: Can we get rid of non-raw write?

2015-04-15 Thread armando sano via Digitalmars-d
Reviving old topic... It is possible to force stdout to write in binary mode on Windows, see https://msdn.microsoft.com/en-us/library/tw4k6df8.aspx In C, the solution is: - #include stdio.h #include fcntl.h #include io.h /*...*/ int result = _setmode( _fileno(

Re: Detect the bug in the following code

2015-04-15 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 15 April 2015 at 14:44:48 UTC, Idan Arye wrote: register = true; Easy, you assigned to the wrong variable, that'd quickly be obvious at runtime too with a stack overflow. I think it sucks that true and false will implicitly convert to int though, that bites people

Re: D AutoCompletion: is ycmd integration valuable?

2015-04-15 Thread weaselcat via Digitalmars-d
On Wednesday, 15 April 2015 at 14:05:32 UTC, Steven Schveighoffer wrote: On 4/15/15 9:15 AM, rcorre wrote: For those who don't know, ycmd (https://github.com/Valloric/ycmd) is an editor-agnostic completion engine that aims to reduce a lot of the duplicate code written for handling

Re: Detect the bug in the following code

2015-04-15 Thread Idan Arye via Digitalmars-d
On Wednesday, 15 April 2015 at 14:46:56 UTC, Adam D. Ruppe wrote: On Wednesday, 15 April 2015 at 14:44:48 UTC, Idan Arye wrote: register = true; Easy, you assigned to the wrong variable, that'd quickly be obvious at runtime too with a stack overflow. I think it sucks that true and

Re: Can we get rid of non-raw write?

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/15 10:47 AM, armando sano wrote: Reviving old topic... It is possible to force stdout to write in binary mode on Windows, see https://msdn.microsoft.com/en-us/library/tw4k6df8.aspx In C, the solution is: - #include stdio.h #include fcntl.h #include io.h

Re: Detect the bug in the following code

2015-04-15 Thread weaselcat via Digitalmars-d
On Wednesday, 15 April 2015 at 14:44:48 UTC, Idan Arye wrote: import std.stdio; struct Foo { bool registered = false; void register(int x) { writeln(Registering , x); register = true; } } void main() { Foo foo; foo.register(10); } register = true

Re: How D could gain more traction?

2015-04-15 Thread XavierAP via Digitalmars-d
So many good ideas and points posted. Something should come out after this discussion... On Wednesday, 15 April 2015 at 14:07:11 UTC, Ola Fosheim Grøstad wrote: I think maybe a modular approach is better, to have different profiles: 1. foundational libraries (basic types) 2. architecture

Detect the bug in the following code

2015-04-15 Thread Idan Arye via Digitalmars-d
import std.stdio; struct Foo { bool registered = false; void register(int x) { writeln(Registering , x); register = true; } } void main() { Foo foo; foo.register(10); }

Re: CTFE UFCs?

2015-04-15 Thread bitwise via Digitalmars-d-learn
On Tue, 14 Apr 2015 12:52:19 -0400, anonymous anonym...@example.com wrote: abstract class Refl { @property abstract string name() const; immutable(Refl) base() const; } class ClassRefl(T) : Refl { @property override string name() const { return T.stringof; }

Re: How D could gain more traction?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 14:03:13 UTC, Tobias Pankrath wrote: No. We were talking about parts of e.g. the python standard library that have been completely superseded by third party solutions at least for new projects. Well, that has not happend. What has happend is that people use a

Re: [dub]

2015-04-15 Thread y via Digitalmars-d-learn
On Tuesday, 14 April 2015 at 15:22:27 UTC, Chris wrote: I get the following message from dub when using --build=release: Linking...

Re: How D could gain more traction?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 15:36:44 UTC, XavierAP wrote: That looks like good architecture. I'm not sure if 2 and 3 wouldn't be at the same level of (non-) dependency? Or maybe it's the image processing example you've used. In any case 2 would have more priority because of practical

Re: DlangUI

2015-04-15 Thread igor_p via Digitalmars-d-announce
BTW, if I remove USE_OPENGL works fine :)

Re: Converting void* to D array

2015-04-15 Thread CraigDillabaugh via Digitalmars-d-learn
On Wednesday, 15 April 2015 at 14:02:38 UTC, Steven Schveighoffer wrote: On 4/15/15 8:35 AM, CraigDillabaugh wrote: On Wednesday, 15 April 2015 at 11:18:03 UTC, Steven Schveighoffer wrote: immutable blocksize = GByte.sizeof * x_block_size * y_block_size; auto buffer =

Re: Converting void* to D array

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/15/15 11:02 AM, CraigDillabaugh wrote: Nice. Thanks. I didn't realize you can slice a bare pointer like that. Does druntime have any way of making sure that is safe, or are you on your own? No, druntime cannot know what the pointer actually points at. This would not work in @safe

CT-String as a Symbol

2015-04-15 Thread Nordlöw
At https://github.com/nordlow/justd/blob/master/typecons_ex.d#L143 I can't figure out how to make the call to mixin genOps!I; expand to, for instance, mixin genOps!Index in the case when I = Index. Help please.

Re: How D could gain more traction?

2015-04-15 Thread CraigDillabaugh via Digitalmars-d
On Wednesday, 15 April 2015 at 15:49:10 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 15 April 2015 at 15:36:44 UTC, XavierAP wrote: That looks like good architecture. I'm not sure if 2 and 3 wouldn't be at the same level of (non-) dependency? Or maybe it's the image processing example you've

Re: EMSI is hiring a D developer

2015-04-15 Thread Justin Whear via Digitalmars-d-announce
On Wed, 15 Apr 2015 07:27:49 +, Abdulhaq wrote: On Tuesday, 14 April 2015 at 16:17:37 UTC, Justin Whear wrote: EMSI is hiring for an Engineer II to work on D codebases: https:// emsi.bamboohr.com/jobs/view.php?id=30 When it said Moscow I was thinking mmmh lots of traffic, a bit

Re: EMSI is hiring a D developer

2015-04-15 Thread bachmeier via Digitalmars-d-announce
On Wednesday, 15 April 2015 at 12:30:08 UTC, Baz wrote: On Wednesday, 15 April 2015 at 08:32:10 UTC, wobbles wrote: On Wednesday, 15 April 2015 at 07:27:51 UTC, Abdulhaq wrote: On Tuesday, 14 April 2015 at 16:17:37 UTC, Justin Whear wrote: EMSI is hiring for an Engineer II to work on D

[Issue 12603] [CTFE] Unknown bug with goto case.

2015-04-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12603 Clement Courbet c...@somebod.com changed: What|Removed |Added CC||c...@somebod.com ---

[OT] PyCon talk on Rust Python

2015-04-15 Thread Mengu via Digitalmars-d
i was watching an interesting PyCon talk on Rust Python and I wanted to share it here since i know there are people using PyD. you can watch the talk at https://www.youtube.com/watch?v=3CwJ0MH-4MA. it looks really nice and easy.

[Issue 14450] New: Incorrect overloading of immutable constructor for template struct

2015-04-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14450 Issue ID: 14450 Summary: Incorrect overloading of immutable constructor for template struct Product: D Version: D2 Hardware: x86_64 OS: Linux Status:

Re: [NEEDING HELP] Translation of Ali Cehreli's book in French

2015-04-15 Thread Raphaël Jakse via Digitalmars-d
Hello everyone! I managed to find time to handle the proofreads and translations I got these last months. I updated the book at http://dlang-fr.org/cours/programmer-en-d/ Four new chapter are available and chapter 1 to 31 (Tableaux associatifs) have been proofread. proofreads and another

Re: Detect the bug in the following code

2015-04-15 Thread John Colvin via Digitalmars-d
On Wednesday, 15 April 2015 at 14:44:48 UTC, Idan Arye wrote: import std.stdio; struct Foo { bool registered = false; void register(int x) { writeln(Registering , x); register = true; } } void main() { Foo foo; foo.register(10); } Property assignment

Re: Can we get rid of non-raw write?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 15:17:27 UTC, Jürgen Reichmann wrote: On Wednesday, 15 April 2015 at 14:47:46 UTC, armando sano wrote: Reviving old topic... It is possible to force stdout to write in binary mode on Windows, see https://msdn.microsoft.com/en-us/library/tw4k6df8.aspx In C, the

Re: Detect the bug in the following code

2015-04-15 Thread Caspar via Digitalmars-d
On Wednesday, 15 April 2015 at 17:28:01 UTC, John Colvin wrote: On Wednesday, 15 April 2015 at 14:44:48 UTC, Idan Arye wrote: import std.stdio; struct Foo { bool registered = false; void register(int x) { writeln(Registering , x); register = true; } } void main() {

Re: Auto ref function : How is this possible ?

2015-04-15 Thread Ali Çehreli via Digitalmars-d-learn
On 04/15/2015 10:50 AM, Ali Çehreli wrote: pragma(msg) has been added to Programming in D but it is not available online yet: Sorry for the spam :( but apparently it is already online: http://ddili.org/ders/d.en/templates.html#ix_templates.pragma Ali

Re: CTFE UFCs?

2015-04-15 Thread bitwise via Digitalmars-d-learn
On Tue, 14 Apr 2015 12:52:19 -0400, anonymous anonym...@example.com wrote: Parting thoughts: I don't know where you're heading with this. But so far I don't see what it would buy you over std.traits and TypeInfo/TypeInfo_Class. Forgot to mention support for runtime reflection. See here:

Re: EMSI is hiring a D developer

2015-04-15 Thread via Digitalmars-d-announce
On Wednesday, 15 April 2015 at 08:32:10 UTC, wobbles wrote: On Wednesday, 15 April 2015 at 07:27:51 UTC, Abdulhaq wrote: On Tuesday, 14 April 2015 at 16:17:37 UTC, Justin Whear wrote: EMSI is hiring for an Engineer II to work on D codebases: https:// emsi.bamboohr.com/jobs/view.php?id=30

Re: Detect the bug in the following code

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/15 1:44 PM, Caspar wrote: On Wednesday, 15 April 2015 at 17:28:01 UTC, John Colvin wrote: On Wednesday, 15 April 2015 at 14:44:48 UTC, Idan Arye wrote: import std.stdio; struct Foo { bool registered = false; void register(int x) { writeln(Registering , x);

Re: [NEEDING HELP] Translation of Ali Cehreli's book in French

2015-04-15 Thread Raphaël Jakse via Digitalmars-d
Hello everyone! I managed to find time to handle the proofreads and translations I got these last months. I updated the book at http://dlang-fr.org/cours/programmer-en-d/ Four new chapter are available and chapter 1 to 31 (Tableaux associatifs) have been proofread. proofreads and another

Re: std.reflection prototype

2015-04-15 Thread bitwise via Digitalmars-d
On Wed, 15 Apr 2015 11:26:48 -0400, bitwise bitwise@gmail.com wrote: But AFAIK, this is NOT ok in C++ because of the way inheritance works.. is this safe in D? To clarify, I'm talking about doing doing things by Object pointer or void pointer, which seems to work fine: class Test {

Re: Auto ref function : How is this possible ?

2015-04-15 Thread Ali Çehreli via Digitalmars-d-learn
On 04/13/2015 07:44 AM, matovitch wrote: Thanks for the tip ! I was looking at something like this. pragma(msg) has been added to Programming in D but it is not available online yet:

Re: About @ and UDA

2015-04-15 Thread ketmar via Digitalmars-d-learn
On Wed, 15 Apr 2015 08:53:05 +, Andrea Fontana wrote: My 2 cents. If I remember correctly, @ prefix in @safe, @trusted, @system, etc was added just to avoid keywords pollution, right? Now UDA uses the same prefix: if some new keywords/properties/attributes will be added to D, the same

Re: CT-String as a Symbol

2015-04-15 Thread Ali Çehreli via Digitalmars-d-learn
On 04/15/2015 09:21 AM, Nordlöw wrote: At https://github.com/nordlow/justd/blob/master/typecons_ex.d#L143 I can't figure out how to make the call to mixin genOps!I; expand to, for instance, mixin genOps!Index This seems to work: mixin genOps!(mixin(I)); in the case when

Re: Detect the bug in the following code

2015-04-15 Thread Brian Schott via Digitalmars-d
On Wednesday, 15 April 2015 at 15:17:32 UTC, Steven Schveighoffer wrote: Easy, the bug is in DMD improperly accepting property assignment without @property annotation :P We've found the winner!

Re: How D could gain more traction?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 16:19:07 UTC, CraigDillabaugh wrote: For Satellite image processing at least GDAL can take care of most of the memory/image handling stuff. I have some D Bindings (largely untested). Maybe a good idea would be to collect bindings for a single domain (like image

Re: Detect the bug in the following code

2015-04-15 Thread w0rp via Digitalmars-d
On Wednesday, 15 April 2015 at 15:17:32 UTC, Steven Schveighoffer wrote: On 4/15/15 10:44 AM, Idan Arye wrote: import std.stdio; struct Foo { bool registered = false; void register(int x) { writeln(Registering , x); register = true; } } void main() { Foo foo;

Re: How about appender.put() with var args?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 19:16:55 UTC, Steven Schveighoffer wrote: On 4/15/15 3:09 PM, =?UTF-8?B?Ik3DoXJjaW8=?= Martins\ marcio...@gmail.com\ wrote: Hi! I use Appender a lot, and find it ugly to write this all the time to efficiently construct strings: app.put(foo); app.put(var);

Re: How about appender.put() with var args?

2015-04-15 Thread Ali Çehreli via Digitalmars-d
On 04/15/2015 12:09 PM, =?UTF-8?B?Ik3DoXJjaW8=?= Martins\ marcio...@gmail.com\ wrote: Hi! I use Appender a lot, and find it ugly to write this all the time to efficiently construct strings: app.put(foo); app.put(var); app.put(bar); How about this instead? app.put(foo, var, bar); Agreed.

Re: How about appender.put() with var args?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 19:41:13 UTC, Justin Whear wrote: Appender will take a range, so you can also do: app.put([foo, var, bar]); or app.put(chain(foo, var, bar)); But yes, a variadic put would be convenient so long as it wasn't ambiguous in some way. I guess chain could work in

Re: [OT] PyCon talk on Rust Python

2015-04-15 Thread Matt Soucy via Digitalmars-d
On 04/15/2015 02:40 PM, Mengu wrote: i was watching an interesting PyCon talk on Rust Python and I wanted to share it here since i know there are people using PyD. you can watch the talk at https://www.youtube.com/watch?v=3CwJ0MH-4MA. it looks really nice and easy. I'm now regretting

Re: How about appender.put() with var args?

2015-04-15 Thread Messenger via Digitalmars-d
On Wednesday, 15 April 2015 at 19:09:42 UTC, Márcio Martins wrote: Hi! I use Appender a lot, and find it ugly to write this all the time to efficiently construct strings: app.put(foo); app.put(var); app.put(bar); Sidetracking a bit, but when I started using Appender I was surprised to

Re: How about appender.put() with var args?

2015-04-15 Thread Justin Whear via Digitalmars-d
Appender will take a range, so you can also do: app.put([foo, var, bar]); or app.put(chain(foo, var, bar)); But yes, a variadic put would be convenient so long as it wasn't ambiguous in some way.

Re: std.reflection prototype

2015-04-15 Thread Jacob Carlborg via Digitalmars-d
On 2015-04-15 17:26, bitwise wrote: Right now, this is the def: /** * Array of pairs giving the offset and type information for each * member in an aggregate. */ struct OffsetTypeInfo { size_t offset;/// Offset of member from start of object TypeInfo ti;///

Re: CT-String as a Symbol

2015-04-15 Thread Ali Çehreli via Digitalmars-d-learn
On 04/15/2015 12:19 PM, Nordlöw wrote: I'm using DMD 2.067. Mee too. The following is the minimum amount of code I used, which compiles: import std.traits; import std.range; struct Index(T = size_t) if (isUnsigned!T) { this(T ix) { this._ix = ix; } T opCast(U : T)() const { return

Re: EMSI is hiring a D developer

2015-04-15 Thread via Digitalmars-d-announce
On Wednesday, 15 April 2015 at 19:49:10 UTC, Justin Whear wrote: On Wed, 15 Apr 2015 17:44:00 +, Ola Fosheim Grøstad wrote: Yes, isn't it weird how regimes put little versions of their capitals in other countries? Is it a planned exile strategy in case of a new revolution? Moscow,

Re: CT-String as a Symbol

2015-04-15 Thread Nordlöw
On Wednesday, 15 April 2015 at 19:15:36 UTC, Nordlöw wrote: errors typecons_ex.d(135,5): Error: mixin typecons_ex.IndexedBy!(int[3], I).IndexedBy.genOps!I does not match template declaration genOps(T) typecons_ex.d(152,12): Error: template instance typecons_ex.IndexedBy!(int[3], I) error

Re: How about appender.put() with var args?

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/15 3:09 PM, =?UTF-8?B?Ik3DoXJjaW8=?= Martins\ marcio...@gmail.com\ wrote: Hi! I use Appender a lot, and find it ugly to write this all the time to efficiently construct strings: app.put(foo); app.put(var); app.put(bar); How about this instead? app.put(foo, var, bar); This would be

Re: CT-String as a Symbol

2015-04-15 Thread Nordlöw
I'm using DMD 2.067.

Re: CT-String as a Symbol

2015-04-15 Thread Nordlöw
On Wednesday, 15 April 2015 at 17:03:36 UTC, Ali Çehreli wrote: This seems to work: mixin genOps!(mixin(I)); I'm afraid not: mixin genOps!(mixin(I)); errors typecons_ex.d(135,5): Error: mixin typecons_ex.IndexedBy!(int[3], I).IndexedBy.genOps!I does not match template declaration

Re: Detect the bug in the following code

2015-04-15 Thread John Colvin via Digitalmars-d
On Wednesday, 15 April 2015 at 18:25:33 UTC, w0rp wrote: On Wednesday, 15 April 2015 at 15:17:32 UTC, Steven Schveighoffer wrote: On 4/15/15 10:44 AM, Idan Arye wrote: import std.stdio; struct Foo { bool registered = false; void register(int x) { writeln(Registering , x);

Re: CT-String as a Symbol

2015-04-15 Thread Nordlöw
On Wednesday, 15 April 2015 at 20:12:27 UTC, Ali Çehreli wrote: Ali I cracked it: Reason: I hade a failing unittest using it as auto xs = x.indexedBy!I; which I changed to auto xs = x.indexedBy!Ix; For some reason the mixin magic becomes confused when I equals I. Do you have

Re: std.reflection prototype

2015-04-15 Thread bitwise via Digitalmars-d
On Wed, 15 Apr 2015 15:48:28 -0400, Jacob Carlborg d...@me.com wrote: On 2015-04-15 17:26, bitwise wrote: Right now, this is the def: /** * Array of pairs giving the offset and type information for each * member in an aggregate. */ struct OffsetTypeInfo { size_t offset;///

Re: EMSI is hiring a D developer

2015-04-15 Thread Justin Whear via Digitalmars-d-announce
On Wed, 15 Apr 2015 20:11:39 +, Ola Fosheim Grøstad wrote: That fact puts Orwell's writings in a new light. Oooh, an Animal Farm reference; spooky.

Re: Pitching an investment bank on using D for their bond analytics

2015-04-15 Thread ketmar via Digitalmars-d
On Wed, 15 Apr 2015 22:32:52 +, Kapps wrote: On Tuesday, 14 April 2015 at 12:08:54 UTC, D Denizen since a year wrote: A friend has been invited to be a consultant for an investment bank that would like to build a set of analytics for fixed income products. The team is currently quite

Re: std.reflection prototype

2015-04-15 Thread bitwise via Digitalmars-d
One more thing. I had to add a virtual destructor to A to get this to work: class A { public: int a; virtual ~A(){} }; // A *d2 = (A*)d; cout boolalpha (typeid(*d2) == typeid(D)) endl; C *d3 = (C*)d; cout boolalpha (typeid(*d3) == typeid(D)) endl; Output is now: true false

Re: How about appender.put() with var args?

2015-04-15 Thread Messenger via Digitalmars-d
On Wednesday, 15 April 2015 at 20:59:25 UTC, Steven Schveighoffer wrote: with(app) { put(var); put(bar); put(more); put(stuff); } -Steve Awesome.

Re: How about appender.put() with var args?

2015-04-15 Thread via Digitalmars-d
On Wednesday, 15 April 2015 at 20:44:07 UTC, Ali Çehreli wrote: On 04/15/2015 12:09 PM, =?UTF-8?B?Ik3DoXJjaW8=?= Martins\ marcio...@gmail.com\ wrote: Hi! I use Appender a lot, and find it ugly to write this all the time to efficiently construct strings: app.put(foo); app.put(var);

Re: How D could gain more traction?

2015-04-15 Thread XavierAP via Digitalmars-d
At any rate I believe this modular / one domain at a time and layered approach would be the correct one, and setting priorities. Then we'd have to eventually start sooner than later filling out implementations, because the optimal previous design time is sadly always less than infinite. :o)

Re: Pitching an investment bank on using D for their bond analytics

2015-04-15 Thread Kapps via Digitalmars-d
On Tuesday, 14 April 2015 at 12:08:54 UTC, D Denizen since a year wrote: A friend has been invited to be a consultant for an investment bank that would like to build a set of analytics for fixed income products. The team is currently quite small - about 5 C++ developers - and the idea is to

Re: CT-String as a Symbol

2015-04-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/15/15 6:42 PM, Nordlöw wrote: On Wednesday, 15 April 2015 at 20:12:27 UTC, Ali Çehreli wrote: Ali I cracked it: Reason: I hade a failing unittest using it as auto xs = x.indexedBy!I; which I changed to auto xs = x.indexedBy!Ix; For some reason the mixin magic becomes

Re: Can we get rid of non-raw write?

2015-04-15 Thread armando sano via Digitalmars-d
On Wednesday, 15 April 2015 at 17:53:24 UTC, Jürgen Reichmann wrote: On Wednesday, 15 April 2015 at 15:17:27 UTC, Jürgen Reichmann wrote: On Wednesday, 15 April 2015 at 14:47:46 UTC, armando sano wrote: Reviving old topic... It is possible to force stdout to write in binary mode on Windows,

Re: D AutoCompletion: is ycmd integration valuable?

2015-04-15 Thread Israel via Digitalmars-d
On Wednesday, 15 April 2015 at 13:15:31 UTC, rcorre wrote: For those who don't know, ycmd (https://github.com/Valloric/ycmd) is an editor-agnostic completion engine that aims to reduce a lot of the duplicate code written for handling autocompletions in different language/editor combinations.

Re: CT-String as a Symbol

2015-04-15 Thread Ali Çehreli via Digitalmars-d-learn
On 04/15/2015 03:42 PM, Nordlöw wrote: On Wednesday, 15 April 2015 at 20:12:27 UTC, Ali Çehreli wrote: Ali I cracked it: Reason: I hade a failing unittest using it as auto xs = x.indexedBy!I; which I changed to auto xs = x.indexedBy!Ix; For some reason the mixin magic

Re: Pitching an investment bank on using D for their bond analytics

2015-04-15 Thread lobo via Digitalmars-d
On Wednesday, 15 April 2015 at 22:32:53 UTC, Kapps wrote: On Tuesday, 14 April 2015 at 12:08:54 UTC, D Denizen since a year wrote: A friend has been invited to be a consultant for an investment bank that would like to build a set of analytics for fixed income products. The team is currently

Re: SDC needs you

2015-04-15 Thread deadalnix via Digitalmars-d
On Thursday, 16 April 2015 at 05:07:57 UTC, Joakim wrote: Of course, you can go to all the trouble of coming up with a list of action items and nobody outside the core group may still contribute, as I said from the beginning. But if you don't make it easier for new or non-core contributors,

  1   2   >