by

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
    If C# code doesn't contain any new syntax feature that is required to complete the job, we can use a Vazor-style solution:
    Do it in VB.NET, and generate the C# necessary project at runtime
    Mohammad Hamdy Ghanem
    @VBAndCs
    So, we can mark some classes in VB with attributes to be converted to c# and added to that generated project., and the rest of vb code goes to a dll library referenced in the C# project. Paul can provide us with robust VB to C# converter Try to do that for Azure functions. Finally we will write all in VB.NET, and trick them with a generated C# project!
    Aaron Glover
    @aarondglover
    Whoa the level of understanding you guys have with Roslyn and code gen is far beyond me! Sounds impressive... Would be a cool extension for VS.
    Mohammad Hamdy Ghanem
    @VBAndCs
    I did nothing with Roslyn in ZML. You can generate every thing as a text (code and project files are text files after all. It would need a complex code to implement ZML with Roslyn code. So, if you use an existing VB to C# converter, all the rest work if to generate the expected text files that forms the C# project and its dependencies.
    If there is a final step to load and compile the project with Roslyn, we will seek assistance. But I think this is not necessary. We can just open the C# project manually for testing. After all the functional VB code is still in VB library projects and we can debug.
    Mohammad Hamdy Ghanem
    @VBAndCs
    Or at least make the whole thing a C# project template that adds the necessary VB libray skeleton, so we focus on VB only.
    Think like this, and the experience will evolve while you are working
    We can even hide the C# files from the solution explorer, and manipulate them with VB files where any change in them triggers a VB to C# converter that overwrite the C# files.
    Mohammad Hamdy Ghanem
    @VBAndCs
    The whole idea in short: write what you want, and output what they want, so every one is happy.
    Give it some thinking, and you'll find many easy solutions.
    Aaron Glover
    @aarondglover
    Yeah that approach certainly does open up many possibilities for tooling support etc
    Aaron Glover
    @aarondglover
    It's an approach which as an extension could interativly add new project types... Think of creating a new c# project from a template, then convert it to a VB proj... Fewer complaints about lack of template support
    Paul M Cohen
    @paul1956
    Compiling code with Roslyn is not difficult if you understand what compile options and flags you need (something that VS handles for you in the background, I just learned how to include a projectReference this week), I am still learning everything that is needed. I don't know what tooling is referred to by @aarondglover.
    Aaron Glover
    @aarondglover
    I was describing a non existent tool... The general approach outlined by @VBAndCs lends it's self well to an extension for visual studio to create VB projects from C# templates/wizards. This would overcome the problem of missing visual studio templates ... new VB projects could be created on the fly after using the C# project wizard/template
    Mohammad Hamdy Ghanem
    @VBAndCs
    A new overload resolution bug and a crash
    Mohammad Hamdy Ghanem
    @VBAndCs
    untitled1.jpg
    It's working now at basic level
    There are few things to perfect, such as not suggesting tags that can appear only once
    Paul M Cohen
    @paul1956
    According to WinForms Repo singleInstance is schedule for the 5.0 release. It doesn't look extremely difficult using the existing design and using existing Core IPC functionality, I don't see needing gRPC. It would be nice if it was moved out of VB namespace so it could be used by any language but that might be a stretch.
    Aaron Glover
    @aarondglover
    I thought Kathleen ruled it out. Said it wasn't going to happen.
    What IPC methods are available in Core? Named Pipes?
    Paul M Cohen
    @paul1956
    Named pipes and memory mapped files. In the repo updated Feb 20th it listed as core 5.0 milestone. It looks like < 100 lines of code in reference source and when I dropped it in as a trial there were only a few of unsupported functions most of which are in Repo except the actual remoting which has a workaround and 1 windows API call where source to call it is provided in C# but easily ports to VB. If someone want to partner that understands remoting it could be done in a day. Then it would need to a UI in Visual Studio as does many VB features that are already in WinForms but can’t be enabled.
    Mohammad Hamdy Ghanem
    @VBAndCs
    For willing contributors:
    I added a VbXmlCompletionProvider to this repo
    You can add these two files to your Roslyn fork, in the folder Completion/CompletionProviders in the project Microsoft.CodeAnalysis.VisualBasic.Features
    It will provide HTML5 auto completion in VB.NET XML Literals, but only inside the <vbxml></vbxml> tag.
    I did this for two reasons:
    1. not to mess with other xml literals that doesn't deal with html.
    2. to support Vazor.
      I will make a VSIX for this to allow install it as a VS extension (in progress now), but my aim from publishing this, is to allow contributors to build upon to provide a generic XML literals completion provider, based on the xsd that user supplies in the context as this missing feature was described in the docs
    Mohammad Hamdy Ghanem
    @VBAndCs

    I created the vbxml auto completion VSIX. It provides auto completion for HTML5 in VB.NET, but it is allowed only inside vbxml tags:

    <vbxml>
       <!—auto completion for HTML 5 is available here -->
    </vbxml>

    give it a try:
    https://github.com/VBAndCs/Vazor/blob/master/vbxmlCompletionProviderVSIX.zip?raw=true
    Feedback is appreciated:
    https://github.com/VBAndCs/Vazor/issues

    Aaron Glover
    @aarondglover
    Awesome work... I'll give it a go and let you know
    Mohammad Hamdy Ghanem
    @VBAndCs
    @aarondglover Thanks. Enjoy :)
    Hisham Bin Ateya
    @hishamco
    Hi Mohammed
    Mohammad Hamdy Ghanem
    @VBAndCs
    @hishamco Hi Hisham.
    Filippo Bottega
    @filippobottega
    Hi Mohammed, Vazor it's a really interesting project. I'm a VB programmer, VB is my first and favorite programming language. But after years of C# evolution and after a lot of C# to VB conversion tasks I have lost the faith and I have moved to C#. Moreover I'm moving my projects to .NET Core and .NET Standard with C#. I'm really tired to refresh my knowledge of 2 languages to produce the same output. It's a waste of time for me. Anyway I'll remember VB for my life.
    Mohammad Hamdy Ghanem
    @VBAndCs
    You can keep VB.NET code in .NET standard libraries, and use it from C#. In fact WinForms and WPF VB projects will run on .NET 5, so you don't want to convert to C#.
    Hisham Bin Ateya
    @hishamco
    Exactly all should work together
    Filippo Bottega
    @filippobottega
    Sure! You're right. For a mid-term solution it's possibile to mix VB projects and C# projects. For a long-term solution, I prefer to convert all to C#. The thing that convinced me to make the big step is how C# and VB treat the linq queries. There are some subtle differences that prevent online conversion tools to transparently translate linq queries from VB to C# and viceversa. The time I needed to convert C# snippets found on internet into VB grew longer and longer. At the end I have realized that C# is the .NET Esperanto. It's only my opinion but there are two community of programmers that make same things and spent a lot of time to translate between C# and VB what they are thinking. We are one people, the .NET people, and we waste our time because we speak 2 different languages to make the same thinks. And nobody admit that, everyone doesn't accept to change his programming language. But Microsoft has made the choice to focus the effort to improve C# better than VB and I, painfully, have accepted that.
    Hisham Bin Ateya
    @hishamco
    This broke the language parity that Microsoft talked about long time ago
    Filippo Bottega
    @filippobottega
    Exactly! It's the Darwinian selection. Tremendous to feel like the losing species...
    And I finally swallowed the bitter bite: { } ;
    Mohammad Hamdy Ghanem
    @VBAndCs
    So, we are after all the machine code people and should have only one operating system, one web browser and one programming language so we have one big happy planet with no compatibility issues , no need for any code conversion, and the best sells ever :)
    Filippo Bottega
    @filippobottega
    Ash nazg durbatulûk, ash nazg gimbatul,
    ash nazg thrakatulûk agh burzum-ishi krimpatul.
    :D
    Aaron Glover
    @aarondglover
    I'm hearing you Filippo... I'm also feeling battle weary and you're right about Linq expression conversions being the bane of conversion
    @filippobottega
    Mohammad Hamdy Ghanem
    @VBAndCs
    Mohammad Hamdy Ghanem
    @VBAndCs
    Cory Smith
    @DualBrain
    (RANT) Abandoning #VisualBasic for something else is EXACTLY the reason why more people are jumping ship... think about it... what effort is there to support it if you just wait them out so they give up and you don't have to. This is exactly what certain people want to have happen... why... because building software shouldn't be easy. This isn't a #VisualBasic thing. This isn't a .NET thing. This is a reality that has existed for, well, over 50 years. And #VisualBasic isn't the only language that suffers (or suffered) from this... look at COBOL or Delphi. Everyone should be able to build software. Additionally, all languages shouldn't look, basically, the same. Since when did C become the right way to write code? In the end, it's up to us as a community to build a stronger community so that we can have a voice. We can no longer "vote with our wallet" (as the product is pretty much free at this point)... so we have to find a way to *vote with our voice, vote with our action". This means we have to invest time and effort instead of simply handing over our hard earned cash to the product vendor. What does that actually all mean in the end... that is what we need to figure out. The answer to this certainly isn't... "oh well, guess I'll give up, join the other crowd and be miserable using something that isn't even my second choice"... especially if it is possible that we can address (as a community) the reasons why one might feel the need to have to make a choice.
    Cory Smith
    @DualBrain
    Now... what is one thing that we could all do to "force" action? I'll give you one simple target space... AZURE. What, if anything, is preventing us from fully leveraging AZURE as a #VisualBasic developer? (I can't answer this as the only thing I use in AZURE is AzureSQL which has nothing to do with language choice.) So what is the "killer app" that prevents us, as #VisualBasic devs to do "stuff" in AZURE? Does anyone know? Once this is known... how do we convince a ton of #VisualBasic devs that they NEED this and we, as a community, start shouting to Microsoft saying... "hey, we'd love to spend our money on AZURE, but... ummm, you apparently don't want our money because __ doesn't work with #VisualBasic... and NO!, we don't want to have to build that in __". I can bet money that if something like this were to happen, you'd see a change in the tide. Why? Because AZURE is WAY!!!! MORE!!!! IMPORTANT!!! than Visual Studio, F#, C#, #VisualBasic and even Windows to the bottom line of Microsoft and anything that can clearly impact that bottom line is going to be addressed.
    (DISCLAIMER: I do own a very, very, very small number of shares in Microsoft and I can clearly see that, as a shareholder, they are clearly focused on Azure. Because I have such an insignificant number of shares... my voice doesn't mean jack diddly at any shareholder meeting. ;-) )
    Filippo Bottega
    @filippobottega
    Sorry but my approach is more pragmatic: I don't care about a specific language. I have developed using C, C++, C#, VBA, VB.NET, ABAP, SQL (Sql Server and Oracle), MATLAB and so on. Recently I have tried to study GO. What I need is the best path to solve what customers ask me to solve. And the best path is a mix of language simplicity, tools, frameworks, tutorials, documentation, samples, and communities. Sometimes I prefer to suggest a product already done instead of develop a new one. For my work using VB or C# is equivalent because other factors of the mix are more o less the same. But there are a lot of examples written in C# instead VB and I need to avoid to loss time to translate from C# to VB. For the moment I don't see any killer application or use case where VB could be better than C#.