[ANN] Initial release of Glow, a tiny library for syntax highlighting Clojure source code

193 views
Skip to first unread message

W. David Jarvis

unread,
Aug 1, 2015, 4:22:20 PM8/1/15
to Clojure
Hey all - 

I'm very happy to announce yet another OSS project, Glow, which is intended to provide a minimal and simple way to enable you to produce syntax-highlighted strings of Clojure source code. 

The project page can be found here, and as usual I've written up a little blog post about it here

Some screenshots of what it looks like in use can be found below:

If you're curious why I did this, I'll happily refer you to this issue on the Ultra project page.


I'm actively soliciting pull requests to improve the library's regular expressions - they're tolerably acceptable for now, but I'm no regex expert and so a sharp eye would definitely be welcome. 


Hope everyone's having a good weekend otherwise.


Cheers,


 - V

Reid McKenzie

unread,
Aug 2, 2015, 2:55:24 AM8/2/15
to clo...@googlegroups.com
Very nice! Have you put any effort into an HTML output target?

Reid
0x0A85EC53.asc

W. David Jarvis

unread,
Aug 2, 2015, 4:37:25 AM8/2/15
to clo...@googlegroups.com
I thought about it early on but considered that a space that's largely already addressed by highlight.js et al. If there's another use case you had in mind for it that highlight et al. don't satisfy I'd be happy to look into it :)

On Sun, Aug 2, 2015 at 7:55 AM, Reid McKenzie <rmcke...@gmail.com> wrote:
Very nice! Have you put any effort into an HTML output target?

Reid

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/ntz-YPxwryA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
============
============

Reid McKenzie

unread,
Aug 2, 2015, 8:30:58 PM8/2/15
to clo...@googlegroups.com
On the contrary, I would argue that there is some interesting stuff
like locals highlighting that existing highlighting solutions don't or
can't offer. However as you say pygments fulfills my requirements.

Reid
0x0A85EC53.asc

W. David Jarvis

unread,
Aug 3, 2015, 7:04:35 AM8/3/15
to clo...@googlegroups.com
Unfortunately, since Glow doesn't use a lisp reader as it's underlying syntax engine, locals highlighting isn't something that the project can easily support. Allen Rohner pointed me in the direction of a few other underlying lisp/clojure readers that might open up avenues for that sort of feature, and I'd definitely be interested in exploring it, but barring outside contributions at the moment I think the project will probably stick with its regex implementation for the immediate future.

Even so - someone else also opened an issue on the project page asking for HTML output and it wouldn't be that hard to generalize the actual highlighting process to target multiple output types. I'll noodle on it some more.


Reid

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/ntz-YPxwryA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages