Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Tim Johnson

#1
I just came across the thread about the Eric Raymond blog. Since it dates back to June 2014 - I thought I would start another one. I found blog very interesting, with the some smug pushback, but not nearly as virulent as pushback I've seen on Common Lisp venues years past.



 I would note that at one time I wrote a emacs major mode for newlisp. (Don't know what became of it, will look for the code) I also wrote a content management application for my (non-newlisp) CGI projects. Not sure where that one went either ...



Autolisp was my first scripting (as opposed to compiled) language (early 90's). Rebol was my first general-purpose scripting language. I did a lot of work in that at one time, but rebol is in a semi-mothballed state, although I still maintain my invoicing system of some complexity using the rebol 2.



Rebol 3 and the red fork are still under some degree of development.



I'm glad to see that newlisp still keeps on keepin' on.



I would appreciate if folks reading this could share what they are doing in newlisp.

Cheers

Tim
#2

> (set 'record '(("name" "Tim")(age 61)))  
(("name" "Tim") (age 61))
> (set 'indices '(1 0))
(1 0)
> (record indices)
age    ;; correct
> (set 'ndxs '(a b))
(a b)
> (record ndxs)
ERR: value expected :  ;; duh!

So how may I 'bind' the values in 'ndxs to the implicit indexing of 'record?

I'm hoping there is a tie-in to the previous question, I.E. I might want to

index 'record by a slice of the values in 'ndxs also.

thanks

tim
#3
I have a solution, but don't fully understand the issue:

I've set up a typehandler/callback using a hash with functions as in

(define typeHandler:typeHandler)
(typeHandler "text"
    (fn (fl val ndxs DS DSndx)
        (letn((ndx (ndxs 0))(ele (fl ndx))
                (attrs(set-attr (list "value" val)(ele 2 1))))
         (setf (DS DSndx ndx 2 1) attrs)
         DS)))

Even though the code above is lexically within a context, the functions defined as members of

the hash do not recognize members of the outer context.

To elaborate, I have to pass the context member DS as the fourth argument to the

(typeHandler "test") lambda and the context member current-DS-index (DSndx)

as the fifth argument.

I can live with that, but I'd welcome comments or whether or not I may be missing

something.

thanks

tim
#4
In python I'm used to doing something like this:

funcs = {"one":func1,"two":func2} ## etc
## Called as:
funcs[task](arg1 arg2)

I did this in newlisp:

(set 'funcs '(("int" do-int)("text" do-text)))
(define (do-int arg1 arg2)
(println "DO-INT - arg1: " arg1 " arg2: " arg2) )
(define (do-text arg1 arg2)
(println "DO-TEXT - arg1: " arg1 " arg2: " arg2))
## Function call:
(set 'arglst '("one" "two"))
(apply (lookup "text" funcs) arglst)
## => DO-TEXT - arg1: one arg2: two

If anyone thinks there is a better and more idiomatic way to do this, I would welcome comments.

thanks

tim
#5
I do not currently code in java, but I can see it on the horizon. There is a growing list of scripting languages that are front

ends for java and are in part or in whole in java. See http://java-source.net/open-source/scripting-languages">http://java-source.net/open-source/scripting-languages



I've looked at clojure for the last couple of days, but I'm going to have to pass.

Reason: lots of problems installing. I believe I could overcome those issues myself, but  the thought

of trying to convince a system adminstrator to install it on a remote server for web deployment made me

want to weep!



I think it is likely there is going to be a very large niche for a scripting languages that can "talk to" or be

a "front end" for java. And I don't think it is filled yet.



Now, with the guiserver, I see some possibilities: I haven't really played with any of the sample scripts

(on my machine at usr/local/share/newlisp/guiserver). I've looked at guiserver.lsp and it is very thoroughly

documented. And as I understand it, guiserver.lsp is a "front end" for guiserver.jar.

So the possibilities of using newlisp as general-purpose front end for java would entail

1)Jar files being built on java

2)A newlisp interface designed specifically for the jar file?

Am I correct?

I'd welcome any and all comments on this topic.

