« first day (1942 days earlier)      last day (3011 days later) » 

user3119231
9:06 AM
good morning, excuse my lateness
 
@Maurice I shall not.
 
user3119231
@Abhishrek "Rigid Particles" - Great for making a volleyball game
 
I think that would be elastic particle
 
user3119231
@Abhishrek yes. elastic aswell.
 
user3119231
Sparky reminds me to silvester
 
9:11 AM
I am using the sparky things
for fuel!
(Although I should stop abusing them)
 
user3119231
Awesome script by google
 
Its not a script
its a C++ library compiled to js
read the source luke !
 
user3119231
damn. it's early in the morning here... :D
 
posted on February 09, 2016 by Nicholas C. Zakas

It's hard for me to believe, but I first conceived and created ESLint[1] in June 2013 and first announced it's availability in July 2013[2]. As frequent readers might recall, the primary goal of ESLint was to create a linter with rules that could be loaded at runtime. I had seen some problems in our JavaScript...

 
Box2d in js can be super slow
 
@tereško I think the business insider articles on that topic were deeper (and not written in gray over a gray background)
 
you mean the one that is also linked in that article :P
 
no
there were many articles recently, I'm not sure the best one I've read was from business insider in fact... Looking...
It looks like they keep updating their articles, which makes it hard to follow...
Anyway, there's probably everything I've seen elsewhere in that articlie
So disregard all what I said, and I'll go get another coffee ^^
 
user3119231
193,019 reputation I think we have a little SO god here
 
!!stats 22656
 
9:29 AM
@BenFortune Jon Skeet (http://stackoverflow.com/users/22656/jon-skeet) has 842936 reputation, earned 185 rep today, asked 38 questions, gave 32775 answers, for a q:a ratio of 2:1725.
avg. rep/post: 25.68. Badges: 424g 5956s 7062b
 
@Maurice That's not so simple. I won't say reputation doesn't matter at all but just the number won't tell you how much of that rep is related to being able and useful. I've closed a little too many trivial duplicate questions that were answered by 5K or 10 users recently...
 
@DenysSéguret There's a 43k user in JS usually that answers dupes.
I downvote him every single time then cv it
 
I'm disappointed to see so often my comment used a few minutes later by somebody's else to write an answer because I hadn't had the time to look for a proper QA for closing as duplicate...
@BenFortune who ?
 
Can't remember his name, but I know when I see it
 
but I also know it's not always obvious it's a duplicate and that sometimes it's so much easier to answer than to find the good QA...
 
9:34 AM
@DenysSéguret Oh not these, they're obvious jquery dupes.
 
(that's why I often answer as wiki)
 
Shit like "How can I add a class to an element using jQuery"
 
Can someone who knows node js help me with a question I posted? It was closed for being duplicate but I'm completely clueless why.
 
@Query Maybe it's a dupe ¯\_(ツ)_/¯
 
But explaining why it's a dupe would be helpful.
 
9:36 AM
@BenFortune Look at this ^^ Easy to answer, already answered, somebody will just do OP's job...
 
Personally, I think it's an issue with a variable scope. But I'm such a beginner at JS.
 
@Query request() is asynchronous
 
@Query link ?
 
It returns immediately while work is being done in the background
When it's done, the function passed to the callback argument is called.
 
@Query The duplicated question is correct, but the answer isn't overly obvious if you're new.
 
9:37 AM
oh, I guess what was the linked QA... Then @Query should really read it
 
So my log is printing before work is done?
 
@Query Correct.
 
@Query Pretty much
 
Read the linked duplicate, it's long-ish, but it's a very good read.
 
So it needs a callback
 
9:38 AM
Yep, but you may run into closure issues too since you're running it in a loop.
 
(Which you are)
Although, he's not using the i inside of the callback, so he's good.
 
Is XStream class thread safe?
 
!!google XStream
 
@Mikhail Java !== JavaScript.
 
9:40 AM
XStream is java xml parser
 
This isn't the Java room.
 
@Mikhail Yes, but you're in the JavaScript room.
 
oh sorry
 
@DenysSéguret I just puked a little in my mouth.
 
9:42 AM
@DenysSéguret pls
 
Callbacks have always confused me. It's just a function being passed into another and then executed right? By that definition the "function(error, response, html)" argument of response is a callback already?
argument of request*
 
@Query That's correct. That function is your callback function
Any work that needs outputting needs to be done inside that function, or moved into another callback
Or use promises, but that's in a whole other ballpark.
 
So what's the most logical way of tossing the scraped data of each iteration to a global object?
Sorry for all the questions.
 
> 20 million readers read 50 million pages every month
That's so worrying.
 
@BenFortune you don't have to trust them on that though
I never saw tutorialspoint linked in SO answers
 
9:54 AM
Is there way to forcibly open console ?
 
@Abhishrek From JS?
 
yes
 
Probably not
 
debugger
!!mdn debugger
 
9:55 AM
There was an experimental solution in chrome, it has been removed
(which is good)
 
won't work if console is not open.
 
just now was helping a guy to fix hes ajax
it took 1hour +
very tough case
 
do share ?
Meh I will just implement straight logs
 
me share?)
 
yes
 
10:00 AM
original task
look easy peazy and it is
but the guy made my ass on fire...
 
i asked him does he has this logic in same file he said that in different
yeah where in different but one iclude other via php )
and html was in JSON response...
this took about 30 mins ) to explain to him
it look like {JSON..} HelloWorld
after this
it became <body> {JSON...}
+30 mins
 
