On Monday, 25 November 2019 at 03:07:08 UTC, Fanda Vacek wrote:
Maybe I'm missing the thing, but I'm not able to declare local
ref variable even if simple workaround exists. Is this
preferred design pattern?
```
int main()
{
int a = 1;
//ref int b = a; // Error: variable
Maybe I'm missing the thing, but I'm not able to declare local
ref variable even if simple workaround exists. Is this preferred
design pattern?
```
int main()
{
int a = 1;
//ref int b = a; // Error: variable `tst_ref.main.b` only
parameters or `foreach` declarations can be `ref`
On Sunday, 24 November 2019 at 14:21:48 UTC, Adam D. Ruppe wrote:
On Sunday, 24 November 2019 at 14:19:23 UTC, Per Nordlöw wrote:
Why doesn't DIP-1000 include such escape analysis?
did you enable it with the command line switch?
furthermore i *think* it onyl works o @safe stuff, not @trusted
On 11/24/19 10:34 AM, Jacob Carlborg wrote:
On 2019-11-18 01:20, Steven Schveighoffer wrote:
I'm fighting some out of memory problems using DMD and some
super-template heavy code.
I have ideas on how to improve the situation, but it involves
redesigning a large portion of the design. I want
On 11/24/19 10:44 AM, aliak wrote:
I'm writing some command line tooling stuff, and one of the command
spins up a docker compose file (which in short, spins up some services
and aggregates the output of each service to stdout).
When a user presses ctrl+c, i would like to pass on the ctrl+c to
On 11/24/19 10:36 AM, aliak wrote:
On Saturday, 23 November 2019 at 12:19:27 UTC, Steven Schveighoffer wrote:
On 11/23/19 4:54 AM, aliak wrote:
Is there a way to go about killing a process after spawning it on a
SIGINT?
I can't do this for e.g. because kill is not @nogc.
Pid
On Sunday, 24 November 2019 at 15:44:00 UTC, aliak wrote:
I'm writing some command line tooling stuff, and one of the
command spins up a docker compose file (which in short, spins
up some services and aggregates the output of each service to
stdout).
When a user presses ctrl+c, i would like
I'm writing some command line tooling stuff, and one of the
command spins up a docker compose file (which in short, spins up
some services and aggregates the output of each service to
stdout).
When a user presses ctrl+c, i would like to pass on the ctrl+c to
the spawned process and wait till
On Saturday, 23 November 2019 at 12:19:27 UTC, Steven
Schveighoffer wrote:
On 11/23/19 4:54 AM, aliak wrote:
Is there a way to go about killing a process after spawning it
on a SIGINT?
I can't do this for e.g. because kill is not @nogc.
Pid currentSpawnedPid;
extern(C) void
On 2019-11-18 01:20, Steven Schveighoffer wrote:
I'm fighting some out of memory problems using DMD and some
super-template heavy code.
I have ideas on how to improve the situation, but it involves
redesigning a large portion of the design. I want to do it
incrementally, but I need to see
On Saturday, 23 November 2019 at 10:09:51 UTC, mipri wrote:
On Saturday, 23 November 2019 at 09:54:48 UTC, aliak wrote:
Is there a way to go about killing a process after spawning it
on a SIGINT?
I can't do this for e.g. because kill is not @nogc.
Well, this works:
import std;
import
On Sunday, 24 November 2019 at 14:19:23 UTC, Per Nordlöw wrote:
Why doesn't DIP-1000 include such escape analysis?
did you enable it with the command line switch?
furthermore i *think* it onyl works o @safe stuff, not @trusted
stuff.
On Sunday, 24 November 2019 at 12:51:53 UTC, rikki cattermole
wrote:
"Allocates a class object right inside the current scope,
therefore avoiding the overhead of new. This facility is
unsafe; it is the responsibility of the user to not escape a
reference to the object outside the scope."
"Allocates a class object right inside the current scope, therefore
avoiding the overhead of new. This facility is unsafe; it is the
responsibility of the user to not escape a reference to the object
outside the scope."
https://dlang.org/phobos/std_typecons.html#.scoped
Why doesn't DMD detect invalid out-of-scope references to scoped
class instances?
Example:
@safe:
class C
{
@safe pure:
this()
{
}
int x;
}
@trusted unittest
{
C f()
{
import std.typecons : scoped;
auto x = scoped!C();
return x;
}
auto
15 matches
Mail list logo