Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Microsoft screws with stuff for the sake of scr (Score 1) 113

So what am I doing wrong that I only get one completion at a time in Powershell and not a list?

It really depends on the shell host (Powershell separates the runtime and the host. The host may be a simple CLI or a language server within vscode or emacs). Powershell ISE, for instance, will list all available options in a dropdown list.

But in the standard shell, TAB completes a single command, parameter name or parameter value at a time and `ctrl-space` lists available completions and lets you choose which one to complete.

Comment Re:Microsoft screws with stuff for the sake of scr (Score 1) 113

Is it at least comparable to something like Fish shell, which had existed for many years? It doesn't seem to me that you can run these help-obtaining commands in the middle of editing the command you want to get a help with, unless you do it from a different terminal. With Fish shell's completions, this for example is not a problem.

In addition to the ability to list and get documentation for commands, Powershell supports tab-completions of both commands and switches. Because powershell commands carry meta-information about parameters within them, the shell can interrogate any command for its variations and command line switches and use it for tab completion.

Powershell commands (called cmdlets) are constructed so that they instruct the *shell* about which parameters are supported (and their types). It is *the shell* that does the parsing and parameter binding, not the individual commands themselves. This very same meta-information is then used by the shell to support tab completion, documentation etc. No need to author separate tab completion. Even your own new commands will support tab completion without any specific definition for those.

Anyone who claims Powershell has poor discoverability cannot have invested more than a few seconds in it. Obviously Powershell requires some getting used to, but really, you only need to know a few commands to be able to discover everything. It helps if you also understands some of powershells conventions (like the verb-noun command naming convention, the way to shorten parameter names and default parameters)

Comment Re:Microsoft screws with stuff for the sake of scr (Score 4, Informative) 113

> It has bad discoveribility. The command line switches are long and the arguments are cryptic. The output is an excel table where all the important fields are usually hidden.

Discoverability: Powershell has *eminent* discoverability. Want to list all available commands? do 'get-command' or (short form alias) 'gcm'. Cannot quite remember the command know that it has something to do with "net"? do 'gcm *net*'. Want help with a command? do 'help gcm' or 'gcm -?'.

Long command line switches: Any switch can be shortened as long as it is unambiguous. The 'ls' command (alias for get-childitem) accepts an '-Exclude' switch. Want to list anything but .ps1 files? do 'ls -e *.ps1'

Table output: Only some types are formatted as tables. Contrary to bash and other *sh, Powershell separates formatting from the output of the command. Which means that *you* control the output. See, in Powershell the cmdlets do only one thing and they do it well. In other words, a command does not *both* retrieve the data/objects *and* format them. In powershell one command retrieves the objects, and another formats them.

Comment Re:Why a kernal mode printer driver in the fist pl (Score 1) 53

That, surely is the design flaw. That a computer would need to download and install any code just to print to a new type of printer.

These should be standard, and printers should print something like PDF directly.

Yeah. I am so happy that they extended PDF so that my browser can discover collation capabilities, grayscale conversions, ink/toner levels, number of trays and paper sizes in them.

Comment Re:Let's ask the RIAA (Score 2) 111

There's only so many ways to write a function to calculate the nth Fibonacci number. What you have in the music industry would be akin to the first person to copyright such a function would be able to prevent everyone else from publishing a function using the same algorithm.

Programming is not art. A function is not an artistic expression. Give a number of programmers same problem, and you will often find that two or more programmers independently arrive at very similar solutions.

In software we often emphasize clean room implementations: If you can show that you made an effort to *not* copy a body of source and develop it independently, we allow more similarities, simply because we recognize that such similarities may arise from similar trains of thought. If you do not look at the body of source, didn't look before you started, and can reasonably explain why you designed your source the way you did, it becomes a burden to prove copyright infringement.

But what if you are using a tool to coach or even coerce your train og thoughts, and that tool indeed *did* look at the body of source?

It seems to me that we need to establish when it becomes too "inspired" and when you could reasonably have arrived at the same formulation yourself.

Comment Correction... (Score 1) 60

Ok so he wrote a few more posts than that - sorry didn't see his other content (before you bash me :P). Point still stands. Decentralised crypto is the future. Which one will stand the test of time remains to be seen.