I am going to follow 8 hour work day from today.
 
user3119231
Did I missed something?
 
10:27 AM
guys sorry if repeat my self.... i need few more opions about my CV.... please guys help...
 
> It allows users to trade their in-game items for real money securely. I emulate game user and become as an item transfer agent.
99% of the time this is against the game's rules, I wouldn't put that in your CV unless it was 100% legal.
 
All I can think about...
 
LOL
 
@BenFortune It's not illegal. It's just against the ToS.
 
crl
jsfiddle.net/crl/rk6f74tw/1 why I only see 'foo' and not 'bar' while selecting text?
(on Chrome)
 
10:33 AM
@RoelvanUden That's what I meant :p
 
crl
ok this example is better jsfiddle.net/crl/rk6f74tw/2, when mouse downing, it doesn't show 'mousedown'
I'd just like to have the fucking event type of a selection change.. since it's a mix of events
 
yeah) thats my hair cut )
@BenFortune its not illegal...
@BenFortune, i investigated that... and the owners of the platform dont mind and even help side projects
 
11:04 AM
i´m just wondering here but...on my app, i´m working with tables that pull data from server, i have one function for the implementation of all the tables, then i have different buttons for the different tables....question: should i have one function per table for the sake of performance? or not?
anyone?
 
user3119231
@DenysSéguret Y U NO box image? :D
 
@Maurice What ?
 
user3119231
Some of us are sitting in office
 
@Japa If performance is a problem, perhaps. Use a profiler to find out. I'd advice to stick to producing the most readable and maintainable code though. Worry about performance if becomes a problem.
 
@Maurice Hardly NSFW is it?
 
11:11 AM
guys any1 needs a remote worker? )
im looking for a job )
 
user3119231
@BenFortune calm your british tea :D
 
@Maurice I don't drink tea you scrub.
 
Does anyone know if setting visibility: hidden during a temporary rendering phase will ease up the browser’s paint? (My situation: I’m rendering something, then calculating something of the rendered thing, and rendering it differently again. My question is now if I can avoid the paint phase for the first render since I only need the browser to layout it without painting it)
 
user3119231
You've won.
 
i think disaply none will only help
becosue we visibility hidden the element present with theier height width and margin
and this is all calculated
best practiceis to create dom elements and dont add them to dom tree
 
