Re: How to simply parse and print the XML with dxml?

2021-09-10 Thread Mike Parker via Digitalmars-d-learn
On Friday, 10 September 2021 at 07:50:29 UTC, tastyminerals wrote: As for the dxml, I believe adding a small quick start example would be very beneficial for the newcomers. Especially, ppl like me who are not aware of the XML parser types and just need to extract text from an XML file.

Re: Ali's Book - Programming in D

2021-09-10 Thread Ali Çehreli via Digitalmars-d-learn
On 9/10/21 11:05 AM, Ron Tarrant wrote: On Friday, 10 September 2021 at 14:21:12 UTC, Ali Çehreli wrote: tldr; Yes, it's print-on-demand and 2019 is correct for the current print edition. I would download the PDF version from ddili.org. D version: 2.094.2 Book revision: 2021-02-26 Off the

Re: Ali's Book - Programming in D

2021-09-10 Thread someone via Digitalmars-d-learn
On Friday, 10 September 2021 at 18:05:30 UTC, Ron Tarrant wrote: I'm asking all this because I thought it would be a good idea to have an analog copy handy I second this; when Ali thinks the one printed on dead-tree-media is up-to date I'll snap a copy of it too; this is one of those books

Re: Ali's Book - Programming in D

2021-09-10 Thread someone via Digitalmars-d-learn
On Friday, 10 September 2021 at 18:05:30 UTC, Ron Tarrant wrote: On another note, I've been thinking about rewriting the GtkD Coding blog as a book ... interesting :)

Re: Ali's Book - Programming in D

2021-09-10 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 10 September 2021 at 14:21:12 UTC, Ali Çehreli wrote: tldr; Yes, it's print-on-demand and 2019 is correct for the current print edition. I would download the PDF version from ddili.org. D version: 2.094.2 Book revision: 2021-02-26 Off the top of your head, do you know how much

Re: How to simply parse and print the XML with dxml?

2021-09-10 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 9 September 2021 at 23:42:42 UTC, jfondren wrote: On Thursday, 9 September 2021 at 23:29:56 UTC, Imperatorn wrote: On Thursday, 9 September 2021 at 18:40:53 UTC, jfondren wrote: [...] That's a nice trick you did there Something in the quoted text? Or if you mean the

Re: Ali's Book - Programming in D

2021-09-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/10/21 10:21 AM, Ali Çehreli wrote: I want to thank Steven Schveighoffer here once more for his help with the book. I later realized that his name should have much more prominence. I can't understand how my older self did not realize this fact when the book was being finalized. Your

Re: Ali's Book - Programming in D

2021-09-10 Thread someone via Digitalmars-d-learn
On Friday, 10 September 2021 at 14:21:12 UTC, Ali Çehreli wrote: The following is a list of different versions of the book. 1) The git clone on my computer is the newest, which I may sit on for weeks for minor corrections. (These corrections are recommended by most of you; thank you!) So,

Re: Ali's Book - Programming in D

