From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: raman Newsgroups: gmane.emacs.devel Subject: Re: Emacs Lisp's future Date: Mon, 10 Oct 2016 08:24:24 -0700 Message-ID: References: <87wq97i78i.fsf@earlgrey.lan> <86k2dk77w6.fsf@molnjunk.nocrew.org> <9D64B8EA-DB52-413D-AE6A-264416C391F3@iotcl.com> <83int1g0s5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476114428 22676 195.159.176.226 (10 Oct 2016 15:47:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Oct 2016 15:47:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: lars@nocrew.org, Toon Claes , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 10 17:47:00 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btcmp-0002ns-Dn for ged-emacs-devel@m.gmane.org; Mon, 10 Oct 2016 17:46:43 +0200 Original-Received: from localhost ([::1]:50924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btcmo-00062Z-0q for ged-emacs-devel@m.gmane.org; Mon, 10 Oct 2016 11:46:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btcRM-0004dk-QP for emacs-devel@gnu.org; Mon, 10 Oct 2016 11:24:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btcRK-0005vS-2E for emacs-devel@gnu.org; Mon, 10 Oct 2016 11:24:32 -0400 Original-Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]:34800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btcRJ-0005uz-Rs for emacs-devel@gnu.org; Mon, 10 Oct 2016 11:24:30 -0400 Original-Received: by mail-pa0-x233.google.com with SMTP id rz1so56378550pab.1 for ; Mon, 10 Oct 2016 08:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=dmyAF17WoVmof9hNtIW3n8L33Hj8zDjNPGMNYLinQ3U=; b=e3LwvkH5MYZmBoraD51LT4Kqi7i8MzbW+Bmbkx6tjgYzh9JOCIitKS0kmGW8x2SuFy zf0VbE+qK2baxB88PZg2RqljKkjlWN6Pfbenea73EVJZnjR+cj5uA1pVfVI9kli+3V5s fuk9tOQWmO4zQw4Kr1pHHEytMhkao1IMVejNfYR0XEVv606/WWJjt3uQqajvFExrbW1K sQ4w/tJwPGSsfN1kWkffLRG7SKhXOggfp32IyV5uoKSzcVZ7Ru1USi+P3/JfdJZDfuv8 uWRKlZ2X5QeywZa9eiBbZxlGtyWk0UZq0cdvJ3sUrWBaub4DhV8B7PhKXHqzzZO5TMHd 2klg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=dmyAF17WoVmof9hNtIW3n8L33Hj8zDjNPGMNYLinQ3U=; b=WJX0bhPqeofTqxeYc0tKcRjhXqigJrDlg3lZ0UYzVpYp9dzb0YbHHkRM/ik/gyYSLB t1h4Xj9B4DLpIecBq/peGUmadocqnIcx7tmzSMWfPSBh+82QUy9foesBq3h6hY7wubIF u1LnkucQtZhMkiibapAekWrRfW9/vMiiUEptT0fgjFisIfZTh6KETbCHjl4QVMik9X8R Oxesum0bDqHRBloYBRWaZC7+wPsq7G6Sn6/yReJQyusT//Fg2VvE4+zc5sM3q9WMhIcm cxZdp5pRzD7I4/Lzvxz3u2VPkOqmMK4ZAv52EE1KOUgHKG6bqWBUxhv8mCq5O3YhZ3Xd nHGg== X-Gm-Message-State: AA6/9Rkt84oD9oN56RaZXOjodGZkfcjoLHglsaHi9E7tiaWYXqntn/8HasUDVMys+MXvqAFn X-Received: by 10.66.5.169 with SMTP id t9mr10756834pat.169.1476113068700; Mon, 10 Oct 2016 08:24:28 -0700 (PDT) Original-Received: from raman-glaptop2 ([207.198.106.187]) by smtp.gmail.com with ESMTPSA id id6sm1998477pad.28.2016.10.10.08.24.26 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 10 Oct 2016 08:24:27 -0700 (PDT) In-Reply-To: (John Wiegley's message of "Sun, 09 Oct 2016 19:59:09 -0700") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:208144 Archived-At: John Wiegley writes: 1+ on this. >>>>>> Eli Zaretskii writes: > >> There's already a concurrency branch in the Emacs repository. It needs some >> work before it could be merged to master, so if there are people here who >> wants this badly enough, I suggest that they continue work almost done by >> Tom Tromey, who developed that branch, instead of starting anew. > > I think it needs more than just a little work. I spoke to Tom on the phone > last year, and we both agreed it's not a foregone conclusion that that branch > represents the right way of approaching concurrency for an application like > Emacs. > > In general, users don't want programmatic concurrency. What they want is for > Emacs not to freeze up after they've asked it to do something. And there are > other ways of achieving this end -- depending on the nature of the problem -- > than making concurrency a first-class citizen, with the innumerable problems > it brings. I fear we'd be debugging subtle interaction issues for the rest of > our lives if we just merged Tom's branch in today. It implements a Java-style > form of concurrency, dependent on mutexes and locking to achieve coherency, > which is fiendishly difficult to get right, even if you confine its use to > just a few small tasks. The hardest bug I ever debugged in my life was a > concurrency bug; the second hardest wasn't even close (and thankfully, I > didn't try to solve it at the same time). > > I'd much rather we re-examine the goals we want to achieve with concurrency, > an then ask if there are other ways to get there besides, well, concurrency. > For example, if we had a lightweight forking mechanism with transparent > communication between sub-ordinate processes (think async.el, but in C and > highly efficient), I think we could achieve what users want, without the > downsides developers don't want. Even the popular web browsers are moving in > this direction, since it gives a similar effect to threading, but without as > many of the downsides; or take the popularity of the Actor model, used to > reduce the coherency problem down to just mailboxes. > > The reason I love Haskell for its STM concurrency (software transactional > memory) is that it makes certain classes of problems impossible to express. I > believe we would need a mechanism like that for Emacs Lisp, so no one ever has > to hunt down cyclic mutex locks, or reference counts, or why two operations > that should be atomic aren't. I'd rather have a single-threaded Emacs for a > quite a while longer before inviting these sorts problems into our lives. --