Show HN: Codr.cc - Etherpad meets Pastebin Meets Notepad.cc: live code sharing
codr.cc
codr.cc
It allows you to store, share, or broadcast notes or code. You can drag-and-drop files onto it. I took a lot from notepad.cc in the way it saves automatically to the server. Append '/extension' to your links to activate real-time syntax highlighting, currently supporting:
js, html, css, php, c, cpp, java, py, haskell, smalltalk, and stex (I should list that somewhere...)
Each file has a public link you can share from where the file cannot be edited.
Changes to the file can bee seen in really real time from either end of the (non-public) url.
And all with a really nice interface to boot!
Let me know what you think :)
Also any chance of Scala support?
That reminds me that I should put some contact info up on the site somewhere...
Also blog url?
Could you have an extension of /preview or /render that would render the page live on the broadcast side. This would be great for teaching/demos. Even better if they can switch between code/render view.
You can follow dev updates at codr.posterous.com
Right now, as a collaborative editing tool, it doesn't really work, since you can't have two people focused on different lines at once (I just experienced fighting over the focus with a co-worker).
Curious to see how this develops out.
On the read-only version of the page, placing the cursor and hitting "enter" adds newlines. They don't show up in anyone else's session AFAICT, but it's a little disconcerting to get the impression of editing what was supposed to be a read-only document :)
EDIT: also, it doesn't appear that haskell syntax highlighting is doing much. http://codr.cc/s/973f122b/haskell
Edit: fixed :)
Thank you for building this.
Some notes:
* Tab defaults to 8 spaces. Ughh, can it be 4?
* Auto-formatting uses offsets of 2 spaces. Why? Either turn it off or use 4 (not everyone is a Rubbyist and even not all Rubbyists adhere to this convention)
But I won't use it for a pastebin as i really love http://paste.pocoo.org/ which supports syntax highlighting for many languages, an api to upload files, great python commandline util, support for multiple files with different syntax highlights in one paste etc. JFTR the most important thing for me to use codr.cc as a pastebin would be an api/commandline util and more languages
It would be fantastic if this linked up with Github for storage.
I know the language itself provides visual clues for structure, but some light formatting say for headlines is nice.
I quickly found this sample from Solarized: http://ethanschoonover.com/solarized/img/screen-pandoc-dark....
And thanks for the bonus of making this work on the iPad. It's one of the first things I do when I come across a new browser-based editor. It has a few quirks, but definitely usable. (I found that I had to display the page pull-down info panel to trick the iPad keyboard to show. As an aside, I wonder if there's a bookmarklet to force out the iPad keyboard. Or a bookmarklet to fake tabs.)
Thanks.
I'll be posting dev updates at codr.posterous.com
I've thought about syntax highlighting and some other interesting ideas on notepad.cc. Currently, if you add a + to the end of any URL, the font turns monospace.
Glad you like it :)
* Opened page in new tab, switched to tab after reading a few other things.
* Saw a url in the drop-down at the top, different to url of page, briefly pondered whether I should go to that instead.
* Decided to copy/paste and go there.
* Couldn't type in editor, closed tab thinking it didn't work in Chrome on OSX.
Now it's a holiday in the UK, and sunny too amazingly, so I'm just quickly flicking through items of interest but people generally don't read what you put in front of them. I've read through the comments now and, while one anecdote isn't data, you may want to think about how you present the write-version/read-only-version URLs.
eg., http://codr.cc/s/xyz/ as read only url for http://codr.cc/xyz/ base url, instead of waiting for server to spew out http://codr.cc/s/abc/ as read only url.
In any case, vanity url's is a feature I plan on adding.
Found this code using google code search for main.cpp, it is not mine: http://codr.cc/s/1cb504a3/cpp compare with http://code.google.com/p/movement-game/source/browse/trunk/t...
It would be fantastic if a site like this also supported categorizing code snippets the way gists on guthub work, and were searchable.
You could even have a special kind of in-source comment that links the snippet to the web URL so you can track changes and automatically show the differences and "accept" the changes to your source code. New way to collaborate :)
However, for that particular one a more robust database of snippets would probably be necessary, and it would take a long amount of time to gather enough snippets for it to be really useful.
As to some of the other features, I think they go beyond the scope of the project. The premise of codr.cc is to allow you to share code (live or not) using a simpler interface than all the other pastebins out there. That's why I took all of the features that might go a bit beyond that and labeled them pro.
However, I very much like the idea of an API and local plugins. Stuff like a command-line interface etc. would be very interesting :)
Thanks a lot for the input!
Scrolling is broken on this page when it pops up by clicking on "learn more."
For each user currently on the page, assign them a discreet palette color. Highlight the current line each user is on with their color to give indication to all other users what line everyone else is on/modifying.
Have a sidebar (collapsible/expandable) on the page that shows all given users on the current page, along with their personal color. This lets you associate live edits to a particular user. This would function much the same as using Google Docs (i.e. spreadsheets).
I shouldn't be able to hold backspace on the same line my collaborators are editing IMO. Another added bonus would be to do a very faint row level highlight to show where other contributors are. Lastly, just to show a list of the current page contributors.
It's something I'd noticed. I'll definitely look into it.
This would give you the ability to let people use emacs/vim shortcuts among a lot of other not-reinventing-the-wheel kind of things (like better syntax highlighting).
It's definitely something I would consider to support.
- Pretty nice. It's something I might use.
- Scrolling is a bit choppy (OS X Chrome). I'm not a fan of re-inventing scroll bars.
- I wish the meta info was displayed on the page rather than having to click to reveal it. There's more than enough room.
- A button to create a new pastebin would be useful
- Needs support for Clojure (or even just Lisp)
- Funny you should say, I'm actually on OS X Chrome and I don't find it all that choppy. Could you elaborate on that?
- You're probably right.
- I figured the root url (codr.cc) serves as a new pastebin button.
- As I mentioned in another comment, I have to write new code engines by myself, which is a bit harder with languages I'm not familiar with. However, if I see the project take off, I will put some time into supporting more and more languages.
Thanks!
\ is a single-line comment that skips until the next newline, ( is a multiline comment that skips until the next end paren, ." is an inline print string that scans until the next quote, and it has a counterpart .s" string constant that works the same. Bingo, one basic Forth tokenizer!
There's a great manual for GForth[1], in case you're curious to see what some code looks like or give the language a spin.
(function-call (+ 5 4) 9 "Hello I like your service" `(this is read as a list of keywords rather than as a call to the function this with the rest as arguments ,the-value-of-me-is-inserted-due-to-the-comma this-keyword-is-not-changed))
Is pretty much the entirety of Lisp syntax.
I hadn't heard about mobwrite. It may offer a better solution than what I'm using.
Thanks for the tip.
I have one problem with it though, is that everyone's cursor appears to jump to the same spot when someone makes a change. This makes it somewhat impossible for multiple authors of one file.
Should be "its".
Out of curiosity, how complex is the code to deal with conflicts?
Not that complex. It could be better, but for now I make sure everyone is on the same page by ensuring that the cursor is at the same location at all times.
I've yet to implement multiple cursors, but it's something I definitely want to do.
P.s. real-time syntax highlighting is not working for me
Here's an example of how it should be done: http://codr.cc/44a7f9/js
EDIT: An archived, non-editable version for show :p http://codr.cc/s/d8d5cc6f/js
<?php
if ( isset ( $_POST['var'] ) === true ) {
echo 'bar';
}
?>what about privacy? sometimes I care where the code ends up since sometime's I working on other people's stuff