11:14 AM
@poke Not sure, maybe a question for main? Is this in canvas?
 
I want it to be calculated since I need to calculate stuff with the actual dimensions (requiring me to render it first). But I don’t need to have it painted.
 
add it after all the logic was finished
 
@Ben Standard DOM
 
u can calculate on the container size
where you gonna insert dom
 
It’s a bit more complicated than just having a container size.
 
11:15 AM
its the same man
 
No, my situation is different. I don’t care about the container size; that’s fixed anyway.
 
so what you want to calculate? is it some sort of plugin?
 
I’m rendering a table with dynamic content. After the initial render, I need to measure the optimal column widths and add a colgroup with widths based on those sizes.
 
all cloumns are differnt size yes?
or depends on its content?
 
Depending on the content, yes, and the content changes
 
11:20 AM
ohhh i got a solution... maybe flexbox will help you
what do you think will this fit you?
 
I need IE9 support, and semantically it’s an actual table (with data).
 
how big is it?
 
~12 columns and 50–100 rows
 
use setTimeout 0
and draw row by row
will it help?
it wont freeze at least
 
No, my solution already works. I’m rendering, then measuring, and rerendering it with the changed sizes. That works just fine.
But since I don’t need the first render to appear, I’m just wondering if I can save the paint phase of it.
 
11:24 AM
well on slow machines i would recommend using setTimeout 0 for each row... becouse this big table on slow tablets or PCs will freeze
 
I am so damn sleepy atm :-/
gah. The difference b/w sitting on chair and sitting in a beanbag is far more than my expectation
 
11:42 AM
so you on the beanbag?
 
12:08 PM
@Abhishrek I tried Windows. It was good.
 
@poke oh, we're actually doing that today, sort of.
 
What do you mean with “today”?
 
@littlepootis i still have a win 95 installer at my parents home :p
 
@mikrowelt yes
sorry i fell asleep
:D I <3 UDP but UDP might never know about my feelings :-x
 
the choice of protocol depends of the use case btw
 
12:20 PM
Indeed
 
12:30 PM
@KarelG ..why?
Also, do you have disks 18 and 19?
 
user3119231
This return will fail, huh? return event.charCode >= 48 && event.charCode <= 57 || event.charCode == 8
 
don't forget to check RTP and the newest RUDP :)
@Maurice look for operator precedence
@littlepootis i don't know. My dad keeps it. He has also win98, XP and professional disks
he's still using IE these days. When i told him that MS stopped with supporting IE, his face was like a sad panda :/
Had to explain that Edge is far better than IE. The UI is still same. Discovered last weekend that he still uses IE
 
@poke we have a chart we set the min-width for and we need to sync it across multiple charts and it needs to be the same based on the actual needed minimum so we have to draw -> get actual value -> set min-width
 
Yeah, that indeed sounds like what I’m doing, syncing sizes across multiple elements :P
@KarelG IE11 is still supported
 
by MS ?
 
12:37 PM
Yeah
The very same Microsoft supported Windows 1.0 until 2001
I played my first PC game on Windows 1.0 in 2003.
 
12:49 PM
!!red or yellow
 
@Cereal red
 
Thanks bae
 
1:07 PM
@KarelG or generously wrap expressions in ()
 
smells like lisp
 
rude
 
user3119231
What does this mean? I'm between relationships at the moment.
 
user3119231
Google translator isn't giving a real answer to this
 
It means you're single
Aka "a bachelor"
Aka "free"
 
user3119231
Thank you, now I'm smarter :D
 
Not in a relationship
 
user3119231
1:34 PM
I'm answering this nerdtests.com .. Don't think wrong of me :D
 
@BenjaminGruenbaum ping
@copy ping
do you guys know if it's possible to type-enforce a set for a subproperty of the set's items?
e.g. I have:
 
Hello,
 
@MayurPatel Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
class Foo():
    bar = None
I want a set based on bar property
 
