Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:Why did it take so long? (Score 4, Informative) 45

Having to confirm running the macros every time would be a nuisance in those situations.

Eh? The current state is that you *will* be prompted before execution of macros from any document downloaded from Internet or received through a mail program. That's how it works now.

You need to unblock (remove the "from Internet" taint) the document before you can run macros. Until then, a document with the "internet taint" is also opened in a sandboxed version of the application (low integrity mode strips away writing permissions to the file system and more).

This change is that you will not be *prompted*. The macros will silently be blocked. No prompt. Which is better, because social engineering techniques can be deployed to make the target *want* to unblock the document.

Comment Re:Great for agriculture (Score 1) 129

So more meltwater in the rivers. Indian farmers will be able to grow more crops maybe even crawl out of poverty? No we cant have that

Great idea! They just need to find a suitable gorge, build a dam and store that glacier meltwater before it goes to waste. But I bet they are too lazy for that, and that all the meltwater will have spilled into the sea before they decide to build a dam. Well, then at least it's not our problem. They had their chance. It's their glaciers and if they let them melt without using the water, shame on them. /sarcasm

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

If you want to auto-complete parameters, then type a dash *before* hitting ctrl+space. That way the powershell host will know that you are only interested in parameter names.

I don't know what type of host process you are running powershell in. It seems that it may have to little buffer space for displaying a large completion list. It works fine in Windows Terminal, ISE or VSCode.

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 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.

Slashdot Top Deals

In less than a century, computers will be making substantial progress on ... the overriding problem of war and peace. -- James Slagle

Working...