From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John Cowan Newsgroups: gmane.lisp.guile.user Subject: Re: SRFI-151 (Bitwise Operations) Implementation Date: Thu, 9 Jan 2020 12:50:37 -0500 Message-ID: References: <87y2uh2qyu.fsf@ft.bewatermyfriend.org> <87r2092dxa.fsf@ft.bewatermyfriend.org> <87muaw3i7z.fsf@ft.bewatermyfriend.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="24299"; mail-complaints-to="usenet@blaine.gmane.org" Cc: guile-user To: Frank Terbeck Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jan 09 18:51:28 2020 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ipbxn-0014w5-Mt for guile-user@m.gmane.org; Thu, 09 Jan 2020 18:51:19 +0100 Original-Received: from localhost ([::1]:35910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipbxl-0004ag-TB for guile-user@m.gmane.org; Thu, 09 Jan 2020 12:51:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58195) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipbxP-0004aT-GB for guile-user@gnu.org; Thu, 09 Jan 2020 12:50:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipbxN-0006IZ-J7 for guile-user@gnu.org; Thu, 09 Jan 2020 12:50:55 -0500 Original-Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]:41293) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipbxL-0006DZ-Rs for guile-user@gnu.org; Thu, 09 Jan 2020 12:50:52 -0500 Original-Received: by mail-qv1-xf31.google.com with SMTP id x1so3316794qvr.8 for ; Thu, 09 Jan 2020 09:50:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=beEyRHNNnmIIKiEaUems6czwth0A599Qme9dIk7zC9Q=; b=P61QjasyeWWYBX/2hkn1gHeqamJ7OJAzLsEfxOmsRSbpc9+Mk6UPO+nrIM4Drg2cMl zKSjxPpXer5mGLgZTbHFKDdwN5MAb0Nu2K1H7bzkJ+Nl8o8YhGpklFB9/qj2X56LYjY1 Ih6fn3Zo8YgVWgY6JacdLh+6hr4Po51fAnrZ7+9xbyhy2pIen33Qgr/wTiARIyoekGRY c3FcBk04+4ueKZiv7rdioi/MesEYTMWUQrPx8guzo94SY+Ny/F4J9e/GmV8RlkUKVY9T wSHkTKqLej0lBt+strfGxYbnIPvNN1tGjR5+aHfbLbTqh3p2F4myUcqgpgaHCITNN4LI uQaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=beEyRHNNnmIIKiEaUems6czwth0A599Qme9dIk7zC9Q=; b=hbe8keIDlTjIS47sgpWGuCl0nrzhr/Rvwmv0KYAxK6sYAqvz/mNCiawVt27gYOLaho yWbvB1cjUg3MyKlbAfC6atbU+TvY6QJMjk0jc1+y9TJ6xNcXD1CKnzlIf/a41L1Iip0s wgV0g3kuhE5s2R4IaVXzKWsfFfd6HduK/J2YLykGJ4a5uKG9RqC1+dco6In77PltWeod txq3A6yGenp/tGsOwa+JhFzhm4cE5povK7rlNrjToADZsBvtsDuFX+mOcdKMSh2YeU7h cJdoqB8t4d2kFW9Y25SFpILa0OSYQoKgghx9ZS/OHuA1AA6FmbTr+iNDuP7kTJIlol9I DBoA== X-Gm-Message-State: APjAAAXGU1LS+ketwx0mywcV5LQMYFLEv6WdswjeiaAsc5WD3i1XMXjF in2/DYOJYfLn9sZS0THiaPgzuRqLDVuVdPb2uUzA0z55bqY= X-Google-Smtp-Source: APXvYqyvlMggmSvfbKpLln64ubIvURCnMXCCRyaxniXt8Bv12WuQBxSl3aA+yzyyDaZcBfDJHYVKD/oAHLGe8krhT3s= X-Received: by 2002:ad4:4a14:: with SMTP id m20mr10061811qvz.100.1578592248282; Thu, 09 Jan 2020 09:50:48 -0800 (PST) In-Reply-To: <87muaw3i7z.fsf@ft.bewatermyfriend.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::f31 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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:16019 Archived-At: On Thu, Jan 9, 2020 at 7:55 AM Frank Terbeck wrote= : Linus Bj=C3=B6rnstam wrote: > > Your bitwise-nand etc takes more arguments than they have to. They are > > 2-argument procedures according to the spec, which gives you better > performance > > than the apply-dance you are doing now. Maybe have a bitwise-nand and a > > bitwise-nand*? > > Yeah, I did that on purpose. The performance argument is probably valid, > though. However, I don't want to extend the API. Maybe I'll put in a > case-lambda there. > The reason bitwise-nand and friends have only two arguments (and this comes from Olin's original) is that they aren't associative: it's ambiguous whether (bitwise-nand a b c) means (bitwise-nand (bitwise-nand a b) c) or (bitwise-nand a (bitwise-nand b c)), and these are *not* equivalent. Rather than choosing one of these arbitrarily, users have to say what they mean. John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org Any sufficiently-complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp. --Greenspun's Tenth Rule of Programming (rules 1-9 are unknown)