Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
Polls on the front page of Slashdot? Is the world coming to an end?! Nope; read more about it. ×

Comment: Re:Will Power Shell become useful? (Score 1) 214

by Gadget_Guy (#49828111) Attached to: Microsoft To Support SSH In Windows and Contribute To OpenSSH

It sounds like you just want to complain, no matter what. If you want to distribute scripts to others then sign them. Problem solved.

If your users want to edit the scripts then they can change their Powershell security policy allowing them to make all the script updates that they want. Problem solved.

In the meantime, the rest of the world who don't use nor care about Powershell just want to have a computer that is protected from malware attacks. They can live a little safer since Microsoft blocked the Powershell attack vector by default. Problem solved.

This is the way security defaults should be. If the ActiveX defaults had been secure by default in the early versions of Internet Explorer then the browser would not have had the bad reputation that it deservedly received. Sure it made it easier for developers (like you) to run their code on their users' systems, but it did so at the cost of security of the majority of people who didn't want that facility.

Comment: Re:Timeo Danaos et dona ferentes (Score 3, Informative) 214

by Gadget_Guy (#49827613) Attached to: Microsoft To Support SSH In Windows and Contribute To OpenSSH

K. Construct a for loop in PS that lists a directory and adds the words "This is cool" to the 13th line of any file of type "text" without downloading a module.

Off the top of my head (and using verbose commands to make it more obvious), I got:

dir | where -Property Extension -match '.te?xt' | foreach {

$i=0;
$s=(Get-Content $_.FullName);
$s | foreach { if ( (($i++) % 13) -eq 0) { $_+" This is cool" } else { $_ } } | Set-Content $_.FullName

}

I haven't thought of a way to do the file type determination (other than by the extension), but that will do just for a post to an AC. It can all be done on a single line; I added the line breaks and indentation so it wasn't a big line of gobbledegook. Now it is several lines of gobbledegook!

The impressive part of the tab completion of Powershell is how context sensitive it is. When I typed the where command, I entered -p<TAB> and it expanded it to -Property (although just -p would work too). But the fun part was that I could then type e<TAB> and then go through the list of property names that are returned from the dir command that begin with the letter e; first Exists, then Extension. So it was aware what was being passed to the where command on the pipeline and returning the correct properties for that object.

So if I typed the following:

get-content "file.txt" | where -Property

...and pressed the tab key, it gives me the property name of Length as it knows that it is returning a string rather than a file. The same where command will work on (and give appropriate tab completion) on a directory listing, file output, database query, or XML tree list.

Comment: Re: Odd thoughts: (Score 4, Informative) 214

by Gadget_Guy (#49827257) Attached to: Microsoft To Support SSH In Windows and Contribute To OpenSSH

I just tried typing help copy on my computer and it worked, yet I don't have an msdn subscription. That said, help is not installed by default. From the equally free online version of Microsoft's documention:

Windows PowerShell 3.0 does not come with help files. To download and install the help files that Get-Help reads, use the Update-Help cmdlet. You can use the Update-Help cmdlet to download and install help files for the core commands that come with Windows PowerShell and for any modules that you install. You can also use it to update the help files so that the help on your computer is never outdated.

Finally, if you want to write help for your own Powershell code, just type help about_Comment_Based_Help for details on how to do this. No need to buy any licences.

Comment: Re:Of course it bombed (Score 4, Insightful) 203

by Gadget_Guy (#49812243) Attached to: Tron 3 Is Cancelled

I don't understand why Hollywood won't cast teenagers to play teenagers.

There are numerous reasons. The look of adults will remain more consistent throughout the filming of a movie and between sequels (not to mention a TV series), while no amount of contractual obligation can stop a child actor from growing. I heard on a director's commentary of a film (can't remember which one) that said that they had problems reshooting parts of an earlier scene because the child had changed between the start and end of the movie; probably no so noticeably as you watch the film sequentially, but when it they intercut shots into the same scene then it could be obvious.

Child actors also have limits on how long they can film and require schooling during the shoot. It's possible that trained actors are easier to direct and put in better performances, but that is just speculation and there are definitely examples of children doing some stunning work. Finally, teenagers can be right pricks sometimes (although so can some prima donna actors too).

Comment: Re:flat as a pancake: invasion pending (Score 5, Insightful) 236

by Gadget_Guy (#49768179) Attached to: Microsoft Tries Another Icon Theme For Windows 10

We may end up with intuitive and user-friendly software, oh no!

But the problem is that you don't get an intuitive and user-friendly system. You might get a clean system without clutter, but then have to figure out and dragging from the top of the screen to the bottom is the way to close a program. Or that clicking in the space that used to have a design element (but is now just blank) was the way to bring up the start screen. Or that things that look like they are just decoration are actually active buttons, but you only know this (and what function they perform) by blindly clicking, dragging, swiping over every part of the screen.

Even when you do this, you still have to face the final insult when you find that the function you are looking for was removed from the software because it was deemed too advanced for modern users - even though Windows has been able to perform that function for decades up until now.

Modern user interfaces have absolutely nothing to do with intuitiveness. I looked at some really old software recently and found it so pleasant because I could tell exactly what functions were available and how to perform them simply because they used textual buttons and menus. It was so much better than being faced with a bunch of similar-looking graphics with no mouse-over pop-ups to explain what they were for.

Comment: Re:Great. Let's sit here and wait for the next wav (Score 1) 422

by Gadget_Guy (#49680491) Attached to: Ice Loss In West Antarctica Is Speeding Up

The endless posts from people who claim that anyone who drives anything other than a SmartCar or a Prius is an evil person who is destroying the world...

That is a complete lie. I just did a search and found only one mention of the words SmartCar or Prius, and they were written by you.

Quote me the last Slashdot article that was focused on LED bulbs. Ok, you might find one.

I just said that the issues of replacing incandescent light bulbs is over which is why it needs longer needs any discussion. We also don't discuss this new color TV that we have had for decades because it is no longer news for nerds anymore. Don't try to make out like it is some conspiracy to bury the topic just because there are other technologies that have yet to prove themselves.

Because without a good economy, many more people are hurt and killed due to a lack of basic life needs

Now that sounds very alarmist. The idea that the economy will be so ruined by a carbon tax that people will die from lack of basic life needs is extreme and unsupported.

So the idea that we're going to toss money out the window when it comes to the environment? What color is the sky in that world?

Blue, and with a partially restored ozone layer too. That's right, there have been many instances where we have spent money to fix environmental problems.

Comment: Re:Great. Let's sit here and wait for the next wav (Score 1) 422

by Gadget_Guy (#49671833) Attached to: Ice Loss In West Antarctica Is Speeding Up

I wouldn't mind a rational, reasonable conversation on the topic, but instead you've got "the world is ending we must DO SOMETHING" screamers...

Allow me to take a leaf from your book and say: Citation needed...

How exactly does the scientific community state that the world will end? Do they say that it will explode, like Krypton? Do they say that the oceans will boil away? If there is one thing that you can say about scientist it's that they always show their workings, so it should be easy for you to give an example of some paper that describes how the world is supposed to end.

But we both know that nobody has said that the world will actually end.

Replacing incandescent light bulbs with LED bulbs seems to be a very cost effective way to reduce our power consumption. Yet all we hear about are electric cars and solar power, neither of which make any economic sense.

Are you seriously saying that you have heard nothing about replacing incandescent light bulbs with LED bulbs? Seriously? That conversation has already been had. Go out and buy a light globe and tell us what choice you have now? Why would we still be hearing about that now when that is the one thing that has already been fixed?

And why should economic sense be of highest importance? Slavery makes economic sense, and yet we pay more for our goods so that the people who make them get paid because it is the right thing to do. Why can't we do the same thing so that we don't stuff up the environment?

Comment: Re:5 year lag pretty good (Score 4, Insightful) 268

by Gadget_Guy (#49661163) Attached to: Russian Company Unveils Homegrown PC Chips

...these chips most likely won't actually be delivered until 2016...

I don't see why there would be such a delay when the article says:

The company finalized development of Elbrus-4C in April 2014, and began mass production last fall.

As for the "five years behind comment" (which was not anyone bragging but instead criticising), I suspect that the article mashed together two different quotes into one. In terms of performance (which put them between the i3 & i5), they are five years behind mainstream performance. But it is difficult to compare this and the other performance metrics because of the architectural differences. This isn't a x86 CPU, it is more of a hybrid design. It runs at a very low clock speed (800MHz) and it's power requirements (45W) are low for a 65nm process.

It's not really the important part of the story though. For some countries affected by US export restrictions, having an alternate supplier makes them better than nothing. This CPU will not make the company a household name in the West, but they will continue to have a market in the places that the big boys can't play.

Comment: Re:Developers! Developers! Developers! (Score 1) 265

by Gadget_Guy (#49641817) Attached to: Microsoft Releases PowerShell DSC For Linux

It can't be compiled by me, from source code.

If you have a need to recompile Powershell, it would be because it lacks something. What is it lacking? I understand that ideology is important and that open source is a reasonable thing to prefer, but that it not an answer to my question of what Linux does that Powershell does not.

Comment: Re:I'll bite (Score 1) 265

by Gadget_Guy (#49640369) Attached to: Microsoft Releases PowerShell DSC For Linux

I think that you have put way too much thought into this. It is just not important. The original comment was inaccurate and just not insightful. If it is so wrong to correct the examples offered, then perhaps it was equally wrong for the AC to make the original post in the first place as it serves no point other than to perpetuate the myth that the language is too verbose to use.

I do acknowledge your pedantry though.

Comment: Re: PowerShell is yucky yucky yucky! (Score 1) 265

by Gadget_Guy (#49640063) Attached to: Microsoft Releases PowerShell DSC For Linux

Except the majority of people running Windows don't use Powershell, so *.ps1 files cannot be used as a mechanism to infect those systems with malware. And you can still use Powershell interactively without having to change the security. This only affects people who want to run script files.

And there is no one operating system that has every single security feature, let alone has them enabled by default. Just because OpenBSD doesn't have it, doesn't mean that it isn't a security feature on Windows.

Regardless of whether a mission expands or contracts, administrative overhead continues to grow at a steady rate.

Working...