Re: Deploying Vibe.d applications to OpenShift

2014-07-23 Thread Rikki Cattermole via Digitalmars-d-learn
On 24/07/2014 2:48 p.m., Rutger wrote: On Thursday, 24 July 2014 at 01:47:43 UTC, Rikki Cattermole wrote: On 24/07/2014 1:28 p.m., Rutger wrote: Hello! Really enjoying D so far and have started to toy around with Vibe.d. I was just wondering if someone here has had any experience with publishin

Re: Deploying Vibe.d applications to OpenShift

2014-07-23 Thread Rutger via Digitalmars-d-learn
On Thursday, 24 July 2014 at 01:47:43 UTC, Rikki Cattermole wrote: On 24/07/2014 1:28 p.m., Rutger wrote: Hello! Really enjoying D so far and have started to toy around with Vibe.d. I was just wondering if someone here has had any experience with publishing vibe applications on the OpenShift P

Re: Deploying Vibe.d applications to OpenShift

2014-07-23 Thread Rikki Cattermole via Digitalmars-d-learn
On 24/07/2014 1:28 p.m., Rutger wrote: Hello! Really enjoying D so far and have started to toy around with Vibe.d. I was just wondering if someone here has had any experience with publishing vibe applications on the OpenShift Paas? (https://www.openshift.com) Please let me know how you did it, b

Deploying Vibe.d applications to OpenShift

2014-07-23 Thread Rutger via Digitalmars-d-learn
Hello! Really enjoying D so far and have started to toy around with Vibe.d. I was just wondering if someone here has had any experience with publishing vibe applications on the OpenShift Paas? (https://www.openshift.com) Please let me know how you did it, because I know it's possible with the DIY

Re: Compile-Time Interfaces (Concepts)

2014-07-23 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jul 23, 2014 at 05:09:54PM +, Bossfong via Digitalmars-d-learn wrote: > On Wednesday, 23 July 2014 at 15:28:34 UTC, H. S. Teoh via > Digitalmars-d-learn wrote: > >On Wed, Jul 23, 2014 at 04:46:20PM +0200, bossfong via Digitalmars-d-learn > >wrote: [...] > >>Still, maybe compiler errors

Re: Compile-Time Interfaces (Concepts)

2014-07-23 Thread Bossfong via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 15:28:34 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Wed, Jul 23, 2014 at 04:46:20PM +0200, bossfong via Digitalmars-d-learn wrote: Am 23.07.2014 16:27, schrieb H. S. Teoh via Digitalmars-d-learn: > >We could, though it's not quite the same as a native concep

Re: Grabing C(++) stdout

2014-07-23 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 15:30:53 UTC, Chris wrote: Redirect it from stdout to somewhere else. It might be writing to stderr instead of stdout... does anything change if you reopen stderr too?

Re: Grabing C(++) stdout

2014-07-23 Thread FreeSlave via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 15:35:59 UTC, Chris wrote: The C++ code does this: size_t fwrite ( const void * ptr, size_t size, size_t count, FILE * stream ); // stream is stdout and text appears in the console (a string). I don't how to grab the text that is written to console. I might hav

Re: Grabing C(++) stdout

2014-07-23 Thread Martijn Pot via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 15:35:59 UTC, Chris wrote: The C++ code does this: size_t fwrite ( const void * ptr, size_t size, size_t count, FILE * stream ); // stream is stdout and text appears in the console (a string). I don't how to grab the text that is written to console. I might hav

Re: Grabing C(++) stdout

2014-07-23 Thread Chris via Digitalmars-d-learn
The C++ code does this: size_t fwrite ( const void * ptr, size_t size, size_t count, FILE * stream ); // stream is stdout and text appears in the console (a string). I don't how to grab the text that is written to console. I might have to redirect it from within the C++ code.

Re: Grabing C(++) stdout

2014-07-23 Thread Chris via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 15:27:23 UTC, John Colvin wrote: On Wednesday, 23 July 2014 at 15:22:41 UTC, Chris wrote: On Wednesday, 23 July 2014 at 15:12:13 UTC, John Colvin wrote: On Wednesday, 23 July 2014 at 14:53:35 UTC, Chris wrote: Short question: how can I grab the stdout written to by

Re: Grabing C(++) stdout

2014-07-23 Thread FreeSlave via Digitalmars-d-learn
It's still unclear. What exactly do you mean my grabbing? Please provide some minimal example where the problem occurs.

Re: Grabing C(++) stdout

2014-07-23 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 15:22:41 UTC, Chris wrote: On Wednesday, 23 July 2014 at 15:12:13 UTC, John Colvin wrote: On Wednesday, 23 July 2014 at 14:53:35 UTC, Chris wrote: Short question: how can I grab the stdout written to by C(++), i.e. C code: fwrite(...); std.cstream will be repla

Re: Compile-Time Interfaces (Concepts)

2014-07-23 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jul 23, 2014 at 04:46:20PM +0200, bossfong via Digitalmars-d-learn wrote: > Am 23.07.2014 16:27, schrieb H. S. Teoh via Digitalmars-d-learn: > > > >We could, though it's not quite the same as a native concepts > >implementation where the compiler can check templates for code that > >wrongl

Re: Grabing C(++) stdout

2014-07-23 Thread Chris via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 15:12:13 UTC, John Colvin wrote: On Wednesday, 23 July 2014 at 14:53:35 UTC, Chris wrote: Short question: how can I grab the stdout written to by C(++), i.e. C code: fwrite(...); std.cstream will be replaced sooner or later. I don't think I understand the ques

Re: Grabing C(++) stdout

2014-07-23 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 14:53:35 UTC, Chris wrote: Short question: how can I grab the stdout written to by C(++), i.e. If it is another program, try this: http://dlang.org/phobos/std_process.html#pipeProcess If you want to grab something written by another part of your same program...

Re: Grabing C(++) stdout

2014-07-23 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 23 July 2014 at 14:53:35 UTC, Chris wrote: Short question: how can I grab the stdout written to by C(++), i.e. C code: fwrite(...); std.cstream will be replaced sooner or later. I don't think I understand the question. stdout is the same file handle, doesn't matter whether th

Grabing C(++) stdout

2014-07-23 Thread Chris via Digitalmars-d-learn
Short question: how can I grab the stdout written to by C(++), i.e. C code: fwrite(...); std.cstream will be replaced sooner or later.

Re: Compile-Time Interfaces (Concepts)

2014-07-23 Thread bossfong via Digitalmars-d-learn
Am 23.07.2014 16:27, schrieb H. S. Teoh via Digitalmars-d-learn: We could, though it's not quite the same as a native concepts implementation where the compiler can check templates for code that wrongly makes assumptions about the incoming type that aren't defined by the concept. T true. St

Re: Compile-Time Interfaces (Concepts)

2014-07-23 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jul 23, 2014 at 04:21:16PM +0200, bossfong via Digitalmars-d-learn wrote: > Could we possibly have a template like the following: > > satisfiesInterface!(T, Interface); > > that would return true when T satisfies Interface and otherwise gives > descriptive error messages via __pragma(err

Re: Compile-Time Interfaces (Concepts)

2014-07-23 Thread bossfong via Digitalmars-d-learn
Could we possibly have a template like the following: satisfiesInterface!(T, Interface); that would return true when T satisfies Interface and otherwise gives descriptive error messages via __pragma(error, ...) ? Then isInputRange could simply use satisfiesInterface under the hood and user c

Re: fork/waitpid and std.concurrency.spawn

2014-07-23 Thread Puming via Digitalmars-d-learn
OK, I understand your point :-) On Wednesday, 23 July 2014 at 09:05:49 UTC, FreeSlave wrote: Seems like you need inter process communication. There are many ways to make one. For example, through sockets. You may use D bindings to ZMQ or other library, or just use std.socket. Anyway the proces

Re: fork/waitpid and std.concurrency.spawn

2014-07-23 Thread FreeSlave via Digitalmars-d-learn
And there is also Pipe communication in std.process.

Re: fork/waitpid and std.concurrency.spawn

2014-07-23 Thread FreeSlave via Digitalmars-d-learn
Seems like you need inter process communication. There are many ways to make one. For example, through sockets. You may use D bindings to ZMQ or other library, or just use std.socket. Anyway the process will be represented by the whole program, not just one function as in case of thread.

Re: fork/waitpid and std.concurrency.spawn

2014-07-23 Thread Puming via Digitalmars-d-learn
OK, I see your point. I didn't know much about windows, so didn't know that fork in windows was so different from posix. This looks reasonable. What I really want is a actor modal similar to std.concurrency, with a similar API and spawn/send/replay semantics, but using processes instead of th