Hacker News new | ask | show | jobs
by nextw33k 4023 days ago
My problem with PowerShell is that its Yet Another Syntax To Learn (YASTL).

If a JavaScript runtime like nodejs had access to the same interfaces as PowerShell or to COM I'd be over the moon.

It would be very powerful, you'd effectively be opening up windows shell programming (OS scripting) to tens of millions of developers rather than the 1% that take the time to learn PowerShell.

1 comments

Yes! You're so right.

I've actually experienced this first hand. There's a small but prolific community on OSX who do this for Window Management and Automation; see https://github.com/jasonm23/phoenix and http://hammerspoon.org

They're great to work with, and it's easy to build your own abstractions on top since they actually have a real language that you can work with. Imagine this for instance:

  Windows.find(window => window.title == "Sublime Text")
         .moveTo(Screen.find(screen => screen.name.contains("Dell"))
It's so bizarre to me this isn't a thing in Windows. It's a super good thing to have.