« first day (2720 days earlier)      last day (2453 days later) » 

18:00
@Ikari no, but I'll take a stab at skinning it once you're done component'ing everything
alrighty right
@SterlingArcher you used to watch wrrestling yea?
fuck no
wrestling was the absolute lamest thing I've ever seen
you can't knock wrestling, you've told me about the shit you used to be into
we've all watched wwe at some point in our childhood
18:02
I watched wwf, thankyou very much
@rlemon name one that's lamer than wrestling
@SterlingArcher you
haaaah
dat burn
I'm telling Kendall's mom
I just asked to be a sugar daddy on tinder
I mean I'm flattered, but I told her to fuck off and get a job then called her a hippie
I've become cartman
god damn hippies
sugar daddy for one night
spoiler-free answer
@MadaraUchiha @KamilSolecki up for some overwatch in an hour or so?
^^
Possible
\o/
I joined the downrank train this evening
like no body would switch to a hitscan to counter the soldier and pharah, and the only tank we had was a hog
I hate you guys
get xboxs
I'm getting pretty good with the new support lady
18:12
you're ballin
get more than one system
I'd get a nintendo switch but for the life of me idk anybody who has one
you mean a zelda console?
lol
basically lmao
18:14
I have also considered it
zelda on the can would be a lot of fun
I can think of no better place to play "breath of the wild" than on the can
I do spend a lot of time on the can
I don't poop
that's why you are so full of shit
Wow way to treat me like crap
I get it. :)
18:17
I generally don't have anything to post here anymore because no one likes angular
And that's what my current job is
And the C# room is garbage
plenty of noobs want help with angular
-4
A: Removing element from ng-model

user2788116Hey ISIS guy do you remember me Adam Barak? well im looking for zigi because we had a plan to bring my vengeance back to you all including the fuckin lemon

o wow, Im famous
can we ping you any time someone needs help with angular, @Vap0r ?
@MadaraUchiha lmao
18:18
@Luggage good point. They need to ping me though because the idea of hanging out in this room waiting to help noobs with angular question is more depressing than my current front-end development work being all angular :)
@Luggage yeah please
I was mostly joking, but I will if you want and I think it's a 'real' question.
@rlemon the wording made me laugh "including the fucking lemon"
@Luggage yeah I'm fine with that.
that damn lemon!
18:20
I know I'm zesty, but some people get real sour about it
I don't understand what y'all are talking about
@Vap0r old old troll. Thinks he's clever with his sock accounts and "h4xing"
@SterlingArcher want me to hack him?
Borderline stalker but harmless
sock? dude that account's 4 years old
18:22
so are my socks
@SterlingArcher reply yes for "yes", no for "yes", or no reply for "yes"
eww, gross
o shit, I'm got
Also any other reply for "yes"
@rlemon you got got?
18:22
I got had, but had I got got, we'd had a convo about it
Could you guys please message in modern hieroglyphics it would make me feel better about not understanding the convo
:no:
:i-don't-have-dark-theme:
user2620028
oh lol i thought he was just decorating his no
18:25
:he-is:
Where do I download the snarky emoji pack yall are using?
wut
google
:dark-theme:
"so chat dark theme"
@KevinB can't tell if your wut was sincere?
18:27
Honestly I was expecting more spam. Think it's over already @rlemon?
If so, ya got got bub
@SterlingArcher you want spam?
That stuff is weird tasting. Like ham, but not
it's great in spaghetti
In italy I think that's considered treason and a war crime
almost as good as hotdog spaghetti
18:38
You killed the chat, Kevin.
@SterlingArcher was there more than one?
@rlemon yeah there was a second one, then radio silence
Possibly answer banned?
We'll see
link to the second?
18:41
meh, we'll see him again in 30 minutes once he makes a new email and such
I'm not concerned.
who is Adam Barak?
the swastika troll iirc
Not concerned, it's exciting. Honestly the dedication is impressive
we've been over this
dedication alone isn't impressive.
Sure it is!
18:45
I'm pretty dedicated to not shitting myself at work. are you impressed?
couldn't it be if it was over a certain threshold?
Honestly, yeah.
lol
i mean, if you paired that with eating taco bell every day,
no, they have evolved colons
18:48
Hi, it's Jonathan from Product Ownership, I need you guys to stop chatting and fix "it". Is that ok?
@jmb.mage no, they tried that already
I don't think pennywise is going to get any scarier
user image
5
cc @MadaraUchiha @Ikari :D
what in the name of fuck
what in the name of fuck
dat kawaii engrish tho
they're both contributors
that's the best part!
18:52
New U2 cover by kawaii-krazies... "In the name, of fuck, what more, in the name of duck?"
this isn't maid cafe
undo?
oh my
18:53
Voting to move all weeb shit to trash
nah, weeb memes are funny
@BenFortune stop bullying ikari
@Ikari i'll keep the link for later, though
:P
this reminds me of when a co-worker did this "women who code" workshop and we got into a big debate about the gender of code
18:54
// Is there a one line way to do this?
x = [1,2,3];
x.push(4);
return x;
// I don't know, something like return [*[1,2,3],4] or another thing?.
weeb shit is probably going to end better than where this convo is going
😃
@EnderLook return [1,2,3,4]
@rlemon ... That is obviously
x = [1,2,3];x.push(4);return x;
18:55
lmao
return a.concat([b])
return [...x, 4]
You example way too general lol
return (x.push(4),x);
@Cereal shhhh
you have to let all of the bad examples out first :P
@EnderLook when you say * are you trying to reference a pointer? In which case, in JS the only equivalent is to use an object which gets passed by reference.
@Zmart 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.
18:57
@Zmart I was refering to Python unpacking. I think in python is possible unpack a list with * and dictionaries with **.
and in js you can destructure them with ...
@rlemon Thanks
@rlemon Ok
2 mins ago, by Cereal
return [...x, 4]
@EnderLook please never abuse the comma operator like this
I was being facetious
@rlemon ?
x.push(4),x
it's a terrible hack abusing the comma operator. you thanked me. please don't use this code tho
:D
18:59
alright enough modding the chat for now. Overwatch time \o/ Madara down for some?
> You unmitigated ass

