« first day (62 days earlier)      last day (269 days later) » 

5:16 AM
Well done @Sam!! Great work!
 
 
4 hours later…
Sam
8:48 AM
Thx! :D
For some reason I can't load the tavern...
 
 
1 hour later…
10:10 AM
:S
 
Sam
@Uni Quick Q: are you planning on parsing oneboxed messages?
 
@Sam Yep!
 
Sam
Ok, so are you just going to strip the link or try to parse the actual content?
For example,
<div class="onebox ob-message"><a class="roomname" href="/transcript/message/19971265#19971265"><span title="2014-11-15 18:33:43Z">19 mins ago</span></a>, by <span class="user-name">its_justjack</span> <br/><div class="quote">@Unihedron No, falling asleep</div></div>
^ that's a oneboxed chat message.
Would you try to parse the message, or just the trans link?
 
I'm going to take the "ob-..." class, then correspondingly act on it.
I'll be ignoring most of the one-box messages in JavaBot, but it's going to do something more practical in JCE.
 
Sam
Kk.
 
10:24 AM
BTW, that may or may not be .getAsActualEntity() where the web agent looks at the actual page and scraps paragraphs it feels like necessary for the corresponding ob-type.
 
Sam
? (I'm using the C#'s equivalent of BeautifulSoap for dom parsing...)
 
I'm using XPath locations HTML parsing library... forgot what it's called - -'
 
Sam
@Unihedron I have no idea what that method is/does.
 
@Sam It doesn't exist, but if I implement fetching the actual post / entity represented by the one-box, that will be its method name. :)
'Cuz, API design and implementation.
 
Sam
Ohhh.
I thought you were talking about some other message scraping method. facepalm
 
10:32 AM
I love programming and script language, libraries and API theories, design, and implementation. It fascinates me. I can read about it all day, while still screwing up when I actually go do the code.
 
Sam
lol, same. I've always been interested in modelling my own (or learning of new) architectures/systems/etc.
 
! :)
 
Sam
;)
 
Sam
10:45 AM
Have SE removed starring info? 'Cause I can't find it anywhere in the pages I'm scraping.
 
The star information only comes through the events.
Or so I thought
 
Sam
Right, that's what I thought.
Can you try starring something?
{"event_type":6,"time_stamp":1416307577,"content":"Can you try starring something?","id":5678632,"user_id":266094,"user_name":"Unihedron","room_id":774,"room_name":"Room for Uni and Inf","message_id":2671117,"message_stars":1}
 
:P
 
Sam
^ Yep, it's in the events. Thx.
 
Unstarring is the same event as starring.
So to check whether it's a star or unstar, cache previous star events. Preferably, map message-ids to collection of users, where presence of user in collection indicates it's an unstar event.
 
Sam
10:50 AM
I was just planning on calling the event with the current star count (with message info) and let the user figure it out ;)
 
:)
Well, I'm going towards "we're doing everything so the user doesn't have to unless they really want to and implement the factory themselves" route, like most Java libraries, so.
in Java on Stack Overflow Chat, 6 mins ago, by Unihedron
Brb, going to make dinner so I actually don't have to starve tonight.
 
Sam
lol, ok, cya!
Meh, I guess I could be a little nicer to my users. Ok, I'll pass the previous star count too.
@Sam Test ping star.
 
11:17 AM
I'm back! eagerly waits for dinner to finish itself
 
Sam
Wb :D
Unfortunately, I've just realised that my system doesn't permit me to get a message's perv star count (unless I add an ugly caching mechanism) :/
 
Sam
11:44 AM
Test onebox...
Test edit.
@Sam Test ping.
@Uni I've just found a way to solely get a message's content with chat markdown.
 
@Sam ?!
No way? Really?! Without parsing the history?
 
Sam
Simply GET from http://chat.{domain}/messages/{room ID}/{message ID}
 
:O OMG
 
Sam
^ that'll get the latest content. ;D
I tested it with $.get('http://chat.meta.stackexchange.com/messages/774/2671281')
 
OMG
YES
Or... go to http://chat.meta.stackexchange.com/messages/774/2671281
 
Sam
11:50 AM
Cool, didn't know you could do that :D
 
:D The later may be easier, since it's opening a connection as a simple input stream
That's wicked, makes my life so much easier, thanks :)
 
Sam
scraps message decoder class
 
secretly am glad that I gave up on working on message decoder class to momentarily delay it for later
 
Sam
IKR?! I only found out just a few secs ago. Np :D
lol
Ok, new plan. Get message info via websockets (*except* content) -> get message content via this new hack -> raise necessary event(s)
 
This plan is A++.
If the user wants to get additional information, they'll have to go through all the trouble and query the history page themselves get what they deserve. :)
 
