Re: D / GtkD for SQL Server

2013-10-22 Thread John Joyus
On 10/21/2013 07:27 PM, Adam D. Ruppe wrote: On Monday, 21 October 2013 at 22:23:16 UTC, John Joyus wrote: 1. When I click the OK button, the message dialog pops-up *after* the main window is closed, though the window.close(); line is after the call to the MessageBox.. that's because the

Re: Help with concurrency - traversing a DAG

2013-10-22 Thread tbttfox
On Friday, 18 October 2013 at 19:47:37 UTC, qznc wrote: Create a task for each node without a parent. Let the tasks create new tasks for their children. I was finally able to try this out, but I'm having a problem. My test case right now is a simple linked list, and what I think happens is

Re: Cannot alias expression

2013-10-22 Thread Timon Gehr
On 10/21/2013 02:58 PM, John Colvin wrote: I suspect I'm being very dumb here, but I can't get my head around this: template B(alias A) { alias B = A; } template C(A ...) { alias C = A[0]; } static assert(B!1 == 1); //fine static assert(C!1 ==

Error: unsupported char 0x03

2013-10-22 Thread Agustin
Trying to use mixin, i get an unsupported char error. protected template GenMessageGetId(uint id) { immutable string GenMessageGetId = public immutable(int) getId() const { \n ~ id ~ ; \n}; } public mixin template Packet(uint id, T...) { ... private static string

Re: Error: unsupported char 0x03

2013-10-22 Thread Agustin
On Tuesday, 22 October 2013 at 15:01:20 UTC, Agustin wrote: Trying to use mixin, i get an unsupported char error. protected template GenMessageGetId(uint id) { immutable string GenMessageGetId = public immutable(int) getId() const { \n ~ id ~ ; \n}; } public mixin template

Re: Error: unsupported char 0x03

2013-10-22 Thread Adam D. Ruppe
On Tuesday, 22 October 2013 at 15:01:20 UTC, Agustin wrote: = public immutable(int) getId() const { \n ~ id ~ ; \n}; You'll probably want to convert id to a string there import std.conv; public immutable(int) getId() const { \n ~ to!string(id) ~ ; and also put in return for that

Re: Error: unsupported char 0x03

2013-10-22 Thread Agustin
On Tuesday, 22 October 2013 at 15:05:16 UTC, Adam D. Ruppe wrote: On Tuesday, 22 October 2013 at 15:01:20 UTC, Agustin wrote: = public immutable(int) getId() const { \n ~ id ~ ; \n}; You'll probably want to convert id to a string there import std.conv; public immutable(int) getId()

Re: Error: unsupported char 0x03

2013-10-22 Thread John Colvin
On Tuesday, 22 October 2013 at 15:01:20 UTC, Agustin wrote: Trying to use mixin, i get an unsupported char error. protected template GenMessageGetId(uint id) { immutable string GenMessageGetId = public immutable(int) getId() const { \n ~ id ~ ; \n}; } public mixin template

Re: Error: unsupported char 0x03

2013-10-22 Thread bearophile
John Colvin: do you perhaps want to!string(id) ??? Or: id.text Bye, bearophile

Re: Error: unsupported char 0x03

2013-10-22 Thread Agustin
On Tuesday, 22 October 2013 at 15:16:17 UTC, bearophile wrote: John Colvin: do you perhaps want to!string(id) ??? Or: id.text Bye, bearophile I like id.text better than to!string, thanks

Re: Error: unsupported char 0x03

2013-10-22 Thread Ali Çehreli
On 10/22/2013 08:56 AM, Agustin wrote: On Tuesday, 22 October 2013 at 15:16:17 UTC, bearophile wrote: John Colvin: do you perhaps want to!string(id) ??? Or: id.text Bye, bearophile I like id.text better than to!string, thanks Me too but the following looks nice too:

Re: Spawning a pty in D

2013-10-22 Thread Colin Grogan
On Thursday, 17 October 2013 at 14:12:36 UTC, Adam D. Ruppe wrote: On Thursday, 17 October 2013 at 13:53:39 UTC, Colin Grogan wrote: Anyone have any experience with this? I actually have been writing a terminal emulator for the last few weeks https://github.com/adamdruppe/terminal-emulator

extern template instantiation

2013-10-22 Thread Mathias LANG
Hi everyone, This is going to be a silly question. I have the following files: -- heavy.d -- import std.regex; enum r = ctRegex!(r^(\w+)\s+([a-zA-Z0-9/]+)\?a=(\w+)b=(\w+)c=(\w+)([\D+=\w+)]*)y=([0-9A-Fa-z]+)z=([0-9A-Fa-z]+)$); -- main.d -- import heavy; void main() {} -- test.d -- import

