Visual Studio Code as IDE

Community Forums/Monkey2 Talk/Visual Studio Code as IDE

dopeyrulz(Posted 2015) [#1]
Any thoughts on using Visual Studio Code as a base for a cross platform IDE (Windows, Mac, Linux)? It's base is now open-source + it's fully extensible allowing language and debuggers to be created...

https://code.visualstudio.com/
https://github.com/Microsoft/vscode

https://code.visualstudio.com/docs
https://code.visualstudio.com/docs/extensions/overview
https://code.visualstudio.com/updates

I've briefly used it when first announced but I attended a session about it at Microsoft Ignite Australia this week and it looked quite impressive.


Shagwana(Posted 2015) [#2]
So its now possible to add new languages?, last time I looked this was on the wish list but not high priority.


dopeyrulz(Posted 2015) [#3]
Yep appears so! in Typescript or JS I think. They have some examples up there.


Shagwana(Posted 2015) [#4]
That is great news, this could be a great IDE for monkey (and blitz).


skid(Posted 2015) [#5]
I have been using Code as my main text editor for 3 months now. Besides no nonsense code editing on all platforms the node.js debugging is pretty special. On the Mac the toolbar experience is also truely inspired.

It is based on the github editor Atom which is where it get's a lot of it's charm in the style department.

The git integration the Microsoft engineers have added is second to none so it will be interesting to see with them paying it forward and finally open sourcing the entire project if atom snaps up some of the better features.


marksibly(Posted 2015) [#6]
Looks pretty good, but extending this to work with Monkey2 - with syntax highlighting, auto-complete etc - is outside my comfort zone. If anyone else wants to give it a shot though, I'm happy to help in any way I can.

I have pretty much decided that the 'official' IDE for Monkey2 will be written in pure Monkey2, using a custom GUI module. I'll make a more detailed update concerning this soon, but note that you wont be 'forced' to use this GUI when writing monkey apps - you can still just 'Extend Window' and do all rendering and input handling yourself. But I think having a 'game oriented' GUI built into monkey2 is a Very Good Thing for those who don't want to write their own. Yes, Qt support would be nice, but it's a monster of a framework, very hard to install/build, and IMO not useful for games (which are still my priority). Perhaps a bit later down the road when things have settled a bit and more tools are available to deal with the complexity of converting huge frameworks, Qt support will happen.

I realize this will be an unpopular decision with people who would rather I was working on a 'Jungle2' style mega-IDE, but as I've said before, I feel this is best left to third parties while I concentrate on monkey2 itself. And writing an IDE in monkey2 is certainly forcing me to do that.


dopeyrulz(Posted 2015) [#7]
Sounds good either way Mark - certainly important to have a base IDE up front for users. Perhaps this could be a good community project at some stage which can be slowly built-upon over time.


Richard Betson(Posted 2015) [#8]
I have pretty much decided that the 'official' IDE for Monkey2 will be written in pure Monkey2

Bravo! Excellent way to go.

I also am pleased that I can use my own GUI.:D


Shinkiro1(Posted 2015) [#9]
What about standard controls like textareas? (talking about the IDE)
They behave very specific to platforms and it's really annoying when they don't do what you expect.

For example:
On OSX you can use ALT + LEFT/RIGHT to jump words, CMD + LEFT/RIGHT to jump to beginning/end of lines.
You can then combine this with SHIFT to select characters. Undo support is also built right into every textarea.

All I am saying is that some of these widgets are really complex and rebuilding the same behaviour is not an easy task.


skid(Posted 2015) [#10]
I have pretty much decided that the 'official' IDE for Monkey2 will be written in pure Monkey2, using a custom GUI module.


Hmm, perhaps it is time to consider the separation of church and state. Is Monkey2 going to be a language or a solution?

The GUI module spins my propellor but thought of Monkey2 as a product and not a language offering feels kind of new to me.

I expect the development environment you are building like mojo1 in Monkey-X will be both a showcase of the language's abilities and the mother of all unit tests so on that front alone I applaud the gui effort. I am hoping that unlike mojo1 it will not be monolithic in nature and implement a more BlitzMax driver layer which I thought was key to success of the modular yet standardised BlitzMax graphics, sound and gui offerings.


Paul - Taiphoz(Posted 2015) [#11]
Given the co-operation between Jungle and BRL I was thinking that the MX2 IDE would probably be some form of Jungle Lite or something.


marksibly(Posted 2015) [#12]
> Is Monkey2 going to be a language or a solution?

Monkey2 will still be a 'language + set of std modules', but I've never really considered NOT releasing it without some kind of IDE/editor. The only choice to be made was whether it was gonna be Ted2, or something else.

> Given the co-operation between Jungle and BRL I was thinking that the MX2 IDE would probably be some form of Jungle Lite or something.

There will hopefully be a monkey2 version of Jungle (as long as Ziggy doesn't lose interest!) but after having talked with Ziggy about some of the issues involved with integrating an IDE with mx2cc, I realized there's a lot for me to learn here and I learn best by doing. The goal here is really to add some features to mx2cc that will be of use to IDE developers in general. Perhaps a pipe-dream, but I'm giving it a shot.

Plus, there is also the issue that Jungle is currently Windows only...


skid(Posted 2015) [#13]
Would it be fair to say that inclusion / support of emscripten has been at the expense of exploring integration of M2 with desktop toolkits such as say QT<quick>?


RDS(Posted 2015) [#14]
Given the co-operation between Jungle and BRL I was thinking that the MX2 IDE would probably be some form of Jungle Lite or something.


Jungle is Windows only Monkey 2 is not. Unless Jungle is port to the other supported platforms this would be a mistake IMO.


Danilo(Posted 2015) [#15]
MX2 is free, cross-platform, open-source software - and you don't bundle something like that with proprietary closed-source software (Jungle) anyway.
Mark seems to care more about ziggy's commercial product, while he completely ignored the open source enhancements of Ted, called Jentos IDE.
It's sad. Possible Helpers in the FOSS project don't get any valueable feedback from the main developer. It just gets ignored instead!

While I'm still waiting for MX2 to become useable, I'm looking at Haxe again, and found the following Video from WWX conference 2015
(yes, they are at the point to have small conferences and real-live meetings):
- "Quaxe, infinity and beyond" by Daniel Glazman.

It's about Quaxe, a cross-platform, native, GUI solution (mobile and desktop), using Qt. But the developer of Quaxe is asking questions
about Haxe and Haxe Foundation itself. The main concerns:
Just one or two main developers, concentrating too much at game programming, and Haxe Foundation has only 60k Euro income per year (how reliable it is?),
Haxe needs more communication, and there are no press releases about new versions, no articles at magazines and web pages -
so it's virtually unknown out there, etc....!?

Reminds me of MX(2) company and status, somehow. And it's an open-source project, too. Worth watching and thinking about, IMO.
To avoid MX2 making the same mistakes. It's problems from another free open-source project that should and could be addressed.
Haxe is little bit similar to MX2, and it even generates code for more targets. Looks like it is THE competitor to watch, and learn from.
It even has the same problems as MX(2) when it comes to a fully integrated IDE...

They seem to be one step beyond MX2, and Haxe is already 10 years old... while MX2 is just at the beginning.

- BabylonHX cross-platform 3D engine (Provides executable 3D examples for Android, Windows, HTML5/WebGL - and runs on Windows, Mac, Linux, iOS, Android, BlackBerry, FirefoxOS, Tizen, HTML5)

MX(2) is not alone and exclusive! Don't make the same mistakes again! MX(2) is not the only native super-cross-platform solution available!

Monkey gets even mentioned at WWX conference:
- "Kha" by Robert Konrad
"Monkey is not as much competent when it comes to graphics..." - round about 31:52 minutes.

Peace!


marksibly(Posted 2015) [#16]
> They behave very specific to platforms and it's really annoying when they don't do what you expect.

This can be easily handled using key mapping tables for doc navigation. Pretty sure this is what Qt does too, as it's mapping's aren't *quite* right.

> Possible Helpers in the FOSS project don't get any valueable feedback from the main developer. It just gets ignored instead! What the **** is this all about!?

[edited by me - please try and keep it civil, we've done pretty well so far]

I'm not sure what help I can give the Jentos guy right now, but I assume he's aware of mx2 so he's welcome to join in here and ask any questions he wants in the meantime. I should probably be more aggressive in seeking out people who could contribute to mx2 in future, but right now I'm concentrating 100% on getting things off the ground.


marksibly(Posted 2015) [#17]
Also, curious to hear what people think of VSCode's 'tabless' documents approach? Instead, it uses a sort of 'recent/edited documents' list at the top of the file browser tree.

I quite like the idea of this, but I do like tabs - until you get too many of them anyway. Has anyone had used VSCode enough to say whether it works better or worse than good old tabs?


MikeHart(Posted 2015) [#18]
I have pretty much decided that the 'official' IDE for Monkey2 will be written in pure Monkey2, using a custom GUI module.


Sounds kinda like Monk to me.


dawlane(Posted 2015) [#19]
Microsoft VSCode's interface approach appears to have been poached from Qt Creator.


dmaz(Posted 2015) [#20]
I really love how vscode implements tabless, autosave, "working files" and git...the feel of the editor is really almost perfect for me. I've been using Atom this past summer and now that vscode has extensions I'll be switching.

I own both blide and jungle and they are really really great... but the fact that they are windows only for languages that targeted multiple platforms is a real problem. I think the days of commercial editors are gone, atom delivered a big hit to that market and now with this latest vscode?!

IMO a GUI library is better left to 3rd party while solid editor support out of the box is more important. Writing a linter and integrating the debugger in vscode would be a better solution.

unless...
The goal here is really to add some features to mx2cc that will be of use to IDE developers in general. Perhaps a pipe-dream, but I'm giving it a shot.

these features are not applicable to those editors.

all that said... I think one of the best and easiest marketing things (in terms of ROI) Mark can do now is to fully integrate Monkey 2 into one of the existing "up and coming" open source editors. vscode or atom.... preferably vscode for me.


Danilo(Posted 2015) [#21]
> [edited by me - please try and keep it civil, we've done pretty well so far]

Sorry, of course you are right!


Shagwana(Posted 2015) [#22]

add some features to mx2cc that will be of use to IDE developers in general.



Giving us ways to extract the keywords of the language, invoke and use the debugger would go a large way towards helping.


impixi(Posted 2015) [#23]
The levels of abstraction and middleware-dependency these days is absurd.

To add Monkey as a supported language to VS Code I need to install node.js, Yeoman and Yeoman VS Code generator.

What the hell is Yeoman, you might ask? That's a good question and one I cannot answer with certainty, despite reading the walls of text on their website.

Part of the overview:


Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive.

To do so, we provide a generator ecosystem. A generator is basically a plugin that can be run with the `yo` command to scaffold complete projects or useful parts.



Argh! Why do I need this to add language support to a Microsoft tool? Are you kidding me?

I recall several years ago adding support to Notepad++ for my own coding language and it took about half an hour, including reading up on how to do it. It's already taken twice as long investigating VS code "extensions" and I'm even more confused now than when I started. And nothing to show for it.

Sorry, had to vent.


Paul - Taiphoz(Posted 2015) [#24]
Plus, there is also the issue that Jungle is currently Windows only...
-Mark

I would love to see some data on the spread of users between those working with monkey on windows and those using either apple or linux, I suspect there are far more apple users than linux but I suspect that windows dwarfs them both.

@Danilo with regard to your earlier gripe about mark to utilizing all the tweaks and additions made by the community(correct me if I'm wrong) like jentos but are you saying that the jentos guy tried to get mark to pull in all his improvements into ted and was ignored or am I getting the wrong end of the stick.


dawlane(Posted 2015) [#25]
@impixi:
>The levels of abstraction and middleware-dependency these days is absurd.
I agree. Especially when the documentation is lacking and confusing. It can take more time to figure out how to install and configure such tools than to start from scratch with your own.

>What the hell is Yeoman, you might ask? That's a good question and one I cannot answer with certainty, despite reading the walls of text on their website.
I would think that the best way to describe Yeoman would be as a "Configurable Project Wizard".
This with any luck should help explain a few things.

And for those who are using Linux and wish to try adding support (or whatever). You will have to update nodejs from the nodejs sources github site.
Quick start for Ubuntu/Linux Mint
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

sudo npn install -g npm
sudo npm install -g yo generator-code



secondgear(Posted 2015) [#26]
I've been using Adobe Brackets as my default text editor in OS X (switched away from Sublime, Brackets seems to start faster on my old hardware). There is a way of adding support for new languages as well, and the editor is cross-platform, free and open-source. Take a look if you're interested:
https://github.com/adobe/brackets/wiki/Language-Support


impixi(Posted 2015) [#27]
@dawlane:

Thanks for the link. Wow, just wow.

Apparently these days I need a middle-ware tool (Yeoman), that requires a middle-ware library (node.js), to execute a middle-ware module (a "Generator") to build a framework that possibly requires middle-ware libraries downloaded from various sites around the Internet... To "extend" a Microsoft product.

I've been researching other "customizable" code editors (Atom, Brackets, Geany, etc) and they're only marginally better.

I might as well code my own, purpose-built, MX2 IDE "from scratch"!


dopeyrulz(Posted 2015) [#28]
Apparently these days I need a middle-ware tool (Yeoman), that requires a middle-ware library (node.js), to execute a middle-ware module (a "Generator") to build a framework that possibly requires middle-ware libraries downloaded from various sites around the Internet... To "extend" a Microsoft product.

This is the open-source Microsoft! No one wanted the closed-source version...

I believe these tools are required for those wishing to develop extensions rather than those consuming them from the extension store - most people won't require these external tools.


Nobuyuki(Posted 2015) [#29]
It's hammers all the way down.
http://discuss.joelonsoftware.com/?joel.3.219431.12

Don't get me wrong, the simpler it is for the end user, the happier I am with it... as long as it isn't me who has the code or maintain the thing!


marksibly(Posted 2015) [#30]
> I've been using Adobe Brackets as my default text editor in OS X

That's very nice, very similar to VSCode too. Wonder which came first? Good to see IDE's becoming more streamlined these days!


dawlane(Posted 2015) [#31]
I wonder what ever happened to the KISS principle? I think that a lot of programmers that come up with frameworks based on or use other framework that again are based on or use other frameworks are just asking for trouble. First they will be the only ones who know how to use it, unless the spend a fair amount of time to write decent documentation that can be understood by anyone other than computer scientists. Secondly, all it takes is for just one of the frameworks used to become obsolete or poorly maintained and then their entire framework becomes virtually useless. This in the end can cost a developer a fair amount of time and money, if they have used said programmers framework to start with.


impixi(Posted 2015) [#32]
@dawlane:

I agree. To be honest I don't like having to install 3rd party compilers and SDKs when using Monkey. But I understand the days of self-contained programming environments like Blitz3D and BlitzMax are long gone, at least for one-man companies like BRL. But it does frustrate me that huge companies like Microsoft, with massive financial and personnel resources, are adopting the same dependence on external middleware.

Regarding IDEs: Monkey's TED is a good example of KISS and that's enough for me. However, other people want a Visual Studio IDE equivalent, featuring line numbering, autocomplete, block folding, project framework generation, etc. And it seems the latest IDE fads are git integration, "snippets" and folder-based project management systems.

I can see a case for most of those features, though they add significant complexity for IDE developers and sometimes even for the end-users. Whether "super" IDEs make us better software developers is up for debate.

Autocomplete, if not implemented smartly, gets in my way. And mandatory project framework generation is the bane of my existence for various reasons.


skid(Posted 2015) [#33]
@impixi, I assume you have looked at the wealth of plugins for Code and the minimalist manner in which the plugin browser is [not] implemented?

Rather than judging it for what it isn't I applaud Code for being the foundation of a very happy user base if my own milage is anything to go by.

Your disrespect for node.js is unfathomable. It is not middle ware, it is the runtime model that took PHP's crown and has been ruling the internet of heavy lifting for many years now.


impixi(Posted 2015) [#34]
@skid

My criticisms of VS Code only relate to "extending" the product - for example adding Monkey as a supported language. To do so will require that I install and learn 3rd party middleware, generate and modify Typescript/Javascript frameworks, write some TextMate template files, etc. Surely a company with Microsoft's formidable resources could have provided a "simpler", more self-contained approach without external dependencies?


impixi(Posted 2015) [#35]
Regarding node.js: Google "node.js criticism" - smarter people than me will explain it better. TL:DR: *mostly* unnecessary complexity, in *most* cases.

EDIT: In any case I don't "disrespect" node.js, just think it unnecessary in most cases.


dopeyrulz(Posted 2015) [#36]
Surely a company with Microsoft's formidable resources could have provided a "simpler", more self-contained approach without external dependencies?


This is the new Microsoft - wanting to work across multiple platforms thus requiring using products that are cross-platform and also established in the market. As explained at the Connect announcement a lot of it is based around what clients/users use in their day to day business lives and how that can be leveraged.

As long as the end user can easily and quickly install plugins/extensions I've got no problems myself.


Richard Betson(Posted 2015) [#37]
Regarding IDEs: Monkey's TED is a good example of KISS and that's enough for me.

Thats my view as well. Easy to use and no complications. I have always stuck with what Mark provides as an IDE. ;)