From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.bugs Subject: bug#18592: FFI should have portable access to =?UTF-8?Q?=E2=80=98errno=E2=80=99?= Date: Mon, 14 Mar 2016 01:06:32 +0800 Organization: HFG Message-ID: <1457888792.30981.16.camel@Renee-desktop.suse> References: <87fvf8oocf.fsf@ft.bewatermyfriend.org> <87h9vmy0zw.fsf@gnu.org> <87twzgeh3c.fsf@yeeloong.lan> <87r3uko4c9.fsf@gnu.org> <1451565229.3594.59.camel@Renee-desktop.suse> <1451909046.3594.135.camel@Renee-desktop.suse> <8760z9gw7o.fsf@netris.org> <1451934872.3594.150.camel@Renee-desktop.suse> <20160105074924.GA23165@tuxteam.de> <1451983123.3594.156.camel@Renee-desktop.suse> <87vb78jc86.fsf@netris.org> <1452021701.3594.160.camel@Renee-desktop.suse> <1455783943.3838.16.camel@Renee-desktop.suse> <871t8af8no.fsf@netris.org> <1455858156.3838.21.camel@Renee-desktop.suse> <1456485534.7330.63.camel@Renee-desktop.suse> <87si07sbu8.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1457888843 28707 80.91.229.3 (13 Mar 2016 17:07:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2016 17:07:23 +0000 (UTC) Cc: 18592@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Mar 13 18:07:12 2016 Return-path: Envelope-to: guile-bugs@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 1af9Tz-0007N4-7Q for guile-bugs@m.gmane.org; Sun, 13 Mar 2016 18:07:11 +0100 Original-Received: from localhost ([::1]:36856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af9Ty-00079n-Ek for guile-bugs@m.gmane.org; Sun, 13 Mar 2016 13:07:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af9Tu-00079f-5y for bug-guile@gnu.org; Sun, 13 Mar 2016 13:07:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1af9Tq-0000kW-5K for bug-guile@gnu.org; Sun, 13 Mar 2016 13:07:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af9Tq-0000kR-0o for bug-guile@gnu.org; Sun, 13 Mar 2016 13:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1af9Tp-0000FQ-NY for bug-guile@gnu.org; Sun, 13 Mar 2016 13:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nala Ginrut Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 13 Mar 2016 17:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18592 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 18592-submit@debbugs.gnu.org id=B18592.1457888804928 (code B ref 18592); Sun, 13 Mar 2016 17:07:01 +0000 Original-Received: (at 18592) by debbugs.gnu.org; 13 Mar 2016 17:06:44 +0000 Original-Received: from localhost ([127.0.0.1]:47154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1af9TY-0000Et-9k for submit@debbugs.gnu.org; Sun, 13 Mar 2016 13:06:44 -0400 Original-Received: from mail-pf0-f182.google.com ([209.85.192.182]:35753) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1af9TW-0000Eg-AS for 18592@debbugs.gnu.org; Sun, 13 Mar 2016 13:06:42 -0400 Original-Received: by mail-pf0-f182.google.com with SMTP id n5so80118852pfn.2 for <18592@debbugs.gnu.org>; Sun, 13 Mar 2016 10:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=WN7dnx+Y4tIl7XMc7u6YyLs93UQYoJvxbQJwT5M5eOA=; b=v8dlABOejISXCAlciAmmxPxuPckDm/fL1rtns7p7QttoDI/9zaTw25xke+oMH/iDFn AoGCYW9ANxfqofDAj9f/zR50JnZ8ZG24xdL7khqvotbrk32XVpBZQAdrOSNPPglHctpl hIMvJ6dYwqdjQnQSw7yuxfyKYcZd19fy4zjVhgj6Clw/mxS3Yb1RtQQqeKyD0bph1416 u6cLXiVdPepClYOYqgkh/TqSDD+owjBxI0D0XDIdfqQIy2ZyJ6t68JOvw1fU3QbBbgra 9yHqvoKYgowfwewu/f7DwpEik1irUPjF+QGl2xh7Kyt2MwaOj3w33x63soZO3jZE3RnW MeTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=WN7dnx+Y4tIl7XMc7u6YyLs93UQYoJvxbQJwT5M5eOA=; b=YEOdrSXjJEOEY893BEOJSHIx6L8/mG5/6yJEoxyzI4xgyegS/ASsofx2ZcaM+HpDYN xoN0ML13jzSStK9oD3xNINKhlKcOSo6wH7fis6EGPQkYk7Y/2vcMpHRV4RNzvLx5dIYa tXeJQ/XuuyhFhMBwpzMHwGOS2XTIUxBNvlCd+dKoKXbRjiWZ6JsbbcZmi3kvRyPkQ32x glyjHC4e8QHeBK2NWZnzQKVIC2ZJq7gyIce5o08uVYOP06+cOFG6Kcc+fCClQe4j8H3s yhCbKYus7k1d7i80bYEaUdae6/pl4CiHJgdwFh/KtyDq849BCgwGbnGtPEzvXcxFLY1w 7kVw== X-Gm-Message-State: AD7BkJLcfbrH3hbu1r6KP7JB+sRRjFdHQz6nVyZUuyHiL5caCtfdyoXBIQUXxTU2fvcUNg== X-Received: by 10.98.71.9 with SMTP id u9mr12996923pfa.7.1457888796702; Sun, 13 Mar 2016 10:06:36 -0700 (PDT) Original-Received: from [127.0.0.1] (li88-185.members.linode.com. [74.207.246.185]) by smtp.gmail.com with ESMTPSA id 87sm26223523pfq.93.2016.03.13.10.06.34 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 13 Mar 2016 10:06:35 -0700 (PDT) In-Reply-To: <87si07sbu8.fsf@netris.org> X-Mailer: Evolution 3.4.4 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7986 Archived-At: hi Mark! Fairly speaking, your new proposal sounds cool. But is it necessary to do redundant rework if there's no obvious problem in the first proposed patch? Besides, I think the new proposal may introduce extra complexity to implement. That's what I actually concern about. IMHO, it is better to avoid introducing more complexities, the simple way is better for debugging and maintaining. And it is better for us to have such feature soon, since we need to make more cool projects to enhance Guile usability in real world. Anyway, you have the big picture in mind for Guile, maybe you have your reason for that? Best regards. On Thu, 2016-03-03 at 12:36 -0500, Mark H Weaver wrote: > Nala Ginrut writes: > > > Is there still problem? I'm fine with the patch, and I'm expecting to > > merge it ASAP. Anyway, please don't hesitate to tell me if there's still > > any problem, I'm glad to help to do it better. I really need it. > > Sorry for the delay, but I'm having second thoughts about whether this > is the right approach. Perhaps we should instead make a set of > commitments that certain basic operations like scheme evaluation, heap > allocation, and basic scheme procedures will leave 'errno' unchanged. > > At the API level, the idea would be that if you write Scheme code that > makes a reasonable effort to avoid non-trivial operations between the > FFI call and the call to (errno) or (set-errno! ), this would be > sufficient. > > At an implementation level, it would require us to save and restore > 'errno' around C library calls that are made by Guile's runtime system > without the user's knowledge, most notably when running GC (during > allocation) or when running asyncs and things like that. > > What do you think? > > Mark