« first day (2216 days earlier)      last day (2956 days later) » 

21:00
So, fun fact.
no
She manages to call Trump at 3am to concede.
But she can't take a 3am phone call about Bengazi
Hail Trump
0
A: In Node.js 7 what is the proper way to suppress UnhandledPromiseRejectionWarning?

davidThis is not your problem to fix. Just use promises the way they were intended. If the end user doesn't want to handle all rejections then THEY have to add an unhandledRejection handler. Otherwise they will need to add catches. If your errors truly aren't breaking then you shouldn't be rejectin...

21:01
3am on election night is not the same as reporters calling at 3am
I mean hi
I'm not trying to defend her, but that is some weak shit @Trasiva
@david disagree, mostly. There are legitimate cases where the warnings are wrong.
Please keep the inflammatory political comments to yourselves. We like jokes here, but please don't openly flamebait.
4
@rlemon Wasn't reporters, that was government officials.
21:02
I handle errors as resolves.
So much fun
@Trasiva same deal, you cannot compare her actions on election night with some other stuff that happened. election night she is of course going to be up till the end and active
it's all she has left
Looking for advice on this, I'm reading back SQL rows and I need to return them to the client as a JSON object.
Any good node packages to do that in an express server?
@BenjaminGruenbaum you mean there are cases where promises get rejected that shouldn't kill the process? That's kinda out of our hands. If the implementation says that's what happens then that is what happens.
@ndugger what is this related to.
@BrianJ express will do that out-of-the-box. res.json
21:03
@rlemon you've sent me Protohype songs before, yeah? Have you ever seen them live?
@BenjaminGruenbaum Mostly precautionary, but I've seen a few comments walking the line
@david I mean, there are times where promises are rejected but you'd want to handle it later and later never comes. Imagine adding a .loaded promise to an Image tag, and the image starts downloading when you construct it and not when you access the promise.
Also the arrays in the Sal db are stored as cab strings
@ssube no and no
@rlemon I suppose, it's just the biggest salt in the wound. Good men died because of that fuck up. I'll let it lay though.
21:04
@david if the image goes through GC because you never really access .loaded you don't care it rejected at all.
@Luggage ah ok I was worried this would be a PITA
@Trasiva yea, again, not defending her, but using that tidbit of information to 'nail her' is weak af. there is so much better ammo you could use and has been used.
@rlemon you did, but just the once
I'm debating going to see them in a week or so
saying "ohh look she tweeted at 3am here but not here" isn't really proving anything
@BrianJ even if express didn't have it JSON.stringify is part of JS.
21:05
So that package can convert to Json and back to Sql?
Besides profit, why even go to war ?
@BrianJ no, it just turns an object into a string and vice versa
@rlemon I wasn't trying to nail her. It was just a disparaging remark.
@ssube ohh, okay. I listen to google music radio -- so I don't know tracks/albums just link the songs I like then forget about them
@KarmaDoe take a history class :)
21:06
@BenjaminGruenbaum then that's logic you should describe somewhere. Probably by putting your own rejection handler in
@david why? Look at my answer it's easy to suppress.
@ssube so any suggestions when I have to convert that Jain object back to Sql?
@Trasiva yea, and given everything that happened over the past year, I think it was a weak remark. an attempt to attack character (which I am not saying is wrong, she's terrible) but you choose a really crappy example to use.
@KarmaDoe ideologies, for those that aren't collecting it
I have spent many hours debating these semantics and arguing for a not silent default (as well as writing the PR that adds one). There are legitimate cases for this.
21:06
@BrianJ use a prepared query?
I guess I'm using a stored procedure so I just need the object fields and pass them into the query
Seems like bs to me.
@BenjaminGruenbaum He doesn't WANT to suppress it though.
@rlemon Okay, fine. Just remove them then. I'm tired, hung over, and very much over this shit.
@BrianJ knex.js
21:07
The one who shouts the loudest is right!
he just wants it to not terminate the process
@Trasiva dude, keep your pants on. no one is arguing here.
@david he wants users to be able to .catch but for that promise to not be considered unhandled if it is rejected and no one cares.
I'm just calling that out as a non-linking comment. you can do better
@Trasiva Take your pant of, were all friends here.
21:08
That's a legit request for some things.
apparently somebody in the apartment building across the street had their pants off (and was fully nude), walking around in front of their window
@BenjaminGruenbaum yes, and if you suppress it like in your answer then the user won't be able to catch it
that wouldn't be a problem, but they put on a shirt, then shoes, then pants
@david yes they will... they can still attach a catch handler just fine and get the exception. Promises fork, you can handle the rejection multiple times.
then underwear
21:09
@ssube Holly yells at me for that. My response is always "IF THEY'RE PEEPING MY WINDOWS! THEY CAN SEE MY DINGDANG!"
she ddoesn't agree
 var p = Promise.reject();
  p.catch(() => console.log("I run")); // need at least one
  p.catch(() => console.log("me too"));
  p.catch(() => console.log("me three"));
@rlemon it's one thing in your own house. This was an apartment building in the middle of downtown, surrounded by similar-height buildings.
@rlemon she's selfish
if you want to show off your junk, go ahead, but that's a poor place for it
OHHH i didn't see the ;\np, i just read it as a .
21:10
why are you spying?
go downstairs to a club and then whip em out
meh.. nudity doesn't really bother me that much, in that context.
if you're lookin in my windows, don't expect to see something you enjoy
I've been going to the wrong clubs
I'm most bothered by shoes before pants
21:11
I did that at the gym once
I prefer socks with sandals
@rlemon see, that makes sense, especially if you're just throwing on sweatpants and don't want foot fungus
@BenjaminGruenbaum Hmm, okay. It still seems like a pretty odd thing to do. Basically just abusing the way unhandledRejection detects unhandled rejections
@MadaraUchiha I saw that, OP should RTFM, if he gets no answer in a few days I'll answer.
21:12
@ssube no, post workout, post shower - put on undies, socks, shoes... realized I didn't have my jeans on. tried to push my shoes into my jean legs. didn't work. had to take of my shoes
@david why? Bluebird has an explicit .suppressUnhandledRejection btw. I think an empty catch is pretty explicit. It conveys exactly that we're listening for rejections for this promise but ignoring the result.
A rejection is only unhandled if no one listens to it.
@ssube What's your giants world boss damage at?
@Trasiva usually 790, but I ran it the other day with just the right doods and hit 850, then forgot who I used.
...damn. That's still better than me.
got a B- box, though
21:14
I'm pushing Cs
oh I know
That'll change by like...Sunday. I'll be farming db10 by then I hope.
@BenjaminGruenbaum I just like consistency. If someone's code is giving me a promise i'd rather it was a native promise, and if I don't handle the rejection then I'd expect it to throw an unhandledRejection error. That's what the error is for and it would be fucking weird to debug if it didn't happen
@Trasiva if I get vero, everything will change
but until then, I'm stuck farming for good runes for my arta
and trying to build fodder
21:15
@ssube I'll have Vero by Friday at the latest. Then it's farming db7 or so for vengeance runes for him.
@david think of the Image example I gave you. I don't see why an image I don't care about not loading should cause an unhandled rejection.
@Trasiva Now that I know your bust size, I can have all kinds of fun with that.
@KendallFrey 🐦
@Luggage I'll give this a go tomorrow
well now I'm confused
21:16
@KendallFrey but that's only cup size without band
Seems easier now, storing and retrieving the arrays in Sal out me off a bit
@BenjaminGruenbaum You didn't handle the rejection... that's why it is throwing an unhandled rejection :S
@Trasiva ✋
@KendallFrey flipping the bird.
*sql
21:17
you missed the flipping bit
🖕
@Trasiva this exists
I couldn't find the...oh shit
Which emoji?
:middle_finger:
Ah
I didn't look all that hard.
flipping the box, thanks to Unicode
21:18
I honestly should have taken the day off.
@david how would you design anything that needs to create promises eagerly but you only care about their result later?
not feeling so hot?
Like buffering values in an async iterator
Nah, for some reason this morning on my way to work I got really nauseous
go home then
or have some mint
21:18
@BenjaminGruenbaum how do you expect the code to know whether the end user wants the image to load or not? Maybe it's really important and the user actually really needed to add a catch. This way you're completely suppressing the error :S
@Trasiva maybe you're pregnant
mint takes away nausea for me instantly.
@david simple, if they listen for the value they care.
it's "mint" time right now.
@rlemon I can't, the bosses are in Germany, so I have to be here to take care of all the meetings and such.
21:19
"mint"
@Trasiva try some mint gum then
or mint tea
@BenjaminGruenbaum if it was that simple then there wouldn't be an unhandledRejection error at all
seriously does wonders for me
@rlemon Ginger works too
I always have ginger ale on airplanes
I have neither of those on hand here at the office, but I'll pick some up after work.
21:20
ginger doesn't have the same effect for me
Why the fuck I'm not growing some mint at home is beyond me though.
does for Holly tho
@Meredith whiskey ginger <3
@Trasiva ohh man we grew so much mint.
@ssube ginger beer
21:20
also, mint and ginger tea is pretty good
@david the reason Node has unhandledRejection is because I specced it and got a friend and former RO to write that code. The reason it warns is because I wrote that behavior.
Ginger beer is a great mixer w/ pretty much everything
probably 2-3 years worth of tea
Never had it with whiskey but it can't be bad
and will be growing that much again next year. I wonder how hard it is to ship tea
I can ship you some
21:20
@rlemon Honestly, I'm considering building a small indoor herb garden. I have the perfect out of the way spot.
there's some good ginger lemonade in the grocery store here that is properly spicy
@david unhandledRejection is super useful for the vast majority of cases, but we need to acknowledge there are edge cases.
Ask the british
@Trasiva wild mint doesn't like the indoors.
@towc @BenFortune How hard is it to ship tea?
21:21
Shit
Oh at trader joes a while ago
harsh environments make it thrive. it's technically a weed
They had some really spicy ginger candy
So much for taht idea.
@Meredith Irish whiskey or bourbon with ginger is so good.
@Trasiva you can do it indoors, but you'd need fans and such
@ssube like pickled ginger?
it isn't a window cill plant
I've had "lemonade" that tasted more like bubble gum than lemons
@Luggage the only time I sent tea overseas was in my luggage coming back after a vacation before brexit. No issues
21:22
@Luggage similar taste, yeah. It's sparkling water with ginger in it, enough that you can see sediment.
@rlemon Oh, I wasn't going to do a windowsill situation, I only have one window in my apartment, and that's in my bedroom.
@Luggage Fuck knows lol
it's a ton of ginger, so it's really good and makes some fantastic whiskey and rum drinks
I was going to build like a small hydroponic herb table or something.
21:22
I also had a rum sample at the store yesterday that is made with coconut water and just the natural sugar from that.
@Trasiva I was using that as an example. it gets all spidery unless you give it some wind + alternating light / water schedules
It's like... good Malibu
I've tried a few times now
@rlemon My chat has become really laggy, what's the best way to debug?
Like, FPS lag
profile
21:23
@rlemon So in otherwords, it's not really worth the effort.
close and reopen chrome
@BenjaminGruenbaum I don't care if you specced it or not. If the end user doesn't care about rejection then it's THEIR responsibility to add the empty catch. You don't get to dictate their requirements just because you think they're not interested in the rejection
I noticed some lag the other day but f5'd and haven't seen it since
21:23
Didn't want to f5 so I could determine the cause, fuck knows though
I did re-write the observer, which used to not leak
try DOMObserver.drain() and see if that works?
can't click into that for more deets?
21:24
fuck, browser crashed lol
there is a high chance the MO went crazy
if it lagged you down that much
@david you're writing the API, you get to choose. This is not implementation detail it's the design.
is that a technical term
Seems fine now, meh
It's how promises work.
21:26
@Trasiva @SterlingArcher Just awakened dagora
@BenFortune Make that bitch five star
It is
:D
@BenjaminGruenbaum You're writing an API that returns a promise. There are certain expectations associated with that which you're violating.
> Hey, so I got monster X...
> Five star that bitch!
> *slaps phone*
Can't find a good #4 rune though
21:28
!!afk I can't wait.
@david no, there really aren't. I still haven't heard how you'd solve buffering in async iterators, or how you'd write Image. There are cases where it is necessary.
@BenjaminGruenbaum I certainly wouldn't solve them by violating the end users expectations of how promises should work.
@david that's not an answer, play the role of the implementor of an Image exposing library (like WHATWG) - what would you do in that case? What about an async iterator that needs to buffer?
Is there any good async iterator ?
I crave it.
21:40
@BenjaminGruenbaum give me a decent spec of what this image should do
Do you mean just like the existing Image element?
@david load an image (either when I first assign to its .source property or pass it to the constructor and have a .loaded property that returns a promise that resolves when it loads and rejects when it fails. It also needs properties like .width etc.
@FlorianMargaine This was interesting
And surprising
@BenjaminGruenbaum So the key is you want .loaded to be a property not a function that returns a promise?
I especially liked this part:
> Internally, Emacs has a model of what each frame used to look like, before the last invocation of redisplay. This model is one of redisplay’s inputs. Another input is the current contents of each Emacs buffer. Redisplay essentially diffs the last-known display configuration and what it’s supposed to be displaying right now, then emits a minimal set of terminal control codes needed to change the last-known state to the current-good state.
@david right, like in a lot of DOM APIs.
21:43
And you want to create a promise internally, that no-one asked for, and not cause an unhandled rejection error if noone ever uses it?
@Zirak I was reading about those algos the other day in the context of blessed
@david I'd like to have a promise for when the image is loaded, like the onload event.
If possible, I'd like to avoid having my process crash :)
If I was designing the API I wouldn't make it a property, I'd make it a function.
@ssube heh, what does emacs, React, and h.264 all have in common?
This is the API, as it is on the Image tag and a .loaded property needs to be added.
21:46
makes for a great trivial pursuit question
eagerly creating a promise that noone asked for is weird.
Hopefully, it doesn't crash my process :)
I thought I was designing the API?
@david APIs do it all the time, think of an async iterator that caches the next value for example.
@bitten I don't know about all that, but they do all diff very well.
21:46
@david You have to make an API on top of the existing Image one.
I'd deprecate the stupid one and do a more intelligent one.
There are lots of examples in the node issue.
I guess if you were super desperate you could create the promise in a get() for the property
but it's still working with a broken initial idea
Check out the node issue, there are lots of examples - you can't really solve those like you couldn't really solve this one other than "I'd change the whole existing object API"
@ssube i guess just diffing algorithms would be the answer, but are you not familiar with trivial pursuit? (is that what you meant?)
21:48
@Trasiva woah that is pretty interesting
As for "an async iterator that caches the next value" surely the iterator itself should be handling rejections and retrying? Why expose that to the end user?
@bitten I am familiar, I just don't think they would make good questions for normal people.
we are not normal people and know unusual trivia :P
@david but you have already created the promise...
@Loktar Right? I mean, it doesn't substitute basic firearm safety, but it's still a nice supplementary. Side note, I'm looking at getting a 9mm here soon, probably next month.
haha yeah, it's not exactly going to appear in the family edition
but trivial pursuit is still hard, for me at least
21:50
it is pretty hard
We used to play that when I was younger. You always wanted to be on gramps team. He knew everything
@rlemon yeah, it's definitely aimed at a different generation
@BenjaminGruenbaum What do you mean you've already created the promise? Is your iterator returning values or promises of values?
@bitten how so? What's wrong with us youngsters knowing trivia?
@david it's an async iterator - it's returning a Promise<{done, value}>
21:53
And if the promise rejects what do you want to happen?
save me, brothers
Wait, what do you mean by 'caches the next value'? Do you only trigger the next action once the previous one has been accessed? Are these promises not all running in parallel?
@david no, it's an async iterator, for the consumer the promises don't run in parallel unless he asks for several values - see docs.google.com/presentation/d/…
(Or on youtube if you prefer)
@SterlingArcher Your Vanessa hits like a girl.
@Trasiva SterlingArcher is afk: murdering my brain cells
21:55
!!kill
@canon That didn't make much sense. Maybe you meant: vkill
don't kill the bot
I'm trying to foster in it a hatred of humanity.
@canon Excuse you
hey, does anyone here know a bit of Web Audio API ?
When I create an Audio(), it contains a currentTime with the current time of the playing audio.
I found that the context of Web Audio API has a similar currentTime, but it's useless since it's relative to when the context is created. Is there anyway to get the currentTime relative to a source buffer ?
22:04
!!afk store > puke > home
@BenjaminGruenbaum Okay, I've viewed your slides and read through github.com/tc39/proposal-async-iteration which seems to be the proposal for it so I think I have a basic grasp of async iterators.
Your question was how I would make an async iterator that eagerly cached a single value ahead, even if the user had not explicitly called .next() yet?
and how I would handle having that internal promise be rejected
Actually that can't be what you wanted because it's trivial as you haven't yet returned a promise for the value you're caching... you'd return it on the next call to next()
so...
No one has no idea...
i've used the audio api before, but that was a while ago. i'd have to go to mdn, but you probably already did that (i'd hope)
@KevinB yeah, I already did that. Searching Stackoverflow has an unaccepted answer with ugly Date(), counting milliseconds and timeout is also suggested elsewhere
I was hoping there was a better way, maybe...
22:40
Hey... what would you call this function? {...a, ..._.pick(b, Object.keys(a))}. It updates a with values from b but doesn't add or remove any props
update or refresh maybe?
refreshKeys?
Hrm.. that's a bit generic. It's kind of like a merge with a mask
confusing?
It's useful when the server or some source returns more data than you need and you only want to update the props you already have
I went with mergeUpdate.
mergeOnly could work too
22:56
Yeah..that's not bad. You don't specify the props to merge in though. Usually 'only' methods have you choose the stuff you want to keep
23:07
yeah, it's usually more explicit
23:28
what's the current verdict on Angular2 ?
Guilty!
No idea.
I am moderately pissed that it still has no documentation in javascript
wild rice is a staple of a healthy diet
and staples are a good source of iron.
cows are where gods live
23:31
they also make a great steak
mm, deity steaks
@rlemon I probably should open fastfood joint in India, called "Holy Burgers"
serve beef doughnuts
double word play
win/win
That reminds me. How is your mom?
dead
23:32
0xDEADBEEF
bed beef
beef you eat in bed
the best kind of beef
I smell like beef
@ndugger You're a cunning linguist
cunnilingus
bed face
the kind of face you make after eating beef in bed
actually that would be bedbeefface
nvm
who's kevin B?
@ndugger wow...

« first day (2216 days earlier)      last day (2956 days later) »