« first day (3258 days earlier)      last day (1692 days later) » 
00:00 - 18:0018:00 - 00:00

so why is it initially undefined?
 
wat
 
@ChristianMatthew that isn't the issue
const foo = 1;
const foo = 2; // Identifier 'foo' has already been declared
 
no this is the error message
answer is not defined
now
sorry this one
Cannot destructure property answer of 'undefined' or 'null'.
 
that's not the same as answer being undefined
 
6:15 PM
because your find condition is wrong
!!> const { anything } = null;
 
@rlemon "TypeError: null has no properties"
 
!!> [1,2,3].find(i=>i===4);
 
@rlemon "undefined"
 
eh, undefined/null. same shit different pile here
 
so here is an issue
questions.forEach(question => {
            // console.log(question);
            // console.log(answerArray);
            const { answer } = answerArray.find(answer => answer.id === question.id);
            question.answer = answer;
            // console.log(question)
        });
my objects don't have id's i call them QnaId
instead of ID...
 
6:26 PM
...
never ask me for help again
thanks.
 
the error here is I have 1 question per the entire response
i just don't see where answers is coming from ?
 
Holy shit dude, I thought that other guy was bad. But you're like the Dracula of code vamps.
 
Please learn how programming works. Like, go start with a 101 level tutorial, maybe actually learn some syntax, logic, etc. You're copy/pasting code you don't understand and are confused about why you're getting an error
 
no im just lost and this isn't helping
omg we
i code everyday this is just confusing me
 
Well I'm appalled on behalf of your employer
 
6:31 PM
🍿
 
you suck at asking questions. I don't mean that to be rude, but you've wasted 6 hours of my time
 
yea lets see your github
 
scroll back to when you first asked this
the criteria has changed like 5 times
 
send github
 
@ChristianMatthew why would you ask that
 
6:31 PM
Have at it
 
What the fuck does github have to do with anything?
 
@ChristianMatthew my dad is bigger than your dad
 
I think he wants to know that I'm qualified to say that I'm appalled, lol
 
Github has nothing to do with that
 
Yes, but I'm more than willing to show him
 
6:33 PM
It's not like I do a lot of programming outside of work or do side projects. Yet I'm still a decent developer who gets shit done and doesn't vamp all day because I can't RTFM.
 
@ChristianMatthew I've been coding every day for the last 1 days too
 
sorry i don't know what code vamp is
 
@ChristianMatthew the room rules might help clear that up
 
Can I mount that statement on my wall?
 
i have an issue so unless you can put up a solution that works no problem don't criticize someone else
 
6:34 PM
please read the rules
 
We can't help you if you can't even help yourself, my man
 
if we're going to pile on, lets focus on the real problem. don't creep scope on your questions.
you said you had an array of objects of answers and questions.. then you later showed me a combined array.. then (and maybe I just inferred this) you needed to split up the arrays. then you took my exact code and copy pasted it into your code when it only needed to do a fraction of what you wanted because you didn't specify it correctly (so, hint, just use the second half of the code). THEN you had the gall to tell me the code was wrong because you purposely told us the wrong property name and th
please let me know if any of that isn't true
and kindly learn how to ask questions
 
i have 2 different arrays
they both have a QnaId
 
I don't care anymore about your problem
I'm not helping you with it
 
@Michael I'm here all week
 
6:35 PM
ok thanks
 
I'm telling you how we got here
 
yes but i don't get all of they hyper criticizim if the solution doesn't work
 
the criticism isn't about the code.
it's about how you are asking for help
 
how can i ask better
i am not trying to be difficult
 
re-read everything I've said to you today
 
6:38 PM
and just so you know for completeness. The job was to take an excel sheet and transform it to a json object
haha lmao
@rlemon sorry that worked
 
learn to read stuff better, honestly
 
it was a duplicate that was giving the undefined error
dude it wasn't reading
i need to work on reduce and map
i am not very good with that
i need to know what it does without thinking about it so much
 
read the docs
 
sometimes the docs could be better
 
probably, but you could also try harder
 
6:46 PM
i just said what I need to work on
you're not perfect
 
then go do that
 
you go work on your github
 
lmao
got'em
 
i don't know what any of that stuff is for
 
Bruh, I'm not the one on here asking for help
 
6:47 PM
lol
perhaps you could
it might help ;()
see people use the stuff in my github
 
In other news.. what about that jQuery
 
angular why jquery
 
I gotta ask, who'd you get to do your job interview?
 
