« first day (2341 days earlier)      last day (2580 days later) » 

12:01 AM
@heather wait, do you know the binomial theorem yet?
 
I'm pretty sure I did something wrong because it LOVES sending things to the down-right end of the board
 
Now who's talking like an old woman?
 
I see one bug right away. If the board is full unsigned int selected_row = 0, selected_col = 0; will cause it to return an incorrect answer.
 
@0celouvsky, I don't think so - let me look it up.
 
Initialize them to -1 or some other impossible value, or include a found one flag of some kind.
 
12:02 AM
oh, it's like Pascal's triangle in equation form
 
Yes, you could insist that a precondition to the routine be that there board is not full, but that is exactly the kind of thinking that lets bugs pop up out of well tested code far into the programs life.
 
@heather You need to know what binomial coefficients are
 
@dmckee True, fixing, one second
@dmckee Can I initialize them to NULL?
and then verify before doing setCell
 
Seecond, I see what you are doing with if (randRange(0, 100) > (int) (1 / counter * 100)) , but why not just use if (randRange(0,c) == 0)? Or does randRange not actually guarantee correct behavior on randRange(0,0)?
@BernardoMeurer They aren't pointers.
The reason some high-level language can have NUL or unset values on integer variables is that the variable is actually implemented as something akin to a c struct and has some meta data coming along with it.
 
@dmckee This is my randrange:
/**
 * randRange Generates random integers in range
 * @param lower Lower bound
 * @param upper Upper bound
 * @return random integer between lower and upper (inclusive)
 */
int randRange(int lower, int upper) {
    return rand() % (++upper - lower) + lower;
}
I guess (0,0) works?
 
12:08 AM
@heather well I might as well tell you the algorithm and you can tell me if you understand
 
okay
 
@dmckee Oh yeah!
Now it works :)
 
@heather Ok, we take a continuous function $f$ on $[0,1]$. You recall what that means, right?
 
I think I see the main problem. Doesn't if (randRange(0, 100) > (int) (1 / counter * 100)) accept with probability (c-1)/c?
 
@heather Do you have any plan to write a research paper before (or during) high school?
 
12:11 AM
@0celouvsky a function that has inputs and outputs between 0 and 1?
 
@dmckee Hm
 
@heather no, I mean $f:[0,1]\to\Bbb R$ and is continuous
 
I guess so
 
@YashasSamaga that would be cool - I'm working on two projects right now that possibly could lead to one, but I doubt I have the ability to bring them to fruition
 
Sorry, 99% of time "function" without qualification means $\to\Bbb R$
 
12:12 AM
And just for background knowledge, using a simple modulus operation as you have done with randRange won't give you exactly the desired probabilities. That's not an issue in this case where you don't need exactitude, but you wouldn't want to do it in a Monte Carlo.
 
@0celouvsky a function that has inputs between 0 and 1 and outputs in $\mathbb{R}$?
 
@heather Yes, but do you remember what continuous is
 
On the other hand most scientific analysis tool-kits provide a well debugged version, so you don't need to implement it yourself.
 
@heather Just do something whether it is good or bad; the college admission officers get excited when they see applicants with research papers
 
@dmckee I know, it won't be evenly distributed
@dmckee Can you remind me on how this works? Why do we change the probability as we go along?
 
12:14 AM
@0celouvsky a function with no inputs where it is undefined? i.e., none of the outputs are outside $\mathbb{R}$?
 
ahhh
what?
 
like a function f(x) = 1/x is undefined at x=0; f(x) is not continuous
 
@BernardoMeurer This method is used in cases where you don't know in advance how many items you have, but want to select one with uniform probability. The usual case is something like "Randomly and fairly pick one item from a linked list."
You can of course, walk the list counting and throw, then walk again to find the one you wanted.
 
But then you have O(2n)
 
Yeah, and it's so inelegant.
So you start by provisionally selecting the first.
Then is there is a second you provisionally select it with probability 1/2.
 
12:17 AM
@heather that's not what that means
 
At that point there are even odd that your selected item is the first or the second.
Then you provisionally select the third with prob. 1/3.
 
Ah
Cool!
 
