![]() > I pull out the real scripting languages for real jobs. "something > log.txt") will mess up because PS defaults are the way they are. I don't want to type in "Get-Item" or whatever a million times, nor do I want to ever worry that using redirection (e.g. Yes, PS will fix issues like the ones you have described, but typing in long names (at least for me) defeats the purpose of using a shell in the first place. It has a deeper understanding than bash/zsh/whatever, but it also requires more typing. I think what GP is trying to say is that PS is in an awkward position between the two. Or, I could just type something like this and hit enter: ssh "tail /path/to/log" Sure, I could write a Python script right now that would read me the last lines of a log file on a remote server. I pull out the real scripting languages for real jobs. I've been using shells on Linux VMs and Macs for years now and I've probably written less than 50 functions, and the number of times I've typed sed or awk is probably lower than 100. ![]() This singlehandedly eliminates entire swaths of the most brittle, opaque, and otherwise obnoxious code to ever grace my scripts. If I feel the need for a 'proper' programming language for parts of my script, I can write C# modules and use them from powershell without writing a bunch of text (de)serialization code on either end. Powershell still lets you do that.īut Powershell's objects also let you, with great frequency, skip the "try to 'deserialize' text that was really formatted for humans and isn't versioned, can be ambiguous, and otherwise was never written with machine consumption in mind" step. Inter-operating between your new program and your existing scripts will, of course, require even more text parsing.ĭon't get me wrong, sometimes munging text is your least horrible option. Shipping around this deserialized state in command line scripting languages can be so awkward at times, as to warrant rewriting the entire thing in a proper programming language. ![]() To prevent such changes from forcing me to rewrite my entire scripts every time, I try to centralize such text parsing and munging in one place, "deserializing" those strings once and feeding it to the rest of the system. Even in targeting "identical" environments, all it takes is one changed installation default altering the output of one of my many commands for my scripts to break - usually in some non-obvious ways that require a good hour to get to the bottom of, rework, and fix. String parsing is the bane of my command line scripting experience. > blah` and inspect the value of blah before continuing (`cat blah | command2.`) has always seemed far more tangibly useful. > If you want to just automate a task, having intermediate objects that are serializable (eg. Honestly curious, I've only ever touched it briefly and then swapped over to other things. but, powershell gets a lot of love from people so what do you actually find it useful for? Having methods on an object you can invoke like a REPL for the OS sounds like a good idea, but I've never actually found it useful its like the python REPL useful for prototyping and doing stuff after you've imported the 50 packages and setup all of the environment, but once you open a new instance, you've got to spend the time doing that before you can actually do any work and its useless for scripting. If you want to just automate a task, having intermediate objects that are serializable (eg. you pass objects around? So.? Is that a thing that's useful? I've never appreciated what's actually good about powershell. "command-line interface" should look like. It is a thoughtfully crafted product regarding what But if Apple releases something like the above, I'm more than happy to drop 5-8k usd into it. I'd be buying the new Macbook Pro in a month. Less cluttering (ie: remove all Apps and let the user decide what to install, like Siri and crap). Here are things that I'd pay $1,000 on top of the current Macbook Pro model: My Macbook pro has had its shares of problems (Wifi issues that later resolved with a system update) but it's nowhere my experience trying to install Linux and battling the drivers issue.Īnyone figuring out the Linux/Laptop problem is re-inventing the Macbook Pro/OS X. Good luck searching online for a resolution. Also god forbid you have a problem (especially a hardware problem) and then try to debug it. (Never mind the confusion of the different flavors, packaging systems, and configurations). They look good (and are good if you are programming on them) but the UX is still lacking a lot. And please, don't tell me Ubuntu or other linux flavors. Am I the only one that sees OS X as the biggest reason to switch to Mac? I mean Windows is good, but nowhere good as OS X.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |