On Friday, 14 October 2022 at 19:06:12 UTC, rassoc wrote:
On 10/14/22 20:45, mw via Digitalmars-d-learn wrote:
Any suggestions?
There's `dmd -profile=gc` or `dub build --build=profile-gc`.
Thanks. I eventually use valgrind --tool=massif, and found the
problem was in a underlying C library d
On Saturday, 15 October 2022 at 00:31:47 UTC, Iain Buclaw wrote:
```
auto funcptr (alias method) ()
{
return &method;
}
:
fun = funcptr!bar;
:
```
Which works but neither dmd nor gdc were able to optimize the
additional function call away.
pragma(inline, true)
auto funcpt
On Friday, 14 October 2022 at 22:17:52 UTC, H. S. Teoh wrote:
Given that this particular trap crops up regularly, perhaps
some sort of warning ought to be added. Once the @nodiscard DIP
is accepted & implemented this should be easy to do.
Seems like you're behind the times! The DIP was acce
On Friday, 14 October 2022 at 21:51:54 UTC, WhatMeWorry wrote:
I lost about a half an hour troubleshooting some code of mine
which as it turned out to be resolved with just one line.
// paths.remove(i); // compiles fine but does nothing
paths = paths.remove(i); // works - what I erroneou
On Friday, 14 October 2022 at 18:34:58 UTC, kdevel wrote:
dmd and gdc optimize the lambda invocations away. Nonetheless
the expression looks somewhat too big. To overcome this I tried
to generate the function pointer outside of the struct:
```
auto funcptr (alias method) ()
{
return &method
On Fri, Oct 14, 2022 at 09:51:54PM +, WhatMeWorry via Digitalmars-d-learn
wrote:
>
> I lost about a half an hour troubleshooting some code of mine which as it
> turned out to be resolved with just one line.
>
>
> // paths.remove(i); // compiles fine but does nothing
>
> paths = paths.rem
I lost about a half an hour troubleshooting some code of mine
which as it turned out to be resolved with just one line.
// paths.remove(i); // compiles fine but does nothing
paths = paths.remove(i); // works - what I erroneously thought
the previous line was doing
Is the first line no
On Friday, 14 October 2022 at 18:37:00 UTC, Sergey wrote:
On Friday, 14 October 2022 at 17:41:42 UTC, Yura wrote:
Dear All,
I am very new to D, and it has been a while since I coded in
anything than Python. I am using just notepad along with the
gdc compiler.
At the moment I need to solve t
On 10/14/22 20:45, mw via Digitalmars-d-learn wrote:
Any suggestions?
There's `dmd -profile=gc` or `dub build --build=profile-gc`.
Hi,
With CPU profiler, we can see the accumulated run time of each
function & line, I'm wondering if there is such a profiler for
memory allocation?
The reason I'm asking is because I suspect there are some small
but repetitive memory allocation going on in the libraries (in C
and D) I'm us
On Friday, 14 October 2022 at 17:41:42 UTC, Yura wrote:
Dear All,
I am very new to D, and it has been a while since I coded in
anything than Python. I am using just notepad along with the
gdc compiler.
At the moment I need to solve the system of liner equations:
A00*q0 + A01*q1 + A02*q2 ...
Given a struct `S` with method `foo`: Any of these expressions
```
&foo
&S.foo
&.S.foo
```
when they occur inside the struct they represent a delegate and
not a function pointer. Is it okay to "extract" and use the
function pointer from the delegate in this way:
```
struct S {
void
On Friday, 14 October 2022 at 17:41:42 UTC, Yura wrote:
Dear All,
I am very new to D, and it has been a while since I coded in
anything than Python. I am using just notepad along with the
gdc compiler.
[...]
Did not try it, but the example for the function luSolve at the
lubeck documentat
On Friday, 14 October 2022 at 17:41:42 UTC, Yura wrote:
...
Check out MIR https://github.com/libmir
Dear All,
I am very new to D, and it has been a while since I coded in
anything than Python. I am using just notepad along with the gdc
compiler.
At the moment I need to solve the system of liner equations:
A00*q0 + A01*q1 + A02*q2 ... = -V0
A10*q0 + A11*q1 + A12*q2 ... = -V1
...
I have all
On Friday, 14 October 2022 at 09:00:11 UTC, Patrick Schluter
wrote:
On Thursday, 13 October 2022 at 19:27:22 UTC, Steven
Schveighoffer wrote:
On 10/13/22 3:00 PM, Sergey wrote:
[...]
It doesn't look really that far off. You can't expect floating
point parsing to be exact, as floating point d
On Thursday, 13 October 2022 at 19:27:22 UTC, Steven
Schveighoffer wrote:
On 10/13/22 3:00 PM, Sergey wrote:
[...]
It doesn't look really that far off. You can't expect floating
point parsing to be exact, as floating point does not perfectly
represent decimal numbers, especially when you get
17 matches
Mail list logo