On Sunday, 11 October 2020 at 20:58:22 UTC, drathier wrote:
I think I'm using way to much memory for pointers, so I'd like
to see how much of my memory usage is taken up by pointers.
I've calculated the answer, but I wonder if the
compiler/runtime could do it for me, to get a faster and more
e
I think I'm using way to much memory for pointers, so I'd like to
see how much of my memory usage is taken up by pointers. I've
calculated the answer, but I wonder if the compiler/runtime could
do it for me, to get a faster and more exact number?
On Wednesday, 23 September 2020 at 20:58:00 UTC, Imperatorn wrote:
On Wednesday, 23 September 2020 at 20:54:51 UTC, Imperatorn
wrote:
On Wednesday, 23 September 2020 at 20:44:51 UTC, Ali Çehreli
wrote:
On 9/23/20 1:19 PM, Imperatorn wrote:
> [...]
send a
> [...]
with timeout.
[...]
Sorry, I
On Tuesday, 22 September 2020 at 21:55:51 UTC, Imperatorn wrote:
On Tuesday, 22 September 2020 at 09:32:13 UTC, drathier wrote:
What's the obvious way to put a timeout around a function
call? I'm thinking a 5 or 30 second timeout, and I'm expecting
it to pretty much never time out.
You have s
What's the obvious way to put a timeout around a function call?
I'm thinking a 5 or 30 second timeout, and I'm expecting it to
pretty much never time out.
What's the proper way to exit with a specific exit code?
I found a bunch of old threads discussing this, making sure
destructors run and the runtime terminates properly, all of which
seemingly concluding that it's sad that there isn't a way to do
this easily, but hopefully things have changed
Replaced all mentions of uint64_t with ulong, and now it works.
Must have an enum called uint64_t defined somewhere in a library
I depend on or something? Really wish this was clearer.
On Tuesday, 4 August 2020 at 17:37:56 UTC, drathier wrote:
```
std.conv.ConvException@/usr/local/opt/dmd/include/dlang/dmd/std/conv.d(2054):
Value (1596) does not match any member value of enum '__c_ulonglong'
```
well,
```
std.conv.ConvException@/usr/local/opt/dmd/include/dlang/dmd/std/conv.d(
```
std.conv.ConvException@/usr/local/opt/dmd/include/dlang/dmd/std/conv.d(2054):
Value (1596) does not match any member value of enum '__c_ulonglong'
```
well,
```
std.conv.ConvException@/usr/local/opt/dmd/include/dlang/dmd/std/conv.d(2054):
Value (42) does not match any member value of enum '
I'm getting a crash when I'm converting a double to an uint64_t.
```
std.conv.ConvException@/usr/local/opt/dmd/include/dlang/dmd/std/conv.d(2054):
Value (1596) does not match any member value of enum '__c_ulonglong'
```
I've narrowed down the code to this:
```
static import std.conv;
double thi
On Sunday, 28 June 2020 at 10:44:26 UTC, drathier wrote:
Is there a release schedule anywhere for DMD? Any list of tasks
to be the next release? I'm only finding 5+ year old things
when searching.
Yes: https://dlang.org/changelog/release-schedule.html
Is there a release schedule anywhere for DMD? Any list of tasks
to be the next release? I'm only finding 5+ year old things when
searching.
On Friday, 26 June 2020 at 15:10:07 UTC, Adam D. Ruppe wrote:
On Friday, 26 June 2020 at 14:12:00 UTC, drathier wrote:
I'm trying to get this to compile, without much luck:
You might be able to make it a function:
bool foo()
{
auto fn(A)()
{
A delegate(A) fn;
fn = del
I'm trying to get this to compile, without much luck:
```
bool foo()
{
template fn(A)
{
A delegate(A) fn;
fn = delegate A(A a)
{
return fn(a);
};
}
return fn!(bool)(true);
}
```
What am I missing here? How can I define a recursive dele
How can I tell the compiler that I will never create a value of
type X, while still being able to write code that uses it? Using
void as a template parameter is where I started, but I still need
to be able to declare variables inside this unreachable function,
like `T foo;` even when `T == void
On Wednesday, 3 June 2020 at 09:03:22 UTC, drathier wrote:
I'm generating some code. Some of the generated types need to
be overridden, so I define them manually at the top of the
generated file. Then I need to guard against redefining the
identifier (type/value/function) later on, in the gener
On Wednesday, 3 June 2020 at 17:02:35 UTC, H. S. Teoh wrote:
On Wed, Jun 03, 2020 at 09:36:52AM +, drathier via
Digitalmars-d-learn wrote:
I'm wondering if there's a place that lists things which are
slower/faster to compile? DMD is pretty famed for compiling
quickly, but I
On Wednesday, 3 June 2020 at 09:36:52 UTC, drathier wrote:
Currently at ~1ksloc/s of d input without optimizing anything,
which corresponds to 350ksloc/s if measuring by `-vcg-ast`
output instead of d source input, while using the same time
measurement from before, so the flag doesn't cost time
I'm wondering if there's a place that lists things which are
slower/faster to compile? DMD is pretty famed for compiling
quickly, but I'm not seeing particularly high speed at all, and I
want to fix that.
Currently at ~1ksloc/s of d input without optimizing anything,
which corresponds to 350k
I'm generating some code. Some of the generated types need to be
overridden, so I define them manually at the top of the generated
file. Then I need to guard against redefining the identifier
(type/value/function) later on, in the generated code.
I'm currently using `static if (!__traits(compi
On Sunday, 23 February 2020 at 14:36:56 UTC, Johan Engelen wrote:
It's not clear from the language specification, but in this
case with templates, I am not surprised that the order of
execution is not the same as in the source file. Probably it
does fit with the order in the source file if you
On Sunday, 23 February 2020 at 11:41:25 UTC, Johan Engelen wrote:
On Sunday, 23 February 2020 at 09:59:45 UTC, drathier wrote:
I'm having some trouble with the order in which `static
this()` runs. This is the order defined in the source file,
numbered for convenience:
To avoid confusion: you
Well, like this, rather:
```
template none(msg) {
T!(msg) none;
static this() {
logInfo("static this 4 cmd none [template:%s]", typeid(msg));
none = ((std.functional.toDelegate(&batch!(msg)
)))(X!(T!(msg) ));
logInfo("static this 4 cmd none [templ
On Saturday, 22 February 2020 at 17:44:52 UTC, Stefan Koch wrote:
no. -vcg-ast runs directly before codegen.
All ast-rewriteing has already happend at that point.
The reason it contains the template declarations is because
they are still in the ast.
There is no point in removing them.
Thanks,
I'm having some trouble with the order in which `static this()`
runs. This is the order defined in the source file, numbered for
convenience:
```
logInfo("static this 1 initialModel");
logInfo("static this 1 initialModel done");
logInfo("static this 2 array branchfactor");
logInfo("static this 2
On Saturday, 22 February 2020 at 11:53:38 UTC, Dennis wrote:
On Saturday, 22 February 2020 at 11:26:19 UTC, Per Nordlöw
wrote:
Is there a dmd flag that shows the code after template
instantiations has been performed?
The -vcg-ast flag does that.
The d.cg files still contain templates, so it
26 matches
Mail list logo