From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Linas Vepstas Newsgroups: gmane.lisp.guile.user Subject: Re: Guile bugs Date: Thu, 14 Sep 2017 12:54:51 -0500 Message-ID: References: <87lgtajpkc.fsf@web.de> <87h8y7ruuz.fsf_-_@gnu.org> <87y3pm7l6j.fsf@gnu.org> <87wp55elvs.fsf@gnu.org> Reply-To: linasvepstas@gmail.com 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 1505412224 12473 195.159.176.226 (14 Sep 2017 18:03:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 14 Sep 2017 18:03:44 +0000 (UTC) Cc: Guile User To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Sep 14 20:03:40 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 1dsYUG-00035O-4X for guile-user@m.gmane.org; Thu, 14 Sep 2017 20:03:40 +0200 Original-Received: from localhost ([::1]:49236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsYUK-0005XP-4h for guile-user@m.gmane.org; Thu, 14 Sep 2017 14:03:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsYM9-0002VW-S0 for guile-user@gnu.org; Thu, 14 Sep 2017 13:55:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsYM8-0003O6-RZ for guile-user@gnu.org; Thu, 14 Sep 2017 13:55:17 -0400 Original-Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:47815) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsYM6-00039C-UP; Thu, 14 Sep 2017 13:55:15 -0400 Original-Received: by mail-lf0-x22c.google.com with SMTP id 80so109073lfy.4; Thu, 14 Sep 2017 10:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6GLN1YgjfnCL6eA7DZwcUw/MZv9qDGPmEvxI5l1J6dA=; b=tYcuWGdhbfa6K/N4WPvDo7Gjh2Z47KgTSxeR1yYU3gQMF/7SzS8HPFZLOZgSjsuLZY f4Fdk0nyZSbagBJk2IZ44mbflqpMat7HY9pTl89uH3BHMPtxRJGukiAlPkIFQr4rkEFk KCPy83HRnW7Jqjgj46Z0fy5SYL8NhMBzge8YeEcqguV/uOdn6ppspmsig7ZK7EKp6at1 K8M6yP4l/XejYtrm2PJKqLDZMISzBl+WSr9cp88kN+m9A6EzNZh1b1u9C1/BvCpDOZTX FQVBELEicAT38XzDbxj99N1NK7A9wDiIhx3gdSv8a+rNI3mGydhg4/C8+sU1lPhRIwzK GSQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=6GLN1YgjfnCL6eA7DZwcUw/MZv9qDGPmEvxI5l1J6dA=; b=mfS9q0YA4ySsZpP0IMYZKQavOeu79vRDuJavH0rgEWtMFJWDE6M0CVeSq6q/MKU+v2 xeZnya7+WrALgM/pzI1uKrU0WyRYiz+4hy9Sc+1TMxHz/WOzYV98woDYeQRf6L/t1iNZ dPF41/VGleoamdnQm9ie9vX0Cg/StNO47m6DYF71KsWw2aBYq4O7RSa5PRqJQrlK9vEK /g9FhENSYjPg/cDFhciyn1WZjb1+BmyGbADcPXmO3DUJygyb1bqf/ghdoDL+fzzgBDdY OWKMDghJ5G1BobQ/V8qP7eqdib0G3wnA+H+/updC4YVOE8n4KA0rtP+Vmu9WXrHEEhJP oUHg== X-Gm-Message-State: AHPjjUiyYbjKTCx7OEZHZu5+zA9XHeRIXpl101pXt48vYN/lvnQiB/D0 bpKjgLtCiegRtb9GjvoE1MIDmFxU7pym//7steo= X-Google-Smtp-Source: AOwi7QBABaT2sxnbKeVj67RiHdwn4z6FbCLRckoHr23hwElQiE8KXk+BxsTNYSHjpiahdHfL3iUSdGkkL951NdJR4Oc= X-Received: by 10.46.87.5 with SMTP id l5mr9214383ljb.128.1505411712026; Thu, 14 Sep 2017 10:55:12 -0700 (PDT) Original-Received: by 10.25.44.200 with HTTP; Thu, 14 Sep 2017 10:54:51 -0700 (PDT) In-Reply-To: <87wp55elvs.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22c X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:14144 Archived-At: On Mon, Sep 11, 2017 at 2:26 AM, Ludovic Court=C3=A8s wrote: > Hello, > > Linas Vepstas skribis: > > > The stuff coming over the network sockets are bytes, not s-exps. Since > none > > 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, = but 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.) > Why? What advantage does this offer? Its not clear that guile eval is smart enough to manage a network socket -- if the user starts a long-running process with intermittent prints, will it send that to the socket? What if the user hits cntrl-C in the middle of it all? What if the code that came over the socket happened to throw an exception? I've had to deal with all of these issues in the past, and have a stable code base; but if I had to start all over again, its not clear that these issues have gone away. I mean, eval was designed to eval -- it was not designed to support multi-threaded, concurrent network operations, right? To support my point: the default guile network REPL server is painfully slow, and frequently crashes/hangs. It works well enough to do some demos but is not stable enough for production use ... if its just read+eval, that might explain why its unstable. --linas --=20 *"The problem is not that artificial intelligence will get too smart and take over the world," computer scientist Pedro Domingos writes, "the problem is that it's too stupid and already has." *