News for hackers. Stuff that matters.

heron87

Re:Python 3.5 to Ship with Matrix Multiplication Operator on Tuesday April 08, 2014 @04:18AM (#7552091)
No offense intended. I just have a slightly different understanding of a "scripting language": a — often domain-specific — language that is merely used to write small scripts/macros. But anyway, I did not want to start a discussion about that. Sorry for that.
Re:Python 3.5 to Ship with Matrix Multiplication Operator on Tuesday April 08, 2014 @03:16AM (#7551876)
Ehm, Python is not a "scripting language". It is a — as you said — general purpose programming language. And it is becoming more and more popular for scientific applications, where matrix multiplication plays a key role.
Re:High Quality PHP on Tuesday December 24, 2013 @11:14AM (#6959894)
I believe "high quality PHP" is an oxymoron. It's just impossible to be aware of all the pitfalls PHP contains. Here is just one example among many:

> if( '33333333333333333333' == '33333333333333333334' ) echo "equal"; Output: "equal"

The "reason" for this very odd behaviour is that the two strings are automatically converted into integers, which leads to an int overflow, which PHP ignores (ignoring errors is very PHP specific) by guessing that the two "numbers" must be equal. I'm sure they even call this a feature...

Re:P = NP on Wednesday December 04, 2013 @09:02AM (#6846859)
Not sure what you mean by "memory requirement" and "theoretical time". If you don't access the memory, what do you mean by saying you "need" it? If a turing machine — or a computer program, for that matter — uses, i.e., "visits", exponentially many memory cells, then, indeed, its computing time cannot be polynomial. But note that every turing machine theoretically has infinite memory. The question is how much of it is actually used. PSPACE consists of those problems that can be solved by a turing machine that uses no more than p(n) memory, where p(n) is some polynomial in the input length n. Note that, for PSAPCE, time is unrestricted. So obviously P and NP are subsets of PSPACE, but it is unknown whether they are proper subsets.
Re:P = NP on Wednesday December 04, 2013 @07:50AM (#6846509)
A definition of P indeed does not require a restriction on memory use. But the definition implies a restriction on memory: a polynomially bounded (in time) machine cannot use exponential memory (because reading 2^n cells on a tape requires 2^n time steps).