## Search found 170 matches

- Fri Oct 07, 2016 3:43 pm UTC
- Forum: Religious Wars
- Topic: Plural of "Octopus"
- Replies:
**89** - Views:
**39970**

### Re: Plural of "Octopus"

1 Or "Lego" or "LEGO", but never /legos/i. (Sand grains, lego bricks. Pile of sand, sack of lego.) :shock: Careful now. I've been down this road before... It's only the Brits that have this one right. I'm Canadian and was weirded out when I started encountering the assertion tha...

- Thu Oct 06, 2016 9:02 pm UTC
- Forum: Mathematics
- Topic: 1 is Not Prime
- Replies:
**17** - Views:
**2790**

### Re: 1 is Not Prime

Historically number theory was often referred to as "arithmetic", and occasionally it still is. (This is basically analogous to the way mathematicians use "algebra" and "geometry" to describe branches of mathematics that in their modern incarnations don't have much obvi...

- Mon Oct 03, 2016 5:21 pm UTC
- Forum: Individual XKCD Comic Threads
- Topic: 1741: "Work"
- Replies:
**53** - Views:
**5510**

### Re: 1741: "Work"

Do cups with fewer person-hours of design and debate tip more or less frequently than those designed in 'haste'? As far as the switch being on the cord, I'd hope that particular lamp is plugged in to a switched outlet. I, personally, wouldn't want a switched cord on a desk lamp where the switch was...

- Wed May 18, 2016 9:56 pm UTC
- Forum: Religious Wars
- Topic: Pronouncing RFID
- Replies:
**3** - Views:
**2513**

### Re: Pronouncing RFID

In my mind I hear "are-fid" when I read this word, but I suspect I'd just spell it out if I ever had cause to say it out loud.

- Thu Apr 14, 2016 5:00 pm UTC
- Forum: Religious Wars
- Topic: Is 1 prime?
- Replies:
**29** - Views:
**9370**

### Re: Is 1 prime?

If -1 is prime, surely 1 is composite. It's -1 squared!heuristically_alone wrote:Just want to point out that 1 wouldn't be alone. 1 and -1 would be in that subcategory. Nobody wants to be alone.

- Thu Apr 14, 2016 4:16 am UTC
- Forum: Religious Wars
- Topic: Is 1 prime?
- Replies:
**29** - Views:
**9370**

### Re: Is 1 prime?

You can't discriminate a number just because it doesn't follow all of the properties the other primes might have. It's practically racist. A platypus is a mammal even though it doesn't have most properties most other mammals have. It is considered a mammal because it fits the basic definition. Biol...

- Mon Apr 11, 2016 7:22 pm UTC
- Forum: Religious Wars
- Topic: Is 1 prime?
- Replies:
**29** - Views:
**9370**

### Re: Is 1 prime?

Neither 1 nor -1 has a prime factor, because they are both units. You can't solve a problem by stating a tautology, Nyktos. Everyone knows 1 or -1 is also called a unit. But all prime numbers have 1 or -1 as a factor. As do all numbers (except possibly zero) Yes, all numbers are divisible by 1 and ...

- Mon Apr 11, 2016 1:19 am UTC
- Forum: Religious Wars
- Topic: Is 1 prime?
- Replies:
**29** - Views:
**9370**

### Re: Is 1 prime?

But you still need some restriction there, or you have (-2)*(-3) = 2*3, and 6 no longer has a unique prime factorisation. Meanwhile, -1 has no prime factors at all. Neither 1 nor -1 has a prime factor, because they are both units. 6 already doesn't have a unique factorization, as it is both 2*3 and...

- Sun Apr 10, 2016 6:08 pm UTC
- Forum: Religious Wars
- Topic: Is 1 prime?
- Replies:
**29** - Views:
**9370**

### Re: Is 1 prime?

You need to allow negative primes in order to appropriately generalize the concept of prime to rings which don't have a notion of "positive" and "negative".phlip wrote:which... seems to be claiming that negative integers can be prime, which... seems even worse than 1 being prime.

- Fri Jan 08, 2016 2:58 am UTC
- Forum: Religious Wars
- Topic: Is 1 prime?
- Replies:
**29** - Views:
**9370**

### Re: Is 1 prime?

1 is not prime because it is not useful to define it to be prime. If 1 is prime, all the theorems about prime numbers don't start applying to 1, nor do they stop existing all together: they just become theorems about non-unit primes instead. Writing "non-unit prime" all the time is a waste...

- Sun Dec 13, 2015 7:52 pm UTC
- Forum: Coding
- Topic: Organising Wrestling DVDs via MySQL Database/PHP
- Replies:
**39** - Views:
**7211**

### Re: Organising Wrestling DVDs via MySQL Database/PHP

Does PHP not support parametrized queries?Xanthir wrote:Yeah, you gotta learn how to properly escape things for the context. For PHP, when you insert "outside" data into a SQL query use mysql_real_escape_string() on the data;

- Thu Dec 03, 2015 3:23 am UTC
- Forum: Mathematics
- Topic: hotel infinity and countably infinite
- Replies:
**31** - Views:
**2678**

### Re: hotel infinity and countably infinite

I find the power set argument cleaner, especially since you can formulate it in a way that resembles Russell's paradox. If f is a bijection (actually we only need to assume it's a surjection) from X to its power set, the set Y = { x ∈ X : x ∉ f ( x )} must be the image of some point y , and then bot...

