Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re:What's the catch? (Score 1) 402

Except that either the kernel patch or the .bashrc hack (and possibly a better version of that hack) will eventually be the default in your distro's setup. *Either way*, you won't care how it gets to you. It sounds like the .bashrc hack or other, similar tricks have the advantage of (a) working now, with current kernels, and (b) letting the distros decide the heuristics of grouping processes, instead of the kernel.

Comment Re:What about C++? (Score 1) 583

Remember, 60% longer means 60% more typing when you create the code. Typically, my programs are about 30% I/O which means 60% longer format strings mean a lot more effort in coding.

I have a saying: If you're scared of typing, you shouldn't be a programmer. And how is it easier to have to consult the local printf documentation whenever you want to decipher your coworker's code? In most cases, my format strings merely contain {0}, {1}, {2}, and so on.

Besides, remember how much code is out there in C format strings. By creating a new standard you suddenly are putting all that outside easy conversion.

It's not new. C# had it years ago, and probably other languages before that. And do you really spend a lot of time converting printf statements into Python? That sounds like a royal pain with all of the type differences.

BTW, the old Python '%' format operator already supports positional formatting.

It's still around, for anyone who wants to keep writing inscrutable code to save keystrokes.

I think having a new text formatting library is OK, but it's an epic fail to deprecate something that has been working so well for so long. Why not keep the '%' operator while still having the 'format' string method? Are they so afraid of the Perl "there's more than one way to do it"?...

I expect they're afraid of Python programmers writing code that looks like Perl.

The "shell" argument is meant for security purposes. By setting shell=False one avoids script injection vulnerabilities.

You've completely ignored what I said, or failed to read the documentation. shell=True allows you to run full shell commands, including the piping you want to do. If you want to make it shorter, you can write a function:

def p(a):
        subprocess.Popen(a, shell=True)

And then just tell anyone that reads your code that p() obviously stands for process. Or you can use s() for shell.

Or you can just stick to an older version of Python. No one's forcing you to upgrade.

Comment Re:What about C++? (Score 1) 583

You know what worries me? Take a look at Python 3, they have deprecated the *excellent* C standard formatting method for a new way that's about as complicated and absurd as the C++ way.

I disagree completely. Warlock's printf("0x%08xn", x) becomes print('0x{0:08x}'.format(x)) in Python 3. It's cleaner and easier to read, and has the advantage of positional formatting.

Another Python "improvement": deprecated popen. This means that the nice, clean, easy to understand Unix command

output=`dmesg | grep hda`

has been replaced by:

p1 = Popen(["dmesg"], stdout=PIPE)
p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
output = p2.communicate()[0]

WTF???

Call me crazy-- I don't use popen-- but isn't that the purpose of the shell=True argument? (http://docs.python.org/library/subprocess.html) Their example is probably intended to work across as many platforms as possible.

Comment Re:A bit big for their britches? (Score 1) 640

"Survival of the fittest" requires diversity. If you're saying nobody should even attempt to replace X, then you have no diversity, and you have no "survival of the fittest," merely "survival of the incumbent."

Let Ubuntu develop Wayland. If it's a good idea, people will pick it up. If it's not, people will stick to X. THAT is survival of the fittest.

Comment Re:No, it means you don't understand irony. (Score 1) 547

What I don't get-- and maybe you can explain this to me-- is if Christians aren't under the Mosaic Law (and I'm not so sure they aren't, Jesus made it clear he wasn't abolishing the law at all), then what moral code *are* they under? If the Mosaic Law, uttered by God Himself, isn't reflective of His Most Excellent Moral Code, then what is?

Slashdot Top Deals

Neutrinos have bad breadth.

Working...