« first day (1336 days earlier)      last day (3619 days later) » 

5:00 PM
@SomeKittensUx2666 :-/
That sucks
 
@Crow For an auto-complete feature?
 
@Martin for validation
 
Just us onkeyup and maybe a throttle function if you really want
 
@Crow - that's a "debounce" sorta thing, keep clearing and setting a timeout in keydown, once the timeout fires the user hasn't typed in x seconds.
 
Yeah debounce that's what I mean
 
5:01 PM
underscore has debounce, doesn't it? _.debounce?
 
but it's pretty simple to write your own
 
meh, I'm lazy
 
@Crow - http://jsfiddle.net/MN787/
^ It's like literally two minutes easy
 
5:05 PM
Buuurn
 
@RyanKinal - How can you use less data attributes, I didn't use any at all !
 
When you visit that page, a data attribute somewhere in the world vanishes.
 
@adeneo $(this).data('timer')
 
That's not an attribute, it stores the data internally in jQuery's data object !
 
5:07 PM
Meh, whatever
 
!!s/data attributes/jQuery/
 
@SomeKittensUx2666 @RyanKinal - How can you use less jQuery, I didn't use any at all ! (source)
 
:realizes he's become Kendall, a knowitall:
 
@adeneo but downloading underscore was 30 seconds effort
 
5:09 PM
What's FoF?
 
Friends of friends
 
IMO way better than steam sales
 
@SomeKittensUx2666 Much better
 
@Loktar I wish I had time to play games, but I want to write a qrcode encoder right now :(
 
5:10 PM
you mean you have things you enjoy doing more than playing games :P
 
Eeeeeeh true :D
 
@Loktar that's a positive spin lol
 
Hooray for positive spin!
 
Half-spin is cool too
>_><_<
 
5:15 PM
but not meat spin
 
I'm sitting here trying to figure out why I can't log in
...fuckin machine who hosts the dev backend is off
 
It's probably Wheatly's fault
 
@Loktar Indeed. Indeed.
Also "binary or string data maybe be truncated" as a reason for a stored procedure failing is just horrible.
 
Horray for fa-spin
 
@Sushisource Welcome to the JavaScript chat! Please review the room pseudo-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.
 
5:19 PM
Welcome! Have a seat! Would you like a drink? How about a snack?
 
Hi Chris Hansen
 
Chris Hansen!?!?
... can you tell my grandpa I said hi?
 
Oh. I thought he was the "I can talk to dead people" guy.
NOPE. That's John Edwards. Nevermind.
:leaves quietly:
 
5:33 PM
@Mosho over 10 clients usually gets you banned on irc networks
and 10 people talking at once on miaou would give a flood ban on the irc server
 
And over 50 people even gets you killed
 
are you sure?
I'd say 52 is the minimum
 
make your own server
 
don't connect to freenode or efnet or any of the big ones
 
5:46 PM
The point is to connect to existing servers like freenode
 
and set your own limits I mean
eh they are overrated
 
Well the people are there though :/
 
freenode the facebook of irc
haha yeah true
I connect to 4 diff networks by default, quakenet, efnet, freenode, and one my friends from highschool/middleschool run
 
Freenode isn't really the fb of irc
 
just another line in the conf to connect to an existing one.
 
5:47 PM
It's a programmers irc network
 
yeah you're right actually
 
Almost all the OSS projects have a channel on it
 
ircnet is huge
and quakenet..
 
Quakenet is for gamers :p
 
Hi all,
 
5:50 PM
man I hope chrome allows userscripts to run on chrome-extension:// urls at some point
I made a script to make links clickable, can even onebox items (for irc/ssh)
 
Any idea why string manipulation using array indice is not working.

val[2] = event.charCode - 48;
console.log(val);

I am not seeing a change in "val"
 
but cant run it as a userscript with the ssh plugin
really frustrating
 
Original string is foo
Input --> "b"
Output shout be "fob"
 
Doesn't seem to work in console either
!!> var txt = "abc"; txt[2] = "F"; console.log(txt);
 
@Martin "undefined" Logged: "abc"
 
5:52 PM
Is it because it is not treating it as a character array and instead a string array?
 
117
Q: How do I replace a character at a particular index in Javascript?

SanthoshI have a string, let's say Hello world and I need to replace the char at index 3. How can I replace a char by specifying a index? var str = "hello world"; I need something like str.replaceAt(0,"h");

Try the solution there
 
!!> var txt = "abc"; txt = txt.substring(0,txt.length-1) + "F"
 
@Loktar "abF"
 
@Martin strings are immutable
 
5:54 PM
@Loktar I think they need to be able to change characters at arbitrary location, not necessarly last char
@FlorianMargaine So it seems
 
heh his answer is just a variation of what I posted actually to allow the replacing in arbitrary locations
 
replaceAt is not a function
 
@ZaferFatihKoyuncu Welcome to the JavaScript chat! Please review the room pseudo-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.
 
oh right I have to declare it
 
@serupticious Did you read the whole answer..?
 
5:55 PM
nope :)
 
