Re: python like datastructures as databases code examples

2025-07-22 Thread monkyyy via Digitalmars-d-learn
On Tuesday, 22 July 2025 at 07:32:00 UTC, Serg Gini wrote: On Monday, 21 July 2025 at 16:13:44 UTC, monkyyy wrote: On Monday, 21 July 2025 at 14:56:41 UTC, Serg Gini wrote: But array doesn't look right.. If you want a balanced ("always sorted") structure with "filter" (ability to make some req

Re: python like datastructures as databases code examples

2025-07-22 Thread Serg Gini via Digitalmars-d-learn
On Monday, 21 July 2025 at 16:13:44 UTC, monkyyy wrote: On Monday, 21 July 2025 at 14:56:41 UTC, Serg Gini wrote: But array doesn't look right.. If you want a balanced ("always sorted") structure with "filter" (ability to make some requests for the data) - this looks more like some Tree struct

Re: python like datastructures as databases code examples

2025-07-21 Thread monkyyy via Digitalmars-d-learn
On Monday, 21 July 2025 at 14:56:41 UTC, Serg Gini wrote: But array doesn't look right.. If you want a balanced ("always sorted") structure with "filter" (ability to make some requests for the data) - this looks more like some Tree structure Your thinking in classical theory and textbook read

Re: python like datastructures as databases code examples

2025-07-21 Thread Serg Gini via Digitalmars-d-learn
On Monday, 21 July 2025 at 14:15:07 UTC, Monkyyy wrote: On Monday, 21 July 2025 at 08:31:42 UTC, Serg Gini wrote: That filter is not aware of the data structure nor is that array maintaining a sort I'm not sure what you are trying to do. But array doesn't look right.. If you want a balanced (

Re: python like datastructures as databases code examples

2025-07-21 Thread Monkyyy via Digitalmars-d-learn
On Monday, 21 July 2025 at 08:31:42 UTC, Serg Gini wrote: On Friday, 18 July 2025 at 18:35:40 UTC, monkyyy wrote: `shapes.filter(isnt:shapeenum.isstatic)` https://forum.dlang.org/thread/apbcqxiifbsqdlrsl...@forum.dlang.org I know its possible to make complex, datastructure aware filters, but I

Re: python like datastructures as databases code examples

2025-07-21 Thread Serg Gini via Digitalmars-d-learn
On Friday, 18 July 2025 at 18:35:40 UTC, monkyyy wrote: `shapes.filter(isnt:shapeenum.isstatic)` https://forum.dlang.org/thread/apbcqxiifbsqdlrsl...@forum.dlang.org I know its possible to make complex, datastructure aware filters, but I never done it what patterns do people use? lets say you