On Thursday, 19 May 2022 at 10:15:32 UTC, Chris Katko wrote:
given
```D
struct COLOR
{
float r, g, b, a; // a is alpha (opposite of transparency)
}
auto red = COLOR(1,0,0,1);
auto green = COLOR(0,1,0,1);
auto blue = COLOR(0,0,1,1);
auto white = COLOR(1,1,1,1);
//etc
```
is there a way to do:
given
```D
struct COLOR
{
float r, g, b, a; // a is alpha (opposite of transparency)
}
auto red = COLOR(1,0,0,1);
auto green = COLOR(0,1,0,1);
auto blue = COLOR(0,0,1,1);
auto white = COLOR(1,1,1,1);
//etc
```
is there a way to do:
```D
auto myColor = GREY!(0.5);
// where GREY!(0.5) becomes C
On Thursday, 19 May 2022 at 10:18:38 UTC, user1234 wrote:
On Thursday, 19 May 2022 at 10:15:32 UTC, Chris Katko wrote:
given
```D
struct COLOR
{
float r, g, b, a; // a is alpha (opposite of transparency)
}
auto red = COLOR(1,0,0,1);
auto green = COLOR(0,1,0,1);
auto blue = COLOR(0,0,1,1);
au
On 19.05.22 12:15, Chris Katko wrote:
given
```D
struct COLOR
{
float r, g, b, a; // a is alpha (opposite of transparency)
}
auto red = COLOR(1,0,0,1);
auto green = COLOR(0,1,0,1);
auto blue = COLOR(0,0,1,1);
auto white = COLOR(1,1,1,1);
//etc
```
is there a way to do:
```D
auto myColor = GR
On Thursday, 19 May 2022 at 04:33:01 UTC, Tejas wrote:
Does this happen with LDC as well?
I tried it using `LDC 1.29.0` and it prints correctly under both
`--b=release` and `--b=debug` builds.
On Wednesday, 18 May 2022 at 21:49:14 UTC, HuskyNator wrote:
After updating to `DMD 2.100.0` & `DUB 1.29.0`, I still get
this behavior.
Only when I use `dub run --b=debug` however (default for me).
`dub run --b=release` does return what one would expect.
I'm still on 2098.1, Windows 10 and ge
Using -L/SUBSYSTEM:windows user32.lib
Error:
lld-link: error: undefined symbol: _WinMain@16
referenced by
msvcrt120.lib(msvcrt_stub2.obj):(_WinMainCRTStartup)
Error: linker exited with status 1
On Thursday, 19 May 2022 at 19:29:25 UTC, Marcone wrote:
Using -L/SUBSYSTEM:windows user32.lib
you using a main() function right?
Please note when compiling on Win64, you need to explicitly list
-Lgdi32.lib -Luser32.lib on the build command. If you want the
Windows subsystem too, use -L/subs
On Thursday, 19 May 2022 at 19:35:20 UTC, Adam D Ruppe wrote:
On Thursday, 19 May 2022 at 19:29:25 UTC, Marcone wrote:
Using -L/SUBSYSTEM:windows user32.lib
you using a main() function right?
Please note when compiling on Win64, you need to explicitly
list -Lgdi32.lib -Luser32.lib on the bui
On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote:
I am using a main() function.
I am compiling on Windows x86 32 bits.
I am using DMD 2.100.0
This error is only in version 2.100.0 of DMD.
Are you using the `-L/entry:mainCRTStartup` or the
`L/entry:wmainCRTStartup` ?
On Thursday, 19 May 2022 at 20:33:34 UTC, Adam D Ruppe wrote:
On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote:
I am using a main() function.
I am compiling on Windows x86 32 bits.
I am using DMD 2.100.0
This error is only in version 2.100.0 of DMD.
Are you using the `-L/entry:mainCRTSt
On Thursday, 19 May 2022 at 21:41:50 UTC, Marcone wrote:
Are you using the `-L/entry:mainCRTStartup` or the
`L/entry:wmainCRTStartup` ?
-L/entry:mainCRTStartup
try the w one too. both doing the same result?
On Thursday, 19 May 2022 at 22:13:06 UTC, Adam Ruppe wrote:
On Thursday, 19 May 2022 at 21:41:50 UTC, Marcone wrote:
Are you using the `-L/entry:mainCRTStartup` or the
`L/entry:wmainCRTStartup` ?
-L/entry:mainCRTStartup
try the w one too. both doing the same result?
Both is doing the same
I've encountered an unusual behavior that I have no good
explanation for. Consider the following code example:
```d
import vibe.core.log : logInfo;
import vibe.http.client : requestHTTP, HTTPClientRequest,
HTTPClientResponse;
import vibe.http.common : HTTPMethod;
import vibe.stream.operations
On Thursday, 19 May 2022 at 10:35:30 UTC, ag0aep6g wrote:
On 19.05.22 12:15, Chris Katko wrote:
given
```D
struct COLOR
{
float r, g, b, a; // a is alpha (opposite of transparency)
}
auto red = COLOR(1,0,0,1);
auto green = COLOR(0,1,0,1);
auto blue = COLOR(0,0,1,1);
auto white = COLOR(1,1,1,
On 5/19/22 8:12 PM, Chris Katko wrote:
On Thursday, 19 May 2022 at 10:35:30 UTC, ag0aep6g wrote:
On 19.05.22 12:15, Chris Katko wrote:
given
```D
struct COLOR
{
float r, g, b, a; // a is alpha (opposite of transparency)
}
auto red = COLOR(1,0,0,1);
auto green = COLOR(0,1,0,1);
auto blue = C
On 5/19/22 8:29 PM, Steven Schveighoffer wrote:
Given a CTFE function it's very easy to wrap for ensuring compile-time
usage:
```d
enum ctGrey(float f) = grey(f);
auto myColor = ctGrey!(0.5);
```
That being said, if it's calculatable at compile time, chances are the
compiler is already goi
On 5/19/22 16:44, Vijay Nayar wrote:
> If I remove the call from `static this()`, then the web call works as
> normal. Any idea why calling vibe.d's `requestHTTP` function inside of a
> module's static construction would cause an infinite loop?
I am not experienced with vibe.d.
'static this' is
On Friday, 20 May 2022 at 00:12:44 UTC, Chris Katko wrote:
Yeah that occurred to me as I was falling asleep. Though, do I
have to a specify
```D
static auto myColor = grey(0.5);
```
to ensure it's done at compile time? It's not the end of the
world, but ideally, these are static / hardcoded v
I need to write a piece of software to track and categorize some
purchases. It's the kind of thing I could probably write in a
couple of hours in C#/Java + html/css/javascript. However,
something keeps drawing me to D and as this is a simple
application, it would be a good one to get back in af
On Friday, 20 May 2022 at 02:37:48 UTC, harakim wrote:
I need to write a piece of software to track and categorize
some purchases. It's the kind of thing I could probably write
in a couple of hours in C#/Java + html/css/javascript. However,
something keeps drawing me to D and as this is a simpl
On Friday, 20 May 2022 at 02:53:39 UTC, Craig Dillabaugh wrote:
On Friday, 20 May 2022 at 02:37:48 UTC, harakim wrote:
I need to write a piece of software to track and categorize
some purchases. It's the kind of thing I could probably write
in a couple of hours in C#/Java + html/css/javascript.
On Friday, 20 May 2022 at 01:41:59 UTC, Ali Çehreli wrote:
On 5/19/22 16:44, Vijay Nayar wrote:
> If I remove the call from `static this()`, then the web call
works as
> normal. Any idea why calling vibe.d's `requestHTTP` function
inside of a
> module's static construction would cause an infinit
23 matches
Mail list logo