all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Pip Cet <pipcet@gmail.com>
Cc: Naoya Yamashita <conao3@gmail.com>, emacs-devel@gnu.org
Subject: Re: [PATCH] * src/eval.c: Stop checking for nvars, and use only CONSP
Date: Tue, 02 Mar 2021 12:44:04 -0500	[thread overview]
Message-ID: <jwvczwhlalj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAOqdjBfYSoAu7QxzHA0kzK6tE1Ad_cc5S7vnU-ZOPvTUYoB4Og@mail.gmail.com> (Pip Cet's message of "Tue, 2 Mar 2021 17:04:28 +0000")

>> > 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




  reply	other threads:[~2021-03-02 17:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02  2:10 [PATCH] * src/eval.c: Stop checking for nvars, and use only CONSP Naoya Yamashita
2021-03-02  2:48 ` Stefan Monnier
2021-03-02  3:09   ` Naoya Yamashita
2021-03-02 14:31     ` Stefan Monnier
2021-03-02 15:19       ` Pip Cet
2021-03-02 15:48         ` Stefan Monnier
2021-03-02 17:04           ` Pip Cet
2021-03-02 17:44             ` Stefan Monnier [this message]
2021-03-02 19:50               ` Pip Cet
2021-03-02 23:48                 ` Stefan Monnier
2021-03-02  5:34 ` Pip Cet
2021-03-02  5:41 ` Eli Zaretskii
2021-03-02  7:14   ` Naoya Yamashita
2021-03-02  7:30     ` Pip Cet
2021-03-02 14:00     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvczwhlalj.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=conao3@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=pipcet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.