4 ms·
"JavaScript as the main programming language" Using node (or the v8 shell directly) javascript is competitive with python or perl for most common scripting tas
by niggler 13y ago
"JavaScript as the main programming language"
Using node (or the v8 shell directly) javascript is competitive with python or perl for most common scripting tasks
- ashcairo 13y agoThat's really interesting actually. Is JavaScript still considered a scripting language or given it's modern web development application, is it now a fully fledged programming language?
- Joeri 13y agoThe thing i've always found weird is how javascript didn't catch on for windows sysadmin scripts instead of batch files, given that it's been integrated into windows since w2k. People spend a lot of time learning powershell, while the cscript engine exposes the same level of ability in javascript.
- just2n 13y agoI did all of my scripting in Windows in JS. You had full access to COM objects, which means you could do a lot of stuff out of the box. One thing I hated was that it wasn't even fully ES3 conformant (it's jscript), and it seemed not to be maintained. I think they threw out cscript considerations when they built powershell. For me, a simple bash shell or even a jscript REPL would've been preferable. I think my favorite least-known thing about writing simple tools for Windows during my time as a sys admin was HTAs. You had full jscript COM access with a web page presentation that's packaged into something that you can run without opening a browser explicitly. It was awesome building full web applications that could do pretty much any administrative task on Windows.
- TazeTSchnitzel 13y agoHTAs were! I believe the user accounts management screen in Windows XP was actually one.
- roel_v 13y agoIn my experience of the big problems is that it's so hard and inconvenient to call other programs and capture/process or print-to-stdout (as required) its output from WSH (javascript or vbscript). Also, if cscript had been the default WSH handler (rather than wscript), that would've made it much more like batch files. It's in the details - I tried for years to switch to WSH over batch files, but each time it's those little annoying things that make me switch back.
- 16s 13y agoI think many sys admins thought of js as a web technology and back during w2k, systems and the Web were considered totally unrelated and many systems guys were dismissive of the Web. Things are much different today.
- ErikCorry 13y ago"javascript is competitive with python or perl" Well they are all three terribly designed languages, but JS is way faster and probably more secure: It's battle tested in environments where the assumption is that the attacker controls the code being executed, which is normally not the case on the server side. On the other hand, JS does not have anything like perl's tainted strings, which are a great security feature IMO.