« first day (946 days earlier)      last day (4018 days later) » 

9:00 PM
This is certainly one of my favourites: stackoverflow.com/questions/184618/…
 
The race has been stopped. :(
 
Did someone go splat on the tarmac?
 
Nah, there's torrential rain.
I've extended my timings fetching script. :)
There are some ugly parts but it does the trick for now.
 
Oh, you could've improved #24-#31
 
Yea, that part is particularly ugly.
 
9:06 PM
Also, you're aware you're using resp.json() twice?
items = resp.json()['items']
team = items[98]
 
Didn't even notice, I was watching the race while doing that, so all I wanted was to get it done real quick.
I should fix that now.
 
Also, Warframe hates me
 
@user1477699 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Zirak Oh? What's wrong?
 
Tried reinstalling twice, keeps "Downloading new content"ing me
 
9:09 PM
:/
 
For 3 hours or so
nethogs says it's not downloading anything
The liar
 
nethogs lies
 
Hy all, just one question:
var data = <?php echo $data; ?>; (before that i use json_encode($data)), where data describe results from DB query.

now i want to populate table via JS from this JSON object, but i dont know how to access to number of columns(elements) in that object,
apropos how to get data[i].length or something like that. Please help.
 
@Srle Bananas.
 
9:16 PM
@Zirak What?
 
Assuming that's an object, and you want to enumerate its keys, look into Object.keys(data)
 
@SomeKittens ?
 
@BenjaminGruenbaum There was this set of rules which expanded into the definition of natural numbers
 
There are several ways to build the natural numbers, one such famous way is the Peano Axioms
 
Like, "Every natural number n has a following number, noted as n" and "There is a number n for which there is no number m which satisfies m' = n
Yes, Peano Axioms!
Wait...is that?
Yes, those
Man, I hate not knowing the lingo: en.wikipedia.org/wiki/First-order_logic
 
9:20 PM
First order logic is an important term
 
I'm trying to read through it, but my ignorance of these terms keeps hitting me
 
(Translate to English, then read gadial.net/2012/06/17/first_order_logic )
 
@BenjaminGruenbaum I don't think he'll need to do that
 
@AmaanCheval Read?
@AmaanCheval If you're implying where Zirak is from, I will not partake in that discussion. I believe that it's his right to stay anonymous.
Moreover, I think it's every man's right.
 
Yeah, for sure
 
9:23 PM
can anyone give a help here?: stackoverflow.com/questions/16637017/…
 
Zirak is actually Dan Castellaneta!
 
^
@AmaanCheval When you partake in discussion that is aimed at un-anonymizing users, be it as trivial as it may, especially in a Google indexed chat. I find that offensive. Some people have perfectly valid reasons to not wanting to be found. Every person has the right for a clean slate on the internet, and every person has the right to not associate his personal life with his/her persona on the internet.
 
Yeah, I realized that after you pointed it out above
I was saying that more as a joke, but that doesn't make it any less intrusive
 
If a rabbit's foot was actually lucky, wouldn't it still be attached to the rabbit's leg?
 
9:38 PM
does anyone know if its possible to get a hover transform on <strong> here is a fiddle jsfiddle.net/kNuLQ
 
@BenjaminGruenbaum How the hell do you, in hand writing, notice the difference between v and ∨ (logical disjunction)?
 
@Zirak V ( && ) is usually much bigger. Also, in logic "v" is rarely a variable
 
@Zirak They don't look alike.
The angle is wider than on the letter v
 
I so want to do a Pepsi test on you, but that means you win
 
you can turn your browser into a file server with sharefest... for example I share sharefest.me/webstorm
it's my open source proj, and we need more ppl in :)
 
9:43 PM
@Zirak You can usually tell by context. You get used to it
@whadar Please don't come here posting spam. Flagged.
 
:/ it's not spam. it's a js project
 
Disregarding the fact you're sharing warez here. You just hopped in, dropped a URL advertising your project, and left. That's span in my book.
 
it's not warez either
 
It's trying to download a WebStorm 6.0 100 mb exe file.
 
and I thought this chat is for discussing any topic related to js
 
9:46 PM
I may already have the answer, but: If you use "→" in logic, what room does "⇒" get? A ⇒ B seems identical in meaning to A → B, "if A then B". So is it just a question of what field you're in?
 
Nope, the two are completely different :)
 
this WebStorm exe is the free trial they, not something you can download anyway
 
While → is just arrow. It has meaning in the logic you define and work on . ⇒ which means "implies" is in the logic you work on.
When you define stuff like first order logic, even without saying this, you're using your own logic in order to prove stuff in that logic.
 
