« first day (1472 days earlier)      last day (3483 days later) » 

4:00 PM
#prejudice
 
!!s/d//
 
@KendallFrey #prejuice (source)
 
Can you do element.attributes["placeholder"] to access the placeholder attr of an element?
 
@Sippy elm.placeholder
??
 
4:02 PM
@Sippy element.placeholder?
I type slow :(
 
Well
I figured if it wasn't supported by the browser, I'd have to go by string literal.
Guess not.
 
< \halloween yet ?
 
Friday
 
@Loktar my avatar, should i add more blood ?
 
did someone say rebecca.blackfriday ??
 
4:04 PM
or an open mouth ?
 
lol
@darkyen00 it must not have updated for me
 
@rlemon not yet :(
 
!!afk eating foods food
 
@darkyen00 nope, if I click on your username I just get a popup
 
4:07 PM
Guys Promise question
 
@SecondRikudo shoot.
 
How do I catch errors that occur in .each(), and not have it affect the rest of the run?
 
.settle
 
try-catch?
 
.each(function (link, index) {
    description = description.replace(matches[index], link);
})
.catch(function() {
    return description; //Do nothing on error.
});
If there's an error in any of the above, none of the replacements happen.
 
4:08 PM
ah florian how do you type so fast ?
 
Lemme read on that.
 
speed of me typing : =========
speed of florain typing : =====================================
 
Woo
 
@SomeGuy since you said you respect Total Biscuit, soundcloud.com/totalbiscuit/whose-side-am-i-on
its #gamergate stuff
 
if (developer.nationality("French")) { developer.speed++; }
 
4:10 PM
"Unable to connect to the Visual Studio Development Server"
Fuck you VS
 
Yeah, I read the articles he's been posting
 
but Total Biscuit breaks it down, and he is awesome
 
@darkyen00 there is a one minute difference between your message and mine...
 
@SomeGuy nice avatarrrr
@FlorianMargaine formatting
 
it's not a matter of typing speed there, especially since it's a single word.
 
4:10 PM
@darkyen00 Thanks. @WesleyCrushed made it for me
 
@FlorianMargaine you typed the message a few seconds before me
maybe i get messages slow.
 
copy and SR had the time to add messages in between
yeah that's more like it I think
 
user652649
i did not, it's from "the mentalist" show @SomeGuy :D
 
@FlorianMargaine ping chat.stackoverflow.com ?
 
@WesleyCrushed Oh, I know that that's what it references. But didn't you make the image at least?
 
4:11 PM
~170ms
 
Whooosh
 
user652649
@SomeGuy ok ok :D
 
@SomeGuy ah nice
 
Pinging chat.stackexchange.com [69.59.197.29] with 32 bytes of data:
Reply from 69.59.197.29: bytes=32 time=1337ms TTL=50
Reply from 69.59.197.29: bytes=32 time=1349ms TTL=50
Reply from 69.59.197.29: bytes=32 time=1335ms TTL=50
Reply from 69.59.197.29: bytes=32 time=1329ms TTL=50
 
@darkyen00 50 1337
 
4:12 PM
@SecondRikudo in your case, I think @copy's suggestion is better actually...
 
@darkyen00 I get ~540ms on 3G
So what the hell are you using?
 
@SomeGuy 3G =/
BSNL
 
@FlorianMargaine What did he suggest?
 
well 3g is known for having sucky ping anyway
@SecondRikudo try/catch
 
Vodafone for the win, I guess.
 
4:13 PM
Oh
 
@SomeGuy yeap
 
it's simple
 
I have a sucky ping, but my pong is savage.
 
@FlorianMargaine How do you try-catch in a promise?
also, it's library code that throws the errors
 
!!s/ping/penis/
 
4:14 PM
@darkyen00 I have a sucky penis, but my pong is savage. (source)
 
user1596138
64 bytes from 69.59.197.29: icmp_seq=0 ttl=51 time=101.151 ms
64 bytes from 69.59.197.29: icmp_seq=1 ttl=51 time=95.666 ms
 
what?
wasn't it just a replace?
and as to how do you try catch... try { /* code */ } catch (e) { /* code */ }
 
@FlorianMargaine I'm trying to upload to imgur, and the library rightfully rejects/throws for 4xx error codes
That's where the exceptions originate from
Not from the replacement
 
ah
the lib uses promises?
 
Yeah, I was surprised as well
 
go for .settle then
 
(am I showing off too much?)
 
So yeah, settle looks like da mvp
 
:P
 
4:15 PM
@FlorianMargaine that doesn't supports browserify yet
 
@AwalGarg It's your first rep cap, is it not?
 
@darkyen00 ?
 
@SecondRikudo yeah. in 3 days :D
 
@darkyen00 Why would I care? nodejs
 
@FlorianMargaine writing a micro framework to enable writing apps that run in worker :-(
@SecondRikudo thats for your browser.
 
4:16 PM
Oh, different context
 
@m59 hey dude!
 
@darkyen00 wait, you were showing this link to me?
 
@FlorianMargaine :-/ browserify vs angular like dependency resolution
 
m59
@AwalGarg good morning!
 
and yes :P cause you write quite good standard code.
 
4:17 PM
browserify doesn't do dependency resolution
 
maybe i should make the developer write
it using browserify :->
the pita of dependency is on them :D
 
@AwalGarg well done, I've never gotten over 16 votes!
 
with angular like thing the required modules are lost.
 
once you'll want to explain what you're doing, I'll answer
in the mean time...
 
That's a good answer
 
4:18 PM
@FlorianMargaine okay lemme explain better.
 
show me a github repo if you want a code review
 
@SterlingArcher thanks :)
 
@FlorianMargaine this is more arch but oki :D
 
Looking through some code that I'm about to refactor. This gave me brain ulcers...
gs.workflow.getProductName = function()
{
    var c = gs.workflow.getContext();
    switch (c.product) {
        case 'print':
            return "Print & Web Classified.";
            break;
        case 'web':
            return "Web Only";
            break;
    }
}
dat formatting
 
hm
what's wrong with it?
 
4:19 PM
Nothing major
 
{
}
 and {
}
 
m59
If I write a node module that should be used like:
whatever.init({
  getPool: function() { return someMysqlPool; }
});
There isn't a case where someone should pass in a connection rather than a pool, right?
 
Just the inconsistent bracket placements
 
it's not inconsistent
 
How?
 
4:19 PM
there is more than one standard that requires newlines for function and same line for everything else in js
 
@NickDugger I like the mix of '' and ""
 
Strange
@OliverSalzburg I can't stand mixing single/double. I just escape my doubles.
 
wrt quotes... there also are a couple standards that require ' for code-related strings, and " for user-facing strings
 
@FlorianMargaine well, that chunk aside, there are some places with newline, and other with same line. It's like it was written by somebody with multiple personalities
 
it kinda makes sense
 
4:21 PM
inC# ' is for characters, whereas " is for strings
which also makes sense
 
@NickDugger if all newlines are for function declaration and same line are for everything else, then it's alright :P
 
Is there a consistent way to set caret position across all browsers?
 
@FlorianMargaine nah, he mixed em up for functions. It's pretty random
 
@NickDugger C# has another issue... it's heavily based on C. In js and the likes ' and " are the same
 
Looks like once again all the older browsers are a piece of shit
 
4:22 PM
@NickDugger ah, k
 
@FlorianMargaine don't make me bring up PHP
 
oh... php...
 
> Okay then ... i want 20k rep on stackoverflow, pledged for this.
 
where ' and " should be the same...
 
4:23 PM
@darkyen00 I want 10x less than that. So that I can edit directly without waiting for peer review :D
 
just wondering if there's pragma marks in javascript.. if so, is it a good practice in javascript?
 
there isn't
you can build your own compilation chain though... but then it has other cons
like, requiring compilation
 
@FlorianMargaine I disagree
Feature, not bug :P
 
@JoeSaad You can use the c preprocessor with JavaScript, if you so desire
 
I like having string and character literals.
 
4:24 PM
never tried using the C preprocessor? how to use that?
 
@KendallFrey do you know how to?
@KendallFrey do you have a better way than this? github.com/Ralt/phpdbg-ext/blob/master/Makefile
the issue with this makefile... I can't define a macro in a file and reuse it in another file
 
@JoeSaad there is one that mozilla wrote
@JoeSaad npmjs.org/package/preprocessor @KendallFrey
and this is aklso a solution
 
@FlorianMargaine same as for C
 
return Promise.map(matches, imgur.uploadUrl)
    .settle(function (inspections) {
        return inspections.map(function (inspection) {
            if (inspection.isFulfilled()) {
                return inspection.value().data.link;
            }
            else {
                return '#';
            }
        });
    })
 
is it a good practice, worth the time or usually people don't do that
 
4:28 PM
@FlorianMargaine not a make expert, sorry
 
@FlorianMargaine Doesn't seem to catch the error
 
@JoeSaad just let it go through the closure compiler
its da baws
 
I still get Possibly unhandled Error: 400 - Image format not supported, or image is corrupt. in my console
 
cause you didn't catch
 
Shouldn't .settle catch rejected promises as well?
 
4:30 PM
@FlorianMargaine Use #include for all files that need macros
 
@copy ah, not bad
ty
 
However, I would strongly recommend not to go that way
 
halp
 
I didn't plan on going
 
teresko... shoot.
 
4:30 PM
so ... I need to simulate a click on file input
 
I was just technically wondering
@tereško you're SOL
 
I regret using the preprocessor
 
!!tell teresko mdn MouseEvent
 
@tereško gasp cross browser?
!!urban SOL
 
4:31 PM
@darkyen00 SOL Shit Outta Luck
 
hmm, not quite the one I was aiming for
 
@darkyen00 for me it means "Sadly Out of Luck"
 
@SecondRikudo should I use MDN or MSDN documented approach ?
 
@tereško MDN
 
4:31 PM
@FlorianMargaine Disadvantages overweight the advantages
 
@tereško both
because IE is a bitch.
 
@SecondRikudo will the MDN way be compatible with IE10 ?
 
@copy I'm only using #define and #ifdef...
 
@tereško There's usually a compatibility table at the bottom of the article
 
@tereško oi wait
 
4:32 PM
which disadvantages? the compilation step?
 
why can't you just use label for ?
 
@SecondRikudo yeah , but it's missing
 
What do you need to simulate the event for though?
 
:o
ignore me sob
 
@darkyen00 I'm pretty sure @tereško knows how to use labels
 
4:33 PM
@FlorianMargaine No linting (no autocompletion), line numbers are wrong, nobody can build your code
 
@tereško for the record last time I had to do that, we convinced the client to give up
 
@SecondRikudo <input type="file" /> with shitty CSS fake overlay buttin
 
@SecondRikudo <label for="id"></label> <- trigger the click on this one, user clicks work the same way.
 
@tereško In that case @darkyen00's way is probably the way to go
Assign an id and wrap in a <label for="theId"></label>
 
hmm ..
 
4:35 PM
@darkyen00 I totally thought that said "SQL - shit outta luck"
Lol
 
Then clicks on the label will instantly click the inpuut
 
@darkyen00 what does "its da baws" mean?
 
:D
 
@SecondRikudo Oh JS master, do you know of a consistent way to set caret position across browsers?
 
!!tell sippy urban sql
 
4:36 PM
@sippy sql Structured Query Language. The most common language used for accessing relational databases.
 
lemme check if I can do it
 
@JoeSaad Translation: "It's good"
 
@JoeSaad "it's the boss" == "it's good"
 
ah.. ok, i'm gonna give it a try then..
 
@FlorianMargaine any idea why my rejected promises are not caught by .settle?
 
4:38 PM
Probably a dumb question, but does a checkbox have to be checked in order to send a POST value?
 
@SterlingArcher Yes.
 
Unchecked checkboxes/radio buttons are never sent
 
Is there a way to make it send default unchecked value?
 
@SecondRikudo uh... they're not rejected? dunno, should work
@SterlingArcher just check if the post value exists
 
4:39 PM
@FlorianMargaine Now I'm reading that the imgur library uses Q for its promises library
 
@FlorianMargaine ah, duh, thank you :)
 
Is it possible that if it throws inside a Q promise, it won't reject properly?
But .catch() did catch it...
 
jsfiddle.net/0fzgtqpp/1 @SecondRikudo if he really wants a full proof way :3
@tereško ^
 
return Promise.settle(matches, imgur.uploadUrl)
    .then(function (inspections) {
        return inspections.map(function (inspection) {
            if (inspection.isFulfilled()) {
                return inspection.value().data.link;
            }
            else {
                return '#';
            }
        });
    })
@SecondRikudo try something like this ^ been a while since I used it
 
Son of a bitch I've been using it wrong
 
4:44 PM
@FlorianMargaine what was the high latency ssh solution that you showed me ?
 
@darkyen00 mosh?
 
thanks :-), lemme google .. sounds familiar
 
