Get time for debugging purposes

How in xlisp can I get current clock time so I can print it?

Or otherwise figure out where time is going in my code?

Are you working up to give Audacity Time Of Day? That would be welcome.

I don’t think that you can, though it might be a nice feature for version 4 plug-ins.

How “fine grained” do you want to get?
You can approximate the time taken by a function by looping through it a large number of times.

Is there a more complete XLISP reference than ?

I am referring to Common Lisp: The Language by Guy Steele. It dates from the 1980s, but apparently so does that web page. The book doesn’t have the object oriented stuff but it describes many things, some of which I find usable in the Nyquist prompt, others not.

For instance, today I discovered the incf and decf macros, which I don’t need to redefine for myself. But it was the book that told me that, not the web page.

This is the main XLISP manual that I use:
The language reference ( is particularly useful as it provides examples for most of the functions.

I don’t think that INCF and DECF are standard XLISP functions, though they are available in Nyquist and appear in the Nyquist index:

It is a common LISP standard function. It unfortunately misses the optional increase amount. I’ve seen Paul’s inc definition in the first plug-in and was wondering why he uses practically the same macro code…
The macros are also listed in my “Nyquist Reference” plug-in.

By the way, I’ve contacted Edgar about a possible clock implementation in Nyquist. That was about 3 weeks ago.
If the system function would work, the matter would be easy by echoing the system time into a file or by setting up a system variable that can be read out by get-env.
I hope Edgar will find a solution (he’s always very busy…).

I have an edition of Steele dated 1984. Is that still a good reference?

Is there a function that simply dumps all defined function and macro names? I could see what parts are implemented and which not.

I have noticed that not all is as in the book. For instance: make-array cannot take a list of dimensions but only a single number.

And also: (return-from tag value) is supposed to require that tag is in lexical scope, according to the book, but contrary to the book (and sometimes usefully for debugging), in Nyquist the tag is dynamically scoped, so I can write a long distance exit from any named function higher up the call stack at the time.

There’s quite a lot more stuff in Common Lisp that in XLISP. You’ll probably get quite frustrated if you use a book about Common Lisp as a language reference, but it will probably still be an excellent reference for other things, such as how to write in a “Lisp-like” way.

When I started using Nyquist, there was very little documentation. There was a Nyquist manual (similar to the current manual but less complete and less accurate), a brief introduction to XLISP by Edgar-rft, and (I think version 1 of) the XLISP manual by David Michael Betz, and the original version of this: There were also a few Nyquist plug-ins shipped with Audacity that could be used as examples, but they were not written by experienced LISP programmers so were not particularly good examples of “the right way” to write.

Since then, those documents have all been updated and expanded, and Edgar-rft wrote this “Nyquist Plug-ins Reference”:

My list of on-line documentation:

There is also Robert’s “Little Helper” reference:

There’s also Edgar Franke’s “Apropos” plug-in that lists all available functions and variables. It includes a search field. I’ve expanded it to show the actual variable values when “Variables only” is chosen:
apropos.ny (5.47 KB)

Although, this is an old topic, I am wondering if there is an answer to the original question. How to get time for debugging purposes?

As a dirty workaround I can export a fake file and see the time
when it was created.