« first day (2284 days earlier)      last day (2663 days later) » 

user2620028
5:00 PM
why do you say forEach mutates the array?
 
user1596138
@HatterisMad He meant the reverse reverses the original. I was confused too
 
user2620028
or are you talking about the reverse statement he had before the foreach
 
user2620028
ah ok, english is stupid
 
user1596138
Right lol
 
try {
    window.clearInterval(intervalIDlink);
} catch (a) {}
Just seen this in someone's source, it doesn't throw does it?
 
5:04 PM
!!> clearInterval("derp");
 
@SterlingArcher "undefined"
 
user1596138
It shouldn't...
 
@BenFortune certainly not anymore
 
@KendallFrey it used to?
 
5:05 PM
I doubt it
 
Alright, thanks 😛
 
Anyone know a good way in node to extract a file type? Eg, I have an mp4 file, I want to get 'video/mp4' or whatever for it
 
This old chestnut
 
@corvid File signatures
 
MIME types are not tied to file extensions in any way. The only way you can convert between them is by defining the conversion yourself
 
user1596138
!!giphy mimes
 
user1596138
Lmfao mime smoking
 
Jesus motherfucking christ I just accidentally duplicated all my tabs and crashed my browser
 
user1596138
5:16 PM
@SterlingArcher downloadmoreram.com
 
I never knew that H stood for motherfucking
 
@SterlingArcher how do you accidentally duplicate all your tabs?
 
user1596138
What does the H mean anyway
 
user1596138
Just a twaine thing isn't it
 
5:18 PM
Hong
 
According to google, it's Harold
I shit you not
 
no fucking way
 
user1596138
....I'm good with Harold
 
user1596138
> The H stands for Harold, as in, "Our Father, who art in heaven, Harold be thy name" (snort).
 
user1596138
LMGDAO
 
5:19 PM
> Here, a possible origin is the name "Harold"; which indeed is mentioned by Smith (1994:32) as the basis of a variant form, "Jesus Harold Christ". The "Harold" may arise from a common misinterpretation (often by children) of the phrase in the Lord's Prayer, "Our Father who art in heaven hallowed be thy name."
Moses...
 
Where it says children to be politically correct when really it means Chinese
 
user1596138
omg lol
 
@KendallFrey Mmm, I love me some UHF.
 
I had no idea that was from a movie
 
@Jhawins search is goin alright. I have a phone screen with Target on wednesday :(
I've only applied to like 4 places so far. Being picky for right now
 
5:26 PM
Hey guys. Quick questions about objects
 
Quick answer about Objects
 
Quick correction about something pedantic
 
user1596138
@ndugger Nice
 
Is it possible to add an object to another object like
 
user1596138
@MagnusBurton Yes.
 
5:27 PM
Yes.
 
Maybe
 
user1596138
Quick. First one to answer properly without knowing the question wins
 
FileNotFound
 
`var hi = { yes: no } to { a: a, b: c, hi }`
 
5:28 PM
Object.assign
 
user1596138
newObj = {...oldObj, ...combiningObj}
 
@Jhawins LA Kings goalie
 
@MagnusBurton See Object.assign() or Object spread.
 
user1596138
@MagnusBurton lol what
 
@MagnusBurton what the fuck?
 
5:29 PM
Hahah guys im sitting here laughing so loud
 
no apparently not then i guess
 
57 secs ago, by Madara Uchiha
@MagnusBurton See Object.assign() or Object spread.
 
user1596138
@MagnusBurton Well sort of
 
1 min ago, by ndugger
Object.assign
 
5:29 PM
I'll look into .assign(), thanks @ndugger @MadaraUchiha
 
I SAID IT FIRST
 
Ok you win ;)
 
@MagnusBurton Your expected output is nonsensical because it references inputs that don't exist
Object.buttign
 
good joke, Ken
 
user1596138
!!> var hi = {a: 'a'}; var newObjWithHi = {b: 'b', c: 'c', ...hi};
 
5:30 PM
@Jhawins "SyntaxError: invalid property id"
 
come on Barbie
 
user1596138
@MagnusBurton ^ this would work with babel lol
 
let's go party
 
AH AH AH YEAH
 
user1596138
!!> var hi = {a: 'a'}; var newObjWithHi = Object.assign({}, {b: 'b', c: 'c'}, hi); console.log(newObjWithHi)
 
5:31 PM
mmm shrimp
 
@Jhawins "undefined" Logged: {"b":"b","c":"c","a":"a"}
 
user1596138
I need the lemon's chat plugin. God that is hard to type out
 
!!s/imp/ek/
 
@ndugger mmm shrek (source)
 
tasty
 
5:32 PM
@Jhawins oh sweet some next gen stuff right there
 
@KendallFrey how bout them CAPS boy
#1 in the NHL son
 
i prefer lowercase
 
