March 05, 2021

On 04/03/2021 14:29, Imperatorn wrote:
> A few questions.
> 
> How hard would the following be:
> 
> 1. Highlight code as dead or alive in static if
> 
> 2. Show typeid when hovering over a variable
> 

Adding to what Bastiaan said:

"Lowlighting" disabled code in static if() similar to debug/version conditions is on my list of things to implement, but indeed, it might get confusing in templates because a random instantiation is currently used to show semantic information for its members.

Hovering a variable should show its type in the tool tip (note that you can click the type in the tip to jump to its definition). But your example shows that there is a problem with the expression "typeid(T)", as no information is shown when hovering T inside the parenthesis. Probably an omission in the visitor.
March 05, 2021

On 04/03/2021 14:43, James Lu wrote:
> On Tuesday, 2 March 2021 at 08:58:15 UTC, Rainer Schuetze wrote:
>> Hi,
>>
>> development on Visual D, the Visual Studio extension that adds D language support to VS 2008-2019, has been rather slow recently, but finally the results of recent months have been released.
>>
>> Some highlights of this new version:
>>
>> - semantic engine updated to frontend 2.095.1
>>
>> - adds "adornments" (Visual Studio terminology) to the call
>> site of parameters that are passed by (mutable) ref, out or lazy. See
>> https://rainers.github.io/visuald/visuald/images/parameterstorage.png
>> for some examples.
>>
>> - integrates dfmt for command "Format Document"
>>
>> See https://rainers.github.io/visuald/visuald/VersionHistory.html for a full list of changes.
>>
>> You can find the update installer or a full installer bundled with latest versions of DMD and LDC here:
>>
>> https://rainers.github.io/visuald/visuald/StartPage.html
>>
>> Cheers,
>> Rainer
> 
> Hi,
> 
> I've gotten D articles to the frontpage of Hacker News 4 times.
> 
> I think this would be a good candidate to get to the frontpage of Hacker News again.
> 
> I want you to submit it to Hacker News, then add a comment saying:
> 
> * Explain why you made this
> * Explain what's interesting about Visual D
> * Offer to explain questions

> 
> Use the title: "Visual Studio Code for D Language 1.1.0"

Thanks for the suggestion. I'm not a user of these social news sites, though, and even don't have time to keep track of discussions on the D forums lately.

BTW: Visual D is not an extension for VS Code, but plain ol' Visual Studio.
March 05, 2021
On Friday, 5 March 2021 at 08:50:59 UTC, Rainer Schuetze wrote:
>
>
> On 04/03/2021 14:29, Imperatorn wrote:
>> A few questions.
>> 
>> How hard would the following be:
>> 
>> 1. Highlight code as dead or alive in static if
>> 
>> 2. Show typeid when hovering over a variable
>> 
>
> Adding to what Bastiaan said:
>
> "Lowlighting" disabled code in static if() similar to debug/version conditions is on my list of things to implement, but indeed, it might get confusing in templates because a random instantiation is currently used to show semantic information for its members.
>
> Hovering a variable should show its type in the tool tip (note that you can click the type in the tip to jump to its definition). But your example shows that there is a problem with the expression "typeid(T)", as no information is shown when hovering T inside the parenthesis. Probably an omission in the visitor.

Ok, thanks for working on Visual D. Imo it's the best IDE we have in D currently. One thing that would be awesome though is better dub support, like, imagine having a workflow similar to c# and nuget. Code-D has solved this by having a search bar,

I don't know if that would be possible in VS tho, I'm just talking before thinking. It's risky and I like it 😎
March 05, 2021
On Thursday, 4 March 2021 at 13:42:47 UTC, Imperatorn wrote:
> https://filebin.net/19gupoeedfdjx5tx
>
> One GIF is the behaviour in C# I would like to have in D as well with static if, and the other is displaying typeid on hover.

The second is a debug session. Visual Studio doesn't show type information in debug session for C# either, only variable name and value.
March 05, 2021
On Friday, 5 March 2021 at 10:57:05 UTC, Kagamin wrote:
> On Thursday, 4 March 2021 at 13:42:47 UTC, Imperatorn wrote:
>> https://filebin.net/19gupoeedfdjx5tx
>>
>> One GIF is the behaviour in C# I would like to have in D as well with static if, and the other is displaying typeid on hover.
>
> The second is a debug session. Visual Studio doesn't show type information in debug session for C# either, only variable name and value.

True, but could it?
March 06, 2021

On 05/03/2021 12:26, Imperatorn wrote:
> On Friday, 5 March 2021 at 10:57:05 UTC, Kagamin wrote:
>> On Thursday, 4 March 2021 at 13:42:47 UTC, Imperatorn wrote:
>>> https://filebin.net/19gupoeedfdjx5tx
>>>
>>> One GIF is the behaviour in C# I would like to have in D as well with static if, and the other is displaying typeid on hover.
>>
>> The second is a debug session. Visual Studio doesn't show type information in debug session for C# either, only variable name and value.
> 
> True, but could it?

