« first day (1945 days earlier)      last day (3002 days later) » 

5:00 PM
>_>
 
It's not a beard, it's a saddle!
 
can we have a hangout call tonight guys ?
 
I love it, haha.
@Loktar I love my bay rum shaving soaps. They smell pretty fantastic.
 
If you're gonna grow out a longish beard, I do recommend dollar beard club; I love their shampoo and oil
 
yeah I'll check them out
 
5:00 PM
and their balm is nice too
 
I want to grow a beard
but ... I'd rather not
 
lol why not?
It's easy
just wake up everyday
 
@Loktar I am brown!
 
dude I have seen some fantastic Indian beards
 
bad joke I guess
 
5:02 PM
You guys at least trim the edges of your beards, right?
He's making a joke he'd look like a terrorist.
Because ignorance.
 
oh... but Indians don't look Arabic :/
 
:P
 
@Loktar You know this, I know this. TSA does not know this.
 
@crl I think it complicates things by a lot without giving that much of a value.
 
Or like a third of america for that reason.
 
5:03 PM
(From initial read)
 
@Loktar that reminds me on Moscow Airport a lady came to me with her iPad, trying to find if Apple will fix it for her. (She was Russian)..
 
@Trasiva I shape it, yes
 
@Trasiva not yet
I just let that shit go au natural
idk how to shape it I'm worried I'll screw it up
 
lol
You need more beard experience
 
@Loktar Shaping isn't that big of a deal from what I've been reading. The biggest thing is just keeping your lines clean.
 
5:05 PM
@Loktar keep it he way you are you look kinda classy
 
@ndugger yeah I used to just keep it really short
this it the first time I've grown it out
@Abhishrek haha thanks man
 
So are we having a hangout ?
 
We might do a Valentines evening hangout, so we can all be sad drunk together
 
@ndugger brooooo
 
even Florian said he might join
his wife is out of town, or something
 
5:07 PM
@ndugger Dude, fuck that noise. My policy on Valentine's day is to go have a shit ton of fun, even if it is by myself.
 
getting drunk is fun
 
Lots of drama in Node land
 
It's just a corporate holiday anymore anyways. Why should it be anymore of a special day then the day before or after? If you're not being sporadic and occasionally surprising your gal anyways you're fucking up and letting things get too drab.
 
@BenjaminGruenbaum what's going on?
 
Is this the promise nonsense?
 
5:13 PM
Yes, it's the promises nonsense.
People are trying to add promises into core.
 
@BenjaminGruenbaum Is there still disagreement on whether they should allow people to switch the default implementation to a third party?
 
I hope they don't allow that.
 
Me too
 
@ndugger damn I want to be there.... but I have plans
 
Chris hopes they do.
 
5:15 PM
Chris?
 
Core should provide a solid promise experience or none at all.
I don't want a "yeah, core does promises, but they suck so wipe them out".
 