I prefer camel case
 
user1596138
@MagnusBurton Yeah you can literally just do what you showed us in your example, except put ... (spread operator) before the object you need to "expand"
 
i PrEfEr AlT cAsE
 
5:34 PM
I prefer käse
 
I prefer a case of beer.
 
lOoK aT tHiS. iT's BeAuTiFuL.
 
@Jhawins const yourMom = { ...legs };
 
ziGi
 
@Jhawins Seems very time efficient, gonna look into babel. thanks man!
 
user1596138
5:36 PM
Hmm
 
user1596138
:35130632 ...aids
 
user1596138
Spread it
 
user1596138
@littlepootis No it's a manual direct reply....
 
user1596138
5:36 PM
You have to search for the message by ID. Is very good
 
But is there a better one than Tucker vs Kapanen
 
Nobody better than the mighty ducks
 
user1596138
!!giphy tucker
 
user1596138
!!afk work
 
5:38 PM
evenin
 
!!giphy tuck
don't fail me
lame you failed.
 
!!giphy guy fieri
not a good one, cap...
 
lol
 
!!undo
 
!!undo
forgot about that..
mine might be too late
nm.
doesn't cap auto unbox?
 
5:50 PM
@KendallFrey ha!
 
6:09 PM
0
A: How to correctly express arbitrary Promise chains without "indentation pyramids"?

Sterling ArcherYou can return the promise within, thus creating a chain instead of just duplicating "callback hell" like this: F(100).then(a => return F(200); ).then(b => return F(a+b); ).then(c => return F(a+c); ).then(d => return F(b+c); ).then(e => return F(d+e); ).then(f => console....

How do you keep the chain going and pass the params down it?
 
this one thing that async/await sugar helps, but that's not an good answer in this case (yet).
 
Good point, before i delete this I'm going to research — Sterling Archer 1 min ago
And before you update it, I'm going to downvote.
 
What you resolve(); from the previous function is used as the params of the next one
 
damnit
 
omg somebody upvoted
why
 
6:15 PM
Looks like someone tried to negate it
 
....
 
resolve(object)Z; .then(function) -> uses (objectZ)
 
there we go. I want that!
> Made this a number of years ago, it's fully functional with the heart of an Apple
that just looks fucking awesome I would display that in my living room
 
@SterlingArcher an ugly way: jsfiddle.net/luggage66/1vum0vfc
 
@Loktar oof lol yeah that's ugly af xD
It does work though
 
6:19 PM
ugly?!
well maybe the wood actually
 
> a = _b;
um
 
I would make the base much nicer, but idk looks super interesting
 
How would async/await help this?
 
@SterlingArcher scope
 
6:19 PM
true
 
let a = await F(200);
let b = await F(a + 100);
let c = await F(a + b);
yes, async/await is the pretty solution
 
@Sheepy Thx, but, if i want get results "Name" for exemple where i have search but not all json (for many json its very very long)
 
Noscope may be danker, but scope is very useful
 
a = _b; was a mistake. the thing I was going for should be clear.
 
anypeople have an idea for my problem ?
 
6:21 PM
Any idea how to match the first x {} in the string "hello x { x {} } world"?
 
a few ideas.
 
@Asperger /x/
 
i want ideas :)
 
input.split(' ')[1]
 
6:23 PM
@KendallFrey Dropping that sweet, sweet regex.
 
@KendallFrey I actually want the following output: 'x { x {} }'
 
@Trasiva /wub|wub/
@Asperger /x.+/
 
input.split(' ').slice(1).join(' ')
 
or an input.subString(input.indexOf(' ')) type of deal.
 
6:26 PM
for me ?
 
No. What's your question?
 
@Luggage idk why I didn't think of that, but I gave you credit 😛 if you post an answer, I'll upvote you
 
btw, the data variable in your fiddle is not JSON. it's just JS.. so nothign special is needed
get a property like you would any JS object
@SterlingArcher meh, I don't really care.
 
BUT THE INTERNET POINTS
 
@Luggage i would like get results key "Name" (for exemple) where i have search but not all json (for many json its very very long)
jsfiddle.net/xbuppd1r/32
 
6:29 PM
it's not JSON still
it's just an array with bjects in it
sorry, object with other objects in it. some array
 
hum
 
data.cards[0].Name
 
whoo
 
stackoverflow.com/questions/28250680/… this is the most intense self-answered question I've ever seen
What's that word for it? Starts with a c
 
6:34 PM
That's amazing
 
@Loktar did I ever show you this?
cc @rlemon
 
no actually
digging it
 
