Re: d++: Error: Could not execute `dmd c.o .\foo.d -offoo.exe`:
On Saturday, 21 November 2020 at 17:25:46 UTC, Jack wrote: I got the error: Error: Could not execute `dmd c.o .\foo.d -offoo.exe`: Error: unrecognized file extension o dmd version: DMD32 D Compiler v2.094.1-dirty gcc version: gcc version 6.3.0 (MinGW.org GCC-6.3.0-1) DMD expects .obj for Windows. So you'll probably have to use the MS compiler or clang to emit an MSVC-compatible object file, and then use either -m32mscoff or -m64 for DMD.
Re: d++: Error: Could not execute `dmd c.o .\foo.d -offoo.exe`:
On Saturday, 21 November 2020 at 19:34:31 UTC, Ferhat Kurtulmuş wrote: On Saturday, 21 November 2020 at 17:25:46 UTC, Jack wrote: I'm trying to get d++ to work on Windows 10/64-bit machine but it doesn't work. I'm using the very same code samples c.c, c.h and foo.dpp from here https://github.com/atilaneves/dpp/tree/master/bash but when I went to run: d++ foo.dpp c.o I got the error: Error: Could not execute `dmd c.o .\foo.d -offoo.exe`: Error: unrecognized file extension o dmd version: DMD32 D Compiler v2.094.1-dirty gcc version: gcc version 6.3.0 (MinGW.org GCC-6.3.0-1) d++ the least one, build from sources my OS is windows 10/64-bit. What am I missing? I have never used dpp, but the github page says you should use LDC, not DMD. And I could not find anything implying gcc is supported. what the docs says is about to use ldc2 to build from source code, which I did. That failed dmd call is done by d++ internally.
Re: d++: Error: Could not execute `dmd c.o .\foo.d -offoo.exe`:
On Saturday, 21 November 2020 at 17:25:46 UTC, Jack wrote: I'm trying to get d++ to work on Windows 10/64-bit machine but it doesn't work. I'm using the very same code samples c.c, c.h and foo.dpp from here https://github.com/atilaneves/dpp/tree/master/bash but when I went to run: d++ foo.dpp c.o I got the error: Error: Could not execute `dmd c.o .\foo.d -offoo.exe`: Error: unrecognized file extension o dmd version: DMD32 D Compiler v2.094.1-dirty gcc version: gcc version 6.3.0 (MinGW.org GCC-6.3.0-1) d++ the least one, build from sources my OS is windows 10/64-bit. What am I missing? I have never used dpp, but the github page says you should use LDC, not DMD. And I could not find anything implying gcc is supported.
d++: Error: Could not execute `dmd c.o .\foo.d -offoo.exe`:
I'm trying to get d++ to work on Windows 10/64-bit machine but it doesn't work. I'm using the very same code samples c.c, c.h and foo.dpp from here https://github.com/atilaneves/dpp/tree/master/bash but when I went to run: d++ foo.dpp c.o I got the error: Error: Could not execute `dmd c.o .\foo.d -offoo.exe`: Error: unrecognized file extension o dmd version: DMD32 D Compiler v2.094.1-dirty gcc version: gcc version 6.3.0 (MinGW.org GCC-6.3.0-1) d++ the least one, build from sources my OS is windows 10/64-bit. What am I missing?
Re: Reflection on the book D web development.
It's not my related to a lack of knowledge of the d-language but the complexity of the vibe.d framework itself. What I understand are : 1: jade/diet .dt templates, inheritance,includes,markdown. 2: A simple form with POST method. Then it stops. What I find too complex: - Sessions, session data , session variables - Handler functions and delegates, compile-time reflection, prefixes, annotation. - Authentication - Validating user input This can be improved by improving documentation in very small steps. As comparison here a tutorial of ruby-flask which uses only small steps so everything can easily and completely be understood. Something like that for vibe.d would be very interesting. https://www.youtube.com/watch?v=3mwFC4SHY-Y
Re: Reflection on the book D web development.
On Friday, 20 November 2020 at 19:12:38 UTC, Alaindevos wrote: I bought the book "D Web Development". I understand only 20% of the book,the other 80% is way above my head. Compare, I own a book on flask development, and I understand 100% of it. Which means I can use dlang for anything except QT and serious web development ... How would you like this to be improved? I'm personally interested in making vibe.d more accessible.
Re: lambdas with types
On Friday, 20 November 2020 at 14:08:23 UTC, jmh530 wrote: Doing something like below fails because I don't seem to be able to make a templated lambda that just takes types. Is the only way to do something similar to create a separate function to handle the condition, or is there some other way to do something with similar flexibility? import std.stdio: writeln; import std.meta: allSatisfy; void foo(Args...)(Args args) if (allSatisfy!(x => is(x == double), Args)) { writeln("works"); } void main() { foo(1.0, 2.0); } with type functions this syntax should work.