From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: asynchronous parsing Date: Wed, 12 Aug 2009 14:39:58 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87vdksizxt.fsf@lifelogs.com> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250106322 7854 80.91.229.12 (12 Aug 2009 19:45:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Aug 2009 19:45:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 12 21:45:16 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 1MbJl4-0001MX-HX for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2009 21:45:14 +0200 Original-Received: from localhost ([127.0.0.1]:45124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbJl2-0004zF-2C for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2009 15:45:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbJgK-0006QO-I4 for emacs-devel@gnu.org; Wed, 12 Aug 2009 15:40:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbJgE-0006NF-O1 for emacs-devel@gnu.org; Wed, 12 Aug 2009 15:40:19 -0400 Original-Received: from [199.232.76.173] (port=34969 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbJgE-0006N1-Cf for emacs-devel@gnu.org; Wed, 12 Aug 2009 15:40:14 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:37028) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbJgD-0003NO-M1 for emacs-devel@gnu.org; Wed, 12 Aug 2009 15:40:13 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbJgC-0004Yr-O3 for emacs-devel@gnu.org; Wed, 12 Aug 2009 15:40:13 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MbJg8-0003lH-Th for emacs-devel@gnu.org; Wed, 12 Aug 2009 19:40:08 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Aug 2009 19:40:08 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Aug 2009 19:40:08 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:yn5jAEo/cRHXPueJGeCEd6+dqSE= X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:114153 Archived-At: 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. 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. Ted