Now check the odds for all three items: 1/3 for each. Cool beans.
Continue until you run out of stuff
It's so niffy it makes me grin every time I remember it.
 
@dmckee Very neat
Will keep close forever
 
@heather I thought you knew calc 1...
 
12:20 AM
@dmckee If I have two allocated pointers to unsigned integers of same size, how do I check if they are exactly the same? Is memcmp the function for that?
 
@0celouvsky i've read about calculus - i haven't taken the class
i'm sorry, i know i probably sound like an idiot
 
@BernardoMeurer Do you want to check if the pointers are the same (that is point to the same memory), or if the integers pointed to are the same?
 
@heather Don't degradate yourself like that
 
The first case is ptr1 == ptr2.
 
If you want someone to talk you down ask me
@dmckee The latter
 
12:22 AM
The second is if (ptr1 & ptr2 & (*ptr1) == (*ptr2))
 
Wait, that checks if every element of my pointer has the same value?
 
Gotta check that it is safe to defrerence the pointer before you actual do so.
 
I have these two
unsigned int *buf = calloc(self->size, sizeof(unsigned int));
unsigned int *rowcol = calloc(self->size, sizeof(unsigned int));
 
In the first case you might also want a special result for both pointers NULL.
@BernardoMeurer Yeah?
 
And I do a bunch of operation on buf based on rowcol. I want to detect if the resulting buf is the same as rowcol, i.e. buf[0]=rowcol[0] && buf[1] = rowcol[1] && ...
"Gotta check that it is safe to defrerence the pointer before you actual do so." What do you mean by that?
 
12:25 AM
@BernardoMeurer Doing *ptr1 when ptr1 is NULL makes the sate of your program undefined. Nasal demons are admitted from then on.
Also doing ptr[0].
So ... You should check that both pointers are non-NULL
Then loop over their contents
 
Oh, damn, I forgot to check for successful allocation of these pointers, good call
 
flag = 1; for (i=0; i<ROWSIZE; ++i) { if (buf[i] != rowcol[i]) flag = 0; } if (flag) ...
 
@dmckee Can't I just do this:
unsigned int *buf = calloc(self->size, sizeof(unsigned int));
if(buf == NULL) catchError("Buffer allocation failed","");
unsigned int *rowcol = calloc(self->size, sizeof(unsigned int));
if(rowcol == NULL) catchError("Row/Col allocation failed","");
 
@heather You don't sound like an idiot, but in your AMA you said you understood a good bit of calculus. Dan and Bernardo will probably kill me, but you don't.
 
@BernardoMeurer In this case you probably can. But you should be in the habit of checking pointers before using them in c. And in c++ if you are using raw pointers.
 
12:29 AM
@dmckee Got it, I will review the code and add the check now :)
Okay, back to the issue, do I just do if (ptr1 & ptr2 & (*ptr1) == (*ptr2)) ?
 
I'm not berating you, but if you want to get serious about learning calculus, I'm here for help.
 
How does this even work?
@heather He's not kidding, he held my hand throughout my entire freshman course
 
@BernardoMeurer That works if you want to compare a single integer at the end of each pointer. (Which is what I thought you'd asked, but I should have known better.)
But what you want to do is to compare a buffer full of integers, and you have to do that one at a time.
 
@dmckee I was really worried that it was some bizarre pointer hack
 
At least you don't have to do the NULL check before every comparison.
 
12:31 AM
@0celouvsky okay.
 
@dmckee Why won't memcmp work?
 
you have the Bernardo recommendation =)
 
I have it, but it doesn't work
 
@BernardoMeurer It will.
 
@heather He does, he's pretty much the sole reason I passed Analysis
 
12:32 AM
I just have some kind of blind spot for memcmp. Don't always remember that it is there.
 
@dmckee So, the objective is to only call that randCell function if the users move actually made a difference
i.e. if buf and rowcol are different
So I did this
if (memcmp(rowcol, buf, self->size * sizeof(*rowcol))) {
    self->setRandCell(self);
}
OH
typo
missed a !
There we go :)
Oh wait
 
Looks good at first glance. But I"m nursing the remains of a migraine so details are not my strong suit right now.
 
