Re: Visual D showing weird errors

2021-04-26 Thread Imperatorn via Digitalmars-d-learn
On Monday, 26 April 2021 at 08:00:08 UTC, Raimondo Mancino wrote: Hello, I'm new to the language; I just started learning it a few months ago. I'm doing okay with it, I find it very versatile and fast to learn. I come from Java and C/C++ and I think D solves tons of problems I had with these.

Visual D showing weird errors

2021-04-26 Thread Raimondo Mancino via Digitalmars-d-learn
Hello, I'm new to the language; I just started learning it a few months ago. I'm doing okay with it, I find it very versatile and fast to learn. I come from Java and C/C++ and I think D solves tons of problems I had with these. I was trying the Visual D extension to Visual Studio, but after

Re: Visual D showing weird errors

2021-04-26 Thread Raimondo Mancino via Digitalmars-d-learn
On Monday, 26 April 2021 at 10:44:14 UTC, Mike Parker wrote: You might try to build outside of VS and see if you get the same errors. The weird thing is that I get these errors just in the errors frame, but building works just fine without errors. If I run devenv.exe directly on the

Re: Visual D showing weird errors

2021-04-26 Thread Raimondo Mancino via Digitalmars-d-learn
On Monday, 26 April 2021 at 08:40:01 UTC, Imperatorn wrote: On Monday, 26 April 2021 at 08:00:08 UTC, Raimondo Mancino wrote: Hello, I'm new to the language; I just started learning it a few months ago. I'm doing okay with it, I find it very versatile and fast to learn. I come from Java and

Re: Visual D showing weird errors

2021-04-26 Thread Mike Parker via Digitalmars-d-learn
On Monday, 26 April 2021 at 11:03:19 UTC, Raimondo Mancino wrote: On Monday, 26 April 2021 at 10:44:14 UTC, Mike Parker wrote: You might try to build outside of VS and see if you get the same errors. The weird thing is that I get these errors just in the errors frame, but building works just

Re: Visual D showing weird errors

2021-04-26 Thread Mike Parker via Digitalmars-d-learn
On Monday, 26 April 2021 at 08:00:08 UTC, Raimondo Mancino wrote: Since these are thrown by the standard library, I suspect this could be a bug; but maybe I'm just missing something? Thank you for your help. You might try to build outside of VS and see if you get the same errors.

Re: Visual D showing weird errors

2021-04-26 Thread Johann Lermer via Digitalmars-d-learn
On Monday, 26 April 2021 at 08:58:25 UTC, Raimondo Mancino wrote: According to -v: DMD64 D Compiler v2.096.0-dirty Well, that says it all, doesn't it? I'm not familiar with the windows versions, but that doesn't seem to be an offical release - at least I never had a dmd2 that claimed to be

Re: Visual D showing weird errors

2021-04-26 Thread Mike Parker via Digitalmars-d-learn
On Monday, 26 April 2021 at 10:40:44 UTC, Johann Lermer wrote: On Monday, 26 April 2021 at 08:58:25 UTC, Raimondo Mancino wrote: According to -v: DMD64 D Compiler v2.096.0-dirty Well, that says it all, doesn't it? I'm not familiar with the windows versions, but that doesn't seem to be an

Re: Visual D showing weird errors

2021-04-26 Thread Imperatorn via Digitalmars-d-learn
On Monday, 26 April 2021 at 11:03:19 UTC, Raimondo Mancino wrote: On Monday, 26 April 2021 at 10:44:14 UTC, Mike Parker wrote: You might try to build outside of VS and see if you get the same errors. The weird thing is that I get these errors just in the errors frame, but building works just

Re: win64 DLL stdout printing after main process completes

2021-04-26 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 26 April 2021 at 14:44:53 UTC, cc wrote: I run a D program through the basic cmd.exe, it runs with no stdout buffering. You'll find the same thing with C programs, since it is actually the C standard library that does this buffering rather than D. If it is writing to a character

Re: Suitability of D for a Crossplatform Graphical App

2021-04-26 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sun, Apr 25, 2021 at 08:10:17PM +, graw via Digitalmars-d-learn wrote: > A few years ago I know there was some efforts to get D building for android > with LDC and dlangui building for android. I don't know about dlangui, but I had success getting hello world working on android, including

Re: Visual D showing weird errors

2021-04-26 Thread Raimondo Mancino via Digitalmars-d-learn
On Monday, 26 April 2021 at 15:54:36 UTC, Adam D. Ruppe wrote: Do you have a separate object.d in your current directory? That can cause all kinds of weird errors. Otherwise I suspect this is a conflict between two versions of the compiler. If you had one installed before then updated it or

Re: Visual D showing weird errors

