« first day (1686 days earlier)      last day (3266 days later) » 

8:09 AM
@BartekBanachewicz sup
 
wat things
did you finally move to the lisp side?
 
Morning
 
Morning
 
Morning
 
8:18 AM
Morning
 
Morning
 
Morning
 
Can't star your own monners? :D
 
@monners you're the one starring, aren't you
 
Very astute, Watson
 
8:21 AM
It might be a really clever plot from me! Mu ha ha ha ha?
 
@RoelvanUden well, not you
 
@monners please don't
 
D:
 
Aaaaand, cancelled
 
bad cow Q.Q
 
8:22 AM
You can still star own by pinning and unpinning
 
I know, but...
 
such hacker
 
very star misuse
 
wow
What are your preferences for gaps between code blocks?
 
on SO? Context, I guess
 
8:28 AM
No, just in general
 
@BenFortune No blocks in a function body, just more small functions that are pure and immutable and clean and loveable. A composition of small pieces of things that do something combined
 
Like say, you have an if statement, do you leave a 1 line gap for the next bit of code?
fn() {
    if(condition) {

    }
   //this line
   return x;
}
 
Just if (!nyaa) return-like one-liners to exclude paths. If I can't, I split it up to two functions. I'm wacky that way.
 
Sometimes - just like you introduce paragraphs in text
 
ugh
you remind me of a friend...
 
8:31 AM
Just do something that makes sense, and do it consistently. If it doesn't actually add to readability then don't do it.
 
lemme find his code
 
I like early return statements, but sure they can be overdone
 
@FlorianMargaine Gets what I'm asking :p
Only asking because of
 
function f() {

    // NEWLINE

    /* code */

    // NEWLINE

}
 
8:32 AM
0
Q: Type error cannot set property of undefined

