all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Vladimir Sedach <vas@oneofus.la>
Cc: Tom Tromey <tom@tromey.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: Elisp containers
Date: Sun, 09 Sep 2018 12:53:08 -0600	[thread overview]
Message-ID: <875zze4i5n.fsf@tromey.com> (raw)
In-Reply-To: <87d0tnvlkj.fsf@exinda.orion.oneofus.la> (Vladimir Sedach's message of "Sat, 08 Sep 2018 12:25:00 -0700")

>>>>> "Vladimir" == Vladimir Sedach <vas@oneofus.la> writes:

Vladimir> One way to solve the problems of "which environment to start from?"
Vladimir> and expensive copying is to implement environments as a fully
Vladimir> persistent (AKA purely functional) table. This will let you do
Vladimir> roughly the equivalent of fork(2) in a single address space quickly
Vladimir> (with the real cost amortized over the whole system).

One other consideration in this case is that one must apply the changes
to the actually existing Emacs.  Reading the portable dumper thread or
the variable binding code makes this seem less possible.  Though perhaps
I am pessimistic.

Vladimir> Virtualizing the environment with a shared heap is an IMO interesting
Vladimir> idea that has not been well explored yet, but it requires a very
Vladimir> different approach to Lisp system functions (they will all have to be
Vladimir> based around immutable data structures)

I should have mentioned immutable data structures.  This seems like a
difficult change as well.

In practice I guess I would not worry too much about existing elisp
code.  Probably if one is reaching for threads or containers, one is
willing to adapt one's code to immutability as well.

But I wonder how it would be implemented.  Tag bits are in short supply
and there isn't leftover space in a cons for a flag AFAIK.  Other types
might not be as troublesome.

>> Finally, this approach greatly reduces debuggability and the ability to
>> mess around.  Emacs would no longer be an open system -- threads would
>> have private data and there would be no way to access that.

Vladimir> The debugger could point to the environment of the thread from which
Vladimir> it was invoked. The same could be done for REPLs. So the whole
Vladimir> tool set would have to be changed to accommodate this virtualization.

Thanks, this is a nice idea.

Tom



  reply	other threads:[~2018-09-09 18:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 14:38 Elisp containers Stefan Monnier
2018-09-07 17:54 ` John Wiegley
2018-09-07 18:08   ` Stefan Monnier
2018-09-07 18:25     ` John Wiegley
2018-09-07 18:04 ` Eric Abrahamsen
2018-09-07 20:13 ` Tom Tromey
2018-09-08 19:25   ` Vladimir Sedach
2018-09-09 18:53     ` Tom Tromey [this message]
2018-09-08  5:14 ` Richard Stallman
2018-09-08  5:45 ` Helmut Eller
2018-09-08 17:56   ` Stefan Monnier

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=875zze4i5n.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=vas@oneofus.la \
    /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.