Re: vibe.d and my first web service

2020-07-19 Thread bauss via Digitalmars-d-learn
On Saturday, 18 July 2020 at 17:23:06 UTC, Mr. Backup wrote: On Saturday, 18 July 2020 at 12:16:09 UTC, Andre Pany wrote: On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote: [...] I assume you are using vibe.d 0.8.4 or older. Please check whether adding this to dub.json solves your

How spand array for use with functions arguments like tuple?

2020-07-19 Thread Marcone via Digitalmars-d-learn
How spand array for use with functions arguments like tuple?

Re: Good way to send/receive UDP packets?

2020-07-19 Thread Dukc via Digitalmars-d-learn
Thank you everybody - Especially for the links to the blogs. This is just the kind of stuff I seek (didn't give a close look yet, though). I think I'm going to try std.socket first, since it's in the standard library. If it feels like it could be easier, I'll consider Libasync.

Re: alias restriction??!

2020-07-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/19/20 4:21 PM, Carl Sturtivant wrote: On Sunday, 19 July 2020 at 17:06:14 UTC, Paul Backus wrote: Also, letting aliases refer to expressions essentially allows AST macros in through the back door. Consider the following example: [...] Perhaps what's needed is something more that is less

Re: alias restriction??!

2020-07-19 Thread Carl Sturtivant via Digitalmars-d-learn
On Sunday, 19 July 2020 at 17:06:14 UTC, Paul Backus wrote: Also, letting aliases refer to expressions essentially allows AST macros in through the back door. Consider the following example: [...] Perhaps what's needed is something more that is less than allowing aliases for expressions in

Re: alias restriction??!

2020-07-19 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 19 July 2020 at 16:00:28 UTC, Basile B. wrote: On Sunday, 19 July 2020 at 15:00:59 UTC, Paul Backus wrote: On Sunday, 19 July 2020 at 12:42:47 UTC, Carl Sturtivant wrote: On Sunday, 19 July 2020 at 12:08:07 UTC, Paul Backus wrote: Easiest workaround: ref inout(long) Second() inout

Re: alias restriction??!

2020-07-19 Thread Basile B. via Digitalmars-d-learn
On Sunday, 19 July 2020 at 15:00:59 UTC, Paul Backus wrote: On Sunday, 19 July 2020 at 12:42:47 UTC, Carl Sturtivant wrote: On Sunday, 19 July 2020 at 12:08:07 UTC, Paul Backus wrote: Easiest workaround: ref inout(long) Second() inout { return second.one; } Was trying to avoid this for perf

Re: alias restriction??!

2020-07-19 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 19 July 2020 at 12:42:47 UTC, Carl Sturtivant wrote: On Sunday, 19 July 2020 at 12:08:07 UTC, Paul Backus wrote: Easiest workaround: ref inout(long) Second() inout { return second.one; } Was trying to avoid this for performance reasons. In fact what are the performance implicatio

Re: alias restriction??!

2020-07-19 Thread Carl Sturtivant via Digitalmars-d-learn
On Sunday, 19 July 2020 at 12:08:07 UTC, Paul Backus wrote: On Saturday, 18 July 2020 at 18:46:16 UTC, Carl Sturtivant wrote: Here's a toy version of a problem in the wild. struct S { long first; union T { long one; double two; } T second; alias First = first

Re: alias restriction??!

2020-07-19 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 18 July 2020 at 18:46:16 UTC, Carl Sturtivant wrote: Here's a toy version of a problem in the wild. struct S { long first; union T { long one; double two; } T second; alias First = first; alias Second = second.one; } void main() { S x;

Re: Good way to send/receive UDP packets?

2020-07-19 Thread notna via Digitalmars-d-learn
On Saturday, 18 July 2020 at 16:00:09 UTC, Dukc wrote: I have a project where I need to take and send UDP packets over the Internet. Only raw UDP - my application uses packets directly, with their starting `[0x5a, packet.length.to!ubyte]` included. And only communication with a single address,