From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hans Aberg Newsgroups: gmane.lisp.guile.user Subject: Re: Plotting in Guile Date: Wed, 28 Jul 2010 20:45:54 +0200 Message-ID: References: <1DD44717-011B-4D6B-BC6E-2640D50B92F2@telia.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1280342775 27819 80.91.229.12 (28 Jul 2010 18:46:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2010 18:46:15 +0000 (UTC) Cc: guile-user@gnu.org To: Joel James Adamson Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jul 28 20:46:13 2010 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OeBds-0001tF-2i for guile-user@m.gmane.org; Wed, 28 Jul 2010 20:46:12 +0200 Original-Received: from localhost ([127.0.0.1]:60700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeBdr-0003ic-FU for guile-user@m.gmane.org; Wed, 28 Jul 2010 14:46:11 -0400 Original-Received: from [140.186.70.92] (port=35019 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeBdj-0003iX-Fu for guile-user@gnu.org; Wed, 28 Jul 2010 14:46:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OeBde-00042j-99 for guile-user@gnu.org; Wed, 28 Jul 2010 14:46:03 -0400 Original-Received: from smtp-out11.han.skanova.net ([195.67.226.200]:45701) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeBde-00042M-0n for guile-user@gnu.org; Wed, 28 Jul 2010 14:45:58 -0400 Original-Received: from h131n2-fre-d2.ias.bredband.telia.com (78.72.157.131) by smtp-out11.han.skanova.net (8.5.114) (authenticated as u26619196) id 4BC6D1B302366872; Wed, 28 Jul 2010 20:45:56 +0200 In-Reply-To: X-Mailer: Apple Mail (2.936) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8021 Archived-At: On 28 Jul 2010, at 19:54, Joel James Adamson wrote: >> GNUPLOT seems to require pipes, if not using a file. > > The question from the IPC newbie (myself): is there something wrong > with > pipes? I've read a basic tutorial and they seem to do what I would > need, but the author seemed to think they were worthless. Educate me. I'm no expert, but pipes are simple and effective, though somewhat limited, as one program must be the descendant of another. Bison uses a pipe to call M4, which works just fine, and you have a similar application. Earlier, it used the writing file variation, and there is a problem with cleanup. >>> 2. My thoughts were that I could use the POSIX IPC modules available >>> in >>> Guile to run GNUPLOT and send commands through a pipe or other >>> appropriate interface. >> >> Guile has a command scm_pipe() (see manual). It is not difficult to >> link to C-code - that is a point of using Guile. > > So would I write a C program to handle the IPC between guile and > GNUPLOT, and then control it with Scheme? Guile has both scm_pipe() to use in a C program, and pipe to use in Scheme code. So you might try calling it directly. If you turn GNUPLOT into a library, you can link it directly to Guile. Hans