* Posts by rgmiller1974

3 posts • joined 20 Jul 2017

Python creator Guido van Rossum sys.exit()s as language overlord

rgmiller1974

Re: Reinventing a more limited wheel

I'm curious about the example thames posted. Is

results = [(x, f(x), x/f(x)) for x in input_data if f(x) > 0]

really any slower than

results = [(x, y, x/y) for x in input_data if (y := f(x)) > 0] ?

In the first expression, I can see that f(x) could potentially be evaluated three times, but would that actually happen? The example implicitly assumes that f(x) returns the same value each time it's evaluated. If that's the case, is the interpreter not smart enough to cache the result of f(x) for later use? (And if that's not the case - for example if f(x) returned x+time.time() - then the two expressions above aren't actually equivalent.)

No chance of flying too close to this: Icarus, the most distant star seen, is 9bn light years away

rgmiller1974

Re: Douglas said it best.

Douglas Adams' description is pretty good, but I actually think Bill Bryson said it better in "A Short History of Nearly Everything": "Space is very aptly named."

.. ..-. / -.-- --- ..- / -.-. .- -. / .-. . .- -.. / - .... .. ... then a US Navy fondleslab just put you out of a job

rgmiller1974

Is it still flashing in Morse code?

Is the light still flashing in Morse code? (It wasn't clear to me from the article.)

The reason I ask is that if you're going to have electronics on both ends, then why not use them to do something useful, like encode the data with a protocol that includes error correction?

Biting the hand that feeds IT © 1998–2019