Re: Where are declared and how to make build these c identifiers?

2019-02-23 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sat, Feb 23, 2019 at 09:53:09PM -0300, Cleverson Casarin Uliana via Digitalmars-d-learn wrote: > OK, do I need to install the entire arsd package? I've saved the terminal.d > file on an arsd directory I've just created inside the import directory, but > trying to build it gives me lots of undef

Re: Where are declared and how to make build these c identifiers?

2019-02-23 Thread Cleverson Casarin Uliana via Digitalmars-d-learn
Hi Adam, many thanks for all informations. To answer your questions: Em 23/02/2019 20:08, Adam D. Ruppe via Digitalmars-d-learn escreveu: I would suggest using different functions... like my terminal.d library which has similar api (see

Re: Odd behavior of darray.dup

2019-02-23 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 23 February 2019 at 19:21:10 UTC, Bastiaan Veelo wrote: It works for me: https://run.dlang.io/gist/473b0021487275751accaebeb00be05c -- Bastiaan Still no luck, not even with memcpy. There's even more mystery as I printed out the original static immutable array's content, which i

Re: Where are declared and how to make build these c identifiers?

2019-02-23 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 23 February 2019 at 21:10:19 UTC, Cleverson Casarin Uliana wrote: However, I'd like to know how all these functions really work, so I'd like to know where they are declared and/or defined. Those functions are extensions from the Digital Mars C runtime library (inspired by somethin

Re: template alias argument accepts only class/interface types.

2019-02-23 Thread ag0aep6g via Digitalmars-d-learn
On 23.02.19 23:30, Alexandru Ermicioi wrote: According to https://dlang.org/spec/template.html#TemplateAliasParameter, simple types and arrays are excluded from the list of supported "alias X" arguments. I'm wondering why do we have such limitation? Is there any reasoning at limiting primitive

template alias argument accepts only class/interface types.

2019-02-23 Thread Alexandru Ermicioi via Digitalmars-d-learn
Perhaps I missed somewhere, but it seems that you can pass only classes or interfaces to alias argument of a template. Trying to pass another type (such as int, int[]) yields an error. Example of issue: void test(alias T)(int o) { import std.stdio; writeln("coo"

Re: Process Information

2019-02-23 Thread Cym13 via Digitalmars-d-learn
On Saturday, 23 February 2019 at 20:49:49 UTC, r-const-dev wrote: Is there a way to get information about the current process? Memory usage, CPU usage, PID. The PID is easy, from std.process it's a standard function call away: https://dlang.org/phobos/std_process.html#.thisProcessID I don't

Where are declared and how to make build these c identifiers?

2019-02-23 Thread Cleverson Casarin Uliana via Digitalmars-d-learn
Hi all, I'm revisiting D after some years. I'd like to test a code snipped from RosettaCode, which is suposed to check a key press, as follows: extern (C) { void _STI_conio(); void _STD_conio(); int kbhit(); int getch(); } void main() { _STI_conio(); char c; if (kbhi

Process Information

2019-02-23 Thread r-const-dev via Digitalmars-d-learn
Is there a way to get information about the current process? Memory usage, CPU usage, PID.

Re: Odd behavior of darray.dup

2019-02-23 Thread Bastiaan Veelo via Digitalmars-d-learn
On Friday, 22 February 2019 at 11:36:35 UTC, solidstate1991 wrote: If I want to copy an array of structs with .dup (cannot post the link in question here at the moment due to non-working clipboard, it's Color from pixelperfectengine.graphics.common) I get all zeroes instead of the values from t

Re: Has anyone tried making a QtCreator plugin for D and what is your experience?

2019-02-23 Thread Mirjam Akkersdijk via Digitalmars-d-learn
On Tuesday, 15 January 2019 at 21:51:57 UTC, Laurent Tréguier wrote: On Saturday, 12 January 2019 at 20:10:40 UTC, Enjoys Math wrote: On Saturday, 12 January 2019 at 16:09:22 UTC, Laurent Tréguier wrote: On Saturday, 12 January 2019 at 15:16:25 UTC, Laurent Tréguier wrote: QtCreator 4.8.0 intro