Re: I need a most simple and easy example to understand UDA.

2020-11-01 Thread Ali Çehreli via Digitalmars-d-learn
On 11/1/20 1:11 PM, Anonymouse wrote: On Sunday, 1 November 2020 at 20:33:15 UTC, Marcone wrote: I need a most simple and easy example to understand UDA. https://ddili.org/ders/d.en/uda.html The difficulty of understanding UDAs comes up from time to time. Obviously, there are some crucial w

Re: Why is vibe.d json serializer/deserializer so complex?

2020-11-01 Thread James Blachly via Digitalmars-d-learn
On 10/31/20 8:28 PM, Jesse Phillips wrote: Well I was putting this together, but didn't want to attempt submission until I felt I would be able to put in the time for the review process https://github.com/JesseKPhillips/DIPs/blob/serialize/attribute/DIPs/1NNN-jkp.md Bravo! An idea whose time

Re: I need a most simple and easy example to understand UDA.

2020-11-01 Thread Anonymouse via Digitalmars-d-learn
On Sunday, 1 November 2020 at 20:33:15 UTC, Marcone wrote: I need a most simple and easy example to understand UDA. https://ddili.org/ders/d.en/uda.html

I need a most simple and easy example to understand UDA.

2020-11-01 Thread Marcone via Digitalmars-d-learn
I need a most simple and easy example to understand UDA.

Re: Removind duplicates for JSON string

2020-11-01 Thread Imperatorn via Digitalmars-d-learn
On Sunday, 1 November 2020 at 13:31:19 UTC, Anonymouse wrote: On Sunday, 1 November 2020 at 09:14:35 UTC, Vino wrote: [...] I can only test with Phobos (no asdf on run.dlang.io), but isn't just normal sort and uniq what you want? data[] .array .sort .uniq!((tup1, tup2) => tup1[0

Re: Removind duplicates for JSON string

2020-11-01 Thread Anonymouse via Digitalmars-d-learn
On Sunday, 1 November 2020 at 09:14:35 UTC, Vino wrote: [ Tuple!(string, string)("DEV", "D1"), Tuple!(string, string)("DEV", "default"), Tuple!(string, string)("DEV", "D1"), Tuple!(string, string)("QAS", "Q1"), Tuple!(string, string)("QAS", "Q1"), Tuple!(string, string)("QAS", "default"),

Re: merging container arrays

2020-11-01 Thread Andre Pany via Digitalmars-d-learn
On Sunday, 1 November 2020 at 05:23:42 UTC, Vino wrote: On Saturday, 31 October 2020 at 15:16:22 UTC, Vino wrote: [...] Hi All, I was able to find a solution using a different approach, the code is in the link https://run.dlang.io/is/Jx4NLw, request your help on to get the value using th

Removind duplicates for JSON string

2020-11-01 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on how to remove duplicates in JSON. Code: import asdf; import std.algorithm : map, filter, uniq; import std.container.array; import std.stdio : writeln; import std.typecons : Tuple, tuple; import std.array; void main() { string apidata = `{ "items": [ { "name