Re: miscellaneous array questions...

2020-07-20 Thread Ali Çehreli via Digitalmars-d-learn
On 7/20/20 8:16 PM, a...@a.com wrote: >> 3) Lastly, In the following code snippet, is arrayA and arrayB both >> allocated on the stack? arrayA is allocated on thread-local storage and lives as long as the program is active. I guess a final interaction with it can be in a 'static ~this()' or a

Re: miscellaneous array questions...

2020-07-20 Thread a--- via Digitalmars-d-learn
On Monday, 20 July 2020 at 22:05:35 UTC, WhatMeWorry wrote: 1) The D Language Reference says: "There are four kinds of arrays..." with the first example being "type* Pointers to data" and "int* p; etc. At the risk of sounding overly nitpicky, isn't a pointer to an integer simply a pointe

Re: How Install and Configure DCD (D Completion Daemon) on Sublime Text?

2020-07-20 Thread aberba via Digitalmars-d-learn
On Monday, 20 July 2020 at 18:08:02 UTC, Marcone wrote: How Install and Configure DCD (D Completion Daemon) on Sublime Text? I need auto complete for the Dlang in Sublime Text. Recently tried sublime myself for D since its quite lightweight compared to VS code for when I need to write somethi

Re: std.process - avoid interaction with parent shell

2020-07-20 Thread FreeSlave via Digitalmars-d-learn
On Monday, 20 July 2020 at 20:55:52 UTC, Steven Schveighoffer wrote: I don't want any user interaction. Occasionally, I get a repository that no longer exists (404). Then git comes up and asks for a username/password. I want it to just fail. Apparently git has no option to be non-interactive,

miscellaneous array questions...

2020-07-20 Thread WhatMeWorry via Digitalmars-d-learn
1) The D Language Reference says: "There are four kinds of arrays..." with the first example being "type* Pointers to data" and "int* p; etc. At the risk of sounding overly nitpicky, isn't a pointer to an integer simply a pointer to an integer? How does that pertain to an array? 2) "

Re: std.process - avoid interaction with parent shell

2020-07-20 Thread Vladimir Panteleev via Digitalmars-d-learn
On Monday, 20 July 2020 at 20:55:52 UTC, Steven Schveighoffer wrote: I tried redirecting /dev/null to stdin when executing my application (and I assumed that would pass onto the process child), but it still asks. What am I doing wrong? Generically, I think you want to detach the program from t

Re: How spand array for use with functions arguments like tuple?

2020-07-20 Thread Paul Backus via Digitalmars-d-learn
On Monday, 20 July 2020 at 17:59:06 UTC, Marcone wrote: On Sunday, 19 July 2020 at 23:05:45 UTC, Marcone wrote: How spand array for use with functions arguments like tuple? expand* If the array is a compile-time constant, you can use aliasSeqOf [1]. Otherwise, you can't. [1] http://dpldoc

Re: std.process - avoid interaction with parent shell

2020-07-20 Thread Paul Backus via Digitalmars-d-learn
On Monday, 20 July 2020 at 21:44:31 UTC, Steven Schveighoffer wrote: I think you might be right. I don't know how it's accessing my terminal, but clearly it can keep doing so even without any handles open. Probably /dev/tty

Re: std.process - avoid interaction with parent shell

2020-07-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/20/20 5:24 PM, H. S. Teoh wrote: On Mon, Jul 20, 2020 at 04:55:52PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: I am doing some scripting via D, and using std.process.execute to git clone things. I don't want any user interaction. Occasionally, I get a repository that no lo

Re: std.process - avoid interaction with parent shell

2020-07-20 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 20, 2020 at 04:55:52PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: > I am doing some scripting via D, and using std.process.execute to git > clone things. > > I don't want any user interaction. Occasionally, I get a repository > that no longer exists (404). Then git com

std.process - avoid interaction with parent shell

2020-07-20 Thread Steven Schveighoffer via Digitalmars-d-learn
I am doing some scripting via D, and using std.process.execute to git clone things. I don't want any user interaction. Occasionally, I get a repository that no longer exists (404). Then git comes up and asks for a username/password. I want it to just fail. Apparently git has no option to be n

