## Search found 6289 matches

Mon Oct 14, 2013 5:18 am UTC
Forum: Mathematics
Topic: The ambiguity of indefinite integrals
Replies: 12
Views: 5799

### Re: The ambiguity of indefinite integrals

Firstly, the integral from sgn from a to b isn't improper, even if a<0<b. Its Riemann integral converges fine, and the integrand is everywhere defined. Ultimately this is a semantic distinction, but according to Wikipedia, it is: Integrals are also improper if the integrand is undefined at an inter...
Sun Oct 13, 2013 6:42 pm UTC
Forum: Computer Science
Topic: SOS-Need help at exercise
Replies: 10
Views: 5091

### Re: SOS-Need help at exercise

For showing the language is regular: What is the definition of being a regular language? A regular language is a finite language that has the following properties: Σ is the alphabet, a finites set Σ k is a finite set of states I is the first state Δ is a set of rules This looks like an incomplete d...
Sun Oct 13, 2013 3:49 pm UTC
Forum: Mathematics
Topic: The ambiguity of indefinite integrals
Replies: 12
Views: 5799

### Re: The ambiguity of indefinite integrals

Consider the function f(x) = 0, and assume that sgn(x) is an antiderivative of f that we can use as its integral. If that were the case then the \int_-{1}^1 f(x) dx = 2, but its not, its 0. sgn is not an antiderivative of f because f(0) = 0 while sgn'(0) does not exist. We get to use have different...
Sun Oct 13, 2013 3:19 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

EvanED wrote:(3) In C++98/03, it was not possible to compare a reverse_iterator to a const_reverse_iterator. (DR280 was filed and I think was fixed in C++11.)

Is that actually a bug? Can you say a language has a bug because it lacks the feature you want?
Sun Oct 13, 2013 3:07 pm UTC
Forum: Computer Science
Topic: SOS-Need help at exercise
Replies: 10
Views: 5091

### Re: SOS-Need help at exercise

For showing the language is regular: What is the definition of being a regular language? Since there have to be three "a", we must have 3 states and also 2 states for the first and last letter. That's basically it, you just need to be a bit more rigorous. Suppose the DFA is fed the string ...
Sun Oct 13, 2013 3:28 am UTC
Forum: Computer Science
Topic: SOS-Need help at exercise
Replies: 10
Views: 5091

### Re: SOS-Need help at exercise

Hint: A finite version of the pumping lemma.
Sat Oct 12, 2013 2:01 am UTC
Forum: Mathematics
Topic: Is this ambiguous? Is it fallacious?
Replies: 92
Views: 19100

### Re: Is this ambiguous? Is it fallacious?

Is there a requirement for the group actions to commute? There's only one group action. There's no requirement in a group action in general for the actions by various elements to commute, but they must commute if the corresponding group multiplication commutes. In this case the group Z_2 x Z_2 is a...
Sat Oct 12, 2013 1:34 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

Right now the only code I have that produces this bug is proprietary, but one of my tasks for next week is to find a simple demonstration of the bug and I'll be happy to share it when I do. Looking forward to it. :-) I'm pretty sure I have a minimal demonstration of the bug. bug.c: char longToChar(...
Fri Oct 11, 2013 3:07 pm UTC
Forum: Computer Science
Topic: How prone are plagiarism-detection tools to false-positives?
Replies: 7
Views: 9267

### Re: How prone are plagiarism-detection tools to false-positi

I think a simple way to think about this is -- determining a "diff" between two pieces of code is a task whose complexity depends on the syntax of the languages. For example, it's trivial to change variable names in most languages while retaining the behavior of the program. Others allow ...
Fri Oct 11, 2013 2:53 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

It feels really good to spend 5 hours trying to find the bug in your code, only to discover it was actually a bug in the compiler. :) Admittedly, I'm always extremely skeptical when people make such a claim. Can you tells us which compiler and what the bug was? It was a bug in clang/llvm. (Apple LL...
Fri Oct 11, 2013 2:42 pm UTC
Forum: Mathematics
Topic: Is this ambiguous? Is it fallacious?
Replies: 92
Views: 19100

### Re: Is this ambiguous? Is it fallacious?

Edit:I've significantly changed my original post. I feel it is much improved. Could you please not make major revisions to your original post like that? I think it makes it harder to follow what's going on in the thread. Instead, make a new post that has your new ideas, and if you really want to yo...
Fri Oct 11, 2013 7:49 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

It feels really good to spend 5 hours trying to find the bug in your code, only to discover it was actually a bug in the compiler.
Wed Oct 09, 2013 2:34 pm UTC
Forum: Mathematics
Topic: Is this ambiguous? Is it fallacious?
Replies: 92
Views: 19100

### Re: Is this ambiguous? Is it fallacious?

Actual statement A specific system (that is dynamic) may be specified as follows: i) Three sets of states {x 1 , … , x n }, {y 1 , …, y n }, {z 1 , …, z n }. ii) Each set of states S = {s 1 , …, s n } where s i = {x i , y i , z i } has a property labelled “Behaviour”: F = {f 1 , …, f n } iii) Three...
Tue Oct 08, 2013 5:34 am UTC
Forum: Mathematics
Topic: I want to set this problem for a student, but....
Replies: 20
Views: 4128

