Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Cory Smith
    @DualBrain
    @aarondglover Are you seeing similar activity elsewhere? If so, please share. ;-)
    @InteXX That is AWESOME!
    Cory Smith
    @DualBrain
    @paul1956 Just a quick comment to say that the implementation of internal function conversion is interesting. I had an opportunity last night to take advantage of it; it got me about 90% there for the particular example I was working with. There was a collision between the parameter name and the name used in the method... I simply added an X on the end of the one in the "internal function" to work around that. Ultimately I pulled the labdas (there were actually two of them in this example) out into regular functions (which ultimately solved the name collision - providing a cleaner result IMO). For what it's worth, I usually extract these as their own methos named OriginalMethod_InternalMethod passing by reference where I can any parameters - but in other cases, I have to create member variables to hold. With all that said, like I said, the approach your taking is very interesting... just providing some feedback. If there is any one suggestion I can think if that would definately be useful is for you to place some sort of a "TODO:" comment explaining that these were internal methods and "may" require additional work.
    Cory Smith
    @DualBrain
    @paul1956 Also, I am in the process of, or rather, am in "new machine hell". During this process I reached out to Tangible Software, the makers of Instant VB to inquire about any sort of release notes on what updates have taken place... with the actual question being "do you have any sort of release notes". The answer was, surprisingly, no. I then inquired about what improvements have been made in the recent past so I can justify giving them more money; the answer(s) I received were less than satisfactory. Don't get me wrong, they make a decent product... but I just can't afford to throw money into a pit where I am unable to, at the very least, see that that is ultimately producing a better result that would somehow improve my experience (over the long haul). All of this is to say that, at least on my new machine - and going forward, your project is officially my GOTO conversion tool. As I use it more, I'm sure I'll be "inspired" to contribute so that I'll eventually be able to say "our project". ;-)
    Jeff Bowman
    @InteXX
    @aarondglover I know! I thought we were going to have to wait until SIX ;-)
    @aarondglover BTW, I hope to have that Azure Functions project template for you by the end of this next week. I'll ping you when it's ready.
    Paul M Cohen
    @paul1956
    @DualBrain thanks. It would be better if I knew C# better. I expressly didn't want to make local functions regular functions, in some cases they might just work but looking through their use I see too many places they rely on local variables or are nested I would rather just fix the current implementation where issues come up. The biggest issue is where to insert the Lambda. I will add a TODO, I have been trying to remove them as I gain confidence that the translation is correct. What do you think about a "TODO Check" that does not include the original code.
    Cory Smith
    @DualBrain
    Watching local functions in usage... they remind me of nothing more than a semi-structured goto (or, if it were possible in VB, a gosub). In a world where elitist devs (of which many use a particular language) like to state that each method needs to be a maximum number of lines and each file needs to be a maximum number of lines... I'm a bit confused how local functions fit.
    Cory Smith
    @DualBrain
    Reading the docs... I find the following quote interesting: "Local functions make the intent of your code clear. Anyone reading your code can see that the method is not callable except by the containing method." Ummmm... if Immo Landwerth (who works on .NET) misses that a set of functions are local when reviewing pull requests... I think that statement can be said to be invalid. In this particular case witnessed, the two methods that were made local didn't need to be... nothing within the method utilized anything in the parent. They were local for the sake of being local... the conversion, in this particular case, was as simple as turning them into regular methods. With that said, watching Immo utilize them... I can say that there are cases where they are definately convenient; converting methods that where he utilized them clearly showed their usefulness as the conversions were a bit more challenging. With that said, as his project progressed - I've seen cases where he's removed those local functions in favor of a more "regular" approach. In then end, though, not having them in VB certainly doesn't prevent me from accomplishing the same result.
    Cory Smith
    @DualBrain
    @InteXX Are you going to have that Azure Functions template on Gist/GitHub? I'd like to point to it over at https://gotbasic.com/vb.html
    Paul M Cohen
    @paul1956
    @DualBrain If you read Anthony's blog about the differences between VB and C# wrt Lambda's there is an excellent discussion on why VB didn't get or need local functions. I had never used Lambda's until recently after doing local functions I see there they can have a place but I code fix to organize single use private functions just above where then are used might be a better solution maybe I should suggest to CodeMaid.
    Paul M Cohen
    @paul1956
    Anyone able to get the designer in 16.7 Preview 1 to work with VB?
    Mohammad Hamdy Ghanem
    @VBAndCs
    NameOf can't be used with anonymous types and Tuples
    dotnet/roslyn#44503
    Mohammad Hamdy Ghanem
    @VBAndCs
    I used C# local function once and I regretted if. I was lazy to pass many local vars as arguments , so, I did it locally, but it is a mess, and locals can change anywhere and need concentration. I will never do it again.
    Cory Smith
    @DualBrain
    @paul1956 I was able to get it working for a few projects... however, it seems to bork Form1.vb in the CSharpToVB project. I'm trying to experiment with adding a dark mode and keep having to undo changes after opening up the form in the new form designer in VS16.6.
    Paul M Cohen
    @paul1956
    @DualBrain Yes, the designer prepends an incorrect "CSharpToVBApp." before a user control. I just uploaded a version that is compatible with 16.6 designer except you have to replace "CSharpToVBApp." with "" every time the designer saves. With 16.7 Preview 1 there is a timeout and with large solutions or on busy systems the designer will fail to start and the only recovery is to restart VS.
    Paul M Cohen
    @paul1956
    @DualBrain do not open form1 in designer in 16.6 it will delete the custom controls. In 16.7 Preview 1 designer works except as specified above.
    Paul M Cohen
    @paul1956
    @DualBrain If you look under options Advanced you will see support for changing colors. I did try to create Theme support for my VB CodeCoverage UI tool https://github.com/paul1956/Code-Coverage but theme support came out unusable and I lost interest. It does have a lot of infrastructure to parse VS Theme files and shares a lot of code with the converter display.
    Matt Lacey
    @mrlacey
    Anyone interested in building Windows apps in the future with VB.NET should give a thumbs-up to this issue microsoft/microsoft-ui-xaml#2497
    The team seem to be saying they're not going to support VB.NET unless there's enough public interest as tracked via that issue.
    Paul M Cohen
    @paul1956
    @DualBrain the Button thing is also the CheckBox thing and other controls, a fix is at https://developercommunity.visualstudio.com/content/problem/1041288/core-31-winforms-button-missing-from-toolbos.html. Start with the fixes 1 at a time because the 3rd option really resets Visual Studio. People have reported it with VB and C#.
    Cory Smith
    @DualBrain
    @mrlacey I just added to that thread... (not sure they are going to appreciate the feedback).
    Cory Smith
    @DualBrain
    It would have been one thing to make the statement that they need to update the roadmap... wait to see what the new roadmap stated... but no... the issue was then replied with "we need up votes". Are you @#$&)@#% kidding me? This is such a copout. If they don't get "enough", they don't have to do it and they don't have to suffer the blame of not doing it. And, what exactly, is "enough" up votes?
    Cory Smith
    @DualBrain
    I would like to bring to the attention of this group in hopes that if you know who Alessandro Mandelli (https://github.com/Padanian) is that can you reach out to him and give him a slep up the back side of the head (Gibbslap) for his behavior and help educate him in the fact that comments like "F# is not necessary" (https://github.com/dotnet/maui/issues/115#issuecomment-634451262) are uncalled for and he should really apologize. He's actively refused to do so and I'm guessing he just doesn't understand what damage he's causing.
    Paul M Cohen
    @paul1956
    With some guidance from @jnm2 I was able to add support for await foreach which is required to support gRPC. At the same time I add code to translate "typical" gRPC applications. I have successfully translated most of the gRPC samples using project conversion I end up creating a C# project to handle the proto file and there is some manual fixup for now.
    Cory Smith
    @DualBrain
    @paul1956 Nice!
    Paul M Cohen
    @paul1956
    @DualBrain there is a lot of code necessary to translate await foreach and in the translation you loose the intent with all the stuff that gets added and changed. await foreach becomes Try While Finally.
    Jeff Bowman
    @InteXX
    @aarondglover @DualBrain - I've published an Azure Functions template here: https://github.com/InteXX/Templates. It's also available on NuGet: https://www.nuget.org/packages/Intexx.Templates/
    Mohammad Hamdy Ghanem
    @VBAndCs
    I don't use Azure Functions till now, but it is a useful addition to VB.NEt. Thanks @InteXX
    Jeff Bowman
    @InteXX
    @VBAndCs There's more to the story, but I want to wait until I wrap up an active Microsoft support case to discuss the details.
    Mohammad Hamdy Ghanem
    @VBAndCs
    The source code of Small basic is written in C#
    I think of using this to build a new VB.NET version out of VS.NET and Roslyn. This can be easier.
    Paul M Cohen
    @paul1956
    If you have a solution my converter should be able to convert it all at once and if not provide feedback. The first proof of a language used to be the ability to compile itself.
    Mohammad Hamdy Ghanem
    @VBAndCs
    It can't be fully converted, since it depends on Blazor.
    Many compilers written with the same language they compile. The first version is written with another compiler, then next versions can be written with the first version. This happened with C#, and later with VB.NET.
    Anyway, the SB compiler can be a good start to study compilers b4 jumping into Roslyn. The source code is very small :)
    Paul M Cohen
    @paul1956
    Posted a converter that includes Solution file conversion support. Would love some feedback
    Mohammad Hamdy Ghanem
    @VBAndCs
    Dozens of languages have LSP servers https://langserver.org/ but not VB.net! LSP can make the language hosted in many editors. I think we need to give VB.NET this ability.
    Paul M Cohen
    @paul1956
    If someone wants to host a GitHub site I would be interested in contributing, is there a link to what needs to be done?.
    Paul M Cohen
    @paul1956
    VB is listed in the specification but there is no implementation
    Mohammad Hamdy Ghanem
    @VBAndCs
    and we can make use of the C# implementation https://github.com/OmniSharp/csharp-language-server-protocol
    And again, I think we can start with asmall basic, build a LSP server for it and host it in VS.NET.
    Small basic is a perfect test lab for starters
    Mohammad Hamdy Ghanem
    @VBAndCs
    I think we need to take a look at this RoslynPad: A cross-platform C# editor based on Roslyn and AvalonEdit.
    This can be an open source alternative to VS.NET written in C# (VS code is written in TS).
    We can:
    1. Convert the source to VB if we want.
    2. Make the editor support VB.NET.
    3. It will be smarter to create a language server for VB.NET to support Intellisense in dozens of editors. so, we get step 2 out of the box.
    4. support all frameworks such as ASP.NET Core, Razor, Blazor, EF Core, Xamarin ... etc in RoslynPad. Having an os editor and a language server will make this easier than extending VS.NET.
    5. Evolve a new VB.NET compiler for our customized editor.
    Jeff Bowman
    @InteXX
    I noticed on https://langserver.org/ that Visual Studio is notably absent. That seems a bit odd. | @VBAndCs
    Paul M Cohen
    @paul1956
    Don't know if others noticed but Code Cleanup for VB that briefly worked for VB in Preview 2 was disabled in Preview 3. I did dotnet/roslyn#48092 to try to enable it and add full support for VB. It currently works for Format Document and "Sort, Remove and Separate Imports" and has code for all the features supported by VB existing CodeFixes that are common with C#, about 9 configurable (by EditorConfig) cleanups in all. It only works in Tests at the moment. Would love if someone could review and maybe provide feedback as to why only 3 tests actually pass (some give error when test runs most just do nothing and 1 passes when it shouldn't) and maybe how to enable it in Visual Studio. There is a reviewer assigned but he is currently busy working on critical build issues. The failing tests are skipped and some have comments on why they fail.
    Jeff Bowman
    @InteXX
    Calling all VB.NET experts: would anyone care to have a look at a thorny apparent problem (moq/moq4#1067) with Moq? At least there's a temporary workaround, but it only applies to my particular domain model. Others will have to come up with their own. It's a head-scratcher for sure...
    Jeff Bowman
    @InteXX
    Correction: The PoC contained some errant code. When corrected, it failed to reproduce the problem. So I've deleted the Fiddle and fallen back to the original description of the problem, found here: https://stackoverflow.com/q/64272740
    Jeff Bowman
    @InteXX
    Will your solution converter work with a new MVC 5 project? | @paul1956