anyway, thanks for helping out
 
2 < 3 ⇒ 2+1 < 3+1 means "I imply that because of 2<3 then 2+1<3+1"
2 < 3 → 2+1 < 3+1 means "A tautology in my first order logic, that is, something that is always true"
 
9:49 PM
So is "implies", but is "means"
 
The difference is in the scope we observe them really.
 
→ is in the current scope of discussion, ⇒ is always?
Then they can sometimes be used interchangeably, as in your example
 
When we describe our first order logic (or any other form of logic), even without being aware we have to use our own form of logic we know. ⇒ is part of that logic, the "meta" logic we use to describe the logical systems we build.
 
huh, ok
 
→ is just a symbol we define as having the following truth table in the logic we define:
X → Y

X T F F T

Y T T F F

R T T T F
That is, X → Y is only false if X is true and Y is false. Which makes sense.
 
9:53 PM
That is some wacky truth table
It makes sense in context
 
Yep, → is one of the hardest things to understand correctly, but once you understand it it makes perfect sense.
I remember the first class in logic. The teacher said the following:

∃x ∈ ℕ x>1 → x< x+2
(That's not first order logic, because ∃ (there exists) and ∈ (belongs to a set) are not a part of first order logic)
 
hey I can understand that. I'm not such a failure! woop!
 
ℕ is the set of natural numbers, for the example let's say it starts at 1 but it doesn't matter
The question was "what is the value of that expression"
 
...true?
 
Yes, and why is that?
 
9:56 PM
@BenjaminGruenbaum I thought that was 'implies'.
 
Because there's an x > 1 in N for which x < x + 2
 
Whoops
∃x ∈ ℕ x>1 → x > x+2
What about now?
 
...false?
I'm walking straight into a trap
 
@FizzyTea Yes, but when we construct a logical system ourselves we want to distinct our meta logic from the logic we define?
@Zirak To be fair, I was the only one in the class to say true :)
Let's look at the statement carefully, what does it say?
 
Gimme another min
 
9:58 PM
Out loud, it reads "There exists a natural number x such that: if x>1 then x > x+2"
 
Yes, that was my interpretation
 
Does there exist such a number, that if x is bigger than one then x > x+2?
 
facepalm
 
Let's look at the truth table again:
X → Y

X T F F T

Y T T F F

R T T T F
 
Yeah, I got my blindspot
 
9:59 PM
Oh god, a discussion that's interesting. I can't believe it! :D
 
You figured it out pretty quickly :) It takes people almost an hour most of the time when they see it for the first time.
 
If the right expression doesn't hold, the left expression still holds
 
@Daniel Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
For x=1, it holds because x is not bigger than 1 so that condition evaluates to true
When you think about it, all mathematical proof works exactly that way.
 
This is fun
 
10:01 PM
Let's say we want to prove x>5 for all x > 6
That's the statement x > 6 → x > 5
It has to evaluate to true for x = 2, otherwise we didn't prove anything really.
 
@OctavianDamiean Let's say you take some arbitary x, you agree that x > 6 → x > 5 , right?
That holds for all x (x is a natural number)
 
i'm looking to detect over time whenever an iframe has been injected in a page and to record the src when it happen. i'm using jquery lib. any direction would be appreciated
 
Well, yea.
 
Even for x=2, that's still a logical statement, and it's still true
Since, for x=2 x is not bigger than 5, but that's not how implies work.
 
10:04 PM
Well it's true that both would evaluate to false.
 
(F → F) = T
 
Implies only promises us that if the left side is true then the right side must also be true.
 
That's brilliant
 
Yea, got it.
 
That is brilliant, and it's the basic construct for mathematical proof
 
10:05 PM
I read it wrong initially ...
 
Every mathematical proof is just a chain of → operators.
 
Can somebody explain why (F → F) = T?
Maybe I'm a nub but I don't get it.
 
@Daniel It takes second year math students quite some time too, don't worry about it :)
The → operator means implies. It means that if the left side is true then the right side must also be true.
If the left side is true, we know nothing about the right side
@Daniel Let's say "If it rains tomorrow, I'll dance" , in what conditions is that true?
If it did not rain tomorrow, it's true if I dance and if I didn't.
If it does rain tomorrow and I dance it's true
It is only false if it does rain tomorrow, and I don't dance
 
Ooh, this is interesting. I learned the basics in a course about Logic on Coursera
 
Yea same here.
 
10:09 PM
Might be of use even now
 