- Tue Dec 01, 2015 3:57 am UTC
- Forum: Mathematics
- Topic: hotel infinity and countably infinite
- Replies:
**31** - Views:
**2678**

### Re: hotel infinity and countably infinite

I'm curious, tho - why convert to binary? There doesn't seem to be any particular reason to do so, as the construction works just as well in decimal - (123, 5) maps to 102035, and similarly an arbitrary number like 12345 maps to (135, 24). Yeah there's no real reason to use binary actually. I had s...

- Tue Dec 01, 2015 2:03 am UTC
- Forum: Mathematics
- Topic: hotel infinity and countably infinite
- Replies:
**31** - Views:
**2678**

### Re: hotel infinity and countably infinite

That's not a bijection, as many of the integers aren't mapped to - in particular, anything with a 0 for its second digit. I don't know what you mean by this. 10 has zero as its second digit, and it's the image of (1, 0). Or did you mean second in the other direction? 101, for instance, is the image...

- Mon Nov 30, 2015 11:02 pm UTC
- Forum: Mathematics
- Topic: hotel infinity and countably infinite
- Replies:
**31** - Views:
**2678**

### Re: hotel infinity and countably infinite

N 2 is indeed > N, but its still "countable" because N 2 can be contained in a finite number of dimensions of size N (specifically 2). That's not what countable means. Countable means you can literally count it - you can rearrange the set so that there is a natural number corresponding to...

- Mon Nov 30, 2015 3:13 am UTC
- Forum: Mathematics
- Topic: hotel infinity and countably infinite
- Replies:
**31** - Views:
**2678**

### Re: hotel infinity and countably infinite

What about 0.999...?Cradarc wrote:Any integer must contain a finite number of digits

- Mon Nov 30, 2015 1:17 am UTC
- Forum: Mathematics
- Topic: hotel infinity and countably infinite
- Replies:
**31** - Views:
**2678**

### Re: hotel infinity and countably infinite

prove that not every irrational number will be on bus 2. i can't accept the standard proof here, because the bus is infinitely long, and contains an infinite number of irrationals all "randomly" generated, so if it differs by 1 decimal place, somewhere else may contain the corrected versi...

- Mon Oct 05, 2015 11:24 pm UTC
- Forum: Mathematics
- Topic: Axioms and multiplication?
- Replies:
**18** - Views:
**2235**

### Re: Axioms and multiplication?

I'm gonna say it again: all the completeness axioms are the same for an ordered field. The page you linked claims otherwise. For an ordered field, Cauchy completeness is weaker than the other forms of completeness on this page. But Cauchy completeness and the Archimedean property taken together are...

- Thu Aug 27, 2015 3:26 am UTC
- Forum: Science
- Topic: How does "The Dress" illusion work on a computer screen?
- Replies:
**12** - Views:
**2352**

### Re: How does "The Dress" illusion work on a computer screen?

That metaphor doesn't work. Your photo would obviously appear to everyone to be red. Yes, we could understand that your dress is actually white and merely appears red because red light is being shined on it. But people wouldn't perceive it to be different than the actual RGB values of the image fil...

- Tue Aug 25, 2015 12:25 am UTC
- Forum: Science
- Topic: How does "The Dress" illusion work on a computer screen?
- Replies:
**12** - Views:
**2352**

