On Sunday, 11 December 2022 at 07:47:35 UTC, Salih Dincer wrote:
..
Thank you for your reply. I think if you take `random` values
frequently, you'd better use `'array'`,am I right?
On Sunday, 11 December 2022 at 04:36:45 UTC, thebluepandabear
wrote:
"The main reason for this limitation is the fact that a
function taking a ref
parameter can hold on to that reference for later use, at a
time when the rvalue
would not be available."
I only know that `rvalue` is a tempo
I have this (very simplified) code:
```d
void foo(alias callback)()
{
callback!5;
}
static void print(int i)() { writeln(i); }
foo!print;
```
Is there a way to merge two last lines into one of a form like
`foo!(...something...)`?
Note that callback parameter must be compile-time parameter
On Sunday, 11 December 2022 at 09:43:34 UTC, Andrey Zherikov
wrote:
Note that callback parameter must be compile-time parameter as
it represents a member of a type during introspection done by
`foo`.
I can't quite understand the question, this already works:
```d
void foo(alias callback)()
{
I don't know how to do much of anything on Android, but if you
can post a small Java code example, I can suggest how to use it
from D. You can bind many classes through the jni.
The biggest limitation is you can't do callbacks or subclasses
through android jni, so it is kinda limited for inter
On 12/11/22 05:54, Salih Dincer wrote:
> On Sunday, 11 December 2022 at 09:43:34 UTC, Andrey Zherikov wrote:
>> Note that callback parameter must be compile-time parameter as it
>> represents a member of a type during introspection done by `foo`.
>
> I can't quite understand the question, this alr
On 12/11/22 01:25, zjh wrote:
> On Sunday, 11 December 2022 at 04:36:45 UTC, thebluepandabear wrote:
>
>> "The main reason for this limitation is the fact that a function
>> taking a ref
>> parameter can hold on to that reference for later use, at a time when
>> the rvalue
>> would not be availabl
On Saturday, 10 December 2022 at 05:46:26 UTC, thebluepandabear
wrote:
In most languages there is some sort of `List` type, is that
the same for D?
There is: https://dlang.org/phobos/std_container_dlist.html
Why is it called ``DList`` and not just ``List``, i have no clue
On Sunday, 11 December 2022 at 04:36:45 UTC, thebluepandabear
wrote:
Hello,
I am not really understanding why rvalues cannot be passed to a
'ref' parameter, the explanation in the book about D I am
reading was not clear:
"The main reason for this limitation is the fact that a
function takin
On Sunday, 11 December 2022 at 16:24:30 UTC, Ali Çehreli wrote:
On 12/11/22 05:54, Salih Dincer wrote:
> On Sunday, 11 December 2022 at 09:43:34 UTC, Andrey Zherikov
wrote:
>> Note that callback parameter must be compile-time parameter
as it
>> represents a member of a type during introspection d
On Sunday, 11 December 2022 at 14:24:18 UTC, Adam D Ruppe wrote:
I don't know how to do much of anything on Android, but if you
can post a small Java code example, I can suggest how to use it
from D. You can bind many classes through the jni.
The biggest limitation is you can't do callbacks or
On Monday, 12 December 2022 at 01:19:23 UTC, jni wrote:
The boilerplate is easy but Then the other part is a
problem for me is the necessary other Java classes. They are
not part of the NDK so the only way to load the jar is to use
jni? Is that correct?
I haven't updated this for a while,
On Sunday, 11 December 2022 at 16:48:57 UTC, Ali Çehreli wrote:
However, the situation has changed in D: It has been possible
to pass rvalues by reference through the magic of 'in'
parameters. This currently requires the -preview=in compiler
switch, which makes 'in' parameters imply 'const sco
On Sunday, 11 December 2022 at 06:50:44 UTC, Joel wrote:
I've been trying to fill in areas with a colour but can't work
it out. I want something like the effect where it fills with
diamonds. Not all at once but building up in the main program
loop.
# #
# #
#
On Sunday, 11 December 2022 at 06:50:44 UTC, Joel wrote:
I've been trying to fill in areas with a colour but can't work
it out. I want something like the effect where it fills with
diamonds. Not all at once but building up in the main program
loop.
I'm not sure if I understood the question co
On Sunday, 11 December 2022 at 06:50:44 UTC, Joel wrote:
I've been trying to fill in areas with a colour but can't work
it out. I want something like the effect where it fills with
diamonds. Not all at once but building up in the main program
loop.
# #
# #
#
On Monday, 12 December 2022 at 06:02:27 UTC, Ferhat Kurtulmuş
wrote:
https://rosettacode.org/wiki/Bitmap/Flood_fill
The https://rosettacode.org/wiki/Bitmap/Flood_fill#D looks like a
DFS implementation. The end result is the same, but the order in
which the pixels to fill are reached is differ
17 matches
Mail list logo