News for hackers. Stuff that matters.
Re:Show HN: elegant open-source pastebin server (node.js & r... by andrewvc on Tuesday November 29, 2011 @12:58PM (#3291338)
Very cool! You've easily written the best UI for this kind of thing I've yet seen (though a language syntax picker would be nice).

Quick question though, why redis vs something disk based? Are you worried that if this sees a lot of usage you'll hit memory limits? Seems like a great application for a disk based KV, or just plain SQL.

Re:Show HN: elegant open-source pastebin server (node.js & r... by seejohnrun on Tuesday November 29, 2011 @01:01PM (#3291347)
Hey - Thanks for the comment.

You can set the language by just changing the extension in the URL, if it guesses wrong.

the open source project also has an optional disk store you can use in place of redis (http://github.com/seejohnrun/haste-server), but my hosted version uses the redis store.

Thanks again!

Re:Show HN: elegant open-source pastebin server (node.js & r... by cabacon on Tuesday November 29, 2011 @01:38PM (#3291542)
For what it's worth, changing the extension doesn't seem to work for me. A simple C program (http://hastebin.com/36QWBlYlML) gets detected as TeX. Trying to change the http://hastebin.com/36QWBlYlML.tex to http://hastebin.com/36QWBlYlML.c just redirects me back to the .tex URL.

Also, while I am entering a file, the edit box is only two lines long, and I can't see the handle to resize it. This is Safari 5.1.1 on Snow Leopard.

Looks nice!

Re:Show HN: elegant open-source pastebin server (node.js & r... by mcpherrinm on Tuesday November 29, 2011 @03:22PM (#3291985)
Also, clicking on the .c link breaks the back button, because it redirects to the .tex link before I can click back again.
Re:Show HN: elegant open-source pastebin server (node.js & r... by seejohnrun on Tuesday November 29, 2011 @02:35PM (#3291801)
Heya - just didn't have the .c extension in the mapping. Will add it in tonight and get it out. Thanks!
Re:Show HN: elegant open-source pastebin server (node.js & r... by jurre on Tuesday November 29, 2011 @02:48PM (#3291858)
While you're at it, changing the extension seems to break the back button in Chrome and Safari on OSX.
Re:Show HN: elegant open-source pastebin server (node.js & r... by wahnfrieden on Tuesday November 29, 2011 @06:11PM (#3292762)
I haven't tried reproducing this, but it sounds like he's setting redirects based on GETs. A bad idea all-around, and not only for breaking the back button in this case.
Re:Show HN: elegant open-source pastebin server (node.js & r... by seejohnrun on Tuesday November 29, 2011 @06:21PM (#3292797)
vvv wahnfrieden

will be fixed tonight

Re:Show HN: elegant open-source pastebin server (node.js & r... by cavilling_elite on Tuesday November 29, 2011 @06:27PM (#3292815)
this syntax changing by changing the extension is really clever, is it in the haste-server codebase?
Re:Show HN: elegant open-source pastebin server (node.js & r... by seejohnrun on Tuesday November 29, 2011 @06:30PM (#3292830)