[Issue 15078] GC documentation should reflect 2.067 changes

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15078 Daniel Kozak changed: What|Removed |Added URL|

Re: Implement the "unum" representation in D ?

2015-09-17 Thread Ola Fosheim Grøstad via Digitalmars-d
On Wednesday, 16 September 2015 at 23:28:23 UTC, H. S. Teoh wrote: I'm not so sure how well this will work in practice, though, unless we have a working prototype that proves the benefits. What if you have a 10*10 unum matrix, and during some operation the size of the unums in the matrix

[Issue 15078] New: GC documentation should reflect 2.067 changes

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15078 Issue ID: 15078 Summary: GC documentation should reflect 2.067 changes Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread bitwise via Digitalmars-d
On Thursday, 17 September 2015 at 06:40:56 UTC, ponce wrote: On Wednesday, 16 September 2015 at 23:24:29 UTC, bitwise wrote: I was trying to solve this one myself, but the modifications to DMD's backend that are needed are out of reach for me right now. If you're willing to build your own

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread ponce via Digitalmars-d
On Wednesday, 16 September 2015 at 23:24:29 UTC, bitwise wrote: I was trying to solve this one myself, but the modifications to DMD's backend that are needed are out of reach for me right now. If you're willing to build your own druntime, you may be able to get by. I'd prefer a solution

[Issue 14916] opDispatch: no property error for parameter type mismatch

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14916 Ozan Nurettin Süel changed: What|Removed |Added CC|

[Issue 14916] opDispatch: no property error for parameter type mismatch

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14916 Ozan Nurettin Süel changed: What|Removed |Added Priority|P1 |P2 ---

Re: dmd codegen improvements

2015-09-17 Thread Joakim via Digitalmars-d
On Wednesday, 16 September 2015 at 20:44:00 UTC, Walter Bright wrote: On 9/16/2015 7:16 AM, Bruno Medeiros wrote: On 28/08/2015 22:59, Walter Bright wrote: People told me I couldn't write a C compiler, then told me I couldn't write a C++ compiler. I'm still the only person who has ever

Re: dmd codegen improvements

2015-09-17 Thread Mike Parker via Digitalmars-d
On Wednesday, 16 September 2015 at 14:40:26 UTC, Bruno Medeiros wrote: And on this aspect I think the development of D does very poorly. Often people clamored for a feature or change (whether people in the D community, or the C++ one), and Walter you went ahead and did it, regardless of

Bloat with std.(string.)format?

