« first day (2202 days earlier)      last day (2746 days later) » 

8:00 PM
@Trasiva what a fruit
 
user1596138
@ndugger That was literally the question
 
wtf
 
@Trasiva eww
 
@Jhawins Did I answer it?
 
@KendallFrey Give 'em points for originality.
@BadgerCat Oh hai Badger!
 
8:02 PM
hai bae
 
user1596138
@ndugger Sort of
 
@KevinB can you go into a bit more depth with your dummyOnce function
 
eh, it was a poor idea
better to do something more like what... whoever it was proposed shortly after
42 mins ago, by rlemon
function h() {
  let n = 0;
  return function() {
    if( n > 1 ) return thing();
    n++;
    // other things.
  }
}
 
but n never gets set back to 0
 
8:09 PM
does it need to?
 
@SterlingArcher jesus christ I've stepped into the 1990s
rekkit.com
 
if it does, then do so at return thing();
 
im going to build a ajax form with captcha i find this captcha.php. now i need to refersh captcha when each time that form submit to server to a button which can referesh captch. the captcha.php file return a picture. how can i refersh it
this is my efford gist https://gist.github.com/anonymous/39430bcc6bbd4472379b43d3bb9a24f0
 
@ssube ohh man this will probably nuke my server with more than one person on it live.rlemon.ca
in lieu of figuring out streaming I send each frame as a full blob
 
@rlemon nice quality moustache
 
8:12 PM
least cool shirt I've ever seen
except for the ones i wear
 
aaand down
 
@KevinB the idea is that I create a new function from h() and call it say 6 times
it should run thing() 3 times
 
it's super fragile.
 
Hey how do you... unduplicate a question?
noticed this was marked as a dupe, but it's asking something different (even though the title is to the same)
54
A: Dynamic favicon with count (like Gmail)

LoktarYou can make an image with the canvas element, and then just replace the current favicon. Check out the following link for a good explanation on it. Reference Code is from the above reference. Markup <link id="favicon" rel="icon" type="image/png" href="image.png" /> JS (function () { ...

well that's my answer, how I noticed
 
8:14 PM
but that question is asking basically how to change a favicon on the fly
with image manipulation
whereas the other is talking about changing between static favicons
 
welp, back to the drawing board.
 
@KevinMurphy Yea, so before you return thing(), reset the value of n to 0.
 
nominate for reopening?
I just did that lol I never usually argue duplicate questions but meh
 
o hai, my code
@KevinMurphy hehe
 
@rlemon yes thanks i appreciate it!
 
8:17 PM
I'm just chuckling because you're in a convo with the other kevin instead of asknig me :D
 
i was drawn to another person named Kevin oops
 
@SterlingArcher I was watching that live, he's really standup in all other answers, he knew exactly how to respond to that
@KevinMurphy #KevinLivesMatter
 
so yeah i reset the value of n to 0 before returning thing() however, thing() only gets called twice of the 6 times i run it
 
@Luggage almost quittin time
 
@KevinMurphy the if condition logic isn't quite correct
` > 1`, meaning it has to be 2 before it becomes true
 
8:19 PM
@SterlingArcher boner inducing.
 
i was thinking i could just use ==
 
function h(thing, otherthings, limit) {
  let n = 0;
  return function() {
    if( n > limit ) { n = 0; return thing(); }
    n++;
    otherthings()
  }
}
addEventListener('change', h(fn1, fn2, 10));
but probably don't do it exactly like that
 
i wouldn't use n = 0, because then it becomes confusing
h(x,y,1) would run twice
 
fair enough
 
so just 1index it
 
8:21 PM
actually
it would run once
 
if( n == limit)
 
=== yea
 
I'm using > not >= @KevinB
 
@rlemon right, so if it runs 6 times, and the limit is 2, and it starts at 0, it's 0 1 2 *3* 4 5 6 only being called once
 
if the limit is 2, you'd get 0, 1, <fail>
because 2 isn't < 2
I don't see a problem
wait
that test is fucked
dammit
 
8:25 PM
=/
 
Omg chrome just crashed and now everything is gigantic -_-
Tabs and everything
 
quick, put it in little blue pill form
 
@KevinB my bad, in my head the entire time I had the proper condition but I realize my code is wrong.
I was arguing with the basis that if( n >= limit ) was what my code was doing... brain fart I guess
 
@Loktar I'm a huge Trivium fan but I miss his screaming
 
it works, if i store the restulf of h(...) and execute it 6 times
with a limit of 1
 
8:27 PM
I'll be damned if he's not a talented guitar player though
 
1,2,**3**4,5,**6**
 
well, works, but with the same problem :p
 
then I misunderstand the issue
 
yeah that does it
your new one fixes it. Basically the same effect as == or ===. I still prefer >= though just because
 
@rlemon @kevinb thanks friends :)
it's been a pleasure watching this happen
 
@Trasiva despite what 4chan says, there are women vapers who think it's 'cool' too.
vaping for looks is the new smoking to be cool.
the subculture will have its own little corner to breed
 
@Trasiva that tattoo actually looks good
 
@rlemon Oh, I wasn't mocking vaping. I shared it because I thought it was funny.
Y'all do you.
 
8:37 PM
is the watermelon mooning me
 
Yes...that's exactly what's going on.
 
seriously or are you being sarcastic
 
I vape to keep off cigs
 
I vape for the memes
 
8:41 PM
@Trasiva yea I'm just poking at the whole "ohh you vape? so you must not get laid" meme
 
what happened to version control on questions
 
if bronies find love, vapers will too :)
 
