On Saturday, 18 May 2019 at 20:34:33 UTC, Patrick Schluter wrote:
* hurrah for French keyboard which has a rarely used µ key, but
none for Ç a frequent character of the language.
On Saturday, 18 May 2019 at 20:53:50 UTC, Alex wrote:
On Saturday, 18 May 2019 at 20:03:14 UTC, Adam D. Ruppe wrote:
On Saturday, 18 May 2019 at 15:59:05 UTC, Alex wrote:
Structs combine data, I have a use case where I do not want
to litter the scope with variables and would like to put them
On Saturday, 18 May 2019 at 20:03:14 UTC, Adam D. Ruppe wrote:
On Saturday, 18 May 2019 at 15:59:05 UTC, Alex wrote:
Structs combine data, I have a use case where I do not want to
litter the scope with variables and would like to put them in
a struct but the variable will only be used once.
On Thursday, 16 May 2019 at 15:19:03 UTC, Alex wrote:
1 - 17 ms, 553 ╬╝s, and 1 hnsec
That's µs* for micro-seconds.
* hurrah for French keyboard which has a rarely used µ key, but
none for Ç a frequent character of the language.
WTH!! is there any way to just get a normal u rather than
On Saturday, 18 May 2019 at 15:59:05 UTC, Alex wrote:
Structs combine data, I have a use case where I do not want to
litter the scope with variables and would like to put them in a
struct but the variable will only be used once.
This is basically what Phobos's Tuple is.
auto x =
On Saturday, 18 May 2019 at 16:35:44 UTC, Robert M. Münch wrote:
I want to profile my windows app which has a WinMain(). One of
the first statements in WinMain() within a try{} is:
Runtime.initialize();
But when I compile my app with -profile, it crashes on entry of
WinMain(). Looks like
I want to profile my windows app which has a WinMain(). One of the
first statements in WinMain() within a try{} is:
Runtime.initialize();
But when I compile my app with -profile, it crashes on entry of
WinMain(). Looks like this function is instrumented with code, that
might need the D
Anyone have any nice, generic and very simple state machine
design patterns in D?
Basically one someone specifies the state transition matrix and
callbacks in a very simple and direct way.
Using a struct itself is rather straightforward but requires
boilerplate code. This could be removed
Also, I realize one could use Voldemort types, e.g., something
like
auto x = (){ struct X { int x; } return X(); }
but this is so verbose as to not really be any better(although it
does accomplish hiding the struct, I'm not so concerned with
hiding the struct as I am code brevity. I do
Structs combine data, I have a use case where I do not want to
litter the scope with variables and would like to put them in a
struct but the variable will only be used once.
struct X
{
int x;
double y;
}
X x;
Seems redundant to have to do this, rather, it would be nice to do
auto x =
On Saturday, 18 May 2019 at 00:17:20 UTC, kdevel wrote:
Why not simply 17.5531 ms ("%.4f ms") to get rid of the
non-ASCII µ prefix?
fwiw I like this solution for the output. It is very clear to me.
Works:
---
import std.stdio;
void main()
{
func!true(false);
func!false(false);
func!false(true);
}
void func(bool A)(bool b) {
static if (A) {
writeln("a");
} else if (b) {
writeln("b");
} else {
writeln("c");
}
}
---
This works because
Today I stumbled over this error:
elsestaticif.d
```
import std.stdio;
void insert () ()
{
// some code
}
void insert (T, Args ...) (T x, Args args)
{
static if (T.stringof == "int") {{
`int`.writeln;
}}
else if (T.stringof == "bool") {{ // ← "static" is missing here
On Saturday, 18 May 2019 at 07:37:16 UTC, Laurent Tréguier wrote:
Maybe what you need is `package(a.b.c)`?
Ah, that's exactly what I needed! Thank you.
On Saturday, 18 May 2019 at 06:23:37 UTC, DanielG wrote:
I'm working on a library spread across multiple
modules/packages.
Sometimes I have symbols that I would like to share between
internal packages, but I don't want to make 'public' because
then it would be exposed to the client-facing
I'm working on a library spread across multiple modules/packages.
Sometimes I have symbols that I would like to share between
internal packages, but I don't want to make 'public' because then
it would be exposed to the client-facing API. To a degree this
could be gotten around by making
Hello there this is your hometown Meson build system user here
just happen to have a
question related to unit testing in D.
So is there a way to run the unit-test in the test main as a
costume test runner in
"test/test.d", and run the executable program in "src/main.d",
with this resulting in
On Thursday, 16 May 2019 at 15:19:03 UTC, Alex wrote:
1 - 17 ms, 553 ╬╝s, and 1 hnsec
fancy useless asci hieroglyphic
Holy shirt!
All that time I was thinking this is just some sort of encoding
artifacts in terminal(common problem on windows), especially
because IIRC on Linux it is
On Friday, 17 May 2019 at 18:02:04 UTC, kdevel wrote:
On Thursday, 16 May 2019 at 20:31:23 UTC, Vladimir Panteleev
wrote:
On Thursday, 16 May 2019 at 20:17:37 UTC, Steven Schveighoffer
[...]
hnsecs is more confusing than nanoseconds. People know what a
nanosecond is, a hecto-nano-second is
19 matches
Mail list logo