2015-09-17 Thread Chris via Digitalmars-d-learn
If I have code like this: auto builder = appender!string; builder ~= "Hello, World!"; builder ~= "I'm here!"; builder ~= "Now I'm there!"; the object file grows by 10-11 lines with each call to `builder ~=`. If I use this: builder ~= format("%s", "Hello, World!"); builder ~= format("%s",

[Issue 14916] opDispatch: no property error for parameter type mismatch

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14916 Kenji Hara changed: What|Removed |Added Keywords||diagnostic --

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread Walter Bright via Digitalmars-d
On 9/16/2015 11:40 PM, ponce wrote: On Wednesday, 16 September 2015 at 23:24:29 UTC, bitwise wrote: I was trying to solve this one myself, but the modifications to DMD's backend that are needed are out of reach for me right now. If you're willing to build your own druntime, you may be able to

[Issue 15079] New: Assertion `fd->semanticRun == PASSsemantic3done' failed.

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15079 Issue ID: 15079 Summary: Assertion `fd->semanticRun == PASSsemantic3done' failed. Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Reading Atributes (UDA) of overloaded functions

2015-09-17 Thread Ozan via Digitalmars-d-learn
Hi! Is it possible to read all attributes in case of overloading functions? Example: struct Att { string name; } struct Att2 { string name; } @Att void testUDA(string x) { writeln("test(string ",x,")"); } @Att2 void testUDA(int x) { writeln("test(string ",x,")"); } void main(string[] args) {

Re: dmd codegen improvements

2015-09-17 Thread Bruno Medeiros via Digitalmars-d
On 17/09/2015 08:10, Joakim wrote: Yeah, I was a bit stunned that that is what Bruno took from your post. I don't think anybody would question that writing a C or C++ compiler in the '80s and '90s had value, and I'm sure you did pretty well off them, considering you retired at 42

Re: dmd codegen improvements

2015-09-17 Thread Bruno Medeiros via Digitalmars-d
On 17/09/2015 09:06, Mike Parker wrote: On Wednesday, 16 September 2015 at 14:40:26 UTC, Bruno Medeiros wrote: And on this aspect I think the development of D does very poorly. Often people clamored for a feature or change (whether people in the D community, or the C++ one), and Walter you went

[Issue 15071] filenames and module names with case-insensitive HFS+

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15071 --- Comment #3 from Sobirari Muhomori --- dmd chirplet.d mathutil.d -main Does this work (lower case)? --

Re: Checked integer type API design poll

2015-09-17 Thread tsbockman via Digitalmars-d
I see that someone selected "All of that and more, not listed here" in response to "How many math functions need versions with checked integer support?" If anyone selects that option, please leave a comment explaining what other code you think needs explicit support for checked integer

Re: dmd codegen improvements

2015-09-17 Thread Bruno Medeiros via Digitalmars-d
On 17/09/2015 12:57, Bruno Medeiros wrote: But if people from the C++ community said it, OMG, then Walter goes "let's add it to D!", just to prove a point or something. *Mind you*: all this I'm saying is pre TDPL book stuff. After the book was out, things stabilized. But way back, even more so

Re: Checked integer type API design poll

2015-09-17 Thread tsbockman via Digitalmars-d
On Thursday, 17 September 2015 at 08:40:17 UTC, Kagamin wrote: As I understand, items with bigger average score are less popular? For the ranking/sorting questions, yes. I think the number next to each item is the mean rank given it by the group. A "1.0" would mean that people unanimously

Re: Bloat with std.(string.)format?

2015-09-17 Thread John Colvin via Digitalmars-d-learn
On Thursday, 17 September 2015 at 09:54:07 UTC, Chris wrote: If I have code like this: auto builder = appender!string; builder ~= "Hello, World!"; builder ~= "I'm here!"; builder ~= "Now I'm there!"; the object file grows by 10-11 lines with each call to `builder ~=`. If I use this: builder

Re: Bloat with std.(string.)format?

2015-09-17 Thread Chris via Digitalmars-d-learn
On Thursday, 17 September 2015 at 10:33:44 UTC, John Colvin wrote: Some initial bloat is expected, format is pretty big (although twice as big is a lot, unless your original code was quite small?). It was in a test program. Only a few lines. But it would still add a lot of bloat in a

Re: Thrift

2015-09-17 Thread Nikolay via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 16:57:39 UTC, ddos wrote: please help if you know how to get a simple example with d & thrift running thx, dominik Some time ago I could use facebook brunch with dlang: https://github.com/facebook/fbthrift

Re: GC performance: collection frequency

2015-09-17 Thread Dmitry Olshansky via Digitalmars-d
On 14-Sep-2015 21:47, H. S. Teoh via Digitalmars-d wrote: Over in the d.learn forum, somebody posted a question about poor performance in a text-parsing program. After a bit of profiling I discovered that reducing GC collection frequency (i.e., GC.disable() then manually call GC.collect() at

Re: Checked integer type API design poll

2015-09-17 Thread Kagamin via Digitalmars-d
As I understand, items with bigger average score are less popular?

[Issue 14886] [REG2.066] std.parallelism.parallel with large static array seems to hang compile

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14886 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #6 from

[Issue 15076] Get ID of current thread

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15076 Jonathan M Davis changed: What|Removed |Added CC|

Re: Runtime error when calling a callback in a parallel Task

2015-09-17 Thread Kagamin via Digitalmars-d-learn
Maybe compiler generates wrong code, try to debug at instruction level.

[Issue 15071] filenames and module names with case-insensitive HFS+

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15071 --- Comment #4 from John Colvin --- (In reply to Sobirari Muhomori from comment #3) > dmd chirplet.d mathutil.d -main > > Does this work (lower case)? Yes. --

Re: Reading Atributes (UDA) of overloaded functions

2015-09-17 Thread John Colvin via Digitalmars-d-learn
On Thursday, 17 September 2015 at 11:47:40 UTC, Ozan wrote: Hi! Is it possible to read all attributes in case of overloading functions? Example: struct Att { string name; } struct Att2 { string name; } @Att void testUDA(string x) { writeln("test(string ",x,")"); } @Att2 void testUDA(int x) {

Re: dmd codegen improvements

2015-09-17 Thread Kagamin via Digitalmars-d
Template metaprogramming is probably the only notable feature borrowed from C++ (more like a redesign?), the rest looks more like borrowed from Java. This actually turns C++ programmers away when they see so many things are done differently from C++.

Re: Reading Atributes (UDA) of overloaded functions

2015-09-17 Thread Ozan via Digitalmars-d-learn
On Thursday, 17 September 2015 at 12:36:42 UTC, John Colvin wrote: On Thursday, 17 September 2015 at 11:47:40 UTC, Ozan wrote: ... use __traits(getAttributes, /*...*/) on each of the members of the result of __traits(getOverloads, /*...*/) Great! Thanks! Now it works: foreach (ov;

Re: Bloat with std.(string.)format?

2015-09-17 Thread John Colvin via Digitalmars-d-learn
On Thursday, 17 September 2015 at 10:53:17 UTC, Chris wrote: On Thursday, 17 September 2015 at 10:33:44 UTC, John Colvin wrote: Some initial bloat is expected, format is pretty big (although twice as big is a lot, unless your original code was quite small?). It was in a test program. Only

Re: Reading Atributes (UDA) of overloaded functions

2015-09-17 Thread John Colvin via Digitalmars-d-learn
On Thursday, 17 September 2015 at 12:40:24 UTC, Ozan wrote: On Thursday, 17 September 2015 at 12:36:42 UTC, John Colvin wrote: On Thursday, 17 September 2015 at 11:47:40 UTC, Ozan wrote: ... use __traits(getAttributes, /*...*/) on each of the members of the result of __traits(getOverloads,

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread bitwise via Digitalmars-d
On Thursday, 17 September 2015 at 10:12:57 UTC, Walter Bright wrote: On 9/16/2015 11:40 PM, ponce wrote: On Wednesday, 16 September 2015 at 23:24:29 UTC, bitwise wrote: I was trying to solve this one myself, but the modifications to DMD's backend that are needed are out of reach for me

Re: FancyPars

2015-09-17 Thread Stefan Koch via Digitalmars-d-announce
On Wednesday, 16 September 2015 at 12:16:03 UTC, Bastiaan Veelo wrote: Sounds like you want to share this, but I can't find a licence. In case this turns out to be useful, we would need one :-) If you want I can prepare a PR for that, just let me know which licence to pick. Best,

Re: GC performance: collection frequency

2015-09-17 Thread H. S. Teoh via Digitalmars-d
On Thu, Sep 17, 2015 at 11:26:17AM +0300, Dmitry Olshansky via Digitalmars-d wrote: > On 14-Sep-2015 21:47, H. S. Teoh via Digitalmars-d wrote: > >Over in the d.learn forum, somebody posted a question about poor > >performance in a text-parsing program. After a bit of profiling I > >discovered

Re: LDC 0.16.0 alpha3 is out! Get it, test it, give feedback!

2015-09-17 Thread Jack Stouffer via Digitalmars-d-announce
On Thursday, 17 September 2015 at 15:19:07 UTC, John Colvin wrote: dub build --compiler=ldc2 -v will sometimes let you see more clearly when/where things went wrong. Seems to be a segfault in LDC $ dub build --force --compiler=ldc2 -v A bunch of stuff for the dependancies Using direct

Re: FancyPars

2015-09-17 Thread Stefan Koch via Digitalmars-d-announce
On Wednesday, 16 September 2015 at 21:25:40 UTC, Bastiaan Veelo wrote: Thanks. At first I thought that fancy_[ast|token|lexer|parser|printer].d were generated files because their content is so similar to the code produced in the vibe application. But on closer look I think it is the other

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread bitwise via Digitalmars-d
On Thursday, 17 September 2015 at 15:12:43 UTC, Jacob Carlborg wrote: On 2015-09-17 00:29, ponce wrote: [...] Easiest would be to not unload the library. If that doesn't work, replace "_dyld_register_func_for_add_image" [1] with "dyld_register_image_state_change_handler" [2]. [1]

Re: FancyPars

2015-09-17 Thread Stefan Koch via Digitalmars-d-announce
On Thursday, 17 September 2015 at 16:02:14 UTC, John Colvin wrote: Yikes. Are you sure? Are you familiar with open source licensing? I would be open to open-source the "base" of fp. but keeping certin extentions for grammar analysis closed. What license would you suggest for that.

Re: Load Qt UI XML File as GUI

2015-09-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/16/15 3:08 PM, Ali Çehreli wrote: On 09/15/2015 09:36 PM, Steven Schveighoffer wrote: On 9/16/15 12:03 AM, Mike McKee wrote: Unfortunately, the http://dsource.org/forums/ doesn't appear to be active -- I can't login after I registered. This is where the QtD project has their forum. So,

Re: LDC 0.16.0 alpha3 is out! Get it, test it, give feedback!

2015-09-17 Thread John Colvin via Digitalmars-d-announce
On Thursday, 17 September 2015 at 15:15:33 UTC, Jack Stouffer wrote: My dub build is failing with LDC but working with DMD. All I get is this unhelpful error message $ dub build --compiler=ldc2 Target derelict-util 2.0.3 is up to date. Use --force to rebuild. Building derelict-sdl2 1.9.7

Re: LDC 0.16.0 alpha3 is out! Get it, test it, give feedback!

2015-09-17 Thread David Gileadi via Digitalmars-d-announce
On 9/17/15 8:15 AM, Jack Stouffer wrote: Building dungeon ~master ... Forgive the unhelpful reply, but this line made me happy :)

Defining compile-time constants?

2015-09-17 Thread Tim K. via Digitalmars-d-learn
Hi! I am wondering if there is any way to define constants to pass to the compiler like in C (especially useful in combination with Makefiles, for obvious reasons), i.e.: gcc -DPREFIX=\"/usr/local\" -o myprogram main.c Like this a program can look for certain files inside its prefix

Re: Defining compile-time constants?

2015-09-17 Thread Rikki Cattermole via Digitalmars-d-learn
On 18/09/15 3:32 AM, Tim K. wrote: Hi! I am wondering if there is any way to define constants to pass to the compiler like in C (especially useful in combination with Makefiles, for obvious reasons), i.e.: gcc -DPREFIX=\"/usr/local\" -o myprogram main.c Like this a program can look for

Re: FancyPars

2015-09-17 Thread John Colvin via Digitalmars-d-announce
On Thursday, 17 September 2015 at 15:47:42 UTC, Stefan Koch wrote: On Wednesday, 16 September 2015 at 12:16:03 UTC, Bastiaan Veelo wrote: Sounds like you want to share this, but I can't find a licence. In case this turns out to be useful, we would need one :-) If you want I can prepare a

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread ponce via Digitalmars-d
On Thursday, 17 September 2015 at 15:12:43 UTC, Jacob Carlborg wrote: Easiest would be to not unload the library. I don't control what the host program does. If that doesn't work, replace "_dyld_register_func_for_add_image" [1] with "dyld_register_image_state_change_handler" [2]. [1]

Re: Defining compile-time constants?

2015-09-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 September 2015 at 15:32:25 UTC, Tim K. wrote: I am wondering if there is any way to define constants to pass to the compiler like in C (especially useful in combination with Makefiles, for obvious reasons), i.e.: My preference is to make an app.config module that lists these

Re: Bloat with std.(string.)format?

2015-09-17 Thread Chris via Digitalmars-d-learn
On Thursday, 17 September 2015 at 15:17:21 UTC, John Colvin wrote: On Thursday, 17 September 2015 at 13:42:15 UTC, Chris wrote: On Thursday, 17 September 2015 at 12:49:03 UTC, John Colvin wrote: [...] Thanks. That's up to date enough now. Is it stable, though? Reasonably so in my testing,

[Issue 15076] Get ID of current thread

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

Re: std.experimental.testing formal review

2015-09-17 Thread Atila Neves via Digitalmars-d
On Sunday, 13 September 2015 at 09:59:18 UTC, Dicebot wrote: 1) being able to mark test case as fatal (i.e. if internal handshake or sanity check fails there is no point in trying to run other tests) I'm leaning towards not including this now and concentrating on getting it approved - a PR

Re: LDC 0.16.0 alpha3 is out! Get it, test it, give feedback!

2015-09-17 Thread Jack Stouffer via Digitalmars-d-announce
On Wednesday, 16 September 2015 at 20:03:15 UTC, Kai Nacke wrote: Hi everyone, LDC 0.16.0 alpha3, the LLVM-based D compiler, is available for download! Is there anyway to get dub to use this as a compiler so I can test this out?

Re: Why do abstract class functions require definitions?

2015-09-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/16/15 6:36 AM, Marc Schütz wrote: Wouldn't the following behaviour be more useful as a default? abstract class Foo { void bar1() { } // non-abstract, obviously void bar2();// abstract, because it's in an abstract class //

Re: Bloat with std.(string.)format?

2015-09-17 Thread John Colvin via Digitalmars-d-learn
On Thursday, 17 September 2015 at 13:42:15 UTC, Chris wrote: On Thursday, 17 September 2015 at 12:49:03 UTC, John Colvin wrote: [...] Thanks. That's up to date enough now. Is it stable, though? Reasonably so in my testing, but expect more bugs than in a full release. For version 2.067.1

Re: LDC 0.16.0 alpha3 is out! Get it, test it, give feedback!

2015-09-17 Thread Jack Stouffer via Digitalmars-d-announce
On Thursday, 17 September 2015 at 14:51:32 UTC, Jack Stouffer wrote: On Wednesday, 16 September 2015 at 20:03:15 UTC, Kai Nacke wrote: Hi everyone, LDC 0.16.0 alpha3, the LLVM-based D compiler, is available for download! Is there anyway to get dub to use this as a compiler so I can test

[Issue 15080] extern(C++) classes have wrong static data layout

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15080 yebblies changed: What|Removed |Added Assignee|nob...@puremagic.com|yebbl...@gmail.com --

[Issue 15080] extern(C++) classes have wrong static data layout

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15080 yebblies changed: What|Removed |Added Keywords||pull --- Comment #1 from

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread Jacob Carlborg via Digitalmars-d
On 2015-09-17 00:29, ponce wrote: Context: On OSX, a C program can load a D shared library but once unloaded the next dlopen will crash, jumping into a callback that doesn't exist anymore. I've filed it here: https://issues.dlang.org/show_bug.cgi?id=15060 It looks like this was known and

Re: dmd codegen improvements

2015-09-17 Thread jmh530 via Digitalmars-d
On Thursday, 17 September 2015 at 11:57:29 UTC, Bruno Medeiros wrote: *Mind you*: all this I'm saying is pre TDPL book stuff. After the book was out, things stabilized. Can I speak for the people who only became familiar with D after TDPL and say I don't really care about what you're

Re: LDC 0.16.0 alpha3 is out! Get it, test it, give feedback!

2015-09-17 Thread ponce via Digitalmars-d-announce
On Thursday, 17 September 2015 at 14:51:32 UTC, Jack Stouffer wrote: On Wednesday, 16 September 2015 at 20:03:15 UTC, Kai Nacke wrote: Hi everyone, LDC 0.16.0 alpha3, the LLVM-based D compiler, is available for download! Is there anyway to get dub to use this as a compiler so I can test

Re: Bloat with std.(string.)format?

2015-09-17 Thread Chris via Digitalmars-d-learn
On Thursday, 17 September 2015 at 12:49:03 UTC, John Colvin wrote: On Thursday, 17 September 2015 at 10:53:17 UTC, Chris wrote: On Thursday, 17 September 2015 at 10:33:44 UTC, John Colvin wrote: Some initial bloat is expected, format is pretty big (although twice as big is a lot, unless your

[Issue 15080] New: extern(C++) classes have wrong static data layout

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15080 Issue ID: 15080 Summary: extern(C++) classes have wrong static data layout Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: C++, wrong-code

[Issue 15076] Get ID of current thread

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

Re: running code on the homepage

2015-09-17 Thread nazriel via Digitalmars-d
On Wednesday, 16 September 2015 at 20:52:08 UTC, Andrei Alexandrescu wrote: On 09/16/2015 09:49 AM, nazriel wrote: 1-2 days more and we will be done with it so IMHO no need take any additionals steps for it right now. That's great, thanks for doing this. What is the current status with

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread bitwise via Digitalmars-d
On Thursday, 17 September 2015 at 16:17:11 UTC, bitwise wrote: On Thursday, 17 September 2015 at 10:12:57 UTC, Walter Bright wrote: On 9/16/2015 11:40 PM, ponce wrote: On Wednesday, 16 September 2015 at 23:24:29 UTC, bitwise wrote: I was trying to solve this one myself, but the modifications

Re: FancyPars

2015-09-17 Thread John Colvin via Digitalmars-d-announce
On Thursday, 17 September 2015 at 16:33:12 UTC, Stefan Koch wrote: On Thursday, 17 September 2015 at 16:02:14 UTC, John Colvin wrote: Yikes. Are you sure? Are you familiar with open source licensing? I would be open to open-source the "base" of fp. but keeping certin extentions for grammar

Re: Behavior of opEquals

2015-09-17 Thread Timon Gehr via Digitalmars-d
On 09/09/2015 09:20 PM, Timon Gehr wrote: On 09/09/2015 01:32 AM, Jonathan M Davis wrote: (moved from above) I really don't see any reason why it would even make sense to declare operators separately from a type. One reason is that single dispatch can be awkward. A textbook example would be:

Re: Passing Arguments on in Variadic Functions

2015-09-17 Thread jmh530 via Digitalmars-d-learn
On Monday, 14 September 2015 at 20:26:56 UTC, jmh530 wrote: Thanks to you both. This works perfect. I noticed that there's some interesting interplay with this technique and default arguments. From below, it is required that you put the ones with default arguments last. If there are only

Re: Pretty Printing TickDuration

2015-09-17 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 17 September 2015 at 16:54:02 UTC, Nordlöw wrote: How do I convert an instance of `TickDuration` to that format? Solution: writeln("> Query took ", sw.peek().to!Duration);

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread bitwise via Digitalmars-d
On Thursday, 17 September 2015 at 16:54:09 UTC, ponce wrote: On Thursday, 17 September 2015 at 16:42:52 UTC, bitwise wrote: [...] I use static linking of druntime already all the time and rely on it to be able to do something instead of nothing (where would I even found that shared

why are opCmp and opEquals not pure.

2015-09-17 Thread Stefan Koch via Digitalmars-d
Hi, is there any reason why opCmp and opEquals are not pure ? I would argue it is very counter-intuitive to mutate any state when comparing objects. opCmp and opEquals not being annotated pure is a major problem for me in writing ctfe-able code. since any call to Object.opEquals need to be

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread ponce via Digitalmars-d
On Thursday, 17 September 2015 at 16:42:52 UTC, bitwise wrote: One solution which could work is to disallow static linking of druntime on OSX completelymeaning, either don't even distribute a static druntime for OSX, or make shared druntime the default. This way, druntime would only ever

Pretty Printing TickDuration

2015-09-17 Thread Nordlöw via Digitalmars-d-learn
Currently import std.datetime: StopWatch; StopWatch sw; sw.start; writeln(sw.peek()); prints for instance TickDuration(279483) I've seen Phobos doing something much more clever such as pretty printing of time in the format: 1 hour, 2 seconds, 3 milliseconds, etc. How

Re: Creating a DLL with a ActiveX interface.

2015-09-17 Thread Taylor Hillegeist via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 16:08:47 UTC, Taylor Hillegeist wrote: export extern (Windows) void SayHello(Variant *Input_Variant) { string A = "HELLO WORLD!"; Input_Variant.CA_VariantSetCString(A.ptr); } So I made a terrible error. Looking at

Re: dmd codegen improvements

2015-09-17 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 17 September 2015 at 11:47:36 UTC, Bruno Medeiros wrote: On 17/09/2015 08:10, Joakim wrote: Yeah, I was a bit stunned that that is what Bruno took from your post. I don't think anybody would question that writing a C or C++ compiler in the '80s and '90s had value, and I'm sure you

Re: Passing Arguments on in Variadic Functions

2015-09-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 September 2015 at 17:35:18 UTC, jmh530 wrote: I noticed that there's some interesting interplay with this technique and default arguments. Yeah, it expects the V... to consume the rest of the arguments so it doesn't really leave any room for the default arg. I would actually

Re: Creating a DLL with a ActiveX interface.

2015-09-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 September 2015 at 17:58:49 UTC, Taylor Hillegeist wrote: if anyone knows how to easily convert between the two i would be happy to know. You'll just need to write an adapter... I started a minimal one here: https://github.com/adamdruppe/com/blob/master/comhelpers.d#L123 but

bug? for(int i=0;i<1;) vs while(true)

2015-09-17 Thread ddos via Digitalmars-d-learn
http://pastebin.com/fknwgjtz i tried to call fibers in a loop forever, to multiplex some networking client worker fibers and a listener fiber it seems to work correctly with for(int i=0;i<1;) with while(true) i get: C:\dev\server_client>dub Building server_client ~master configuration

How not to run after a DUB build ?

2015-09-17 Thread BBasile via Digitalmars-d-learn
Each time I execute `dub.exe --build=release` (or any other the build type) DUB tries to run the project after the build. This generates often generates an error when dub process returns (and even if the build is OK) but actually I don't want DUB to run after building. Is there a switch to

[Issue 15081] New: [Vector Extensions]

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15081 Issue ID: 15081 Summary: [Vector Extensions] Product: D Version: D2 Hardware: x86_64 URL: http://dlang.org/ OS: Windows Status: NEW Severity:

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread Jacob Carlborg via Digitalmars-d
On 2015-09-17 18:20, bitwise wrote: dyld_register_image_state_change_handler does not provide a way to unregister the callback either, so I don't see how this helps. The dynamic library holding the callback is pinned. See the implementation of registerImageStateSingleChangeHandler, the first

Re: Operator overloading or alternatives to expression templates

2015-09-17 Thread Timon Gehr via Digitalmars-d
On 09/15/2015 06:53 PM, Andrei Alexandrescu wrote: On 09/14/2015 03:35 PM, Timon Gehr wrote: On 09/14/2015 08:09 PM, Andrei Alexandrescu wrote: On 09/13/2015 10:06 AM, Martin Nowak wrote: ... - language regularization It's surprising to find these "arbitrary" language limitations. The

Re: bug? for(int i=0;i<1;) vs while(true)

2015-09-17 Thread ddos via Digitalmars-d-learn
using DMD32 D Compiler v2.068.0 on windows x64

Re: why are opCmp and opEquals not pure.

2015-09-17 Thread Timon Gehr via Digitalmars-d
On 09/17/2015 09:47 PM, Timon Gehr wrote: Not all reasonable implementation are. implementations

mysql-native: SQL Transaction support?

2015-09-17 Thread salvari via Digitalmars-d-learn
I'm using mysql-native library for massive data load. I've been trying to use transactions to improve performance but it doesn't seem to work. I'm parsing a text input file, the generated sql is about 1 million lines of SQL. By using mysql-native it takes about 4 hours to load data. I've

Re: why are opCmp and opEquals not pure.

2015-09-17 Thread Timon Gehr via Digitalmars-d
On 09/17/2015 08:37 PM, Stefan Koch wrote: Hi, is there any reason why opCmp and opEquals are not pure ? Not all reasonable implementation are. Arguably, the methods shouldn't even be on Object. I would argue it is very counter-intuitive to mutate any state when comparing objects. ...

Re: bug? for(int i=0;i<1;) vs while(true)

2015-09-17 Thread ddos via Digitalmars-d-learn
On Thursday, 17 September 2015 at 19:43:02 UTC, H. S. Teoh wrote: On Thu, Sep 17, 2015 at 07:32:13PM +, ddos via Digitalmars-d-learn wrote: http://pastebin.com/fknwgjtz i tried to call fibers in a loop forever, to multiplex some networking client worker fibers and a listener fiber it

Re: bug? for(int i=0;i<1;) vs while(true)

2015-09-17 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Sep 17, 2015 at 07:32:13PM +, ddos via Digitalmars-d-learn wrote: > http://pastebin.com/fknwgjtz > > i tried to call fibers in a loop forever, to multiplex some networking > client worker fibers and a listener fiber > it seems to work correctly with for(int i=0;i<1;) > > with

Re: FancyPars

2015-09-17 Thread Stefan Koch via Digitalmars-d-announce
On Thursday, 17 September 2015 at 16:55:42 UTC, John Colvin wrote: Assuming you wrote it all, you can license the code in whatever way you want. See http://choosealicense.com for more info. You can even use multiple licenses, or different licenses for different parts of the code. Hmm

Re: bug? for(int i=0;i<1;) vs while(true)

2015-09-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 September 2015 at 19:32:16 UTC, ddos wrote: source\app.d(72): Warning: statement is not reachable What's there? Anything after an endless loop is potentially unreachable and dub treats warnings as errors. With the for loop, the compiler can't be as sure that it is endless

Re: How not to run after a DUB build ?

2015-09-17 Thread BBasile via Digitalmars-d-learn
On Thursday, 17 September 2015 at 19:36:10 UTC, BBasile wrote: Each time I execute `dub.exe --build=release` (or any other the build type) DUB tries to run the project after the build. This generates often generates an error when dub process returns (and even if the build is OK) but actually

Re: bug? for(int i=0;i<1;) vs while(true)

2015-09-17 Thread ddos via Digitalmars-d-learn
On Thursday, 17 September 2015 at 19:35:05 UTC, Adam D. Ruppe wrote: What's there? Anything after an endless loop is potentially unreachable and dub treats warnings as errors. i see, thx

Re: Desperately looking for a work-around to load and unload D shared libraries from C on OSX

2015-09-17 Thread bitwise via Digitalmars-d
On Thursday, 17 September 2015 at 19:20:34 UTC, Jacob Carlborg wrote: On 2015-09-17 18:20, bitwise wrote: dyld_register_image_state_change_handler does not provide a way to unregister the callback either, so I don't see how this helps. The dynamic library holding the callback is pinned. See

[Issue 15081] [Vector Extensions]

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15081 Paul Buis <00peb...@bsu.edu> changed: What|Removed |Added Keywords||rejects-valid --

[Issue 12752] std.algorithm.isPermutation

2015-09-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12752 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/6daa2839860266efa4f9f8b17de5dfbc99b5f1b0 fixed issue 12752

Template Oriented Programming

2015-09-17 Thread Adam via Digitalmars-d-learn
I'm not sure if "Template Oriented Programming" seems to be the way to go in D, but I've got my head mainly stuck around OOP. I'm a bit confused about how to dive into it. With OOP, we create interfaces, which provide a contract that all implementers of the interface have to abide by.

Re: why are opCmp and opEquals not pure.

2015-09-17 Thread H. S. Teoh via Digitalmars-d
On Thu, Sep 17, 2015 at 06:37:04PM +, Stefan Koch via Digitalmars-d wrote: > Hi, > is there any reason why opCmp and opEquals are not pure ? > I would argue it is very counter-intuitive to mutate any state when > comparing objects. [...] The way I understand it, this is a historical accident:

Re: bug? for(int i=0;i<1;) vs while(true)

2015-09-17 Thread Timon Gehr via Digitalmars-d-learn
On 09/17/2015 09:47 PM, ddos wrote: yeah i tried for(;;) and it generates the same warning :) sure, here is the full example, it's not too long anyways ( the example doesn't make much sense tho because socket.accept is blocking :P ) http://pastebin.com/9K0wRRD6 ps: pastebin needs D support :-D

Re: bug? for(int i=0;i<1;) vs while(true)

2015-09-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 September 2015 at 19:47:15 UTC, ddos wrote: yeah i tried for(;;) and it generates the same warning :) sure, here is the full example, it's not too long anyways ( the example doesn't make much sense tho because socket.accept is blocking :P ) http://pastebin.com/9K0wRRD6 Yeah,

  1   2   >