News for hackers. Stuff that matters.
Re:Show HN: Firepad, an open source collaborative text editor by jfaucett on Tuesday April 09, 2013 @01:13PM (#5519510)
okay, after working in this for a couple minutes I found it to be AWESOME!!! great job guys. Obviously, there's a ton of people on it right now, and the proverbial dicks just pasting 10101 all over to annoy, but in a team i could see how this would be really awesome. While working on it there was a short minute where the dicks let off and i really got to see how great this can be for teaming up to iteractively write code.

Again awesome app!!

Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @01:15PM (#5519521)
Thanks! Glad you like it. You can also click the "Private Pad" link in the top right to get away from the chaos. :-)
Re:Show HN: Firepad, an open source collaborative text editor by BHSPitMonkey on Tuesday April 09, 2013 @02:11PM (#5519946)
Nitpick: It seems impossible to scroll down and read the stuff below the actual editor (at least in Chrome), since the editor keeps auto-scrolling me back up to itself whenever new data comes in.
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @02:30PM (#5520066)
Yeah, sorry! Codemirror automatically keeps your cursor scrolled into view and with lots of people editing, your cursor keeps moving.

I just tweaked it (again) so that we remove focus from CodeMirror when you scroll the page, so this should be taken care of.

Sorry about that!

Re:Show HN: Firepad, an open source collaborative text editor by mccolin on Tuesday April 09, 2013 @11:57AM (#5518974)
Haven't looked into the code/docs deeply, yet, but would love to know if it can be customized to send data to one's own backend service for private implementations. Love the editor. Also had a few great laughs trying to use it alongside so many other people.
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @12:12PM (#5519094)
We built it as a Firebase app, but we're releasing it as open source and are looking forward to seeing what the community does with it. :-) All of the OT work happens client-side, so it's certainly possible to adapt it to other backends.

Additionally, a lot of the OT code is based on ot.js[1], a fantastic open source OT implementation by Tim Baumann. He has a node.js backend as well as Haskell and Python. Of course then you have to run the server code somewhere and figure out how to persist the documents, etc. :-) Definitely worth checking out though.

1. https://github.com/Operational-Transformation/ot.js/

Re:Show HN: Firepad, an open source collaborative text editor by mccolin on Tuesday April 09, 2013 @02:43PM (#5520196)
This is fantastic. Looked up some more information about your Firebase offerings and like what's going on there, too :-) Keep up the great work!
Re:Show HN: Firepad, an open source collaborative text editor by nathanb on Tuesday April 09, 2013 @01:10PM (#5519491)
Is this actually a text editor, or is it a social experiment?

I realize those are not mutually exclusive options.

Re:Show HN: Firepad, an open source collaborative text editor by Jonovono on Tuesday April 09, 2013 @02:01PM (#5519858)
Cool. I am going to check this out. I was planning to work on a document site like github but for non technical people (http://www.rubberdocky.com), but have put that on the back-burner for now. One of the projects I recently came across that I thought looked awesome was Substance (http://www.substance.io). I like the idea of collaborating on documents in a way like github but only more accessibly for anyone.
Re:Show HN: Firepad, an open source collaborative text editor by amasad on Tuesday April 09, 2013 @02:36PM (#5520121)
Looks cool. It'd be great if you hide the firepad instance from the global scope, to make it harder for trolls to do:

    setInterval(function () {firepad.codeMirror_.setValue('foo'); }, 0);
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @02:42PM (#5520186)
Won't people realize that doing that would detract from the experience of other users?

Haha, just kidding! Moved everything into a closure. Thanks for suggesting it.

Re:Show HN: Firepad, an open source collaborative text editor by marijn on Tuesday April 09, 2013 @03:28PM (#5520537)
Sure, now they'll need to do `cm = document.body.getElementsByClassName("CodeMirror")[0].CodeMirror` first.

(I.e. it's client-side, you can't prevent people from doing whatever they want.)

Re:Show HN: Firepad, an open source collaborative text editor by jlogsdon on Tuesday April 09, 2013 @05:07PM (#5521378)
Well, if you don't attach the Firepad instance to the element and it's in a closure I'm pretty sure you couldn't modify it. I'd love to be corrected if this is incorrect.

Obviously you can't be stopped from editing the contents of the editing area, so if it works by simply checking for your updates to the editor then you can't stop it.

Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @05:20PM (#5521480)
Yeah. They could also build a robot to mash on their keyboard (or make an arduino-based USB input device, or ...)

In non-demo scenarios, you'd have authentication and security rules set up to prevent this sort of abuse / trolling / etc.

The main reason I bothered adding the closure was so people wouldn't copy/paste the code snippet from the HN post and have it work. :-)

Re:Show HN: Firepad, an open source collaborative text editor by marijn on Wednesday April 10, 2013 @02:29PM (#5527043)
Browsers have debuggers, which allow users to set breakpoints and inject/run arbitrary code in the context of some function. (At least Chrome allows that, not sure about others.)
Re:Show HN: Firepad, an open source collaborative text editor by Johnyma22 on Tuesday April 09, 2013 @01:21PM (#5519564)
I think this is a really early stage Etherpad. Check out Etherpad's features if you can, you have your work cut out though http://etherpad.org
Re:Show HN: Firepad, an open source collaborative text editor by mayop100 on Tuesday April 09, 2013 @01:22PM (#5519577)
What features would you like to see implemented next in Firepad?
Re:Show HN: Firepad, an open source collaborative text editor by stephenhuey on Tuesday April 09, 2013 @02:56PM (#5520299)
That's a good question, and I don't have an answer for you. However, since I've heard how awesome Firebase is, I'm wondering what you offer over Etherpad. After Google acquired it and open sourced the engine, lots of other websites have sprung up that use it. I'm sure there are great reasons to use your tool rather than an Etherpad-based one, so it'd be interesting to hear them!

http://etherpad.org/

http://piratepad.net/

http://titanpad.com/

http://www.cynapse.com/syncin

http://openetherpad.org/

Mozilla and no doubt many others can easily deploy it on their servers:

https://etherpad.mozilla.org/

Re:Show HN: Firepad, an open source collaborative text editor by mayop100 on Tuesday April 09, 2013 @03:18PM (#5520472)
The main reason you might want to use Firepad instead of Etherpad is if you don't want to run the server-side piece of Etherpad. For example, if you're stack is different than theirs it might be a pain to set up a special server environment just for the collaboration portion of your app.

Firepad is fully client-side code, so there's no server software for you to set up.

The other big reason you might use Firepad is to get all of the other goodies that Firebase provides, like the automatic scaling, Forge debugger, declarative security, etc.

Re:Show HN: Firepad, an open source collaborative text editor by kevinr on Tuesday April 09, 2013 @05:27PM (#5521526)
So, when you say it's "fully client-side code" -- what that looks to me to mean is not that it's not talking to a server somewhere, but that it's talking to Firebase's servers rather than my servers. Is that correct?
Re:Show HN: Firepad, an open source collaborative text editor by akkishore on Tuesday April 09, 2013 @07:00PM (#5522039)
Right, communication to Firebase happens with its API.
Re:Show HN: Firepad, an open source collaborative text editor by unhammer on Wednesday April 10, 2013 @04:42AM (#5523914)
Can you run it without it communicating with Firebase? (If not, how is that better than having it under your own control?)
Re:Show HN: Firepad, an open source collaborative text editor by ianstormtaylor on Wednesday April 10, 2013 @12:09AM (#5523161)
Most every Etherpad implementation I've seen is pretty much a direct copy of what Etherpad was. I have no idea if this is inherent to the Etherpad source, but it sure seems it. The entire point of Firepad is that you can use it for much more custom use cases, like Socrates: http://socrates.io — no crappy word processing UI, or any of that stuff. Totally custom and easy to do.
Re:Show HN: Firepad, an open source collaborative text editor by peapicker on Tuesday April 09, 2013 @12:16PM (#5519121)
Would be nice if each user had their own cursor/state and different users could modify different parts of the doc at the same time without causing crazy to happen.
Re:Show HN: Firepad, an open source collaborative text editor by mayop100 on Tuesday April 09, 2013 @12:27PM (#5519182)
Everyone does have their own cursor state and can edit the document separately (even in offline mode). People are testing the limits of it right now though, so you're probably seeing a fair amount of "select all" + "delete" and other annoying behavior.

If you want to try it without other people messing with it. Click the "Private Firepad" link in the upper right corner.

Re:Show HN: Firepad, an open source collaborative text editor by bestest on Tuesday April 09, 2013 @05:16PM (#5521447)
I'm happy to announce this as a find of the week. Boy there were some good laughs in the public mode.

And yes, I'm quite sure private pads might be of use in certain situations.

Re:Show HN: Firepad, an open source collaborative text editor by prayag on Tuesday April 09, 2013 @11:11AM (#5518606)
This looks amazing! I have been really impressed with Firebase. Before it building things like this or a chat engine would take weeks if not months.
Re:Show HN: Firepad, an open source collaborative text editor by shurcooL on Tuesday April 09, 2013 @03:14PM (#5520439)
This inspired me to create a simple page where people can update their status in real-time. It's similar to the firepad.io text editor, except you can only edit your own status and not that of others.

You can try it at https://dl.dropbox.com/u/8554242/live-status.html

Re:Show HN: Firepad, an open source collaborative text editor by Vecrios on Tuesday April 09, 2013 @01:47PM (#5519749)
This is awesome. It's like a chat but with the ability to edit what other people are saying! So much potential!
Re:Show HN: Firepad, an open source collaborative text editor by mynmyn on Tuesday April 09, 2013 @11:54AM (#5518961)
Aside from collaborative editors and chat clients - what other valuable use cases could firebase help solve?
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @12:00PM (#5518996)
I'm biased, since I'm a Firebase dev, but honestly, Firebase is great for solving /all kinds/ of use cases. :-)

We've had people build everything from emergency response simulations synchronized across multiple devices to iOS apps for grandparents to read books with their grandkids over long distances.

Firebase is great any time you need real-time updates, collaboration, or you just want to get something up and running without having to spin up your own servers.

Re:Show HN: Firepad, an open source collaborative text editor by mynmyn on Tuesday April 09, 2013 @12:11PM (#5519080)
Those sounds really interesting, thanks. Looking forward to seeing more of the real-time web evolve.
Re:Show HN: Firepad, an open source collaborative text editor by Y_Not on Tuesday April 09, 2013 @02:00PM (#5519845)
I definitely can see a use case for this if it had some type of integration with MS word.

Unfortunately I'm currently stuck working for the big corporation, and we have so many meetings reviewing documents, etc over fairly large teleconferences across the world-- so not face to face meetings. Currently, usually only one person drives the edits in MS Word and screenshares with the group via a WebEx or LiveMeeting... if there could be some sort integration with MS Word so multiple people could edit at the same time and view the same thing, there would be no need for the LiveMeeting/WebEx screenshare and the collaboration would be much more seamless. Would remind me of a SubEthaEdit mashed with MS Word.

Regardless, well done.

Re:Show HN: Firepad, an open source collaborative text editor by civilian on Tuesday April 09, 2013 @04:40PM (#5521193)
I think there's a bug with text writing over eachother when 2 people are typing:

http://imgur.com/1IvMccd

(You can see how my bold line of text was interrupted by someone else.)

Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @04:47PM (#5521250)
Can you provide more detail? Here or [email protected] or as a github issue? From the screenshot it's not immediately obvious to me what went wrong.

People are certainly allowed to write over each other (e.g click in the middle of your sentence and write something). If that's not what happened, let me know!

Re:Show HN: Firepad, an open source collaborative text editor by natorion on Tuesday April 09, 2013 @04:29PM (#5521108)
Looks interesting. Might try it for the incoming interview sessions. A big drawback for me is that I can't use my browser's back button after opening the page because the history is flooded.
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @04:41PM (#5521201)
Could you provide more details? (back button works fine for me in Chrome on OSX). You can reply here or ping [email protected]. Thanks!
Re:Show HN: Firepad, an open source collaborative text editor by mikegreen on Wednesday April 10, 2013 @07:28AM (#5524445)
Clicking on Private Pad yields: Error 503 Service Unavailable Service Unavailable Guru Meditation: XID: 1337667656
Re:Show HN: Firepad, an open source collaborative text editor by dmbaggett on Tuesday April 09, 2013 @12:00PM (#5518998)
Does anyone know of an HTML-friendly equivalent of this? I.e., something similar that allows pasting/editing HTML?
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @12:25PM (#5519168)
Firepad will eventually support rich-text copy/paste and import/export as HTML (export is actually already supported through the API, but not exposed through the existing UI), as well as lists, paragraph indent, and all of the other features that you'd want. They just didn't make it in for the v1 release. :-)

As for similar projects that are already more HTML-friendly, maybe check out Etherpad[1]? It has HTML import / export, though I haven't tested it out.

1. http://etherpad.org/

Re:Show HN: Firepad, an open source collaborative text editor by wfle on Tuesday April 09, 2013 @12:15PM (#5519113)
http://scratchpad.io might be what you're looking for.
Re:Show HN: Firepad, an open source collaborative text editor by deliminator on Tuesday April 09, 2013 @02:15PM (#5519970)
We are building a real time HTML synchronization engine at wikidocs.com (using a custom OT engine). It's still work in progress, but you can already try it out - if you fire up the inspector and manipulate the DOM, your changes will be synchronized automatically.
Re:Show HN: Firepad, an open source collaborative text editor by gbadman on Tuesday April 09, 2013 @12:23PM (#5519160)
Plunker is a collaborative html/css/js/coffee-script/typescript/less/etc... editor: http://plnkr.co/edit/?p=preview&s=YDQtgmV5y7I6EQfJ
Re:Show HN: Firepad, an open source collaborative text editor by akkishore on Tuesday April 09, 2013 @02:21PM (#5520001)
http://codecollab.gamooga.com/ - does server side OT
Re:Show HN: Firepad, an open source collaborative text editor by KaoruAoiShiho on Tuesday April 09, 2013 @04:11PM (#5520964)
Curious why each pad is limited to <18 users? Will firebase have a hard time syncing more than those users?
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @04:40PM (#5521192)
There's no limit. We had ~50 in some rooms earlier. We did shard users across dozens of rooms so that the user experience wasn't too ridiculous...

You could (if you like pain) use firepad with hundreds of users and it shouldn't be an issue. The actual messages being sent around are small.

Re:Show HN: Firepad, an open source collaborative text editor by stevejohnson on Tuesday April 09, 2013 @12:31PM (#5519208)
I am unable to scroll down on the page without it jumping back up to the animated demo thingy. Chrome 25 OSX.
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @12:48PM (#5519346)
Ooops. When the editor has focus, it tries to keep your cursor visible when it moves. And your cursor can end up moving due to other people's edits.

I tweaked the page to not auto-focus the editor. Thanks!

Re:Show HN: Firepad, an open source collaborative text editor by vramosp on Tuesday April 09, 2013 @01:53PM (#5519793)
I had the same problem. Thanks for fixing it!
Re:Show HN: Firepad, an open source collaborative text editor by binarysoul on Tuesday April 09, 2013 @01:20PM (#5519558)
I don't see how this could be used for collaborative code editing. Is there an example of this?
Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @01:23PM (#5519585)
Yup! http://www.firepad.io/examples/#code

Atlassian[1] and Action.io have already built stuff with it.

1. https://marketplace.atlassian.com/plugins/com.atlassian.stas...

Re:Show HN: Firepad, an open source collaborative text editor by binarysoul on Tuesday April 09, 2013 @03:48PM (#5520742)
cool thanks
Re:Show HN: Firepad, an open source collaborative text editor by dossy on Wednesday April 10, 2013 @05:28PM (#5528323)
Nice marketing shill for Firebase. Well played, guys.
Re:Show HN: Firepad, an open source collaborative text editor by colemorrison on Wednesday April 10, 2013 @04:59AM (#5523980)
Whoa. That's some FUN stuff! Great job!
Re:Show HN: Firepad, an open source collaborative text editor by davidedicillo on Tuesday April 09, 2013 @01:26PM (#5519604)
Seems a lot of people are forgetting about http://hackpad.com
Re:Show HN: Firepad, an open source collaborative text editor by j_s on Tuesday April 09, 2013 @01:41PM (#5519711)
Perhaps because hackpad isn't [edit: as gung-ho about being] open source (if they are at all)? I'm sure there are other commercial offerings too... like yours!
Re:Show HN: Firepad, an open source collaborative text editor by saurik on Tuesday April 09, 2013 @03:58PM (#5520859)
Only slightly, though; I mean, Firebase is built on a fully-proprietary platform (Firebase).
Re:Show HN: Firepad, an open source collaborative text editor by j_s on Tuesday April 09, 2013 @04:05PM (#5520924)
I haven't looked at the code so I can't give you too much of a hard time (have you looked at it?) but the Firebase team might take issue with your use of the word 'slightly'.

https://news.ycombinator.com/item?id=5519094

  > All of the OT work happens client-side, so it's certainly 
  > possible to adapt it to other backends.
Re:Show HN: Firepad, an open source collaborative text editor by saurik on Tuesday April 09, 2013 @07:40PM (#5522235)
I have looked at the code (and had looked at the code before leaving that comment). Please understand that the OT backend they are using is just something they got from someone else, so it isn't really interesting that the OT backend is open source. In essence, they just took an off-the-shelf open-source OT implementation and connected it to an off-the-shelf open-source HTML+JavaScript rich text editor.

The main thing that is difficult about building something similar to Firepad would be building the scalable distributed backend: there are no open source projects that I know of that provide that functionality. That is the value add of Firepad: the open source code is just some glue that you can find from other projects (including Etherpad, which is open source with both rich text and OT).

The thing that actually makes this interesting is the proprietary scalable synchronization backend from Firebase. That is interesting, no denial from me on that front: except for some issues with trusting the clients (pointed out in my other comment), this seems like a great and simple way for developers to rapidly get access to this collaborative text editing functionality for their applications. The open source parts, though, are not what is compelling.

To take some concrete examples: ShareJS is a strong implementation of OT (the guy is one of the people who had worked on Wave), but the backend they provide is less-than-stellar, based on fairly centralized storage into a small handful of backends, and no real attempt at supporting scalable front-end server endpoints (so, you have to have everyone connect to a single machine to act as the single-threaded mediator). Etherpad-lite is based on a similar architecture; you can shard these solutions on the document, but it just doesn't hold up in the same way Firebase does vertically.

Looking at this then from an alternative direction: one can imagine just taking the FirebaseAdapter from Firepad and wiring it into the backend of ShareJS. This isn't much work, and would probably be more useful than Firepad's current stack that is tied to the text editor: in addition to being able to use any of a number of text editors people have wired over ShareJS, ShareJS also supports arbitrary JSON document OT, allowing you to build systems that are closer in functionality to Wave (where people were using OT on the program state of things like chess games).

Re:Show HN: Firepad, an open source collaborative text editor by mikelehen on Tuesday April 09, 2013 @08:36PM (#5522460)
Well, adding rich-text support to ot.js and CodeMirror wasn't trivial, but both of these projects were certainly instrumental in building Firepad.

And we'd love to see integrations with ShareJS as well as other editors besides CodeMirror.

Re:Show HN: Firepad, an open source collaborative text editor by hydralist on Tuesday April 09, 2013 @11:57AM (#5518977)
this is some entertaining shit going down in the 'chat'
Re:Show HN: Firepad, an open source collaborative text editor by frou_dh on Tuesday April 09, 2013 @12:44PM (#5519311)
It's complete carnage, but the actual tech seems to work well.
Re:Show HN: Firepad, an open source collaborative text editor by benatkin on Tuesday April 09, 2013 @12:08PM (#5519064)
Yes, we made it go cray-cray.