Re: Spawning a pty in D

2013-10-22 Thread Adam D. Ruppe
looking at the comments: //pragma(lib, util); // pragma does not work for me at moment. TODO: FIND OUT WHY! If you are using gdc, and I think ldc too, that pragma is unsupported since it doesn't fit well into the gcc code - there's no easy way to pass linker flags from the D frontend to

Building derelict

2013-10-22 Thread bioinfornatics
Hi, That is now some time where i am not try to buld derelict3, Currently my build fail with: derelict/pq/types.d(117): Error: struct derelict.pq.types.PGconn unknown size derelict/pq/types.d(117): Error: struct derelict.pq.types.PGconn no size yet for forward reference Someone know what

front evaluated multiple time with joiner depending on where extra arg given

2013-10-22 Thread Timothee Cour
Does that make sense? feature or bug? void main(){ import std.algorithm; import std.array; { int counter=0; auto b=[1,2,3].map!(a={counter++; return [a];}()).joiner([0]).array; assert(counter==3); } { int counter=0; auto b=[1,2,3].map!(a={counter++; return

Re: Building derelict

2013-10-22 Thread David Nadlinger
On Tuesday, 22 October 2013 at 22:24:36 UTC, bioinfornatics wrote: derelict/pq/types.d(117): Error: struct derelict.pq.types.PGconn unknown size derelict/pq/types.d(117): Error: struct derelict.pq.types.PGconn no size yet for forward reference That's with LDC, right? We definitely need to

Re: front evaluated multiple time with joiner depending on where extra arg given

2013-10-22 Thread bearophile
Timothee Cour: auto b=[1,2,3].map!(a={counter++; return [a];}()).joiner([0]).array; Currently there are some problems inside some of the higher order functions of Phobos. So as general rule don't put impure code inside the functions (usually lambdas) you pass to the higher order

Re: front evaluated multiple time with joiner depending on where extra arg given

2013-10-22 Thread Jonathan M Davis
On Wednesday, October 23, 2013 02:21:55 bearophile wrote: Timothee Cour: auto b=[1,2,3].map!(a={counter++; return [a];}()).joiner([0]).array; Currently there are some problems inside some of the higher order functions of Phobos. So as general rule don't put impure code inside the

Re: Building derelict

2013-10-22 Thread bioinfornatics
On Tuesday, 22 October 2013 at 23:46:03 UTC, David Nadlinger wrote: On Tuesday, 22 October 2013 at 22:24:36 UTC, bioinfornatics wrote: derelict/pq/types.d(117): Error: struct derelict.pq.types.PGconn unknown size derelict/pq/types.d(117): Error: struct derelict.pq.types.PGconn no size yet for

Re: front evaluated multiple time with joiner depending on where extra arg given

2013-10-22 Thread Jonathan M Davis
On Tuesday, October 22, 2013 19:54:18 Timothee Cour wrote: Certainly, I'd argue that it's generally better practice to do the work in popFront, because front does frequently gets called multiple times, and you almost always end up calling front if you call popFront. Actually, the way

Re: Building derelict

2013-10-22 Thread Mike Parker
On Wednesday, 23 October 2013 at 00:59:28 UTC, bioinfornatics wrote: and i see like you that is a alias to a function i do not use this syntay usually so i am not able to understand what is the problem. I'm not on my dev box right now, but I took a look at the source at github and