Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Posterous adds markdown and syntax highlighting support (blog.posterous.com)
103 points by rantfoil on May 27, 2010 | hide | past | favorite | 35 comments


Wonderful! Every day, more and more reasons not to build my own blogging engine.

One wee request? If you've got the inclination, Clojure's a language that's growing fast and is eminently useful: it might be useful to have a highlighting mode for it.

Keep up the good work!


Second vote for Clojure, though a generic Liap dialect ought to get you halfway there.


The Lisp syntax-highlight category has been killed by lisppaste:

http://paste.lisp.org/


Doesn't do anything for Clojure.


I've added Clojure support to our CodeRay library -- this should be live in about an hour or so on our site.


I'm surprised they went with CodeRay rather than a more fleshed-out highlighting library. They only list 20 or so supported languages, whereas something like Pygments (which Github uses) supports closer to 100.


Truth is, I picked CodeRay for two reasons. It's fast and it's pure ruby. Pygments is great and I spent some time on a version that used it but CodeRay just fits better within our app. It's pure ruby, supports most languages I thought we should start with, it's extensible and has a roadmap for things that I could see our users asking for.


From a user's perspective, at least, I would think that language coverage would trump most other things when considering different highlighters.


From a user's perspective, if your language is covered, you don't care about that guy on the Internets going all nerdrage on you because you do not support an obscure variant of Cobol with all commands written in romanized Arabic. Language popularity, like popularity for just about everything else, is a zipf distribution. Twenty languages probably covers well in excess of 99% of the people who will actually try to use this.

You can't ever please him, and he's most likely to say "Pah, this isn't exactly what I want, I'm going to roll my own blog."

(P.S.: the hard bitten product manager in me thinks that, from a user's perspective, the user can't program and this feature means nothing to her either way, and every second spent thinking about it is a second the business never gets back.)


True. However, working within our architecture and finding a good fit for most use cases was what trumped all else for the feature launch. I like the library we chose and hope it gains traction as a pure ruby highlighting lib but if for some reason it doesn't fit our users needs, we can certainly find a way to accommodate them.


Why not just slap in the google code highlighter javascript, if the page contains code. http://code.google.com/p/syntaxhighlighter/

Simpler and cleaner that way.


+1. Is there a way for us to userscript / greasemonkey this in in the meantime?


Nice. Now please allow ads displaying and your service will be perfect.


So it's more the library they're using? I thought it was strange they support Delphi and Java but not C#.


Yeah. Syntax highlighting plugins take effort to write for any highlighting library, so usually a major decision factor is the plugins already available.


Interestingly CodeRay doesn't support Perl. At least its not listed on their front page.


I was about to quit posterous for my technical blogs because of the bad code posting support, and then they come out with this. It's like they read my mind, and feedback.


The feature I would really like to see added at Posterous is the ability to opt out of having affiliate links added to my posts.

I was looking through the user preferences yesterday to see if they had added this option but couldn't see anything. I was on the verge of moving my blogs to Posterous when the affiliate link thing came to light. I can't see myself going back to the service until I can opt out of that.


Does the syntax highlighting support mixed PHP and HTML? Very few online syntax highlighters seem to handle this very well, not even gists from github.


The line numbering behavior is curious. They seems to disappear when I click, but not if I click-and-drag to select.

Syntax highlighting with line numbers is tricky business. It is very difficult to get both 1) Perfectly aligned numbers and 2) Support for copy and paste without numbers.

There must be a decent Javascript solution...


Yeah, line numbering is tricky. That's why we hide the numbers when you click -- it's a mode that's built into CodeRay.

Note you can still just paste github gists on their own line and we expand those too -- so that's still another option.

Also you can probably just hide line numbers completely using CSS if you customize your theme.


A tad slow! I think I requested this a couple of years ago :-P Garry added some preliminary support back then, but it never worked properly. Good to see it works better now.


Thank God! Their editor was horrendous for applying any kind of precise formatting.

I stopped using Posterous because of it, now I will happily be able to try it again!


I didn't use Posterous because it lacked markdown support. Funny though, that a little over a year ago, "Gary Tan" (company rep) said the company wanted to implement this "soon".

http://getsatisfaction.com/posterous/topics/markdown_or_anot...

Better late than never, eh?


Posterous was in my YC batch and the first thing I suggested to them was reST support. They've obviously had bigger fish to fry. Meanwhile, instead of taking an hour to implement a simple script to process markdown files into HTML and send them to Posterous, you've chosen to complain that a super-niche feature was actually released.


Markdown is super-niche? News to me.

The point is not about complaining, its that the company said a year ago that they would push it soon


There is no reST library for ruby that I could find.


Yeah, I wouldn't really hold my breath for one, either. The closest anybody has come as far as I can tell is here: http://github.com/alphabetum/rbst and all that does is wrap docutils' reST processing.


Yea, really, who cares? The overwhelming majority of people will never use this feature.


Cool. When are you guys going to support posting Ruby rack applications? TeX and PostScript would be a nice addition too.


Right after hosted php scripts.


And hosted coldfusion scripts. =D


Hmm. "Company Rep" "Garry Tan" said Posterous would support hosted CF scripts a year ago. Glad to finally hear you're releasing these critical new features.


This was the last thing keeping my tech blog at WordPress. Bravo!


Aw, no assembler highlight. Even nano can do that...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: