Live data from Hacker News

PowerShell is open sourced and is available on Linux

azure.microsoft.com

751–760 of 790 posts

Re: PowerShell is open sourced and is available on Linux

#751

Earlier quoted context omitted.

Then which audio system is simple to set up AND allows per-program volume, effects, etc? Which init system "just works" without requiring me to copy and modify a hacky init script from stackoverflow? Lennarts products are controversial, but they’re the classical "least worst" options.

>Then which audio system is simple to set up AND allows per-program volume, effects, etc? JACK >Which init system "just works" without requiring me to copy and modify a hacky init script from stackoverflow? s6, runit, bsdinit (yes, really). >Lennarts products are controversial, but they’re the classical "least worst" options. No, they're ugly, broken messes that look nice. Systemd is a monster. If it was an init syst…

> JACK

> simple to set up

Try getting it to run with basically anything, seriously. Pulseaudio is plug-and-play.

> Which init system "just works"

Neither of the ones you mention fit that description

> It's an init system that's also a cron replacement

Wrong.

SystemD is a project with a similar branding issue that KDE has.

Systemd is a project.

It develops a set of libraries.

And, on top of that, an init system.

And a cron replacement.

And a syslog replacement.

You do not need to use them together – just like you can use Gtk apps in a KDE environment – but together everything works best.

> for no reason and breaking code (screen sessions die now)

For the reason that shutting down my PC means it spends 10 minutes waiting for screen sessions to kill themselves, and I can not stop that without either doing a killall, alt-print-reisub, or just pulling the plug? It also provides a way to keep things running still.

> increasing the chances of a kernel panic

Never had one, and I’m running bleeding-edge arch

> Systemd is a tiny step forward, followed by a massive step back, and of you can't see that, you haven't been paying attention.

Systemd is the least worst option.

There is not much of an alternative for such a kind of project, that properly handles things in a more modern way.

I want a userland that works plug-and-play, I want syslog as a daemon with database, not as a fucking flat file. I want more dbus, and, ideally, I’d have all config files in a database or registry for easier administration and sync.

I want proper udev and containerization, I want programs of my user to be killed upon logout unless specified otherwise.

Lennarts projects don’t provide what the old crowd of nerds want.

But they provide what the average user want, and what’s required to make Linux actually usable for your sister, your grandmother, and your retarded neighbor that can’t even turn on a PC.

It also reduces the workload for server admins, like me, again.

I can write systemd unit files in a few minutes, can easily stream syslog over the network from multiple servers and aggregate, I can easily handle namespacing of software.

Re: PowerShell is open sourced and is available on Linux

#752
post #408

Earlier quoted context omitted.

That is not quite right either. I enter about 200 commands on a normal workday and write maybe two scripts a month in a shell language. A shell language should be a shell language, it's not merely a stepping stone to write a script after using a command just once. If that's what I'm looking for I'll use Python. And from the other side, Python would be a terrible shell (by default), and that's fine because that's not…

You could just use WSH (Windows Scripting Host) with either VBScript or JScript the way you've always been able to. AFAIK, Windows has shipped with that scripting solution since like Windows 2000 or possibly even earlier.

I noticed that on old computers (Windows 95, I think, and certainly 2000 and XP) where it would classify .js files as executables. I was about 11-14 so I didn't understand much of Windows at the time, let alone in a foreign language (I'm Dutch) when I wasn't even allowed to use the Internet (dialing up was expensive per-minute stuff), but yeah I remember that.

Still, I've never heard of anyone using Javascript or VBScript to automate anything. It's either powershell (these days), cmd scripts or custom .NET software. I've never even heard anyone mention using javascript in Windows (until apps came around in Windows 8) and vbs is only ever patchwork for legacy third-party software products as far as I've seen in my sysadmin days.

Re: PowerShell is open sourced and is available on Linux

#753
post #749

Earlier quoted context omitted.

You're correcting Jeffrey Snover about the point of Powershell. I suspect that the guy that invented it and championed it through years of resistance at Microsoft probably knows what is or isn't intended with Powershell.

Besides mirroring the condescending tone, I was mentioning that in my (GNU/Linux) experience -- which is a lot more command-line oriented than Windows -- it's not true what he's saying. I use a lot of commands and very few of them become scripts, thus the conclusion that it's not merely a stepping stone. A command line language can have different features than a good scripting language. Further I was remarking on the…