what do you do
 
6:52 PM
drugs
 
good ones?
 
is tylenol good?
 
I'm a developer, what kind of question is that?
 
are you
what do you develop?
 
@Trasiva no offense, but every time we get a newbie in here flailing around, your responses are always along the lines of, "wow, you suck, I'm at least better than you"
I mean, I love piling on top of lazy jerks like the next guy, but you don't have anything to prove
 
6:55 PM
@ndugger Is it? I just like to think I enjoy abusing the lazy and stupid. But you're probably right.
 
It's just the content of the messaging needs to be tweaked
 
lol wait why am I lazy?
 
I love that you questioned the lazy, but not the stupid part.
 
Because you refuse to read what rlemon was saying, or the docs, or to sit and think about your problems instead of copy/pasting code you don't understand
 
@ndugger do you know who invented the dna double helix?
 
6:57 PM
Harambe
 
no seriously do you?
 
Are you asking who actually invented it? Or who discovered it? Because I could google that right now.
 
tell me the answer
go ahead google it
 
do I need an amendment to the room rules: no pissing contests?
 
that's already covered by "be nice"
 
6:58 PM
eat a snickers
Nobody "invented" it
 
God did
 
god is a fairy tale
 
checkmate marvel fans
 
exactly
 
thanks
 
6:59 PM
it's subjective
 
something not existing doesn't make it subjective
wtf
10/10 logic
 
> 1 logic
 
lol
 
you're not supposed to evaluate it smh
 
Snickers is awful, it doesn't satisfy hunger, merely raises your blood glucose for no meaningful benefit.
 
6:59 PM
@rlemon Hey, according to Dogma God's a female.
 
God invented the double helix. Duh.
 
god is a green little elf who lives in my dog's anus
 
@Trasiva why you gotta bring gender into this?
 
dang Michael, two snickers can actually fill you up
 
@ndugger The more impressive that he invented the double helix
 
7:00 PM
Two snickers can bring someone to depression.
 
I have had lunch comprised of snickers
 
you know what's better than snickers?
doing interactive webpages with css
:D
 
I was hoping you'd say drugs.
 
tylenol > snickers
 
Sounds about right, I'd rather eat a handful of tylenol than a snickers.
 
7:01 PM
a woman actually found it her name was Rosalind Elsie Franklin
 
we've moved on from that
we're talking about chocolate and css now
 
watson and crick read her work and analzyed it and then came to the double helix conclusion... my point is... sometimes things are hard to see
and working together helps each other see things more clearly
sorry on to chocolate
 
@ChristianMatthew Working together isn't a one-way street.
 
You're really awful at making points and at reading. Enjoy flailing. I have a meeting to attend.
 
But can you see why kids love Cinnamon Toast Crunch?
 
7:03 PM
I mean.. I'm trying to not so subtly steer a conversation away from this. stop engaging eachother for fucks sakes.
 
im on chocolate
 
thankyou
stay there
dark chocolate is poison
 
for you maybe
 
get out
 
I love dark chocolate
 
7:04 PM
have you never had a dark chocolate bounty
 
but I'd like to indulge myself in dark chocolate
 
yes. tbh I don't mind dark chocolate. I just don't like chocolate period.
 
🚽
 
dark chocolate is at least bitter
 
and if possible when the day comes I'd like to die by drowning in a fountain of dark chocolate
 
7:05 PM
i'm broken. I don't like chocolate
 
I wish white chocolate wasn't the most unhealthy for you, because that stuff is my jam. White Chocolate covered pretzels.
 
white chocolate isn't chocolate
 
I'll eat sour candies till my mouth is bleeding tho
 
sweet and savoury can suck it
 
liking white chocolate over dark?
smh racist
 
7:07 PM
@ChristianMatthew only if you're a prat.
even wiki says it's a chocolate confection
 
white chocolate is still made from the cocoa bean; therefore it's still chocolate
 
That's like saying Javascript isn't jQuery.
 
We took the cocoa bean, said "miss me with that healthy antioxidant shit" and then made a desert from it while adding a dozen other horrible things like obscene amounts of sugar.
 
it's not made from cocoa bean
huh?
 
It's made from cocoa butter, which is the fat of the cocoa bean.
 
