« first day (2071 days earlier)      last day (2891 days later) » 

3:00 PM
Jokes on him, I'm not a drug dealer
Potential pimp, my cane hasn't arrived yet
 
@SterlingArcher what u sellin bro?
 
WISDOM BRO
 
@SterlingArcher I understand. Earning 1.25 million isn't easy.
 
I'm actually going into the man-whoring business as a he-pimp
God I love that movie, purely for Eddie's sayings
 
@ton.yeung it's fine
 
3:01 PM
@littlepootis are you sure?
 
works for me
 
thankfully I took a backup of my home folder before I attempted that
could have been bad
 
Attempted what; a parallax effect?
 
@rlemon you know why so many linux sysadmins have giant gross beards? It's super easy to end up homeless when you have root.
 
@ssube I didn't even do anything wrong. ran the os-update tool and it crapped out half way into installing the new OS
 
3:05 PM
How have I never seen this movie
I almost spit my coffee at the first scene
 
@rlemon I've never had a linux dist update work. We just respin boxes from the new OS.
 
I asked cap this morning
she said upgrade, not fresh
 
> It's like an escalade in a wedding dress
XD
 
blame @Zirak
 
Hey guys! Anyone experienced with D3.js?
 
3:06 PM
While he's here, could he fix the Google stuff, too?
 
no
google got rid of their public API
there is no fix
 
DDG/Bing?
 
I've been struggling with a duplicate keys thing. I was hoping I could get some help?
 
-2
Q: Any way to get JavaScript numbers without Euler's number

Mostafa NawaraI try to get Math.pow(2,1000); The result is " 1.2676506002282294e+30 " I need the number without Euler's number "e+30"

duuuuuupe
 
Don't use duplicate keys
 
3:07 PM
!!google it's fixed
 
@JanDvorak do you want only porn results?
 
wait wat
!!youtube potato potato
 
@JanDvorak sorry I don't mean duplicate keys. I meant duplicate data, and I have to, it's the whole point of the exercice.
 
oh. Sort it first if you want O(n log n)
 
array.filter( (item, index, arr) => {
  return arr.indexOf(item) !== index;
});
 
3:09 PM
In d3.js if you are outputing your data and you have an array that goes like [40,60,500,40,60] - d3 ignores the second 40 and 60. I can't have that.
 
@SterlingArcher lel
 
Why should it?
 
well I'm not sure... I was researching and found this...
 
@VeronicaDeane Eddie Griffin plays an amazing pimp lol
 
but I wasn't able to make much sense of it.
 
3:12 PM
Hai guys! Can I ask question about javascript(to be specific, jquery) here?
 
@Jeremy Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Jeremy you can, but bear in mind that jQ is a bunch of outdated poor practices, so we'll probably give you an answer that doesn't use it.
 
I'm using jquery to set a http request. The returned result viewed directly from browser is {"error":"Not found"}. I used console.log and it showed Object { error: "Not found" }
shouldn't it show {"error":"Not found"}? Or has the string converted to json by javascript?
 
console.log tries to be smart
 
3:16 PM
the returned value is a json string
 
JSON requires the quotes around keys, JS does not
 
the object's properties are indeed sent like {"property":'value"} and is converted
 
and console.log decorates objects
 
so in JS, {"foo": ...} and {foo: ...} are equivalent
 
^decorated
 
3:16 PM
@rlemon I think not. It wouldn't show Object
 
The original '{"error":"Not found"}' (a string) that was sent has been run through JSON.parse() by jquery to turn it into a normal object.
 
@JanDvorak if it is printing it on the page, it is a string. if it were an object he'd see [Object object]
 
@Jeremy, use Fiddler4 to view the raw JSON that's sent
 
@FuriousFolder decorators are @DecoratorBeforeFunction, these are just quotes
the network tab will show the request and the literal response
 
Uhmmm
 
3:18 PM
@ssube what do you mean? what is @DecoratorBeforeFunction? A quick google turned up nothing
 
Btw, is 'data' in $.get("test.php", function(data){}; a string object?
 
everything in javascript is an object
 
does anyone know if this still holds true regarding the ability to get full file path stackoverflow.com/a/13977919/1462656
 
@rlemon then he's logging something else than he's displaying.
 
every variable*
 
3:19 PM
@FuriousFolder no
 
@JanDvorak probably.
 
@FuriousFolder no
 
It might depend on the content type.. run console.log(typeof(data)) to find out.
 
@FuriousFolder no, just most things
 
3:20 PM
what variable is not an object?
 
thanks
 
everything in JS boils down to an Object or a Primative
 
a Number
 
@FuriousFolder numbers, strings, booleans, null, undefined
 
1; // not an object
 
3:20 PM
@FuriousFolder var life = 42
 
<--- feels incredibly foolish
ty guys
(and gals)
 
You're an object, if it makes you feel any better. :)
 
(and non-gender-identifying people)
 
And what about us that change gender only during a full moon, huh? Intolerant jerk. :)
 
