From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: asynchronous parsing Date: Wed, 12 Aug 2009 22:01:23 +0200 Message-ID: References: <7b501d5c0908091634ndfba631vd9db6502db301097@mail.gmail.com> <200908101335.24002.danc@merrillprint.com> <87my67s8mr.fsf@randomsample.de> <1249942011.29022.15.camel@projectile.siege-engine.com> <1249955428.29022.186.camel@projectile.siege-engine.com> <9c768dc60908102347v57bdf38ara9fe2179f68c07e4@mail.gmail.com> <87y6ppjbwh.fsf_-_@lifelogs.com> <87vdksizxt.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250107308 10995 80.91.229.12 (12 Aug 2009 20:01:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Aug 2009 20:01:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 12 22:01:41 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MbK0v-0000Rs-VU for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2009 22:01:38 +0200 Original-Received: from localhost ([127.0.0.1]:54989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbK0t-0006CR-RX for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2009 16:01:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbK0o-000681-Rm for emacs-devel@gnu.org; Wed, 12 Aug 2009 16:01:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbK0k-0005wl-QB for emacs-devel@gnu.org; Wed, 12 Aug 2009 16:01:30 -0400 Original-Received: from [199.232.76.173] (port=53599 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbK0k-0005wW-Mt for emacs-devel@gnu.org; Wed, 12 Aug 2009 16:01:26 -0400 Original-Received: from iwfs.imcode.com ([82.115.149.64]:56303 helo=gate.verona.se) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbK0j-0007tS-Vu for emacs-devel@gnu.org; Wed, 12 Aug 2009 16:01:26 -0400 Original-Received: from localhost.localdomain (IDENT:1005@localhost [127.0.0.1]) by gate.verona.se (8.13.4/8.11.4) with ESMTP id n7CK1N8S017268; Wed, 12 Aug 2009 22:01:23 +0200 In-Reply-To: <87vdksizxt.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 12 Aug 2009 14:39:58 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114154 Archived-At: Ted Zlatanov writes: > On Wed, 12 Aug 2009 19:16:15 +0200 joakim@verona.se wrote: > > j> Ted Zlatanov writes: >>> On Tue, 11 Aug 2009 12:04:20 -0400 Stefan Monnier wrote: >>> >>>>> I. Asynchronous parsing > SM> BTW, I'm interested in adding core-Emacs support for such parsing, so if > SM> you have any ideas about it, please share them. The way I see it, there > SM> should be a table-based parsing engine written in C running in > SM> a spearate thread, so the question are "what should the tables look > SM> like?", "what should the output look like?", "what should the engine > SM> look like?", "how should the asynchronous code synchronize with the rest > SM> of Emacs?". Any help along this effort would be welcome. >>> >>> Maybe it would make sense to make this engine the first implementation >>> of an asynchronous process in Emacs. We know we need general-purpose >>> asynchronous processes, it's been discussed many times. Doing it with a >>> parser, a read-only process with internal state, would be a good start. >>> The difference from your suggestion is that rather than implementing a >>> one-off, the goal becomes the first cut of a general facility. >>> >>> I bring this up because the need for asynchronous processes keeps coming >>> up in Gnus discussions... > > j> Sounds very interesting, how would that work? > > The same way Stefan's suggestion would work: a separate thread running > this parser. The difference is that we don't just do one thread for the > parser and code especially for that purpose, but instead think of a > general thread facility the parser can use. Once we prototype the > facility, we'll know better what works and what doesn't. Its this I'm interested in. > The specifics of the parser, if that's what you're curious about, are > not important to me (I don't plan to write such parsers or configure > them myself). I just need the general threading facility for Gnus work. That would indeed be great. > Ted > > -- Joakim Verona