Closed Svetomech closed 7 years ago
Isn't it the moment when you truly appreciate the hosting model the other editors have? :) Sublime, Atom, VSCode they all host extensions under portable runtime (e.g. Python, Node.js).
It's a difficult one. The plugin code itself is C# so it is ultimately portable. However it integrates with N++ via x86 DLLExport layer. I remember trying once to port it to x64 but I had plenty of really strange problems and not only portability related ones. I even got an impression that x64 N++ somehow different to x86 functionality wise. Though most likely it was only an impression.
I don't have time right now to invest into this and I don't even have a x64 N++ copy for testing. I've done a very quick x64 build (attached) and you can just try it in your environment. There is a small chance that it will just work. Let me know if it indeed does.
Yeah, their hosting model is kinda superior. But I don't want to trade that off for much better performance N++ has. Sublime comes somewhat close, but I only enjoy using it on Linux.
Okay. Here's what happens after installing the DLL you provided above:
Thanks, this confirms that the N++ interop (NppPluginNETBase.cs
) that I inherited with the project template is x86 specific. I will keep this issue open and see if the author of the interop has updated it for x64.
...
OK there is an update. Judging from this post: https://notepad-plus-plus.org/community/topic/12633/npppluginnet-64-bit. I wasn't the only one who was affected.
I will plan the upgrade.
Though I have to say that it does put an extra maintenance pressure on me. Maintaining two separate synced products on N++ plugins repository is not an easy task and most likely will require N++ support. And interacting with N++ team is ... let's say... a challenge. But not an impossible one :)
Just letting you know that I only yesterday release the first cut of VSCode extension for CS-Script. It is conceptually very similar to the plugin for Sublime but it has the Debugger!!!!!
Both Sublime and VSCode plugins for CS-Script can be a good portable alternative for Notepad++.
Both Sublime and VSCode plugins for CS-Script can be a good portable alternative for Notepad++.
Wait, CS-Script is available for these editors too? The main reason I went with N++ was CS-Script (:
Wait, CS-Script is available for these editors too?
Yes it is available. :) Though VSCode plugin is just a "baby" (a couple days old). But it has the highest potential out of all.
After developing for three of those popular editors I have now pretty good understanding of their strengths and weaknesses. As well as their potential for CS-Script:
N++ plugin is the richest and the most mature. Though it is a dead end path. Not portable. The C# debugger is a nightmare to maintain. Plugin integration model is very restrictive and rather clumsy. Dev support is very difficult to get. Thus it was the most dev unfriendly. But... it still delivers the most comprehensive UX.
ST3 has the best documentation and excellent support. It was the easiest to develop for. Great community. Very good architecture. Portable. Fast. The only two real problems I can name: you cannot debug your plugin and it will never allow any feature that wold make it to look like typical IDE. No panels, toolbars... Thus integrating C# debugger will never be an option.
VSCode is the best in terms of architecture. Extension development workflow is designed correctly from the start. Excellent dev language - TypeScript. All vital sub-systems are already in-place. It has the best potential if you ask me. Though it is young and rough on edges. Doco is hard to use. Support...I am yet to see. Many vital features are still only scheduled. But... this is that one I am concentrating on. :)
Excellent dev language - TypeScript
Yeah, I fancy TS too.
Now that I think of it, does one even need CS-Script for VSCode? AFAIK it has excellent C# support and developer experience. Am I wrong? I mean, what would the advantages of using CS-Script for VSCode be?
Thank you for sharing your experience!
Currently VSCode story for C# has very strong objective to serve .NET Core. And this imposes so many limitations preventing it from being a phenomenal tool for a desktop/server app development. VSCode C# fancies only ASP.NET Core (at least currently). Thus you cannot benefit from the richness of neither .NET nor Mono:
And CS-Script fills the gap. It lets full scale desktop CLR back into the game. The extension itself is very lean. It just binds Mono Debugger, OmniSharp and CS-Script together. And CS-Script plays role of runtime host (launcher) and a project manager. That's it. Everything else is just standard VSCode functionality. With the help of CS-Script extension it is now possible for VSCode to:
And all this on top of the all rich functionality that is available with OmniSharp and MonoDebug.
Thanks for the info. I missed these features you listed when I last used VSCode. I'll be sure to check out CS-Script for VSCode the next time I install it.
Btw, I don't have anything against .NET Core. It's cool, and can also be used to write any kind of server-side applications, not only web apps.
Also, VSCode is pretty great for TypeScript. Are you developing your plugin for VSCode in VSCode? (:
Btw, I don't have anything against .NET Core.
Me neither. I am a big supporter the .NET Core move. Particularly with .NET Standard spec.
It's just for some cases Mono/.NET it is still a better choice. One obvious approach would be for VSCode to allow to fall back to Mono/.NET but they decided to not to. And this is exactly what I see as a problem. CS-Script.VSCode is just happens to be a suitable solution to this problem but it also can be other C# hosting solution. When VSCode either adds native Mono/.NET support or .NET Core reaches true maturity there will be no need for any extension like that.
While all CS-Script plugins have symbiotic relationship with their hosting editors/IDEs, CS-Script's primary objective is to bring Python user experience for C# syntax. Not to enhance editors. Thus I actually see no problem with an editor/IDE not gaining anything from CS-Script.
Are you developing your plugin for VSCode in VSCode?
Of course. I wouldn't do it any other way. :)
Screw N++, I'm going with VSCode and your extension :D
Seriously though, can't wait for .NET Core to mature enough to be on par with Mono in terms of features. But til that day comes, I'm using the latter. Especially since the most recent version (5.0) was a really great step forwards. I mean, finally abandoning XBuild in favor of MSBuild (and Roslyn)? Best thing ever.
Python user experience for C#
Never really tried that side of CS-Script. But looking at some screenshots now, I love the ability to pass console arguments by just writing a comment. I guess I'm outta check CS-Script custom syntax.
:) :) :)
I am with you on this one.
Especially since the most recent version (5.0) was a really great step forwards.
I have a quick look and found that the latest mono actually supports C# 7. Though it needs to be activated in some special way and by default it generates pdb not mdb so I will need to convert one into another on fly. Otherwise MonoDebug will not understand the symbols. But all doable.
I am overdue with some of cs-script.vscode doco but as a good substitution you can go to cs-script.sublime wiki: https://github.com/oleg-shilo/cs-script-sublime/wiki.
After all the objective is to make cs-script.vscode to do what cs-script.sublime does but to have a superior OmniSharp (Intellisense) and the mono Debugger!!!!
That wiki is actually quite informative but for complete doco go https://github.com/oleg-shilo/cs-script/wiki.
And for super light syntax reminder:
cscs.exe syntax
and CLI commands
cscs.exe cmd
Hmm, I skimmed through the wiki, and it looks really promising. But one detail in particular caught my attention. Is Chocolatey the official way to install CS-Script on Windows now? I thought it came bundled w/ appropriate plugin installers.
The script engine itself is a single file - cscs.exe (or window app version csws.exe). Thus it is just too easy to get it bundled with the products that use it. And this is what I typically do
However the whole CS-Script suite comes with plenty of other stuff:
And for that Chocolatey is a better fit as deployment technology.
I see, thanks.
Should the issue be closed?
Yeah, let's close it for now.
But if anyone is also interested it can be reopened. I am not sure when and if I'll get time to look at N++ x64 porting but at least then we can set it's status to help wanted
.
Any plans on 64-bit version? I'm using Notepad++ (64-bit) and was hoping to see CSScript.Npp work.