### Re: I want to set this problem for a student, but....

Fit a circle inside of a triangle, then revolve? Yip, that's it. But how do I find the triangle with the least area for a given circle? The triangle of least area won't give the cone of minimum volume. When you rotate a triangle to give a cone, each bit of area contributes an amount to the volume p...
Fri Oct 04, 2013 9:08 pm UTC
Forum: Coding
Topic: Why Python is the best programming language in the world
Replies: 116
Views: 27258

### Re: Why Python is the best programming language in the world

One thing I love about python is how easy generator expressions make it to transform between different representations of the same information. A quick example:

Code: Select all

def NumberSetToHexString(number_set):    return "0x%x" % sum(2**n for n in number_set)
Tue Oct 01, 2013 6:16 am UTC
Forum: Mathematics
Topic: Cardinality of the complex numbers
Replies: 41
Views: 11774

### Re: Cardinality of the complex numbers

Personally I find the latex more readable than any of the alternatives so far discussed, save unicode.

Why did we ditch the support for math tags? Were they really so much worse than the alternative, and is there really no viable replacement?
Mon Sep 30, 2013 10:57 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

Things I hate about XCode: ⋅ It randomly hangs while I'm not doing anything but typing text and spins a pinwheel for a while (when it doesn't just crash). ⋅ It stores a ton of configuration data under the hood where it is inaccessible except through a complicated GUI so you have...
Fri Sep 20, 2013 1:34 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

I suspect that Alex (aka ahammel) was talking about Python, so some of the above suggestions may not be so relevant. Yes, Python has an assert statement, but you can't conveniently magic it away in production code. Running Python with -O removes asserts. This seems like a dangerous thing to do. Wha...
Thu Sep 19, 2013 1:46 am UTC
Forum: Coding
Topic: Why Python is the best programming language in the world
Replies: 116
Views: 27258

### Re: Why Python is the best programming language in the world

I think I got it into my head when I started to run pylint on my code... I probably shouldn't take advice on how to code from programs that are so hypercritical. I need a more supportive style dealie. I like the hypercriticality. But yeah, don't be shy about ignoring/silencing lint warnings you dis...
Sat Sep 14, 2013 5:52 am UTC
Forum: Science
Topic: "Uncomputable" physics
Replies: 2
Views: 1616

### Re: "Uncomputable" physics

Penrose's interpretation of the incompleteness theorem is complete bunk, so any claims resulting from that that physics is incomputable should be taken with a few tablespoons of salt. But yes, noncomputable theories of physics could in principle be tested, because you don't have to work out everythi...
Fri Sep 13, 2013 2:59 pm UTC
Forum: Coding
Topic: Why Python is the best programming language in the world
Replies: 116
Views: 27258

### Re: Why Python is the best programming language in the world

(I'd use skeptical's function for lists) I don't think I wrote one. Are you thinking of one of EvanED's posts? def window(it, k): # unoptimized - probably no good for large k (deque for large k? all k?) it = iter(it) items = [] for i in range(k): items.append(next(it)) while True: yield tuple(items...
Thu Sep 12, 2013 3:20 am UTC
Forum: Hardware
Topic: Laptop Battery Replacement
Replies: 5
Views: 3795

### Re: Laptop Battery Replacement

Jplus wrote:Oops, right. Sorry for the confusion.

I don't believe I was contradicting you, as mAh is indeed a measure of battery capacity. I was just clarifying for the OP what mAh means.
Wed Sep 11, 2013 11:13 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

I've used clang-format (http://clang.llvm.org/docs/ClangFormat.html) with success.
Wed Sep 11, 2013 2:44 pm UTC
Forum: Hardware
Topic: Laptop Battery Replacement
Replies: 5
Views: 3795

### Re: Laptop Battery Replacement

mAh = milliAmp-hours. Multiply that by voltage and you get the total energy stored in the battery.
Tue Sep 10, 2013 10:22 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

Is it that bad? I never really tried it. Things I hate about XCode: ⋅ It randomly hangs while I'm not doing anything but typing text and spins a pinwheel for a while (when it doesn't just crash). ⋅ It stores a ton of configuration data under the hood where it is inaccessible exc...
Tue Sep 10, 2013 3:25 pm UTC
Forum: Mathematics
Topic: Normal way to show Q(cube root of 2) is a subfield of R?
Replies: 7
Views: 4027

### Re: Normal way to show Q(cube root of 2) is a subfield of R?