@dmckee Ouch, migraines are the worse :/
I caught it, nevermind
Okay, it works :)
@dmckee Thanks for the help again!
Going to go to bed, tomorrow it's time to implement the history functionality!
That one will be fun
 
sizeof(*rowcol) o0? @BernardoMeurer
 
@YashasSamaga What?
 
12:45 AM
The other day you had some code like that, I told u why such code is bad.
nvm
 
@YashasSamaga But they are explicitly and necessarily allocated with the same size
 
1:00 AM
@0celouvsky You still have time
Learn it in your free time, there are plenty of websites
Plus programming can be useful in physics
 
Huh?
I can program
 
@0celouvsky Oh, what language
 
h e l p
I can't sleep
The young people make too much noise
 
-1
Q: What happened to CuriousOne?

Count IblisHe stopped posting here quite suddenly. I remember CuriousOne to be very critical of the MWI, so I'm going to poke in his eye here by saying that the Universe is in a superposition of all possibilities consistent with the record about his postings, so anything that could have happened to explain ...

 
1:20 AM
@SirCumference matlab, formerly Java
learning fortran soon
 
lol FORTRAN
 
1:55 AM
@DanielSank yes
@Slereah it's a legitimate programming language
particularly for people really into that retro 70s computing scene like @KyleKanos
 
Has anyone ever made a non-mathematical simulation program in FORTRAN
 
@Slereah plenty of hello worlds if nothing else
 
Here's a math function
$f() = \mathfrak{hello world}$
 
2:34 AM
@EmilioPisanty ha! I still know things.
 
 
1 hour later…
4:03 AM
@Slereah What's with all this mathfrak nonsense?
 
@DanielSank it's the best font
$\mathfrak f:\mathfrak X\to\mathfrak Y$
honestly how can you not love it
 
$\mathscr{HELLO WORLD}$
 
4:39 AM
Theorem: The set of truths are not closed under concatanation
Proof: Let $\mathscr{C}$ be the collection of true statements. Pick $S,T \in \mathscr{C}$. Define concatanation $\dots : \mathscr{C} \times \mathscr {C} \to \mathscr{K}$ where $\mathscr{K}$ is an ordered collection.

Suppose $S=\{\textrm{I was drunk}\}$, $T=\{\textrm{yesterday}\}$. Then $S \cdot T = \{\textrm{I was drunk yesterday}\}$. However for $\mathscr{C}|_{\textrm{my life}}$ there is no $R \in \mathscr{C}$ such that $R=S\cdot T$. Therefore $S \cdot T \not \in \mathscr{C}$ Q.E.D.
 
@Secret I've gotta ask: who are you posting these walls of text to?
 
Also why do they always have to be nonsense
3
 
^That too
 
"yesterday" isn't even a statement
And if you allow arbitrary concatenation then yesterday yesterday yesterday yesterday yesterday is a statement
 
4:56 AM
Well technically yes, thus that will be a proposition that is false or had undefined truth value. Meanwhile we also had a well defined proposition called "Buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo" that can be true or false depending on what really happened.
 
@BernardoMeurer you say you love C, but what you've done is to turn it into C++ :-)
 
But I agree, mistake, a single word should not be a statement
 
Stop
 
I am just trying to formulate the observation that one can stitch together many truth statement and in general get a logical story yet it is completely false. From you guys reactions above, it seems I still get the maths concepts wrong...?
 
@JohnRennie Thank you.
 
5:09 AM
@SirCumference general, cause they are no specific users that I remember has relevant background to help enrich the analysis by pointing out directions on where to go next
 
@DanielSank I'm in some alternate universe where people prefer C over JS
Everyone I know is the opposite .-.
 
@DanielSank It is at least partially my fault, since it was me who told Bernardo how to implement member functions in a struct.
 
Then again, I don't have any friends who really use C...
 
you probably only know dumb teenagers
 
@SirCumference Bernardo is only using C because his course requires it. No-one sane would use C these days.
 
5:12 AM
@0celouvsky Who know that all browsers can run JS
Wait, that's moronic
 
oh don't give me that crap
I deleted my JS long ago
 