@rlemon that's the solution yes. But not why
 
1:39 PM
not sure if I can enforce this with types, or if assertions are the only way to go
 
anyone working with modular lodash know how to selectively add methods to wrapped (using _.chain) objects?
 
@MadaraUchiha * my eyes are hurting * /notserious
 
Note: Production code needs to run in low node versions, tests IDGAF.
 
it's sad that js doesn't have StringBuilder feature like Java has
 
1:40 PM
How to merge 2 2D array into one 1D array in javascript and if value is 0 then it should not be added to the merged 1D array ?
 
@KarelG ['foo', 'bar'].join()
 
@Quill Already posting there as well :D
@KarelG Really?
You can implement that in literally 5 lines
 
it uses binary operations and mixes references
 
@MadaraUchiha this is screaming "higher-order functions"
 
1:41 PM
js doesn't use refs
well, sort of
 
@FlorianMargaine Hmm? Like what?
 
@FlorianMargaine maybe you could use a type-enforced helper method?
 
@KarelG Not for strings.
 
@Quill like?
 
crl
@KarelG you need somthing performant?
 
1:43 PM
faster than += ? always
 
crl
I don't see a need for stringbuillder except maybe server-side
 
@MadaraUchiha the whole thing is pretty ugly, having mutable state across functions
 
def helper(value: type):
    # whatever
 
5 mins ago, by Florian Margaine
not sure if I can enforce this with types, or if assertions are the only way to go
 
@FlorianMargaine How would you have done it? No need for actual implementation, just pseudo is fine
 
1:45 PM
@MadaraUchiha getNodes().extractRootNodes() sounds better, conceptually
 
getNodes() from where?
 
crl
extractContents() (it's a Range method)
 
The point of this function is to take a bunch of lines like a = a, a.b = b, and transform it into a nested tree.
There's no single root object.
 
omg, i got a match on tinder ... with a female cousin at mom's side. I thought to "like" her for the joke, then immediately "match !". I started the convo with " hi there * waves * " xD
 
guys. I have a problem.
 
1:49 PM
GotchaJoinALanister
 
@MadaraUchiha then the other way around? find the root nodes first?
I'm not sure exactly tbh, but having .push on a passed argument is just ugly
 
@FlorianMargaine I'm not arguing, but I don't have an assignable place
 
crl
you're too functional
 
Can somebuddy help me here plz its required now ?
 
(This is usually the point when Benji comes along with a solution half the size as mine and twice as nice)
 
1:52 PM
@MayurPatel your question isn't clear. You can start by giving examples. Removing a dimension from a multi-dimensional array can lead to information losses. Unless you want to get a weird array ?
 
@FlorianMargaine I'm confused at what you're actually asking.
@FlorianMargaine set as in a Set or as in a setter?
 
@BenjaminGruenbaum Set
 
Hi
 
is it actually possible to type-enforce a Set?
is that a possible concept?
 
2D array is A[0,2,3,7,0,0,5,3][0,2,2,4,0,0,3,0] now i want to make 1d array that contains ans[2,2,4,3,0] means values from second where first is 0
 
1:56 PM
WHAT ?
 
crl
@FlorianMargaine you want Set<StringOrSomething>?
 
@crl I want Set<Foo.bar>
if that makes sense.
while storing Foo in the set
but the "set" property (aka unique) is defined by the bar property of the Foo objects I store in the set
I can obviously do that in the .add method, but I was wondering if there was a way for a compiler to prove I'm doing something wrong.
or if that's not the job of the compiler at all.
 
@FlorianMargaine yes, of course.
It's possible to type statically in a type system that support structural typing, TypeScript for instance.
 
@BenjaminGruenbaum care to explain? :)
got an example?
 
Typically we type things nominally (by the class name, inheritance and interfaces)
However, we can also type things by having properties or functions, the two languages I know that do it are Scala and TypeScript.
 
2:07 PM
structural typing is what Go does, isn't it?
 