Manoj SanjeewaI am developing app using Nodejs and Mongodb and mongoose. user and Subscriptions are 2 mongoose schemas. I want to get each members expire date from subscriptions collection and include it with each of members object array. But it is not working. var UserSchema = new Schema({ title: { ...

 
@FlorianMargaine This hurts the finger on the wheel...
 
@FlorianMargaine I hate that style...
@DenysSéguret Why the change in name?
 
@monners so do I
hence the "ugh"
 
    sleep: {
        value: function () {

            for (var event in this.dispatcherListeners) {
                if (this.dispatcherListeners.hasOwnProperty(event)) {
                    for (var i = 0, l = this.dispatcherListeners[event].length; i < l; i++) {
                        this.dispatcher.removeListener(event, this.dispatcherListeners[event][i]);
                    }
                }
            }

        }
    },

    /**
     * @inheritDoc
     */

    wakeup: {
        value: function () {
This is painful. It's even hard to spot the differences...
 
@FlorianMargaine Almost worse than the no semicolons style
 
8:34 AM
I like no-semicolons in Ruby and Haskell :-D
 
I like no-semicolons in python
 
@monners SEO
 
@DenysSéguret Sellout...
 
@FlorianMargaine not yet
 
@monners agreed, actually
 
8:35 AM
@DenysSéguret there are differences?
 
I like no-semicolons in brainfuck
 
Do you even indent your brainfuck code?
 
@FlorianMargaine I hope so...
@monners @JanDvorak I'm not sure I get your meaning
 
@DenysSéguret It was a joke. We miss the old you.
 
@JanDvorak Yes, it's much easier to read that way </sarcasm> ;)
 
8:37 AM
I'm still dystroy too.
 
how do we know?
 
I've got that coding username before the birth of most users here...
 
@JanDvorak userid :>
 
@DenysSéguret That's not too difficult.. the lot of you are in your 20s or younger
 
@FlorianMargaine could be The guy who used to be dystroy
 
8:39 AM
ah. Probably.
@copy find the bug I introduced github.com/Ralt/.dotfiles/commit/…
(the bug is related to some other code in this file.)
 
Oy o/
 
8:54 AM
oy @dievardump
 
9:06 AM
in my agency is wanted for use Linux/Ubuntu
 
why does prefixing a string with + convert a string to an integer?
 
That's the unary + operator
 
@StevensHaen Reason about it like 0 + ?? and then the type conversion comes in
 
I see now.
 
It's kind of horrid though isn't it?
 
9:17 AM
Can you guys have a look at this ?
1
Q: code executed in wrong order in Firefox with setTimeout after alert

GregRun the following code in any browser: console.log('processing: task #1'); setTimeout(function(){ console.log('processing: task #3'); },0); alert('See console logs'); console.log('processing: task #2'); In my understanding, the above code would result console output being: "processing: tas...

I can't reproduce the problem. Can you ?
 
Nope.
 
neither
oooooooh
actually, I can
run it several times
worked after the 3rd time for me
 
closing as norepro
 
@JanDvorak I fail to see what relevance "putting it outside the call stack" has with what I wrote
 
calling it synchronously would definitely be a bug since it has observable effects
 
9:23 AM
Got it too @FlorianMargaine, ran it 4~5 times to make it fail.
Indeed this sounds like a major bug :D
 
I have this result (N is false and Y is true) for 10 times:
 
@JanDvorak In the sense that it could modify variables?
 
N,N,Y,N,Y,N,N,Y,Y, N
 
@Neil in the sense it would reorder events inside the callback to occur before the code that follows the timeout call
 
What does alert do in that case @DenysSéguret? Somehow put the resume on the end of the stack which causes the time out fn to run first?
 
9:24 AM
Timeout is 0.. it's technically accurate if it is run immediately
 
No, it's something to "run some time in the event loop with a delay of 0ms"
That's not now, that's later.
 
the method of getpart(String) is undefined for the type of httpservletrequest using javax.servlet-3.0 jar
i am spending 7 days for client to server image upload please help me
 
@RoelvanUden probably something like this. With all those yield like things that make it possible to break the code, it's possible it's a new not even intended behavior of FF
 
The point is if you're calling timeout, you shouldn't really care when it is run
 
When you don't have setImmediate, setTimeout(0) is the alternative. :P
So yes, you would care.
 
9:26 AM
@Neil I do care that it runs after I return control to the event loop
 
@Neil but you should care about basically it being nextTick
for the same reason that it matters for promises to do that too
 
setTimeout guarantees a minimum delay. A minimum delay of zero still means to evacuate the current call stack
 
when would you need to run code immediately at the end of your function that you couldn't run in the function itself?
 
@Neil Maybe I'm splitting immense CPU workload to keep the UI responsive.
 
"run this code, but without all the mess that is the current scope"?
 
9:28 AM
anything that causes a stack overflow when run synchronously, for one
 
though if it is true what the OP is writing, then it would seem that is the case
it is called synchronously, despite being a bug as you say
 
It almost definitely isn't called synchronously. You can suggest them to test that, though
that would be a far worse bug than simply executing events while an alert is being shown
 
Then the code should be launched in the order the OP expects, so how would you explain the fact that it is seemingly run immediately?
 
Most likely firefox fires events during an alert
it has been known to fire resize events during an alert, but this is far more severe
not that a window should resize while it's showing a modal dialog, but oh well. Linux is weird.
 
@JanDvorak Its not only Linux :P
 
9:36 AM
seems like a stranger explanation than "firefox just runs the event if timeout is 0"
 
Why?
 
maybe it's not in the specs, but it isn't technically wrong
 
It's in the specs that the timeout code is run asynchronously
 
you're saying you want to run something. when? NOW! Ok, let me wait until the end of this call stack
 
What's the sense of delaying something zero miliseconds if not to evacuate the call stack?
 
9:37 AM
add scumbag steve hat
What's the sense of calling setTimeout with 0 wait time if you actually wanted to wait?
 
Neil, you do not how the event loop and asynchronicity is supposed to work right?
This sychronous exec breaks the very foundation of the JS runtime we rely on
 
If indexOf returned null rather than -1 if not found, while it isn't following the specs, it still somewhat makes more sense than -1 (yes yes, I realize why -1 is more practical)
 
If I rely on !== -1 and it returns null my code is fucked.
 
Yes, that's why it's practical
 
@Neil yet that change would break all of the existing code
 
9:40 AM
So if I rely on setTimeout to EXECUTE LATER and it doesn't, I'm fucked, too.
It's a huge deal.
 
@JanDvorak It's a hypothetical
 
for the same reason promise callbacks should always run asynchronously even if the promises are already resolved
 
I see the reason for it, though it isn't true to the sense of setTimeout, that's all
 
And the reason why the caolan/async lib sucks hard for predictability. :P
 
9:43 AM
can't report a bug to firefox on chrome ~~
the form is broken
 
@Neil it is
 
@FlorianMargaine <lame>Report a bug that the form is broken</lame>
 
According to the specs it isn't supposed to work that way, and it should follow the specs , but if the specs said that indexOf returns -52 if not found, you have to wonder why
 
Do both Chrome and Firefox do that? at this point we may as well just change the spec for alert.
!!spec alert
 
@JanDvorak alert not found in spec
 
9:44 AM
!!google javascript alert specification -w3resource
 
if the point of calling setTimeout 0 is meant to do something later, then there should have been a function for that very purpose, since setTimeout 0 is inconsistent with setTimeout 1000 for functionality
regardless of being consistent with the specs
 
> 6. Optionally, pause while waiting for the user to acknowledge the message.
dammit!
 
oh, wait "optionally" here means that the user agent may continue executing the synchronous code, not that it's allowed to insert event callbacks into synchronous code
!!google settimeout specification
 
@FlorianMargaine Reproducible every time in 37.0.2
 
10:14 AM
Firefox 38, occasionally got the bug. Interesting. Another reason not to use alert or prompt.
 
when I return on my house, I can try with old version... like FF 34
 
ES6: you so sick.
also, morning.
 
Sick? Why is ES6 sick? Is it ill? Caught a cold?
 
I thought I should refactor some code and use destructuring. Ended up rewriting all the code which took an hour which is a waste of time.
 
@AwalGarg It's ES2015 now.
(But I like ES6 more...)
 
10:29 AM
It is sickness all the way down.
 
I quite love it. Sans class.
Have spent a lot more than an hour rewriting code :p
 
vote for noSQL
 
But mine was just 1k loc which should not take more than 15 minutes to completely rewrite in ES6.
 
@Neoares Why ? This isn't a survey, it needs facts.
 
10:33 AM
@DenysSéguret is great and do all the things
also it's easier
And I like to use noSQL when I'm working on a nodejs realtime app
or if I have to store tons of data as JSON
 
Oh, imagine array comprehension. Imagine fat arrows which free you from keeping a copy of this. Imagine template string.
Let's just say there's no turning back for me...
 
@Sheepy your desk
 
@Sheepy oh don't get me wrong, I love ES6. I am just saying it took me way too much time which is not good. I am... venting :P
 
@Neoares Mea!!! <3 <3 <3
 
I use Redis so I don't get in the SQL/NoSQL religion wars.
 
10:36 AM
@Sheepy What does Mea mean? :d
 
@AwalGarg And I am saying there's a deeper pit ahead of you :)
 
!!afk brb nosql is crying
 
@Neoares Same as "Baa". From my experience, the real farm is a mix of "Baa" and "Mea".
 
:O ok :D
 
Yeah. In my country we use "Mea".
 
10:37 AM
In spain we use "Beeee"
 
Lol
 
0
A: code executed in wrong order in Firefox with setTimeout after alert

Jan DvorakThis is a bug. The HTML5 specification doesn't allow this to happen: Section 6.1.4 defines the event loop. In 6.1.4.2 this section also helps provide some guarantees about the order in which events are fired (point 1 of the event loop algorithm) and that the document gets rendered after an eve...

 
Oh, good answer!
@Neoares I think the desk needs two more monitors... and a trackball. Mouse is for Humans and Cats!
 
@Sheepy yes, and it doesn't need the pictures on the wall
it's like gay pr0n
 
@Sheepy edited, addressed in the last paragraph
 
10:45 AM
@JanDvorak Great!
 
The strangest believes run in the internet...
0
Q: Why is the use of wildcard * in select statements discouraged?

vivoconunxinoI've been advised in this self page to not use the wildcard * in my SQL queries. Wrong query SELECT * FROM table instead of SELECT field_a, field_b, field_c FROM table In understand only one reason, if you need to know only 3 fields from that query there is no point in force the sql engin...

 
discouraged?
SELECT col1,col2,col3 ... col299,col300 FROM table
 
Having 300 columns on a table is discouraged
 
true :)
but not 20 columns
 
I'd say even 20 columns is stretching it
 
10:50 AM
I'd be tempted to close this question as "coming from baseless FUD"Denys Séguret 6 secs ago
 
it depends
 
POB?
 
!!urban POB
 
@DenysSéguret pob noun. Posh Spice's (Victoria Beckham) bob haircut. Posh + Bob = Pob. Looks like a normal bob haircut, but has asymmetrical sides. Shorter in the back than in the front, usually.
 
@DenysSéguret We should propose that in meta. So that we can use it to close w3school related questions.
 
10:51 AM
@DenysSéguret primarily opinion based
 
how to search the second result of !!urban ?
because POB means Pain Of Balls
 
!!urban accepts a second parameter
 
!!manual
 
@Sheepy That didn't make much sense. Use the !!/help command to learn more.
 
!!help
 
10:53 AM
@Sheepy Information on interacting with me can be found at this page
 
@JanDvorak some engines don't even allow it
 
because... 8-bit integers?
 
!!urban pob syndrome
 
@Neoares [P.O.B syndrome](http://pob-syndrome.urbanup.com/5899935) Pain Of Balls syndrome
The pain in your testicals after having a mega boner for roughly 3 hours in your pants, due to the fact that the girl doesn't want to have sex or even touch your junk
 
How the fact that you don't index all tables could induce a slow select * ? — Denys Séguret 10 secs ago
This guy seems to know nothing about databases, his answer looks so random...
 
10:56 AM
I think very few programmers (barely) understands the tools they are using everyday, whether it be browser, database, or the humble OS.
 

« first day (1686 days earlier)      last day (3266 days later) »