Hi to all the knights who say Nim,
I want to report that I posted a project I started to Github,
https://github.com/kobi2187/cs2nim
it relies on this c# program: https://github.com/kobi2187/CsDisplay
I have just started, so very early stages, but the code compiles, the design and structure are done, and now the implementation details part wants to begin :-)
So with that out of the way, let me explain my aim here: The dotnet world is pretty large, has many many libraries and its SDK is mature. C# is the main language, and all .net dlls can be "disassembled" back using tools such as ILSpy or dnSpy (even if it was written in F# or other dot net language)
There is a Microsoft library called Roslyn, it basically provides access to the C# AST, and is backed by Microsoft to support the latest version of the language.
This project aims to port (pure) C# code directly to Nim code.
It's ambitious of course, but considering the implications I think it's quite a good idea; if this works, we'll have many proven and mature libraries at our disposal, and can make Nim take off more easily.
Non-goals: I don't think we should support every construct, like annotations and metadata, or even LINQ syntax (though some can be easy to transform to normal code).
I would like to support the most useful, and find a way to map the C# semantics to Nim. Most of which can be quite a literal translation, while others need extra support on the Nim side.
Lastly, this is still at the experimental stage, but I don't see why it shouldn't work. Please tell me what you think.
I also apologize in advance, as my time is quite limited, so I won't be much of a leader. This can pace slowly, but you guys are very welcome to 'fork' on Github, and add what's missing for you.
Pick a motivation, and see what is needed to port the app or lib you're interested in.
Thanks, Kobi
~/D/p/cs2nim> cd ../CsDisplay/
~/D/p/CsDisplay> dotnet build CsDisplay.csproj ; dotnet bin/Debug/netcoreapp2.2/CsDisplay.dll samples/
~/D/p/CsDisplay> cd ../cs2nim/
~/D/p/cs2nim> nim c -r writer.nim ../CsDisplay/samples/