Live data from Hacker News

Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

snucode.com

11–20 of 21 posts

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#11
post #6
post #4

Once it finishes loading it completely breaks my browsers back button.

Exactly, I just noticed that in terror :) Am working on it... Has to do with the way Backbone.js handles pushState I think,, and the way I handle Backbone's router thingy.

I put up a fix. Does it work now?

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#12
post #7

Earlier quoted context omitted.

As a newb, I thought clike was an esoteric language I'd never heard of :) The underlines are a good idea for attribution, perhaps make them straight instead of squiggly, and drop the opacity? I'm not sure. As for the CLI interface, I was just referring to wget/curl on a specific URL to download the file. If you add in passwords on documents, make sure this is supported in your wget/curl implementation. There was anot…

What browser are you using? In Chrome 19 dev, I'm not getting squiggly lines, I'm getting some sort of randomly dashed lines, which are very annoying. If the underlines were less distracting, I think this would be really wonderful!

OK I'll make them optional! Will take a few minutes because I do the colors by adding CSS-rules to the DOM on the fly. They look rather petite on my browser though :)

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#13
post #2

So I started building this as a coding exercise for an interview, I'd particularly be interested in getting feedback on my approach to Operational Transformation: http://gpickard.wordpress.com/2012/02/17/my-approach-to-oper...

When I did http://collabedit.com I used the approach outlined at: http://www.codecommit.com/blog/java/understanding-and-applyi... with an md5 hash for the "Operational Parentage" piece.

It was pretty tough to implement (for me at least). Especially when I got to using the "Bridger" and "Buffer" to transform.

Your approach seems much simpler. Do you retain the ability to "play back" the edits like etherpad did?

How big can a document get before you run into the precision issue you mentioned?

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#14
post #13
post #2

So I started building this as a coding exercise for an interview, I'd particularly be interested in getting feedback on my approach to Operational Transformation: http://gpickard.wordpress.com/2012/02/17/my-approach-to-oper...

When I did http://collabedit.com I used the approach outlined at: http://www.codecommit.com/blog/java/understanding-and-applyi... with an md5 hash for the "Operational Parentage" piece. It was pretty tough to implement (for me at least). Especially when I got to using the "Bridger" and "Buffer" to transform. Your approach seems much simpler. Do you retain the ability to "play back" the edits like etherpad did? How bi…

No I actually cannot play back yet. But it's not hard to implement, it even would be relatively easy to selectively play back only certain edits. I believe in the worst case a few thousand edits would suffice (though it would be rather tedious on the keyboard to do: type - then go back one with the arrow keys and type again).

Collabedit looks nice and solid! (Hadn't been aware of it.) Did you roll your own editor or did you use something like ACE or CodeMirror?

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#16
post #9
post #8

Earlier quoted context omitted.

May I add, font-size: 7pt ? I genuinely cannot read any of the text on this page. Please just let the user decide the best font size for them.

Sure. Before I had an way to hide the footer I set it to small text so as to minimize distractions. Should set it back.

Done. not sure if it's optimal this way though... I'll have to think of a nicer interface. Just couldn't make myself put up another bootstrap toolbar.

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#17
post #12

Earlier quoted context omitted.

What browser are you using? In Chrome 19 dev, I'm not getting squiggly lines, I'm getting some sort of randomly dashed lines, which are very annoying. If the underlines were less distracting, I think this would be really wonderful!

OK I'll make them optional! Will take a few minutes because I do the colors by adding CSS-rules to the DOM on the fly. They look rather petite on my browser though :)

Done. Thanks for the input!

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#18
post #14
post #13

Earlier quoted context omitted.

When I did http://collabedit.com I used the approach outlined at: http://www.codecommit.com/blog/java/understanding-and-applyi... with an md5 hash for the "Operational Parentage" piece. It was pretty tough to implement (for me at least). Especially when I got to using the "Bridger" and "Buffer" to transform. Your approach seems much simpler. Do you retain the ability to "play back" the edits like etherpad did? How bi…

No I actually cannot play back yet. But it's not hard to implement, it even would be relatively easy to selectively play back only certain edits. I believe in the worst case a few thousand edits would suffice (though it would be rather tedious on the keyboard to do: type - then go back one with the arrow keys and type again). Collabedit looks nice and solid! (Hadn't been aware of it.) Did you roll your own editor or…

I used EditArea http://www.cdolivet.com/editarea/editarea/exemples/exemple_f...

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#19

How does it compare with Stypi? http://www.stypi.com/

Stypi is a more mature project with more features. Also they use the ACE-editor which arguable is more feature-rich (though poorer in documentation IMHO).

My project is open source: https://github.com/werg/snucode So it's also an example use of the Node.js websockets framework SocketStream.

Furthermore I do operational transformation a bit differently (presumably, not sure how they do it): http://gpickard.wordpress.com/2012/02/17/my-approach-to-oper...

Re: Show HN: A Collaborative Code Editor (like EtherPad with Syntax Highlighting)

#20
So, one thing I really like about this is there's no UI clutter - just an editor and a footer. That would make this sort of thing great for embedding into another app. Another thing I like is you can create a new document simply by navigating to a random URL. Again, great for embedding (where the containing app can just name files after a UUID or whatever).

The down side is I typed some stuff, then clicked reload and my text was a bit scrambled. So I'm going to say your operational transform implementation is a bit buggy :)

Post reply on HN