From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vladimir Zhbanov Newsgroups: gmane.lisp.guile.user Subject: Re: Using in C a function defined in guile Date: Sun, 6 Sep 2015 22:39:31 +0300 Message-ID: <20150906193931.GA3117@localhost.localdomain> References: <20150906141001.GA23312@localhost.localdomain> <3343641.HGLD0SKhKs@fluss> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1441568401 4103 80.91.229.3 (6 Sep 2015 19:40:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Sep 2015 19:40:01 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Sep 06 21:39:49 2015 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZYfn2-0001Wo-TJ for guile-user@m.gmane.org; Sun, 06 Sep 2015 21:39:49 +0200 Original-Received: from localhost ([::1]:50338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYfn2-0003N2-Dy for guile-user@m.gmane.org; Sun, 06 Sep 2015 15:39:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYfms-0003Mq-3g for guile-user@gnu.org; Sun, 06 Sep 2015 15:39:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYfmo-0002Av-RH for guile-user@gnu.org; Sun, 06 Sep 2015 15:39:38 -0400 Original-Received: from mail-lb0-x22a.google.com ([2a00:1450:4010:c04::22a]:32932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYfmo-0002AP-Ji for guile-user@gnu.org; Sun, 06 Sep 2015 15:39:34 -0400 Original-Received: by lbcjc2 with SMTP id jc2so30484038lbc.0 for ; Sun, 06 Sep 2015 12:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=FtqL6m0/0jKWr12oHxJWB/jN2zgecUAOAbp9w8uPK0U=; b=UlQJnRk+ALRX9FKzzDolLw4pYtZi9aWKFkjiA37u+BLxKOi1I1EKik/xB4vzQXrl52 +PoGe++doQHLNQ023eIkq1YUo0/zLflyn9JifmlrqWppggIfT852T/3f5RxMigQF94/6 yHfl905BhHDuE0erg5LMRyby7uGcbGPDrpGPluV3MHefPofbr7tV02dMMKK0zEOOMx29 wvXovRSAULOjntWSc1pwXVui97dj0libW6IeFhSnM/6A7t6bng3EpGJO8BetQ6vhgPwm DTxUdu18BRoFEePQWlKd2GFLc2sJyN3HciqPMaALp9ppz6m2jBgY7sovvGKxOgiThcej clwg== X-Received: by 10.112.168.100 with SMTP id zv4mr13619067lbb.117.1441568373670; Sun, 06 Sep 2015 12:39:33 -0700 (PDT) Original-Received: from newvzh.vzh ([95.179.53.184]) by smtp.gmail.com with ESMTPSA id jm5sm2441357lbc.20.2015.09.06.12.39.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 12:39:33 -0700 (PDT) Original-Received: from vovka by newvzh.vzh with local (Exim 4.85) (envelope-from ) id 1ZYfml-0004yO-Um for guile-user@gnu.org; Sun, 06 Sep 2015 22:39:31 +0300 Mail-Followup-To: guile-user@gnu.org Content-Disposition: inline In-Reply-To: <3343641.HGLD0SKhKs@fluss> User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22a X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:12001 Archived-At: On Sun, Sep 06, 2015 at 06:21:35PM +0200, Arne Babenhauserheide wrote: > Hi Vadimir, > > Am Sonntag, 6. September 2015, 17:10:01 schrieb Vladimir Zhbanov: > > After speaking with a man who doesn't like scheme and wants to make all > > his work in C, I wonder if there is an easy way to make the procedures > > wholly written in Guile available in C, besides any kind of 'eval'. > > Looking through the guile info I didn't found anything other. > > The manual shows how to call Guile functions from your program: > http://www.gnu.org/software/guile/manual/guile.html#Guile-Initialization-Functions > > The sample however embeds a full Guile shell: > http://www.gnu.org/software/guile/manual/guile.html#A-Sample-Guile-Main-Program > > If I recall correctly, if you only want to provide the Scheme > functions, stick to scm_init_guile and scm_with_guile. > > See Initializing Guile from the API reference: > http://www.gnu.org/software/guile/manual/guile.html#Initialization Thank you, Arne. I've already read all the sections you're referring to here. Cheers, Vladimir