« first day (2217 days earlier)      last day (2725 days later) » 

9:00 PM
it's a single postMessage on click
I don't see how it could hurt
 
@BenjaminGruenbaum no more jokes? 😢
That's all we have left..
 
did you see my pr lemon?
 
seems to work well
@bitten which one ?
 
@Luggage only Trump is allowed to joke, he has the best jokes.
 
#37
 
9:02 PM
They love him
:)
 
@bitten Semi-colon?
 
this thing
:
 
That's a colon
 
ohh yea, I haven't gotten to that ye t
 
yeah.. it is
 
9:03 PM
haven't decided if it's the best solution yet
 
-________-
 
hahaha
 
thinking about bens youtube thing and if I want to add an option to keep the video playing
 
Also give includes some love, you heathen
 
probably do
 
9:04 PM
@BenFortune does babel transpile it?
i left it out for support
 
Doesn't use babel
 
array.includes
 
@rlemon How do you push stuff to the store?
 
includes needs polyfilled, but not transpiled.
 
does babel polyfill it?*
 
9:05 PM
no
 
alright
 
@BenFortune it's a stupid process
 
well.. maybe.. there might be a transform that includes it, but:
 
don't think it is possible through hooks
 
import 'core-js/fn/array/includes'; //will put it on the prototype, see github.com/zloirock/core-js
 
9:06 PM
you have to go to the store dashboard and there is like 3 interfaces and a zip upload
 
@Luggage thank you!
 
Maybe add a step to gulp to do it?
 
hrm
 
although it looks like lemon took out transpiling
 
9:07 PM
I'll check that out, thanks
@bitten because it isn't needed
 
async/await needs transpiling.
 
@bitten core-js is what babel uses for some polyfills and there might even be a way to have babel do that for you, but that'll work w/ or w/out babel
 
@Luggage i wasn't aware of core-js, and i like it
@rlemon alright. so i'll leave my pr until there's been a decision, and so i'll leave the question of includes too
 
@BenFortune okay, it's good. I added a option so you can toggle it
 
Nice
 
9:12 PM
extensions are fun
@BenFortune fun fact: .some is faster in this situation.
not that it matters, just thought it was fun
well, rather, it depends.
.some vs .includes for an item near the beginning of the array, includes wins. near the middle end for even a 5 item array some wins
nano-optimizations 😃
 
😛
 
@rlemon what?
I'm not sure you're measuring what you think you are.
 
are you confused by the results or my wording?
 
@BenFortune the joke is that the key value is the same for semi colon and colon
 
async/await works with a flag in node 7
 
9:22 PM
@david not really. It runs but it leaks.
@rlemon I don't think that makes sense (some being faster) and I find the optimization weird since a for loop would beat both anyway.
 
well you can easily time a shitty benchmark for both
there is a difference and it is repeatable
 
heh, angular 3 soonish? wow
 
@BenjaminGruenbaum damn, really? how badly?
 
@david enough to make you transpile until 5.5, I can dig up the commit if you'd like.
 
Thanks for the heads up, we've just been discussing internally how to start cleaning up our node code
I was advocating the flag, but I guess that's not a great idea
 
9:26 PM
@david you can use it now, transpile until 5.5 (either 7.x or 8.0) is merged and live with it.
Yeah, it's a damn shame.
 
the way they've set up our backend code there is no transpilation right now, maybe i'll suggest using the flag for development and transpiling just for deployment
what does 5.5 refer to?
 
@david v8 version
Node 7.x so far is built on top of V8 5.4, we might upgrade it to 5.5 if we're able to do so without breaking the addons API.
Likely 8.0 will run against 5.5 which will include this. Hopefully also async_wrap for promises which will let us throw on errors. I'm rooting for real async stack traces but it's not a priority.
Going to beer with Ben Lesh next week and figure out what Rx needs in terms of instrumentation for better debugging experience - going to see how I can work to help.
 
damn v8 has an active commit history, there's no way i'm finding them myself
 
Let me find it for you, I tag interesting commits.
 
how far away is 8.0 though?
 
9:32 PM
I can't really answer that, v8 5.5 ships with the next Chrome and out of beta/rc, IIRC at the start of December so at least that far.
Nevermind, it was released 16 days ago.
 
@bitten not as simple as you thought eh? 😛
 
@rlemon haha.. i can't imagine what else must you have gone through :P
 
hack the planet!
 
!!giphy hack the planet
 
@BenjaminGruenbaum ooh, that is interesting. Probably an unintended side effect of the one line arrow syntax automatically returning?
 
@rlemon I can't find .includes :O some is just a for loop, I can find includes for an array.
@david it's basically so that the chain is broken - it wasn't unintended just prematurely used.
But yeah, in principle IIRC that bug was because the promise was chained. Native promises leak this way, it's funny.
Bluebird promises keep the pointer from the other way around, so they don't leak.
 