@ton.yeung Symbols are objects
 
3:21 PM
@ton.yeung "The Symbol object is an implicit object wrapper for the symbol primitive data type."
 
my actualy question is, I need to know that if the server returns {"error":"Not found"} or not. I try to compare by using data == "{\"error\":\"Not found\"}" but it doesn't work
 
@Jeremy jQ is automatically parsing it
you should compare it using data.error === 'Not Found'
 
how do I check if the word 'error' exists?
 
if( 'error' in data  && data.error === 'Not Found' ) {
  abandonShip();
}
 
since the server can return something else
thanks :)
 
3:24 PM
or if (data.error) to check if error was set to anything legit-looking
 
I never liked 'access' checking
you are, after all, accessing the property
which could be bad
 
@rlemon I found your future baby
> Killll meeeeee
 
@rlemon if somebody intentionally did something evil
 
...
 
@ssube or if it is a crazy heavy object
 
3:25 PM
if it's an object that just came back from JSON, it won't have getters
 
Hi guys
 
@rlemon that sort of access should be fast regardless of the object
and might even be optimized into a has property check
 
possibly. but why not be transparent and check for the key on the property and not access to it
 
16
Q: Why is getting a member faster than calling hasOwnProperty?

ssubeI'm writing a JS object that needs to perform really basic key-value caching on string:function pairs. The class runs on the client and caches partially-compiled templates for rendering part of the page, so it may have anywhere from 20-200 items. Before actually writing the class, I figured it ...

I asked exactly this question a while back :D
 
aaaaand the new install is booting to a black screen
wtf.
 
3:26 PM
I like x in foo, when it makes sense.
 
in has some weird semantics and is stupid slow
I consider it poor practice and don't use it
 
looping over properties with in is slow
 
Guys just wanted 1 favour from you like there is 1 friend of mine and she is data entry operator so if you guys have any work related to data entry then please do contact me
 
string in obj is not, and is perfectly fine practise
 
if (x in foo) is not very slow
But it can have weird behaviour, like being true for null, false, undefined, etc
But as I said, I like it when it makes sense
Just be smart about when you use language features
 
3:29 PM
@ndugger yea, that is expected
 
I have <div id="#warning"></div> and $("#warning").append(...); but it doesnt work
 
not weird.
!!> const o = { 'bar': false }; console.log( o.bar, 'bar' in o );
if all I want is to know if the property exists, why would I access it
 
@rlemon "undefined" Logged: false,true
 
@ndugger that's why I use x[y] !== undefined
 
I agree
 
3:29 PM
it's more predictable than in
 
@ssube That's not always the same thing as if the property exists
 
and happens to be faster, while still looking up through the prototype tree
 
x[y] = undefined;// x still has y, which is what I care about when using key in obj.
and would fail your test
 
!!> const foo = { bar: undefined }; console.log(Boolean(foo.bar), Boolean('bar' in foo));
 
@ndugger "undefined" Logged: false,true
 
3:30 PM
@rlemon how often do you actually set something to undefined, though?
and if it's set to undefined, do you really want to do anything with?
 
all the time when initializing objects
 
It might not be you that's doing it
 
seems like an antipattern complicating things
 
Which can occur when working on a team
When writing code, I know that I write slightly differently when working on a team project than when working alone
which is probably me being lazy and a bad developer
 
yeah, our stuff all has the lint and tests in the repo
and we mostly just copy lint files between projects
 
3:33 PM
In any case, foo.bar and 'bar' in foo hold different semantics. While the result will usually be the same, it is checking for different things.
 