I like your proof. It seems fairly natural to me that the obvious way to try and invert (a + b( 3 √2) + c( 3 √4)) is just write down an inverse and solve for the coefficients: (a + b( 3 √2) + c( 3 √4))(x + y( 3 √2) + z( 3 √4)) = ax + 2cy + 2bz + (b...
Tue Sep 10, 2013 2:05 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

Diadem wrote:Unit tests are for wimps.

Thesh wrote:What is this "testing" you speak of?

Xenomortis wrote:I've never seen a unit test at my current job.

TheChewanater wrote:a beautiful strong programmer who don’t need no unit tests

Y'all are fucking psychos.
Tue Sep 10, 2013 7:26 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

I wish I had VS problems. Yesterday, I tried to run a JUit test in eclipse. This triggered not the unit test to run, but the Problems tab to jerk back and forth 5 pixels on the screen for a while. And then the screen went gray. And then it went back to normal, but had an abandoned XWindow 10x10 pix...
Tue Sep 10, 2013 6:21 am UTC
Forum: Hardware
Topic: Tea and laptops not meant to interact
Replies: 3
Views: 3034

### Re: Tea and laptops not meant to interact

Sizik wrote:Could have been overheat protection, if the tea was hot. Also, if you had sugary tea, your keys might stick.

Tea was cool; I was down to the last quarter of my cup, luckily, or it probably would have been worse. Luckily no sugar in it.
Tue Sep 10, 2013 4:51 am UTC
Forum: Mathematics
Topic: Confusion on question concerning matrix norms
Replies: 3
Views: 1328

### Re: Confusion on question concerning matrix norms

One trick that sometimes works to prove a = b is to prove a ≥ b and a ≤ b. This is especially likely to be useful when one or the other (or both) is defined as a supremum/infimum (or max/min). That is probably how I would prove this result. Does that give you an idea for a cleaner proof than the one...
Tue Sep 10, 2013 3:06 am UTC
Forum: Mathematics
Topic: Confusion on question concerning matrix norms
Replies: 3
Views: 1328

### Re: Confusion on question concerning matrix norms

I'd assume this is a typo, yeah. Switch M and N as needed so that the rest of the problem makes sense, then try to solve that. You can make a small note at the beginning of your solution if you like. The hard part will be determining whether the author intended If A is an NxM matrix considered as a ...
Tue Sep 10, 2013 2:58 am UTC
Forum: Hardware
Topic: Tea and laptops not meant to interact
Replies: 3
Views: 3034

### Tea and laptops not meant to interact

So, last night I accidentally poured tea in my macbook keyboard. It instantly turned itself off. I quickly blotted the keyboard, turned it upside-down, and shook out as much liquid as I could. Then (probably unwisely), I turned it back on. It booted up normally. I then thought better, turned it off ...
Thu Sep 05, 2013 5:44 am UTC
Forum: Coding
Topic: Why Python is the best programming language in the world
Replies: 116
Views: 27258

### Re: Why Python is the best programming language in the world

Yours is significantly faster: To generate all primes less than 100, skepsci's algorithm took 0.061000 milliseconds while PM 2Ring's algorithm took 0.025000 milliseconds. To generate all primes less than 1000, skepsci's algorithm took 0.640000 milliseconds while PM 2Ring's algorithm took 0.037000 mi...
Thu Sep 05, 2013 3:32 am UTC
Forum: Coding
Topic: Why Python is the best programming language in the world
Replies: 116
Views: 27258

### Re: Why Python is the best programming language in the world

def primes(): """Prime number generator using Sieve of Eratosthenes.""" # Instead of crossing off every multiple of a prime up to some bound, we just # cross off the next uncrossed multiple of a prime. Crossed off numbers are # stored in lazy_sieve, together with the f...
Tue Sep 03, 2013 3:50 pm UTC
Forum: Mathematics
Topic: Help with proof (or not) in symmetry
Replies: 11
Views: 4357

### Re: Help with proof (or not) in symmetry

I just finished reading an essay by Terence Tao about the three stages of math education: pre-rigorous, rigorous, and post-rigorous. It occurred to me that people in the post-rigorous stage sometimes talk the same way as people in the pre-rigorous stage (especially when talking/writing for a non-tec...
Mon Sep 02, 2013 5:41 pm UTC
Forum: Religious Wars
Replies: 61
Views: 92675

### Re: Google Search vs Bing

BING WON 0 ROUNDS:
Sun Sep 01, 2013 3:47 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

It's a matter of style, not language. Similarly, the only difference between a header file and an implementation file is the filename extension (and presence of a header guard), neither of which is enforced by the compiler.
Fri Aug 23, 2013 4:05 am UTC
Topic: 1254: "Preferred Chat System"
Replies: 48
Views: 13715

### Re: 1254: "Preferred Chat System"

I am totally going to use this to troll people. Anyone know where I can get a carrier pigeon?
Mon Aug 19, 2013 3:36 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1976905

### Re: Coding: Fleeting Thoughts

I remembered that I used stackless jumps for nearly all branching and I knew the code would be messy. However when first reading and re-typing the code after all those years I was still completely baffled by the terrible mess of spaghetti code. It was so hard to comprehend I thought junior Julian m...
Mon Aug 19, 2013 3:02 pm UTC
Forum: Mathematics
Topic: 2 groups of objects delete each other. how many are left?
Replies: 2
Views: 1877

### Re: 2 groups of objects delete each other. how many are left

Since v >> k, v-k is approximately equal to v, so it doesn't really matter how many objects from group B are deleted, every object from group A will end up paired with v objects from group B (unless the A-object is deleted first). So the odds of an individual object from group A being deleted each r...