From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master) Date: Thu, 30 Sep 2021 14:26:40 +0100 Message-ID: References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> <874ka5gsqa.fsf@gnus.org> <25d8d72022b571db5291@heytings.org> <87h7e2xsl5.fsf@gmail.com> <25d8d72022e1ea7ed022@heytings.org> <87h7e2jjzy.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2263"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Richard Stallman , Phil Sainty , emacs-devel , =?UTF-8?B?QW5kcsOpIEEuIEdvbWVz?= , Gregory Heytings , Lars Ingebrigtsen To: Tomas Hlavaty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 30 15:41:07 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVwJ8-0000N7-OS for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Sep 2021 15:41:06 +0200 Original-Received: from localhost ([::1]:50652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVwJ7-0006Od-E0 for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Sep 2021 09:41:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVw5M-0001cJ-QF for emacs-devel@gnu.org; Thu, 30 Sep 2021 09:26:52 -0400 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:42644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVw5L-00005W-1f; Thu, 30 Sep 2021 09:26:52 -0400 Original-Received: by mail-pf1-x430.google.com with SMTP id q23so4978583pfs.9; Thu, 30 Sep 2021 06:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zrMuKZQvAaaIzVnHzCdHqw/ZAaSQvPTa2cPqimEX09k=; b=cfSF3YM8rfv5ln3GnaIH3G4aGm5JRZ4RdHg8zFphWuJ+OVg7dI2B73t++eORUPKRST DvRfieOhakNeDf+vtFDK8E4V/S2VbO+S9wnOmPQziotJviYFCOdQxTlGjHEWQRcPu76O azdeczmm20J10O2gYBS6X3tX1KNblJazN7+XVglWW5clV18zSlTIy5B0QT/gFH5FlNHz gsLNTLW4x/60ZgFIsuxA7Itsb1dFAAZ3trRhQP1HOmTBDdWHl9ze/Ym5BneCsh1xpD5j cPknDrbtEGgox/sJWjr/PMFU7Mrt2dPwkjRV+xu81afzu+ULmUDUNzKLDfTWOCS4Davp WOEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zrMuKZQvAaaIzVnHzCdHqw/ZAaSQvPTa2cPqimEX09k=; b=Ggop7ALAnXpFVUVhpsS01b+NYhbROS9pIPajF2st0zBD5WB7GkPuXa6s1eTk6F7sYv qNvVJOy0Piq/E/qFEK4Xiyr7J3EexwEB0PJbl5oaCfGeeqVGjmSABm+21sjzbwW+svxC P7Fd9N1xUvnfW3KCf14Ft8Tf91CODPDxnz1laHKQOyAgz5mzuu6CPWeZLanAFjg5J35p 9DiPCCuD8wNlH0YCyYINLo+9Psk+aqhEqyvCLVGYC5CbI5TM/0y4abDde8oB+F0w7pEa JWbye03P3vwo+LqQhXvkp4rJPE34IppFSzCjbI6sRjv/fX9//e8XHXRB2DIVf74mqJPU ZkUQ== X-Gm-Message-State: AOAM531xntZz1tq+TIFVQPLPpUUemiaN7hfjkvimfoaB0ww3wq5exPf9 zHrV6uVMzM5BrIzuKlphyTkutXFbhriw8mS+Yqk= X-Google-Smtp-Source: ABdhPJzfMcFn58YrGZ2v2qJSuTpxP0JEx5VlKBU2f8uJVFuBYCCnhKF6wTkL2pEne/bAH2oo9PZhcnoYA7VAVIpa530= X-Received: by 2002:a62:7f01:0:b0:43c:ecef:98dd with SMTP id a1-20020a627f01000000b0043cecef98ddmr4461470pfd.50.1633008409137; Thu, 30 Sep 2021 06:26:49 -0700 (PDT) In-Reply-To: <87h7e2jjzy.fsf@logand.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=joaotavora@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275895 Archived-At: On Thu, Sep 30, 2021 at 2:00 PM Tomas Hlavaty wrote: > > On Thu 30 Sep 2021 at 13:41, Jo=C3=A3o T=C3=A1vora = wrote: > > On Thu, Sep 30, 2021, 12:46 Gregory Heytings wro= te: > >> > but it's the wrong tool. > >> And what is/what are the "right" tool(s) for the above use case? > > In contrast, in some common lisp IDEs you have such tools and expose th= is > > database. Xref in Emacs was originally derived from work of a Common Li= sp > > programmer, which created the amazing SLIME, which you may have heard o= f. > > SLIME (and my fork of it Sly) are indeed able to use these databases. > > > > Andr=C3=A9's comment is very accurate. In SLIME, one eats Lisp with a s= poon, not > > a fork. > > Except it does not remove the need for grep. > It misses a lot of things, you cannot rely on it completely. > It needs the lisp code loaded and compiled sucessfully. No, you're able to build such a tool that merely needs to Lisp code to be CL:READ. Grep also "reads" the code, but it reads it line by line. OK for for C (but not always), not so much for Lisp (In Elisp, CL:READ is 'read', = btw). Also, Lisp is developed iteratively. You're supposed to have it loaded in = your image while you develop it. It's not like C where you do something and ha= ve to recompile the whole thing. Elisp development is no different here. CL:READ/'read' areboth aware of packages/shorthands. It can tell you where the symbol reference lives. That doesn't tell you if its a function, a vari= able, a gremlin, etc... of course [*] But neither does grep. Grep is light-years away from that. And grep fails very horribly in Common Lisp as you well know, if you include the package qualifier. Since a package qualifier has loads of nicknames (much like shorthands to be honest. For those not in the loop, the package qualifier is the equivalent of the prefix in Emacs lisp. So, if in Emacs Lisp, you make it easy to grep for the previ and non-prefix parts of a given name, then bam!, you have a achieved Common Lisp grep parity! (which isn't much of course, as Andr=C3=A9's point still stands intact: it is a fork for soup). > Slime + Common Lisp are great but not perfect. Sure! But they sure beat anything else I've worked with, including Emacs, which comes second. I use grep too, by the way. But I prefer apropos. Again, it knows a lot more and has a French name, so it's frankly impossible not to. I see some people arguing like shorthands have "broken" grep which was some= k ind of omniscient oracle about code analysis. That's so far away from the truth. What would be the point of all these LSP enhancements we're seeing for all languages if it were? Of all Static Code Analysis tools being developed? In Elisp many constructs already escape it or break it. defmethod or defstruct just to name two. My point is that Lisp has many much better tools -- available today or waiting to be created -- because of its List-based structure. Grep really is a middle-ages tool for Lisp. Lisp looks like it's from the past, but it's actually from the future ;-) Jo=C3=A3o [*] This, by the way, is _another_ reason why reader-based approaches to namespacing systems are, IMO, better than macro-based ones.