@darkyen00 tnx, it seems to work (for now at least)
 
@FlorianMargaine now it resolves with the wrong values though :o
inspection.value() returns the original value from matches, and not the resolved value after imgur.uploadUrl ran
 
4:45 PM
@SecondRikudo check your code, last time I tried, bluebird worked fairly well :P
 
Out of curiosity there a word for ()? Other than "open and close parens"?
 
@FlorianMargaine Yes, I have that open in the other tab...
 
@FlorianMargaine yeap thats it
 
@SecondRikudo show me your code
@Retsam I don't think there is
other than "call function"
 
@FlorianMargaine Dang. Linguists, get on that.
I think I've referred it as an "invoker" (as in "invoking a function") but I'm guessing that's just me making up words, not something I've actually seen used elsewhere.
 
yeah, you invented that
 
return Promise.settle(matches, imgur.uploadUrl)
    .then(function (inspections) {
        return inspections.map(function (inspection) {
            if (inspection.isFulfilled()) {
                return inspection.value().data.link;
            }
            return '#';
        });
    })
 
not that it's a bad word in itself
 
I have a breakpoint on return inspection...
 
4:49 PM
7 hours of idle and my phone is almost dead. Wtf
 
viewing inspection.value() tells me that it's the original link from matches, and not the imgur url for the resolved image.
 
