« first day (2592 days earlier)      last day (2581 days later) » 

19:14
Awful dead in 'er today
Hello, I had some trouble understanding variable scopes in Javascript, particularly the this variable(?). I am currently trying to understand the Knockout JS example for TODOMVC and in most places I can see .bind(this) in the code. But I don't understand why it's necessary / what would happen if it wasn't done. Can someone kindly elaborate or point to a good resource for this?
@AshishNitinPatil how much do you know about this and the context?
Read up on binding context in the MDN, that should shed some light
900
Q: How does the "this" keyword work?

Maxim GershkovichI have noticed that there doesn't appear to be a clear explanation of what the this keyword is and how it is correctly (and incorrectly) used in JavaScript on the Stack Overflow site. I have witnessed some very strange behaviour with it and have failed to understand why it has occurred. How doe...

Thanks, I'll read up more on this :-p
var a = 'foo',
    b = 42,
    c = {};

// Shorthand property names (ES2015)
var o = {a, b, c};

// In other words,
console.log((o.a === {a}.a)); // true
19:17
understand what 'this' is and how it is set, then .bind returns a method with a pinned thisArg
@rlemon what on earth is that final syntax?
good
const { foo } = obj;
return { foo }; // returns { foo: foo }
amazing
I've never seen curly braces around a string like dat
with a property
would be like [1,2,3][0]
but for objects
but a is a string
19:18
ohh, well that's fucked up
but would still work
Oh so I'm not cray?
{ a: a }.a
no it's just confusing to write it like that
wouldn't be my first choice of examples
That makes more sense
yea, that's what {a}.a computes as
Seems fucky but I kind of like it
19:19
it's a handy shorthand in a lot of places
function foo() ..
function bar() ..
export { foo, bar }; // so you can actually call them with foo and bar
destructuring works both ways.
so that's like restructuring :P
sure
is there a way to update a mongo collection without having to reset all of the properties?
@SterlingArcher spend a night reading the 2ality blog
you'll learn a lot about new syntax
@rlemon you mean $set?
19:22
possibly.
I just did db.accounts.update({id: 'someid'}, { role: 'newRole'});
$set should be property specific
and it nuked the record for just the new object
I'm bad with mongo :D
just need to get this crap all working, then first update is swapping mongo for postgres
!!nudge 80 check oven
@towc Nudge #2 registered.
!!refresh
19:23
try db.accounts.update({id: 'someid'}, { $set: { role: 'newRole'} });
hahahahahahahaha
Or something like that
so, apparently last time I was cooking the chicken at 230C :/
@rlemon evil :/
don't rely on nudges to not burn your shit down dude
I think that's considered attempted murder @rlemon
19:24
!!nudge 80 check oven
@towc Nudge #1 registered.
seriously. if that doesn't remind you don't blame cap
sure
Oh wait celcius
setTimeout(_ => alert('check oven'), 80 * 60 * 1000);
is essentially what you're doing
it's not a great oven timer :D
19:25
lmao
I don't think I've ever forgotten to take something out, but where's the drama and tension otherwise?
21:45 either way
doesn't your phone have alarms that you can set by just speaking to it
(yes, I'm also disappointed by how late I'm eating)
@SterlingArcher so you're a mongo guy? because I'll have more questions
that's for sure
@rlemon yeah I spent the last year working with mongo
19:26
@KevinB as I said, where's the drama and tension otherwise?
It's... ok
Can't handle memory worth shit
aggregations are slow
actually, I do think I burnt some rice while I was in italy
i mean... there's no drama or tension either way
you haven't met me apparently
everything has drama and tension
@SterlingArcher okay in my schema accounts have relationships with other accounts. so I have { relationships: [{ type: ObjectId, ref: 'Account'}] } and now I wanna query for accounts that have me in their relationships collection
19:28
@rlemon oh btw, I didn't say anything stupid to the nurse, I held out. I'm still over it though
from tasks like coming back from the airport, having a friend over for pizza, to mundane stuff like cooking chicken and growing basil
Account.find({ relationships: { _id: account._id } }); doesn't seem right
@SterlingArcher ahh shit, so she bailed?
Not yet, but I'm about to
why? she ghosting you or something?
So your query, is the account id a parameter?
19:29
@SterlingArcher I have my own unique id, and then there is the _id auto generated shmoo from mongo/mongoose
Mmkay, and you want all accounts tied to that?
That query should be fine.
You can use $exists but that's overhead
And yeah, she just doesn't text back for like 18 hours. And when she does she's so dissinterested
So I found another. She's a true blonde
talked to her about it? don't have to rude. "so you really into this? or am I getting the wrong signals."
easier to be up front about it
no burned bridges
she's a nurse, you never know when she'll be holding the thermometer
@rlemon I did, and she ghosted me for a day and never answered
A K
A K
my work is depressing me; i'm expected to work 6 days a week for shit pay
That was basically my whatever. The switch is off lol
@AK do something about it
A K
A K
19:33
and personal growth learning new shit is not encouraged
buy a 3d printer, then print a boat
A K
A K
yea, i'm looking to find a new work asap
it's horrible here
What is the antonym of parse?
@rlemon damn that's metal
19:36
Produce?
@RonaldMunodawafa in what context?
143
Q: What is the opposite of 'parse'?

SimonI have a function, parseQuery, that parses a SQL query into an abstract representation of that query. I'm about to write a function that takes an abstract representation of a query and returns a SQL query string. What should I call the second function?

@SterlingArcher I read that as "Sexists"
see I'd have said serialize as a general answer
but in certain contexts that'd probably be funny
@towc that's your heritage speaking
I like to cerealize my data
19:38
welp
Making an M3U string from a data structure representing the data for the playlist
btw @rlemon, what's the cause for cap failing most of the time? Using too much memory?
failing at what?
if so we can automatically get her to back up every time she hits a certain performance.memory threshold, right?
@KevinB whenever she dies
mostly internet hiccups and the chat not refreshing properly
19:40
oh
user1596138
user1596138
What an odd About section lol
top meta posts
> Top Meta Posts 0 1
5What is a rage quit?
user1596138
I saw that yea
19:41
Sounds about right
user1596138
He doesn't even say anything in there really tho
user1596138
Links to a 10K account that he doesn't say why he isn't using lol
@IanQuigley I wouldn't judge someone by their rep either
I mean, I'm an exception, absolutely go nuts with judging me, but...
Only Judy can judge me
for example, Sterling has 14k and is clearly still at the "hey mom, I did a thing" level
19:43
If by mom you mean @rlemon then yes
true story
absolutely
judge judy is your mom?
I'm judge judy
my leasing company left me a move in gift (crystal glasses). How sweet!
19:45
that's nice.
I'm terrified of them, they seem so fragile
new tomska btw:
the people who sold me the house left me every paint can they ever used, labeled with what rooms they used them in. doesn't sound like much, but omg is it ever useful.
but now I have to dispose of like a dozen cans of old paint.
anyone want em?
I've been through painting. having the EXACT color is a godsend
if you pay shipping
19:46
i always thought those old piles of paintcans were crap
the paint in em is.
but you can still colour match from them
the old owners can provide a swatch of all colors on a piece of paper
or just the color codes
if they have them
like they have that
19:47
and the file of your house
right lmao
I never bought a house, but I think the landlords bought a kettle just for me when I moved in
they put it right there in the middle of the counter
@SterlingArcher nice.... picture of the glasses?
@Vap0r nah, they're only fancy feeling, not looking
@SterlingArcher like these kinda?
19:59
@SterlingArcher only use them for chocolate milk
they're the new designated chocolate milk glasses

« first day (2592 days earlier)      last day (2581 days later) »