Rainbow code

Notices and updates
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Rainbow code

Post 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...)

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post 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... ;-)
-- (define? (Cornflakes))

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post 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!

m i c h a e l
Posts: 394
Joined: Wed Apr 26, 2006 3:37 am
Location: Oregon, USA
Contact:

Post by m i c h a e l »

Works fine here :-)

Image

m i c h a e l

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Phew, thanks. I'm not completely mad, then...:)

Locked