help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Byte-compiler warnings


From: Emanuel Berg
Subject: Re: Byte-compiler warnings
Date: Thu, 25 Jun 2015 03:52:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

"Pascal J. Bourguignon" <pjb@informatimago.com>
writes:

>> Are there other tools that assist in writing good
>> Elisp code? I know about checkdoc, is there
>> anything else?
>
> Once upon a time, there was a lot of such tools to
> help writing lisp code, including code pattern
> matcher, expert systems, AI user models, etc.

Expert system = a state machine where states are
questions to the user and edges are the the answers
supplied. E.g.: Where does it hurt? "The leg" What
part of the leg? "The knee" and so on until it reaches
an endpoint where the expert sub presents the problem
in no uncertain terms, as well as the corresponding
solution(s).

This can be combined with probability theory in order
to make a computer do very well in games like
"20 questions".

Expert systems was a pet subject during the AI bubble
and even textbooks on AI often proudly come with
"expert system" in their titles.

The inherent drawback is most real-world problems are
either complicated (like repairing a bike) however not
complicated enough for an expert system to be helpful
continuously, *or* the problems are very complicated
indeed (how to make a girl fall in love with you) BUT
those problems are impossible to formalize so they
can't be computed anyway!

So, yet another AI bummer.

> So no, we don't abound in such tools, be it for
> Common Lisp or for emacs lisp. There's a CL lint
> around, perhaps it could be adapted for emacs lisp.

Not in the Debian repos it isn't what I can hit.
But: 'aptitude search lint | grep -i perl' (five
hits), three hits on html, and so on.

By the way: in the Wiki article "List of tools for
static code analysis" [1] there isn't a single mention
of Lisp!

> In any case, the point of lisp is that it is easy to
> write such tools

In at least one efficient and basic case there
shouldn't even be a need for a language-specific tool,
and that is the search for code duplication - to
identify blocks of code that reoccurs and thus should
be factored out. But I'm not able to find that kind of
tool either! I've heard of CPD (copy paste duplicate)
but can't find it anywhere except for a PHP version in
the repos. Someone do "KYD" (kill yank duplicate) for
Elisp... :) But again I don't see why this is
language-specific other than not considering comments
or indentation!

[1] https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]