News for hackers. Stuff that matters.
Re:I made a browser-based chat app. Based on node.js and nod... by keyle on Monday August 09, 2010 @10:51PM (#1590279)
That was fantastic and fast, but it definitely needs Flood control http://www.irchelp.org/irchelp/mirc/flood.html and http://en.wikipedia.org/wiki/Internet_Relay_Chat_flood
Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Tuesday August 10, 2010 @01:10AM (#1590516)
Definitely needs flood control. Thanks for the ref. I'll read up on it.
Re:I made a browser-based chat app. Based on node.js and nod... by dprice1 on Tuesday August 10, 2010 @02:08AM (#1590629)
I got a series of "lol" popup dialogs, then was pushed out of the room and returned to Hacker News. I was fairly frightened by this turn of events and won't return using my normal browser without some assurances that I'm not going to be victimized. I guess I'll fire up a virgin firefox profile and try some more.

On the user interface side, it would make sense if any line starting with "/" was interpreted as a command (legit or not). Otherwise, you'll have a lot of "/help" and so forth in the channels. Especially since "/print" is a valid command.

Update: Not sure, but I think someone has now injected some JS which causes everyone else in the channel to continuously spam it with the word "crash". Good times...

Re:I made a browser-based chat app. Based on node.js and nod... by davi on Monday August 09, 2010 @10:48PM (#1590269)
wow too bad it tanked so quickly with spammer types

very cool and thought provoking. BTW, I was "foo". :)

Feature request: When I log out & come back to a room, the conversation should still be there.

edit: interesting, someone just downvoted a bunch of comments here. HN has grown large and attractive to idjits. I upvoted the zeros back to ones.

Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Tuesday August 10, 2010 @01:10AM (#1590515)
Re: spam Well I was half expecting it. I suppose now we sorta know how it holds up to heavyish traffic, even if it's spam...

Thing is twich rooms don't hold any history. it works more like throwaway chatrooms atm.

Persistent rooms - I'm strongly considering implementing down the road.

Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Monday August 09, 2010 @09:53PM (#1590180)
You can spawn your own twich room by just linking to

http://twich.me/any_room_name or http://2wi.ch/any_room_name

Works on iOS and Android too.

Comments and feedback appreciated.

Re:I made a browser-based chat app. Based on node.js and nod... by jasonz on Monday August 09, 2010 @10:48PM (#1590272)
looks great, can I control who is in my room if I make one?
Re:I made a browser-based chat app. Based on node.js and nod... by profitoftruth85 on Monday August 09, 2010 @10:52PM (#1590286)
This should definitely be a feature. Also, when somebody posts it scrolls down to the bottom. Sometimes the bottom half of the window showing the chat turns black and blocks out the text in opera on mac.
Re:I made a browser-based chat app. Based on node.js and nod... by keyle on Monday August 09, 2010 @11:54PM (#1590385)
One neat thing would be what you would expect of a IRC client: when you hit <tab> it auto completes the nickname. That would improve actual discussions.
Re:I made a browser-based chat app. Based on node.js and nod... by keyle on Tuesday August 10, 2010 @12:21AM (#1590446)
Also another neat thing would be a favicon. I say that because I got the channel pinned as an application (Google Chrome) and it shows a default icon.
Re:I made a browser-based chat app. Based on node.js and nod... by rksprst on Monday August 09, 2010 @10:48PM (#1590274)
Bug (or feature I guess): if I scroll up and someone posts, it autoscrolls me down to the page.
Re:I made a browser-based chat app. Based on node.js and nod... by entropie on Tuesday August 10, 2010 @12:19AM (#1590440)
Annoys me too. But overall, a nice thingy.
Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Tuesday August 10, 2010 @01:04AM (#1590510)
Agreed, the User Experience definitely needs a lot more work. Thanks for feedback.
Re:I made a browser-based chat app. Based on node.js and nod... by carbocation on Monday August 09, 2010 @11:41PM (#1590368)
If someone types an extended string of unbroken characters, you should break that string for them. If you don't, the horizontal autoscroll bar appears and actually blocks the 1 most recent comment.
Re:I made a browser-based chat app. Based on node.js and nod... by jerf on Monday August 09, 2010 @11:41PM (#1590369)
Unless you've fixed a XSS bug in the hour since it was posted here, kudos on being the first Node.js chat site I've seen like this that was not vulnerable to XSS discoverable within ten seconds.
Re:I made a browser-based chat app. Based on node.js and nod... by zepolen on Monday August 09, 2010 @11:47PM (#1590375)
The actual app is pretty well xss proofed.

But, unfortunately if you go to this link...

    http://twich.me/<script>alert(document.cookie);</script>
(had to stick it in code block because HN auto marks it as spam)
Re:I made a browser-based chat app. Based on node.js and nod... by jerf on Monday August 09, 2010 @11:52PM (#1590384)
Ah, alas, I stand corrected. That's a 10-second one. I didn't do much more than a 10-second pass, that's usually sufficient.
Re:I made a browser-based chat app. Based on node.js and nod... by zepolen on Tuesday August 10, 2010 @12:19AM (#1590439)
Unfortunately there was also another one in the youtube embedding feature, took half an hour to find :)
Re:I made a browser-based chat app. Based on node.js and nod... by heyadayo on Monday August 09, 2010 @10:48PM (#1590271)
Open sourced code or it didn't happen.
Re:I made a browser-based chat app. Based on node.js and nod... by fuelfive on Monday August 09, 2010 @11:48PM (#1590378)
bump
Re:I made a browser-based chat app. Based on node.js and nod... by akkartik on Monday August 09, 2010 @10:57PM (#1590299)
How's it different from http://github.com/ry/node_chat?

Here's my clone with a shared jukebox: http://github.com/akkartik/node_chat

Re:I made a browser-based chat app. Based on node.js and nod... by jackowayed on Monday August 09, 2010 @10:59PM (#1590300)
infinte rooms. so you just go to twitch.me/foobar and send other people that link. You're chatting with just those people.

Sure, you could host node_chat yourself, but a) then you have to host node_chat yourself, and b) if you found yourself in a situation where you wanted 2 rooms open at once, you'd have to start up another instance of node_chat.

Re:I made a browser-based chat app. Based on node.js and nod... by akkartik on Tuesday August 10, 2010 @12:46AM (#1590482)
Ah.
Re:I made a browser-based chat app. Based on node.js and nod... by KingOfB on Monday August 09, 2010 @10:49PM (#1590275)
Great work, was fun till the spammers showed up.

You leaning towards open sourcing it or selling access to chat servers?

Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Tuesday August 10, 2010 @01:00AM (#1590505)
Thanks. Yeah I'll definitely have to work on the spamming. Leaning towards open sourcing it and maybe run a hosted service.
Re:I made a browser-based chat app. Based on node.js and nod... by mike-cardwell on Tuesday August 10, 2010 @04:13AM (#1590837)
Beautiful.

However, your restrictions on names are too strict. I should be able to use the name 話筒. Nice that I can use chinese characters in the chat room name though.

Do you have any intention to monetise this? If so, do you have any ideas you'd be willing to share?

Re:I made a browser-based chat app. Based on node.js and nod... by mike-cardwell on Tuesday August 10, 2010 @04:17AM (#1590841)
Also, do you intend on making it possible to use without javascript enabled? An iframe for the chat input and one for the output each doing long polls with meta refreshes should do it. Considerably less efficient of course, but opens the app to more users...
Re:I made a browser-based chat app. Based on node.js and nod... by RiderOfGiraffes on Tuesday August 10, 2010 @05:33AM (#1590976)
Can't read the dark grey on black.
Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Monday August 09, 2010 @11:12PM (#1590314)
hi everyone. suggestion: start your own twich by just linking to http://twich.me/[roomname]

and post the link to get others chatting with you. it's getting too crowded in the main room.

Re:I made a browser-based chat app. Based on node.js and nod... by statictype on Tuesday August 10, 2010 @01:00AM (#1590504)
Interesting because injecting script tags shows them properly escaped but also seems to be evaluating them. Not sure how both can happen at the same time.
Re:I made a browser-based chat app. Based on node.js and nod... by denik on Tuesday August 10, 2010 @01:07AM (#1590512)
here's another long polling chat, in Python and with source code: http://chat.gevent.org
Re:I made a browser-based chat app. Based on node.js and nod... by d0m on Tuesday August 10, 2010 @12:04AM (#1590416)
Really out of subject; but those colors are pretty cool. I wish I had a theme like that for Textmate or IRC.
Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Tuesday August 10, 2010 @01:13AM (#1590519)
Color scheme is homage to original nodechat demo which uses the same. http://chat.nodejs.org/
Re:I made a browser-based chat app. Based on node.js and nod... by chegra on Tuesday August 10, 2010 @02:17AM (#1590641)
Love it, I'm at http://twich.me/chegra
Re:I made a browser-based chat app. Based on node.js and nod... by jarin on Monday August 09, 2010 @10:35PM (#1590251)
I love the embedded YouTube :)
Re:I made a browser-based chat app. Based on node.js and nod... by woogley on Tuesday August 10, 2010 @12:33AM (#1590464)
I think I would be more impressed if this used WebSockets or something. How many Node chat apps have we seen? .. Actually, how many AJAX chat apps have we seen? I'd like to see a different network project, or at least one that uses sockets instead of AJAX polling ..
Re:I made a browser-based chat app. Based on node.js and nod... by jacquesm on Tuesday August 10, 2010 @02:27AM (#1590656)
Would you like a pony too?

How about you build one?

Re:I made a browser-based chat app. Based on node.js and nod... by kwamenum86 on Tuesday August 10, 2010 @12:52AM (#1590491)
Still vulnerable to XSS...
Re:I made a browser-based chat app. Based on node.js and nod... by lalalala on Tuesday August 10, 2010 @01:14AM (#1590520)
for (i=0;i<=500;i++) { $('input#entry').val('kjhjkh' + i); $('input#entry-btn').click(); } or you could just push it to the url

heaps of people have injected js too

Re:I made a browser-based chat app. Based on node.js and nod... by netaddict on Tuesday August 10, 2010 @02:34AM (#1590669)
while(1){ $('input#entry').val('hahaha'); $('input#entry-btn').click();}
Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Monday August 09, 2010 @10:52PM (#1590283)
hmm... someone's stress testing http://2wi.ch/hackernews atm. let's adjourn someplace else. suggestions?
Re:I made a browser-based chat app. Based on node.js and nod... by zepolen on Monday August 09, 2010 @11:57PM (#1590396)
Slight bug: you can pass in %31 as your nick which makes it '1' bypassing the 3char limit.
Re:I made a browser-based chat app. Based on node.js and nod... by isaacsu on Tuesday August 10, 2010 @01:01AM (#1590506)
Thanks for picking that up. I would've never picked it.
Re:I made a browser-based chat app. Based on node.js and nod... by bl4k on Tuesday August 10, 2010 @02:18AM (#1590643)
you need to re-evaluate how you are handling characters. you aren't escaping and encoding properly. there is no point in just smashing the little bugs that people bring up because it will still leave other things open. time to re-eval.
Re:I made a browser-based chat app. Based on node.js and nod... by Terretta on Tuesday August 10, 2010 @10:04AM (#1591460)
> "you aren't escaping properly ... re-eval"

  eval(eval(escape(string)))  ?
Re:I made a browser-based chat app. Based on node.js and nod... by Mpdreamz on Tuesday August 10, 2010 @07:33AM (#1591160)
Love the BitchX inspired theme :)
Re:I made a browser-based chat app. Based on node.js and nod... by butu on Monday August 09, 2010 @10:54PM (#1590294)
I love this one!!! I can start the group chat in a second!!!