A VM in Java with tail-calls and continuations

Wednesday, July 13, 2005

No code yet?

Well, the exam season at my University ends on July 23, and my last exam is on July 21. So, the Summer of Code will, unfortunately, have to wait a bit longer...

That doesn't mean I won't do a thing, of course - just that it won't be full-time dedication.

Bah... no more excuses, back to code! OK, then - say no more!

In fact, I wanted to past some code here the other day; the geek in me wanted it highlighted, though. So, today, I worked out this little script (while studying for an exam) to do just that:

code2html

#!/bin/bash

enscript --color -E -Whtml -p - ${1-'-'} |

sed '
1,/<PRE>/d
/<\/PRE>/,$d

s/<B><FONT COLOR="\([^"]*\)">/<b style="color:\1">/g
s/<I><FONT COLOR="\([^"]*\)">/<i style="color:\1">/g
s/<FONT COLOR="\([^"]*\)"><B>/<b style="color:\1">/g
s/<FONT COLOR="\([^"]*\)"><I>/<i style="color:\1">/g
s/<FONT COLOR="\([^"]*\)">/<span style="color:\1">/g

s/<\/FONT><\/B>/<\/b>/g
s/<\/FONT><\/I>/<\/i>/g
s/<\/FONT>/<\/span>/g
'
|

sed '
1s/.*/<pre><code>&/
$s/.*/&<\/code><\/pre>/
'

Nothing to do with the JauVM, right?

Well, with this great little tool at hand, tomorrow, I'll start a series of posts showing you - the potential user of this library - what will your code look like.

No comments:

Archive