On 04/22/2014 11:45 AM, monarch_dodra wrote:
Reduce returns the seed. It's actually doing something more like this:
int[1] foo()
{
int[1] sum
sum = sum[]; //The lambda operates, and the
//result is assigned back to the seed.
return sum; //Returns the
module test;
public interface I
{
void foo();
void foo(int);
}
public abstract class A : I
{
public void bar()
{
foo();
}
public void foo(int i)
{
}
}
public class C : A
{
public void foo()
{
}
public void bar2()
{
foo(1);
I want to be able to write to the stdin stream of an external
process using std.process. I have the following small test app.
myecho.d
--
import std.stdio;
void main(string[] args)
{
foreach (line; stdin.byLine()) {
On Saturday, 26 April 2014 at 06:24:26 UTC, Ali Çehreli wrote:
On 04/22/2014 11:45 AM, monarch_dodra wrote:
Reduce returns the seed. It's actually doing something more
like this:
int[1] foo()
{
int[1] sum
sum = sum[]; //The lambda operates, and the
//result is
AES_set_decrypt_key is needed before AES_decrypt.
AES_set_decrypt_key(chunk.ptr, 128, wctx);
On Sat, 26 Apr 2014 06:55:38 +
Domain via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
module test;
public interface I
{
void foo();
void foo(int);
}
public abstract class A : I
{
public void bar()
{
foo();
}
public
On Saturday, 26 April 2014 at 08:45:59 UTC, Craig Dillabaugh
wrote:
I want to be able to write to the stdin stream of an external
process using std.process. I have the following small test app.
myecho.d
--
import std.stdio;
On Saturday, 26 April 2014 at 08:45:59 UTC, Craig Dillabaugh
wrote:
Can anyone tell me what I am dong wrong.
In this case, I'd close the pipe when you're done.
pipes.stdin().writeln(Hello world);
pipes.stdin.close;
myecho loops on stdin until it receives everything; until the
pipe
On 4/26/14, Jonathan M Davis via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
No. That's expected.
I wonder whether a better diagnostic could help. But then again, maybe
the hiding would be intentional and the diagnostic would be
spurious/invalid. Not sure..
On Saturday, 26 April 2014 at 13:30:41 UTC, Adam D. Ruppe wrote:
On Saturday, 26 April 2014 at 08:45:59 UTC, Craig Dillabaugh
wrote:
Can anyone tell me what I am dong wrong.
In this case, I'd close the pipe when you're done.
pipes.stdin().writeln(Hello world);
pipes.stdin.close;
On Friday, 25 April 2014 at 19:06:33 UTC, brad clawsie wrote:
My code compiles and fails silently.
How do you want it to fail? C code doesn't throw exceptions.
Is it possible to write a library that is callable from C without
the enduser even knowing it was written in D? That is, can a C
programmer use the library as though it were written in C
straightforwardly? Or for that matter, by an enduser programming
in Python or Lua where the library is
I'd like to use GLFW from Deimos, but I couldn't get it to work
(DMD said it cannot use libglfw.a) and I've read somewhere that
only GDC can use these DLLs directly (with a D header, but that's
still better than hooking the methods). So do I need GDC for that
or not? And would you actually
It is possible to write a D library useable from C. However, we may not
be able to hide the fact that the library has been written in D.
You must first export some D function you want to use from C, using
extern (C) declaration.
Then declare them in your C program or headers.
You will also
Hello, i'am experiencing some non consistent behavior with static
constructors. I wonder if this is some bug or i just don't know
enough of D (most probably!).. Code example bellow:
//--
module main;
import std.stdio;
class B
{
static this()
Btw, i only tested this using v2.065.0 of DMD.
Cheers,
On 04/26/2014 08:18 PM, Entry wrote:
I'd like to use GLFW from Deimos, but I couldn't get it to work (DMD
said it cannot use libglfw.a) and I've read somewhere that only GDC can
use these DLLs directly (with a D header, but that's still better than
hooking the methods). So do I need GDC for that
On Friday, 25 April 2014 at 08:20:37 UTC, Jeremy DeHaan wrote:
On Friday, 25 April 2014 at 04:23:45 UTC, Ali Çehreli wrote:
On 04/24/2014 08:32 PM, Jeremy DeHaan wrote:
added the -cov switch to my unit test build
Then you must execute the program. :)
Ali
I did, but still nothing. I even
I am trying to create a class that can do the following:
---
int sample = 42;
// myObj is an instance of the class I'm writing
myObj.attach (othername, sample);
myObj.set (othername, 69);
writeln (myObj.get (othername), \t, sample); // should
produce '69 69'
---
Currently, my class
On 04/26/2014 01:11 PM, Jeremy DeHaan wrote:
If you compile with -cov
AND use -of where the output file is in a different directory than where
the build is taking place(eg, buld happens in C:/DProject/, and the
command line has -ofC:/DProject/Unittest/Unittest.exe), no .lst files
are
On 04/26/2014 04:08 PM, Matt wrote:
I am trying to create a class that can do the following:
---
int sample = 42;
// myObj is an instance of the class I'm writing
myObj.attach (othername, sample);
myObj.set (othername, 69);
writeln (myObj.get (othername), \t, sample); // should produce '69
So I have this procedure:
extern (C) void signal_proc(int sn) @system nothrow
Which can call this:
shutdown_system() @system nothrow
Problem I have is inside shutdown_system() I have code that
can't
possibly be @nothrow because their are a lot of subsystems to
shutdown.
What I've done for
On 4/27/2014 3:18 AM, Entry wrote:
I'd like to use GLFW from Deimos, but I couldn't get it to work (DMD
said it cannot use libglfw.a) and I've read somewhere that only GDC can
use these DLLs directly (with a D header, but that's still better than
hooking the methods). So do I need GDC for that
On 04/26/2014 06:39 PM, Damian Day wrote:
Problem I have is inside shutdown_system() I have code that can't
possibly be @nothrow because their are a lot of subsystems to shutdown.
You can wrap the contents of shutdown_system() with a try-catch block
and swallow all exceptions that way.
Ali
On Sunday, 27 April 2014 at 01:53:15 UTC, Ali Çehreli wrote:
On 04/26/2014 06:39 PM, Damian Day wrote:
Problem I have is inside shutdown_system() I have code that
can't
possibly be @nothrow because their are a lot of subsystems to
shutdown.
You can wrap the contents of shutdown_system() with
On 04/26/2014 12:10 PM, spec wrote:
Hello, i'am experiencing some non consistent behavior with static
constructors. I wonder if this is some bug or i just don't know enough
of D (most probably!).. Code example bellow:
//--
module main;
import
On 04/26/2014 11:27 AM, Rémy Mouëza wrote:
You will also have to declare 2 function for initializing and
terminating D's runtime:
char rt_init(long long);
char rt_term(long long);
call rt_init(0) before using your D functions (this will initialize D
runtime - the D GC amongst
On Sunday, 27 April 2014 at 00:37:39 UTC, Ali Çehreli wrote:
So, under Linux, if I start the program as test/wont then the
.lst gets generated in the current directory.
Ali
Just tried that in Windows, and the same thing happened. Weird!
I'll be sure to file a bug report. Thanks for the
On Sunday, 27 April 2014 at 02:15:59 UTC, Ali Çehreli wrote:
And if those functions are called from the library's own
initialization and deinitialization functions, the C program
need not know anything about the D runtime dependence:
void mylib_init() {
rt_init(0);
// ... other
29 matches
Mail list logo