Re: What would be the advantage of using D to port some games?

2020-07-20 Thread Laurent Tréguier via Digitalmars-d-learn
On Monday, 20 July 2020 at 19:49:52 UTC, RegeleIONESCU wrote: Hello! I was wondering why some game related packages/libraries are not being developed anymore or are kind of paused. Fore example the last version of derelict-sdl2 is an alpha from May 2018. Lack of people to develop it, to take

Re: What would be the advantage of using D to port some games?

2020-07-20 Thread RegeleIONESCU via Digitalmars-d-learn
On Wednesday, 24 June 2020 at 21:14:35 UTC, matheus wrote: On Wednesday, 24 June 2020 at 19:46:55 UTC, IGotD- wrote: . Hello! I was wondering why some game related packages/libraries are not being developed anymore or are kind of paused. Fore example the last version of derelict-sdl2 is an

Accurately serializing and deserializing a SysTime in binary format

2020-07-20 Thread Ecstatic Coder via Digitalmars-d-learn
I'm currently implementing a small open source backup tool (dub), and therefore I need to accurately store the file modification SysTime in binary format, so that I can later load this SysTime from the snapshot file to compare it with the current file modification SysTime. Having unfortunatel

How Install and Configure DCD (D Completion Daemon) on Sublime Text?

2020-07-20 Thread Marcone via Digitalmars-d-learn
How Install and Configure DCD (D Completion Daemon) on Sublime Text? I need auto complete for the Dlang in Sublime Text.

Re: How spand array for use with functions arguments like tuple?

2020-07-20 Thread Marcone via Digitalmars-d-learn
On Sunday, 19 July 2020 at 23:05:45 UTC, Marcone wrote: How spand array for use with functions arguments like tuple? expand*

Re: alias restriction??!

2020-07-20 Thread Carl Sturtivant via Digitalmars-d-learn
On Monday, 20 July 2020 at 17:24:56 UTC, Carl Sturtivant wrote: Well perhaps you do parse a "constant-offset expression" i.e. syntactically dotted with constant indexes, like name1.name2[constant].name3 and then later there's a semantic check that the "constant-offset expression" involves no i

Re: alias restriction??!

2020-07-20 Thread Carl Sturtivant via Digitalmars-d-learn
On Sunday, 19 July 2020 at 20:46:19 UTC, Steven Schveighoffer wrote: On 7/19/20 4:21 PM, Carl Sturtivant wrote: Perhaps what's needed is something more that is less than allowing aliases for expressions in the wide sense you suggest here. I agree. Something not yet mentioned is that aliases

Re: Is there a compiler option to list all functions executed at compile time when compiling a file?

2020-07-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 20 July 2020 at 16:01:53 UTC, blizzard wrote: I am trying to learn D and knowing when code is run at compile time would be good for learning what functions can be used without thinking much about performance. No function is ever run at compile time unless you specifically request i

Is there a compiler option to list all functions executed at compile time when compiling a file?

2020-07-20 Thread blizzard via Digitalmars-d-learn
I am trying to learn D and knowing when code is run at compile time would be good for learning what functions can be used without thinking much about performance.

Re: Garbage collection

2020-07-20 Thread James Gray via Digitalmars-d-learn
On Tuesday, 30 June 2020 at 06:16:26 UTC, Kagamin wrote: On Saturday, 27 June 2020 at 14:49:34 UTC, James Gray wrote: I have produced something which essentially reproduces my problem. What is the problem? Do you have a leak or you want to know how GC works? I have managed to resolve my pro

Re: Ada-Style Modulo Integer Types

2020-07-20 Thread Per Nordlöw via Digitalmars-d-learn
On Friday, 22 April 2016 at 19:52:46 UTC, Nordlöw wrote: On Friday, 22 April 2016 at 17:37:44 UTC, Nordlöw wrote: Have anybody implement Ada-style modulo types https://en.wikibooks.org/wiki/Ada_Programming/Types/mod Here's my first try https://github.com/nordlow/phobos-next/blob/master/src/m