@BenjaminGruenbaum i probably wouldn't spend time on it. it was in jest, I test nano-optimisations between functions if it strikes my interest. which it often does.
 
@rlemon nano optimizations are very very hard to test, I usually just --trace-deopt / --trace-hydrogen
Also --print-code
 
I use console.time and keep running the test
if a is faster than b every time, I have a result
 
9:40 PM
@rlemon what makes you sure v8 doesn't cache the result?
 
they differ?
you're reading way too far into this dude
 
No, I mean for .some.
Wait, that's ancient, I was looking for the slides one
 
28 secs ago, by rlemon
you're reading way too far into this dude
23 mins ago, by rlemon
not that it matters, just thought it was fun
22 mins ago, by rlemon
nano-optimizations 😃
 
I'm not actually using the code anyways.
 
9:42 PM
I'm not saying it's not fun, I'm saying I'm interested in the result too :P
 
besides, shit like this is likely to not be true in the next build.
so I never bank on anything
 
Not every time when I say "let's look at that" after you say something it's criticism, it's curiously.
 
I use the most readable code
 
It's still interesting to mess with.
 
how do you measure the size of text in a div? Div is adding a ton of extra padding and I need to remove it
 
9:43 PM
Nothing wrong with messing with shit to figure out cool things.
 
well yea but it wasn't even a real test, I know benchmarking like I do is flawed.
 
@corvid with the chrome devtools, in styles, there is a box showing you that.
 
