Microsoft Adds Node.js Support To Visual Studio
shutdown -p now writes "Coming from the team that had previously brought you Python Tools for Visual Studio, Microsoft has announced Node.js Tools for Visual Studio, with the release of the first public alpha. NTVS is the official extension for Visual Studio that adds support for Node.js, including editing with Intellisense, debugging, profiling, and the ability to deploy Node.js websites to Windows Azure. An overview video showcases the features, and Scott Hanselman has a detailed walkthrough. The project is open source under Apache License 2.0. While the extension is published by Microsoft, it is a collaborative effort involving Microsoft, Red Gate (which previously had a private beta version of similar product called Visual Node), and individual contributors from the Node.js community."
...does it even Clippy?
Won't purchase without.
CLI paste? paste.pr0.tips!
I'm sure the NodeJs hipsters running the latest flavor of Linux with custom desktops will close out their sublime text and immediately wget that.
Does anybody have dollars to bet against my donuts that they will require the use of proprietary keywords and extensions?
Doing anything else would be so bizarre for Microsoft.
Obama's legacy: (N)othing (S)ecure (A)nywhere and (T)error (S)imulation (A)dministration
Please, for everyone's sanity, stop it with the JavaScript crap; it's a terrible language, a terrible platform for applications, and supporting it is just prolonging it's Reign of Terror. (this is why we still have flash).
-SaNo
If you know of a better client side web scripting language that has wide spread browser support, we are listening.
nothing? Yeah, I thought so....
HA! I just wasted some of your bandwidth with a frivolous sig!
But Node.js is the trendy new thing!
-- "So they told me that using the download page to download something was not something they anticipated." - Bill Gates
Visual Studio is a huge organization, and only a subset of people work on the C compiler.
The people behind VS C89 work and Node.js are entirely different people, with different funding and business justifications.
I work on VS LightSwitch. I never talk to the C compiler team about anything.
My opinions are my own, and do not necessarily represent those of my employer.
C89 doesn't web scale.
There are many teams in Microsoft. The one that does Node.js (which is also the one that did Python) is different from the one that does Visual C++.
That said, so far as I know, Visual C++ is C89-conformant. Did you mean C99? If so, they're working on it - in fact, VS 2013 includes most of C99 standard library, as well as _Bool, compound literals and designated initializers.
How 'bout C89 support?
For that matter, how about C64 support? And small enough to fit on floppy disks...
Kind of pointless to post this here, you'll mostly just get bad jokes from ca. 2002.
Oh, does it have clippy?! (desperate gaze around room to see who's lauging)
Pfft, they'll probably embrace and extinguish it lolzerlolzers haha lolzers!
Oh, where's monkey boy to announce it! Terr heerrrrp!
What? There still is an C compiler team for VS? I thought they mostly just dragged the same C compiling engine from version to version, possibly just doing minor adaptations to keep it working with the newest VS.
By the way Wikipedia says that VS is C90 compliant (woohoo, what an improvement...). Anyway, if someone believes that is wrong, feel free to fix the article. :)
Why can't Microsoft put out a Visual Studio plugin for Powershell with full intellisense, breakpointing, inspections, etc. ?
Sad :-(
C90 is the same thing as C89 (it was originally ANSI C89, later adopted as ISO C90).
http://blogs.msdn.com/b/vcblog/
My opinions are my own, and do not necessarily represent those of my employer.
Ok, here's a cool little tip that many will enjoy. A couple of days ago I discovered that there is actually a registry setting to turn off the silly uppercase menus. Enjoy.
While we are at it, can we also have a SuppressDamnSlowStartupAndSluggishUserInterface flag? The other day a teacher of mine intended to open a C file which was part of MicroC/OS-II, into Notepad++. However VS owned the filetype association and the guy was like "aarrrgghhh...how can I make this stop??" when VS fired up and was running that "Loading components..." bar forever and it couldn't be terminated.
Oh, okay.
Yeah that's what I came here to say. There are some parts of c99 that would take a week or so to implement, and yet they still haven't done them......
"First they came for the slanderers and i said nothing."
No multi-threading is kind of the point with nodeJS. It's a different approach than your normal "servlet" where you're firing up new threads for every request and sharing a pool of database connections between them. In this model you run a nodeJS listener and it uses a simple event loop, just like in the browser. If you want to scale you spin up 50 more node instances and slap them behind a load balancing proxy. They are all typically hitting a highly scalable nosql datasource on the backend, which can also easily spin up another 50 instances if needed.
I've dabbled, it is definitely fun for little side projects but I haven't tried to do anything major league with it - in any case, don't knock anything until you try it. For giggles try creating a large searchable data set using elasticsearch and nodejs running behind apache proxies, one hour into it when you have a working site you'll see the appeal.
while [ 1 ]; do echo -n -e "\xe2\x95\xb$((($RANDOM&1)+1))"; done
Now if only Microsoft can provide downloads on MSDN for VS2013 that isn't corrupt ..... might be to much to hope
Can you give an example of something in C99 that is not in VS 2013, and that would take a week or so to implement?
The only things that aren't there that I can think of off the top of my head are VLAs and "restricted", and both are fairly major features (well, unless you are okay with a no-op "restricted", but you can have that already by #defining it to expand to a blank string).
It looks like this is only supported on VS2012 and VS2013 Premium (and up) editions.
Interesting - it has occurred to me that a lot of these "new" fangled frameworks and such really are just a return to concepts and practices from the past - didn't know what the historic analog of this nodeJS (and the like) stuff was. Thanks.
while [ 1 ]; do echo -n -e "\xe2\x95\xb$((($RANDOM&1)+1))"; done
I'll check that out. Agreed that shitloads of nested anonymous handler functions is ugly as hell... and seems to be were most complex javascript leads. I'm not a huge proponent of node or anything, but I do think it has its uses.
while [ 1 ]; do echo -n -e "\xe2\x95\xb$((($RANDOM&1)+1))"; done
Note that GP asked about missing C99 feature that "would take a week or so to implement". Having said that:
Do they have stdint.h now?
It has been there since VS 2010.
How about conforming to C89's strict aliasing rules?
A compiler doesn't need to do anything special to conform to those rules, so this has always been the case. Conformant programs have to be written carefully so as not to trip up an optimizer that relies on strict aliasing, though. I have to admit that I don't know whether VC++ optimizer does use the opportunities presented by strict aliasing, like g++.
Restricted pointers? They have that under __restrict, but again, you have to #define if you want to use restrict with MSVC code.
There's no support for "restrict" yet, and __restrict is subtly different in semantics.
Yeah, but the callback model is incredibly ugly. In Lua I can do precisely what Node.js does--juggle thousands of simultaneous connections--but at least be able use a normal flow of control via the use of coroutines.
In C#, this was solved with async/await, which, like Lua coroutines and Python yield, let you basically write the code as sequential, sprinkling "await" in points where you want asynchrony. Since then, a similar thing has been proposed for the inclusion in C++17, and there is another proposal for EcmaScript 6 - support for which has already been added to Node.js.
Designated initializers?
They're there in VS 2013 already.
Compound literals?
Also in VS 2013.
_Bool / stdbool.h as well, and most C99 standard headers except for tgmath.h are there as well.
It has retard sense unless you use resharper.
I'm not saying they're worthless, far from it, but the W3C has shown themselves incapable of making a proper standard.
The HTML5 debacle and the WHATWG formation sort of made it official. The W3C buys into the abstraction layer nonsense and perpetuates it to the detriment of our industry. Remember: Web 2.0 was fully embraced by W3C.
HTML5 & CSS3 transforms & canvas elements are still not being fully utilized. There are many simple HTML5/CSS3 only games & animated interactive widgets around the web. That's just the beginning of what they are capable of...
The second part of the equation is to rethink what 'website content' means....most of javascript & flash is for non-task events...things that the user doesn't need in order to do the task...ex: watch a youtube video or posting to a social media site....do we need javascript or flash for that whole interchange to happen?
Thank you Dave Raggett
It is undefined behavior in all conformant C89 compilers, including VC. Undefined behavior, by defnition, is any kind of behavior, including "it works as I expected it to".
Variables not being restricted to the first line of a function. [EDIT]: looks like this is fixed in VS 2013. Thanks, Microsoft!
Also, array sizes defined at runtime is theoretically easy, but depending on their codebase (ie, if they are crappy compiler writers that depended on things they shouldn't have), I could see it being hard.
"First they came for the slanderers and i said nothing."
OK, I might get fried for this, but I'm a daily VS2012 V#/MVC 4 Mobile web programmer and I have no clue what Node.js is all about or why they are excited about it.
I looked at the Nodejs.org site and have not a clue WTF it's supposed to do. Anyone got a translation of what in the hell their buzzspeak means?
"Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices."
What does it do that jQuery's async AJAX handlers do not? // Fully duh about it... Clue me please.
Also, array sizes defined at runtime is theoretically easy
Dynamically stack-allocating arrays is indeed easy, which is why this feature is also being standardized in C++14. The problem with C99 VLAs is that they are far more than that - you also have things like VLA typedefs (which should remember the size at the point of the typedef, even if the expression that defined it changes later), or parameter arrays where their size is specified by another parameter. Also, the abomination that is dynamic sizeof.
but depending on their codebase (ie, if they are crappy compiler writers that depended on things they shouldn't have), I could see it being hard.
The compiler itself is really ancient. Consider this: gcc 1.0 was released in 1987; Microsoft C was released in 1983, and that was built on top of an even older third-party codebase that was purchased back then. It probably changed a lot since then, like gcc did, but all legacy codebases of that size acquire a lot of legacy cruft (hence why Apple decided to stop mucking around with gcc and just do Clang from scratch). I don't know much about current VC code, but one piece of information that the team has shared publicly is that the front-end doesn't actually operate on an AST, but is rather a multipass process-as-you-parse thing, which makes a great many modern C++ features like constexpr very costly to implement.
The compiler itself is really ancient. Consider this: gcc 1.0 was released in 1987; Microsoft C was released in 1983, and that was built on top of an even older third-party codebase that was purchased back then. It probably changed a lot since then, like gcc did, but all legacy codebases of that size acquire a lot of legacy cruft (hence why Apple decided to stop mucking around with gcc and just do Clang from scratch). I don't know much about current VC code, but one piece of information that the team has shared publicly is that the front-end doesn't actually operate on an AST, but is rather a multipass process-as-you-parse thing, which makes a great many modern C++ features like constexpr very costly to implement.
ok, that's pretty interesting actually.
"First they came for the slanderers and i said nothing."
You realize that "undefined" doesn't mean "it crashes the app" or even "it doesn't do what the author expected"?
It just means undefined. That's anything from, "it works exactly like the author intended" to "it causes the soft soap dispenser in the ISS to squirt soap on the spacesuits." It's undefined; it could do literally anything or nothing at all.
Comment of the year
And small enough to fit on floppy disks...
I believe that was implemented somewhere around Visual C++ 1.0, but has somehow regressed since then. Probably because they didn't have any unit tests back then.
Ironically enough, it was the desire to ease porting of some popular open source libraries that have gotten to rely on C99 features. I don't know the full list, but the one that was specifically named on VC blog (and that should now compile with no modifications) is ffmpeg.
If I understand you right, the problem with transparent coroutines as you describe them is that they require pervasive support from every single language you have anywhere on your call stack to work. It's all well and good if everything is in your language, but what if you call into a C library which then calls you back? Given the recent trend towards asynchrony in general, this is a very common pattern, and in some cases simply unavoidable (e.g. on WinRT, many core APIs are async only, like sockets).
The nice thing with yield/await and explicit continuations is precisely that it doesn't require any mucking around with how the regular stack works, and so it's compatible with any promise-based or callback-based scheme across any two languages.
If I did not understand correctly, then can you elaborate on the difference between what you want, and yield/await?
I think the trick is to write something that helps you build objects with methods that fire off events on themselves so internals can listen and respond and outside observers can too. Gives you a much more pleasant/legible interface to work with and the debug/testing/decoupling wins are huge if you're also passing data in event objects.
A Node.js app written with Visual Studio...
Knitting a fine silk scarf with a randomly misfiring rusty bazooka?
Sculpting a statue by ramming a block of marble with a Pinto?
How else do I express writing JavaScript in a tool written by the people who have made UI work a pain in all of our asses for the entire decade leading up to IE9 with a giant bloated IDE that has crashed on me on multiple occasions because I typed too fast, for a platform that is far more powerful in its elegant simplicity than anything Microsoft in all its quantity of bullet point evaluating design-by-committee glory will ever be able to offer.