@Loktar Only lonely people allowed >:(
 
Honestly, I hope core doesn't get promises at all.
I hope we wait a year to reconsider, we're not ready yet.
 
@BenjaminGruenbaum v8 needs to improve its promise implementation a lot before that happens IMHO
 
@BenjaminGruenbaum stupid question: what do you mean by core? I can open a node REPL and use a Promise object out-of-the-box.
 
5:16 PM
Switching the implementation is just silly; just allow someone to use a library, a polyfill, whatever. Why are they overcomplicating it so much?
 
It's not reasonable that a library written entirely in JS is almost an order of magnitude faster than an implementation written in C++.
 
Yup @MadaraUchiha , the problem is that async functions are landing in less than half a year in v8.
 
I bet you that at the end of the conversation, they'll land at such a place that's as if the conversation never happened, and they won't have implemented something so silly, lol
 
It's going to be a clusterfuck, they drove a lot of people out of the discussion and are left with a single view.
 
Yikes
 
5:17 PM
The people they drove away have different views.
 
@ndugger Because there is a real performance benefit for allowing core functions to use bluebird promises
 
Is there a tree shaker in js ? Or is that impossible ?
 
Because native v8 promises suck performance-wise.
@Abhishrek Closure compiler does tree shaking IIRC.
If that's what you're referring to.
 
by core, do you mean the std lib?
 
@NathanJones Yeah
 
5:18 PM
They're not that bad, they're just not very good either.
 
@MadaraUchiha that is what I am referring to
 
Like have a native fs.readFileAsync()
 
@MadaraUchiha that's an issue with V8, though. That should be fixed instead of allowing some gross monkey patching.
 
@ndugger Right, which is why Benji is saying (and I'm agreeing) that we shouldn't rush into it while it's not yet ready.
 
5:19 PM
V8 promises need to be much faster before they get accepted to core, core should have a much higher threshold.
 
Yeah, we all agree, lol
 
Or, endure the pref hit while pushing V8 to update, and get the "free" performance boost later as V8 upgrades
But allowing any piece of arbitrary code to internally and globally alter which Promise implementation is used is bad.
And their ugly proposed hacks of "let's only allow the promise change function to be called once, and throw on subsequent ones" is even worse.
 
@MadaraUchiha huh?
 
process.setPromiseImplementation, or whatever it was
I forget what they actually named it as
 
Ugh. Promises are the bane of me
 
5:24 PM
I don't want to go visit the thread
I'll probably cry
@SterlingArcher Promises are amazing, and you will fucking love them
 
@BenjaminGruenbaum The problem raised with their process.setPromiseImplementation() proposal is that libraries can change it at will
So they suggested that only the first call to it counts, and further calls would throw or warn
 
@MadaraUchiha yes, that API is not going to happen.
 
How do you (with bluebird) make a function finish running before running a finally?
 
@BenjaminGruenbaum Yeah, it's pretty horrible.
 
Like, I have my connection, and in a HashMap.forEach, I'm running a mongo insert. But my finally -> db.close() runs first
 
5:27 PM
@SterlingArcher Hmm?
 
So I do my async Mongo connections, and I iterate over a HashMap using forEach, and inside, I run a mongo.insert(stuff)
It appears to be async, but I'm having way too much trouble promisifying it
(trying to make a paste, but it's being weird)
 
@SterlingArcher The normal pattern is to have an array (or map, or collection, whatever) of data, and then map it into an array (or map, or collection, whatever) of promises
Like for example:
 
@rlemon You probably don't care, but dropped my phone off at a lab and bought a SIM adapter. Pulled out my old phone, this ~7 year old Nokia. Plugged it into a charger. Worked.
I fucking love this phone.
 
@Zirak rlemon is afk: lunch
 
jsfiddle.net/renyj3wf here's what I'm doing
the finally runs first
 
5:31 PM
const urls = ["https://google.com", "https://stackoverflow.com", "https://github.com"];
const promises = urls.map(requestAsync);

Promise.all(promises).then(allData => {
  // Do stuff with allData
});
 
wtf are these idiots on about
read about JS fatigue
then about JS fatigue fatigue
and now JS fatigue fatigue fatigue
 
@SterlingArcher is charCollection.insert() async?
 
i believe it is
 
@SterlingArcher Of course it does, you're 1. having nested .then()s and 2. you're performing an action with a callback that doesn't notify the completion to the promise in any way.
so the promise resolves instantly.
 
@SterlingArcher you probably need to return that
but yeah, what @MadaraUchiha is the bigger problem. Nested then()s shouldn't be a thing with promises.
 
5:33 PM
@NathanJones except with if
 
I tried doing it without nesting, but I nested to expose db in the functions
 
!!> Promise.resolve().then(() => setTimeout(() => console.log("async!"), 0)).then(() => console.log("done"));
 
@MadaraUchiha "undefined" Logged: "done","async!"
 
See how "done" is output before "async"
 
@SterlingArcher o/
brooooooo
 
5:34 PM
hey doode!
@MadaraUchiha yeah
 
@Mosho They seem quite fatigued.
 
hows your game bro ?
 
@SterlingArcher Here's what you should do
You should have a function insertAsync that takes "whatever" and returns a Promise.
 
@Zirak That's amazing, haha.
 
Then, you don't .forEach on the data, you .map() it to your insertAsync function
Then, you return Promise.all(arrayOfAllInsertPromises)
Out of the .then() handler
That will ensure it resolves only when all the operations were completed.
 
5:37 PM
What do you mean map it to my insertAsync function?
 
Say I have a function insertPerson() that takes one Person object, and returns a Promise object that resolves when the insertion operation is done
Then, you want to do something when all of the insert operations are completed
Promise.all(listOfPeople.map(insertPerson)) will give you a single Promise object, that resolves when all insert operations are done.
 
Ok, let me pause you because this is totally XY
 
!!space race or space battle
 
@Abhishrek That didn't make much sense. Maybe you meant: sscce, spec
@Abhishrek space battle
 
:-/
!!sscce
 
5:41 PM
@Abhishrek Please provide a short, self contained, compilable example: sscce.org
 
I was using this before, but my issue was that db wasn't exposed, so I couldn't use it in the then. That's why I went nesting. Would this be easier if I stuck to this model, and is there a better way to expose the db object?
 
Golden command!
!!tell SterlingArcher sscce
 
@SterlingArcher Please provide a short, self contained, compilable example: sscce.org
 
@SterlingArcher That's when coroutines and asyinc/await really help you out.
 
!!spec me
 
5:41 PM
Server error (status 500) occured (message probably too long)
 
I cant use async await in this project :(
 
@SterlingArcher why ?
 
not using babel for this (work)
 
@MadaraUchiha do you have a good guide to coroutines/generators ?
 
@Abhishrek We talked about it yesterday, you can look it up
But I don't have any particular guide
gtg dinner
bbl
 
@Mosho @MadaraUchiha I know how they work
the problem is, I almost never use them when writing code
 
Is there a shortcut key for selecting the selector cursor in Chrome dev tools, instead of having to click on it each time?
 
By a guide I mean something that tells me where I should use them and where should I refrain from ever thinking about them :->
 
@ton.yeung the whole problem with this is finger print scanners are already incredibly easy to fool. fuck replacing the sensor with a fraudulent one, I can probably fool it just as easy
 
ctrl + shift + c, it says, when you hover it
 
5:46 PM
@SterlingArcher var telemMap = new HashMap(); what the fuck is this?
 
@dimoff ctrl+shift+c brings up the inspector, and you just click the element you need at that point
 
@Loktar thank you
 
@Abhishrek the most common usage right now is async/await
 
@SterlingArcher Dude, that was such an easy fix.
 
I have a lot of those in my code
 
5:47 PM
 
:O
I never considered a floating TV stand
that looks nice
 
@Abhishrek so those are coroutines
 
Et tu @Trasiva ?
 
@rlemon I like the cat
 
@rlemon I'm going to get one too. They look really snazzy.
 
5:48 PM
Looks like too much work
I like the TV stand/table that I got from Ikea
 
I have a wall mount, but I haven't installed it yet
might return it and just build one of these
 
and the other usage for generators are lazy collections
 
@Abhishrek Did you look at the code? It's pretty clear.
 
@rlemon <3
 
@Trasiva yes man !
Such clear hidden
 
5:49 PM
@Abhishrek Shhh, let Sterling figure it out.
 
@rlemon why not mount it in the wall ?
 
why not mount a stand to the wall and put it on that?
 
Greater Torque ?
 
what?
 
think he means it might fall off because there's more angular force on the hinges
or something :P
 
5:51 PM
^
 
yea no
 
also wait
 
my walls are not made of straw
 
the space wouldn't allow for something like that
 
5:52 PM
ah :-/
 
the stand can't be longer than the tv.
even or shorter
there is a hallway and a vent surrounding it
 
Why do you want to cram a stand there :?
 
because I think it will look nice
and I need to put my shit on something
 
I discovered a new fun thing to do
open multiple rebecca.blackfriday at once
 
Ah :D
 
5:54 PM
I, going to try something new
mongo.connectAsync(url)
	.then(function(db) {
		console.log("DB Open");
		return db.collection("telemOld").findAsync();
	})then(function(cursor) {
		return doc.toArrayAsync();
 
@KendallFrey and then ?
 
dropped this .
 
@Abhishrek listen
 
How do I bind db to the next then?
 
@KendallFrey o_O what am i looking for ?
 
5:56 PM
idk, what are you looking for? enlightenment? peace? happiness?
 
return [db,db.blah] }).then(args => { const [db,cursor] = args });
 
maybe some KNAWLEDGE?
 
@SterlingArcher ??
 
@rlemon return [db,db.blah] }).then(([db, cursor]) => { … });
 
5:57 PM
@KendallFrey right now I am looking for a tiny planet
 
you're missing a period, jordan
you might be pregnant
 
@copy aahh, nice
 
@ndugger o_O ?
 
@SterlingArcher also look into Promise.bind
might be useful
 
> })then(
 
5:58 PM
3 mins ago, by rlemon
dropped this .
 
I wanted to make a pregnancy joke
 
@Abhishrek Eeloo?
 
so did your mom
 
:(
 
ooooooooooooooooo
 
5:58 PM
that was pretty good
 
@ndugger Your pregnancy was a joke
 
ooooooooooooooooooooooooo
@KendallFrey you are a joke from a plutoid
@AwalGarg o/
Hangouts
 
mongo.connectAsync(url)
	.then(function(db) {
		console.log("DB Open");
		return [db, db.collection("telemOld").findAsync()];
	}).then(function(args) {
		return [args[0], args[1].toArrayAsync()];
 
!!tell ndugger rimshot
 
6:02 PM
5 mins ago, by copy
@rlemon return [db,db.blah] }).then(([db, cursor]) => { … });
 
It's saying undefined is not a function. Am I not passing it right?
I'm not using ES6
Ohwait
 
@KendallFrey that guy is probably the worst youtube ad yet
 
you can Promise.bind in bluebird at least
not sure about native
@SterlingArcher ^
mongo.connectAsync(url)
	.then(function(db) {
		console.log("DB Open");
		return [db, db.collection("telemOld").findAsync()];
	}).spread(function(db, other) {
    return [db, other.toArrayAsync()]
  })
should also work
 
@rlemon Ten seconds later, Momma elephant makes goat jelly.
 
6:18 PM
Tern down fer wut?!
 
is there a way to prevent a socket from being written to? socket.close()? How do you re-open it?
 
alright 3 day weekend time, see you all when I'm at a non work computer. Happy Friday!
 
@rlemon well that worked, but still having async issues.
This is driving me nuts.
 
@rlemon How have you not seen that?
 
6:24 PM
@Trasiva internet is full of stuff man
 
@rlemon I know, but it's been linked in this chat a half dozen times, haha.
Like, how does the king of the JS room miss this gold?
 
despite what you might think, I am a real person and am not always at the computer.
 
@rlemon See, that's a lie. We all know you're just a ghost in the machine.
 
@rlemon All I can think of is Stewie and his Cool Whip
 
6:29 PM
@Cereal Mind. Blown.
 
> The dildo helps me think.
 
@Abhishrek What do you mean? What do you want to happen?
 
remember Quake style console ?
type string, bam executes
 
> Poor baby's language implicitly adds "f" + 2.6 incorrectly? DON'T FRIGGIN ADD "F" to GOD DAMN 2.6 anymore. Or just use TS (or whatever you prefer) already and move on. Hell, even jshint will shut you up for a while.
love it
 
6:37 PM
@rlemon This whole thing is magical.
 
crl
I wish I could do [1,2,3,4, foo:2] // 4 enumerable things, and some other one
 
why?
but why?
 
@rlemon Did you listen to his rap at the bottom?
 
yeah, why?
 
crl
for representing a table selection, the x and y of the start and end cells
and a property isCollapsed
 
6:38 PM
const foo = { iterable: [], foo: 2 }
 
crl
hmm, right, thanks
 
just make it two messages
 
That looks like an excellent question to post on SO.
 
two messages can format proper
 
@rlemon You're not on mobile! :D
 
crl
6:42 PM
or keep it simple and play with websockets
 
please and thankyou
@Trasiva lol not this time
 
Hi! I build a reactjs application and i want to import socket.io client side only. My application is universal rendering. The Socket is connected to an api in a different port. How can i export a module to only use it from the client side? There's my module to handle Socket.io
 
boss gave us the aft off
 
import io from 'socket.io-client';
import { API_URL } from '../../config';
const socket = io(API_URL);

// Connexion à Socket.IO sur l'api
if (typeof window !== undefined) {
  socket.on('message', (msg) => {
    console.log(typeof window);
    console.log(msg);
  });
}

export default socket;
 
@MikeBoutin ty for formatting
 
6:43 PM
@rlemon Np sorry for the first post
 
np
 
i was thinking that i can make a normal msg with a formated one
You know how can i handle this?
I use Browserify
 
sorry, no.
but someone else may!
@SterlingArcher i.imgur.com/guGAXua.gifv
baby babou!
 
!!youtube weekend nightcore
 
6:45 PM
@rlemon That ocelittle is going to town on that bottle.
 
This is dope -> youtube.com/…
 
cc @SterlingArcher
 
 
@Mosho The sad part is, this wasn't an actual episode.
 
@Mosho lol
 
6:51 PM
@rlemon Oh. My. GAWD.
That child needs a total attitude adjustment.
 
@Trasiva You also listen to shitty chipmunk music? Geeze man... The only other person I know is @towc
 
@ndugger It's a good tempo for at work.
 
Ew
 
@rlemon lol
 
@ndugger Usually I play classic rock, but sometimes I like a little change.
 
6:54 PM
@MikeBoutin ew french
 
@FlorianMargaine EW, Florian
 
Wait wait wait @FlorianMargaine. He's Quebecian. That means neither the French nor Canada want him.
 
seriously, you are french... The cie here is french, so why i should write docs in english?
 
@MikeBoutin all code should be english, period
 
@Trasiva Sure, learn how to write
@FlorianMargaine this is not code, it's a comment
 
6:56 PM
@MikeBoutin 'scuse you?
 
comment is definitely code
 
Comments are code...
 
they are not, like this phrase
 
comments help me understand the code, they should all be the same language otherwise they are useless
 
@rlemon They are all in french for all the people who are french in this cie (100%)
 
6:58 PM
but the code is in english. therefore the comments are useless
 
why is it useless?
It's some descriptions
 
now we're going full circle
read above
 
!!headdesk
 
@Trasiva That didn't make much sense. Use the !!/help command to learn more.
 
...how is that not a command?
 
6:59 PM
I don't know why i argue with you guys, just mind your own business
 
okay
have fun with your code
 
French is the langage here, the docs are in french, thats it
 

« first day (1945 days earlier)      last day (3002 days later) »