console.time('includes');
[1,2,3,4,5].includes(val => val === 5);
console.timeEnd('includes');
console.time('some');
[1,2,3,4,5].some(val => val === 5);
console.timeEnd('some');
(history in a console even between reloads is excellent btw, can't love that enough)
 
@rlemon wut
 
@BenjaminGruenbaum the border, padding, and margin are all 0. There's still extra space being added
 
9:44 PM
@rlemon oh wow, the array is of length 5, the JIT doesn't even warm up - I wonder why it's faster even in a measurable way - do you get the same result if you switch the order?
@corvid check overflow.
 
@BenjaminGruenbaum switching order does make a diff
some is faster in that test with looking at 3+
includes at 1-2
 
@rlemon I meant literally testing some before includes.
 
@Zirak this all started because bitten wrote a pr and ben said use [1,2].includes(check)
 
console.time('some');
[1,2,3,4,5].some(val => val === 5);
console.timeEnd('some');
console.time('includes');
[1,2,3,4,5].includes(val => val === 5);
console.timeEnd('includes');
 
ahh, no I did not
@Zirak so I got bored/idk and decided to test that condition with .some
then decided to see which was faster
now we're talking about it
RoboGist is my new userscript/style manager which uses gists as a storage medium. Please leave feedback. ❤️
@all ^
 
9:49 PM
@BenjaminGruenbaum this is the problem. The dotted border is where the div is. There's tons of space between the div and the text. I want the text to fit the div precisely
 
@BenjaminGruenbaum some: 0ms includes: 0ms
lol
 
can anyone tell me why its saying I cant use addEventListener?
 
you don't have an element
document.getElementById('thisIDDoesNotExist') returns null
 
OMFG...
time for a break
lol
 
document.getElementsByClassName('done').src = "images/delete_hover.png"; will also not work
Lots of weird code in there
 
9:53 PM
@ssube I love this guy
What if a baby found your e-cig took a hit then decided he or she wanted to join Isis. How would you feel?
 
!!afk 👪 ⌚️
 
user1596138
@BenFortune Wut
 
user1596138
What's the deal
 
Dno, just got an email about it
 
user1596138
9:57 PM
Trying it now
 
I already have it so someone can have my code, redeem on steam: FZIVB-7W4H7-IE3TJ
 
Anyone have ideas for this? I have an icon image being called via javascript. I want to change the image on hover which I can get to with css easily but since the image is being called with javascript, the on hover only overlays the image instead of switching it. Any thoughts on how to handle this other than writing a javascript mouseover function?
makes me think I should start using svg for icons for easy color changes..
 
wat
 
The only reason we didn't go with SVG for our current project is for performance. The additional DOM presented by SVG icons wasn't acceptable, so we used an icon font
 
Check where the javascript is actually inserting the image and set it to display:none when you're hovering :P
 
10:01 PM
ahh thats a good idea
@david that works but then it wont display the other image on hover lol
 
...
don't set the WHOLE thing to display none :P
 
loool
 
@rlemon yeah it's too tough
 
@bitten rlemon is afk: 👪 ⌚️
 
⌚️ to get a 👀
hmm watch is 👀
interesting.
 
10:14 PM
:sleeping: and :zzz: both match two different emojis, and the first doesn't display for me
 
😴 😴
Well @rlemon does have code to "remove duplicates"
 
Not code, plans.
 
@rlemon Sorry a "todo"
 
also, doing one more check on submit would make :controller: impossible to submit unreplaced, right?
or is there a way to escape it
:controller: that works
 
Can't check on submit unless I replaced the input.
 
10:17 PM
@rlemon there is a hacky way..
 
See the comments I made in bittens pr
 
i don't like it but it's possible
 
@bitten replace the input. Fire off to it.
Tho, idk if it's worth it
 
probably not, it's not that hard to just press space knowing it's expected of you
 
@rlemon yeah i thought that too, both options have the same downside that there are other events bound to the input.. so it's possible to break something, somewhere
 
10:19 PM
I can parse on : and space. That should be okay.
Like bittens original idea
 
Won't hit everything. Not all triggers end with :
 
have you done any performance testing on the emoji translator? :p
 
The best solution is to parse words as I type them. Not after they're typed.
But that might lag like fuck
 
you could just throttle it on keypress
 
10:21 PM
yeah, simple debounce.
 
anyway, i'm off
bye
 
Throttles don't work when there is a submit event. We're all fast types.
Typers
 
75ms
but yea
won't be perfect
 
I feel like im making this on hover way harder than it has to be lol
 
probably
what exactly are you trying to do? swap image A with image B on hover?
on hover of what?
 
10:25 PM
just an icon image
png
but the issue is
 
swap classnames
 
im appending the image for every list item via javascript so I cant figure out how to swap the images rather than overlay it
 
yo
 
not sure i understand
 
ok
 
10:26 PM
so I have a list app basically
 
isn't swapping an image as simple as... replacing one with another? either by replacing the element, changing the src, or changing a classname?
or the background position if dealing with sprites
 
I thought so but with how I have it handled its just overlaying it..
so pretty much
 
so absolute position, on top of the old
 
@Tantrik are you new to DOM manipulation?
 
in that case you should only need to change the display style,
by adding/removing a class
 
10:27 PM
@taco new to all javascript
 
KevinB's suggestion is good
 
ahh I found a problem
 
I had absolute positioning on it
it's blending with the other image rather than overlaying it its so weird lol
 
Javascript is imp to dimp, the ladies pimp, the women fight for my delight. but I'm the grand master with the jQuery, that shock the house for the young ladies. 🎧
 
10:30 PM
@taco
@taco not that new haha
 
!!afk gym
 
"Weird" is a word for "I have no idea what I'm doing"
@Tantrik oh ok
it sounds like you were saying Javascript === DOM
 
💲(💲)
 
stop mocking jquery
 
@Tantrik blending... you mean it has opacity?
and the old is showing through the new?
 
10:32 PM
its not let me put it into a codepen
 
Weird.
 
its really weird it has my head spinning lol
 
hey i'm mocking the chrome console not jquery
 
>_> did you just make me crash my browser tab?
 
so its a bit messy on there but
 
10:37 PM
haah
 
the image thats appended on the right side of the added list items
 
jquery inception
 
how do I change that image, any normal method I try it just plops it on top and you can see the previous image
 
$($) executes $ with $ as an argument, which executes $ with $ as an argument, which executes $ with $ as an argument which...
 
💲🌜💲🌛
 
10:40 PM
Yeah, that's what I meant by mocking
the combinator const M = (x) => x(x) is called a mockingbird
 
😴
@Tantrik i just see a bunch of broken images
 
@Tantrik have you tried doing whatever:hover img { display: none}?
so you hide just the child image?
 
.done:hover {

  background-image: url('http://www.placehold.it/50x50');
}

/* that of course won't display on top of your <img> */
I'd suggest getting rid of the <img> and doing it all in css
then it's just a matter of changing the url in css on hover
🍤
 
11:06 PM
can I do something like if (element === undefined ) { }
or how would I go about targeting an element that is undefined
on purpose
 
not sure i follow
 
well
I have a UL
 
if (!element) // or if (element)
 
when loaded there are no list items eg that list is undefined
it becomes defined when a button is clicked so im checking whether or not its defined yet
ah yes maybe that
 
@Tantrik Have you fixed your hover thing?
 
11:09 PM
@david I moved on for now - spent too long on it lol
 
.done:hover img {
  visibility:hidden;
}
do that
 
yes I've gotten that to work
but I can figure out how to call the image on that same element after calling it hidden
because I want the hover to be a background-image: url(); thing
 
add a different css class
It's css classes all the way down
 
that would require me to span another class to everything and tbh that sounds alot more complicated lol
 
@Tantrik what? is this not what you want? codepen.io/anon/pen/zorddJ
 
11:12 PM
in Javascript because of how that image is being called
@david yes yes and I have been able to get that to work, the problem is when switching the image, the old image doesn't go away it sits there and creates a really weird effect when hovered
 
@Tantrik I can't see the old image when i hover :S
 
because thats a solid block covering it
when I use pngs with blank space its WEIRD
maybe I need to go to jpegs
with white backgrounds
or the same color backgrounds already set..
I like the transparency of pngs
 
@Tantrik ... if you make the original image not visible, that won't be a problem...
 
Yeah @Tantrik I don't think you're getting it. In that link I sent you the old image DOES go away
 
I'm at an aws security keynote right now :D
 
11:20 PM
rip xD
 
@Starwave 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.
 
they've been spamming my inbox with that for a while
 
My brother works for AWS so he just got me through security no problem
 
@KevinB @david hmm, idk why I can't seem to get it working on my end - gonna see whats going on here thanks
 
@Tantrik did you add the style i pasted?
 
11:29 PM
ahhh
I was overthinking it..
I kept trying to use display:none and couldn't get it, visibility seems to do it!
thanks guys appreciate that, idk why I couldn't figure that one out lol
 
display:none makes the image take up no space, so the parent span collapses to nothing and your background image won't show
 
thats a great explanation as to what was going on thanks!
 
@SterlingArcher Have your brother get you into Canada
 
@SterlingArcher bro, so after the injury I basically didn't use my left arm for a year... Shit messed it up good.
Targeting shoulders now.. left side is dead
 
o_O what happened rlemon?
 
11:38 PM
freak masturbation accident
 
if something were to return [] would that be 0 or null
 
@Tantrik Still no. The answer didn't change since yesterday.
 
that's an amazing question
 
if you return empty array, you will get an empty array
 
@Luggage never got the answer from yestery lol
yesterday
 
11:39 PM
pretty sure you were the one we were telling that [] does not === null
 
doesn't mean I instantly understood what was happening - sure I read it
 
But no. an empty array is it's own distinct thing. It is not a 0, it is not null. It is not a cat.
 
It's not a pupper.
 
lmfao
not a pupper
gg JavaScript im done
so to check against an empty array could you do something like if (emptyArray === "") or what you do if (emptyArray === [])
sorry if I'm far off
 
if (array.length > 0)
 
11:42 PM
sorry, I forgot to mention that empty arrays aren't strings, too
 
arrays = arrays got it lol
 
xD
 
an array is an object. two arrays are different objects, even if they are both empty
 
you can do .length to check if an array is empty?
i was trying to do .value T.T
 
They may be similar, but they are as distinct as you and I.
 
11:43 PM
yes tantrik
 
well, that does make sense.. let me play with that :D
 
@Tantrik bookmark this HTML e-book eloquentjavascript.net Great quick reference
 
swoop got it!
thanks again @Luggage and @Starwave
 
:<
 
haha @taco you 2 bb
 
11:46 PM
:>
 
coffee time!
 
> and the wonders of the digital.
 
@Starwave agreed
 
what is that supposed to mean?
 
context?
 
11:48 PM
@Luggage the end of the first sentence at eloquentjavascript.net
I think they a word
 
@david fell. Broke my wrist and severed a tendon
 
It's like 'and the wonders of the mind' or 'and the wonders of space'.
 
Boooooo g recovery
Looong
 
:( I'm sorry to hear that
 
stop typing then, your arms are aching as they are :D
 
11:50 PM
maybe he is using his nose
 
oh, your typing with your feet
lel
 
@rlemon ouch
 
FINE SUBLIME TEXT, DOWNLOAD YOUR STUPID UPDATE SHIT
just get off my back
 
heh
 
respect for sublime text ^^
 
11:53 PM
it waits till you start typing before showing the popup too, so it's extra intrusive
 
:D
 
@david was almsot two years ago. But the tendon they won't fix. So. Yea.
Now I'm back in the gym trying to re-strengthen it
 
won't fix? are they unable to re-attach them?
 
Low success rate. 5 doctors said no
 
The parts aren't made anymore.
 
11:55 PM
damn, that sucks
 
I have Form with 2 fields. A and B. At all times A = 2 * B. If i change A, then B should change. If i change B , then A should change. I am looking for a clean way to link fields. My searches lead me to one-directional dependency, but I need this to be bi-directional. Thanks.
 
Sounds like elementary level math, shouldn't be hard.
 
you will need to use some 'programming' too
(what are you using? vanilla js? jquery? angular? react?)
do you have some kind of data store?
what's your mother's maiden name?
 
@romaninsh Try breaking the problem down into multiple simpler problems. That's what programming is all about.
 
can anyone really ever even?
 
11:59 PM
^ maiden :D
 
@KendallFrey, I have no problem implementing it in a "dirty" way with 2 event listeners, but i wonder if there is a better way to link fields into some sort of assertion.
you know - reactive programing and such... no?
 

« first day (2217 days earlier)      last day (2725 days later) »