2021-04-26 Thread Johann Lermer via Digitalmars-d-learn
On Monday, 26 April 2021 at 10:42:54 UTC, Mike Parker wrote: (According to -v: DMD64 D Compiler v2.096.0-dirty) That's actually normal for the Windows versions. I'm not sure where it comes from, but it's always there. Ouuu, that's bad advertising, isn't it? Who wants to use dirty software, it

Re: Visual D showing weird errors

2021-04-26 Thread Raimondo Mancino via Digitalmars-d-learn
On Monday, 26 April 2021 at 14:17:34 UTC, Imperatorn wrote: Also, be sure to join on Discord as well (https://discord.gg/bMZk9Q4) if you're not already there! Thank you, I think I'll join.

Re: Visual D showing weird errors

2021-04-26 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 26 April 2021 at 08:00:08 UTC, Raimondo Mancino wrote: C:\D\dmd2\src\druntime\import\core\sys\windows\dll.d: \object.d(18): can only `*` a pointer, not a `typeof(null)` Do you have a separate object.d in your current directory? That can cause all kinds of weird errors. Otherwise

Re: win64 DLL stdout printing after main process completes

2021-04-26 Thread cc via Digitalmars-d-learn
On Monday, 26 April 2021 at 13:44:19 UTC, frame wrote: On Sunday, 25 April 2021 at 15:01:25 UTC, cc wrote: Adding a note in case anyone stumbles across this with a similar problem: Adding `stdout.setvbuf(0, _IONBF);` to both the main and DLL will cause D to autoflush after every write call

Re: win64 DLL stdout printing after main process completes

2021-04-26 Thread frame via Digitalmars-d-learn
On Sunday, 25 April 2021 at 15:01:25 UTC, cc wrote: Adding a note in case anyone stumbles across this with a similar problem: Adding `stdout.setvbuf(0, _IONBF);` to both the main and DLL will cause D to autoflush after every write call without requiring a manual flush (which seems to happen

Re: win64 DLL stdout printing after main process completes

2021-04-26 Thread frame via Digitalmars-d-learn
On Monday, 26 April 2021 at 14:44:53 UTC, cc wrote: Visual Studio 2019 is installed, as well as... quite a few runtimes, multiple for Visual C++ 2005, 2008, 2010, 2012, 2013, 2015-2019. like me If I run a D program through the basic cmd.exe, it runs with no stdout buffering. Does it

Re: Visual D showing weird errors

2021-04-26 Thread Imperatorn via Digitalmars-d-learn
On Monday, 26 April 2021 at 17:37:26 UTC, Rainer Schuetze wrote: On 26/04/2021 10:00, Raimondo Mancino wrote: [...] The problem is that the semantic engine used by Visual D is working with the DMD frontend of 2.095, but "noreturn" is a new language feature introduced with 2.096. You can

serve-d and emacs

2021-04-26 Thread Christian Köstlin via Digitalmars-d-learn
Does anybody use serve-d with emacs (lsp-mode or eglot)? I would love to see the configuration! Kind regards, Christian

Re: Visual D showing weird errors

2021-04-26 Thread Rainer Schuetze via Digitalmars-d-learn
On 26/04/2021 10:00, Raimondo Mancino wrote: > Hello, I'm new to the language; I just started learning it a few months > ago. I'm doing okay with it, I find it very versatile and fast to learn. > I come from Java and C/C++ and I think D solves tons of problems I had > with these. > > I was

What's a good approach to DRY with the block code of a case-statement?

2021-04-26 Thread Jack via Digitalmars-d-learn
I have a block of code that the only thing that change is the type passed in one of the template functions called so I'd like to make a DRY for this. But I'm not just replacing by a function due to control-flow, for example, there are if-statements where one just break and the other return 0.

Re: What's a good approach to DRY with the block code of a case-statement?

2021-04-26 Thread ag0aep6g via Digitalmars-d-learn
On Monday, 26 April 2021 at 20:39:55 UTC, Jack wrote: I have a block of code that the only thing that change is the type passed in one of the template functions called so I'd like to make a DRY for this. But I'm not just replacing by a function due to control-flow, for example, there are

Re: serve-d and emacs

2021-04-26 Thread WebFreak001 via Digitalmars-d-learn
On Monday, 26 April 2021 at 18:45:08 UTC, Christian Köstlin wrote: Does anybody use serve-d with emacs (lsp-mode or eglot)? I would love to see the configuration! Kind regards, Christian if you configure it yourself, feel free to share the configuration and maybe PR it to serve-d repo.

Re: win64 DLL stdout printing after main process completes

2021-04-26 Thread Mike Parker via Digitalmars-d-learn
On Monday, 26 April 2021 at 14:44:53 UTC, cc wrote: The buffering also happens under cygwin shells (I'm not building with cygwin, I just like using their bash shell). If I run a D program through the basic cmd.exe, it runs with no stdout buffering. However any other situation (shell,