From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Yates Newsgroups: gmane.emacs.devel Subject: Re: Emacs contributions, C and Lisp Date: Thu, 20 Feb 2014 18:12:53 -0500 Message-ID: References: <83mwhucg1h.fsf@gnu.org> <878ute589i.fsf@fencepost.gnu.org> <83d2iqc84m.fsf@gnu.org> <87wqgxkcr9.fsf@yandex.ru> <834n41db0d.fsf@gnu.org> <52FE2985.4070703@yandex.ru> <831tz5daes.fsf@gnu.org> <8738jlohd6.fsf@yandex.ru> <83txc1bl83.fsf@gnu.org> <5300189A.9090208@yandex.ru> <83wqgv9fbj.fsf@gnu.org> <20140216180712.236069f6@forcix.jorgenschaefer.de> <87wqgr4v18.fsf@yandex.ru> <53064BD0.7070009@yandex.ru> <87ha7tr5bo.fsf@fencepost.gnu.org> <87ppmhecd8.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0160b8f021840204f2dea584 X-Trace: ger.gmane.org 1392937981 4549 80.91.229.3 (20 Feb 2014 23:13:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2014 23:13:01 +0000 (UTC) Cc: David Kastrup , Emacs developers To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 21 00:13:10 2014 Return-path: Envelope-to: ged-emacs-devel@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 1WGcnl-0000kV-In for ged-emacs-devel@m.gmane.org; Fri, 21 Feb 2014 00:13:09 +0100 Original-Received: from localhost ([::1]:41227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGcnl-0007Ds-0S for ged-emacs-devel@m.gmane.org; Thu, 20 Feb 2014 18:13:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGcnd-0007DQ-Ar for emacs-devel@gnu.org; Thu, 20 Feb 2014 18:13:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGcnc-0000VH-44 for emacs-devel@gnu.org; Thu, 20 Feb 2014 18:13:01 -0500 Original-Received: from mail-yh0-x22a.google.com ([2607:f8b0:4002:c01::22a]:65163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGcnW-0000Un-IL; Thu, 20 Feb 2014 18:12:54 -0500 Original-Received: by mail-yh0-f42.google.com with SMTP id a41so1558521yho.1 for ; Thu, 20 Feb 2014 15:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=U2c4nE+wuyGwjTKLLatwwFqvjcabKnbQgl6jhjvX8vM=; b=APC8KzZpMGKVHMZkRNGJR/jfJ9CGOP5fDLwDrRInSQKjTw5OcpDN8RzDC5Kmig2q6D Gy2NW1y+0xgnOnwaKtLUrHLp96rC4lrs1a55x2ZyO5Q6HhEVsx+FIkvTF0CP+7uoizSZ 56YG8Xo4zIJb0yff93VuRFEWuKyoLXO9gPwY7ZokvLhTxuW77YSvV96tPlmjw+4OK761 suipPupa9K2fpJ7WmvmHhrIINxw0PEcAoTGt2fhsjUTX7iY1axZuPqhmpB192P6Ov7ft XSJU4+fhhjTvq9DPwI5SVeb3qIx74buFJUOKlrngeRgaW4e8rpABZNvhRoHX069Nu11q D7fg== X-Received: by 10.236.199.82 with SMTP id w58mr6789046yhn.57.1392937973939; Thu, 20 Feb 2014 15:12:53 -0800 (PST) Original-Received: by 10.170.46.138 with HTTP; Thu, 20 Feb 2014 15:12:53 -0800 (PST) In-Reply-To: <87ppmhecd8.fsf@yandex.ru> X-Google-Sender-Auth: uIGAMiZRzlnIiVdP7t1lgo39BsA X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169794 Archived-At: --089e0160b8f021840204f2dea584 Content-Type: text/plain; charset=ISO-8859-1 I would like to hear the gcc developers weigh in on whether such a tool (namely a variant invocation of gcc running through all of its lexing, parsing and semantic analysis) could ever be made to operate at speeds that would make gcc-based completion tolerable. And if not then in what way could the gcc codebase be leverage to support realistic completion? This goes to a crucial part of the discussion that I feel RMS fails to acknowlege. Namely that clang is not a compiler frontend per se but a set of performance-focused components targeted at building C++-aware (often interactive) tools. clang-based completion is not an invocation of a compiler built by grafting clang onto llvm but rather communication with a caching server built using clang components. We have existence proof that one can use clang libraries to build a C++ compiler competing with gcc. I wonder how realistic it is to expect gcc to be turned into components enabling construction of tools similar to those using clang: http://clang.llvm.org/doxygen/classclang_1_1tooling_1_1RefactoringTool.html http://clang-analyzer.llvm.org/ https://code.google.com/p/include-what-you-use/ To what extent does the "do not offer interfaces that might enable repurposing of gcc code for non-free projects" make it unlikely that such components might ever emerge? /john On Thu, Feb 20, 2014 at 3:51 PM, Dmitry Gutov wrote: > David Kastrup writes: > > > I think it would make sense to pass that info via pipe or socket and > > receive the output similarly. That way each file only needs to get > > parsed once, not repeatedly for every completion. > > Isn't this what I wrote in the next paragraph, after the one you quoted? > > I don't see how you would parse the file only once, though. The user > types a new word -> you have to parse it again, no? > > --089e0160b8f021840204f2dea584 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I would like to hear the gcc developers weigh in on whethe= r such a tool (namely a variant invocation of gcc running through all of it= s lexing, parsing and semantic analysis) could ever be made to operate at s= peeds that would make gcc-based completion tolerable. =A0And if not then in= what way could the gcc codebase be leverage to support realistic completio= n?

This goes to a crucial part of the discussion that I feel RM= S fails to acknowlege. =A0Namely that clang is not a compiler frontend per = se but a set of performance-focused components targeted at building C++-awa= re (often interactive) tools. =A0clang-based completion is not an invocatio= n of a compiler built by grafting clang onto llvm but rather communication = with a caching server built using clang components.

We have existence proof that one can use clang librarie= s to build a C++ compiler competing with gcc. =A0I wonder how realistic it = is to expect gcc to be turned into components enabling construction of tool= s similar to those using clang:


To what extent does the "do not offer interfaces that might enable r= epurposing of gcc code for non-free projects" make it unlikely that su= ch components might ever emerge?

/john



On Thu, Feb 20, 2014 at 3:51 PM,= Dmitry Gutov <dgutov@yandex.ru> wrote:
David Kastrup <dak@gnu.org> writes:

> I think it would make sense to pass that info via pipe or socket and > receive the output similarly. =A0That way each file only needs to get<= br> > parsed once, not repeatedly for every completion.

Isn't this what I wrote in the next paragraph, after the one you = quoted?

I don't see how you would parse the file only once, though. The user types a new word -> you have to parse it again, no?


--089e0160b8f021840204f2dea584--