is there any way to get a display:table cell, to keep its padding? The padding comes from bootstrap. I want to use table cell so I can easily v-align
 
(Or rather, the JSON object that is returned from imgur)
 
@SecondRikudo what?
 
@FlorianMargaine imgur.uploadUrl takes a url, uploads it to imgur, and resolves with a JSON object representing the response.
Actually @FlorianMargaine I simplified to
return Promise.settle(matches, imgur.uploadUrl)
    .map(function (inspection) {
        if (inspection.isFulfilled()) {
            return inspection.value().data.link;
        }
        return '#';
    })
 
4:53 PM
hm
if it doesn't work it's out of my level I'm afraid
@BenjaminGruenbaum ^
 
@SecondRikudo make a fiddle.
!!google webworker state manager library
 
@darkyen00 nodejs
 
@SecondRikudo pastie.margaine.com
 
4:57 PM
@FlorianMargaine I also noticed it resolves way too fast.
 
@darkyen00 .com
 
You'd expect there to be a lag while it's talking to imgur, but there's nothing
It resolves instantly
 
4:58 PM
HTML entities D:
 
return Promise.settle(matches, function(match) { return imgur.uploadUrl(match); }).map(...);
 
is this an antipattern

worker -
state = app.state("foo");
/* after really tiresome task */
state.set(30000000);

