« first day (2305 days earlier)      last day (2866 days later) » 

12:00
so valid is: call, assignment, new objects and (infix, prefix and postfix decrement / increment)
also a block
so ist it correct to assume, while javascript does not throw an error by writing an expression such as "4 + 4;", the expression is still wrong
or syntactically not correct.
If you're intending to use it as an expression, remove the ;
It's not wrong, it just doesn't do anything
it actually does the 4 + 4
but the result is just not stored
12:03
yep but its not stored anywhere
Thing is, im building an ide and im wondering if I should leave it as valid or output an error message when the editor sees such type of expressions
I'd expect an interpreter to no-op it.
Right now im thinking of throwing an error to the user.
@Asperger a warning
@littlepootis ya right, good idea.
@BenFortune what's this mysterious 'eventToCall'
12:05
@KarelG Yea, it's ugly :P
@Asperger Why do you feel the need to make an IDE, why not improve on some other IDE
Improve on what, lol
Eclipse?
++[[]][+[]]+[+[]] evaluates to a string "10"
@FlyingGambit I just have some unique features in mind which helps me create code much faster. Gui, Syntax highlighting and transpiler is done.
Would that be an error?
12:07
Webstorm, or idk
Now im on to other stuff far harder : (
To be fair, I don't like it either, but I just ignore that.
@RayPoward wow
@RayPoward what exactly is this?
++[[]][+[]]+[+[]]
I think I read about it on stackoverflow
yeah, it's from one of the questions
1188
Q: Why does ++[[]][+[]]+[+[]] return the string "10"?

JohnJohnGaThis is valid and returns the string "10" in JavaScript (more examples here): ++[[]][+[]]+[+[]] Why? What is happening here?

@Mutch95 The gist one is easier to follow, it's whatever callback function was stored with .on
12:09
it's throwing an error for me and saying not defined
@RayPoward ++[[]] is not valid but ++[[]][+[]] isn't :P
this is hard to understand xD
I mean [] is null. Nothing.
++[[]] is incrementing an array, which doesn't work: ++[] won't do anything either
@BenFortune eventToCall.apply(null, args); needs to be changed to event.apply(null, args);
@Mutch95 Oops :P
12:12
haha
but hey it works!
thanks
@Asperger that isn't null or "nothing", but an array. just an empty array
user6845426
Can JavaScript be used as a functional prog language?
yes it can
I did learn functional. it kind of like a variable is a function that can be called inside a function
ok, MDN doesn't specify that +[] must evaluate to 0, but it does anyway
Even though +true evaluates to 1
12:17
don't think guys here use VS much
Visual studio?
I use Visual Studio Code, but i probably don't have much say as i'm what you'd call a nub
I use VS a lot, but I still google things when I can't get something to work
me in a nutshell ^
12:24
Smart Googling will you make a professional developer
Google driven development
user6845426
^
@RayPoward you need to scan ecmascript standard: ecma-international.org/ecma-262/6.0/#sec-addition-operator-plus
I think it's this one, actually: ecma-international.org/ecma-262/6.0/…
Team Lead thinks she can change the theme of charts using only LESS. AFAIK, we will require JS at some point
12:39
Ok, I see. It's actually +([].toString())
12:49
o/ hey - somewhere in some far away legacy code in my project there is javascript setting the inline style of an element. Is there a way of debugging or finding out where it is being called?
@JARRRRG 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.
uh, ctrl+shift+f?
hah
would return too many results
Hi there, need some help with "flex-layout" for angular2. I'd like to understand how I should do to make my items (md-cards for example) display properly. Actually, I have 5 cards, I use a layout-column for "xs" screen, and I'd like to use a "row" layout for >xs. Problem is that when I use for example "fxFlex.md="33"" for "md" screen, all my 5 items take 33% of screen so I do have a horizontal scroll instead of automatically making a new row... (idk if my question is clear...)
Hello I need ur help
13:02
@Ss_Gupta 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.
@CapricaSix thanks...
Here, my question, visit the question if able to answer it. i sending from my office. stackoverflow.com/questions/42067754/…
caprica is a bot :D
@Ss_Gupta first of all what is your return value if selected date is in the future?
if selected date in future. he/she can submit button
does it work when you select a date in the future?
@Ss_Gupta Eh, why not just use minDate?
13:15
no brother my boss dnt want user side... she said show alert from server side to the user. so, struggling .
> show alert from server side to the user.
tell her she's wrong
user6820627
This is GLSL from webgl fundamentals
      attribute vec2 a_position;
      uniform vec2 u_resolution;
      uniform vec2 u_translation;
      void main() {
        vec2 position = a_position + u_translation;
        vec2 zeroToOne = position / u_resolution;
        vec2 zeroToTwo = zeroToOne * 2.0;
        vec2 clipspace = zeroToTwo - 1.0;
        gl_Position = vec4(clipspace * vec2(1, -1), 0, 1);
      }
now idk why i need vec4(clipspace * vec2(1, -1), 0, 1) why cant i write gl_Position = clipspace?
@rlemon sorry, i asked wrong.. she wants don't disable to select previous date by user.. she wants when user select previous date then show alert "date must be in future" .. and i done.. show to alert.. But question is if they select previous date he/she got alert but stop print previous date in to box(datepicker) .. plz help.. thanks in advance
I have no idea what any of that means
she want stop print previos date in box
13:31
does it print nonstop? like for example 20 lines with the old date?
or do you have like a one liner with that old date and you want it to be removed after a user selects a correct datE?
but printing the date several times does not make sense since your function only gets called on a change event
just want ... if people select previous date (date before today) that not select..
so basically you want the datepicker to reset if a user selects a wrong date?
and what kind of datepicker is it?
question tagged as jquery-ui, so I assume it's that
58
Q: How do I clear/reset the selected dates on the jQuery UI Datepicker calendar?

Cory DanielsonHow do I reset the datepicker calendar values?.. The min and max date restrictions? The problem is that when I clear the dates (by deleting the textbox values), the previous date restrictions are still applied. I've been sorting through the documentation and nothing jumped out as a solution. I ...

13:58
;_;
Started to realize that I'm performing a lengthy data mining operation on wrong parameters.
// redo it and keeps surfing on the web
Anonymous
is this smelly for handling notifications? jsfiddle.net/yem4yxtL/2
@JayIsTooCommon Did you even check what you're creating?
Anonymous
?
Your end result is wrong, check the structure
Anonymous
I know it doesn't include the text? If that's what you mean. Just wondering if the approach is smelly
14:09
Oh, righto 😀
You're making everything a global
Any reason you're not using const/let/var?
Anonymous
Ah no, no specific reason. So I guess notifyTypes should be const and the rest var/let?
const until you can't
In your case, everything can be a const
@rlemon the aunt looks better
s/s.*$/ed better/
Anonymous
@BenFortune jsfiddle.net/yem4yxtL/4, right ?
Anonymous
14:16
ah sorry, notification
Anonymous
yep, thanks :) Anything else you would change?
morning everyone
Anonymous
o/
14:31
@BenjaminGruenbaum, are you a contributor on whatwg-fetch?
user6820627
is there anyone hate js events
user6820627
reply yes and i will count the numbers
14:47
no
You want to go to a hate event for JavaScript?
Can someone help with the syntax here? Just don´t get it working :(
 $.each(response, function(i, item){
                   optionHTML += "<option "+item.ID_USER == 007 ? +"selected" : ''+">"+item.ANREDE+"</option>";
                });
is the index first, or is it the item?
it's index first
Anonymous
@BenFortune ah, can't use const as need ie < 11 support -.-
14:49
haven't used jquery in forever :\
since i included the if condition nothing works
What do you mean not working? What does optionHTML output?
wait, or was it only for the other each?
No, it's both eaches
@JayIsTooCommon var is fine then
Anonymous
okies, thank you for your help :)
14:51
Or babel, but that's a whole nother beast.
its creating a selected field. It works, but now I need to defaultSelect 1 specific user
Microsoft have stopped supporting IE10 haven't they? You should probably do the same
just don´z get all the " and '
I get that it's spam, but who's flagging all the discord links?
@BayLife try removing the + immediately after ?
Instead of: 007 ? +"selected"
Have: 007 ? +"selected"
Have this: 007 ? "selected"
Mb :P
14:54
didn´t work :D
I can't get stagger to work on VelocityTransitionGroup :\
Can you console log item.ID_USER == 007 to check whether you get any true values?
i just went the ugly way now, spend too much time already for the if shorthand :D but thanks
put the whole ternary thing in braces, I'm pretty sure you're comparing it like ("<option "+item.ID_USER) == 007 right now
And 007 gets interpreted as 7 anyway, so either have a string '007' or just use 7
"<option " + (item.ID_USER == 7 ? "selected" : "") + ">" + item.ANREDE + "</option>"
@BayLife best to handle with nodes: const option = document.createElement('option'); option.value = <value>; option.textContent = <textContent>; option.selected = <condition>
then optionHTML.appendChild(option)
more readable
(if optionHTML is a jquery object, use its function to add child)
15:03
`<option ${item.ID_USER === 7 && 'selected'}>${item.ANREDE}</option>`
template strings if you insist on using strings
^-- better, but needs to "babelisfy" it (ES6 thing)
or was it ES5 ?
keh, major browsers support these
!!caniuse template strings
all major browsers support it
ah great. @rlemon solution worked (without babel ;) )
thanks
15:08
you'll need to compile it for IE11, if you care about IE11
otherwise it's fine
no IE support needed :)
I know now how to compile js for IE 11. I'll give you the code
just integrate this function in index.html to get it responsive in images. jsfiddle.net/fbv41g4h
I tested it in IE11 and works great.
user agent sniffing for compatibility isn't going to work out so well for you
the better approach is to test features that are missing and polyfill them
or skip, if possible.
I still need to learn more about polyfill later.
it's just that my client keep giving me bugtrack and I only have so little time.
@jacobian A polyfill is simply a bit of JavaScript code that makes functions that don't exist in older browsers exist.
For example:
15:17
and I always keep stackoverflow open in my browser in case I got stuck in programming. :-)
user agent sniffing is going to probably end up causing you more time spent vs feature detection
Number.isNaN = Number.isNan || function(x) { return x !== x; };
This is a polyfill for Number.isNaN
@jacobian We use polyfill.io
Works great.
cc @rlemon
thanks for the explanation.
@MadaraUchiha I use babel
:)
@rlemon That too, sure. But the babel polyfill is often full of redundancies.
The only bone I have to pick with polyfill.io is that they don't have all the stuff
For example. Object.entries().
15:20
😃 😃 😃 😃 😃
cc @KendallFrey @SterlingArcher
I have the best recruiters
Java is only a small subset of javascript, right?
Java is basic for htm
15:21
javascript is partly made by sun microsystem, that's why they name it javascript.
javascript stole its name to piggy back on popularity at the time
but learning java will develop your brain for other languages.
that could be said for any language
like malbolge
malbolge will rot your brain
15:25
@KendallFrey DID YOU NOT GROAN AT MY STOP SINE?!
@KendallFrey The same could be said for Java
Well, now I get it
-_-
@jacobian we're not talking about coffee
but coffee is delicious
we can talk about it if you'd like?
I like my coffee black
15:27
I take mine with one cream and one sugar
I could probably cut out the sugar tho
How do you call the left and right part of the following expression?
say.hello.world[1] * foobar;
@jacobian Don't drink that racist coffee
right part is an identifier right? What is the left though?
I mean for the compiler.
@Asperger A bunch of things, including three property accesses
Is it correct to say the left is also an identifier? I mean the entire construct
"say.hello.world[1]"
15:30
no
Three identifiers
An identifier is a single token
Is there any name for a chain like that?
foo.bar.hi.cool
In what context?
I know we access an object and then its properties but I though there was a way to classify the group
15:31
At an AST level, it's a property access
which is an expression
good to know so:
(property access) (operator) (integer)
There might be names for it.. say "deep reference" but they don't really mean anything. It's just accessing the property of an object that was from a property of another object
dont know if its worth specifying property access as an "operand" in this case when constructing my AST
probably trivial
@Luggage I like deep reference
I think im going to use that.. That way I have a more generalized segment
@SterlingArcher you meeting up thursday?
@Asperger Just make sure you define it
15:41
@KendallFrey what do you think of the terminology luggage just gave: deep reference?
> they don't really mean anything
I think it fits pretty well into all kind of chainings: object.property or object.property.array etc
ya right...
It's a conversational phrase.
I can use the word frangetic, but it won't be useful unless I tell everyone I'm talking to what it means.
Freygetic*
15:43
"chained property accessors" might be more accurate, but in the case of (property access) (operator) (integer) it doesn't matter. That takes any expression.
What is this for?
This is something that doesn't need a name as it's just using an existing construct multiple times.
Just like 1 + 2 + 3 doesn't need a special name just because it's two binary operators used in one expression.
@Luggage good point. So defining 1 + 2 + 3 as a mathematical expression is useless?
5 mins ago, by Luggage
What is this for?
co-worker just QQ'ed on what i wrote: rightButton.disabled = !!config.rightButton.action; :|
QQed?
crying
complaining
"tears"
15:55
Did you punch him/her?
is there anything bad about using bluebird instead of babel's included promise library for react?
No. Possibly some redundant code in your final bundle.
depending on a few factors
@Luggage i've a plastic axe in my office. So maybe ...
user2620028
@KarelG i think that has been updated lately to TT
16:05
TT ?
tau/2
ah.
i read that as 2x 't' in uppercase
user2620028
16:21
yeah definitely meant that like a text version of a crying emote
user2620028
as was the topic
16:31
@SterlingArcher i.imgur.com/3IxePYy.jpg where you at ?
@corvid I attended a meeting and I try to help rarely, why?
@BenjaminGruenbaum Just wondering if you have any insight into cancellable fetch requests -- I noticed you were in that discussion. Do you think it will be implemented soon? i.e., is there a roadmap for it?>
@corvid there is a roadmap, probably 1-2 months
That's like, the one meeting I was in, lol.
I noticed, it is a super useful feature though, it's making my network-heavy react interface behave super sluggishly :\
That's due to your nasty polling
16:36
@Luggage unfortunately, the back end team is always super busy, so hard to get any sockets added (somewhat large task)
@corvid which is why I went so far as to attend a meeting with a WG I'm not familiar with. To be fair it was fun they're all really nice people.
I feel like I see the same JS people everywhere on the internet, like JavaScript is somehow magically written by like twenty people
@corvid like, 200ish?
I see @BenjaminGruenbaum anywhere that Promises are mentioned.
I would say anything asynchronous (in javascript) for that matter. Probably the authority on it at this point
16:39
or mobx-related, these days.
his name is the most used word on mobx.js.org
second only to "magic"
@BenjaminGruenbaum yeah I just mean when I look at github issues I'm like "oh that's the guy that wrote this article", or "oh yeah that guy contributes heavily into Bluebird too"
Michel is the dude behind mobx, I help with some stuff sometimes. Kind of like bluebird except in much lower velocity.
@MadaraUchiha rewrote the mobx build, lots of room people are involved in this sort of stuff - I recommend it.
😒 i just got told im being lazy for working from home in the mornings a couple times a week by my sister in law
Considering how much work I actually do it kind of hurts
tell her to fuck off.
@SterlingArcher why do you think she feels the need to say that?
16:41
@corvid It doesn't have to be a heavy contribution
Because Americans have this thing where anyone not commuting 2 hours to work in a cubicle for 9 more is lazy.
@SterlingArcher onsite != more productivity
@SterlingArcher tell her she's being lazy for butting in on your life and not minding her own fucking business
Small things like documentation, build, CI fixes are appreciated
She jelly
16:42
And don't need too much extensive knowledge of the project
idk.. she also likes to tell me i can't wear jeans monday through thursday
I can't tell her "I'm an engineer, nobody cares" because it'll just start a fight
Do you live with your brother?
Also, when we had our session, we collectively solved 7 or so (@BenjaminGruenbaum please correct me) issues, some in the actual code for MobX
Not anymore
> You’re slacking.. no one here gets a couple times a week. I say this as your sister, but it looks pretty lazy.
you don’t care, that’s fine. I’ll stop bringing it up. I’m trying to help. But like I said it’s your head.
Like how do I respond to that without starting a fight
So don't feel discouraged, it's just code, you can dig in and fix stuff just like any other codebase.
16:43
@SterlingArcher you don't. she clearly wanted to start something
> "no one here gets a couple times a week." ??
> you don’t care, that’s fine. I’ll stop bringing it up. I’m trying to help. But like I said it’s your head.
that's stirring the pot
not trying to help
de-friend her. :)
@SterlingArcher Send her a picture of richard stallman and explain that this is the standard that was set by our forefathers.
Also, I work to live, not live to work. I understand getting involved in work you love putting in lots of hours because you enjoy it, but I'm not going to bust my ass on boring shit, either.
16:45
I'm actually pretty down now. I just worked myself into a ball of stress for the last 3 months, created a fucking 24% productivity increase and im lazy because my already online meetings I do from home
!!afk fuck this
assuming you're slacking === condescending
telling you "you don't care / I'm just trying to help" === she honestly doesn't think that there is any room for her to be wrong.
@SterlingArcher why do you think she makes these remarks?
@BenjaminGruenbaum she doesn't see me as an adult because at home I'm pretty lazy
@SterlingArcher "I appreciate your concern and you sharing your experience with me, I'll take that into consideration and think about it. "
I lived with her for 3 years so I give her that, but home me is not work me
16:47
@SterlingArcher Or she saw you dancing at her wedding
@SterlingArcher from what I recall, they also tried to parent you while you were roommates
If someone criticizes you in private - always thank them. It's the only logical action.
You can think their criticism is stupid, or ignore it altogether, or apply parts of it you like - but in terms of relationship any other action is silly.
> I appreciate it. I guess its not the best idea even though its cleared. youre right though, even if its productive facetime is needed
16:48
oh my gawd you're English
meh, if someone called me up out of the blue and criticised something that isn't their business and was insulting about it I'd tell them exactly why that isn't cool and where they can take that type of advice in the future
Start the fight!
Sorry, that actually works, I only meant to use you're and not your since you used its for it's.
@rlemon which is helpful how? She didn't do it in public.
i'd just not respond
@BenjaminGruenbaum lets them know I don't appreciate their unsolicited bullshit
16:49
What exactly do you think the motivation is?
idk man.. I'm getting tired of being criticized for my job ethic
@rlemon what do you think will cause more criticism of the two options? Such criticism is stupid anyway.
If you want to help someone don't tell them what they're doing wrong, tell them how you think they can improve.
@BenjaminGruenbaum I honestly couldn't care. if someone came to me with that type of crap I wouldn't want them coming to me any more period
"You're too lazy" never helped anyone, it might be well -ntentioned but it comes off as an insult above all else.
@rlemon and that's fine, but I don't think fighting with family over them being nosy is especially great advice.
Lazy programmers are best programmers.
16:52
Again, YMMV.
@Luggage Haskell programmers are the laziest, because their code is so lazily evaluated it is never run.
I don't think being family is an excuse for acting shitty -- I have no problem disassociating myself from family.
@Luggage I dislike that saying
If I was actually lazy I wouldn't care, I laugh and agree with her.. but she knows I'm working my ass off
I have to neglect my girlfriend almost half the week because I take work home with me
@SterlingArcher brushing it off is only inviting more of the same
@rlemon I do, I love my family.
16:53
@BenjaminGruenbaum Not never, just after the program returns
I love people who love me, and who respect me
I don't have any inherent need to love abusive family
that's just some bullshit
I love my family too, and my family is already torn apart enough without me creating a rift between myself and them because they can't respect me as an adult
Dishing out unsolicited advice isn't abuse.
If this is a one-time thing, then do what Ben ways. If this is regular, do what Lemon says.
it is when the verbiage is abusive, and when it is recurring and damaging his spirits / emotional state
16:55
I think you're portraying a demonic representation of his sister.
Am I just being too sensitive to let being called lazy get to me?
I've fought with my sister a few times, for "good" reasons, it never really helped anything ever.
@SterlingArcher no.
@BenjaminGruenbaum in lemons defense, it is borderline recurring
It's very annoying, but the interesting thing is why she called you lazy. Just telling her to STFU won't help anything.
16:56
I'll tell her for you.
What's her number?
Never thought I'd see @Luggage trying to pick up @SterlingArcher's sister.
@BenjaminGruenbaum I'm not portraying anything. I gave my advice given the prior knowledge he's shared with me about his relationship with his siblings and I'm sharing personal opinions on how family isn't a free pass to be a dick to eachother. two separate points. however, with that said, you can tell someone to stop being passive aggressive / stay out of your business without starting a fight.
he needs to stick up for himself.
I will say this: the moment i even nicely ask her to stop, I can guarantee it will start something
However, I love her to death. She is my sister
so lay down and let it keep happening?
Eventually I'll snap. I might talk to my brother about it and see what he thinks
The issue is we work at the same company, but she's a data scientist, not an engineer. So she things that all the little scrutinizing things she has to deal with I deal with too
So since she can't work from home in the mornings, she sees it as I shouldn't be because I'll get into trouble.
It's all good intentions, but she just says things in an "im right and you better not tell me i'm wrong" kind of way all the time
16:59
17 mins ago, by jake
She jelly
You're this kind of engineer, right?

« first day (2305 days earlier)      last day (2866 days later) »