@Loktar Yup
@serupticious Yeah there you go. Just declare that early on and you're set
(Not in the function that you will be calling more than once..)
 
Wow that crashed my browser
must be going out of array bounds
 
Doubtful
 
Just out of curiousity is selectionStart in a input box treated as an array indice?
 
I've never used it, but the description here looks like it is
 
5:59 PM
so if selectionStart = 0;
sel = selectionStart;
val.replaceAt(sel, "b")
texbox.val = val
hmmm
for some reason when I set the textbox value, it is keeping the old value to the textbox and then adding my newly manipulated one to the end of it
 
make a fiddle
 
Ok Martin, would you like credited in the project if you solve it? :)
 
Yeah but I gotta get the biggest name
Like some font-size: 72px shit you know?
;)
 
m59
Has anyone used bluebird with node-mysql? I followed the promisification instructions here, but my functions don't have then. github.com/petkaantonov/bluebird/blob/master/…
 
@m59 "don't have them" <- ?
 
6:04 PM
@serupticious - you know it's texbox.value right, not val
 
m59
then as in thenables?
 
@adeneo I'm retarded. Didn't even see that
 
m59
the functions aren't returning promises.
 
yea, was using pseudo code just to make it easy to type
 
@serupticious suuuuuure
 
6:05 PM
Sorry
seems if i hit backspace i leave the room
 
oh, nevermind, didn't realize you were wanting to make them into promises
 
@RyanKinal Too true. I'm earning way more than I deserve
 
@RalphWiggum bluebird can solve that :)
oh, my bad, that's the topic.
 
I should use Bluebird
 
lmao
 
6:07 PM
my current project is using node-mysql w/o an ORM or promises and there's some nested callbacks (like 2 instances)
 
@m59 the promise methods have the Async suffix
if the method is query, then you have to use queryAsync
 
m59
ohhhhh.
Got it.
 
@m59 this shows a better example: github.com/petkaantonov/bluebird/blob/master/…
> Promisifies the entire object by going through the object's properties and creating an async equivalent of each function on the object and its prototype chain. The promisified method name will be the original method name suffixed with "Async".
 
@serupticious - I'm guessing you want something more like
var textbox = //some textbox

var sel = textbox.selectionStart;
var arr = textbox.value.split("");

arr[sel] = "F";

textbox.value = arr.join("");
 
@adeneo yes, but the problem now is when i do join its adding "," after each char
nvm
 
6:12 PM
@serupticious - no it doesn't
 
i was just using arr.join();
 
unless you left out the quotes
 
Default value for .join() is comma?
 
Looks like it :) @Martin
 
Good to know!
So the person who hosts the API for the app I'm building is gone
And left his computer off
 
6:14 PM
Almost on the brink of solving this problem that will reinvent web browsing history
 
^ ooooooookay
 
"gone" as in dead, or "gone" as in afk
 
Gone as in left for the weekend
I think
And I'm supposed to come in on the weekend too!
 
EUREKA!!!
Holy moly
Well almost
You guys want to see my finished product?
 
Sure
 