Visual D already does that with the help of the semantic highlighting: if an identifier is classified as a type or compile time value, it suppresses the debugger data tool tip and presents the usual one.
March 06, 2021
On Saturday, 6 March 2021 at 06:59:28 UTC, Rainer Schuetze wrote:
>
>
> On 05/03/2021 12:26, Imperatorn wrote:
>> On Friday, 5 March 2021 at 10:57:05 UTC, Kagamin wrote:
>>> On Thursday, 4 March 2021 at 13:42:47 UTC, Imperatorn wrote:
>>>> https://filebin.net/19gupoeedfdjx5tx
>>>>
>>>> One GIF is the behaviour in C# I would like to have in D as well with static if, and the other is displaying typeid on hover.
>>>
>>> The second is a debug session. Visual Studio doesn't show type information in debug session for C# either, only variable name and value.
>> 
>> True, but could it?
>
> Visual D already does that with the help of the semantic highlighting: if an identifier is classified as a type or compile time value, it suppresses the debugger data tool tip and presents the usual one.

Oh, I see. What about dub integration. How much effort would it be to have something similar to what code-d has in vsc? Guesstimation?
March 06, 2021
Thx Rainer, always much appreciated.

On Tuesday, 2 March 2021 at 08:58:15 UTC, Rainer Schuetze wrote:
> See https://rainers.github.io/visuald/visuald/images/parameterstorage.png for some examples.

Very cool.

March 10, 2021

On 06/03/2021 12:55, Imperatorn wrote:
> On Saturday, 6 March 2021 at 06:59:28 UTC, Rainer Schuetze wrote:
>>
>>
>> On 05/03/2021 12:26, Imperatorn wrote:
>>> On Friday, 5 March 2021 at 10:57:05 UTC, Kagamin wrote:
>>>> On Thursday, 4 March 2021 at 13:42:47 UTC, Imperatorn wrote:
>>>>> https://filebin.net/19gupoeedfdjx5tx
>>>>>
>>>>> One GIF is the behaviour in C# I would like to have in D as well with static if, and the other is displaying typeid on hover.
>>>>
>>>> The second is a debug session. Visual Studio doesn't show type information in debug session for C# either, only variable name and value.
>>>
>>> True, but could it?
>>
>> Visual D already does that with the help of the semantic highlighting: if an identifier is classified as a type or compile time value, it suppresses the debugger data tool tip and presents the usual one.
> 
> Oh, I see. What about dub integration. How much effort would it be to have something similar to what code-d has in vsc? Guesstimation?

I'm not much of a dub user. Last time I checked, using it as a package manager was fine, but not as a build tool. Dependency checks were incomplete and rather slow. The visuald project generation is pretty dated and doesn't support multiple configurations which kind of breaks the usual VS workflow.

I think for better integration dub project generation needs to be improved (and extended to vcxproj files), or Visual D has to do it itself from "dub describe" (if that's possible). The latter would also allow seamless updates of the project in the background.

Then, integration of package management can be considered.
March 12, 2021
On Wednesday, 10 March 2021 at 07:29:44 UTC, Rainer Schuetze wrote:
>
>
> On 06/03/2021 12:55, Imperatorn wrote:
>> On Saturday, 6 March 2021 at 06:59:28 UTC, Rainer Schuetze wrote:
>>>
>>>
>>> On 05/03/2021 12:26, Imperatorn wrote:
>>>> On Friday, 5 March 2021 at 10:57:05 UTC, Kagamin wrote:
>>>>> On Thursday, 4 March 2021 at 13:42:47 UTC, Imperatorn wrote:
>>>>>> https://filebin.net/19gupoeedfdjx5tx
>>>>>>
>>>>>> One GIF is the behaviour in C# I would like to have in D as well with static if, and the other is displaying typeid on hover.
>>>>>
>>>>> The second is a debug session. Visual Studio doesn't show type information in debug session for C# either, only variable name and value.
>>>>
>>>> True, but could it?
>>>
>>> Visual D already does that with the help of the semantic highlighting: if an identifier is classified as a type or compile time value, it suppresses the debugger data tool tip and presents the usual one.
>> 
>> Oh, I see. What about dub integration. How much effort would it be to have something similar to what code-d has in vsc? Guesstimation?
>
> I'm not much of a dub user. Last time I checked, using it as a package manager was fine, but not as a build tool. Dependency checks were incomplete and rather slow. The visuald project generation is pretty dated and doesn't support multiple configurations which kind of breaks the usual VS workflow.
>
> I think for better integration dub project generation needs to be improved (and extended to vcxproj files), or Visual D has to do it itself from "dub describe" (if that's possible). The latter would also allow seamless updates of the project in the background.
>
> Then, integration of package management can be considered.

As far as I remember (circa 2015) Mono-D [0] was the IDE with the best Dub support - you could just open dub.json files as if they were project files (sln/csproj). This was by far the most seamless experience back when I was using IDEs more heavily.

Visual-D could also use Dub as a library, similar to [1][2]. Also it would be nice to integrate code.dlang.org, just like NuGet is integrated for .NET in VS.

[0]: https://wiki.dlang.org/Mono-D
[1]: https://github.com/Pure-D/workspace-d
[2]: https://github.com/atilaneves/reggae/tree/master/src/reggae/dub/interop