Comment How'd this make it to the main page? (Score 1) 60

Some moron who wrote about 6 blog posts is suddenly /. prime? Seriously? Which jackass swiped this up to the front? It's one of many articles that has me questioning /. and its "corporate overlords" lately. Crypto's have plenty of problems, but at least they're not centralized. It's both their strength and their curse. It would be fantastic - in theory - if we could use a currency on a secure platform that can't be controlled. Yes, there will be plenty of tech problems to resolve and stability to guarantee. But I'm not going soft on it just yet.

Comment Re: Human hubris is to blame... (Score 5, Insightful) 663

So talk me through the cold weather contingencies planned for in Florida... surely their wind turbines all have the Arctic de-ice features like you do up north, right?

It is perfectly ok to plan with a known risk. As long as you have a contingency plan, that is. Florida - being part of a national grid can import power from out of state. Contingency plan: Import power.

Texas: Instruments, gas valves, generators not insulated against freezing over. Nuclear plants not secured against iced-over cooling water. Contingency plan: none, Texas is on it's own grid.

Failure root cause: Lack of planning for extreme weather, no contingency plans.

Comment Its about shorts, guys. (Score 1) 128

The fact of the matter is that large hedge funds shorted WAAAY beyond 100% - in other words, there were more shorts sold than there is available stock, creating an infinite loop as they are forced to buy stocks to cover their shorts - which aren't available, leaving them caught with their shorts down. It's part of an operation called a Ladder Sale that basically bets against a stock going up, forces it down, and allows assholes to buy entire companies for a few thousand bucks. It's thoroughly evil and this is protectionist tomfuckery of the highest magnitude. I hope those billionaires burn as the little guys steal the money from 2008 back.

https://www.reddit.com/r/walls...

Comment Poor security design to start with (Score 3, Interesting) 166

sudo is just another example of the giant (intentional) hole in the security barrier that is setuid root.

Just because of poor delegation design to start with, the setuid bit was invented instead of changing the design to a proper fine-grained access control. Instead of having proper access control lists for all resources like e.g. printers or privileges to set the system time or time zone, Dennis Richie though that setuid was such a neat idea the he went and patented it.

setuid root elevates the process itself to the all-powerful root account as the effective user. This means that all existing access control is moot. An audit of the access control setup can never reliably list what a user is allowed to do on a system. The existence of just a single setuid root tool means that you will need to know what that tool can do intentionally or unintentionally because of a bug as in this case.

a setuid "service" is not a real service with a limited and discoverable surface which can be independently secured, like e.g. a proper daemon with which you communicate through interprocess means. It is a process of which a would-be attacker has tremendous control the environment and parameters. To know what a setuid tool can do you need to read the source code and be able to verify that the tool is indeed the correct manifestation of the source code.

Comment Re:30 years! (Score 4, Insightful) 172

And yet Windows has since the very first Windows NT done this right: The lock screen / log-in screen runs on a separate "desktop". If the process crashes you are left with an empty desktop, not back to the user desktop. The "attention key" (ctrl-alt-delete) will relaunch the sign-in process.

Even the "elevation prompt" (introduced with Vista/Server 2003) by default uses a separate desktop to prevent "shatter attacks". Processes on the user desktop cannot send messages to, track mouse movements or otherwise control windows on the separate elevation prompt desktop, simply because they run on separate desktops.

Designing a lock screen which only obscures the other windows will cause *any* process crash to bypass the lock screen. That's why the original design of XScreenSaver tried to *minimize* dependencies. But it is still inherently insecure. Sometimes unplugging/switching monitors can cause overflows which will crash the process when rescaling.

Comment Re:Affects as far back as Windows XP at least (Score 4, Insightful) 96

It appears to be an NTFS based issues as opposed to a Windows 10 thing.
(Of course, who cares about a dead OS, but it's interesting nonetheless.)

Yup. It is not even a corruption. Chkdsk does not find and fix any errors.

I strongly suspect that it is not a corruption at all, but a fault inside NTFS (probably because the access to the alternate datastream will hold a lock), which only flags an operation as faulted, in turn flagging the drive as potentially corrupted.

Slashdot Top Deals

"Floggings will continue until morale improves." -- anonymous flyer being distributed at Exxon USA

Working...