2021-09-10 Thread Ali Çehreli via Digitalmars-d-learn
On 9/10/21 4:48 AM, Ron Tarrant wrote: > On Friday, 10 September 2021 at 10:59:10 UTC, bauss wrote: > >> Publisher ‏ : ‎ CreateSpace Independent Publishing Platform; 1st >> edition (Aug. 19 2015) > > Yeah, I saw that, too. And if you do a "Look inside," the copyright date > is 2019... thus my

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 12:59:08 UTC, bauss wrote: It's just used to speed-up the GC. Yeah, I got the point, but to be absolutely honest, I (>20 years of C coding) do not like GC as such. I believe manual free() is not that 'hard'. And one must still release other resources. (in C I

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread bauss via Digitalmars-d-learn
On Friday, 10 September 2021 at 12:46:36 UTC, eugene wrote: On Friday, 10 September 2021 at 12:10:58 UTC, Adam D Ruppe wrote: btw why do the threads cause you trouble? Well... probably it is subjective thing - just do not 'like' when a program is doing something that is not explicitly in it's

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 12:10:58 UTC, Adam D Ruppe wrote: btw why do the threads cause you trouble? Well... probably it is subjective thing - just do not 'like' when a program is doing something that is not explicitly in it's source (I am C coder, you guessed). More specifically - I

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Adam D Ruppe via Digitalmars-d-learn
btw why do the threads cause you trouble?

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:53:04 UTC, eugene wrote: On Friday, 10 September 2021 at 11:32:02 UTC, Adam D Ruppe wrote: You either pass as an argument *to your application* --DRT-gcopt=parallel:0 oops... :) ps xH | grep [e]cho 5727 pts/14 S+ 0:13 ./echo-server

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/10/21 7:47 AM, eugene wrote: On Friday, 10 September 2021 at 11:09:10 UTC, bauss wrote: --DRT-gcopt=parallel:2 on the command line. A value of 0 disables parallel marking completely. but it does not: make -f Makefile-dmd dmd --DRT-gcopt=parallel:0 engine/*.d common-sm/*.d server-sm/*.d

Re: Ali's Book - Programming in D

2021-09-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/10/21 6:46 AM, Ron Tarrant wrote: I guess this is mainly a question for Ali, but if anyone else knows the answer, please jump in... If I were to buy a paperback copy of "Programming in D: Tutorial & Reference" from Amazon (this link:

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:32:02 UTC, Adam D Ruppe wrote: You either pass as an argument *to your application* --DRT-gcopt=parallel:0 oops... :)

Re: Ali's Book - Programming in D

2021-09-10 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 10 September 2021 at 10:59:10 UTC, bauss wrote: Publisher ‏ : ‎ CreateSpace Independent Publishing Platform; 1st edition (Aug. 19 2015) Yeah, I saw that, too. And if you do a "Look inside," the copyright date is 2019... thus my question. :)

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:09:10 UTC, bauss wrote: --DRT-gcopt=parallel:2 on the command line. A value of 0 disables parallel marking completely. but it does not: make -f Makefile-dmd dmd --DRT-gcopt=parallel:0 engine/*.d common-sm/*.d server-sm/*.d pool.d echo_server.d

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Adam D Ruppe via Digitalmars-d-learn
On Friday, 10 September 2021 at 09:27:49 UTC, eugene wrote: What are these extra threads for? GC? So I think it is **very aggressive usage** of DList that causes this. Yeah, in newer versions, when the garbage collector does its first collect, it spawns some helper threads to speed up its

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:09:10 UTC, bauss wrote: Here's the specific change: https://dlang.org/changelog/2.087.0.html#gc_parallel thanx a lot!

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
On Friday, 10 September 2021 at 10:20:52 UTC, drug wrote: It is off-topic a bit I am newbie - have been learning D for about 2 months or so. I understand that my question is not about the language itself, just picked forum for new users. but I think none can compare gdc 4.9.2 to same

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Mike Parker via Digitalmars-d-learn
On Friday, 10 September 2021 at 11:20:10 UTC, eugene wrote: same picture with gdc 8.4.0 - one thread, no pthread_create() behind the scenes. GDC is stuck on a much older version of D. Iain has backported some bugfixes and optimizations, but featurewise it's mostly D 2.076. This is because

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread bauss via Digitalmars-d-learn
On Friday, 10 September 2021 at 10:39:48 UTC, Basile B. wrote: On Friday, 10 September 2021 at 09:27:49 UTC, eugene wrote: Here is test program (which is using DList aggressively) [...] Can this (really unwanted) behavior be disabled in DMD? I do not want to have multiple threads, a program

Re: Ali's Book - Programming in D

2021-09-10 Thread bauss via Digitalmars-d-learn
On Friday, 10 September 2021 at 10:46:25 UTC, Ron Tarrant wrote: I guess this is mainly a question for Ali, but if anyone else knows the answer, please jump in... If I were to buy a paperback copy of "Programming in D: Tutorial & Reference" from Amazon (this link:

Ali's Book - Programming in D

2021-09-10 Thread Ron Tarrant via Digitalmars-d-learn
I guess this is mainly a question for Ali, but if anyone else knows the answer, please jump in... If I were to buy a paperback copy of "Programming in D: Tutorial & Reference" from Amazon (this link:

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread Basile B. via Digitalmars-d-learn
On Friday, 10 September 2021 at 09:27:49 UTC, eugene wrote: Here is test program (which is using DList aggressively) [...] Can this (really unwanted) behavior be disabled in DMD? I do not want to have multiple threads, a program (real program, not the test above) has to be single-threaded.

Re: GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread drug via Digitalmars-d-learn
10.09.2021 12:27, eugene пишет: //import std.container.dlist; // dmd (v2.097.2) import std.container: DList; // gdc (4.9.2) It is off-topic a bit but I think none can compare gdc 4.9.2 to dmd 2.097.2 because gdc has older version than dmd. I would compare gdc to appropriate dmd version,

GDC - program runs in one thread, DMD - in 4 threads, why?

2021-09-10 Thread eugene via Digitalmars-d-learn
Here is test program (which is using DList aggressively) ```d import std.stdio : writeln; import core.sys.posix.unistd : sleep; //import std.container.dlist; // dmd (v2.097.2) import std.container: DList; // gdc (4.9.2) void main() { auto list = DList!(int)(); int k; while (true)

Re: How to simply parse and print the XML with dxml?

2021-09-10 Thread tastyminerals via Digitalmars-d-learn
On Thursday, 9 September 2021 at 18:40:53 UTC, jfondren wrote: On Thursday, 9 September 2021 at 17:17:23 UTC, tastyminerals wrote: [...] dxml.parser is a streaming XML parser. The documentation at http://jmdavisprog.com/docs/dxml/0.4.0/dxml_parser.html has a link to more information about