Live data from Hacker News

Xiki: An amazing shell

techcrunch.com

71–80 of 130 posts

Re: Xiki: An amazing shell

#71
post #29

Earlier quoted context omitted.

So, shell commands that produce and consume JSON?

No, objects. Non-text. Real data. Plus methods. Read a PowerShell primer to better understand this. PowerShell is geniusly designed and horribly implemented, so there's little point actually using it, but UNIX could really really use some of its ideas.

PS is absolutely essential if you are stuck administering Windows machines (esp. large numbers of them in a server farm). It makes working with Windows (mostly) tolerable if you are using a reasonably modern Windows version (2012+).

Powershell has some nice features like native arrays and hashmaps which can be mixed together into complex objects and then converted to JSON. Combined with native web request cmdlets (Invoke-RestMethod et al) it makes interacting with web services easier than the bash equivalent, where you have to use curl/wget, string munging and jq (which isn't usually part of the standard install).

Re: Xiki: An amazing shell

#72

Earlier quoted context omitted.

No, objects. Non-text. Real data. Plus methods. Read a PowerShell primer to better understand this. PowerShell is geniusly designed and horribly implemented, so there's little point actually using it, but UNIX could really really use some of its ideas.

What makes you say PS is horribly implemented ?

Just a bunch:

Doing really common things, such as "find the directory of the currently executing script" can only by done by copy-pasting a non-trivial 3-line function from Stack Overflow. In batch (of all scripting languages), it's "%~dp0". Cryptic, yes, but at least it's in there. Similarly, the internet is full of blog posts with 1000-word articles explain how "easy" it is to do something in PowerShell that should've been a one liner to begin with. Basically, the builtins just suck. Batteries included? No way.

Someone at the MS marketing department decided that, in order to make PowerShell popular, it has to be cool. As a result, the above-mentioned blog posts contain example code like `echo "I Love PowerShell"`, making it sound amazing that should-be trivial stuff is only a matter of copying five lines of code [0].

In general, writing PS scripts is a really odd mishmash of bash-isms, batch-isms and .NET-isms.

Because PS is such a weird mismash of things, the ecosystem generally consists of people who don't even try to understand what's going on, but just hack some stuff together until it kind of works. This makes online resources, well, less useful than they could be.

Writing stuff that works like native Cmdlets is weird. You can make functions, but they're not entirely the same, and if you really want Cmdlets, you have to use a .NET language. I really wonder why the hell there's such a fundamental difference between functions and Cmdlets, they could just be the same thing. I also wonder why PowerShell can't just be a real .NET language just like all the others. It's a weird half-assed-in-the-middle thing.

[0] http://blogs.msdn.com/b/powershell/archive/2007/06/19/get-sc...

Re: Xiki: An amazing shell

#73

The visual file navigation looks like it would be a real step down. If I already know the directory I'm navigating to, it would almost certainly be less keystrokes to cd [first letter of first directory] /[first letter of second] , etc. If I wanted to visually navigate files, I'd use Finder.

Does it not do both?

Re: Xiki: An amazing shell

#74
post #52

Earlier quoted context omitted.

Wow, an average of 30 terminals at all times? Just out of curiosity... what for exactly? Real-time monitoring?

I always have at least that many too. Not for real-time monitoring, just a large number of projects and threads of thought, many of which last for weeks or months. I do this for everything: I just totalled up all my currently open terminals, browser tabs, documents, etc., and got to over 700, and it's only that low because I've restarted a couple of times recently....

I suffer from the same problem of too many terminal windows and browser tabs, and honestly it doesn't seem to help me much. It just dilutes my attention. I always do a logoff or restart at the end of every day now, and that seems to help a fair bit.

To keep track of what I need to do in the short term, I have a simple TODO text file.

Re: Xiki: An amazing shell

#76
post #34

These alternative shells always get me really excited, until I try them out. Then the drawbacks become immediately and very painfully obvious: - Some are extremely slow, especially those that rely on complete webservers / node.js / whatever as a backend - Memory-hungry. I've got an average of about 30 terminals open at all times. 50 Mb per terminal really is a bit too much. 10 Mb is the upper limit on what a single t…

Wow, an average of 30 terminals at all times? Just out of curiosity... what for exactly? Real-time monitoring?

Yeah I start to have a panic attack when I see 5 or more shells open.

Re: Xiki: An amazing shell

#77

This feels very like what iPython notebooks provides, but applied to shell commands rather than code. It's a cute video, but I can't quite help feeling this is going to be far less useful in practice than it's made out to be.

I tend to agree. The biggest leap for me was switching to oh-my-zsh (near life changing). :-)

I love oh-my-zsh as well, but I ended up switching to prezto (https://github.com/sorin-ionescu/prezto), which is extremely similar but has less code and is considerably faster. Shell sessions were taking more than a few seconds to start up, and I'm using the latest MacBook Air.

Re: Xiki: An amazing shell

#78
post #25
post #16

Earlier quoted context omitted.

What features would you like to see in a Unix-like shell that are not available?

I think passing around real objects instead of character strings is cool. It's less brittle, and you don't have to have an ad-hoc and flawed parser at every step.

As someone who thinks powershell and objects are really great.. Until you want to create a firewall rule with a principal exception using the docs: http://technet.microsoft.com/en-us/library/jj554906.aspx.

:|

Re: Xiki: An amazing shell

#79
post #52

Earlier quoted context omitted.

I always have at least that many too. Not for real-time monitoring, just a large number of projects and threads of thought, many of which last for weeks or months. I do this for everything: I just totalled up all my currently open terminals, browser tabs, documents, etc., and got to over 700, and it's only that low because I've restarted a couple of times recently....

I suffer from the same problem of too many terminal windows and browser tabs, and honestly it doesn't seem to help me much. It just dilutes my attention. I always do a logoff or restart at the end of every day now, and that seems to help a fair bit. To keep track of what I need to do in the short term, I have a simple TODO text file.

Unrelated, but if you're using plain old text files for todo lists, you should look at this: http://todotxt.com/

Re: Xiki: An amazing shell

#80
post #34

These alternative shells always get me really excited, until I try them out. Then the drawbacks become immediately and very painfully obvious: - Some are extremely slow, especially those that rely on complete webservers / node.js / whatever as a backend - Memory-hungry. I've got an average of about 30 terminals open at all times. 50 Mb per terminal really is a bit too much. 10 Mb is the upper limit on what a single t…

Right way I wondering about working remotely since its the shell in your editor (which I don't have).
Post reply on HN