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 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: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*
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
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
...
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
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
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
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
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
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
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
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
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 _" ~
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;
}
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..
18 matches
Mail list logo