Sam
11:59 AM
:)
 
Sam
12:12 PM
I've got my JS listener running... so I can see who's starring everything ;)
 
xD
 
Sam
darn auto-correcting
Ohhh, that gives me a brilliant idea.
 
Oh? Star game?
 
Sam
Nope.
An anti-star troll script (it'll just say who's starring stuff).
 
:o
 
Sam
12:52 PM
Ugh, formatting. I'll put it up on GitHub.
First, I need to eat...
 
Yum
 
1:12 PM
~ Not everything is star-worthy...
 
Sam
Does js have a ternary operator?
Like, something == null ? doA() : doB();
(I haven't used js properly for ages)
 
yes
my internet is fidgeting
 
Sam
Welcome to the club ;)
 
Aha, an IE window was hiding somewhere, killed it and now my internet runs fine
 
Sam
IE? :O
 
1:18 PM
Was surprised to see it too... :O
 
Sam
Almost finished the script...
accidentally killed chrome...
 
1:36 PM
LOL
 
 
1 hour later…
Sam
3:00 PM
Test
Spec char test: ¬`¦!"£$%^
Spec char test: ¬`¦!"£$%^&*()-=_+[]{};'#:@~,./<>?
 
Sam
3:16 PM
test
test
 
Sam
3:58 PM
Strange, CE.Net has write access, but I'm not getting anything over the socket... hmm
 