@FlorianMargaine You mean like Set<{bar: string}>
Yeah, Go does it too, that's another good example.
 
crl
react propTypes are similar?
 
def add(self, foo: Foo):
    for f in self.items():
        if foo.bar == f.bar:
            raise
@BenjaminGruenbaum I mean something like this ^
 
function sayHi(t: {bar:string}[]){
	for(var item of t) {
		console.log(item.bar);
		// console.log(item.baz); // compile error
	}
}
This compiles in the typescript background.
 
crl
@BenjaminGruenbaum how is it a compile error since the function is called dynamically
runtime error maybe
 
2:12 PM
@crl It's a compile error, that's TypeScript.
 
crl
oh ok
 
That's literally the point of TypeScript :)
 
crl
if it's uncommented I see
 
Flow ftw
 
2:30 PM
Wooo @ton.yeung using sockets, the lobby now live updates :)
 
aah finally managed to install Visual Studio
the previous failed attempt led to corrupt registries ... had to clean up manually ...
 
So I posted my game on fb for my friends to check out, and one of them asked me why I was complaining about chores for Grandma.. lol @rlemon
 
@SterlingArcher link to game?
got a live demo?
 
2:48 PM
@FlorianMargaine I mean I can spinup the server
@FlorianMargaine sourceundead.com/login
I see your lobby
You looking at the screen?
 
WebSocket connection to 'ws://sourceundead.com/socket.io/?EIO=3&transport=websocket&sid=foo' failed: Error during WebSocket handshake: Unexpected response code: 400
can't join the game
 
Shit hangon
 
@SterlingArcher I get this in the console though :)
{"msg":"You have joined the game!","success":true}
:D
@SterlingArcher don't bother
 
Yeah I think that's a domain issue with the sockets
It only happens on production
I just forgot to readd a socket emission
 
@SterlingArcher it's fine, do that later
you got work or w/e
 
2:52 PM
Too late, already done :P
 
@SterlingArcher did you deploy?
 
Yup
Wait no
 
fuck agh nevermind, production upload is a bitch
I'll do it later
 
Make up your damn mind @SterlingArcher, haha.
 
2:53 PM
But you get the idea lol
It works on dev xD
 
rip
 
@SterlingArcher yeah np
@SterlingArcher well, I haven't seen the game, so no ^^
 
yeah I'm not sure why that socket error only shows up on production
It must be a cross domain thing or something
 
@SterlingArcher can't even signup / login ;-;
 
2:55 PM
@FlorianMargaine oh lol well later on when I get some work done I'll restart my server and have you play around
 
@SterlingArcher yeah np
 
@Quill node isn't running :P
 
;-;
 
!!afk work n stuff
 
@Trasiva Shaving soap implies that you shave; you filthy muggle.
 
2:56 PM
angular question ..
 
angular answer ..
 
> ngAnswer
 
@ndugger I do shave. It makes my face baby smooth, and smell amazing.
 
ahaha
 
i have a global app context, but i'm loading a separate html file that has its own controller, filters. etc
 
2:57 PM
ng-shitcode=
guys does any1 know what is BEM?
 
@Trasiva Ew. If you want to smell amazing, just get some beard oil. It makes my face smell like a pine forest.
 
please check it oput guys.. if dont know it
 
But baby smooth face? Come on, man
 
@mikrowelt please don't use sms-like text
 
Unacceptable
 
2:58 PM
write full sentences
 
be as verbose as Java
 
@ndugger I can't do beards. I gotta shave every other day at the most.
 
i was running into a problem where if i have all my controllers in the same .js file that the app was instantiated in, things work fine.. but if i load the controller in a separate script it can't access the app i already initialized
 
And what's wrong with baby smooth?
 
You're a man, not a baby
 
2:59 PM
What’s more efficient: Registering and unregistering DOM events all the time, or registering once and skipping within the event handler?
 

« first day (1942 days earlier)      last day (3011 days later) »