Re: My new programming book ...

2022-11-06 Thread zjh via Digitalmars-d-learn
On Monday, 7 November 2022 at 01:06:23 UTC, Adam D Ruppe wrote: No, but not that much has changed and you can always post here with questions. How is your `minigui`? Please write an `introduction` when you have time.

Re: My new programming book ...

2022-11-06 Thread zjh via Digitalmars-d-learn
On Monday, 7 November 2022 at 04:54:05 UTC, ikelaiah wrote: ... Yes, more than 100 skills, not easy get.

Re: My new programming book ...

2022-11-06 Thread ikelaiah via Digitalmars-d-learn
On Monday, 7 November 2022 at 00:55:33 UTC, zjh wrote: Is there a second edition? After all, it has been many years. Hi zjh, I'm aware of the publication date. However, I find the content still highly relevant to many day-to-day tasks (my use case). No doubt, there will be new features in

Re: My new programming book ...

2022-11-06 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 7 November 2022 at 00:55:33 UTC, zjh wrote: Is there a second edition? After all, it has been many years. No, but not that much has changed and you can always post here with questions.

Re: My new programming book ...

2022-11-06 Thread zjh via Digitalmars-d-learn
On Sunday, 6 November 2022 at 22:43:33 UTC, ikelaiah wrote: Hi, ... Is there a second edition? After all, it has been many years.

Re: My new programming book ...

2022-11-06 Thread Imperatorn via Digitalmars-d-learn
On Sunday, 6 November 2022 at 22:43:33 UTC, ikelaiah wrote: Hi, I got a new programming book yesterday, authored by Adam D. Rupee. [...] Agreed. It's a great book with a "get it done"-attitude <3

My new programming book ...

2022-11-06 Thread ikelaiah via Digitalmars-d-learn
Hi, I got a new programming book yesterday, authored by Adam D. Rupee. ![new-book](https://www.linkpicture.com/q/20221106_142031_1.jpg). I'm still in **Chapter 1**, on the matter of `Immutable` variables. Can't wait to read **Chapter 7** on **Corectness and Documentation**. So far, I really

Re: Drawing a line code

2022-11-06 Thread z via Digitalmars-d-learn
On Sunday, 6 November 2022 at 20:07:47 UTC, z wrote: whenever the counter is above `1` I meant above or equal(`>=`), woops

Re: Drawing a line code

2022-11-06 Thread z via Digitalmars-d-learn
On Sunday, 6 November 2022 at 16:48:24 UTC, Joel wrote: I want my code fixed up so that works from any two points. You can add a condition to prevent writing out of the image/framebuffer/whatever memory so it won't do any out of bounds write. Another valid algorithm could be testing all pix

Re: Drawing a line code

2022-11-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/11/2022 5:48 AM, Joel wrote: The algorithm is too hard for me to work out and dg2d doesn't help either. I want my code fixed up so that works from any two points. Its not as complex as that page initially looks. ``` plotLine(x0, y0, x1, y1) dx = abs(x1 - x0) sx = x0 < x1 ? 1 : -1

Re: Drawing a line code

2022-11-06 Thread Joel via Digitalmars-d-learn
On Sunday, 6 November 2022 at 11:40:40 UTC, claptrap wrote: On Sunday, 6 November 2022 at 11:22:26 UTC, Joel wrote: I found some code on the net but haven't been able to get it working properly. I trying to draw with mouse (any direction). this is the classic integer line drawing algorithm...

Re: Linking not working properly Windows 11

2022-11-06 Thread bauss via Digitalmars-d-learn
On Sunday, 6 November 2022 at 03:59:55 UTC, ryuukk_ wrote: Manually editing / moving files is not recommended for Visual Studio installs The manual editing was not for visual studio but for dmd to set a different linker.

Re: Linking not working properly Windows 11

2022-11-06 Thread bauss via Digitalmars-d-learn
On Saturday, 5 November 2022 at 22:53:33 UTC, Hipreme wrote: On Saturday, 5 November 2022 at 19:19:09 UTC, bauss wrote: On Saturday, 5 November 2022 at 14:54:52 UTC, Hipreme wrote: [...] I have both VS 2019 and 2022, but only 2019 has c++ build tools etc. I assume that should be fine? [...

Re: Drawing a line code

2022-11-06 Thread claptrap via Digitalmars-d-learn
On Sunday, 6 November 2022 at 11:22:26 UTC, Joel wrote: I found some code on the net but haven't been able to get it working properly. I trying to draw with mouse (any direction). this is the classic integer line drawing algorithm... https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm#A

Drawing a line code

2022-11-06 Thread Joel via Digitalmars-d-learn
I found some code on the net but haven't been able to get it working properly. I trying to draw with mouse (any direction). ```d void drawLine(Dot s, Dot e) { auto d=s; /+ // import std.algorithm : swap; if (s.pos.X>e.pos.X) {