« first day (74 days earlier)      last day (4943 days later) » 

Joe
12:01 AM
What is this, then?
 
12:13 AM
'ello people, what did I miss in my 6.5 hours of sleep?
 
The usual.
 
we had a raving party
gosh, too bad you missed it
(;
 
I went and had fondue, does that count as something you missed?
 
i did random stuff. chilling now. totally redesigning my SEChatModifications code
 
Oh right, I wanted to try my hand at some chat modifications too, hmm.
 
12:23 AM
in a bit i'd love some feedback, my js skills can generally see some improvement
 
@rchern Go to the Javascript room on SO, and ask for a code review
 
(:
 
I'd also like some code review too, actually
 
i've got a command pattern thingadongdong going now
 
@rchern Can I haz see ur latest version? ;)
 
12:25 AM
still working on it
 
12:37 AM
guess i should see if this thing still works (;
 
That's a minor detail best left for last.
 
agrees
well, well, whaddya know
a few minor issues from refactoring and forgetting to change a name in a couple spots but otherwise
 
Nifty
 
ok, so i look for commands that start with "/". if i type /blah and hit enter, but blah isn't a command, what would the expected behavior be?
send /blah to the room? use my error handling to say it isn't a command and clear the input? show the error and leave it in the input?
same goes for if i do /star abc which is invalid because abc isn't a number
 
12:53 AM
Maybe turn the text red in the input?
And give some additional error clue
Although that would break /me...
 
i've got a little div that fades in and out to display an error. like if you do /star abc then i use that to show there was an error
it currently clears out the text
 
Are you a Visual Studio expert? ;)
in The SO Tavern (General) on Stack Overflow Chat, 3 mins ago, by Wil
Are there any Visual Studio Experts here? Have a quick question that has been driving me mad all day... (Not really suitable for a SO question)
Ah, that works. I wouldn't clear the text though, since maybe it was just a simple typo.
 
so only clear the text if the command was successful, but always stop event propagation and bubbling if the input starts with "/"?
 
I'm not sure if that's ideal, since there's many /things that you don't have commands for that people might want to imply. How is your command structure set up now, roughly?
I'm conflicted on this, heh.
 
i think i need 3 return values, rather than just true/false, i need true/false/not-handled
 
yada (;
 
Why are you so evil Greasemonkey?
2
@rchern Do you develop this stuff in Chrome or Firefox?
Ah ha, nevermind. Figured it (the reason I was asking) out.
 
chrome
 
Joe
@TimStone lol :)
binary logic is the substrate, but that doesn't mean we're limited to it :/
 
@Joe You're the user who asked the..interesting question with the Strong Bad reference earlier, right? :P
 
1:18 AM
posted in the js room on chat.so
 
Lemme open yet another tab :P
 
i have 3 chat tabs. meta, so, wa
 
@rchern Should 'ell the good people of the Javascript room what that evil code actually does ;)
 
They're smart JSers, they can figure it out ;)
 
lol
 
1:20 AM
I keep one open per room, heh.
 
@TimStone So do I
But it quickly adds up
 
hehe, /join won't be so useful for you then
 
I really need Firefox 4's tab separation mechanism
 
@YiJiang I don't know if you ran into this problem, or if it's just me being ignorant, but syntax exceptions in Greasemonkey scripts wouldn't show in the Firebug console. Turns out you need Show Chrome errors enabled, heh.
I've got them all in a separate window on one of my side screens, heh.
 
o: i ran the code through jslint. you're getting syntax errors?
 
1:22 AM
Oh, no, that was just why I was asking you about Chrome earlier, because I thought that the Greasemonkey/Firebug combination was being ignorant. Turns out it was just me. All around, a much easier fix.
 
oh ok
chrome reports the error in the console and won't load the extension
 
Greasemonkey just doesn't load the extension, heh.
It's just like "Meh. *shrug*"
 
@TheUnhandledException so how's SC?
 
Oh, did he finally make it there in one piece?
 
@TimStone thought i saw some chatter to that effect in the transcript
(I'm back, btw)
 
1:25 AM
@TimStone Ah, thanks for the tip
 
Ah, good stuff. Also, welcome back.
 
Hehe.. can't believe it took this long for this question to appear
-3
Q: What does chat offer that IRC does not?

CasebashWhy do we have our own separate chat system rather than going with IRC? What does the current chat client offer that IRC can't and what benefits could this choice have in the future?

Downvote away!
 
don't downvote
it's a dupe
dunno why you'd downvote...valid question at least (;
and it isn't a feature request so it isn't that you disagree with the request (;
 
@rchern I think those are from the early days of chat.meta
 
so?
 
1:29 AM
@rchern Downvote = disagree, remember?
 
@rchern What is it a dupe of?
 
I don't know that there's actually anything to disagree with there..
 
Man, it is weird to be looking at a question, then enter chat and find people talking about the exact same question.
 
@rchern Features change - it's clearly superior to IRC, I think
 
@YiJiang, what are you disagreeing with?
 
1:30 AM
@PopularDemand that's what this is here for, non?
 
@PopularDemand But does it really surprise you? :P
 
@rchern Actually, it's more of a case of RTFM
 
hehe @PopularDemand, i was going to add a comment saying I had just said what you commented, but i refrained
@YiJiang how?
 
@PopularDemand and actually, I was going to post a feature request for "chat about this question"
as a link on a particular question
 
Right there in the faq, second last question
 
1:30 AM
@MarkE You can add "chat." to any question's URL and create a room about that question.
 
@YiJiang, so answer with that.
 
@MarkE This exists...what he said!
 
oh
but there's no hyperlink
 
this just seems like another example where people see irc and pull out their torches.
 
@rchern She said it! Burn the witch!
 
1:31 AM
Another missing hyperlink! Quick, to the collection @rchern!
 
@rchern - The question seems to imply that IRC could substitute for chat. That's what the down votes are against.
 
@PeterAjtai Seeing ghosts that aren't there.
 
@PeterAjtai, um no? it is asking what the differences are.
 
Okay, I'm hitting a bit of problem with this new code I'm working on
 
@rchern - That's why I said "seems to imply"
 
1:32 AM
nobody in the js room is responding >_<
 
@PopularDemand also, how would I know someone has created a room about the question without going to the chat page?
 
	function buildRoom(success) {
		$.get('/', {
			'tab': 'all',
			'sort': 'active',
			'page': 1
		}, function(data){
			var rooms = [];
			var page = $(data);
			var room = page.filter('.roomcard');
			var roomLength = page.filter('.pager').children('a').length;

			function insertData(){
				var $this = $(this);
				var id = $this.attr('id');
				rooms.push({
					'name': $this.find('h3').text(),
					'id': id.substring(id.indexOf('-') + 1)
				});
			}

			room.each(insertData);

			if(roomLength > 1){
 
@YiJiang That is more of a legitimate point, but the FAQ explanation is uselessly sparse on the actual details, so I still think the question is reasonable. :)
Damn you chat and your "l is null" errors.
 
it'd be better if the question indicated there was a chat about it
 
The chat HTML is broken apparently
Because trying to get jQuery to parse the DOM fails pretty badly
Also, the callback I'm working with doesn't seem to work
 
1:35 AM
@MarkE I don't think you can know that.
 
@PopularDemand I agree, but it'd be nice if we did
 
The generated HTML doesn't look too bad, what's fails @YiJiang?
 
and actually, we could know that, but we don't
 
@MarkE No argument there. I think I said that a week ago and got no response.
 
@PopularDemand i'll upvote!
 
1:36 AM
@TimStone You've tried $.get('/', function(data){ console.log($(data)); });
 
..Ah.
 
@TimStone Why is it doing that?
 
ok, since people are chatting here and not there, anybody care to take a look and give me feedback on how i did the command pattern stuff? privatepaste.com/6545b82f6d
 
Sorry, I started to look at it earlier then got distracted, heh.
@YiJiang Hm..
@YiJiang Actually, I guess you'll need to restate the problem, sorry.
It's ugly looking, but correct?
 
@TimStone It's not, the DOM structure isn't correct
 
1:42 AM
It isn't?
@rchern Looks pretty good to me. Were you concerned about any part in particular, or just a general "Is this how you would do it?" sort of thing?
 
mostly just in general regarding the command structure, validing params, error handling
 
@TimStone $.get('/', function(data){ console.log($(data).filter('#hlogo')); console.log($(data).find('#logo')) })
#hlogo is the site logo that exists on the top of the chat room homepage
And somehow jQuery can't find it
 
you're missing the h in the find
 
@rchern Still doesn't return anything
 
1:48 AM
@rchern Eh... you're doing that locally, right?
I'm talking about the stuff you get back from that ajax request
 
Hmm, yeah.
 
look at $data, seems to just be the array of rooms
 
@rchern That's the point! That isn't the full DOM structure
 
probably thinks it is the mobile version
 
@rchern Can't be right.. how does that happen?
 
1:51 AM
$.get doesn't send a user agent does it?
i've never really looked honestly
 
@rchern Neither have I
 
Let
s see
 
Hmmmm...
 
23 hours ago, by Popular Demand
@YiJiang Singapore: unsupported!
 
but from looking at what gets returned, it looks like what i see on my phone...so...just a guess
 
1:53 AM
@rchern There's also a bunch of textnode, which should never appear in jQuery objects
 
where?
 
@rchern The empty space between each of the rooms, the , ,, those are the TextNode
I thought jQuery doesn't accept those....
 
alright if nobody has issues with my code structure i'll add highlight i guess
 
1:58 AM
@rchern It does, X-Requested-With: XMLHttpRequest is also sent.
 
well something is different
 
$(document.createTextNode("Hello!")); returns null
Actually no, scratch that, it works
jQuery(<TextNode textContent="Hello!">)
 
@rchern The server might return something different based on the presence of that header for reasons unknown, heh.
 
@TimStone I still think it's because the HTML is faulty in some way and jQuery is choking on it
 
It is faulty.
But I don't think it's that faulty.
Let's find out!
 
2:02 AM
186 Errors, 90 warning(s)
 
it's really nice when people post questions that contain their answers
 
@YiJiang No, that's the only HTML that's returned.
 
and then give you 25 points for telling them what they told you
1
A: PHP functions in included files

MarkSet the action to point to the file that includes content.php. You seem to have basically this: index.php: <?php include('header.php'); switch($_GET['a']){ case 'foo': include('content1.php'); break; case 'bar': include('content2.p...

 
Heh, nice :P
 
$.get('/', console.log);
Hehe... passing in console.log as the success callback
 
2:06 AM
Yeah
If you send that header it only returns the partial view
I guess it's being used or intended to be used for some purpose.
 
@TimStone You're right
Hmmm..
I think I'll ask it on chat feedback
 
hrm. /me isn't working. failing on the call to join
 
This post has been edited too many times
 
in Chat feedback on Stack Overflow Chat, 1 min ago, by Yi Jiang
Question: Why does chat return only partial HTML when ajax requests are used to retrieve it's HTML
 
I bet I know, heh.
 
2:09 AM
Object #<an object> has no method 'join'
 
One sec.
 
@rchern What are you calling join on?
 
Arguments[2]
    0: "tries"
    1: "again"
the command parser splits the line into an array, so for /me to wrap them in ** i need to join them together
should be simple, but apparently my brain has shut down (;
 
@rchern Arguments.join() doesn't work?
 
@YiJiang The reason why you get a partial view..
Is because that's what's used to refresh the main page, heh.
Though it makes the request to /rooms, I guess the effect is the same.
 
2:14 AM
@TimStone What do you mean?
Oh, I see. Hmm.. okay, well then
 
@YiJiang If you sit on the main page long enough it updates the rooms with a AJAX request
Yeah
 
me: function () {
            console.log(typeof (arguments));
            console.dir(arguments);
            input.val("*" + arguments.join(" ") + "*");
            $("#sayit-button").click();
        }
 
arguments isn't an array though.
It's an "array-like object", to quote Mozilla, heh.
 
omg, seriously, the homework kiddies are killing me
0
Q: Looking through an array for an empty string

fprimeAn array of Strings, names, has been declared and initialized. Write the statements needed to determine whether any of the the array elements are null or refer to the empty String. Set the variable hasEmpty to true if any elements are null or empty-- otherwise set it to false. hasEmpty=false...

2nd post from this guy in 10 minutes about some sort of array manipulation
 
@TimStone ugh, so i have to loop through it
 
2:17 AM
@MarkE Hahahaha.... that's definitely homework copy and paste
 
@rchern Nah, you can use $.makeArray() if you prefer.
I think that works OK too.
 
@YiJiang well, it's a segment of "populate this whole class"
and we're going to get the next 10 pieces
by breaking it up he'll get the whole assignment
 
makeArray just to call join?
 
@rchern You can see what methods the object has console.log(argument)
 
@rchern One liner!
...
Dang chat
 
2:18 AM
@TimStone ?
 
Timing mistake.
 
you can fit a heck of a lot on one line, doesn't make it better or optimized (;
we could put the entire master-chat.js on one line (;
 
@rchern shrug :P
 
tries again
there we go
now to see what i can screw up with @YiJiang's highlight (;
 
Heheh
I tested that it wasn't implemented yet, now I'll be able to test that it works. Complete coverage!
 
2:22 AM
@rchern Well, it's only highlighting, how can you screw up? :P
 
@YiJiang, i thought you said it could do a user id or user name? at a glance it seems to do user id or message id?
@YiJiang please don't make that sound like a challenge ): heh.
 
@rchern Username or message id
Unless you screw up :p
 
what's the purpose of highlighting a message id?
a single one?
 
@rchern Bookmark a specific message which you can come back later to
 
For keeping temporary tabs on something.
 
2:24 AM
fair enough
 
I don't understand
GM seems to be causing scoping problems
 
How so?
 
@MarkE It's awesome, thanks! Marriott does a great job
 
@TheUnhandledException I've been pretty happy with Marriott
usually try to stay at one when i travel for work
anyone want to help kill this?
0
Q: How do i use JNA with a linked list on Solaris

JonHow do i use JNA with a linked list on Solaris

 
Was just quickly checking emails to make sure everything's OK in my absence. Headed AFK again. I'll be on and off throughout the week
 
2:32 AM
@TheUnhandledException enjoy your vacation!
 
@MarkE Voted to close
 
Hi @GeorgeMarian, glad to see you made it @TheUnhandledException, heh :P
 
@MarkE Thanks! You'll probably see me back in here before the week's up ;-)
@TimStone LOL. Yes traversed the boonies without incident ;-)
 
Good stuff :D
 
hi/bye @TheUnhandledException
 
@TimStone heh...made it for what? ;)
 
Hi/Bye @rchern! :-)
Catch everyone later!
 
@TheUnhandledException see ya
 
I'm trying to use ajax to obtain a list of rooms
 
@GeorgeMarian Yeah, combined sentence fail there, sorry ;)
 
2:34 AM
And then use that information to power some new commands
 
@YiJiang Oh, you just want the rooms list?
 
oh are you doing something like /list? that's what i was gonna do after highlight hehe
 
@TimStone But console.log(rooms) inside the event handler seems to return undefined
@rchern I was actually modifying /join to actually do room joining
Instead of room switching
But of course with a list of rooms and their id it's possible to do lotsa stuff
 
yeah, once i had /list i was gonna switch the names
 
You might want to try http://meta.stackoverflow.com/api/recent-chat instead?
 
2:39 AM
@TimStone They have an api for that O_o?
 
I'm a cheater and noticed the other day when looking at how the side bar ads are loaded :P
 
@TimStone Dammit... wasted so much of my time on that
 
Sorry, I didn't realize what you were trying to do, heh.
 
But it still doesn't explain the scoping issue
 
But the JSON is probably much friendlier for your purposes.
Yeah, let me look at the code and see what's up with that.
 
2:41 AM
@TimStone I still want the api calls to happen outside the event handler so that it won't breach the api limit
 
you guys! Still Javascripting about
 
@AidenBell Merrily merrily Javascripting around
 
ah
I know one thing, I hate SQL
 
@YiJiang You're talking about the log statement on line 116?
@AidenBell Heh, why's that? :P
 
It is just soooo clunky
 
2:44 AM
@TimStone Yeah
 
Id rather pickle object to disk
 
I think I'm missing something here... urh
 
Hah
Hmm.
 
@TimStone will you say something please?
 
Sure
 
2:50 AM
sweet, highlight works (:
 
@rchern highlight?
 
@rchern Also have to check for the /clear command
Whether the livequery expires correctly
 
@YiJiang, i did /addhl and /delhl
 
@rchern Can't we just leave it as /highlight :P?
 
well, delhl works on a selector also
 
2:51 AM
@MarkE Scary userscript things are happening, heh.
 
ah
 
/addhl Yi, /addhl Tim, /delhl Yi and @TimStone's is still highlighted
 
someone should make something to turn @rchern's smilies right-side-up
 
pfft
 
@rchern Hmm... nice
 
2:52 AM
so you're welcome to suggest better naming, but i don't have a global clear
 
@MarkE Should be simple to make
 
anybody who does that doesn't get to use my script >_<
 
haha
where is this userscript stuff kept?
browser side?
 
@rchern Might want to include that, seems useful. Of course you can always reload the page
@MarkE Client-side, yes
 
firefox I assume, (not chrome?)
 
2:53 AM
yeah, highlighting has a very limited use given switching rooms
 
Although in this case the script does have some server-side requirements
 
@MarkE, chrome too.
 
@MarkE Chrome also have userscripts
 
well, if you use my version, not @YiJiang's heh
@YiJiang, server-side requirements?
 
@rchern I've updated mine to remove the GM_style function
 
2:54 AM
ah, so you could have a flip smilies option, which turns them left-side-up
d:
 
@rchern You'll need that livequery plugin stored somewhere
 
requiring an internet connection doesn't count as a server-side requirement
 
@rchern Maybe use HTML5 localstorage for persistence?
 
meh.
adds that to the maybe later list (;
 
@TimStone So erm... why is my code failing?
 
2:57 AM
Good question, I'll run it and see what happens, heh.
 
okies, highlighting is good.
 
Got sucked back into my own script for a moment ;)
 
next! rofl
 
@rchern Can I haz see ur script now :P?
 
So I think there's a bug with removing an upvote from an answer
possibly a late upvote
somehow the upvote is sticking in the system
anyone else seen this?
 
2:58 AM
@YiJiang updated on server
 
i upvoted, then some time later removed the upvote, and now i've decided to upvote
 
Let's see.
 
but the system tells me i've already upvoted, and when i query for the score it's +0 -1
 
but i haven't voted on it!
and it's total is 0
0
Q: Multiplying and Dividing by Two

yodieWhy are these two snippets of code giving two different results? double sum = 1.0; double xSqFour = x * x / 4; for (int i = 48; i > 1; i-=2) { sum = 1.0 + (xSqFour / ((i/2) * (i/2))) * sum; } return sum; and double sum = 1.0; double xSqFour = x * x / 4...

 

« first day (74 days earlier)      last day (4943 days later) »