unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: stephen@xemacs.org, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109327: Generalize	INTERNAL_FIELD between buffers, keyboards and frames.
Date: Thu, 02 Aug 2012 19:07:43 +0300	[thread overview]
Message-ID: <83d339cm5s.fsf@gnu.org> (raw)
In-Reply-To: <501A3079.5040905@yandex.ru>

> Date: Thu, 02 Aug 2012 11:47:05 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
> Cc: Stefan Monnier <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
> 
> I agree, but only when the feature is more or less isolated (like
> BIDI, IIUC).

How can you consider "isolated" a feature that invades every little
corner of the Emacs display engine?  Can you imagine an Emacs with
broken redisplay being used by someone?

xdisp.c, the main source file that implements the display engine,
weighs in at almost 30K lines.  Given that size, the probability of
someone else fixing a bug in the same file is not negligible.  I just
counted several dozens of changes made in xdisp.c while I was working
on a branch.  And still the amount of clashes was small, see my other
mail.

> Most probably new GC will introduce new limitations on
> how the Lisp_Objects may be used, and, unfortunately, these limitations
> should be enforced through the whole project _before_ new GC becomes
> alive for the first time.

Once you make the initial pass over the sources and replace direct
access with getters and setters, the merges that will bring you code
that uses direct access will be few and far apart, since the bulk of
Emacs code doesn't change.  Moreover, the compiler will flag those
places right away.  So fixing the few build failures introduced by
merges should be simple and fast.  A few minutes devoted to that every
week or so is not a high price to pay.

> For the particular write barriers case, just
> one bypass is most likely to crash everything; so, barriers should be
> designed and implemented first, and all developers should be encouraged
> to remember about them and obey new limitations when writing new code
> or fixing an old bugs. The only reliable way to do it is to have barriers
> in the trunk (defined to zero-overhead no-ops in the default configuration,
> of course).

I don't think this will work, not in Emacs, anyway.  We don't have
here enough discipline or omniscient team leaders to enforce this kind
of order.  People _will_ do what you don't want them to, and they
_will_ bump into bugs, and then will blame you.

The trick I used to spare users from potentially unstable code (when I
merged the bidi branch onto the trunk, after 1.5 years of working
aside) was to have a variable, whose default was OFF, that allowed me
to switch the new code on or off.  After a while, a few well-meaning
people started running with that variable ON and reported the problems
they saw; but the vast majority of people who track the development
were never exposed to the bidi code, until I considered it stable
enough to be used by default.

This way (or something similar) will allow you to avoid annoying
people by unstable code.  So you could develop the entire thing on a
branch, until all of its main pieces are in place, then merge to the
trunk (perhaps after some peer review, to make sure the overall design
and implementation are good enough), and continue development and
debugging on the trunk, having the new code switched off by default
until it's deemed ready for prime time.

> This is not the matter or _my_ architecture; current code base provides
> very poor opportunities for any GC designer, and this should be changed
> _before_ any useful GC improvements may be implemented.

Then make these changes on a branch, one by one, until everything is
in place.

> Everyone wants a new house, but nobody wants to suffer the temporary
> inconveniences connected with building; but (if the house is large
> enough) it's practically impossible to build the house somewhere
> else and then transport it to the final destination.

What is impossible with houses, is fortunately possible with a dVCS ;-)



  parent reply	other threads:[~2012-08-02 16:07 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1SwCK8-0001PC-3m@vcs.savannah.gnu.org>
2012-08-01 10:33 ` [Emacs-diffs] /srv/bzr/emacs/trunk r109327: Generalize INTERNAL_FIELD between buffers, keyboards and frames Stefan Monnier
2012-08-01 12:04   ` Dmitry Antipov
2012-08-01 14:58     ` Paul Eggert
2012-08-01 16:52       ` Dmitry Antipov
2012-08-01 17:38       ` Tom Tromey
2012-08-01 21:04         ` Paul Eggert
2012-08-02  5:28         ` Stephen J. Turnbull
2012-08-01 15:01     ` Eli Zaretskii
2012-08-01 18:02       ` Dmitry Antipov
2012-08-02 15:28         ` Eli Zaretskii
2012-08-01 23:52     ` Stefan Monnier
2012-08-02  4:12       ` Dmitry Antipov
2012-08-02  5:56         ` Stephen J. Turnbull
2012-08-02  7:47           ` Dmitry Antipov
2012-08-02  9:30             ` Juanma Barranquero
2012-08-02 16:07             ` Eli Zaretskii [this message]
2012-08-02 15:45           ` Eli Zaretskii
2012-08-02 21:28             ` Paul Eggert
2012-08-03  6:27               ` Eli Zaretskii
2012-08-03  6:52                 ` Paul Eggert
2012-08-02 23:38           ` Richard Stallman
2012-08-02 15:34         ` Eli Zaretskii
2012-08-03  7:42         ` Stefan Monnier
2012-08-03  8:31           ` Dmitry Antipov
2012-08-03 18:58             ` Paul Eggert
2012-08-03 22:52               ` Stefan Monnier
2012-08-04 16:31                 ` Paul Eggert
2012-08-05 15:03                   ` Dmitry Antipov
2012-08-06 10:54                     ` Stefan Monnier
2012-08-06 11:44                       ` Dmitry Antipov
2012-08-06 16:31                         ` Stefan Monnier
2012-08-06 17:43                           ` Stefan Monnier
2012-08-08  7:22                         ` Chong Yidong
2012-08-05 14:59               ` Dmitry Antipov
2012-08-05 15:23                 ` Paul Eggert
2012-08-05 20:29                   ` Miles Bader
2012-08-03 22:50             ` Stefan Monnier
2012-08-03 23:11               ` Wojciech Meyer
2012-08-08  3:39           ` Chong Yidong
2012-08-08  7:14             ` Dmitry Antipov
2012-08-08  7:46               ` Chong Yidong
2012-08-08 10:18                 ` Dmitry Antipov
2012-08-08 12:41             ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83d339cm5s.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=stephen@xemacs.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).