From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Byte-compiler warnings Date: Thu, 25 Jun 2015 03:52:20 +0200 Message-ID: <87bng4imgb.fsf@nl106-137-147.student.uu.se> References: <87bng5qrcp.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435197252 22283 80.91.229.3 (25 Jun 2015 01:54:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 01:54:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 25 03:54:02 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z7wMb-0007v8-QF for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 03:54:01 +0200 Original-Received: from localhost ([::1]:53556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7wMb-0008Rd-6k for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jun 2015 21:54:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7wMO-0008R0-OV for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 21:53:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7wMK-0000ce-Nc for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 21:53:48 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7wMK-0000bC-GJ for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 21:53:44 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z7wMI-0007eM-7N for help-gnu-emacs@gnu.org; Thu, 25 Jun 2015 03:53:42 +0200 Original-Received: from nl106-137-246.student.uu.se ([130.243.137.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Jun 2015 03:53:42 +0200 Original-Received: from embe8573 by nl106-137-246.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Jun 2015 03:53:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 69 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-246.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:q55LLKZnj2tCu5crOt0s8yIWn9U= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105135 Archived-At: "Pascal J. Bourguignon" 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