I think you're misreading what was exchanged. That is unless you're arguing with him about the intent behind the design of a product you had no part in creating. He was replying to "The point of PowerShell..." not, "The point of shells...". He was simply correcting someone who misinterpreted the intent.

I think you're also reading tone into his message that's not there. He's been very chill and helpful in this thread even in reply to open hostility.

I'm not sure what "according to you" means, but you can verify it yourself. Feel free to read Wikipedia or you can probably find one of his talks about it on youtube.

Re: PowerShell is open sourced and is available on Linux

#754

Earlier quoted context omitted.

>Then which audio system is simple to set up AND allows per-program volume, effects, etc? JACK >Which init system "just works" without requiring me to copy and modify a hacky init script from stackoverflow? s6, runit, bsdinit (yes, really). >Lennarts products are controversial, but they’re the classical "least worst" options. No, they're ugly, broken messes that look nice. Systemd is a monster. If it was an init syst…

> JACK > simple to set up Try getting it to run with basically anything, seriously. Pulseaudio is plug-and-play. > Which init system "just works" Neither of the ones you mention fit that description > It's an init system that's also a cron replacement Wrong. SystemD is a project with a similar branding issue that KDE has. Systemd is a project. It develops a set of libraries. And, on top of that, an init system. And a…

>I can write systemd unit files in a few minutes, can easily stream syslog over the network from multiple servers and aggregate, I can easily handle namespacing of software.

You could do 2 of those three things already (syslog and namespacing), and bsdinit init files aren't hard to right.

>Systemd is a project.

>It develops a set of libraries.

>And, on top of that, an init system.

>And a cron replacement.

>And a syslog replacement.

>You do not need to use them together – just like you can use Gtk apps in a KDE environment – but together everything works best.

That's BS. A lot of it's all one executable.

>I want a userland that works plug-and-play, I want syslog as a daemon with database, not as a fucking flat file. I want more dbus, and, ideally, I’d have all config files in a database or registry for easier administration and sync.

Well, if you want Windows, you know where to find it. But stop trying to turn my UNIX into it.

>I want programs of my user to be killed upon logout unless specified otherwise.

Well, you're in an EXTREME minority.

>But they provide what the average user want, and what’s required to make Linux actually usable for your sister, your grandmother, and your retarded neighbor that can’t even turn on a PC.

...and if you think "the year of linux on the desktop" is ever coming, you're delusional. Besides, Ubuntu had a reasonable UX for that audience long before systemd came around.

>I can write systemd unit files in a few minutes, can easily stream syslog over the network from multiple servers and aggregate, I can easily handle namespacing of software.

Software namespacing doesn't require systemd. Syslog streaming has been a thing for a long time. And BSDinit, s6-rc, runit, openrc, sheperd, nosh, systemXVI, perp, watchman, and a variety of other init systems exist that make writing unit files easy. Many of them predate systemd.

Re: PowerShell is open sourced and is available on Linux

#755

Earlier quoted context omitted.

he's not wrong though. ssh is the quickest way of accessing remove machines, not to mention secure (i have never seen remote desktop done with priv/pub key in practice). it also makes automation and transferring files easy. putty is terrible compared to ssh on linux. what i would have given for good ssh on windows back when i was still doing C#...

he's not wrong though. ssh is the quickest way of accessing remove machines Invoke-Command -ComputerName $ListOfComputers -Command {#code...}

yes, yes, well done. how does this work with public/private keys again?

Re: PowerShell is open sourced and is available on Linux

#756

Earlier quoted context omitted.

It's unreliable, because you don't know where you'll find 'inet ' or what's the specific spacing of the output. Also, that's not the ip, because you've still got the cidr attached. And no, fstab is not easy either. For example it fails for: # /tmp has option_blah in order to ... changing it to: # /tmp has option_blah,nosuid in order to ... Confusing the next person to look at the well intended comment. It's no imposs…

Oh, I forgot: the comment you showed wouldn't trigger my AWK script. Read it more carefully.

Yes it will. If you mean the $2 part, the comment character takes the place of $1. Or did you mean something else? (either way, I tested it before posting)

Re: PowerShell is open sourced and is available on Linux

#757

Earlier quoted context omitted.

