On Thursday, 16 September 2021 at 20:53:34 UTC, Elmar wrote:
Hello D community.
I was browsing the `__traits` keywords and I found `isFuture`
whose descriptions says something about `@future`-annotated
variables.
[link](https://dlang.org/spec/traits.html#isFuture)
I didn't find anything
On 17.09.21 11:44, Chris Katko wrote:
bool is_colliding_with(drawable_object_t obj) //was a class member
{
[...]
alias x2 = obj.x;
alias y2 = obj.y;
alias w2 = obj.w;
alias h2 = obj.h;
[...]
}
Those aliases don't work like you want them to. You can't have
I'm debugging some code I wrote back in 2017 and a bounding box
collision detection kept giving spurious answers till I resorted
to assuming nothing and dumped every variable and alias.
I kept getting results like it was checking against itself, and
of course, that would result in finding a
On Friday, 17 September 2021 at 09:44:53 UTC, Chris Katko wrote:
I'm debugging some code I wrote back in 2017 and a bounding box
collision detection kept giving spurious answers till I
resorted to assuming nothing and dumped every variable and
alias.
I kept getting results like it was
I have now this function, as a private member in a Class :
double calculate_lineLength( int i) {
field.rawData [] * rd; // ignore
the details, this works;
rd = cast (field.rawData [] *) dataSet; // ignore
the details, this works;
On Friday, 17 September 2021 at 06:27:40 UTC, frame wrote:
Thanks, I'm just careful with casting.
Does it really allocate from a literal if it's used on the
stack only? Is `-vgc` switch reliable?
looks to me like it calls
```d
// object
private U[] _dup(T, U)(scope T[] a) pure nothrow
On Friday, 17 September 2021 at 06:58:01 UTC, jfondren wrote:
On Friday, 17 September 2021 at 06:27:40 UTC, frame wrote:
Thanks, I'm just careful with casting.
Does it really allocate from a literal if it's used on the
stack only? Is `-vgc` switch reliable?
looks to me like it calls
...
On Thursday, 16 September 2021 at 18:02:44 UTC, Steven
Schveighoffer wrote:
Are you sure? Be very pedantic about what C functions do with
the data you send it. Sometimes they store it somewhere to use
later. Sometimes they expect it to be allocated by the C heap,
etc.
Without seeing how
On Wednesday, 15 September 2021 at 19:59:43 UTC, james.p.leblanc
wrote:
However, with various combinations of templates, UDAs, and
mixins it has not been easy.
Apart from -mixin, there's also the undocumented -vcg-ast switch
that prints the AST before code generation, showing instantiated
On Thursday, 16 September 2021 at 04:54:21 UTC, james.p.leblanc
wrote:
Thank you for your kind response. Wow, at first the large
output file
from a small test program was a bit surprising .., but actually
it is
manageable to dig through to find the interesting bits.
So, this is quite useful!
On Friday, 17 September 2021 at 11:10:33 UTC, seany wrote:
Compile with `dub build --compiler=ldc2 `. this should enable
array bound checking options.
By default, yes. run `dub -v build --compiler=ldc2` to see the
exact commands that dub runs.
But should it not be caught by range error
On Friday, 17 September 2021 at 11:10:33 UTC, seany wrote:
I have now this function, as a private member in a Class :
} catch (RangeError er) {
I can't remember if you can catch an index OOB error but try
`catch (Throwable er)` will work if it is catchable at all and
you can
On 9/17/21 2:27 AM, frame wrote:
On Thursday, 16 September 2021 at 18:02:44 UTC, Steven Schveighoffer wrote:
Are you sure? Be very pedantic about what C functions do with the data
you send it. Sometimes they store it somewhere to use later. Sometimes
they expect it to be allocated by the C
On Friday, 17 September 2021 at 10:31:34 UTC, bauss wrote:
On Thursday, 16 September 2021 at 20:53:34 UTC, Elmar wrote:
Hello D community.
I was browsing the `__traits` keywords and I found `isFuture`
whose descriptions says something about `@future`-annotated
variables.
14 matches
Mail list logo