Spec char test: ¬`¦!"£$%^&*()-=_+[]{};'#:@~,./<>?
 
switches sound notifications to "when mentioned" instead of "visible rooms"
 
Sam
You had it on visible rooms?! :O
 
4:14 PM
Yep xD
Same for chat.SO
 
Sam
O_o
 
4:42 PM
User: Sam (un)starred/pinned message 2672808
User: Sam (un)starred/pinned message 2673021
User: Sam (un)starred/pinned message 2672807
User: Sam (un)starred/pinned message 2673021
User: Unihedron (un)starred/pinned message 2673021
 
Break it down into starred / unstarred. xD
 
Sam
Kk ;)
This is only a test, anyway.
 
Oh :P
 
Sam
Just a sec...
 
Hiya Sam
Hiya ProgramFOX
 
Sam
4:45 PM
Yes, UserJoin event works as well. :D
 
Hiya @ProgramFOX!
 
Sam
Hiya @Pro
 
Hiya!
 
User: Sam (un)starred/pinned message 2673058
 
Hiya @Gham!
 
Sam
4:51 PM
He's just my test subject while I debug CE.Net ;)
 
User: Sam starred/unstarred 2673081
 
... I meant that Gham should tell when we star or unstarr a message, without that alternation.
 
I don't know whether that can be checked.
Both actions have the same event type.
 
Checking the star count change...
Save a dictionary how many stars are on starred messages; If the starred message isn't on there, then it's a star; If it's on there but the count decreased since then, it's an unstar!
Java version: s,dictionary,map
 
Okay, then think about this:
The bot gets started up when a message has 2 stars.
Someone unstars that message --> it has one star.
Then the bot would think that is has been starred.
 
5:01 PM
@ProgramFOX I was about to add that as well - the number of stars already present should be computed on load.
 
Hmm... that might work.
 
Sam
What if someone stars/unstars a message that hasn't been previously recorded?
 
It's how I'm going to do it at least, since you get a batch of events whenever you join a room.
@Sam Logically not possible, but if so there'd be a logic error that fixes itself.
 
Sam
@Unihedron That can be changed. For CE.Net, it doesn't pre-load any messages.
 
@Sam Aww.
 
5:03 PM
@Sam There is a time limit so after some time (don't know the exact time), you cannot unstar a message anymore. Then you should only look at the stars of the messages posted within that time range.
 
Sam
It only loads messages as the user requests them.
@ProgramFOX That could be quite a few messages.
 
Hm, yeah.
 
Sam
20 mins ago, by Sam
This is only a test, anyway.
So it's not that important. ;)
 
I ran into a stupid problem (coding JCE).
 
Sam
Yesh?
 
5:07 PM
I wanted to define "MessageType"s which includes an implementation to fetch messages with a specified protocol. For example, HTML -> messages/id, MD -> messages/r/id
 
Sam
Right...
 
Since "id" is needed as part of the fetching, I decided to build a function which takes that room ID and translates it into a lambda so the agent can use it to fetch.
From there I could build the objects and define what they do, but there's a problem - fetching the messages also requires access to the web agent.
 
I don't think I understand you. Cannot you get the ID from the messages you fetch?
 
Yeah.
And actually, currently I have a way to get the plain version of a message, the markdown version of a message, or the HTML version of the message.
 
What's the problem then? You can use the agent to fetch the messages and take the ID from there.
 
5:11 PM
Oh yeah! I should make the agent itself part of the parameter.
... Thanks for the help! :D
 
Sam
wish I knew more Java
 
User: Sam starred/unstarred message 2673243
Bye Sam
 
Hiya Sam
 
Hiya @Sam!
 
Sam
5:15 PM
Hiya!
 
User: Sam starred/unstarred message 2673264
 
Sam
Ok, I'm satisfied CE.Net works well enough atm for Pham.
 
:D
 
Sam
5:43 PM
@Uni I forgot, have I told you how to get a list of all pingable users for a room?
 
@Sam I think you did.
A get request to "pingable" right?
 
Sam
Yeah.
/rooms/pingable/{room id}
 
@Sam Cool!
 
Sam
;)
 
:D
"[[208463,"MysticMagic",1416149587,1416146225],[222299,"Vogel612\u0027s Shadow",1416174178,1416139892],[245167,"Infinite Recursion",1416248389,1416248389],[177257,"SilentKiller",1416296396,1415861129],‌​[227577,"Sam",1416332757,1416332693],[271591,"Gham",1416332758,1416331104],[22943‌​8,"ProgramFOX",1416332758,1416332666],[266094,"Unihedron",1416332797,1416332797]]‌​"
Giving another try at websockets...
 
Sam
5:48 PM
[{user ID},{user name},{last seen},{last posted}]
^ I think
@Unihedron :D
 
aaaand failed horribly
why apache...
 
Sam
Are you setting the origin?
 
Hmm, perhaps I should just try to port your code over java...
 
Sam
frantically commits...
 
And it's always lost somewhere back there...
I mean the websocket listener script :P
 
Sam
5:51 PM
I still haven't committed since fixing the socket though.
 
2657770
 
Sam
$.post('http://chat.{domain}/chats/{room ID}/events', 'since=0&mode=Events&msgCount=1&fkey=' + fkey().fkey).success(function (o)
{
    $.post('http://chat.{domain}/ws-auth', 'roomid={room ID}&fkey=' + fkey().fkey).success(function(oo)
    {
        var ws = new WebSocket(oo.url + '?l=' + o.time);
        ws.onmessage = function (e)
        {
            console.log(e.data);
        };
    });
});
^ that?
 
pinned.
 
User: Unihedron starred/unstarred message 2657770
 
@Gham That's a pin...
 
Sam
5:53 PM
I removed the "pinned" part, since it's just called an "owner star".
So, kinda seemed redundant.
 
Oh.
@Sam Thanks!
 
Sam
Np :)
 
client.setOrigin(???)
 
Sam
I assume client is a websocket?
 
WebSocketClient client = factory.newWebSocketClient();
 
Sam
5:59 PM
??? == "http://chat.{domain}"
 
!!!
 
Sam
hopes Uni's PC hasn't exploded
 
Not confident enough to compile this...
Oh wait, gotta handle logging in..
er... forget it
 
Sam
Oh.
I forgot to ask, where are you getting your fkey from?
 
I'm not passing it
I thought I can watch the chat while logged out?
 
Sam
6:03 PM
I mean for getting the time thingy for the socket url.
@Unihedron I haven't tested it without logging in, yet.
 
oh.
Yay!
"200 OK"
 
Sam
:D
 
OMG :D
 
Sam
Are you getting anything?
 
Felt like my first "hello world"...
 
Sam
6:08 PM
:D
 
nope, I just posted to events and pended the future task to print the response
I'll amend the future task to work properly and get the websocket url..
 
Sam
Oh, right.
 
6:48 PM
Night!
 
Sam
Night!
 
Sam
7:15 PM
test edit
@Gham Hiya
test
jfkvjfjcsss
Hiya @gha
 
@Sam ...
 
Sam
@Gham
 
@Sam ...
 
 
2 hours later…
Sam
9:07 PM
Test
 
Somewhere someone coughSamcough starred something...
 
Sam
Huh?
 
Cya Sam.
Hiya Sam.
 
Sam
@Gham ...
@Gham jghfvhgvhgvfhjgfvhjgvfhjgvfh
@Gham Y U NO WURK?!
 
Somewhere someone coughSamcough starred something...
 
Sam
9:15 PM
@Gham test
edit
@Gham 1234
test
 
Somewhere someone coughSamcough starred something...
 
Sam
@Gham test reply
 
@Sam :2674703 test reply
 
Sam
@Gham another reply
 
@Sam :2674706 another reply
 
Sam
9:20 PM
@Gham How about this?
 
@Sam :2674660 How about this?
 
Sam
@Gham Just a normal mention...
 
@Sam @Gham Just a normal mention...
 
10:08 PM
Somewhere someone coughSamcough starred something...
 
Sam
@Gham test
 
@Sam test
 
Sam
@Gham Huh?
 
@Sam Huh?
 
Sam
@Gham `¦¬!"£$%^&*()_+-={}[]:@~;'#<>?,./
 
