Re: Getting the missing Windows functions

2013-10-08 Thread Mike Parker
On 10/8/2013 6:57 AM, Andrej Mitrovic wrote: On 10/7/13, Matt webwra...@fastmail.fm wrote: The missing functions (or at least the one I'm interested in at the moment) that I'm trying to use are supposed to be IN kernel32, and have been in there since Windows Vista. That's why I'm a little

Re: Getting the missing Windows functions

2013-10-08 Thread dnewbie
On Tuesday, 8 October 2013 at 08:54:44 UTC, Mike Parker wrote: On 10/8/2013 6:57 AM, Andrej Mitrovic wrote: On 10/7/13, Matt webwra...@fastmail.fm wrote: The missing functions (or at least the one I'm interested in at the moment) that I'm trying to use are supposed to be IN kernel32, and have

Re: std.parallelism amap not scaling?

2013-10-08 Thread JR
On Monday, 7 October 2013 at 21:13:53 UTC, safety0ff wrote: I think I've found the culprit: Memory managment / GC, disabling the GC caused the program to eat up all my memory. I'll have to look into this later. From what I've gathered from

Get all functions

2013-10-08 Thread Andrea Fontana
I have a number of functions like: @MyUda(...) void test(); And I want to check them (at compile time, of course) to generate the right calls. Is there a way to get a list of them? Using traits/reflection?

auto attribute for interface functions

2013-10-08 Thread Roman
``` interface I { //auto foo(int i); //forbidden auto bar(T)(T i); //Error: function a.I.bar!(int).bar has no function body with return type inference } class A:I { int foo(int i) { return i; } T bar(T)(T i) {

Re: Get all functions

2013-10-08 Thread Dicebot
On Tuesday, 8 October 2013 at 12:45:48 UTC, Andrea Fontana wrote: I have a number of functions like: @MyUda(...) void test(); And I want to check them (at compile time, of course) to generate the right calls. Is there a way to get a list of them? Using traits/reflection? In specific

Re: Get all functions

2013-10-08 Thread Andrea Fontana
Oh, I didn't realize that allMembers works for modules too :) On Tuesday, 8 October 2013 at 14:00:51 UTC, Dicebot wrote: On Tuesday, 8 October 2013 at 13:45:42 UTC, Dicebot wrote: On Tuesday, 8 October 2013 at 12:45:48 UTC, Andrea Fontana wrote: I have a number of functions like: @MyUda(...)

Re: Get all functions

2013-10-08 Thread Dicebot
On Tuesday, 8 October 2013 at 14:09:49 UTC, Andrea Fontana wrote: Oh, I didn't realize that allMembers works for modules too :) Yeah it is often overlooked but you can use module symbol in most contexts you would use any other normal symbol. It is only special in a sense that it lacks type

template instance testA.FormatParser!(F) forward reference of variable F

2013-10-08 Thread ref2401
Everything works fine until 'put' method in 'testB' module is uncommented. With that code I'm getting error saying 'template instance testA.FormatParser!(F) forward reference of variable F.'. What does it mean and why is this happening ( to me:)) ]? module testA; // -- class

Re: auto attribute for interface functions

2013-10-08 Thread Roman
On Tuesday, 8 October 2013 at 13:40:47 UTC, Roman wrote: ``` interface I { //auto foo(int i); //forbidden auto bar(T)(T i); //Error: function a.I.bar!(int).bar has no function body with return type inference } class A:I { int foo(int i) { return i;

potential deadlock spawning process

2013-10-08 Thread Daniel Davidson
This simple script calls out to find (on a Mac). For me this works. If I increase the output by changing maxdepth to 3 it hangs forever. When I run the same find from the shell it is fine. What could cause a deadlock in this and what is a workaround? http://pastebin.com/ji8dZwAY Thanks Dan

Re: auto attribute for interface functions

2013-10-08 Thread Jonathan M Davis
On Tuesday, October 08, 2013 17:26:04 Roman wrote: Seems, I've tried to use virtual templates manner. But it doesn't realizes in D yet Fundamentally, making templates virtual doesn't really work. If it's possible, it would be quite difficult, and AFAIK, it's impossible. Templated functions

Re: potential deadlock spawning process

2013-10-08 Thread Daniel Davidson
On Tuesday, 8 October 2013 at 16:24:50 UTC, Daniel Davidson wrote: This simple script calls out to find (on a Mac). For me this works. If I increase the output by changing maxdepth to 3 it hangs forever. When I run the same find from the shell it is fine. What could cause a deadlock in this

Re: Creating a virtual stdin/stdout/stderr

2013-10-08 Thread Colin Grogan
On Tuesday, 8 October 2013 at 20:25:42 UTC, Colin Grogan wrote: Hi all, I want to create my own File in memory that I can pipe output to and read it in from another part of the program. I dont want to physically write data to disk, just store it in memory. I've been trawling the

Creating a virtual stdin/stdout/stderr

2013-10-08 Thread Colin Grogan
Hi all, I want to create my own File in memory that I can pipe output to and read it in from another part of the program. I dont want to physically write data to disk, just store it in memory. I've been trawling the documentation for the past while and the closest I can find is

Re: Creating a virtual stdin/stdout/stderr

2013-10-08 Thread Daniel Davidson
On Tuesday, 8 October 2013 at 20:26:49 UTC, Colin Grogan wrote: On Tuesday, 8 October 2013 at 20:25:42 UTC, Colin Grogan wrote: Hi all, I want to create my own File in memory that I can pipe output to and read it in from another part of the program. I dont want to physically write data to

Re: UDA usage

2013-10-08 Thread Matt Soucy
On 10/04/2013 11:50 PM, Matt Soucy wrote: On 10/04/2013 11:04 PM, Adam D. Ruppe wrote: On Saturday, 5 October 2013 at 02:51:21 UTC, Matt Soucy wrote: * Check to see if a specific attribute exists * Check to see if an attribute of a specific type exists, something like: The helper functions

Re: UDA usage

2013-10-08 Thread Adam D. Ruppe
On Tuesday, 8 October 2013 at 20:59:04 UTC, Matt Soucy wrote: Update on this - unfortunately, I discovered that this doesn't seem to work for any members, due to requiring a specific this. I can't quite figure out why though... Try adding static to the helper functions in the templates. I

Re: Creating a virtual stdin/stdout/stderr

2013-10-08 Thread Colin Grogan
On Tuesday, 8 October 2013 at 20:38:56 UTC, Daniel Davidson wrote: On Tuesday, 8 October 2013 at 20:26:49 UTC, Colin Grogan wrote: On Tuesday, 8 October 2013 at 20:25:42 UTC, Colin Grogan wrote: Hi all, I want to create my own File in memory that I can pipe output to and read it in from

Re: mutable, const, immutable guidelines

2013-10-08 Thread qznc
On Wednesday, 2 October 2013 at 13:09:34 UTC, Daniel Davidson wrote: 1. If a variable is never mutated, make it const, not immutable. 2. Make the parameter reference to immutable if that is how you will use it anyway. It is fine to ask a favor from the caller. ... I think guideline 1 should

Re: mutable, const, immutable guidelines

2013-10-08 Thread qznc
On Monday, 7 October 2013 at 17:57:11 UTC, Ali Çehreli wrote: To look at just one usage example, the following line carries two requirements: auto a = T(); immutable b = a; 1) b will be an immutable copy of a. 2) T will always be usable as in that fashion. If T appears on an API, it

Re: std.parallelism amap not scaling?

2013-10-08 Thread safety0ff
On Tuesday, 8 October 2013 at 10:54:08 UTC, JR wrote: On Monday, 7 October 2013 at 21:13:53 UTC, safety0ff wrote: I think I've found the culprit: Memory managment / GC, disabling the GC caused the program to eat up all my memory. I'll have to look into this later. From what I've gathered

Problem Building Phobos

2013-10-08 Thread Meta
DMD and D Runtime build fine, but when I try to build Phobos, I get this error: phobos.lib: Error: multiple definition of ti_Ag: _D12TypeInfo_Axa6__initZ and object_: _D12TypeInfo_Axa6_initZ. If I'm understanding what it's telling me, the modules ti_Ag and object_ are both defining that

Re: mutable, const, immutable guidelines

2013-10-08 Thread Ali Çehreli
On 10/08/2013 03:12 PM, qznc wrote: On Monday, 7 October 2013 at 17:57:11 UTC, Ali Çehreli wrote: To look at just one usage example, the following line carries two requirements: auto a = T(); immutable b = a; 1) b will be an immutable copy of a. 2) T will always be usable as in

Re: mutable, const, immutable guidelines

2013-10-08 Thread Ali Çehreli
On 10/08/2013 03:03 PM, qznc wrote: On Wednesday, 2 October 2013 at 13:09:34 UTC, Daniel Davidson wrote: 1. If a variable is never mutated, make it const, not immutable. 2. Make the parameter reference to immutable if that is how you will use it anyway. It is fine to ask a favor from the

Re: auto attribute for interface functions

2013-10-08 Thread Jesse Phillips
On Tuesday, 8 October 2013 at 13:40:47 UTC, Roman wrote: ``` interface I { //auto foo(int i); //forbidden auto bar(T)(T i); //Error: function a.I.bar!(int).bar has no function body with return type inference } Basically the error on the template answers your statement, bar has no