7:10 PM
> Until 2002, white chocolate was not considered “chocolate” in the United States, but rather a “confectionary.” Previous FDA standards of identity required that “chocolate” contain chocolate liquor, which gives chocolate its brown color. Due to petitioning by the Hershey Foods Corporation and the Chocolate Manufacturers Association, FDA published a final rule that established a standard of identify for white chocolate in 2002.
> To be marketed as white chocolate, a product must contain at least 20 percent cocoa butter, at least 14 percent total milk solids, at least 3.5 percent milkfat. It cannot consist of more than 55 percent nutritive carbohydrate sweetener.
 
@ChristianMatthew it is
it doesn't have cocoa powder
 
It depends on your source...
 
White chocolate is made with a blend of sugar, cocoa butter, milk products, vanilla, and a fatty substance called lecithin. Technically, white chocolate is not a chocolate—and it doesn't really taste like one—because it doesn't contain chocolate solids.Nov 13, 2007
 
milk solids doe
 
How do you think cocoa butter is made? It comes from the cocoa bean, and as Cerbrus just quoted, it is considered chocolate.
Stop arguing to try to prove a point; you're wrong
 
7:14 PM
@ChristianMatthew if you wanna cherry pick those I can cherry pick others that say it is chocolate.
if you wanna be safe, call it a chocolate confection
 
Cherries aren't chocolate though, don't get those mixed up
 
they can be
 
unless you want to mix chcolate and cherries
 
Chocolate and Raisins are the best combo.
Feel free to @ me, I want to be notified of your wrongness.
 
@Michael
 
@Michael get better taste buds, you fascist
 
