Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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
    Paul M Cohen
    @paul1956
    I haven't tried it, it will convert all C# files in solution/project and copy most/all other files to the new tree. If you start with a folder named X you end up with a new folder X_vb that should contain everything that was in X and anything with a .cs extension converted.
    Jeff Bowman
    @InteXX
    OK, I've got a solid repro now: https://1drv.ms/u/s!AodXF_j3BiWkheUQBVvdC3LHzizjAw. Funny thing is, it works as expected in C#. But not in VB. In VB, the callback is skipped entirely. More info on how to use the repro is available at the GitHub issue: https://github.com/moq/moq4/issues/1067#issuecomment-706633989. This one may need someone with a better eye for C# conversions than me.
    Jeff Bowman
    @InteXX
    That sounds like a pretty good approach. I'll have a look at it shortly. | @paul1956
    Paul M Cohen
    @paul1956
    @InteXX how did you convert it? What file has the issue?
    Jeff Bowman
    @InteXX
    I used this one: https://github.com/icsharpcode/CodeConverter. Check the GitHub link above for usage instructions. | @paul1956
    Paul M Cohen
    @paul1956
    Is anyone using JSON? The new high performance System.Text.JSON does not support VB at least for serialization. If you are interested in moving from Newtonsoft.Json to .NET Core JSON, Up Vote dotnet/runtime#43253
    Mohammad Hamdy Ghanem
    @VBAndCs
    What is the difference between this room and VB\language room?
    Jeff Bowman
    @InteXX
    I wondered that myself, before posting. Taking my lead from the room descriptions, I surmised that this room is for general VB-related conversation, while the /language room is for discussing the future of the platform. | @VBAndCs
    Paul M Cohen
    @paul1956
    In order to get performance out of JSON, they use Ref Struct in Systme.Text.JSON this is something not supported by VB and IMHO never will be, it is like unsigned math and pointers "concepts too complex" for VB developers.
    Mohammad Hamdy Ghanem
    @VBAndCs
    You can write a C# wrapper that returns to Vb what it can digest.
    Jeff Bowman
    @InteXX
    We have an answer to the Moq callback problem: https://stackoverflow.com/a/64304949. Turns out it's the fault of the VB.NET compiler. This doesn't make us look good, I'm afraid, but there it is.
    Paul M Cohen
    @paul1956
    @VBAndCs NewsonSoft.Json works I was concerned that it would start using Ref Struct (for performance) or not be supported in the future (because people move to system.text.json). I am comfortable now that I shouldn't worry about those.
    Paul M Cohen
    @paul1956
    @InteXX why is the VB compiler doing those extra conversions is that something that can be fixed? Do you know where it is happening?
    Paul M Cohen
    @paul1956
    @InteXX I ask because this was happening in other places with Char operations and was fixes to provide a performance improvement.
    Mohammad Hamdy Ghanem
    @VBAndCs
    @paul1956 They will not allow to fix this! We had this conversation before dotnet/vblang#512
    and they closed the issue. I commented today, and cyrus gave me the same argument . Seee last comments
    I just reported this. It happens in WPF for both languages on both frameworks. Seems tuple are not yet fully supported in many frameworks! dotnet/wpf#3631
    rskar-git
    @rskar-git
    @AnthonyDGreen Just noticed your twitter acct "ThatVBGuy" (https://twitter.com/ThatVBGuy) is closed. Hoping all is well.
    Jeff Bowman
    @InteXX
    He's probably scaling back a bit. One of his lamentations has been the flood of communications he's been receiving. | @rskar-git
    Good question. I don't know. I'm taking stakx's word for it. He may be interested in discussing it: https://github.com/moq/moq4/issues/1067#issuecomment-706671833 | @paul1956
    Paul M Cohen
    @paul1956

    I am looking to put a proposal to VB to get some pattern support that fits within the guidelines of what enhancements VB language can get. The first is the declaration pattern. To address the patterns below

    Select Case x
        Case TypeOf x is Something
            Dim y as Something = x
        Case TypeOf x is SomethingElse
            Dim z as SomethingElse = x
    End Select
    
    If   TypeOf x is Something then
            Dim y as Something = x
    End if

    What I need to complete it is a VB like syntax that works for both and is extensible. If should be clear for any programmer that can read VB what is happening.

    Paul M Cohen
    @paul1956
    I would like to use dotnet/vblang#541 as a starting point but it is all over the place. I don't know if it is better to start again or clean it up.
    Mohammad Hamdy Ghanem
    @VBAndCs
    A new thread would be better.
    rskar-git
    @rskar-git
    Looks like twitter acct "ThatVBGuy" (https://twitter.com/ThatVBGuy) has returned!
    Mohammad Hamdy Ghanem
    @VBAndCs
    I am stumbling in minor VB editor issues like this dotnet/roslyn#48745
    Syrus always asks me to contribute a fix, and I have no knowledge nor time. If any of you want to participate, Cyrus will walk him through. It will be a valuable knowledge to build upon later if we forked the language.
    And it will be a good thing to start up with a stable bug-free VB version.
    Mohammad Hamdy Ghanem
    @VBAndCs
    why this is allowed:
    Call New PayCheckWnd().ShowDialog()
    but not this:
    New PayCheckWnd().ShowDialog()
    Adam Speight
    @AdamSpeight2008
    @VBAndCs Do it work if you but parenthesis around the new eg. (New PayCheckWnd()).ShowDialog
    Mohammad Hamdy Ghanem
    @VBAndCs
    @AdamSpeight2008 No. VB doesn't allow expressions to start with (
    @rskar-git Thanks. I am asking why. What prevents VB from allowing that?. What makes it risky to be allowed?
    Jeff Bowman
    @InteXX
    "VB doesn't allow expressions to start with (" Hm, that's odd. I do it frequently: oErrors.AddRange((Await Me.RoleManager.CreateAsync(oCity, oRole)).Errors). Do you find this to be an unexpected quirk? | @VBAndCs