6:22 PM
im 100% soaked :(
!!weather washington dc
 
@RUJordan Washington: 74.66F (23.7C, 296.85K), heavy intensity rain, thunderstorm, mist
 
ouu
intensity rain
 
!!weather antarctica
 
@serupticious [](openweathermap.org/city/3426466): -41.585C (231.565K), scattered clouds
 
!!weather montreal qc
 
6:23 PM
@Martin Montreal: 17.84C (290.99K), moderate rain, mist
 
!!weather pyongyang
 
@serupticious Pyongyang: 16.115C (289.265K), Sky is Clear
 
Woo that's better than before
 
!!weather glasgow
 
The bank next door tried to do a bbq -_-
 
6:24 PM
Only -41 in antartica 0.O
 
like... a whole group of us are just soaked to the bone
 
@serupticious Glasgow: 17.41C (290.56K), overcast clouds
 
!!weather moncton
 
@Cereal Moncton: 18.5C (291.65K), sky is clear
 
lol they need to impose a limit on weather queries
 
6:24 PM
!!no
 
@Cereal That didn't make much sense. Maybe you meant: ln, t, no
 
Can you search for questions only with an answer?
?sort=answered and ?sort=unanswered gives the same result...
 
@Martin yes.
 
@ludriv Welcome to the JavaScript chat! Please review the room pseudo-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.
 
this.say("Deal with it")
http://media0.giphy.com/media/q540XuK9hMxY4/giphy.gif
 
6:26 PM
@JanDvorak How
 
answers:1
assumes "at least"
 
GET var?
 
it's so fucking cold right now i cant work like this T_T
 
@serupticious you never showed the finished product
 
6:30 PM
OH
 
answers:0 assumes "exactly", larger values assume "at least"
answers:..3 does "at most three"
 
@Martin
I broke it again :S
Easy come, easy go
 
@serupticious Such is the life
 
how do the online now of users work on websites?
 
@Crow last request + request
 
6:36 PM
I don't know what you mean by that.
 
@awesomeguy Welcome to the JavaScript chat! Please review the room pseudo-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.
 
they are assumed to be online (say) five minutes after they have last made request
 
user2985029
@JanDvorak what is this?
 
so they could, still, be 'online' even if it says they're inactive?
 
@Crow or vice versa
@Alex just a random search to demonstrate the syntax
 
user2985029
6:40 PM
thanks :)
 
anyone use flask-bootstrap before?
 
6:56 PM
!!weather oslo norway
 
@adeneo Oslo: 17.9C (291.05K), scattered clouds
 
@Crow I use flask and I use bootstrap, does that count?
 
I'm trying to build an app in node, and I have objects whose constructors load state from a database. And then I'm trying to call methods on the new object which permute the state, and then save back to the database. But since the loading of the object is slow, by the time I call the affecting function the state isn't loaded yet, and the behavior is unexpected.

This is the gist of what I'm trying: http://pastebin.com/in7BA4Xc

Does anyone know how to solve this problem, or a better way to approach it?
 
!!weather timbuktu
 
@serupticious Timbuktu: 37.815C (310.965K), sky is clear
 
6:59 PM
@awesomeguy - with a callback or promises
new Game(gameID, function() {
    this.addUser(username);
});

function Game(gameID, callback) {
        db.games.findOne({
                _id: mongojs.ObjectID(request.gameID);
        }, function(err, doc) {
            this.state = doc;
            callback();
        });
}
Game.prototype.addUser = function(username) {
        this.state.players.push(username); // state hasn't loaded yet... ReferenceError
        db.games.save(this.state);
}
^ I'd probably use promises, not sure if this would be the instance there ?
 
anybody ever just sit back quietly and listen to all the mouse clicks in the office?
 
I sit back quietly and listen to the quiet "fuck"s in the distance
 
!!s/mouse/mechanical keyboard/
 
@SomeKittensUx2666 anybody ever just sit back quietly and listen to all the mechanical keyboard clicks in the office? (source)
 
@Cereal you listen to people fuck'ing? that's so weird bro
 
7:07 PM
@DeanOr Welcome to the JavaScript chat! Please review the room pseudo-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.
 
!!wheatly
 
user1596138
So it turns out you can unpay a bill. You just go to the bank and say "I didn't authorize that" and they flip shit and give you your money back.
 
@SomeKittensUx2666 not again D:
!!info wheatly
 
@RUJordan Command wheatly, created by RUJordan on Wed, 30 Apr 2014 21:13:21 GMT, invoked 3 times
 
7:11 PM
I wish it kept track of all time invokations
 
user1596138
@Cereal Hahahaha yeah those are the best
 
Here's the first line of an email he wrote!
 
user1596138
I do that so often.
 
<div style="margin-bottom: 0.0001pt; line-height: normal; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;
 
user1596138
That is amazing
 
7:12 PM
Anyone wondering why this ended up in the spam bin?
 
user1596138
!!doge css3,skill,amazing,wheatly
 
       wow
very css3
                 such skill
                        so amazing
many wheatly
 
How do you automatically add form data to the scope?
 
@AaronSiciliano Welcome to the JavaScript chat! Please review the room pseudo-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.
 
