0:05 AM
stanislas
2016-01-25 02541, 2016
0:05 AM
stanislas
If JS have similiar syntax as C, I don't expect it to work like this.
2016-01-25 02528, 2016
0:09 AM
opatel99 joined the channel
2016-01-25 02543, 2016
0:09 AM
stanislas
Hi opatel99 :)
2016-01-25 02549, 2016
0:09 AM
opatel99
stanislas: Hey
2016-01-25 02509, 2016
0:10 AM
opatel99
How's your React proj going?
2016-01-25 02527, 2016
0:10 AM
stanislas
definitely final stage
2016-01-25 02513, 2016
0:11 AM
stanislas
opatel99: Are you doing any more tasks ?
2016-01-25 02516, 2016
0:11 AM
LordSputnik
stanislas: "npm run-script debug" runs the server, you'll want to navigate to the web page at whatever port it tells you it's using
2016-01-25 02527, 2016
0:11 AM
opatel99
Just the review.
2016-01-25 02534, 2016
0:11 AM
stanislas
good luck
2016-01-25 02544, 2016
0:12 AM
stanislas
LordSputnik: Ok, I will do that after solving npm test issues
2016-01-25 02532, 2016
0:13 AM
LordSputnik
stanislas: in JS, you can do "for(let key in object) { ... }" while will iterate over the keys
2016-01-25 02500, 2016
0:14 AM
LordSputnik
*which will
2016-01-25 02509, 2016
0:14 AM
LordSputnik
that each syntax is jade-specific
2016-01-25 02553, 2016
0:14 AM
opatel99
I haven't had much of a chance these last few days... school and stuff.
2016-01-25 02509, 2016
0:15 AM
stanislas
Assuming that I've a list of tuples ?
2016-01-25 02535, 2016
0:16 AM
stanislas
I would do for(let tuple in list) {for (let tuple_element in tuple) {do_sth}} ?
2016-01-25 02558, 2016
0:16 AM
legoktm[NE] is now known as legoktm
2016-01-25 02524, 2016
0:22 AM
LordSputnik
stanislas: no such thing as a tuple in JS
2016-01-25 02533, 2016
0:22 AM
stanislas
just lists ?
2016-01-25 02536, 2016
0:22 AM
LordSputnik
stanislas: what are you iterating over?
2016-01-25 02538, 2016
0:22 AM
LordSputnik
yeah
2016-01-25 02548, 2016
0:22 AM
stanislas
2016-01-25 02511, 2016
0:25 AM
LordSputnik
OK, so diff is a list of dictionaries
2016-01-25 02544, 2016
0:25 AM
LordSputnik
So you can do diff.forEach((d) => {for(let key in d) { ... } })
2016-01-25 02517, 2016
0:26 AM
LordSputnik
(or perhaps diff.map would be better if you're constructing a list of table rows)
2016-01-25 02516, 2016
0:29 AM
opatel99
LordSputnik: Is there anything I can work on?
2016-01-25 02546, 2016
0:29 AM
stanislas
d is a list consisting of old value and new value ?
2016-01-25 02511, 2016
0:30 AM
LordSputnik
2016-01-25 02535, 2016
0:30 AM
LordSputnik
opatel99: Well, porting jade pages is one thing on the list
2016-01-25 02526, 2016
0:31 AM
LordSputnik
And we haven't had material UI tested out
2016-01-25 02536, 2016
0:31 AM
Nyanko-sensei has quit
2016-01-25 02536, 2016
0:31 AM
LordSputnik
and also the deprecated relationships thing needs doing
2016-01-25 02503, 2016
0:32 AM
D4RK-PH0ENiX joined the channel
2016-01-25 02539, 2016
0:32 AM
stanislas
LordSputnik: That is entirely different format then Jade is using. In revision.jade there is only old_value and new_value, right >
2016-01-25 02528, 2016
0:33 AM
LordSputnik
2016-01-25 02531, 2016
0:33 AM
LordSputnik
opatel99: ^
2016-01-25 02515, 2016
0:34 AM
LordSputnik
stanislas: for each element in the dict, there is a list (or null). the list will contain two elements - one for the old value, and one for the new value
2016-01-25 02522, 2016
0:35 AM
LordSputnik
so diff is [{'property': [old_value, new_value], 'other_property': [old_value, new_value]}]
2016-01-25 02532, 2016
0:36 AM
D4RK-PH0ENiX has quit
2016-01-25 02536, 2016
0:36 AM
LordSputnik
stanislas: hmm actually, I think I might know what you mean
2016-01-25 02540, 2016
0:36 AM
stanislas
LordSputnik: Ok, that's better. You've posted a link to some revision from ws. I thought revision would be equal to this.
2016-01-25 02527, 2016
0:37 AM
LordSputnik
stanislas: so ignore what I just said, the revision property *isn't* straight from the WS
2016-01-25 02542, 2016
0:37 AM
LordSputnik
2016-01-25 02519, 2016
0:38 AM
LordSputnik
so you can assume that old_value and new_value will always be primitive types
2016-01-25 02525, 2016
0:39 AM
Lingo joined the channel
2016-01-25 02533, 2016
0:40 AM
stanislas
2016-01-25 02516, 2016
0:44 AM
Lingo has quit
2016-01-25 02520, 2016
0:46 AM
stanislas
LordSputnik: ^
2016-01-25 02527, 2016
0:46 AM
opatel99
You can combine !(oldValue && (oldValue.length > 0)) && !(newValue && (newValue.length > 0))
2016-01-25 02537, 2016
0:47 AM
LordSputnik
2016-01-25 02556, 2016
0:47 AM
opatel99
De Morgan's Law states that
2016-01-25 02531, 2016
0:48 AM
LordSputnik
opatel99: nope, not really
2016-01-25 02538, 2016
0:48 AM
opatel99
why not?
2016-01-25 02504, 2016
0:49 AM
LordSputnik
opatel99: well, you could, but it wouldn't gain you much, I think
2016-01-25 02526, 2016
0:49 AM
stanislas
Ok, do you think much work is required still ?
2016-01-25 02542, 2016
0:50 AM
LordSputnik
stanislas: shouldn't be, maybe an hour?
2016-01-25 02516, 2016
0:51 AM
LordSputnik
firstly, you don't need get_values_from(list)
2016-01-25 02527, 2016
0:51 AM
stanislas
LordSputnik: I am waking up in less than 5 hours
2016-01-25 02545, 2016
0:51 AM
stanislas
LordSputnik: I've already deleted that.
2016-01-25 02511, 2016
0:52 AM
LordSputnik
stanislas: you've got school tomorrow and won't have time to finish it tomorrow before the task submission deadline?
2016-01-25 02550, 2016
0:52 AM
stanislas
LordSputnik: Yep :(
2016-01-25 02557, 2016
0:52 AM
D4RK-PH0ENiX joined the channel
2016-01-25 02501, 2016
0:53 AM
LordSputnik
OK, and on what was line 75, you don't need for(d in diff) - and you can get val[0] and val[1] as d[key][0] and d[key][1]
2016-01-25 02503, 2016
0:53 AM
stanislas
LordSputnik: I will try to do that for let's say 30 more minutes
2016-01-25 02507, 2016
0:53 AM
stanislas
Than I am done
2016-01-25 02520, 2016
0:53 AM
LordSputnik
stanislas: well, I have until Wednesday to approve it
2016-01-25 02538, 2016
0:53 AM
LordSputnik
So you could always submit what you have, and then I can approve it when it works ;)
2016-01-25 02507, 2016
0:54 AM
stanislas
That would be great.
2016-01-25 02516, 2016
0:54 AM
stanislas
Let me work on it for a moment.
2016-01-25 02531, 2016
0:54 AM
stanislas
and we will see if it'd be needed
2016-01-25 02519, 2016
0:59 AM
opatel99
LordSputnik: BookBrainz's mission is to be the most expansive and reliable source of text information and to make that information accessible to everybody.
2016-01-25 02513, 2016
1:01 AM
stanislas
2016-01-25 02526, 2016
1:01 AM
LordSputnik
opatel99: I'd say the meaning of "text" is ambiguous there
2016-01-25 02556, 2016
1:01 AM
LordSputnik
opatel99: it could mean "information about texts" (right) or "textual information" (definitely not right)
2016-01-25 02536, 2016
1:02 AM
LordSputnik
stanislas: that looks much better
2016-01-25 02548, 2016
1:02 AM
opatel99
reliable source of information regarding ... (Can one word define it all?)
2016-01-25 02550, 2016
1:02 AM
LordSputnik
stanislas: easy to fix errors?
2016-01-25 02559, 2016
1:02 AM
LordSputnik
opatel99: literature
2016-01-25 02539, 2016
1:03 AM
opatel99
BookBrainz's mission is to be the most expansive and reliable source of literary information and to make that information accessible to everybody.
2016-01-25 02544, 2016
1:04 AM
stanislas
2016-01-25 02503, 2016
1:05 AM
stanislas
I am curious about the 4th one
2016-01-25 02524, 2016
1:05 AM
LordSputnik
stanislas: ahhh
2016-01-25 02549, 2016
1:05 AM
LordSputnik
So if you do "if() { return... } else ... " the else is redundant
2016-01-25 02517, 2016
1:06 AM
LordSputnik
Because if it enters the if, it's going to return, so the code after the if will not get executed (which is the reason for having an else)
2016-01-25 02521, 2016
1:06 AM
stanislas
It is, but it makes code clearer.
2016-01-25 02533, 2016
1:06 AM
LordSputnik
stanislas: that's a matter of opinion :P
2016-01-25 02544, 2016
1:06 AM
LordSputnik
(which is all coding conventions are)
2016-01-25 02518, 2016
1:07 AM
LordSputnik
In this case we've decided (or I've decided and Leftmost and Leo_Verto haven't noticed yet), that we shouldn't have if... return... else
2016-01-25 02542, 2016
1:07 AM
LordSputnik
2016-01-25 02506, 2016
1:08 AM
LordSputnik
I mainly like it because it's more concise and gets rid of unnecessary code, which is generally a good thing
2016-01-25 02511, 2016
1:08 AM
Leo_Verto
I think I agree with you
2016-01-25 02550, 2016
1:08 AM
LordSputnik
2016-01-25 02513, 2016
1:09 AM
LordSputnik
Ideally we want about a paragraph, summarising a few key things which mission statements apparently generally have :P
2016-01-25 02538, 2016
1:10 AM
stanislas
LordSputnik: And the first one ?
2016-01-25 02525, 2016
1:11 AM
LordSputnik
stanislas: it's saying you're missing a 'use strict' in a function, or you've got one globally
2016-01-25 02541, 2016
1:11 AM
LordSputnik
We can't have it global in the .jsx files because browsers don't like that
2016-01-25 02528, 2016
1:12 AM
stanislas
Ok, got it.
2016-01-25 02532, 2016
1:13 AM
stanislas
21 errors left
2016-01-25 02547, 2016
1:14 AM
stanislas
19
2016-01-25 02501, 2016
1:16 AM
stanislas
15
2016-01-25 02517, 2016
1:18 AM
stanislas
12
2016-01-25 02515, 2016
1:23 AM
stanislas
What's Unexpected string concatenation ?
2016-01-25 02515, 2016
1:24 AM
LordSputnik
stanislas: in ES6 (new version of JS), you can replace 'string' + variable + 'string' with `string ${variable} string`
2016-01-25 02520, 2016
1:24 AM
stanislas
and The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype ?
2016-01-25 02536, 2016
1:24 AM
LordSputnik
Similar to string formatting in Python
2016-01-25 02545, 2016
1:25 AM
LordSputnik
wrap the bit inside the for with if (obj.hasOwnProperty(prop)) { ... }
2016-01-25 02504, 2016
1:26 AM
LordSputnik
That ensures that you're only looping on the properties defined in the object, and not any it may have inherited
2016-01-25 02554, 2016
1:30 AM
stanislas
wow, 0
2016-01-25 02532, 2016
1:31 AM
LordSputnik
\o/
2016-01-25 02547, 2016
1:32 AM
stanislas
2016-01-25 02558, 2016
1:32 AM
stanislas
after running the thing you talked about
2016-01-25 02513, 2016
1:33 AM
stanislas
npm run-script debug
2016-01-25 02552, 2016
1:33 AM
stanislas
I am telling you. "Tell the author that this fails on your system: npm ERR! DEBUG=bbsite node ./scripts/www"
2016-01-25 02514, 2016
1:35 AM
LordSputnik
stanislas: ermmm OK, and what happens if you do "DEBUG=bbsite node ./scripts/www"
2016-01-25 02523, 2016
1:35 AM
stanislas
where ?
2016-01-25 02526, 2016
1:35 AM
stanislas
in bash ?
2016-01-25 02531, 2016
1:35 AM
stanislas
in some config file
2016-01-25 02532, 2016
1:35 AM
stanislas
?
2016-01-25 02535, 2016
1:35 AM
LordSputnik
Hmm, what platform are you using?
2016-01-25 02541, 2016
1:35 AM
LordSputnik
(OS)
2016-01-25 02544, 2016
1:35 AM
stanislas
debian
2016-01-25 02505, 2016
1:36 AM
LordSputnik
Oh, no, it's nothing to do with that
2016-01-25 02524, 2016
1:36 AM
LordSputnik
Copy config/development.json.example to config/development.json
2016-01-25 02516, 2016
1:37 AM
stanislas
seems better
2016-01-25 02540, 2016
1:38 AM
stanislas
Should I route it somehow now ?
2016-01-25 02558, 2016
1:38 AM
stanislas
It doesn't matter how long I will sleep now really. The only thing that matters is which energy drink I am going to buy :)
2016-01-25 02511, 2016
1:40 AM
Lingo joined the channel
2016-01-25 02524, 2016
1:41 AM
LordSputnik
stanislas: you should sleep, we can fix this tomorrow evening or something
2016-01-25 02530, 2016
1:41 AM
LordSputnik
I have to go soon too
2016-01-25 02533, 2016
1:42 AM
LordSputnik
2016-01-25 02535, 2016
1:42 AM
stanislas
I've even routed it.
2016-01-25 02539, 2016
1:42 AM
stanislas
Just now
2016-01-25 02541, 2016
1:42 AM
LordSputnik
Just with props
2016-01-25 02546, 2016
1:43 AM
stanislas
you mean RevisionPage(props)
2016-01-25 02547, 2016
1:43 AM
stanislas
?
2016-01-25 02554, 2016
1:43 AM
LordSputnik
stanislas: yeah
2016-01-25 02510, 2016
1:44 AM
stanislas
and now ?
2016-01-25 02537, 2016
1:44 AM
stanislas
Ok. Let's do it tomorrow.
2016-01-25 02540, 2016
1:44 AM
Lingo has quit
2016-01-25 02553, 2016
1:44 AM
stanislas
No point in hurrying with it.
2016-01-25 02508, 2016
1:45 AM
stanislas
Should I submit the task ?
2016-01-25 02530, 2016
1:45 AM
stanislas
(No point for me, if we could continue doing it tomorrow)
2016-01-25 02517, 2016
1:46 AM
LordSputnik
stanislas: will you have time to submit before 5:00 PM UTC tomorrow?
2016-01-25 02529, 2016
1:48 AM
stanislas
my internet suddenly stopped working, sorry
2016-01-25 02536, 2016
1:48 AM
stanislas
I am using my neighbour's now
2016-01-25 02550, 2016
1:48 AM
stanislas
I can be home at 14:00 UTC+1
2016-01-25 02555, 2016
1:48 AM
stanislas
So that's 13:00 UTC
2016-01-25 02501, 2016
1:49 AM
stanislas
If I go out earlier from school