### Re: How does "The Dress" illusion work on a computer screen?

Right. I could take a picture of a white dress under, say, red light. Undoubtedly if you examined the RGB values of the pixels making up the image of the dress, they would be shades of red or pink. But people would likely have no trouble telling that the dress is actually white, because the human br...

- Sat Aug 22, 2015 2:41 am UTC
- Forum: Logic Puzzles
- Topic: Who is What?
- Replies:
**21** - Views:
**2277**

### Re: Who is What?

I suspect the puzzle is trying to be a different puzzle entirely where we assume that all references to "The Engineer" and "The Programmer" can refer to any engineer/programmer rather than a specific one and that one of the brothers is both so what appears to be a contradiction ...

- Tue Aug 18, 2015 11:07 pm UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies:
**9541** - Views:
**1336412**

### Re: Coding: Fleeting Thoughts

Alternatively, you could just create a new class that inherits from the module class -- with x as a @property -- and find a way to create a module with *that* class instead of the standard module class. You can do this with import hooks, though of course for that to work you need to arrange to have...

- Sun Aug 16, 2015 11:33 pm UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies:
**9541** - Views:
**1336412**

### Re: Coding: Fleeting Thoughts

I would consider that ugly. Sometimes a function returning different types based on the input is reasonable but that usually takes the shape "output type is the same as input type" or something along those lines. In your case I think it would be better to just give class X a different meth...

- Mon Jun 08, 2015 6:47 pm UTC
- Forum: Individual XKCD Comic Threads
- Topic: 1535: "Words for Pets"
- Replies:
**40** - Views:
**7480**

### Re: 1535: "Words for Pets"

I think I got stuck in the "second year" phase. For the last few years of my friend Catherine's life I pretty much always just called him "cat".

- Tue Apr 28, 2015 5:59 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies:
**9541** - Views:
**1336412**

### Re: Coding: Fleeting Thoughts