<form action="search.html" name="search-form" method="post" ng-model="formData"> ?
 
7:14 PM
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:#222222"><br></span>
more goodness
 
@SomeKittensUx2666 tell Wheatly I'm judging the shit out of him right now
Like right this second
 
user2620028
I have an issue with this fiddle regarding a settimeout to execute a slider rotate function jsfiddle.net/gZbhF
 
user2620028
If anyone wishes to help, it worked once and i dont recall changing the code and it stopped working and now i am working with the code i am not getting any responsive changes out of my changes to the code.
 
what's it supposed to do
 
user1596138
Weird
 
user2620028
7:19 PM
the rotate function is supposed to run, find all img src's that are of .thumbnail class and put them in an array and then iterate through the array and change the slider based on the image source
 
user2620028
jshint says dont make functions inside of a loop
 
user2620028
maybe if i abstract the timeout to a different function o.O
 
-1 overused joke ^ :D — RUJordan 13 mins ago
 
If I write ng-controller="SearchController" more than once in my HTML, do they share data? Or do they not care about eachother?
 
@AaronSiciliano Uncaught RangeError: Maximum call stack size exceeded
 
user2620028
7:24 PM
damn forgot to check console again lol
 
@Martin That sounds like it would be very easy to figure out
 
user2620028
so an overflow error? lol
 
@Shmiddty Well I mean it doesn't appear to be for me
But I'm wondering if I'm doing something wrong or not
They don't
 
user2620028
No recursion in ECMA?
 
7:27 PM
@AaronSiciliano your doing some crazyness
 
@Loktar you're*
 
user2620028
whaaaat its just an endless loop lol
 
@Martin thanks for that
 
;)
I'm a grammar nazi
 
fortunately I dont care about grammar.
 
7:28 PM
don't*
 
teehee
 
luckily i aint be cari'n bout dem werds
 
user2620028
@Martin you fixed you'r but not crazyness
 
much better
 
@AaronSiciliano I realized afterward haha
 
7:29 PM
bUt iF i ded i'LL let you no?
lol
 
lul
wot u up 2 m8
 
user2620028
so no javascript recursion without base case?
 
lul
 
not much m9
 
user2620028
what in the hell did i click in to here..... chat.stackoverflow.com/transcript/message/17139367#17139367
 
user2620028
7:32 PM
@Loktar In regards to your pro-tip. I have broken that one a couple times and always regret it :P
 
haha
 
user2620028
but it takes a long while for that regret to set in...... Totally worth it
 
Love this song.
 
Okay, so if I have a global header that allows a user to search; and the results are only shown on a specific page, how do I organize this?
 
Sometimes I feel like half the people in this chat dont actually do anything but sit in here and chat
 
7:37 PM
I guess I would have a controller for searching and for showing results, and a service to share data between them?
 
@BenCraig :gasp: Scandal! People in chat, chatting!?!? HOW DARE WE!?!?!
 
Sometimes I feel like people with 68 rep on SO just come to the site and creep on people in the chat.
 
@Loktar Creeping is the best part
 
stranger danger
 
:hides:
 
user2985029
7:44 PM
A FLY JUST LANDED ON MY ARM!!
 
Aww, he likes you
 
user2985029
i killed it
 
user2985029
it was buzzing around me and landed on the desk, so i grabbed a newspaper and did the deed
 
I'm calling PETA.
 
7:46 PM
fun fact Peta used to advertise on zombiegames.net
 
Sorry, PETI.
 
user2985029
i only did it because it landed on my arm! it attacked me
 
I got decent money from them actually
 
user2985029
peta sent me five pence once
 
7:47 PM
Thats terrifying
 
I just (jokingly) told my boss I'd write a content management API over the weekend.
 
But maybe I'll do it.
 
The sword would be like.. smaller than a thumbtack lol
 
I was thinking the fly was gigantic
 
7:48 PM
was so weird they wanted to advertise on zg.net
but whatever
 
Mo money mo ads
 
lol when you went to the site it would talk about humans not eating meat
and how bad it was
only zombies should..
 
that's slightly clever though
 
so Im like uhhh so when you die and rise again you go back to your natural instincts?
> I hated meat when I was alive, but can't get enough of it dead
 
lmao logic ftw
 
7:52 PM
@seduardo Welcome to the JavaScript chat! Please review the room pseudo-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
Guess nobody needs jQuery assistance
 

« first day (1336 days earlier)      last day (3619 days later) »