10:10 PM
@Sam `¦¬!"£$%^&*()_+-={}[]:@~;'#<>?,./
 
Sam
@Gham . .
 
@Sam . .
 
Sam
@Gham @Gham
 
@Sam @Gham
 
Sam
@Gham @sam
 
10:12 PM
@Sam @sam
Somewhere someone coughSamcough starred something...
 
Sam
in SO Close Vote Reviewers on Stack Overflow Chat, 4 hours ago, by gunr2171
Roses are red,
close votes are blue
15 minutes till event
Join us, won't you?

We won't bite
We just want to help
Got a question?
Give us a yelp!

Rene will chose a tag
Our efforts combine
Soon that review number
Will be in decline

Eventually the queue will be clear
And the process will be slow
But then we can enjoy
Stack Overflow
 
in SO Close Vote Reviewers on Stack Overflow Chat, 4 hours ago, by gunr2171
Roses are red,
close votes are blue
15 minutes till event
Join us, won't you?

We won't bite
We just want to help
Got a question?
Give us a yelp!

Rene will chose a tag
Our efforts combine
Soon that review number
Will be in decline

Eventually the queue will be clear
And the process will be slow
But then we can enjoy
Stack Overflow
 
Sam
in Tavern on the Meta, 4 mins ago, by hichris123
You are a developer and you don't have a Stack Overflow account with at least 15 rep? You have brought shame upon your family.
 
10:15 PM
in Tavern on the Meta, 4 mins ago, by hichris123
You are a developer and you don't have a Stack Overflow account with at least 15 rep? You have brought shame upon your family.
 
Sam
11
Q: Content on site slowly becoming more and more like Y! Answers

thinly veiled question markWe're treading down a wrong path here, there needs to be some quality control in terms of answers. Just treating everything as "it's creative, don't hate" is such a bad way to regulate question and answer quality. For example, this question: A man pushes his car An answer like this: http://puz...

11
Q: Content on site slowly becoming more and more like Y! Answers

thinly veiled question markWe're treading down a wrong path here, there needs to be some quality control in terms of answers. Just treating everything as "it's creative, don't hate" is such a bad way to regulate question and answer quality. For example, this question: A man pushes his car An answer like this: http://puz...

11
Q: Content on site slowly becoming more and more like Y! Answers

thinly veiled question markWe're treading down a wrong path here, there needs to be some quality control in terms of answers. Just treating everything as "it's creative, don't hate" is such a bad way to regulate question and answer quality. For example, this question: A man pushes his car An answer like this: http://puz...

11
Q: Content on site slowly becoming more and more like Y! Answers

thinly veiled question markWe're treading down a wrong path here, there needs to be some quality control in terms of answers. Just treating everything as "it's creative, don't hate" is such a bad way to regulate question and answer quality. For example, this question: A man pushes his car An answer like this: http://puz...

11
Q: Content on site slowly becoming more and more like Y! Answers

thinly veiled question markWe're treading down a wrong path here, there needs to be some quality control in terms of answers. Just treating everything as "it's creative, don't hate" is such a bad way to regulate question and answer quality. For example, this question: A man pushes his car An answer like this: http://puz...

 
11
Q: Content on site slowly becoming more and more like Y! Answers

thinly veiled question markWe're treading down a wrong path here, there needs to be some quality control in terms of answers. Just treating everything as "it's creative, don't hate" is such a bad way to regulate question and answer quality. For example, this question: A man pushes his car An answer like this: http://puz...

 
Sam
Awesome! It worked! :D
 
Somewhere someone coughSamcough starred something...
 
Sam
You are a developer and you don't have a Stack Overflow account with at least 15 rep? You have brought shame upon your family.
You are a developer and you don't have a Stack Overflow account with at least 15 rep? You have brought shame upon your family.
 
10:30 PM
You are a developer and you don't have a Stack Overflow account with at least 15 rep? You have brought shame upon your family.
 
Sam

Room for Uni and Sam

... and whoever that comes across this room. Nothing much real...

Room for Uni and Sam

... and whoever that comes across this room. Nothing much real...

Room for Uni and Sam

... and whoever that comes across this room. Nothing much real...
Strange, CE.Net seems to have trouble parsing oneboxed chat rooms and user profiles...
 

« first day (62 days earlier)      last day (269 days later) »