The following declarations now give a deprecation warning:
```d
struct ErrorInfo {
private:
char[32] _error;
char[96] _message;
public @nogc nothrow @property:
/**
Returns the string "Missing Symbol" to indicate a symbol
load failure, and
the name of a library to in
On Saturday, 30 May 2020 at 07:00:07 UTC, Mike Parker wrote:
I find it rather annoying, as I'm returning `const(char)*` and
not `char*`, but it is what it is. My question is, if I add
`return` to the function declarations, will this compile all
the way back to DMD 2.067 *without* `-preview=dip
On Saturday, 30 May 2020 at 07:00:07 UTC, Mike Parker wrote:
The following declarations now give a deprecation warning:
```d
struct ErrorInfo {
private:
char[32] _error;
char[96] _message;
public @nogc nothrow @property:
/**
Returns the string "Missing Symbol" to indicate a
On Saturday, 30 May 2020 at 07:30:17 UTC, Max Samukha wrote:
On Saturday, 30 May 2020 at 07:00:07 UTC, Mike Parker wrote:
https://run.dlang.io/is/aOZqww
Since 2.067.1: Success and no output
Thanks! I forgot that run.dlang.io supports all those old
compilers.
On Saturday, 30 May 2020 at 00:12:20 UTC, kookman wrote:
On Friday, 29 May 2020 at 11:45:24 UTC, Andre Pany wrote:
André
I do it by defining a configuration “build-deps” in my dub.sdl
with target type “none” and then doing the build as two steps
in the dockerfile:
``` dockerfile
...
WORKDI
On Saturday, 30 May 2020 at 07:30:17 UTC, Max Samukha wrote:
On Saturday, 30 May 2020 at 07:00:07 UTC, Mike Parker wrote:
https://run.dlang.io/is/aOZqww
Since 2.067.1: Success and no output
Thanks, Max (and you, too, Seb). I had forgotten that
run.dlang.io supports compilers going so f
On 5/30/20 3:00 AM, Mike Parker wrote:
The following declarations now give a deprecation warning:
```d
struct ErrorInfo {
private:
char[32] _error;
char[96] _message;
public @nogc nothrow @property:
/**
Returns the string "Missing Symbol" to indicate a symbol load
failu
On Thursday, 25 April 2019 at 10:33:00 UTC, Vladimirs Nordholm
wrote:
Hello.
Is there a current "Best Practices" for logging in D?
For the actual logging, I know of `std.experimental.logger`.
However, the `experimental` has kept me away from it.
Is it good, or are there any better alternativ
On Monday, 29 April 2019 at 16:02:25 UTC, Arun Chandrasekaran
wrote:
std.experimental.logger is perfectly thread safe. However
printing the logging thread ID is still pending with this PR
https://github.com/dlang/phobos/pull/6978
Also is any file logger thread safe?
On Saturday, 30 May 2020 at 18:17:21 UTC, mw wrote:
On Thursday, 25 April 2019 at 10:33:00 UTC, Vladimirs Nordholm
wrote:
Hello.
Is there a current "Best Practices" for logging in D?
For the actual logging, I know of `std.experimental.logger`.
However, the `experimental` has kept me away from
I want to generate a new symbol (new variable name) from existing
one: e.g. in C:
$ cat t.c
#define f(x) _##x
int main() {
int f(x) = 3;
return _x;
}
$ make t
cc t.c -o t
$ ./t
$ echo $?
3
I w
On Saturday, 30 May 2020 at 22:06:30 UTC, mw wrote:
I want to generate a new symbol (new variable name) from
existing one: e.g. in C:
$ cat t.c
#define f(x) _##x
int main() {
int f(x) = 3;
return _x;
}
$ make t
cc t.c -o t
$ ./t
$ echo $
Using a mixin:
string f(string x) { return "_" ~ x; }
int main() {
mixin("int "~f("x")~" = 3;");
return _x;
}
On Saturday, 30 May 2020 at 22:21:14 UTC, Paul Backus wrote:
enum f(string x) = "_" ~ x;
int main() {
mixin("int ", f!"x", " = 3;");
return _x;
}
This uses a templated [1] manifest constant [2] to generate the
variable name at compile time, and a mixin statement [3] to
insert the definiti
On Saturday, 30 May 2020 at 23:39:31 UTC, mw wrote:
On Saturday, 30 May 2020 at 22:21:14 UTC, Paul Backus wrote:
[...]
Thank you all for the reply.
I hate to write boilerplate code:
[...]
import std.stdio : writeln;
mixin template f(T, string name, T value = T.init)
{
mixin("T _" ~ n
On Saturday, 30 May 2020 at 23:39:31 UTC, mw wrote:
Thank you all for the reply.
I hate to write boilerplate code:
class Point {
private int _x;
publicint x() {return _x;}
public Point x(int v) {_x=v; return this;}
...
// ... y, z
}
this is what I've got:
$ cat b.d
-
I am encountering a strange problem with the GC on a specific
platform:
at the first attempt to clear the current memory pool to make
room for a new allocation, the GC considers that the page in
which the main thread resides (the one created in the init
function of the GC) can be freed.. theref
On Saturday, 30 May 2020 at 16:14:34 UTC, Steven Schveighoffer
wrote:
This is not about const or not, it's about lifetime management.
For example, this would return a pointer to a stack frame that
is about to go away:
const(char)* foo()
{
ErrorInfo info;
return info.message;
}
I kno
On Sunday, 31 May 2020 at 00:46:09 UTC, Paul Backus wrote:
You can simplify this considerably using a mixin template [1]:
---
mixin template RW(T, string name) {
private T var;
public T get() { return var; }
public typeof(this) set(T val) { var = val; return this; }
mixin("priva
19 matches
Mail list logo