In effect what Bernardo has done is work round the limitations in C to turn it into a quasi OOL.
 
@SirCumference of course it can run it, I just deleted it
 
That doesn't...
I surrender
 
don't people still get taught C in school
C is usually the first language u learn
 
5:13 AM
I thought it was Java or C++
 
Perhaps, for some of these wall of text, the best way to think about them is that they are questions, but I am not sure what the question is except from many years of observation you guys seemed to somehow can give relevant answers
 
Gross
 
I was first taught JS
it has a special place in my heart
 
Disgusting
 
C is a piss poor language to teach a beginner. C++, Java or C# would be a much better start.
 
5:14 AM
Then I learned some C++
@Slereah What languages do you prefer?
 
Depends for what application
Generally I use C#
 
@Slereah You're a rare one
 
Well what else can I use
Java is pig disgusting
 
C# is a very nice language. If it wasn't tainted by association with MS it would be more widely admired.
 
python has weak types
 
5:16 AM
@SirCumference C# is widely used in industry.
 
C++ is really poorly implemented
 
@JohnRennie Dang, never met anyone who really uses it
And I'm majoring in CS (as well as physics)
 
> We assume that there exists a sequence $(\lambda_n)\subset D(J)$ with $|\lambda_n|\to\infty$ and that the family of operators $\{\lambda J_{\lambda_n}\}$ is equicontinuous. Then we have $$\mathrm{cl}\, R(J)=\{x\in X:\lim \lambda_n J_{\lambda_n}x=x\}$$ and hence $$N(J)\cap\mathrm{cl}\, R(J)=\{0\}.$$
I need some damn alcohol for this
 
I have some Salmiakki in the pantry
 
I don't know what's going on any more
 
5:17 AM
@SirCumference another example of how well academic CS courses train students for the real world.
 
pseudoresolvents
who has even heard of these things?
 
If I need some fast program I usually go with C
Or C++ that I use mostly like C
 
@JohnRennie C hashtag?
C cardinality?
 
It is pronounced C sharp
 
5:18 AM
$C \sharp$
 
C# (pronounced as see sharp) is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within its .NET initiative and later approved as a standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270:2006). C# is one of the programming languages designed for the Common Language Infrastructure. C# is a general-purpose, object-oriented programming language. Its development team is led by Anders Hejlsberg. The most recent version is C# 7.0 which...
 
"see sharp"
That's like pronouncing "CD" as "see dee"
 
@JohnRennie so what's covariant C?
just plain C?
 
Covariant C :-)
I've seen deviant C ...
 
Most non-CS people are confused on the difference between C, C++, and C#
 
5:19 AM
In mathematics, the musical isomorphism (or canonical isomorphism) is an isomorphism between the tangent bundle TM and the cotangent bundle T*M of a Riemannian manifold given by its metric. There are similar isomorphisms on symplectic manifolds. The term musical refers to the use of the symbols ♭ and ♯. It is also known as raising and lowering indices. == Discussion == Let (M, g) be a Riemannian manifold. Suppose {∂i} is a local frame for the tangent bundle TM with dual coframe {dxi}. Then, locally, we may express the Riemannian metric (which is a 2-covariant tensor field which is symmetric and...
 
Just like most are confused on the difference between Java and JavaScript
 
all I know about Java Script is that I deleted it
 
@0celouvsky it's interesting that tis chat site still works without a JS interpreteter on you computer ...
 
Javascript is all garbage
 
@Slereah no u
 
5:20 AM
It was made by people too lazy to have well defined types
 
@Slereah Big deal
You and your types
 
why is the chat so CS infested lately?
We haven't had a good point set topology discussion in weeks!
 
@0celouvsky JEE discussions had to be replaced
 
Most physicists have to do some coding.
 
Well this isn't a math chat, either!
 
5:21 AM
Both experimentalists and theorists.
So there's a large intersection between physicists and programmers.
 
I do have a mathematica program to derive all GR tensors from a metric
 
JEE should be over soon
 
It is quite nice
Doing GR calculations by hand is a pain
 
The nice thing about knowing one programming language is that learning another is way easier
 
Is it
 
5:23 AM
Yeah, in my experience
 
Here's a language I made :
 
You get a mindset
 
@Slereah did you write that yourself, or is it one of the various Mathematica GR programs floating about the web?
 
@JohnRennie Most physicists know the definition of a manifold!!!!!
 
@JohnRennie Wrote it myself
It's not very efficient
 
5:23 AM
@0celouvsky I strongly doubt that :-)
 
