3 ms·
Chat Room In 10 Lines of JavaScript
- deleted 16y ago[deleted]
- landhar 16y agoYou don't escape html entities, you can easily have fun inverting text with the mirroring character ‮
- lux 16y agoI love all the stuff coming out in the Javascript world lately, especially things making comet-style coding easier. That said, seeing last week's chatroom in 15 loc and this week's chatroom in 10 lines kinda reminds me of the "5 minute abs" infomercials. I wonder when the first Perl-style one-liner chatroom will come out? :) In seriousness, I'd love to see a comparison between this and now.js and some of the others.
- pavel_lishin 16y ago> I wonder when the first Perl-style one-liner chatroom will come out? Does "<iframe src='http://www.pubnub.com/blog/build-real-time-web-apps-easy> http://www.pubnub.com/blog/build-real-time-web-apps-easy>... count?
- Turny 16y ago@lux ...curious...do you have a link to last weeks 'chat room n 15 loc'?
- clammer 16y agoWish I saw this before I spend hours writing and testing a comet server in C# for IIS. I still can't believe Amazon doesn't have this as a webservice yet. Still, I wonder how their lib interacts with mobile OSs because running comet in the background for these devices can kill the battery life.
- Turny 16y ago@lux ...curious...do you have a link to last weeks 'chat room n 15 loc'?
- bcrescimanno 16y ago10 lines of javascript..so long as you include these other several hundred lines from a library. It's cool that you can work this way with the PubNub library--but on the web, where all of the code needed actually has to be downloaded by the client, it's completely disingenuous.
- lux 16y agoNot completely. It does save me from writing the other hundreds of lines, which is more what they mean than a chatroom in 10 loc total. Anything that staves the onset of carpal tunnel for us hackers a little longer is a good deal to me :)
- bcrescimanno 16y agoAs I stated, I think it's great that you can use the library to help you do this; but the truth is, to use this chat program, clients have to download and execute far more than 10 lines of code.
- deleted 16y ago[deleted]