This is Iron Maiden's son again -- I saw them at warped tour. They're "As Lions" now and not as heavy :(
City of Vultures. Beast album, heavy af
 
I like the guitar and drums.. I don't like his singing with it. not because screamo, you know I like screamo.
just something about it doesn't jive with me
 
So you don't like Bruce Dickinson then?!
 
6:40 PM
why would you think that?
 
Because that's his kid lol
 
so?
 
It runs in the family
Not like you
You don't run at all
>:(
 
I run occasionally
 
Is beer involved in this running?
Or Moose?
 
6:43 PM
beer is involved, but not at the same time. more like drink beer -> running required as additional cardio because of beer consumption
 
I heard (maybe from you) that a beer after a workout is good for you
 
@SterlingArcher not from me, and sounds like BS
I'm a big fan of beer, but that sounds complete BS
 
Maybe it's a specific beer type
 
yea, it's called none beer left water
 
igetthatreferrence.jpeg
> This Republican politician allegedly told a woman 'I no longer have to be PC' before grabbing her crotch
fucking lol
 
6:46 PM
@SterlingArcher Source
 
lmfao old ass man just lost his marbles
@BenjaminGruenbaum @MadaraUchiha esdiscuss.org/topic/map-literal do you guys think map-literals will ever come into play?
I like the syntax
 
that idea has come up before, but JS doesn't treat collections as first-class enough for it to make much sense
 
Any particular reason why they aren't first class?
@ssube also, unrelated, got Ariel and Teshar
 
@SterlingArcher they were just added, relatively speaking.
@SterlingArcher that's a decent AA, shame about the other one
how much money have you sunk into that game now? :P
 
Thx @Luggage work fine ;)
 
6:52 PM
More than I'm willing to admit, but not a horrible amount
:D
 
ha, same
I've been focusing on arena and world boss mostly, though.
 
I'm working on dungeons and toa
 
look closely @rlemon
 
Can't beat toa normal 50, it's so hard
Hwadam can kiss my ass
!!afk pre-grooming sprint grooming vape
 
6:53 PM
TOA is kind of broken, you need a specific set of monsters and then it becomes easy.
I have all of them but am not willing to give in and just farm with the "right" monsters.
 
@SterlingArcher Ho. Lee. Shit
 
@Trasiva don't forget the other pilots on that flight.
 
@KendallFrey Holy hi-rez
@ssube The first 40 or so I can just auto. After that I need to make specific teams, depending on the month, I can hit up to 60 or so.
 
@Trasiva the "right" team is bernard, mav, and a couple others, mostly wind. It's super boring and pretty lame.
 
@Trasiva have you build that polar queen yet?
 
6:57 PM
@ssube Usually I go Vero, Amir, Bernard/Verde, Shannon, Bella
 
then you'll never beat it
 
@SterlingArcher Not yet, I'm hoping a month or two after the b10 change I'll be able to rune her up for arenas.
 
I feel like toa 50 and dungeon 8/9 marks the point where the game stops being fun and forces you to do things The Right Way
 
Ganymede can probably replace Mav but good luck getting him
 
@ssube I don't have quite the selection of monsters to just throw things around.
 
6:58 PM
in that there's usually a single setup that will run you through easily and anything else is prohibitively hard
 
Some day I'll be able to at least farm the devilmon on the regular.
 
I'm pretty surprised how much of a difference +4 arena wins make
 
@KendallFrey seen it, check out the rest of his instagram
it's fun
 
Oh, you mean in the amount of GP you get?
 
Hi guys. How do you transfer data between components in Knockout js? How i can send data from child component to parent? Using callback or there is a better way?
 
7:01 PM
@Trasiva yeah, when you hit 1200
 
guys on an electron app is there a good way to handle locally downloaded fonts?
 
@ssube Makes sense, since if you figure you clear your whole list, and the two extra, that's an additional 12 gp per run.
 
lol, there's no way I can clear a full list of 1200+ players :P
we're talking multiple nat 5s and at least one AA each for that tier
to be fair, I'm fighting them with... multiple nat 5s and an AA, so... but mine are still shit
 
I'm starting to use my rune optimizer to start buffing up my teams.
 
I've just been rebuilding my Orion and Woosa, since they are still super underpowered.
 
7:03 PM
Sig and Verde need some work still, and I need to re-summon some Megans to throw in there.
I'm saving all my summoning stones until the next big Zaiross rotation so I can just try and pull his ass.
 
Hi all
 
yo
 
1 message moved to Trash can
@ANinJa Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
below is a method  will i get return -1 of if for loop take sometime to execute
function myIndexOfForArray(dbArray,clientSideArray) {
    var elementNameArray = [];
    for (var i = 0; i < dbArray.length; i++) {
        for(var j = 0;j< clientSideArray.length; j++) {
            if (dbArray[i].name === clientSideArray[j].name) {
                return j;
            }
        }
    }
    return -1;
}
 
well, no, you'll get -1 if none are found
has nothing to do with the amount of time it runs
 
7:09 PM
as javascript is non blocking how it's possible
I'm running this in nodejs
 
right
time has nothing to do with your problem
naturally, if none are found, that means it had to loop the most number of times possible, thus taking the longest amount of time.
 
suppose this for look took 10 sec so will javascript wait for that
and then return ?
 
JS waits for loops
 
Yes, it will block the event loop until the for loop(s) are complete.
 
wait mean it will do someother thing in my program
 
7:12 PM
nothing else in your app will be able to run
while the loops are going
 
so is it good practice to make this kind of method instead of callback
 
..
the two aren't interchangable?
 
i think here both implementation will be the same right ?
ok
 
callbacks will not make your synchronous code magically async, so yes, they will be the same
 
the lack of a callback isn't what is making the loop block.
 
7:14 PM
typically you don't want to just swap things out for callbacks, that's unnecessarily complicated
 
alright
may be it will take sometime to understand this thing for me as I'm begineer
I've understood it but you know it's hard to train your mind in this way
specially from java/C background
 
from a Java or C background, nothing (in that example) has really changed
that should make it much easier
those languages have poor (or no) support for async code, so that will be different (when/if you start using it)
 
alright
what are the best practices used for implementing a chat api so that i can use it in mobile as well as in web or let other people to user my chat api(may be i think this is not the right room for this but i just want to get start in this implementation that's why I'm asking)
I've learned basic about socket.io concept
 
sockets are a good basis
 
like in facebook messenger bot(if anyone tried ) fb provide some rest api so all developer need to do is just pass the message and sender name
what protocol normally used for that socket based or http
as a starting point what should i learn for good understanding in chat system (including binary data transfer)
 
7:25 PM
you might start by understanding JS well, especially asynchronous stuff and events
 
ok, thanks for your input, what should i use as a reference ?
 
not w3schools
 
that's a rather large question
 
I'm learing it by javascript the definitive path
 
7:28 PM
MDN is a good reference. Just google with "MDN" in the search like "for loop MDN"
 
sometime it feels like it will take long time to completely understand this book
ok
 
@ANinJa it probably will. It takes a few years to completely understand JS.
 
Or a day if you are @towc.
 
I think he's on one of those "learn 1 language a day (and forget it in 1 day)" fad diets
 
haha
 
7:33 PM
Hi got a problem, having some problems how to explain it tho :P but can i try here? :)
 
@Dwadelfri 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.
 
user1596138
imgur.com/a/bpO8W @SterlingArcher lol
 
@Dwadelfri Don't know, can you ?
 
LOLLLL
@Jhawins wtf
 
hah okey, my problem is like this. In the evolutionary process You got 100 people, the best 50 survive to next generation and 50 dies, of the 50 who survived about a third got 1 new child and so on... i need a function that does this for me :P also, the gen size should always be 100 people
 
7:40 PM
@Dwadelfri do you want a simple running number (the generation size) or a proper genetic algorithm to evaluate that?
 
If 50 survive and 1/3 of people get a new child, you get 65 people
 
is it good to implement data structure and algorithms on javascript (so that i can have good understanding on JS and algo) instead of java ?
 
@KarmaDoe yes and some get 2 children
 
@Dwadelfri and how are you deciding all of this?
 
7:43 PM
And what do you need the formula for ?
 
@ssube i dont know, what's the different ? link sources?
 
If all of them get 2 children
You get 80 people
 
@Dwadelfri you don't know what your inputs are?
 
So far i got this: fiddle.jshell.net/g3rxrgvh
 
>really good at fashion
>fedoras
 
7:45 PM
but the fiddle dont work ;D
 
clearly, what is it even supposed to be doing?
 
@jAndy Psst
 
@Dwadelfri What i don't get, is what do you want to do, if people limit is always 100 why do you need a formula ?
 
@Trasiva second one in and I'm already whooooa
 
@KendallFrey Total self esteem boost I needed for the day.
 
7:50 PM
the people are sorted by how good they are so the best makes most babies to pass on most of the best genes
 
@Dwadelfri you're describing genetic algorithms. What is your fitness condition and what library are you using for the simulation?
 
@ssube no libraries, just want the best to have most babies so to speak...
 
what you're describing exists, but it sounds like you aren't familiar with them
I'd read up on genetic algos, else you're going to have a bad time
 
Input 100 people, sort them, kill second half, pick 1/3 of them and make them have 1 - 5 babies each until you have 100 again
That ?
 
Sounds like germany's history
 
7:56 PM
The cake I'ts a lie.
 
@KarmaDoe yes :)
 
@ssube hah I read this and read up... and he is describing that pretty much exactly
I wouldn't be surprised if that line was used on a tutorial for a genetic alg
 
@Dwadelfri Whats your sorting parameter ?
 
the "just want the best to have most babies" is what gave it away :P
 

« first day (2284 days earlier)      last day (2663 days later) »