From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Attila Lendvai Newsgroups: gmane.lisp.guile.devel Subject: Re: exception from inside false-if-exception? Date: Mon, 29 Apr 2024 21:42:19 +0000 Message-ID: References: <87le4wz1s9.fsf@cbaines.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19684"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "guile-devel@gnu.org" To: Christopher Baines Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Apr 29 23:42:50 2024 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s1Ylt-0004vA-TG for guile-devel@m.gmane-mx.org; Mon, 29 Apr 2024 23:42:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1Ylg-0000kY-BD; Mon, 29 Apr 2024 17:42:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1Yle-0000jj-9x for guile-devel@gnu.org; Mon, 29 Apr 2024 17:42:34 -0400 Original-Received: from mail-4317.proton.ch ([185.70.43.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1YlW-00059I-Gx for guile-devel@gnu.org; Mon, 29 Apr 2024 17:42:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail; t=1714426942; x=1714686142; bh=TY70GFcm9VymHoC9LueQmQW8Cns56A+j/ng0lzqq/Ac=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=m72ufcfbkQ44VRBwUZ23cxHzkP1OEOXwBqP+2w33DRmdmmCObmcitqQKBssJ8fxNp XB7bMBT2bznVPrnT43r8urioDoSK5IaokgtbkN61TOruYfWmWTm8ElmbyV/ZW7qQK8 FpBD2XS+EfellfmbVWx++Dxb+l1wheRXvAlae78COKuziGyXWUdYgSLxjjIgeIcuZK 6JTTMVzlOU+1NzsV5+9ZVhTZ9Ncp0PdPzZxWEuEUDFlsI9miQcc5JcYmRbZacg2cEt vx/R2Rc6fN3xULwlhwSDiQ+nFgvoXN0Ey5h0IoqH00blHAOlQfA4fw7p0/sz+z8+t0 MsBLuLIebeqSQ== In-Reply-To: <87le4wz1s9.fsf@cbaines.net> Feedback-ID: 28384833:user:proton X-Pm-Message-ID: 563c3528f172f4e2db649fa7b27b226eea398855 Received-SPF: pass client-ip=185.70.43.17; envelope-from=attila@lendvai.name; helo=mail-4317.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22407 Archived-At: > I think I've had similar problems in the past, I did fine this IRC > conversation: >=20 > https://logs.guix.gnu.org/guile/2021-01-19.log#204926 the very same bug was already discussed in 2021?! from the log: > you're using a pre-unwind handler here > whereas false-if-exception only sets a post-unwind handler > so yours gets to run first oh my, what a mess! do i get this right? (with-exception-handler ... #:unwind? #f) installs a s= o called pre-unwind-handler, which takes priority over a false-if-exception= , even if deeper in the stack, because f-i-e installs a post-unwind-handler= ? if this is the case, then i'll basically need to review all the scheme code= i wrote in the past two years... :) i came from common lisp, and from a distance i always had this impression o= f scheme that it is a much more cleaned up lisp... but in CL the condition = system is way cleaner/simpler than this. i wrote long running, multi-thread= ed web services with advanced logging (backtraces, user installable backtra= ce decorators, etc), error handlers that deal with nested errors, etc... so= i'm rather familiar with the problem domain, but apparently i'm lost in th= e forest here. maybe the native call/cc primitive brings in a kind of complexity that is n= ot present in CL around exceptions, unwinding, and backtraces. > All uses of false-if-exception are wrong i second this sentiment! our CL team had a syntax for IGNORE-ERRORS, its CL= equivalent, to be colored bright red in emacs. and it doesn't even have th= e pre/post-unwind-hook baggage. thank you both for the quick feedback! --=20 =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CA society that puts equality =E2=80=94 in the sense of equality of= outcome =E2=80=94 ahead of freedom will end up with neither equality nor f= reedom. The use of force to achieve equality will destroy freedom, and the = force, introduced for good purposes, will end up in the hands of people who= use it to promote their own interests.=E2=80=9D =09=E2=80=94 Milton Friedman and Rose Friedman