Nyktos, in C++ variables are names for things. The thing they are a name for never changes (so long as it exists) in its fundamental nature. That thing can be a *pointer* to another thing if you want. A reference is an alternative name for a thing, and similarly what it refers to never changes (so ...

- Sat Apr 25, 2015 2:44 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies:
**9541** - Views:
**1336412**

### Re: Coding: Fleeting Thoughts

...which makes me think you could use a similar technique to 'jury-rig' constraints on variables (by assigning them to objects that do insidious shit when you try to delete them). Dunno if that would work, though (and it's definitely very unpythonic!). That won't work if you end up with other refer...

- Sat Feb 28, 2015 7:23 pm UTC
- Forum: Religious Wars
- Topic: Braces vs indent vs "end ..." syntax preference
- Replies:
**49** - Views:
**12482**

### Re: Braces vs indent vs "end ..." syntax preference

I agree. It's annoying when less code fits on screen because a fifth of your lines are just "end" or "}".ucim wrote:But in the meanwhile more code is visible in the window, which is a good thing.

- Wed Feb 25, 2015 3:44 pm UTC
- Forum: Religious Wars
- Topic: Braces vs indent vs "end ..." syntax preference
- Replies:
**49** - Views:
**12482**

### Re: Braces vs indent vs "end ..." syntax preference

Python has absolutely no problem with "if condition: do_a_thing()" on one line.ucim wrote:if (condition)

..do this

if (another condition)

..do that

if (a third condition && a fourth condition)

..do something else

- Tue Feb 17, 2015 6:39 pm UTC
- Forum: Language/Linguistics
- Topic: Mobile?
- Replies:
**9** - Views:
**3180**

### Re: Mobile?

I always say "mo-bile", including for the baby thing, but I hear "moble" reasonably often around here (Toronto) as well, mostly for phone-related things.

- Mon Feb 16, 2015 4:12 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies:
**9541** - Views:
**1336412**

### Re: Coding: Fleeting Thoughts

I get 9223372036854775807 (2^63 - 1) on both Python 2 and 3.

Some digging finds that sys.maxsize is PY_SSIZE_T_MAX which is platform-dependant and definitely not always the same as INT_MAX.

Some digging finds that sys.maxsize is PY_SSIZE_T_MAX which is platform-dependant and definitely not always the same as INT_MAX.

- Wed Jan 21, 2015 2:13 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies:
**9541** - Views:
**1336412**

### Re: Coding: Fleeting Thoughts

I'm not very well versed in C++ so I'll being deferring to your knowledge and expertise on most of that. As far as optional<optional<X>> goes, in all the literature and examples I've seen it could just be flattened to optional<X>. That outer wrapping isn't really serving much purpose. In Rust, iter...

- Wed Jan 14, 2015 5:29 pm UTC
- Forum: Religious Wars
- Topic: Is 0 a natural number?
- Replies:
**35** - Views:
**10465**

### Re: Is 0 a natural number?

Way back when, I learned that "whole" numbers are {1, 2, ...} and natural numbers are {0, 1, ...}. Or maybe it was the other way around. Maybe I should say "I was taught" instead. :-) I'm certain that in high school I was taught that "whole numbers" include zero and na...

- Wed Jan 14, 2015 3:26 am UTC
- Forum: Religious Wars
- Topic: Is 0 a natural number?
- Replies:
**35** - Views:
**10465**

### Re: Is 0 a natural number?

The natural numbers are simply those that occur as the sizes of finite sets (including the empty set). Any other definition is unnatural.

- Tue Jan 13, 2015 4:06 am UTC
- Forum: Mathematics
- Topic: Finding a (large) primitive root of a 300-digit prime
- Replies:
**14** - Views:
**3680**

### Re: Finding a (large) primitive root of a 300-digit prime

Interesting. Eebster's post made me think it might be something to do with Python 2 distinguishing between int and long, but indeed it works fine on 2.7 on my machine.

- Tue Jan 13, 2015 2:25 am UTC
- Forum: Mathematics
- Topic: Finding a (large) primitive root of a 300-digit prime
- Replies:
**14** - Views:
**3680**

### Re: Finding a (large) primitive root of a 300-digit prime

Hmm, that's odd. My only guess is that it might be a Python 2 vs 3 error (I used the latter) but I can't find anything about the behaviour of pow() changing.

- Mon Jan 12, 2015 2:15 am UTC
- Forum: Mathematics
- Topic: Finding a (large) primitive root of a 300-digit prime
- Replies:
**14** - Views:
**3680**

### Re: Finding a (large) primitive root of a 300-digit prime

You're taking an 8192-bit exponent directly? I don't get it. Wouldn't that take forever? Anyway, I took the script straight from Wikipedia. How did you modify it to give the correct result? pow() implements modular exponentiation if you pass it a third parameter. I didn't modify your script directl...

- Sun Jan 11, 2015 7:30 pm UTC
- Forum: Mathematics
- Topic: Finding a (large) primitive root of a 300-digit prime
- Replies:
**14** - Views:
**3680**

### Re: Finding a (large) primitive root of a 300-digit prime

Using Python's built-in pow() function and reading the number in as hex directly I'm getting that it works fine. As I far as I understand the generator being 2 doesn't matter much, and it's probably faster to implement that way. The use of pi is likely to provide a source of pseudo-randomness that c...

- Sat Jan 10, 2015 11:07 pm UTC
- Forum: Mathematics
- Topic: Finding a (large) primitive root of a 300-digit prime
- Replies:
**14** - Views:
**3680**

### Re: Finding a (large) primitive root of a 300-digit prime

Yes.Eebster the Great wrote:If not, are there sufficiently large ones already published? (Sufficiently large so that even though they might already be in log tables or whatever, no attacker could use that to find our private keys in their lifetime.)

- Sat Jan 10, 2015 7:12 pm UTC
- Forum: Religious Wars
- Topic: Braces vs indent vs "end ..." syntax preference
- Replies:
**49** - Views:
**12482**

### Re: Braces vs indent vs "end ..." syntax preference

Python allows embedding one kind of triple quotes inside the other. If you always use triple double quotes for docstrings as PEP 257 recommends, you can use triple single quotes for copypasting.

- Fri Jan 09, 2015 12:28 am UTC
- Forum: Religious Wars
- Topic: Braces vs indent vs "end ..." syntax preference
- Replies:
**49** - Views:
**12482**

### Re: Braces vs indent vs "end ..." syntax preference

I'm talking about at the REPL, not in your actual code. As in:

>>> exec("""

... # copy-paste here

... """)

>>> exec("""

... # copy-paste here

... """)