Re: How do you typically debug / write D code (Visual Studio - known to be broken in Error pane etc), VScode - I get this error...

2024-08-19 Thread evilrat via Digitalmars-d-learn
On Monday, 19 August 2024 at 10:59:33 UTC, Daniel Donnelly, Jr. wrote: I give up on Visual Studio VisualD plugin as it's had the same issues for over five years, and currently my program runs from the command line, but VisualD complains with a 528 nonsensical errors. So I investigated using V

Re: How do you typically debug / write D code (Visual Studio - known to be broken in Error pane etc), VScode - I get this error...

2024-08-19 Thread IchorDev via Digitalmars-d-learn
On Monday, 19 August 2024 at 10:59:33 UTC, Daniel Donnelly, Jr. wrote: So how do you guys efficiently debug D if there exists no working environment or is there a nice IDE I'm unaware of? Use gdb; unless you’re running macOS, in which case use the version of lldb included in the macOS develope

Re: How do you implement complementary "A*(A*A) = A^3" operator overloads (I'm getting strange results)

2024-08-19 Thread IchorDev via Digitalmars-d-learn
On Monday, 19 August 2024 at 09:42:44 UTC, Daniel Donnelly, Jr. wrote: ```d Type opBinary(string op="^")(int k) in { assert (k > 0); } do { if (k == 1) return this; auto P = this; while (k > 0) { k --; P = this * P; }

Re: How do you typically debug / write D code (Visual Studio - known to be broken in Error pane etc), VScode - I get this error...

2024-08-19 Thread ryuukk_ via Digitalmars-d-learn
How do I get LLDB to work? This is why i asked you what OS you use, but you didn't answer Click on the link bellow the screenshot and follow the doc And post log about errors you encounter, otherwise i can't help you, i am not on your PC

Re: How do you typically debug / write D code (Visual Studio - known to be broken in Error pane etc), VScode - I get this error...

2024-08-19 Thread Daniel via Digitalmars-d-learn
On Monday, 19 August 2024 at 13:05:55 UTC, ryuukk_ wrote: What's your OS? Debugging works very nice with vscode: ```json { "name": "game: client", "type": "lldb", "request": "launch", "program": "${workspaceFolder}/bin/game",

Re: How to find the right function in the Phobos library?

2024-08-19 Thread Renato Athaydes via Digitalmars-d-learn
On Monday, 19 August 2024 at 06:53:34 UTC, Ron Tarrant wrote: On Saturday, 17 August 2024 at 17:31:53 UTC, Steven Schveighoffer wrote: Go to dlang.org, select dicumentation, then library reference. Pick any module, click on it In the upper right, switch the docs from stable to ddox Now you ca

Re: How do you typically debug / write D code (Visual Studio - known to be broken in Error pane etc), VScode - I get this error...

2024-08-19 Thread ryuukk_ via Digitalmars-d-learn
What's your OS? Debugging works very nice with vscode: ```json { "name": "game: client", "type": "lldb", "request": "launch", "program": "${workspaceFolder}/bin/game", "cwd": "${workspaceFolder}/bin", }, ``` use: http

How do you typically debug / write D code (Visual Studio - known to be broken in Error pane etc), VScode - I get this error...

2024-08-19 Thread Daniel via Digitalmars-d-learn
I give up on Visual Studio VisualD plugin as it's had the same issues for over five years, and currently my program runs from the command line, but VisualD complains with a 528 nonsensical errors. So I investigated using VScode instead (I do need a debugger), and I get this: ``` Couldn't fi

Re: How do you implement complementary "A*(A*A) = A^3" operator overloads (I'm getting strange results)

2024-08-19 Thread Daniel via Digitalmars-d-learn
On Monday, 19 August 2024 at 09:42:44 UTC, Daniel Donnelly, Jr. wrote: type_theory.d: ``` module type_theory; import std.conv; import prod; [...] I had to put `while (k > 1)` instead of `while (k > 0)` and it works. I still though can't get it to work with the obvious recursive formula of `

How do you implement complementary "A*(A*A) = A^3" operator overloads (I'm getting strange results)

2024-08-19 Thread Daniel via Digitalmars-d-learn
type_theory.d: ``` module type_theory; import std.conv; import prod; class Type { public: Prod opBinary(string op="*")(Type r) { alias l = this; return new Prod(l, r); } Type opBinary(string op="^")(int k) in { assert (k > 0); } do { if (k == 1)