3 ms·
Yes. The entire site is built with Clojure. We do use Pygments. Pygments is as much a general tool as it is a Python library, and a very good one on both counts
by Rayne 15y ago
Yes. The entire site is built with Clojure. We do use Pygments. Pygments is as much a general tool as it is a Python library, and a very good one on both counts. We didn't see much point in writing our own syntax highlighter that would almost certainly be buggier than Pygments and support a fraction of the languages that Pygments already supports.
Responding to edits:
I agree, there'd certainly be a bigger coolness factor to that. However, we're trying to build a useful site here for anyone who wants to use it. Pygments is mature and does what we need and a whole lot more.
- tptacek 15y agoWell, just to be devil's advocate here, Pygments supports a lot of languages very few people care about (Befunge, Dylan, Modula-2 --- for that matter, how many people need to syntax-highlight their ANTLR grammars?) --- and it's also worth pointing out that the language count in Pygments includes a lot of duplicates --- and it does a somewhat poor job with a few important ones (like ObjC). I'm a fan of Pygments (it's kind of a secret weapon; we don't just use it it to syntax highlight), but that also means I'm acutely aware of how straightforward a syntax highlighting pasteboard is to build on top of it. For that matter, so is Github; Gist is powered by Pygments. I'm really interested in Clojure (I'm kind of shopping for a next language, I like Lisp, and I'm pretty sure the next thing needs to be a JVM language), so maybe I'm just hoping to get people to make ambitious things I can look at.
- Rayne 15y agoWell, I definitely want to point out that we are not trying to claim we've done magic here. If that's how it sounds, I apologize. Believe it or not, we are putting a lot of work into this site. We have some fun ideas we want to play around with, but writing another syntax highlighter just isn't one of them. On the other hand, I'm happy you're interested in Clojure! I'm sorry that our project might not be the one to put you over the edge on it, but I definitely hope something does. :)
- tptacek 15y agoI'm not trying to talk you off the project so much as I am encouraging you to consider reinventing this particular wheel in Clojure as well.