Re: Get unknown symbol (struct, method, class) tagged with User Defined Attributes

2020-05-12 Thread Doug via Digitalmars-d-learn
On Tuesday, 12 May 2020 at 04:02:18 UTC, Steven Schveighoffer wrote: In the case of serialization/deserialization, you give an instance of a type to serialize or deserialize. Then the library can search the symbols inside that type to see if any has the UDA you are looking for. In the Rust

Re: How does a free list work?

2020-05-12 Thread Pavel Shkadzko via Digitalmars-d-learn
On Saturday, 9 May 2020 at 22:48:46 UTC, Simen Kjærås wrote: On Saturday, 9 May 2020 at 19:54:44 UTC, Pavel Shkadzko wrote: [...] The GC keeps a list of roots - that is, objects that are known to be active and should not be collected. The static freelist is one of those - since it's static i

Re: Optional type parameter on a template

2020-05-12 Thread Luis via Digitalmars-d-learn
On Tuesday, 12 May 2020 at 20:40:35 UTC, Adam D. Ruppe wrote: A default argument of void is a common way to do it template foo(T = void) { static if(is(T == void)) { not given } else { use T } } Perfect! Works as I desired.

Re: Optional type parameter on a template

2020-05-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 12 May 2020 at 20:36:22 UTC, Luis wrote: I'm trying to make a SparseSet that on function of a optional type parameter, could alongside the index set, store other data. So I need a way to declare a optional type template parameter. A default argument of void is a common way to do i

Optional type parameter on a template

2020-05-12 Thread Luis via Digitalmars-d-learn
I'm trying to make a SparseSet that on function of a optional type parameter, could alongside the index set, store other data. So I need a way to declare a optional type template parameter. I prototyped this stuff on run.dlang, but I like know if there is a better way : https://run.dlang.io/

Re: Optional type parameter on a template

2020-05-12 Thread Luis via Digitalmars-d-learn
Sorry ... wrong link. This is the correct : https://run.dlang.io/is/D2iCP0

Re: D and Async I/O

2020-05-12 Thread Jacob Carlborg via Digitalmars-d-learn
On 2020-05-12 11:23, Russel Winder wrote: As far as I can tell D has no futures… Future and async in vibe.d [1]. Future in Mecca [2]. [1] https://vibed.org/api/vibe.core.concurrency/async [2] https://github.com/weka-io/mecca/blob/0593a35dd1a9978855d7db349fc1172f04cf8013/src/mecca/reactor/syn

Re: Fetching licensing info for all dependencies of a DUB project

2020-05-12 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 12 May 2020 at 13:08:01 UTC, Joseph Rushton Wakeling wrote: On Tuesday, 12 May 2020 at 12:59:14 UTC, Paul Backus wrote: You should be able to get this information from the JSON output of `dub describe`. Cool, thanks. Much appreciated :-) Has anyone created any tools to condense t

Re: Fetching licensing info for all dependencies of a DUB project

2020-05-12 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Tuesday, 12 May 2020 at 12:59:14 UTC, Paul Backus wrote: You should be able to get this information from the JSON output of `dub describe`. Cool, thanks. Much appreciated :-) Has anyone created any tools to condense that into a licensing report? No worries if not, just curious.

Re: Fetching licensing info for all dependencies of a DUB project

2020-05-12 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 12 May 2020 at 12:44:11 UTC, Joseph Rushton Wakeling wrote: Hello folks, Are there any tools that exist to help prepare a report of all the different software licenses used by dependencies of a DUB project? (This should cover all pulled in dependencies, not just direct dependenci

Fetching licensing info for all dependencies of a DUB project

2020-05-12 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
Hello folks, Are there any tools that exist to help prepare a report of all the different software licenses used by dependencies of a DUB project? (This should cover all pulled in dependencies, not just direct dependencies.) Thanks and best wishes, -- Joe

Re: D and Async I/O

2020-05-12 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Tuesday, 12 May 2020 at 09:23:40 UTC, Russel Winder wrote: On Mon, 2020-05-11 at 19:34 +0200, Jacob Carlborg via Digitalmars-d-learn wrote: On 2020-05-11 16:44, Russel Winder wrote: > Crickey, a third option. This wil increase my dithering! ;-) Forth: Mecca [1] :) [1] https://github.com/we

Re: D and Async I/O

2020-05-12 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2020-05-11 at 19:34 +0200, Jacob Carlborg via Digitalmars-d-learn wrote: > On 2020-05-11 16:44, Russel Winder wrote: > > > Crickey, a third option. This wil increase my dithering! ;-) > > Forth: Mecca [1] :) > > [1] https://github.com/weka-io/mecca Hummm… it seems everyone who needed as

Re: D and Async I/O

2020-05-12 Thread Paolo Invernizzi via Digitalmars-d-learn
On Monday, 11 May 2020 at 15:02:59 UTC, bauss wrote: On Monday, 11 May 2020 at 14:02:54 UTC, Russel Winder wrote: OK, so I need to create an asynchronous TCP server (not HTTP or HTTPS, this is a real server ;-) ). I think the normal response is "Use Vibe.d". However, recently I see Hunt is an