From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmsAG-0004xd-Lb for qemu-devel@nongnu.org; Mon, 16 Jan 2012 14:24:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmsAA-0005Ps-OV for qemu-devel@nongnu.org; Mon, 16 Jan 2012 14:24:20 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:58567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmsAA-0005Pm-CX for qemu-devel@nongnu.org; Mon, 16 Jan 2012 14:24:14 -0500 Received: from /spool/local by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Jan 2012 12:24:12 -0700 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id C84D11FF0050 for ; Mon, 16 Jan 2012 12:24:06 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0GJO3of123750 for ; Mon, 16 Jan 2012 12:24:04 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0GJO3Ew016045 for ; Mon, 16 Jan 2012 12:24:03 -0700 Message-ID: <4F14794C.5060706@us.ibm.com> Date: Mon, 16 Jan 2012 13:23:56 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1326738174-14771-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC] pyembed: integer python into QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bradbury Cc: qemu-devel@nongnu.org On 01/16/2012 12:35 PM, Alex Bradbury wrote: > On 16 January 2012 18:22, Anthony Liguori wrote: >> This is something I started during 1.0-rc on a lark and spent some time last >> night actually making work. I'm sending it only to show that (1) it's possible >> and (2) to get some input about what other people think as a longer term >> direction. > > At the risk of starting a language flame-war, have you considered > embedding something like Lua?The source of the core Lua interpreter is > small enough that it could be imported into the Qemu repository. Generally, I don't think importing external source code is a Good Idea. Part of the appeal to me about Python is the rich library that it brings in. I'm less interested in Python for it's list comprehension syntax and more interested in it for it's config parsing library, RPC infrastructure, etc. Plus, I'm reasonably confident that most QEMU developers have some experience with Python. I'd wager that very few people have any practical experience with LUA. So in terms of embedding, I think Python is the only reasonable path forward (if we think we should even head in this direction). > There > may also be advantages to having access to LuaJIT (on supported > platforms) for its speed and FFI library [1] which could make it > feasible to prototype new device models in a high level language with > good performance. Python has a simple FFI module (ctypes). Regards, Anthony Liguori > Alex > > [1] http://luajit.org/ext_ffi.html >