Re: Test thread
On Thursday, 20 May 2021 at 22:54:18 UTC, Daniel Donnelly, Jr wrote: Hi, I'm just testing whether I can post here. Thank you. Okay it worked. I am installing Visual D now. I am going to write a program that tries to guess a mathematical model of data using < 10 operators. I won't include elementary functions, but will include % function composition and indexing into the previous data. I'm just telling you that because I can't delete this test post, and I don't want my account banned for spam.
Test thread
Hi, I'm just testing whether I can post here. Thank you.
Re: Test thread
D could be the greatest thing on the planet. Like Python, D will take over the world of coding.
Dlang installer with VSCode broken
ERRORS: -- \2023-11-05 22:21:07.370 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-dotnettools.dotnet-interactive-vscode' wants API proposal 'languageConfigurationAutoClosingPairs' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned. 2023-11-05 22:21:12.640 [info] Invoking resolveAuthority(dev-container)... 2023-11-05 22:21:12.645 [info] [LocalProcess0][resolveAuthority(dev-container,1)][0ms] obtaining proxy... 2023-11-05 22:21:12.647 [info] [LocalProcess0][resolveAuthority(dev-container,1)][2ms] invoking... 2023-11-05 22:21:12.664 [error] Cannot get canonical URI because no extension is installed to resolve dev-container: Error: Cannot get canonical URI because no extension is installed to resolve dev-container at Q.dc (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2703:10644) 2023-11-05 22:21:12.668 [error] [LocalProcess0][resolveAuthority(dev-container,1)][22ms] returned an error {"code":"NoResolverFound","message":"No remote extension installed to resolve dev-container."} 2023-11-05 22:21:12.669 [error] resolveAuthority(dev-container) returned an error after 28 ms No remote extension installed to resolve dev-container. 2023-11-05 22:21:12.672 [error] Error received from starting extension host (kind: Remote) 2023-11-05 22:21:12.672 [error] CodeExpectedError: No remote extension installed to resolve dev-container. at Q.rb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:21248) at async Q.qb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:20507) at async Q.Ob (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2703:11479) at async Q.jb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:18090) 2023-11-05 22:21:12.674 [error] [remote-connection][attempt 1] An error occurred in initial connection! Will retry... Error: 2023-11-05 22:21:12.680 [error] CodeExpectedError: No remote extension installed to resolve dev-container. at Q.rb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:21248) at async Q.qb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:20507) at async Q.Ob (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2703:11479) at async Q.jb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:18090) 2023-11-05 22:21:12.696 [error] [remote-connection][attempt 2] An error occurred in initial connection! Will retry... Error: 2023-11-05 22:21:12.697 [error] CodeExpectedError: No remote extension installed to resolve dev-container. at Q.rb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:21248) at async Q.qb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:20507) at async Q.Ob (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2703:11479) at async Q.jb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:18090) 2023-11-05 22:21:12.880 [error] [remote-connection][attempt 3] An error occurred in initial connection! Will retry... Error: 2023-11-05 22:21:12.881 [error] CodeExpectedError: No remote extension installed to resolve dev-container. at Q.rb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:21248) at async Q.qb (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2702:20507) at async Q.Ob (vscode-file://vscode-app/c:/Users/deepa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2703:11479) at async Q.jb
Re: is dmd a virus?
On Saturday, 22 October 2022 at 13:29:00 UTC, Salih Dincer wrote: On Saturday, 22 October 2022 at 09:49:28 UTC, Salih Dincer wrote: On Saturday, 22 October 2022 at 07:40:39 UTC, MGW wrote: is dmd a virus? https://www.virustotal.com report: Cybereason --> Malicious.779f29 VBA32 --> BScope.Trojan.DShell It's our sweet virus... It must have happened to every last man of us the binary code you have implemented correctly is blocked by the antivirus. SDB79 Create a viral installer for D, that attacks C++ build tool binaries. It could also inject itself into source code of developers machines, which is probably more easily done than injecting into a binary because of OS security restrictions.
Re: Real simple question... for good programmers
On Saturday, 22 October 2022 at 22:01:09 UTC, Enjoys Math wrote: On Saturday, 22 October 2022 at 21:53:05 UTC, WhatMeWorry wrote: string[] tokens = userSID.output.split!isWhite; writeln("tokens = ", tokens); tokens = ["SID", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "S-1-5-21-3823976785-3597194045-4221507747-1779", "", "", "", "", "", "", "", ""] Is there a clever way that I can discard all the extra null strings in the resultant string array? I've been playing with isControl, whitespace, etc. Ready to rip my hair out. Why not `strip`? Works on ranges: https://dlang.org/phobos/std_algorithm_mutation.html#.strip Strip won't work because it only works on the beginning and ends of the range. What you want is `remove`. See my other MWE post.
How could I fix (debug) the VisualD plugin so that it actually works with the folders / files seen in Windows 10 file man.?
As you may already know if you want to move a file or rename a folder in VisualD, you can't simply do it. I've even had to edit the project file with Notepad++ in order to repair it. So, I'm humbly asking how can we fix this? I'm considering doing something in C++ which I'd rather not because I'm reluctant about all the memory leaks I'm going to make. Right now my project folder lay in disarray and I don't feel like going through fixing the folders for the 20th time. So has anyone got a workaround for these issues (it has many). I apologize for not recalling exactly the problem, but if you use VisualD you will be made aware of them if you don't want to keep all your files in single folder.
Re: Can you access the same classes from C++ and D and vise versa, or do the classes have to not form dependency cycle?
On Sunday, 11 September 2022 at 02:14:51 UTC, zjh wrote: On Saturday, 10 September 2022 at 22:07:32 UTC, Ali Çehreli wrote: On 9/10/22 13:04, Daniel Donnell wrote: > https://dlang.org/spec/cpp_interface.html At DConf, Manu indicated that that page is outdated and that D's C++ support is actually a lot better. Update it quickly, This is a big selling point. So what is the answer here? I'm not sure what they were getting at...
Can you access the same classes from C++ and D and vise versa, or do the classes have to not form dependency cycle?
https://dlang.org/spec/cpp_interface.html According to that C++ / D .object files can interoperate both ways, but one has to be compiled before the other, order depending on direction. My question is, can you have a class C (C++) use a class D (Dlang) in such a way that D can also use C as in the article? I'm guessing using all pointers on the C++ side might work. I have never gotten rid of cyclical dependencies in C++ other than putting a bunch of classes in the same file, but in D, cyclic dependency is resolved beautifully somehow, so I can split up my classes into each their own d-module.
How do you return a subclass instance from a base class method?
I have SubclassOf derived from PosetRelation. For any poset relation, the transitivity law applies, however, I'd like to return the correct type: ``` PosetRelation transitivity(PosetRelation R, PosetRelation S) { if (R.op == S.op) { if (R.right is S.left) return new SubclassOf(R.left, S.right); } return null; } ``` How does one accomplish this in D? Because PosetRelation doesn't know about SubclassOf, in general.
Re: How do you return a subclass instance from a base class method?
``` PosetRelation transitivity(PosetRelation R, PosetRelation S) { // These if conditions are typically ordered from easiest to // most involved-to-check. if (R.op == S.op && is(typeof(R) == typeof(S)) && R.right == S.left) { return new typeof(R)( R.left, S.right, by("transitivity of " ~ R.op)); // Proof by this axiom } return null; } ``` Not sure if that would work yet. Have to test it.
Re: How do you return a subclass instance from a base class method?
On Thursday, 17 November 2022 at 05:21:05 UTC, MorteFeuille123 wrote: On Thursday, 17 November 2022 at 04:25:13 UTC, Daniel Donnelly, Jr. wrote: [...] You can use TypeInfoClass: [...] I don't get it - you never made use of b1 or b2...
Re: How do you return a subclass instance from a base class method?
On Thursday, 17 November 2022 at 05:34:49 UTC, zjh wrote: On Thursday, 17 November 2022 at 04:25:13 UTC, Daniel Donnelly, Jr. wrote: ... `crtp`, will it work? Can't use CRTP, because once you choose a derived class to pass into the template system, how do you pass in subclasses of that class and so on...
How do you print all Unicode characters in a range - I want the subscripts, can't google a range of Unicode.
``` dstring s = ""; for (dchar i='ₐ'; i < 'ₜ'; i++) s ~= i; writeln(s); ``` Doesn't work. The result I get is shit: ΓéÉΓéæΓéÆΓéôΓéöΓéòΓéûΓéùΓéÿΓéÖΓéÜΓé¢
How do we display Unicode in Visual D console output?
Right now, fresh install of VS and Visual D, all up-to-date. Can't display ∈, so how can we fix this? There is no project setting for Unicode chars. Thanks! EnjoysMath
Dub generated a visuald project for me that includes pegged + dqt (Qt widgets). Basic linking error fix?
``` Build started at 7:16 PM... -- Build started: Project: d--, Configuration: debug x64 -- Building C:\Users\fruit\OneDrive\Desktop\Code\StateMachine\D--\d--.exe... LINK : fatal error LNK1181: cannot open input file 'Qt5Widgets.lib' Building C:\Users\fruit\OneDrive\Desktop\Code\StateMachine\D--\d--.exe failed (error code 1181)! Details saved as "file://C:\Users\fruit\OneDrive\Desktop\Code\StateMachine\D--\.dub\obj\debug\dummy\d--\d--.buildlog.html" == Build: 0 succeeded, 1 failed, 4 up-to-date, 0 skipped == == Build completed at 7:16 PM and took 00.841 seconds == ``` Just wondering where / what in settings to change and what folder to point it to. Thanks! I'm making a public project on GitHub called D--. https://github.com/enjoysmath/D-- It's not a language extension, but will include new tools for visualizing your code and even refactoring it. D is like a host language for it, and also the code it will generate naturally. It's most likely only going to support a subset of D, though I will strive for the full grammar. Hence D-- sounds about right! The name is a play on the C++ is to C analogy.
Re: Dub generated a visuald project for me that includes pegged + dqt (Qt widgets). Basic linking error fix?
I see now. https://github.com/tim-dlang/dqt has examples of where these libs are found within Qt itself.