From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] * src/eval.c: Stop checking for nvars, and use only CONSP Date: Tue, 02 Mar 2021 12:44:04 -0500 Message-ID: References: <20210302.111043.609653289571449353.conao3@gmail.com> <20210302.120929.1656994339284323372.conao3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6457"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Naoya Yamashita , emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 02 18:44:51 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 1lH94l-0001YP-49 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 18:44:51 +0100 Original-Received: from localhost ([::1]:42086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH94k-0004ls-65 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 12:44:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH947-0004Ka-7A for emacs-devel@gnu.org; Tue, 02 Mar 2021 12:44:11 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH945-0005F7-19 for emacs-devel@gnu.org; Tue, 02 Mar 2021 12:44:10 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 84F0110023D; Tue, 2 Mar 2021 12:44:07 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D8F24100062; Tue, 2 Mar 2021 12:44:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614707045; bh=Hhe8FcwMU0tpiGgAQOuQM/8XTVWXYekRNio2NdJDpUc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=h/qTFp0g9YAaoYd5ov69/dlnvl3wqP9ivOy6XWjdYUPDH1Xy+ueuQi8y4bFtjAP30 sXOc8HUfULt8wKx/GURbZ+1XjfBz2luL9dJWErSQfk8kLmuhzQ0H6tcwduSp9jW1bs /Iv3GbOZoBdXKfw5MybE9ZBeHfDNSTfHZsFK8gPQ7vQdK+bfKpyTc6WknoCtkR62MM hmAF8lhrWS6B/nk6AM8NEdYwXraMgMMex1NvMYi6CmT4dUtg7pE0RsNJn7bRFOSgb/ D++dse1rMGbYwf5/aJSsnCLRNZlMQhqk+njVRPBqqPrV2gcYWWHnHQ8icA7gHm0HSg IEOFEpMUoou9A== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 64FF3120348; Tue, 2 Mar 2021 12:44:05 -0500 (EST) In-Reply-To: (Pip Cet's message of "Tue, 2 Mar 2021 17:04:28 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:265842 Archived-At: >> > I'm all for a revolution, but it might be a bit early to chop off this >> > particular king's head... >> Until we have good debugging support for byte-compiled code, the >> interpreter isn't going anywhere, indeed. > We could rewrite it in ELisp, though :-) That would mean just replacing the `Flet` in C with another in ELisp, so it would largely just move the question (which is about diagnosing invalid code). >> >> (defun eval (exp) (funcall (byte-compile `(lambda () ,exp)))) >> > Except for the ones that can't. ELC is still limited to 64K constants >> > in the vector, for example, isn't it? >> I believe so, yes. If/when we bump into this limit we can push it >> further (or finally replace our bytecode language with a new one ;-). > I hear the hot new thing is to use leb128 integers for everything. I see I'm fashionable, then: (defconst bindat-test--LEB128 (bindat-type letrec ((loop (struct :pack-var n (head u8 :pack-val (+ (logand n 127) (if (> n 127) 128 0))) (tail if (< head 128) (unit 0) loop :pack-val (ash n -7)) :unpack-val (+ (logand head 127) (ash tail 7))))) loop)) ;-) >> > But as for the original question, do we have to have Flet? >> I have not seen this question asked in this thread. > The question was "can we remove this code from Flet?", right? I think > "yes, all of it. No, all of Flet." is a valid answer to that question :-) Point taken. > (I dislike the "let" family, mostly for the fact that it is a family. > It leads naturally to cl-loop.) Removing its special-form status wouldn't remove it from the language, tho :-( [ Personally, I do find `let` important. Partly because of my let-polymorphism upbringing ;-) ] Stefan