From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: Guile bugs Date: Mon, 11 Sep 2017 09:26:47 +0200 Message-ID: <87wp55elvs.fsf@gnu.org> References: <87lgtajpkc.fsf@web.de> <87h8y7ruuz.fsf_-_@gnu.org> <87y3pm7l6j.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1505114852 19736 195.159.176.226 (11 Sep 2017 07:27:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2017 07:27:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: Guile User To: Linas Vepstas Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 11 09:27:27 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drJ7p-0004bL-F9 for guile-user@m.gmane.org; Mon, 11 Sep 2017 09:27:21 +0200 Original-Received: from localhost ([::1]:55917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drJ7v-0006xv-3N for guile-user@m.gmane.org; Mon, 11 Sep 2017 03:27:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drJ7O-0006xZ-7H for guile-user@gnu.org; Mon, 11 Sep 2017 03:26:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drJ7L-0003Ks-3B for guile-user@gnu.org; Mon, 11 Sep 2017 03:26:54 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drJ7K-0003Kn-W6; Mon, 11 Sep 2017 03:26:51 -0400 Original-Received: from [193.50.110.231] (port=35430 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1drJ7K-00032F-CQ; Mon, 11 Sep 2017 03:26:50 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Fructidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu In-Reply-To: (Linas Vepstas's message of "Sun, 10 Sep 2017 14:56:20 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.lisp.guile.user:14114 Archived-At: Hello, Linas Vepstas skribis: > The stuff coming over the network sockets are bytes, not s-exps. Since no= ne > of the bytes are ever zero, they are effectively C/C++ strings, and are > handled as such. These C strings are sent to scm_eval_string() wrapped > by scm_c_catch(). I don=E2=80=99t know to what extent that is applicable to your software, bu= t my recommendation would be to treat that network socket as a Scheme port, pass it to =E2=80=98read=E2=80=99, and pass the result to =E2=80=98eval=E2= =80=99 (as opposed to reading the whole string from C++ and passing it to =E2=80=98scm_eval_string=E2=80= =99.) HTH, Ludo=E2=80=99.