thanks

tim
#6
From the manual
(assoc 1 '((3 4) (1 2)))  → (1 2)

Is there a system variable that stores the index/position of '(1 2)?

And if not,

1)What is the best way to get the index?

2):) Put it on _my_ wish list.

thanks

tim
#7
Here's the sample code:
(println "<pre>")
(define (set-pair lst key val)  ;; set a pair if found or add it if not found
(unless(set-ref (list key '?) lst (list key val) match)
(push (list key val) attrs -1)))
(set 'attrs '(("ID" "form0") ("method" "POST") ("name" "form0") ("action" "[[action]]")   ;; sample target list
("onsubmit" "return checkLoginForm(this);")))
(println "Original List:")
(println attrs)
(set 'attr "action")  ;; existing key
(set 'value "mycgiscript.lsp")  ;; new value
(set 'attrs(set-pair attrs attr value))  ;; call the function
(println "nList Pair Modified:")
(println attrs)   ;; test the result
(set 'attr "newaction")  ;; non-existing (new) key
(set 'value "make weave not lore")  ;; value for key
(set 'attrs(set-pair attrs attr value))  ;; call it
(println "nList Pair Added:")           ;; display results
(println attrs)


Now, here are the results:
Original List:
(("ID" "form0") ("method" "POST") ("name" "form0") ("action" "[[action]]") ("onsubmit"
  "return checkLoginForm(this);"))

List Pair Modified:
(("ID" "form0") ("method" "POST") ("name" "form0") ("action" "mycgiscript.lsp") (
  "onsubmit" "return checkLoginForm(this);"))

List Pair Added:
(("ID" "form0") ("method" "POST") ("name" "form0") ("action" "mycgiscript.lsp") (
  "onsubmit" "return checkLoginForm(this);")
 ("newaction" "make weave not lore"))

And it works just like I want it to, but three questions evolve from this exercise:

1)How can I pass the 'lst argument by reference so that the 'set-pair function becomes destructive?

Example: (set-pair attrs attr value) ;; => 'attrs is changed with calling 'set
2)I come from a background (most recently) in python and rebol, both which pass variables

by reference.

3)I don't believe that Lutz does anything for no good reason:

Why do  most newlisp functions pass arguments by value?

Thanks

tim
#8
Here is the output from configure
bash-3.1$ ./configure

removing old objects and setting correct permissions ...
discovering platform and default memory model ...

detected memory model ILP32
detected Operating System LINUX
creating makefile_configure ...

to make for ILP32 on LINUX type:
    make
to make for any other system do:
    make -f makefile_xxx
where makefile_xxx is one of the preconfigured makefiles

What I infer from the above is that all I need to do is invoke "make"

Now here is the output from make:
bash-3.1$ make
make -f makefile_configure
make[1]: Entering directory `/home/tim/downloads/install/newlisp-10.1.7'
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX newlisp.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-symbol.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-math.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-list.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-liststr.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-string.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-filesys.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-sock.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-import.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-xml.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-web.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-matrix.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-debug.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX nl-utf8.c
gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX pcre.c
gcc newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o -m32 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `PC'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgetflag'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgetent'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `UP'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tputs'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgoto'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgetnum'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `BC'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
make[1]: *** [default] Error 1
make[1]: Leaving directory `/home/tim/downloads/install/newlisp-10.1.7'
make: *** [default] Error 2

 Following is the text of the automatically generated make_configure:

# makefile for newLISP v.10.x.x on LINUX with readline and UTF-8 support
#
# Note, that readline support may require different libraries on different OSs
#

OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o
    nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o

CFLAGS = -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX

CC = gcc

default: $(OBJS)
    $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
#   $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
#   $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
#   $(CC) $(OBJS) -m32 -g -lm -ldl -o newlisp # without readline support
    strip newlisp

.c.o:
    $(CC) $(CFLAGS) $<

$(OBJS): primes.h protos.h makefile_linux_utf8

Perhaps the line referenced by the comment: "# for UBUNTU Debian" might be the problem,

because this is not not ubuntu debian.
#9
I have written a function that modifies a list

four "levels" deep, or to put it another way, has four dimensions.

My method uses multiple calls to 'setf. I would welcome any comments

or advices as to how to optimize this function - if possible.

The preconditions are this:

I have a list that has as members (level 1) that may be either

strings or lists. Any list at level 1 may have as members either

lists or strings. (level 2)

Any list at level 2 may be nested 2 more levels deep.

What follows is

List at level 2 before modification

("form0"  ;; before
  ("type" "form")
  ("attrs" (
    ("ID" "form0")
    ("method" "POST")
    ("name" "form0")
    ("onsubmit" "return checkLoginForm(this);")
    ("action" "[[action]]")))) ;; Value referenced by "action"

List at level 2 after modification

("form0"   ;; after
  ("type" "form")
  ("attrs" (
    ("ID" "form0")
    ("method" "POST")
    ("name" "form0")
    ("onsubmit" "return checkLoginForm(this);")
    ("action" "http://localhost/cgi-bin/test.lsp"))))  ;; value changed

Now here we have the function

(define (set-form-action newaction (f 0))  ;; 'get-form sets 'current-formname
  (letn ((form-list(get-form f))           ;; level 1 referenced from 'DS by 'current-formname
         (form-tag (form-list 1))          ;; level 2
         (attrs(lookup "attrs" form-tag))  ;; level 3
         (action))
    (if (set 'action (assoc "action" attrs)) ;; level 4
      (begin
        (setf (action 1) newaction             ;; 'rewrite' at level 4
              (assoc "action" attrs) action))  ;; 'rewrite' at level 3
      (push (list "action" newaction) attrs -1))   ;; no pair. Add a pair
    (setf (form-tag 2 1) attrs                     ;; 'rewrite' at level 2
          (form-list 1) form-tag                   ;; 'rewrite' at level 1
          (assoc current-formname DS) form-list))) ;; 'rewrite' at level 0

Can this code be optimized or condensed? Insights from senior

newlispers will go a long ways to further educate me.

Thanks

tim
#10
Hi:

In python I can do this:

>>> inner = []
>>> outer1 = []
>>> outer2 = []
>>> outer1.append(inner)
>>> outer2.append(inner)
>>> inner.append(1)
>>> outer1
[[1]]
>>> outer2
[[1]]

How may I do the same thing in newlisp?

> (set 'outer1 '() 'outer2 '())
()
> (push inner outer1)
(())
> (push inner outer2)
(())
> (push 1 inner)
(1)
> outer1
(())  ;; was hoping for '((1))
> outer2
(()) ;; was hoping for '((1))

TIA

tim
#11
I've written a newlisp function that processes a string and returns a list of of elements where markup

tags are separated from plaintext.

There is an implementation featured here:

http://newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=3386">http://newlispfanclub.alh.net/forum/vie ... =16&t=3386">http://newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=3386

But it doesn't handle javascript code.

The function works for me. I expect, that once I put it to work, it

will need some tweaking. However, I have thus far used newlisp only intermittenly and I would deeply

appreciate it if some of you newlisp veterans would review this code and suggest optimizations. I have

based this on a function that I wrote for python (rebol has this feature builtin), but I would like suggestions as

to how to make the code more "newlispish". Such suggestions would certainly contribute to my overall

grasp of newlisp.

And also, I want to wish you all the best for this holiday season and for the New Year.

code follows:

;; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
;;  @syntax [-parse-markup <str>-]
;;  @Description Parse 'str' into alternating plain text and markup elements
;;  @Returns a list. Adjacent tags are seperate elements.
;; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(define (parse-markup str)
  (let ((res '())(buf "")(inTag)(inScript)(chr)(nxt)(ndx -1)(endp (- (length str) 1))
      ;; "Private" functions
      (data (fn()(not(empty? buf))))             ;; test for data in temporary buffer
      (add2buf (fn()(set 'buf(append buf chr)))) ;; append char to buffer
      (sflag (fn()(set 'inScript (if (find "javascript" (lower-case buf))))))
      (add2res
        (fn(c)  ;; Add buffer and re-initialize. Set 'inScript flag
          (sflag)              ;; set/unset 'inScript
          (push buf res)       ;; Add buffer to results
          (set 'buf "")        ;; Reinitialize the buffer
          (if c (add2buf))))) ;; End 'let initialization form
    (dostring (c str)     ;; scan string char-by-char
      (inc ndx)           ;; position of char
      (set 'chr (char c)) ;; one-char string
      (if (< ndx endp)    ;; keep track of next char to process
        (set 'nxt (str (+ ndx 1))))
      (cond
        ((= chr "<")      ;; Begin a tag insertion if not javascript
          (cond
            (inScript       ;; Still processing javascript code
              (cond
                ((= nxt "/")  ;; Finishing javascript code block.
                  (set 'inTag true
                       'inScript nil)    ;; set boolean flags
                  (cond
                    ((data)              ;; if buffer has data, push and clear
                      (add2res chr))     ;; Add buffer to results and re-initialize with char
                     (true (add2buf))))  ;; add char to empty buffer
                 (true (add2buf))))      ;; Keep filling 'buf
            (true            ;; Not in javascript code block. Starting new tag
              (set 'inTag true)
              (cond
                ((data)               ;; If 'buf has data.
                  (add2res chr))      ;;    push and re-initialize with char
                (true (add2buf))))))  ;; Buffer is empty, keep filling 'buf
        ((and (= chr ">") (not inScript)) ;; finishing a tag.
          (set 'inTag nil)
          (sflag)       ;; set flags
          (add2buf)     ;; add char to buffer
          (add2res))    ;; Push buffer and reinitialize
        (true           ;; still in script block
          (add2buf))))  ;; just add to 'buf, end dostring/outermost cond
      (if (data)        ;; If data in 'buf, add to result
        (add2res))
      (reverse res)))
#12
newLISP in the real world / Separating markup from text
November 20, 2009, 07:51:00 AM
Rebol has a function/refinement called load/markup that parses a string, url or file

into alternating text and tags. I would like to be able to do that in newlisp.

I've tried xml-parse with no luck, although xml-parse does a wonderful job of parsing

individual markup tags into a data structure.



Did I miss something as to xml-parse or is there another way?

thanks

tim
#13
Whither newLISP? / List context - performance
September 29, 2009, 12:09:51 PM
The more I use newlisp the more I like it. Mostly

I find 'append to be an exception. I have found myself coding a lot of
(set 'res(append res (list "blah" "blah1" "blah2"))) ;; untested
This begs (IMHO) for a "reconstructive" (or "destructive", I like "reconstructive" better)

function or a context.

I'd like to do something like
(set 'lst (new list))
(lst:cat "blah" "blah1" "blah2" "...")


and I can and would be happy to write such a context. I realize that there could

be a performance penalty. I would welcome comments, both on where the

performance penalities would be greatest and whether I may possibly be

"barking up the wrong tree".

Thanks, Keep up the good work Lutz
#14
Three topics, all interrelated.

Consider the following expression:

(ml '(
(table(& bgcolor "white" border 1)
(tr (F th (font(& color "darkred") "View File"))
(F th "Log Dir"))
(tr(,(select-file filelist))
(form (& method POST action (, cgi:path-thru))
(td(& valign top)
(F select (& name logdir size (,(length dirlist)))
       (, dirlist))(br)
(input (& type submit value "Log Directory"))))))) 1)

The 'ml function is the default functor for a context that I am writing. It is based

on http://www.newlisp.org/index.cgi?page=S-expressions_to_XML">http://www.newlisp.org/index.cgi?page=S ... ons_to_XML">http://www.newlisp.org/index.cgi?page=S-expressions_to_XML and is extended

to html, with conditional evaluation, attribute lists and optional 'oneline' mode. (as

opposed to nesting)

Now let's consider the following subexpression:
(,(select-file filelist))

1)Imagine it looking like this:(,(select-file filelist $DEPTH))
Where $DEPTH is a system variable that contains the 'depth' or 'level' of the

sub-expression.

2)Note the comma that starts the sub-expression. Ripped off from CL, tells 'ml

to evaluate the following expression. In rebol the 'compose function will signal

the interpreter to evaluate anything in a parens. (rebol uses a block structure where

expressions are delimited by opening and closing square brackets)

I find the DSL (domain-specific language) paradigm very useful. My two "wishes",

the $DEPTH variable and conditional evaluation signal would be useful to me. I wonder

if they would have other uses.

Comments are welcome.

Thanks

Tim
#15
newLISP in the real world / Use of 'at' sign and comma
September 15, 2009, 03:50:13 PM
This is a smbihm (stop me before I hurt myself) kind of question:

I'm writing a function that processes a list recursively. I'm using

@

at the beginning of a sublist to signal the function code to concatenate the rest of

the sublist into [var="value"] pairs

and

,

at the beginning of the sublist to tell the function code to evaluate the remainder

of the sublist.

<grin> sounds like a certain _other_ lisp doesn't it?</grin>

Any potential problems with that "down the road"?

thanks

tim
#16
For Lutz:

I've saved newLISP-icon-92.jpg to my system.



If I have Lutz's permission, I will use it as

a link to newlisp.org from my website,



Where I describe the different programming

languages that we use.

thanks

tim
#17
This is the first time I have used the debian install package to

install newlisp on ubuntu and for the first time, newlisp does

not know where to find /usr/share/newlisp/init.lsp



Looks like some environment variables got clobbered.

Need help on this too.

thanks

tim
#18
I just installed ver 10.02 on kubuntu 7.10.

newlisp-edit fails to load with the following errors:

tim@bart:~/prj/cgi/newlisp$ newlisp-edit
newLISP-GS v.1.27 on Linux
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.81)
   at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(libgcj.so.81)
   at guiserver.<init>(guiserver.java:206)
   at guiserver.main(guiserver.java:78)
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot open shared object file: No such file or directory
   at java.lang.Runtime._load(libgcj.so.81)
   at java.lang.Runtime.loadLibrary(libgcj.so.81)
   at java.lang.System.loadLibrary(libgcj.so.81)
   at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(libgcj.so.81)
   at java.lang.Class.initializeClass(libgcj.so.81)
   at java.lang.Class.forName(libgcj.so.81)
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.81)
   ...3 more

I've got java version 1.5.0 installed and symlinked to /usr/bin

Don't know much about java but that UnsatisfiedLinkError must mean

something profound ......

any help is appreciated.

thanks

tim
#19
Anything else we might add? / Lutz Mueller and gphoto2?
February 04, 2009, 06:23:47 PM
Just curious:

is Lutz the same Lutz Mueller associated with gphoto2?

tim@bart:~$ gphoto2 --version
gphoto2 2.3.1

Copyright (c) 2000-2006 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.3.1          gcc, popt(m), exif, cdk, no aa, jpeg, readline
libgphoto2      2.4.0          gcc, ltdl, EXIF
libgphoto2_port 0.8.0          gcc, ltdl, USB, serial without locking


cheers

tim
#20
To make a long story short, I'm transitioning back to vim

after using emacs for some years now.



I'm using newlisp.vim, thanks to Cyril. I just got done adding

some code to using ctags and the taglist plugin.



I did the following:

1)in the taglist plugin added the following
" newlisp language
let s:tlist_def_newlisp_settings = 'newlisp;c:class;m:member;f:function'

2)In the .ctags file added this:
--langdef=newlisp
--langmap=newlisp:.lsp
--regex-newlisp=/(define (*([^ ]+)[ ]*[ )]/1/f,function/
--regex-newlisp=/(context '*([^ ]+)[ ]*[)]/1/c,class/

This perhaps could be helpful to some vim/newlisp users.

BTW: I'm weak on regexes, every time I use them lately, it seems

like I'm learning the protocol all over again, so if anyone can improve

on them, I'd be grateful.

If any vim users are unfamiliar with taglist, I'd certainly recommend that

you look into it, because it is a nice feature that makes vim more

of an IDE.

Thanks

Tim