But I don't mind too much
 
@Slereah Neat
 
@Slereah lol what is that
 
mbs``c``vk.1r``clbsbvt0``s``vksb`t0``v0i
Now that's programming
And it's Turing complete
So you can write anything with it
 
I think we can all agree that HQ9+ is the best language
 
5:25 AM
please
It's not even Turing complete
 
Lol. 218 pages into a functional analysis text we have the definition of a group
random af
 
@Slereah I'm not gonna bother to learn what that means
All I know is it doesn't apply to my use of JS
 
Turing complete means that there is an isomorphism between that language and a Turing machine
 
Daily reminder that I deleted the heck out of it
@Slereah they're probably not teaching him anything in CS worhtwhile
 
Yeah I mean
 
5:27 AM
@0celouvsky Screw you!
 
Turing completeness is pretty basic CS
 
You think double majoring is easy
 
If you're not learning Turing completeness, you're not learning CS
You're just learning software development
 
@SirCumference I'm a double major you child
Calm your nips
 
@0celouvsky do you wanna continue on our discussion about the proof or you want to do it later after the CS discussions?
 
5:28 AM
@Slereah T-thanks
This is a very well known school for CS, so I'd hesitate to say I'm not learning anything
 
@SirCumference Carnegie-Mellon
 
@0celouvsky I refuse to say anything
 
@OBE Confirmed.
 
Not necessarily
 
@SirCumference Now I've got all I need
 
5:29 AM
All I'll say is that Carnegie Melon is a very tough school to double major in astrophysics and CS
Nothing more :P
 
Damn
Not Carnegie Mellon
You misspelled it
 
It's 1:30am
I'm not at my A game... :/
 
So it is Carnegie Mellon
 
@SirCumference How's Stephanie?
 
5:31 AM
I don't know what that means
 
O'Neil
 
Lol
I'm on to you
 
@0celouvsky Uh...?
Well first, if you were aware of someone I knew, that'd be very creepy
So please don't try that
 
oh it's too late for that
Going to search for the Yarmulke now
 
5:33 AM
I don't wear a yarmulke :P
 
damn
 
Amazingly none of my servers are dead this morning - or even coughing up blood. It could be a relaxed morning.
 
Possibly @SirCumference 's degree
 
Screw you...
 
Settle down chaps
Remember I have the power to ban users for, err, 60 seconds :-)
 
5:37 AM
@Secret So we need some preparations for the proof...number 1: do you know that closed and bounded subsets of $\Bbb R$ are compact?
 
Uh, that sounds very different from what I and DHMO went through cause we can show that in the standard topology of reals, [0,1] is closed and bounded, but noncompact?
 
wat
 
My sides
 
he lied to you
[0,1] is most certainly compact
 
5:40 AM
It is the compactest
 
@Slereah no, that's the empty set :P
 
Well you can cover it with $0$ sets
It's pretty compact
 
Ah sorry guys, [0,1] is not compact in the left order topology, not the standard one, I just realised...
in Mathematics, Feb 26 at 7:41, by Secret
@DHMO How about the countable union of {[1-1/n,1-1/(n+1))} with n=1,2,3,4,... and the union of [1,3/2) ?
Ok in that case, I should be fine for preparation 1, @0celouvsky
 
@Secret Ok next, 2: Do you know what the product topology is?
3: Do you know Tychonov's theorem for two sets?
 
2. I think I need to revise this a little bit cause the only thing I remember is that the open sets in that topology are of the form $\Pi^{-1}(U) \cup \Pi^{-1}(V)$ where $\Pi^{-1}$ are projections onto the first and respectively second coordinates of the tuple formed by the cartesian product of the underlying sets

3. I think I had not reached that section in munkres yet, thus I am kinda unfamilar with the theorem
 
5:51 AM
@Secret For 2, the basic open sets are of the form $A\times B$, that is, the rectangles form a basis for the topology
For 3: If $A,B$ are compact, then so is $A\times B$ in the product topology.
 
Ok (I like the way you phrase 2, it's a lot more intuitive than phrasing it as the intersections of $p^{-1}(U_i)$ that most text used)
but anyway, continue
 
@Secret The relationship $c||x||_1\le ||x||_2\le C ||x||_1$ is call an "equivalence" of norms
 
yup it reminds of a similar looking relationship in metrics
 
It's easy to check that this is an equivalence relation on the set of all norms on $X$
We want to check that all norms are equivalent. But since this relation is transitive, we can verify it for one of the norms some fixed norm
We'll use the $\ell^\infty$ norm for this since it has a very nice unit ball
Since $X$ is finite dimensional, it has a basis $e_1,\dotsc, e_n$
We define $||x||_\infty =\max |x_i|$, where $x=\sum x_ie_i$
make sense so far?
 
yup, so we have the unit n ball as a n cube under this norm
 
6:00 AM
@Secret Yes, and now comes the nice part. It's easy to see in this norm that $X=\times^n\Bbb R$ as a topological space, where $\Bbb R$ carries the usual topology
Now this means that $B=\{x\in X:||x||_\infty\le 1\}$ is just $[0,1]^n$, and hence compact in $X$ by Tychonov's theorem.
 
ok
 
@Secret We now have to show that $B$ is compact with respect to $||\cdot ||$ as well
This is...not so easy
First note that $||x||=||\sum x_ie_i||\le \sum |x_i|||e_i||\le C||x||_\infty$ where $C=\sum ||e_i||$
This implies that the $\infty$-topology is stronger than the first norm topology. Using this you can show that $B$ is compact with respect to $||\cdot ||$
Let $A=\{x\in X:||x||_\infty <1\}$. This is easily seen to be open with respect to either topology
$0\in A$ so we can fit an open ball $U=\{x:||x||<r\}$ inside of $A$ for some $r>0$
Now $||x||<r$ and $||x||_\infty\le 1$ implies $||x||_\infty<1$, that is, $U$ does not touch the boundary of $A$
Claim: $||x||<r$ implies $||x||_\infty<1$. To see this, let $||x||<r$ and put $x=\sum x_i e_i, \alpha=||x||_\infty$. So $||x/\alpha||_\infty=1$ and $x/a\in B$. Now if $\alpha\ge 1$, then $||x/\alpha||<r/\alpha\le r$, hence $||x/\alpha||_\infty <1$, which contradicts $||x/\alpha||_\infty=1$.
Thus $||x||_\infty =\alpha<1$, so we have the claim.
The claim then gives $||x||_\infty <r^{-1}||x||$ in $U$, so by scaling for all $x\in X$.
To sum it all up: for each $x\in X$, $r||x||_\infty <||x||\le C||x||_\infty$, which completes the proof.
@Secret I think this proof has an issue. I never used compactness, which is necessary. I'm thinking the construction of $U$ needs to be done more carefully and requires compactness. I'll write a better proof tomorrow
It's late, I must sleep
 
6:29 AM
g'night
 
7:05 AM
Some clarification on what I mean in the previous wall of text:
Consider the following sequence of events:
Truth
A: The book on the top of the bookcase fell
B: The dominos were knocked down
C: The ferris wheel is set into motion
D: A steel bead slid down the track
E: A splashing sound is made as it fell into a basin
F: A detector register the sound
What is being told:
D: A steel bead slid down the track
E: A splashing sound is made as it fell into a basin
F: A detector register the sound
C: The ferris wheel is set into motion
B: The dominos were knocked down
A: The book on the top of the bookcase fell
Without actually seeing the chain reaction setup in person, there is no way to deduce which version is true because it is internally consistent logically speaking
So the gist is that. You can have a video, and via clever cutting and rearrangment and the way each scene is arranged, create another video that depict the events differently, but still be perceived as unbroken and continuous
 
7:55 AM
Pro tip: never try to clarify a wall of text with another wall of text.
:-)
 

« first day (2341 days earlier)      last day (2580 days later) »