On Tuesday, 1 November 2022 at 23:01:57 UTC, Per Nordlöw wrote:
When is it preferrable to use
```d
struct S { private T t; alias t this; }
```
instead of
```d
struct S { public T t; alias t this; }
```
for any given type `T`?
If the `alias this` needs to work outside the module where `S` is
Something to consider:
dub can be used as a library.
You can add your own logic in main to allow using your build
specification to generate a dub file (either in memory or in file system).
On Tuesday, 1 November 2022 at 23:40:22 UTC, Christian Köstlin
wrote:
Dear dlang-folk,
one of the tools I always return to is rake
(https://ruby.github.io/rake/). For those that do not know it,
its a little like make in the
sense that you describe your build as a graph of tasks with
dependenc
I don't have specific answers to your questions but your goal
sounds similar to Atila's reggae project so it might be good for
you to take a look at:
https://code.dlang.org/packages/reggae
Dear dlang-folk,
one of the tools I always return to is rake
(https://ruby.github.io/rake/). For those that do not know it, its a
little like make in the
sense that you describe your build as a graph of tasks with dependencies
between them, but in contrast to make the definition is written in
When is it preferrable to use
```d
struct S { private T t; alias t this; }
```
instead of
```d
struct S { public T t; alias t this; }
```
for any given type `T`?
On Tuesday, 1 November 2022 at 19:49:47 UTC, mw wrote:
On Tuesday, 1 November 2022 at 18:18:45 UTC, Steven
Schveighoffer wrote:
[...]
Maybe the hunt library author doesn't know. (My code does not
directly use this library, it got pulled in by some other
decencies.)
[...]
Please, if you
On Tuesday, 1 November 2022 at 18:18:45 UTC, Steven Schveighoffer
wrote:
Oh yeah, isDaemon detaches the thread from the GC. Don't do
that unless you know what you are doing.
As discussed on discord, this isn't actually true. All it does is
prevent the thread from being joined before exiting
On Tuesday, 1 November 2022 at 18:18:45 UTC, Steven Schveighoffer
wrote:
And I just noticed, one of the thread trace points to here:
https://github.com/huntlabs/hunt/blob/master/source/hunt/util/DateTime.d#L430
```
class DateTime {
shared static this() {
...
dateThread.isDaemon
On Tuesday, 1 November 2022 at 18:18:45 UTC, Steven Schveighoffer
wrote:
Oh yeah, isDaemon detaches the thread from the GC. Don't do
that unless you know what you are doing.
As discussed on discord, this isn't true actually. All it does is
prevent the thread from being joined before exiting
On 11/1/22 1:47 PM, mw wrote:
Can you show a code snippet that includes the parallel foreach?
(It's just a very straight forward foreach on an array; as I said it may
not be relevant.)
And I just noticed, one of the thread trace points to here:
https://github.com/huntlabs/hunt/blob/master/
Can you show a code snippet that includes the parallel foreach?
(It's just a very straight forward foreach on an array; as I said
it may not be relevant.)
And I just noticed, one of the thread trace points to here:
https://github.com/huntlabs/hunt/blob/master/source/hunt/util/DateTime.d#L43
On Tue, Nov 01, 2022 at 10:37:57AM -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 11/1/22 10:27, H. S. Teoh wrote:
>
> > Maybe try running Digger to reduce the code for you?
>
> Did you mean dustmite, which is accessible as 'dub dustmite
> ' but I haven't used it.
Oh yes, sorry, I meant
On 11/1/22 10:27, H. S. Teoh wrote:
> Maybe try running Digger to reduce the code for you?
Did you mean dustmite, which is accessible as 'dub dustmite
' but I haven't used it.
My guess for the segmentation fault is that the OP is executing
destructor code that assumes some members are alive.
On Tue, Nov 01, 2022 at 05:19:56PM +, mw via Digitalmars-d-learn wrote:
> My program received signal SIGSEGV, Segmentation fault.
>
> Its simplified structure looks like this:
>
> ```
> void foo() {
> ...
> writeln("done"); // saw this got printed!
> }
>
> int main() {
> foo();
> re
My program received signal SIGSEGV, Segmentation fault.
Its simplified structure looks like this:
```
void foo() {
...
writeln("done"); // saw this got printed!
}
int main() {
foo();
return 0;
}
```
So, just before the program exit, it failed. I suspect druntime
has a thread (maybe
This reminds me of an issue i reported last year...
https://issues.dlang.org/show_bug.cgi?id=22583
On 11/1/22 11:40 AM, Keivan Shah wrote:
Hello,
Today I came across a strange bug while using D with `dmd`. I have still
not been able to figure out under what conditions does it happen but it
seems to be a DMD related bug to me. Here is a reproducible snippet of
the code
```D
import std;
a
On Tuesday, 1 November 2022 at 15:49:54 UTC, Keivan Shah wrote:
On Tuesday, 1 November 2022 at 15:42:43 UTC, Imperatorn wrote:
On Tuesday, 1 November 2022 at 15:40:04 UTC, Keivan Shah wrote:
Hello,
Today I came across a strange bug while using D with `dmd`. I
have still not been able to figur
On Tuesday, 1 November 2022 at 16:06:44 UTC, Imperatorn wrote:
Hehe.
One simple thing you could do is to create a struct instead for
you params and pass that
Yeah, can do, thanks for the suggestion. But anyways still want
to see if anyone else has seen this issue, or has a clue about
what
The linker used on Windows when installing DMD is pretty much
decided on how your PC was setup.
- If you had Visual Studio installed on your windows for "Desktop
Development with C++" before downloading DMD (from the site and
setup), you will pretty have MSVC Linker as a default.
- If you inst
On Tuesday, 1 November 2022 at 15:49:54 UTC, Keivan Shah wrote:
On Tuesday, 1 November 2022 at 15:42:43 UTC, Imperatorn wrote:
On Tuesday, 1 November 2022 at 15:40:04 UTC, Keivan Shah wrote:
[...]
Could be there's some restriction in DMD on number of
arguments.
May I ask if this was just a
On Monday, 31 October 2022 at 20:31:11 UTC, ryuukk_ wrote:
On Monday, 31 October 2022 at 20:20:49 UTC, WhatMeWorry wrote:
I've got a pretty straightforward SDL dub file
dependency "bindbc-opengl"version="~>1.0.3"
versions "GL_46"
dependency "bindbc-glfw" version="~>1.0.1"
versions "GLFW
On Tuesday, 1 November 2022 at 15:42:43 UTC, Imperatorn wrote:
On Tuesday, 1 November 2022 at 15:40:04 UTC, Keivan Shah wrote:
Hello,
Today I came across a strange bug while using D with `dmd`. I
have still not been able to figure out under what conditions
does it happen but it seems to be a
On Tuesday, 1 November 2022 at 15:40:04 UTC, Keivan Shah wrote:
Hello,
Today I came across a strange bug while using D with `dmd`. I
have still not been able to figure out under what conditions
does it happen but it seems to be a DMD related bug to me. Here
is a reproducible snippet of the co
Hello,
Today I came across a strange bug while using D with `dmd`. I
have still not been able to figure out under what conditions does
it happen but it seems to be a DMD related bug to me. Here is a
reproducible snippet of the code
```D
import std;
alias DG = void delegate();
class TType
{
26 matches
Mail list logo