Re: Is there such a JSON parser?

2023-01-01 Thread thebluepandabear via Digitalmars-d-learn
On Sunday, 1 January 2023 at 23:28:12 UTC, torhu wrote: I need to parse some JSON data into various data structures, so I'm looking for a parser based on events or ranges. One that doesn't just load the file and build a data structure that represents the whole thing. So not std.json, at least.

Re: Is there such a JSON parser?

2023-01-01 Thread Salih Dincer via Digitalmars-d-learn
On Sunday, 1 January 2023 at 23:28:12 UTC, torhu wrote: I need to parse some JSON data into various data structures, so I'm looking for a parser based on events or ranges. One that doesn't just load the file and build a data structure that represents the whole thing. So not std.json, at least.

Is there such a JSON parser?

2023-01-01 Thread torhu via Digitalmars-d-learn
I need to parse some JSON data into various data structures, so I'm looking for a parser based on events or ranges. One that doesn't just load the file and build a data structure that represents the whole thing. So not std.json, at least.

Re: Solving optimization problems with D

2023-01-01 Thread max haughton via Digitalmars-d-learn
On Sunday, 1 January 2023 at 21:11:06 UTC, Ogi wrote: I’ve read this [series if articles](https://www.gamedeveloper.com/design/decision-modeling-and-optimization-in-game-design-part-1-introduction) about using Excel Solver for all kinds of optimization problems. This is very neat, but of course,

Solving optimization problems with D

2023-01-01 Thread Ogi via Digitalmars-d-learn
I’ve read this [series if articles](https://www.gamedeveloper.com/design/decision-modeling-and-optimization-in-game-design-part-1-introduction) about using Excel Solver for all kinds of optimization problems. This is very neat, but of course, I would prefer to write models with code instead,

Re: Address of a class object

2023-01-01 Thread Ali Çehreli via Digitalmars-d-learn
On 1/1/23 01:01, Paul wrote: > ...on my laptop it prints... > ``` > Size Alignment Type > = > 9 4 MyClass > > 4FFB20 4FFB24 > ``` > If the size of MyClass is 9 bytes why do MyClassO1 & O2 addresses only > differ by 4 bytes? As matheus said, classes

Re: Address of a class object

2023-01-01 Thread matheus via Digitalmars-d-learn
On Sunday, 1 January 2023 at 09:01:24 UTC, Paul wrote: ... If the size of MyClass is 9 bytes why do MyClassO1 & O2 addresses only differ by 4 bytes? Because those addresses(4FFB20 4FFB24) are the addresses of the class **variables**, not the addresses of the **objects** themselves?

Re: Address of a class object

2023-01-01 Thread Paul via Digitalmars-d-learn
Thanks all. Yes it seems my understanding and "D" vocabulary are still a bit confused. So I'm taking a D course online and was trying to verify what I was learning. The course example printed out the size and alignment of types...something close to this: ```d import std.stdio; import