So basically ( rain → dance) is true if it does not rain (so rain is false) and I do not dance (dance is false) so (F→F)=T
Mathematically, → is just defined as an operator usually because it's so useful, but one can construct it from other logical operators.
//Another example, coding
var x="Hi";
if(x==="Boo"){
   alert("Yeah");
}
That code does not alert "Yeah", but it is correct code (that is correct JavaScript), this is another example of (F→F)=T (where T is the correctness of the code)
Someone name some basic mathematical proof they know
Something that is high school level
 
I can only think of geometric proofs and algebraic expansions
Induction?
 
Induction is an Axiom :)
 
I think that theory sucks.
 
When you say that 1 is a natural number, and that for every number n there exists a successor which you define as n+1. That's induction.
When you prove something by induction, you show that if the above statement holds it must also hold. You accept the above as a definition of natural numbers.
 
10:17 PM
@Daniel → can be thought of as causation.
 
Maybe prove the square root of 2 is irrational, that is, can not be represented as p/q where p and q are integers?
 
heh, just noticed that chrome shows not only its own memory usage in chrome://memory but also that of any other browsers. that's totally not showing off :P
 
Maybe something more basic. Let's prove that if n is even, than n+1 is odd
So, the basic argument is this, "n is even, so there exists some k such that n=2k, so we know that n+1=2k+1, which we know is odd since 2k+1 is an number that is dividable by two plus a remainder of one"
 
meep meep
 
n is even → ∃k ∈ ℕ n=2k → n+1=2k+1 → n+1 is odd

- The first → is justifiable from the definition of even numbers
- The second → is justifiable because there is only one successor for each natural number
- The third → is by definition of division
n is even → ∃k ∈ ℕ n=2k → n+1=2k+1 → n+1 is odd as a statement, holds even if n is not even for example.
 
10:23 PM
I had a tiny orgasm just now as I realized that = is a binary operator. How didn't I see that before?
I blame years of schooling
 
= is very special
 
while searching i found this: DOM MutationObserver
Do anyone have ever tried this? here is an article from hack mdn
http://hacks.mozilla.org/2012/05/dom-mutationobserver-reacting-to-dom-changes-without-killing-browser-performance/
 
It is a binary operator, but it also has special meaning. Equality defines what an object is. There is only one number one. There is only one number 1000, and there is only one empty set.
We can also discuss equivalence, and the notion of a relation.
 
yeah, of course, but still...my brain always divided equations according to the =, when I just realized how weird that is
Logical, but weird.
 
There are two ways to look at logic, the first (and weaker) way is called "predicate logic" in which we evaluate things as binary statements, the second (and harder one) is called "relational logic"
If you think about it, the logic in JavaScript and the logic we're used to in math are two different logical systems.
Let's look at the number system in JavaScript, but assume infinite precision (so no floating point errors) for the sport
Let's call the set of all numbers in JavaScript "A"
What do we even know about it, I mean, how does = act on elements in "A"?
Does it hold that (∀ means 'for all'): ∀a∈ A a=a ?
@Happyninja Read the .src property, it's immutable. Even if the iframe navigates you'd still get the same .src .
 
10:30 PM
I'm inclined to say yes, that equality is reflexive(?)
 
(Reflexive is the correct term for that, it's a term about the above mentioned relations btw)
Can you think of a number in JavaScript that is not equal to itself?
 
We always have our favourite NaN, but in this sport I imagine we don't include it.
 
Why not?
 
ok, then NaN it is
 
@BenjaminGruenbaum the part i was looking to track is the iframe element itself. Like react to any iframe injection over time (e.g there is no iframe when the page load) and once i "catch" an iframe injection i can get the src from there. Thing is I don't have any event to attach it too and i know nothing but the fact it is an iframe
 
10:33 PM
NaN is a perfectly valid number. Unlike the set of numbers we're used to from school, I think NaN is perfectly valid in our logic system of JavaScript.
NaN is indeed very strange, that doesn't make the logic any less sound
For example, we couldn't define division by zero in school math, but that is not a problem we have here at all
 
Gah ... the weather pisses me off.
 
We can easily define 0/0 to be the only value that is not equal to itself for example.
 
Why is = a binary operator?
 
@FlorianMargaine = as equality, not assignment
 
So we can say that ∀(a∈ A, a != NaN) a=a is T
 
10:35 PM
How is it a binary operator?
 
@FlorianMargaine Equality is either true, or false between two elements in the set
 
It accepts two arguments
A = B
 
Oh, in that sense.
 
Yeah. I was very confused at first
 
10:36 PM
@BenjaminGruenbaum That's not why it is a binary operator though, what Zirak said.
 
@OctavianDamiean Yeah, I pressed enter early
 
@BenjaminGruenbaum did you do a math degree?
 
Is equality transitive? That is, is "∀a,b,c∈A a=b ∧ b=c → a=c" a tautology (that is, always true)
@FlorianMargaine Yeah
To be honest, I'm still finishing it up, I'm doing it slowly because I'm enjoying it more that way :)
 
Gah, I wish they'd teach math in English here in Austria.
It's so tough for me participate in such discussions.
 
For me too :)
 