@FlorianMargaine :(
Where the hell has @Zirak been?
@BenjaminGruenbaum @MadaraUchiha Do you guys know?
I haven't seen him around at all in ages
 
@SomeGuy busy, alive
 
He gave up his life of javascript for a life of women and alcohol
 
@ndugger Because those are obviously mutually exclusive :P
 
@ndugger the dream
@SomeGuy they are not
but one day we all want to be so rich we can give up the JS
 
Do you guys commonly organize your js under an object? Like having, say something like app.view.constants.lightGrey for a color for instance?
 
@Megaplex i.imgur.com/oJ61gmy.jpg judging by the background reactions, that is not at all what is happening here
 
@Thaenor that should be in your CSS/LESS/SCSS, not JS
 
2/10 on stock image selection
 
@rlemon I'm pretty sure the photos are just for effect, lol. Calm thy tit.
 
3:36 PM
31 secs ago, by rlemon
2/10 on stock image selection
 
@ssube or something like app.model.yourdata.name = [] or whatever.
 
@rlemon Shut up, YOU'RE NOT MY REAL MOM!
 
I'm funny
 
@Thaenor you mean like the model?
 
3:37 PM
@VeronicaDeane Found the gold digger!
 
@ssube yeah, is that how you usually organize it? I've seen a couple examples doing that...
 
@Thaenor we have classes that hold the data...
and a file of LESS variables for the colors
 
@ssube sorry my questions are vague and not making much sense. I've had to do this weird mini project where supposedly it was all about the looks but apparently I also had to set up an MVC structure. MVC is strange in javascript.
 
@ndugger So you did 9:11?
 
Unfortunate timestamp
 
3:41 PM
If anything I would have SMV. Services calling ajax stuff for data, storing them in models that get accessed/changed by the view and then eventually sent back. (again, imho)
 
@Thaenor if you do it weird, it can be, but if you just follow the usual DAO/service/view/(controller|router) pattern it works fine
 
@rlemon That going to be your girlfriend?
 
@rlemon I know many people who would do that
 
brothers wedding, at the end of the night the bridge puffed out her dress and sat in the middle of the dance floor laughing at herself saying, "I'm a mushroom"
she was SUPER drunk
 
3:42 PM
and a cannibal
 
@rlemon Haha, that's great. Least she had fun.
 
@rlemon lol
 
I'd like to point out though, that guy's fireman carry is pretty on point too.
@VeronicaDeane You're near Edmonton, aren't you?
 
lol
no where near it
32 hour drive :D
 
3:45 PM
Oh. Meatloaf collapsed at a concert there last night.
2016 shall not collect another great!
 
this is the third time he's collapsed while giving a show
 
@rlemon what? surely it's more than that
 
@Megaplex that's why my windows were shaking
 
@VeronicaDeane I don't know your exact address so I put listowel to edmonton in google
 
@ssube :(
 
3:46 PM
32 hours
 
wow you're right
 
if you drive all Canadian roads it is probably like 50
 
I bet I can do it in 27.
 
@rlemon yeah the lakes are a huge detour
 
is this older article still valid on es2016 or is there a better summary? 2ality.com/2016/01/ecmascript-2016.html
 
3:47 PM
I just need to stock up on maple syrup first.
 
@VeronicaDeane also our highways are not as well layed out as the interstates
 
btw I posted my previous question on SO. stackoverflow.com/questions/37885144/… please, if you know any d3 wizards out there... this one is giving me a headhacke.
 
@Megaplex I'm driving to MD in September for my sister's wedding and Google says it will be ~16 hours. Interstates the whole way.
so stopping for a nice relaxing lunch and maybe dinner, yeah, 16 hours
 
I'm in MD.
welcome to hell.
 
3:49 PM
could probably stroll through a few parks on the way and make it
 
@ssube 16 is about right, watch out when you go through Ohio though. Those fuckers will write you a ticket for going 4 over.
 
@Megaplex wisconsin is like that
 
can I crash your sister's wedding?
 
@Luggage I had my fair share of fun with my friends while stationed there, but that statement is very accurate.
@ssube Wisconsin drivers are also awful.
 
@Luggage I'm already planning on doing that.
gonna be the best dressed and most drunk there
 
3:50 PM
@ssube Bring the squid hat. Slay all the Bridesmaids.
 
no idea who the bridesmaids are, but given who she was friends with in HS, there's an 80% chance they were at some of our parties
 
So you're saying that the hard part's already done.
 
> So basically you don't like democracy
 
user1596138
@VeronicaDeane lol yea I seen that from this chat awhile back
 
@Megaplex yea, there is folgers in my cup
 
3:57 PM
@rlemon I left my tea mug sitting on my counter at home. I'm slightly annoyed I did that.
 
user1596138
It's what all the tiny 20s are on the American $20
 
@rlemon I've seen that, lol.
I just like to drink tea while at work, it's been how I've been curbing back the lack of soda.
 
!!afk Half Day Fridays FTW!!!
 
@rlemon Screw your happiness. I hope you get attacked by a duck :(
 
3:59 PM
so... if you're using webpack + express, how do you get the server to live reload while also using babel with a loader? I tried using nodemon --watch server --exec \"node -r babel-register bin/start\". Is it possible to get hot module replacement on the server too?
 

« first day (2071 days earlier)      last day (2891 days later) »