Maik Kulbe
@koddsson I'm not using zsh but I heard it brings this feature with it(or I guess at least oh-my-zsh does)
You can shorten and/or abstract that - you can remove some stuff and make that a function to use it in a lib or so:
http://jsfiddle.net/mkzero/LumBj/10/
But thank you for pointing that out. Might come in handy some day.
So you tell me, that you read every man-page of every tool you use? I doubt that. Nobody really has time for that... And even if you got time for that, I don't think you can remember what that ittybitty switch for e.g. nmap was. Because it got like a gazillion switches and several thousand lines man-page content...
It may have it's downsides(32-bit int, etc.) but don't forget: if you use ~~ then that is 10 Characters less. If you use the function often enaugh that might help reduce bandwith. But then again only if you don't use HTTP compression(which you should).
Also some browsers actually handle ~~ slower. So when you say faster, this is not really true for all cases. Optimization should happen for all browsers.
@bobwilliams Maybe my words were a little harsh, but you have to admit, that your title "Stop using bash!!" suggests that it leaves no room of having an opinion of my own. ;)
@mlb You have a point - this pattern is problematic with dynamic websites. But you could implement some cache invalidation for that.
Problem with test-loops like this is: Engines like v8 optimize more and more over time(wich is why it's so great for server-side scripts) but you probably won't get those effects on a regular website or webapp, because most of the code runs like once or twice but rarely thousands of times(unless you do things like some UI effects, etc.)
Also modern browsers tend to bring performance testing tools with them - e.g. Chrome has different tools for JS, CSS and memory profiling.
Stop beeing such a dick about the shell of my choice!
If you just bash against something, without even presenting any arguments(no "ITS SOU MUCH BETTAAA!!!11eleven" ist not an argument!), nobody will even take you serious.
Also those kinda discussions are most of the time only religious debates. Bash 4 has many features and with the right tuning it's just another good shell like zsh. And don't tell me zsh is awesome out-of-the-box. I tried to configure it but there's like a gazillion options and after like 1/2 hour I just gave up and went back to my original shell setup with my petty-bash..
You also have to be aware of the fact, that different server types have different memory usage needs. E.g. a database server should never swap at all, as this can quickly become a bottleneck, locking up the whole server.
Also there's a common practice now to remove any swap from VMs in Datacenters. Generally this is not bad, as you can save the (slow) Disk-IO, but it needs really careful planning and even more careful and tested configurations though, as you easily can run into OOM-situations where your kernel uses the OOM killer to (randomly) kill running applications. But if you are aware of this, it is very much tuneable and you can read more on that on http://lwn.net/Articles/317814/