Colored output in REPL mode and (help) function

Started by denis, March 26, 2012, 12:37:47 AM

Previous topic - Next topic

denis

Good european morning, folks!



Could anyone advice me how to make colored output in REPL (in Linux)?



Also I thought it would be good to have something like:

> (help curry)
Syntax: (curry func exp)

Transforms func from a function f(x, y) that takes two arguments into a function fx(y) that takes a single argument.  curry can be used on all functions taking two arguments.

Examples:
(set 'f (curry + 10))  → (lambda () (+ 10 (args 0)))
(map (curry list 'x) (sequence 1 5)) →  ((x 1) (x 2) (x 3) (x 4) (x 5))


for more comfortable learning of the language in the interactive mode. Plus it could be not only built-in functions, but also user-defined functions with help information somewhere around:



(define (my-func)

"...help information..."

....



or

# formatted help information

(define (my-func)

...

cormullion

#1
For coloured text, you can try ANSI codes:


    (print "n27[0;33m")

These can work. They're all listed somewhere...



For the help suggestion, there have been many solutions posted on this forum (which doesn't mean that they're easy to find... :): http://newlispfanclub.ryon.webfactional.com/forum/viewtopic.php?f=15&t=3956&hilit=help&sid=c8fc9d71a44244b52c740c20dc14246f">here, http://newlispfanclub.ryon.webfactional.com/forum/viewtopic.php?f=16&t=3447&hilit=online&sid=c8fc9d71a44244b52c740c20dc14246f">here, http://newlispfanclub.ryon.webfactional.com/forum/viewtopic.php?f=2&t=2278&hilit=online&sid=c8fc9d71a44244b52c740c20dc14246f">here,, http://newlispfanclub.ryon.webfactional.com/forum/viewtopic.php?f=5&t=1255&hilit=online&sid=c8fc9d71a44244b52c740c20dc14246f">here

denis

#2
Ahha, thanks! I see there are a lot of threads related to my question.

Also notion of .init.lsp was new for me, great!