- Dale Carnegie
> modding the chat
i installed terraria last night, chopped down a tree, then booted up ksp
so eloquent
19:00
Ikari confirmed madara sock
@Ikari I'm intrigued, got some code?
@rlemon Ok
modding as in making a plugin
not even a plugin
I'm still learning react as I'm making this, so the code might be pretty shite
19:01
he's rebuilding teh chat UI
Why (x.push(4),x) and [x.push(4),x] give different results? [1, 2, 3, 4] and [4, Array(4)].
@EnderLook because .push returns a value
which is not the array you're working on
well, after I make the components functional enough I plan on adding the extra functionalities :(
@BenFortune mhm?
@Ikari Why the arrow function?
19:02
( a, b ) is an expression that evaluates a then b, and b gets returned because of the comma operator and () wrapping. that's why my joke answer works. Cereal's answer uses destructuring to expand the array. [...[1,2,3],4] is the same as [1,2,3,4]
Ok, thanks
arrow functions are pretty
@BenFortune could be calling it from another context
oh, so that I don't have to pass it to an prop like <Element handler={(...) => this.hijacker.setWS(...)}></Element>
ohh, nvm.
lol
19:04
i rather the pass it to prop like that than make it an arrow on the class
Ugh, I made a bunch of classes and models for a PieGraph yesterday and turns out they're all general enough to apply to bar graphs. Now I haev to rename everything
like d3js?
0
Q: How i can gues the comming value of random array on javascript?

lololoI need to know how i can guess the comming random value of array on javascript. this is an exmple of my code const peices = 'ILJOTSZAW'; matrix = createpeices(peices[peices.length * Math.random() | 0]); from the array i wanna alert or show de goming value.

19:07
s/groming value/wey/
I mean, that's a valid question
You'd store the next value in a temp variable, then read the temp variable when you need an ew value
This problem confounded me when I was making tetris as one of my first programs
I have no idea what the question is even asking
29
Q: Predicting Math.random() numbers?

Abe MiesslerI was reading up on the documentation for Math.random() and I found the note: Math.random() does not provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the window.crypto.getRandomValues() ...

google bots math.random is deterministic
@rlemon I'm 98% sure he wants to show the user the next random selection
let curr = next;
next = randomWhatever();
show(next);
use(curr);

or whatever
19:10
| 0 is that even a thing?
floors
The density of pseudo-random points is forming a skull! Spoopy af.
https://bl.ocks.org/mmalone/bf59aa2e44c44dde78ac
!!> [1.23|0, ~~1.23]
@rlemon [1,1]
19:21
@KevinB tbh, I'm still undecided on how to pass it to a prop. Like are there any pros and cons to the either approaches?
class Foo extends React.Component {
  a = () => { this.works(); }
  b() { this.needsToBeBound(); }
  c() { this.works(); }
  render() {
    return (
      <button onClick={this.a} onMouseOver={this.b} onMouseOut={() => this.c()}></button>
    );
  }
}
you understand this right ^ ?
Hey all, I have a function which is bound to an event like so

const dooFoo = (action) => { //do stuff }

Is it possible to make it async?
IIRC, arrow functions defined like that get moved to the class constructor
I tried adding async but it didn't work
I don't like magic, so i avoid them.
19:26
@KevinB the arrow doesn't assign its own thisArg
yeh, the this in non arrow func case is bound to the html button element, and the arrow function has the current object scope binding to this
so it keeps teh class instance as its this
Right,
am i misunderstanding something?
@tomaytotomato sure, you can wrap almost anything in a promise
not sure why you pinged me with that
19:26
but you'll need more detail
The a = () => version is more performant
@KevinB you called it magic
it really isn't magic
And more predictable in most cases
magic, in that it's not actually a prototype function
it's a function that gets defined when the constructor is called and then attached to the instance.
19:27
Because you don't create a new instance of the function every render()
Is it sufficient to just do this?


const dooFoo = async(action) => {
async is a keyword.
that won't work maybe it will? but damn that's confusing
unless you're using a specific lib
true, it's added in the constructor like you said. but it binds() once only and is defined kinda-like a prototype function
which I'm unaware of
Yea but I have await statements I want to use
19:27
@tomaytotomato async (action) =>
you can only await things that return promises
so if you have a thing that returns a promise, you should be able to await it
you can await anything you like.
@KevinB I started out with your approach, but then realized that adding all those this.foo = this.foo.bind(this) statements to my constructor every time is horrible boilerplate
pretty sure you can await anything
19:28
And really not fun to write.
i don't do that either..
!!> (async () => { return await 42; })().then(console.log)
@MadaraUchiha "undefined" Logged: 42
@KevinB ^
i just do onChange={e => this.foo(e)}
19:29
^ I do that as well
Hmmm getting this

>const dooFoo = async (action) => {
> ^
> SyntaxError: Unexpected token (
easier for me to manage
@KevinB Right, but this creates a new instance every time
does that make a new function each render() or it is smart enough not to?
Which can have unforeseen consequences, especially if you're using React.PureComponent
@Luggage Why would it be smart enough?
19:30
!!> async function foo(){} foo().then(() => console.log('done'));
@BenFortune "TypeError: foo.then is not a function"
@BenFortune "undefined" Logged: "done"
i don't know, some optimization. it's the same function
wouldn't it recreate it only if it needs to recreate the element?
@KevinB It would recreate it every time render() is called.
Hmm is it really the case that if the callback in process.on('SIGINT', function() {}); returns a node process exits?
19:31
!!> (() => {}) === (() => {})
@MadaraUchiha false
you basically have const foo = e => this.foo(e); in your render
Which I have done, too
that happens for some reason I don't understand
are you loading polyfills?
19:33
I don't think webpack pollutes the global states
chat has some polyfills that are wrong, but they expected them to be
can't remember what they are off the top of my head, but I've had that before
oh... I'm not much sure about that then
trace it into master-chat.js
Can't be arsed, not my job :P
will do, once the components are done :B
that error doesn't really have any visible impact... so....
19:36
@Luggage Even more intuitively surprising, but makes sense when you think about it, is that children are recreated and are different every render
Even for the same props.
that one I knew
and it has to be that way.
umm, btw, Madara, wanna play a couple of QP, Mayhem or something like that?
that sounds really inefficient
I'm going ingame atm
Meh, react's job is to diff that tree of children efficiently. That's its whole purpose.
19:39
wow
                  such comment
I just realised... I didn't waste my time as much as I thought... watching this
dafuq man... if these guys put the same effort in quantum mechanics or whatnot.. we would be out of problems right now
they made mario a freaking SCIENCE
the same place we are right now
speedrun IRL
@Luggage any% or 100%?
19:45
any%, of course. 100% is too hard
Elon is making a decent run of it, though
ai can do it
why hasn't it
do what?
killed us all
speed run super mario bros
19:49
watch that video, it's ridiculous and terrific
i think i have already
there's a series of people hacking/speedrunning old games
well, maybe not that one, but the run it's featuring
they're all pretty similar.
I asked myself like 104 times during the video: "How.. why... which human is going to investigate the assembly code of when and how pixels and frames are calculated to create a pixel perfect timed jump of an 30 years old game"
19:51
people get money for this shit
so my guess is, a lot will try
we as a race do the weirdest shit. And that's basically what makes us interesting
@GNi33 dude, have you ever watched animal planet?
we're a far cry from the weirdest
not sure about that
define weird
19:53
@jAndy Have you ever read the tale of Todd Rogers' impossible dragster run?
but give me an example, now I'm interested
I mean, I know of spiders that let their newborns eat them to make sure they survive, that is indeed a little odd
I'm trying to learn ==. Consider a == b. Apparently, when one is an object, it is down-converted to a primitive type for comparison, but when both are objects, there is no down-conversion and the comparison is a === b. Am I understanding this right?
@GNi33 everything about naked mole rats.
but would such a spider ever post the picture of a frog to the internet every third day of the week and still chuckle whenever it sees it? I don't think so
So a == 2 is true when toPrimitive(a) is 2, but a == b is false even when both toPrimitive(a) and toPrimitive(b) are 2?
19:56
@MetaEd basically, yes. It 'coerces' types until they can be compared. I suggest just always using '===' and never having to memorize type coercion rules
but yeah, I guess we would need to define "weird" here
@Luggage Sure, except I want to actually master the coercion that is done by ==.
it's not super simple, but it's not super complex
== and === have simple enough rules, but there are a few caveats when you use literals.
I have a question/answer pair related to that

« first day (2720 days earlier)      last day (2453 days later) »