

Show HN: An Etherpad clone in Node.js and Socket.io - JacksonGariety
http://yugentext.com

======
stbullard
I am always amazed by what people do when they're given anonymity and
collaborative text editors - rarely positively. But this seems particularly
bad.

Is HN really so many twelve year olds (behaviorally, if not in calendar
years)?

~~~
worldsayshi
It kind of shows that it's not really about anonymity (I interpret it as that
anyway). When there are enough amount of connected users it really favors
destructive edits.

And we are (mostly) anonymous here on hacker news as well but comments are
mostly well behaved.

And yes, some people are probably partly twelve year olds inside.

------
edtechdev
From
[https://github.com/JacksonGariety/Yugen/blob/master/routes.j...](https://github.com/JacksonGariety/Yugen/blob/master/routes.js)

    
    
      res.redirect(crypto.randomBytes(3).toString('hex'))
    

You probably already know this, but you'd probably want to replace that with a
unique id generator, like perhaps MongoID or a timestamp or something.

~~~
JacksonGariety
Yeah I wanted to try out crypto. There are a number of things about this app I
want to change. Namely getting your cursor to stay in place when other people
edit. No clue how to tackle that one.

------
javis
You should wrap your JS in an anonymous function. People can just emit sockets
from the console.

e.g.

socket.emit('msg', "text here");

~~~
JacksonGariety
about to push some changes, will include this

------
sethish
Etherpad is open source already. As is EtherpadLite (EPL), its node.js
rewrite.

~~~
JacksonGariety
Good point, editing title.

------
petercooper
I had this opened in a tab and initially forgot what it was.. I thought it was
some sort of artificial intelligence or ASCII movie, because it seems 1001
griefers are copy/pasting trash into it right now :-)

Perhaps try a different URL of <http://yugentext.com/hn> or whatever if you
want to see it without it going at 30 fps..

------
worldsayshi
Game idea: Number of grammatically correct sentences times the amount of
connected users = points.

------
dopamean
If I click the link and wait a few minutes I start to see someone else's
message. It last for only a second and then vanishes.

------
colbyaley
This is so cooool

------
5vforest
etherpad-lite _is_ node.js and socket.io

~~~
JacksonGariety
Too bad this aint: <http://etherpad.org>

~~~
Sayter
"Etherpad is an Open Source online editor providing collaborative editing in
really real-time powered by Node.js" (from your link)

------
restlessdesign
Welp. That didn't take very long.

------
asperous
Share.js is pretty cool too

~~~
Johnyma22
When it doesn't change under you every 5 minutes....

------
JacksonGariety
Question for moderators...

I made a mistake by linking directly to an editor. A mod should change the URL
to just yugentext.com without the /0a9617.

Would save this post from the spammers.

~~~
JacksonGariety
Thank you mods!

