Page 1 of 1

Rainbow code

Posted: Sat Nov 22, 2008 12:29 am
by cormullion
I was fascinated by the discussion this week on code colouring - enough to want to try out various schemes for myself... So I've whipped up a quick newLISP-GS app for exploring them via HTML styles. Basically I've quickly merged two projects to produce this one:

http://unbalanced-parentheses.nfshost.c ... w-code.lsp

It's very much a hack, and prone to crashing, but you may find it fun...

I'd be interested to see it running on your machine...?!

(PS: If you're not using a UTF8 system, you may have to replace the utf8len functions with length...)

Posted: Sat Nov 22, 2008 9:30 am
by newdep
Nice work cormullion... ;-)

The code does run here, partly ;-)
...first time i saw the unicode catch, Though I cant update the color
fields...everytime I type a new color it resets to the old value...

if you type this in the input field ->
9870987098709870987098709870987097890870978.....etc..
it moves to -1 in the output field, not a bug probably a format issue...

Ill have a closer look in the code... ;-)

Posted: Sat Nov 22, 2008 9:48 am
by cormullion
Oh rats... I was hoping it would run OK on someone else's machine...

Any input in all but the first field (font-size) should be truncated to six chars and prefixed with a #.

It's supposed to look like this:

Image

Perhaps it's a locale issue?

Sorry!

Posted: Sat Nov 22, 2008 8:55 pm
by m i c h a e l
Works fine here :-)

Image

m i c h a e l

Posted: Sun Nov 23, 2008 12:00 am
by cormullion
Phew, thanks. I'm not completely mad, then...:)