you used to have an edit history but i don't see it anymore
found it nevermind
 
@ssube ha! from the earlier convo. "I'll be smart and write a compliant JSON parser" _ => null "done"
 
why are the pageup and pagedown keys reversed in man command page?
this is retarded
 
8:48 PM
@SterlingArcher Get to the caw, naow!
 
no, the looseness on the spec for json parser is retarded
> A JSON parser transforms a JSON text into another representation. A
JSON parser MUST accept all texts that conform to the JSON grammar.
A JSON parser MAY accept non-JSON forms or extensions.

An implementation may set limits on the size of texts that it
accepts. An implementation may set limits on the maximum depth of
nesting. An implementation may set limits on the range and precision
of numbers. An implementation may set limits on the length and
character contents of strings.
so.. basically anything
yes
 
@rlemon you are correct the JSON standard is retarded
 
@rlemon god dammit
 
8:58 PM
rlemon I don't think you ever responded what version of linux are you using?
 
persistent af
 
!!afk Dammit, fucked my back
 
how would i make the image height / width fill whatever size the span is?
<li><a class="rcpColorBox" href="#" title="#FFFFCC" style="background-color:#FFFFCC;" tabindex="-1"><img src="/images/buttons/check_mark.png" style="width:19px;height:19px;/><span style=" width:19px;height:19px;"=""></a></li>
i need to remove the hardcoded height width on the image element because the swatch sizes render different in chrome vs ie
 
@JoJo can you put the image inside the span?
hmm on 2nd thought I'm not sure if that is valid code
 
possibly, yes I am seeing that too, looking..
 
9:09 PM
I what just use css and do something like
span, span img{width....}
 
found the missing quote, sooo helpful sometimes just bouncing a question, this helped
 
@rlemon I don't think you ever responded what version of linux are you using?
like your new gravatar by the way
 
One of the biggest things that has stunted me in my coding career
is trusting ANY code someone else has written
i end up spinning my wheels, i am better off immediately rewriting anything assigned to me. What say you guys?
 
@KendallFrey you aint kidding ^
 
i'm persistent af
 
9:21 PM
wow
a mouse just ran out under my sofa and under my desk
looks like i have mice now
 
@mahdiazarm 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.
 
9:44 PM
@bitten get a cat
i had mice in Brooklyn then got 2 cats they killed 2 and now no more mice
 
@JoJo Knowing what to trust is a skill, too.
 
someday I will be a kitty cat
 
a hwhat?
 
Ah. A furry.
 
9:58 PM
@rlemon you have been dipping in the bucket of batshit again, looks like you found the "otherkin"
@Luggage unfortunately, no
 
@tereško what are you on about now?
 
@Luggage this might help: youtube.com/watch?v=8y1GbBhu9hA
 
What do I need help with?
 
@rlemon I was talking about your last link
@Luggage I am just trying to curtail that belief in humanity you seem to posses
 
sriracha beef jerky is both delicious and gonna hurt in the morning
 
10:00 PM
You'll need to be more clear.
 
just watch the first minute
 
ok, i did. Why did I do that?
 
i'm still working on my iframe setup, but now i'm trying to work around CORS restrictions, since in dev the iframe's origin is localhost, and the url of the fetch is, well, not localhost
 
just tell me what "belief in humanity" I "posses" that you want to "curtail". Why do I have to guess?
 
should i expect to be able to do ajax calls from localhost -> domain of parent window?
 
10:06 PM
i doubt it.
 
if not the same domain, you gonna have a bad time
 
that would make iframes a huge security hole
 
so now i'm thinking make a proxy server for dev
is it possible to send http-only session cookies of the parent window to a proxy from an iframe served from localhost?
 
10:49 PM
wtf does unix have to be so non standard
sometimes it is Ctrl+C and sometimes it is Ctrl+D
and then for Vim and emacs it something else completely different
 
I haven't ran into ctrl-d..
to do what?
 
run calc
to exit
 
ohh, you mean why are different PROGRAMS not all the same..
that's nothing to to with unix.
 
no there should be a standard that says how to exit apps
just a general standard
 
Welp, there isn't.
it's too late.
 
10:50 PM
I'll create a new standard!!!!!
 
is immutable js worth learning / using? I'm playing around with a smallish react project (mostly a learning experience) but am having trouble getting it set up with redux
 
OK, I'll go let everyone in the world know that they should learn @Williams new standard.
@joshhunt immutable.js is a useful tool sometimes, but using it with react for state management is a bit 'raw'
 
@Luggage what operating system are you running
 
osx at the moment, but I also have a windows machine and run linux servers.
er, i mean "macOS"
 
hmm interesting well I just have to convert OSX first
linux will be easy being open source
 
10:53 PM
what does raw mean in this case? I'm kind of copying the set up of react-boilerplate but setting everything up myself from scratch so I understand what everything does
 
@joshhunt it's a low level tool and not to be compared to redux, mobx, etc
in my opinion, at least.
 
right, in my case I'm trying to get it set up so that it works with redux. There are some tools that help (such as redux-immutable) but am having trouble so I am just wondering if it is worth pushing through or just drop it
TBH I don't think I even properly understand what it does, that was the next step after getting it set up
 
You see the redux examples there they make new objects for the reducer results?
// e.g.
return { ...state, newValue: 42 };
 
yup
 
welll, immutable.js is a library for working with immutable value like that.
 
10:57 PM
ah ok, so it makes using reducers easier?
 
instead of using object-rest-spread to clone, you use an immutable type.
it makes sticking to the rule of "always return new value, never mutate" easier to follow when the state starts getting complex
the downside is that you use immutable.js's api for changing values. e.g.:
return state.set('newValue', 42);
 
@Luggage sorry was on the phone. That makes sense, thanks for your explanations
why is using immutable.js's api a downside?
 
It might not be for you
 
@rlemon Eat lots of meat and listen to lots of music, also don't be a dick
 
11:05 PM
but you have to write code slightly differently.. not using normal getters and setters.
 
ring ring, ring ring Bring out yer dead ring ring, ring ring Bring out yer dead!
 
I see, thanks for your help
 
@rlemon oh man I remember that photoshoot. All the studio people were gawking at me, thinking I was the bee's knees. Awesome day.
 
@Zirak Yeah, we're gonna make you a BIG star...
 
11:26 PM
So I got a new toy
 
11:38 PM
@monners noice!
 
heh, thought you'd appreciate it @Loktar
 
@monners nice cake
 

« first day (2202 days earlier)      last day (2746 days later) »