Fox developper "UNBOXING XSHARPDEV " experience
Posted: Mon Apr 25, 2022 1:10 pm
I want to share an experience with the Xsharp Forum.
A bug in the latest revision v2.11.0.1 made me wonder why what happened? (a confusion between variables, free procedures, class methods and arrays that at first I reported as a warning and then I realized that it was a very important error that triggered my alerts. For more details follow the following link Warning, not error: incorrect confuse a method with a field or memvar. · Issue #988 · X-Sharp/XSharpPublic (github.com)
As to my modest understanding the problem was in the compiler, I downloaded XSharpDev from GitHub and began to try to understand it since it contains a gigantic accumulation of culture poured out by Robert (no one is surprised at this point if I say he is a genius, right?)
I began to absorb culture via the XSharpDev project and from there the next title emerges. If you continue reading keep in mind that there may be gigantic mistakes because I am trying to tell the experience of learning, know how to excuse them and please do not hesitate to observe them to continue learning
Unboxing XsharpDev. How is the XSharp language built?
Physically the main project of XSHARPDEV is XSharp.CodeAnalysis.dll (there is a similar one for c# developed by MS), this is the "Heracles" of this story, the program written by Robert in C# where all own and third-party components are integrated. Robert uses resources from the Open Source community and if they are not enough he simply creates his own.
Particularly for the bug I mentioned at the beginning Robert modified XSharp/src/Compiler/XSharpCodeAnalysis/Binder/Binder_Invocation.cs, This is the link for the most curious, although at this point it is almost an anecdote: .
What are the main components?
I reiterate my apologies if I'm wrong, I continue to order parts according to the following criteria: what I think is most important first:
A. Is there anyone who has traveled the same path I am traveling and documenting the experience?
B. Is it possible to shorten our learning curve with community guidance?
C. How many people we are? I'm trying to acknowledge the FoxPro community, looking for a feedback.
D. Is there a way to do step-by-step execution of language creation?
E. How to debug Roslyn Analyzer project? I could not find within XSharpDev any project template like Analizer*vsix.
F. How to debug ANTLR component?
Best regards
Juan
A bug in the latest revision v2.11.0.1 made me wonder why what happened? (a confusion between variables, free procedures, class methods and arrays that at first I reported as a warning and then I realized that it was a very important error that triggered my alerts. For more details follow the following link Warning, not error: incorrect confuse a method with a field or memvar. · Issue #988 · X-Sharp/XSharpPublic (github.com)
As to my modest understanding the problem was in the compiler, I downloaded XSharpDev from GitHub and began to try to understand it since it contains a gigantic accumulation of culture poured out by Robert (no one is surprised at this point if I say he is a genius, right?)
I began to absorb culture via the XSharpDev project and from there the next title emerges. If you continue reading keep in mind that there may be gigantic mistakes because I am trying to tell the experience of learning, know how to excuse them and please do not hesitate to observe them to continue learning
Unboxing XsharpDev. How is the XSharp language built?
Physically the main project of XSHARPDEV is XSharp.CodeAnalysis.dll (there is a similar one for c# developed by MS), this is the "Heracles" of this story, the program written by Robert in C# where all own and third-party components are integrated. Robert uses resources from the Open Source community and if they are not enough he simply creates his own.
Particularly for the bug I mentioned at the beginning Robert modified XSharp/src/Compiler/XSharpCodeAnalysis/Binder/Binder_Invocation.cs, This is the link for the most curious, although at this point it is almost an anecdote: .
What are the main components?
I reiterate my apologies if I'm wrong, I continue to order parts according to the following criteria: what I think is most important first:
- Obviously ROSLYN or actually "SDK Compiler Platform" (by MS).
o The official repository is here dotnet/roslyn: The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs. (github.com)
o Released by Microsoft a few years ago for the community
o Xsharp uses a static image of a historical version of Roslyn, it's important to say because I don't know how far away from the latest version of the platform it is and perhaps this comment is of little importance at the moment. Robert, neatly, made changes in 198 of the 10297 files that make up the Open-Source project by putting the compilation policy #if XSHARP before. - MSBuild, the MS build engine. I will not comment, but if you want to understand at least a little the details and why there are many things within XSharpDev it is essential to know it specially to understand the strategy of continuous improvement and how is the work done by Robert in search of support in our community
- ANTLR, a tool for defining languages, has a strange name "ANother Tool for Language Recognition"
o The version in use is almost the latest ANTLR4 https://github.com/antlr
o Strategically Robert chooses this successful open-source tool for the manufacture
of languages that standardizes the way to assimilate old XBase languages with the same origin, but with small or huge differences generated by the evolution of each one for more than 30 years. At the same time guaranteeing the accompaniment of the ANTLR community, much larger and more diversified than ours (XSHARP) (at least for now)
o In the Xsharp blog I found a historical document where Robert explains a little why he joins the project, you can find it in https://www.xsharp.eu/articles/blog/hav ... t-our-mind
o It is a gigantic universe, also open source, invented by "another Robert". There is a book written by its Author and the idea is that the grammatical rules for each language are defined (from a simple calculator to languages as diverse as SQL, JavaScript and others), which are then parsed to generate source code c# or others, which then translates Robert to Types recognized by Roslyn. Then the result is the DLL that understands our PRGs.
o Those rules are defined in a 1500-line file (yes, it's very powerful!) and include all the syntax of the language. If you are curious, the file is this XSharpDev/XSharp.g4 at main · X-Sharp/XSharpDev (github.com)
o Someone can answer: is it necessary to buy and read the whole book or is there a shorter way? - Dot Net Arcade. Sharing Infrastructure Across .NET Core (by MS)
I do not want to go into detail, it makes our work easier, coordinates the distribution of all the components, projects of tens of thousands of files are automatically in “My Computer” and in that of all the participants of this world network and we share them collaboratively and everything works respecting the indispensable seniority of Robert, the one who knows.
You can find it in github.com/dotnet/arcade
Basically, this allowed me to test the fix that I myself reported almost immediately after Robert made the adjustment in version 2.11a generating the entire project and signing it digitally with the same public signature without waiting for the release of the new version of XSharp 2.12 soon to be published. - XUNIT Unit Test projects (Xunit.Net) a free, open source, community-focused unit testing tool for the .NET Framework.
Another strategic choice of Robert, without a mechanism for unit testing, it is impossible to validate the development of a programming language. This is where I believe lies the secret to XSharp's success as a stable and continuously evolving finished product firmly conducted. - SandCastle Documentation tool and Help File Builder (SHFB) , inside <https://github.com/EWSoftware>
This powerful and popular tool even adapted by Robert a few years ago to the needs of Xsharp both for the construction of the online help that is distracted by the application and to feed the online help on the web
The source code for these plugins can be found in our Github repo: <https://github.com/X-Sharp/XSharpPublic ... Tools/SHFB> - Inno Setup 5: A free and popular installer for Windows programs https://jrsoftware.org (by Jordan Russell) The version used is 5, the last one is 6.2.
- I leave the list open, surely there is some component that I do not know enough to understand if it is more or less important. For me, it is important to finish understanding the resolution of the powerful dynamic code so exploited by FoxPro programmers because FoxPro is also an interpreter. I searched X# Online Help on Scripting and I need to understand: How does all this happen thinking of Roslyn+ANTLR+Xsharp.Team.Magic?
- Recognize the other dialects because it is essential. All dialects are important, it is clear that some are practically finished assimilating by XSharp and others like FoxPro are halfway there. It is much more difficult simply because, unlike the others, it became a giant, it grew too much.
- To know worthily the components that I mention to be able to understand the challenge of XSharp, to be able to put yourself in Robert's shoes and try to actively accompany him with his team in the feat to cover us all, particularly FoxPro. This doesn't have to scare anyone who just wants to simply program in XSharp as we do in FoxPro. But I must be honest, some of us have and must accept the challenge in order to collaborate.
A. Is there anyone who has traveled the same path I am traveling and documenting the experience?
B. Is it possible to shorten our learning curve with community guidance?
C. How many people we are? I'm trying to acknowledge the FoxPro community, looking for a feedback.
D. Is there a way to do step-by-step execution of language creation?
E. How to debug Roslyn Analyzer project? I could not find within XSharpDev any project template like Analizer*vsix.
F. How to debug ANTLR component?
Best regards
Juan