10:39 PM
Takes ages to find the right expressions.
 
Because key terms may be lost in translation?
 
For numbers without aforementioned corner-case (which "screws up" equality), yes. With NaN it's not always true
 
Any Mac users here? I'm thinking about installing a Linux on my side-laptop in the hopes of coming closer to the "Mac web development experience" (console, compatible tools, etc.). Is there something to it?
 
@Zirak Yep, we can also easily define an order on the set A that is an operator > between two elements.
 
Did we actually define A?
Oh yea, never mind.
 
10:41 PM
@OctavianDamiean Not well, no, A is all the numbers in JavaScript assuming infinite precision for this exercise
 
Just found it, yea.
 
Knowing NaN + number = NaN, can you prove that always NaN > NaN so it can not be ordered well?
I mean, we can't really define < for NaN, it breaks assuming the most basic assumptions about an order.
 
I have to read the transcript, wasn't following.
 
Is NaN > 2 ? Try to prove one way or another.
One of the things we assume is that we're in a field (that is, + and * are defined in A, every number has an additive and multiplicative inverse , and the result of these operators is also in A)
So we know that a > b -> a+x > b+x for any x,a,b
 
As I see it, a > b → a = k + b. So, NaN > 4 → NaN = 4 + k, which we know to not be true
 
10:45 PM
That seems like a valid proof :)
 
Same goes for <, only with subtraction
 
Nice!
 
This is fun
 
Cool, cool cool cool.
 
We can say that >= is an anti symmetric relation, that is a<=b and a>=b if and only if a=b
if and only if is also an important operator
 
10:46 PM
Also...I want to show-off/validate, defining "not" via "nand": ¬A = (A ∨ T) ↑ (A ∨ F)
 
Let's define if and only if as iff for brevity. (@AmaanCheval might know this)
 
It seems correct, but...well...is it?
 
@Zirak I'm not sure I'm allowing T or F, make them with NAND :P
can you think of a case where (A ∨ T) is false?
 
...that's a very good point
I just did the not transparently
Shit
 
Can you think of a case where it doesn't hold that (A ∨ F) = A ?
 
10:49 PM
I'll get there
 
There's actually an interesting (and much less theoretic and more coding/practical) course here called "From NAND to tetris", the name pretty much tells it all, you start with only NAND
That's a pretty fun game though, assuming the ↑ operator, construct the ¬ operator and the ∧ operator and the ∨ operator :)
 
Wait, what's the ↑ operator?
 
How didn't I see that?
 
X ↑ Y (NAND)

X Y R

T T F
T F T
F T T
F F T
 
¬A = T ↑ A
@OctavianDamiean Opposite of AND
 
10:53 PM
↑ is the actual NAND operator?
 
@Zirak You don't get T either :)
 
@BenjaminGruenbaum but...how...grrr
 
Cool.
I wonder why the didn't teach us the goddamn operator ...
 
Oh, I think I know this
 
@Zirak There is really only one thing to do, with your one operator
 
10:54 PM
...yeah, I got there
That's freaky
 
Well, spill it out
 
I mean it's not like I didn't have to deal with NAND all day long at School ...
 
That can't be true
 
!A = A NAND A, right?
 
Right
¬A = A ↑ A
 
10:55 PM
yeah...
That's so weird
 
Next one is ∧
You have only what you already built.
 
That's easy enough
 
X ∧ Y (AND)

X Y R

T T T
T F F
F T F
F F F
 
We already have the opposite operator, so...
 
Yeah. Onto or
 
10:56 PM
so what?
 
So you NAND them and then NOT them
 
A ∧ B = ¬ (A ↑ B)
 
Correct
Now ∨
 
Can I have T and F?
I like them
 
Hahaha
 
10:57 PM
Only if you can make them yourself from what you already have
 
@Zirak You mean the table?
 
The actual values True and False
 
No, he means to use in making OR using only NAND
 
X ∨ Y (OR)

X Y R

T T T
T F T
F T T
F F F
 
Ooh, got an idea
 
10:59 PM
After you build ∨ build True and False, but built ∨ first. Hint, read only if you want hint, there is a very known 'law' which is often used to change the structure of if statements that can be applied here.
 
I wish I wasn't on mobile, though -.-
 

« first day (946 days earlier)      last day (4018 days later) »