this x100. i wish they'd work on chef/puppet/ansible/salt support instead. probably never going to happen though, so much functionality in windows isn't available from the command line.

Yeah, probably never happen. You'd never see J. Snover the 'father of PowerShell' at ChefConf last year talking about PowerShell Desired State Configuration (DSC) and its support for Chef ( https://www.youtube.com/watch?v=Gh9zfm5gVEg ) or two years ago the PowerShell team announcing a DSC Cookbook for Chef ( https://blogs.msdn.microsoft.com/powershell/2014/07/29/chef-... ) or last year announcing Puppet's announcemen…

I think we have different definitions of support. What constantly amazes me is how similar many OSes are - except Windows. DSC hasn't changed that, even though Mr. Snover is a very clever guy. If you're in a homogeneous environment, DSC is probably great. But it's 2016, and environments are heterogenous. Even shipping an SSH client and server with Windows would go a long way as far as interop goes - which may be happening AFAIK (OK, I admit I love SSH, but it's so useful). PowerShell feels a lot like the xkcd n+1 standards thing. I don't use bash any more, but it (along with ash/dash) is the de facto standard.

Sorry I can't get more excited about this, which is especially sad because my background is QBasic -> VB -> C#.

Re: PowerShell is open sourced and is available on Linux

#758
post #752

Earlier quoted context omitted.

You could just use WSH (Windows Scripting Host) with either VBScript or JScript the way you've always been able to. AFAIK, Windows has shipped with that scripting solution since like Windows 2000 or possibly even earlier.

I noticed that on old computers (Windows 95, I think, and certainly 2000 and XP) where it would classify .js files as executables. I was about 11-14 so I didn't understand much of Windows at the time, let alone in a foreign language (I'm Dutch) when I wasn't even allowed to use the Internet (dialing up was expensive per-minute stuff), but yeah I remember that. Still, I've never heard of anyone using Javascript or VBS…

> Still, I've never heard of anyone using Javascript or VBScript to automate anything.

Well thousands of companies have done it, so. I don't know what to tell you.

Re: PowerShell is open sourced and is available on Linux

#759
post #506

Earlier quoted context omitted.

After a number of years using PowerShell, my conclusion is the opposite: text "scraping" is just better for most cases. Normal shell usage means doing a lot of one-shot pipelines incrementally. This is just easier and faster to do when passing text around because you can look at it and not have to inspect some object for it's type and what attributes/methods it provides. Parsing the text is not the problem here (alth…

> text "scraping" is just better for most cases. Unix pipes handle bytes, not just text. For instance, copy a hard disk partition to a remote hard disk via ssh: (dd if=/dev/hda1) | (ssh root@host dd of=/dev/sda1) The KISS principle ("Keep it simple, Stupid") is the best way in many cases. In Unix you can quickly enter a pipe without special coding which does also non-trivial stuff. For instance, find -name "*.xls" -e…

> Can you do this in Powershell quickly? I don't know, I am actually curious.

You can basically do the same thing with Powershell. I don't know of a 'built-in' module to handle XLS->CSV conversion, so you need to bring one in:

  Install-Module ImportExcel
Then:

  ls *.xlsx -r | %{ Import-excel $_ } | ? { $_.Name -eq "Miller" } | sort
That's my naive, Powershell noob approach anyway.

There's another option however, where you can leverage Excel itself (granted, this is likely to be a Windows only approach):

  $excel = New-Object -com excel.application
And you can now open XLS/XLSX files and operate on them as an actual excel document (including iterating through workbooks/ worksheets, etc.). It's all just objects.

Re: PowerShell is open sourced and is available on Linux

#760

Earlier quoted context omitted.

The dollar sign is charming. There's a few points here: 1) Not all data is text. In fact, very little of the data people see/work with day-to-day is raw text. It's silly to transform a PNG image into text to be able to pipe it around. (Or to pipe around its filename instead and have a dozen tools all having to open and re-parse it each time.) 2) There's nothing on PowerShell preventing you from serializing a piece of…

> Even if you come up with a great way to improve the output, doesn't matter, you've still broken everything. You phrase this as if changing things for the sake of changing was a good thing. It is not. Well, perhaps it is good for the software vendor, but from the customer's point of view, having to re-learn how to do the same stuff over and over every other year is a PITA.

This is why I have trouble getting along with Linux users.

Without change, there's no improvement.

Post reply on HN