main -

var state = app.state("foo");
console.log(state);
state.on('update', console.log.bind(state));
 
@SecondRikudo can you try that?
 
!!stat 248959
 
@SterlingArcher ziiweb (http://stackoverflow.com/users/248959/ziiweb) has 7338 reputation, earned -6 rep today, asked 566 questions, gave 39 answers, for a q:a ratio of 566:39.
avg. rep/post: 12.12. Badges: 25g 82s 167b
 
5:00 PM
I think this might be wrong in imgur.uploadUrl
 
@CapricaSix wow
 
Same
Possibly unhandled TypeError: Cannot read property 'link' of undefined
 
@FlorianMargaine did you see their latest question? It baffles me how asking on SO is the primary search function of some people.
 
@SecondRikudo Try StackOverflow
 
5:02 PM
 
@copy When I geet home
 
:D
 
5:21 PM
@SomeKittens That was, uhh, something special.
 
@Retsam isn't it beautiful?
 
@SomeKittens Reminds me a little bit of:
 
Welp.
something I struggled with for two hours on Friday was stupidly obvious.
 
@SomeKittens It wasn't that obvious if you struggled with it
Isn't that how obviousness is defined?
 
1 => 0
 
5:30 PM
@Neil Technically speaking, nothing is obvious if you define it that way.
 
!!define obvious
 
@SomeKittens obvious Easily discovered, seen, or understood; self-explanatory.
 
I guess @Neil is right
Well, it was obvious today.
 
No matter what you're talking about, someone is going to struggle to figure it out.
 
@Retsam Not true. If you point at a pencil and say, that pencil is obvious, it is obvious.
 
5:31 PM
not to a blind person
 
If you point at a pen and say that it is a pencil, it is not obvious, because something is lacking clarity
@SomeKittens True
 
@Neil I was thinking most in the case of a problem, not literal visibility
 
!!> ~'pencil'.indexOf('pen')
 
@SomeKittens -1
 
Does remind me of a favorite joke:
> A professor was notorious for leaving complicated demonstrations to the students, with no more than a remark that "It is obvious that..." One day a student interrupted. "Professor, is it really obvious that the second line follows from the first?" The professor looked at the board, wrinkled his brow, paced about the room for a few minutes, then, triumphantly said, "Why yes, it is obvious."
 
5:35 PM
@Retsam I really should bawk at that, but that is actually decent so I won't
 
someone needs to invent a protein shake that doesn't taste like dry ass
 
bawk
 
someone needs to explain how they know what dry ass tastes like
3
 
5:36 PM
Mind. Blown.
 
@Retsam I... don't get it
 
@KendallFrey ( ͡° ͜ʖ ͡°)
 
@SecondRikudo oh come on, it's obvious
@rlemon well, good to... know
@rlemon wait, so why are you complaining?
 
because.. umm. fuck
 
5:41 PM
Scariest jackolantern ever
 
HOLY shit
 
@KendallFrey It's like veggie burgers - it should taste like what he wants, but there's enough of a difference to annoy one.
 
@KendallFrey rm -rf / is scarier
But nice idea
 
@SecondRikudo That'll just throw an error message
 
5:43 PM
@SomeKittens chmod -R 777 /
That won't throw an error. Trust me :D
 
ooh, sinister.
 
what does git push -f do?
-f is short for -force, right?
 
correct
 
So what does that mean?
 
5:46 PM
@Shmiddty It overrides any commits that have been pushed since you last pulled
and when I pull, it also overrides them on my local git
Happened to me at Zaption
 
so git pull -f would mean just give me what's on the server and discard any local changes?
 
@darkyen00 I'd kick her while running away
Seriously
 
@Shmiddty git pull will do that IFF the remote has changed history
 
@SomeKittens I'm not sure what you mean by that. If I've made changes locally and perform a git pull my local changes are not overwritten.
 
Right, it merges
 
5:56 PM
There still seems to be a disconnect in my mind
 
"the remote has changed history" is sort of a worst-case scenario
 
what does "changed history" mean?
 
git reset --hard HEAD^5 && git push -f
 
commits that have been removed, for example
 
^ Removes the last five commits and pushes the current state to master
 
5:58 PM
so, your local branch is in the future as far as the remote branch is concerned?
 
well, more like the local branch sees the remote branch in the past
 
is it possible to change the commit message of an existing commit?
 
and the remote branch is ignorant?
 
it knows it got commits X Y Z from remote, but they don't exist there
@JanDvorak yes
 
which command should I look up?
 
5:59 PM
no idea
maybe commit
 
6004
Q: Edit an incorrect commit message in Git

Laurie YoungI wrote the wrong thing in a commit message. How do I change the message? I have not yet pushed the commit to anyone.

 

« first day (1472 days earlier)      last day (3483 days later) »