// Production steps of ECMA-262, Edition 5, 15.4.4.17
// Reference: es5.github.io/#x15.4.4.17
if (!Array.prototype.some) {
  Array.prototype.some = function(fun, thisArg) {
    'use strict';

    if (this == null) {
      throw new TypeError('Array.prototype.some called on null or undefined');
    }

    if (typeof fun !== 'function') {
      throw new TypeError();
    }

    var t = Object(this);
    var len = t.length >>> 0;

    for (var i = 0; i < len; i++) {
      if (i in t && fun.call(thisArg, t[i], i, t)) {
 
raisins are delicious. don't taint them with chocolate
 
@Michael wtf is wrong with you
 
I enjoy maintaining my thundering bowels while also savoring in a delicacy.
Not that raisin isn't a delicacy in of itself, but chocolate only adds to the experience.
 
7:16 PM
dude
 
Why is var len = t.length >>> 0; needed? I don't really understand what >>> does and why it would be useful. I have read the mdn doc on it.
 
raisins can be very overpowering very soon
 
!!> undefined >>> 0
 
@rlemon 0
 
so they can suck my peepee
 
7:17 PM
!!google >>> operator in js
 
probably some bitshift?
 
@Cereal I read some stuff, I still dont understand entirely
!!> undefined || 0
 
@JBis 0
 
@Michael 1 + 1 = 3
 
|| is a logical operator
>>> is a bitwise operator
it operates on bits
More things for you to google
 
7:18 PM
I'm pretty sure that is there to handle the cases where you don't have a length property or it's not a number
 
I know what bits are for the most part, but why is it necessary in that script? Or any script for that matter.
 
@JBis var len = t.length >>> 0; makes sure len is always a number
 
2 mins ago, by rlemon
!!> undefined >>> 0
 
!!> const x = {}; console.log(x.length || 0);
 
@JBis "undefined" Logged: 0
 
7:19 PM
are you trying to point out there are other ways to go about it?
because there is probably like 5 off the top of my head that would work for this.
if you wanna know why the OP did it that way. ask them
 
I am wondering why not use ||? Like whats the difference (or the significance of the difference)
 
they do different things, and OP decided they wanted to use >>>
 
So what it operates on bits
 
why use if/else when I can use a ternary?
or short circuit evals
 
But || and >>> are not the same
How does working with bits change how it works?
 
7:21 PM
in this situation you're using them to get the same results.
 
What situation wouldn't I?
 
idk. think of one
 
@JBis: They use that because they wanted to.
 
I can't cause I dont really understand what they do
 
so go learn what they do
 
7:23 PM
Wha don't you understand?
 
so ask about the things you don't understand, don't ask us to infer why someone else wanted to do it 1 of multiple ways :D
 
No one can make you understand without specific questions.
 
ok fair enough
 
although, if I had to make a 10000% guess, performance.
 
!!> 5 | 13
 
7:23 PM
@JBis 13
 
the polyfills are (usually) ultra compatible and ultra performant
 
Go read up on bitwise operators, @JBis.
There. You don't even have to google it.
 
> Bitwise OR a | b Returns a 1 in each bit position for which the corresponding bits of either or both operands are 1s.
@Cerbrus I am on that page
So why is that useful?
It seems very random
 
It's anything but random
It's useful for cases where that's what you need to do.
I mean, why is ++ useful?
 
where would I need to do that?
@Cerbrus so you can shorthand += 1
 
7:27 PM
CV-plz: too broad.
 
The open-ended nature of your question is one that you can google.
62
Q: What USEFUL bitwise operator code tricks should a developer know about?

non sequitorI must say I have never had cause to use bitwise operators, but I am sure there are some operations that I have performed that would have been more efficiently done with them. How have "shifting" and "OR-ing" helped you solve a problem more efficiently?

 
@JBis but that's not what it does (only)
remember, there is ++n and n++
 
Seriously, if you have a question/problem, break it down to its SIMPLEST forms then google those questions. You'll get like 90% of whatever you need done.
 
whats more simple than "why are Bitwise Operators used?"
 
to do operations on bits
that's the answer
but that's not the answer I think you want
 
7:30 PM
@JBis Did you google that?
 
212
Q: Real world use cases of bitwise operators

Olivier LalondeWhat are some real world use cases of the following bitwise operators? AND XOR NOT OR

 
There you go.
 
Well there is your answer.
 
the answers aren't great or at least seem pretty general
 
Because it's a pretty general question.
Did you follow any kind of computer science classes?
 
7:34 PM
I took one but it was a joke of a class. Nothing like this.
 
They usually start with explaining that computers are all about ones and zeroes...
bits.
 
Yes. I know what binary is.
 
Okay, then bitiwise operators are how you process binary...
 
Seems pretty low level for JS but ok.
 
It still has some applications in JS.
 
7:36 PM
it's useless for most usecases of JS
 
Alright, I guess if I ever need it I'll figure it out then.
sorry for the inadequate self search attempts
 
I feel like you need to specify "front end" in this convo
 
I've seen it used in games more often than anything else, likely because script kiddies trying to cheat presumably won't understand it
 
I use it a lot for serial communication in node
 
@KevinB security through obfuscation?
 
7:40 PM
It's hardly obfuscation
 
8:00 PM
!! sandbox
 
@JBis Please go and play in the Sandbox
@JBis Please go and play in the Sandbox
 
8:23 PM
@rlemon by the way I owe you a kiss
thank you
 
please no
2
 
XD
 
    var json = require('./rl_kb-v1.json');

    let processStuff = (data) => {
        // console.log(data.faqs);
        let faqData = data.faqs;
        let questionId = 0;
        let questionArrayId = 0;
        let altQuestionId = 0;
        let answerId = 0;

        let questionArray = [];
        let altQuestionsArray = [];
        let answerArray = [];
        let combinedQuestionAltquestionArray = [];
        let combinedQuestionAnswerArray = [];

        for (const [key, value] of Object.entries(faqData)) {
that is all the code I needed to clean up and process the data
I am going to work on the part you gave me @rlemon so I can better understand it... I think you were using the reduce to merge the objects together
but I posted it so @ndugger doesn't think i am a total idiot
 
that code won't work.
 
really it does work
 
8:32 PM
Getting code clean is a long process where the code needs to want to get clean
tell the code how much you love it and that you want the best for it.
 
lol i don't love it but it is getting the job done
this is to process a nodejs file
nothing going into production here
processing json is not fun
jesus
 
you don't love your code?
 
i love this is working
and like i told lemon before the main culprit here is excel
 
then the code will die and give you a Fatal Error
you have to let the code know how much it means to you
 
ok
lol
i am more into machine learning
so this will allow me to accomplish that
 
8:39 PM
is there a way to sort data on mongodb once and for all? how and where to do that?
 
of course but this isn't a mongo room
 
don't be that guy
@JoeSaad feel free to ask questions about Mongo here
don't expect answers immediatly tho
 
i actual am almost certified in mongo so go ahead
but lol the way he asked that question... once and for all. what does that mean
 
meaning he's probably sorting the documents after getting them
he wants them sorted inline the db
 
like an index would probably work
 
9:42 PM
!!meow
 
lol
 
 
1 hour later…
user11867329
11:05 PM
So the spider is still under my oven.
 
user11867329
and my Fat cat would chase a baby mouse.
 
00:00 - 18:0018:00 - 00:00

« first day (3258 days earlier)      last day (1692 days later) »