From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Arne Babenhauserheide Newsgroups: gmane.lisp.guile.user Subject: Re: Using in C a function defined in guile Date: Sun, 06 Sep 2015 18:21:35 +0200 Message-ID: <3343641.HGLD0SKhKs@fluss> References: <20150906141001.GA23312@localhost.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3282969.p0Msx9DFSC"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1441556530 6644 80.91.229.3 (6 Sep 2015 16:22:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Sep 2015 16:22:10 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Sep 06 18:21:57 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 1ZYchX-00076m-N7 for guile-user@m.gmane.org; Sun, 06 Sep 2015 18:21:55 +0200 Original-Received: from localhost ([::1]:49414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYchX-0006fR-OC for guile-user@m.gmane.org; Sun, 06 Sep 2015 12:21:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYchP-0006fM-2P for guile-user@gnu.org; Sun, 06 Sep 2015 12:21:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYchK-0006Wr-2b for guile-user@gnu.org; Sun, 06 Sep 2015 12:21:47 -0400 Original-Received: from mout.web.de ([212.227.15.14]:55319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYchJ-0006WZ-Rc for guile-user@gnu.org; Sun, 06 Sep 2015 12:21:41 -0400 Original-Received: from fluss.localnet ([85.212.87.89]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0LdEif-1Yr0QH08Mj-00iTdS; Sun, 06 Sep 2015 18:21:40 +0200 User-Agent: KMail/4.14.8 (Linux/3.14.14-gentoo; KDE/4.14.8; x86_64; ; ) In-Reply-To: <20150906141001.GA23312@localhost.localdomain> X-Provags-ID: V03:K0:ilquFEtc83Ml5E964z1t8wml6VuFgJmBvqg75coU6s3qq9IbePt RjU3A5HoxUFGyHYRFTL3ekR3Xksles1IS4m/rqSAxuT/ZkSHBQh89gqLHE2ycUEfhWlLpL9 2UFrDskiU3CLBIRWMzAZ5DEzDBf1dlHuwUOn8MOErBi+SUl9BjTOmGaQMn2XKX9NQqLYaiT 4DlTZLLK2zNY/dlHl14fw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Fm4KSqPTF/4=:vpOJdAS+oRvwvcpWhtyMQi 0wWLIqwH985e7Ua+7tVf6GjdVwRGQlNxUJwOyZp6o5lQtzl4nPYlRlKm+fiLLkfjbyjC6593I yb+vMfTw891FtGSgsK8frZ1GsfduhpN/MuqPwSE+SKSq9PcBVs1r6A/YmwTv6AxvZvDm4zCEN GnBepCf2YFqQjSfGyPkiK8hNbYAdSt89Y6Qs7CtZ9lEkwv2TQe7SOXXr3fb8NHRRu7vdiV/DQ Q4pix0ctNTlSgWTCj+mlRyqL1+aVxKB+DBOX6crRow+7VWvdcKhcV1ng3kt6yleAEuXJPf5PW JFd7i+qhXadMFy9bxWoeqmwpn/Neq8tldq5YMZAkIu5eenQb15gPq1wuCgHH8NYI5TzjMjlxR xt96SGYQ0IQz4DWyNbK6p1Rw5enWWx8cdXKBLQZF6UBVG1xQI62ABn96hsCEmxuathMf7wZ94 i2YleocxyLZ9XnIxySdBaza94AX8/zR8kfwhYHR03yoxU4cmO4zrpdQeXQS3jr2t2CvXpmVw1 rlaST3D/4PdMDzy45IDSTAptdEUyCm2kxMpwJ4Npc2A8eYM0u2J/BD6EWRM250rPsuOiyJoUo nkyJC4idBJlLSjjVoxXpKLhKAgrS3JHzJqIV4DkmjoqwWpBN1xxqOzVimpaJewJznr8maD+Dz aT86G+BTBSf1/jdkFcf34qkMkgKky077IIxU+ocmq0hch6icahgnAGov+/huhphSOKBsr9JHd I/lkLccOpLA0x1N1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.14 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:11996 Archived-At: --nextPart3282969.p0Msx9DFSC Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 Best wishes, Arne --nextPart3282969.p0Msx9DFSC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iJwEAAEIAAYFAlXsaBIACgkQ3M8NswvBBUgLPgP/QC9DT+MMiGAmpr5O/h/Oh9hW dE778RMlZ26F7bKgxpLAv3+X+zsmhBtyCAuhQJHV0U3W1xkKmJFu1Uw9nZyoAYmb VF7THBvhTrxrbdDMzEyYuiLez07/YOHbvLtJBL0yBohOnroX+T/bd6NFeOGW4pIr wcPJLxQj+823K6x4WMQ= =vxwo -----END PGP SIGNATURE----- --nextPart3282969.p0Msx9DFSC--