On Saturday, 8 June 2024 at 02:22:00 UTC, Xiaochao Yan wrote:
Hi, I am new to D and is experimenting with game development
using D and C.
I had some problem when trying to recreate the
https://dlang.org/spec/importc.html
[...]
Thanks in advance!
on a recent compiler this should work:
```d
On Saturday, 8 June 2024 at 03:36:05 UTC, bachmeier wrote:
For Mint, I'd use the .deb and let it handle that stuff. For
LDC, I have a bash alias for ldmd2 that points to the ldmd2
binary. Of course there are multiple ways to handle this, but I
don't understand the point of the install script, s
On Friday, 7 June 2024 at 13:43:29 UTC, Salih Dincer wrote:
SDB@79
I have only one question: Is there a modInverse() function in
the standard library for use in RSA?
Apparently not, it fell to lot :)
I already had such a function...
```d
auto modInverse(T)(T m, T n) pure
{
T q, ilk = n;
I managed to create a random number generator using the following
code:
~~~
auto rng = Random(42);
//
uniform(0,10,rng);
~~~
Now I want to seed the generator using system time. I looked at
Date & time functions/classes and systime functions/classes. The
problem is that they all require a
On Saturday, 8 June 2024 at 13:19:30 UTC, Eric P626 wrote:
I just want the number of seconds elapsed since jan 1st 1970.
In other words, the internal system clock value.
#unix #time
@SDB79
On Saturday, 8 June 2024 at 13:19:30 UTC, Eric P626 wrote:
I managed to create a random number generator using the
following code:
~~~
auto rng = Random(42);
//
uniform(0,10,rng);
~~~
Now I want to seed the generator using system time. I looked at
Date & time functions/classes and systime
On 08.06.2024 16:19, Eric P626 wrote:
I managed to create a random number generator using the following code:
~~~
auto rng = Random(42);
//
uniform(0,10,rng);
~~~
Now I want to seed the generator using system time. I looked at Date &
time functions/classes and systime functions/classes. Th
On Saturday, 8 June 2024 at 18:25:20 UTC, drug007 wrote:
```d
{
const seed = castFrom!long.to!uint(Clock.currStdTime);
auto rng = Random(seed);
auto result = generate!(() => uniform(0, 10,
rng))().take(7);
// new random numbers sequence every time
re
On Saturday, 8 June 2024 at 16:09:04 UTC, monkyyy wrote:
rng is an optional parameter, `uniform(0,100).writeln;` alone
works; the docs not telling you that is really bad
They do tell you:
urng (optional) random number generator to use; if not
specified, defaults to rndGen
That overload is
On Saturday, 8 June 2024 at 20:53:02 UTC, Nick Treleaven wrote:
On Saturday, 8 June 2024 at 16:09:04 UTC, monkyyy wrote:
rng is an optional parameter, `uniform(0,100).writeln;` alone
works; the docs not telling you that is really bad
They do tell you:
urng (optional) random number generator
10 matches
Mail list logo