From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.user Subject: Re: Threading / Pipe Macro (Chris Vine, Mark H Weaver) Date: Tue, 9 Jul 2019 10:58:23 +0100 Message-ID: <20190709105823.1dc3a70b1674d5761d8d1e5c@gmail.com> References: <94d91369-f127-640e-a6e5-7408618f21c1@gmail.com> <20190709000051.dfaac3839126b7ec58efdde7@gmail.com> <20190709102615.912d4b837c0449a4bf8210d4@gmail.com> <9ce589fb-e1e4-4e55-8a29-a6c16d548d4a@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="23145"; mail-complaints-to="usenet@blaine.gmane.org" Cc: guile-user@gnu.org To: Linus =?ISO-8859-1?Q?Bj=F6rnstam?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jul 09 12:06:36 2019 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 1hkn18-0005l5-LB for guile-user@m.gmane.org; Tue, 09 Jul 2019 12:06:34 +0200 Original-Received: from localhost ([::1]:48314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkn16-0007yd-VW for guile-user@m.gmane.org; Tue, 09 Jul 2019 06:06:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51709) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkmtI-0002Ob-Ko for guile-user@gnu.org; Tue, 09 Jul 2019 05:58:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkmtH-0007zY-Ha for guile-user@gnu.org; Tue, 09 Jul 2019 05:58:28 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:37548) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkmtH-0007xf-AQ for guile-user@gnu.org; Tue, 09 Jul 2019 05:58:27 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id n9so11158134wrr.4 for ; Tue, 09 Jul 2019 02:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pPinTHYxMkDJkYg2sEe/PrQ+SWZsi0K2xIqDqIIZWW4=; b=pAS2lO4elhLWTdark9Vi6+Vbzr0crrcmAKNW3fHO8JqcgPaA0VFfPvATT9mdi8WCm9 H5eagx2s0w4pO1/rtOseS4UktX773X5MFn2Z7J+yEQpMOWmMFwCGerccVm0mdReAYjrK 4ypRsAIpWRXUGQ4FaedpMnUEZ05GdW76539cqbVEVLPLstEdYayLfKbmIFhYCW67NEN+ OBQiFcuJRLrPzqtVtYoKksbTX+gYyYlkmq7QD3UDOgNxk4SNPHsbdVKg1qiDQa9wnY0g h3o16nTv0/9eD8nS+8HCCxtAmpcY/ZrLMv+8aEDGldO3Rfz8Sr5VSiKkKSL3BGvoS9ds RCWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pPinTHYxMkDJkYg2sEe/PrQ+SWZsi0K2xIqDqIIZWW4=; b=RknuWzttcfAad3MQxnevuPsa4uGAw4JVxqlMertYzUh75RzasosUkpKKeWZ0wy/hHf S5tnKgpdw6N7miqQCk9oXMrCY5FS1l5dsREuFDSyYZ6DPUTJVErmDooJVcxCAY1nqhW1 z1tN7j7lDqK20O/gKi6BPACIzhtZL5T0l98l0pb99EE75f1ZxtU9ynAPs6GDUmo4BELD V6gN7JB8RoakGiMjs8PyVcyMmRE0UzZsJC+ED6GZyNcdeuVgZR+XuGq0CwCnQD/l4ZxV ZftlKMqdwVfiLCpqrthTm6+h4lLFeyXJO0yPFRp25BYSFPCMP8fPQOqtF/Z2Ra3NXQx5 U7Og== X-Gm-Message-State: APjAAAUaTJ3cnEKnUg2kiYMLGLObvxPHKPiXFmKXDfPQ5Q7bmQ/hUjxx m8ATmg2mKF9WeBSBg4aYL7k= X-Google-Smtp-Source: APXvYqxlsXRZg988ikAlaKGrDX9crA/n73TwrwbENu1meDCvG7ghKqc6LZ0sfLTl5lao/wb0IwkLog== X-Received: by 2002:a5d:5348:: with SMTP id t8mr23383779wrv.159.1562666305411; Tue, 09 Jul 2019 02:58:25 -0700 (PDT) Original-Received: from dell.homenet ([2002:545c:977f:10:e914:12bc:631d:b899]) by smtp.gmail.com with ESMTPSA id a2sm2853777wmj.9.2019.07.09.02.58.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Jul 2019 02:58:24 -0700 (PDT) Original-Received: from dell.homenet (localhost [127.0.0.1]) by dell.homenet (Postfix) with SMTP id 74B58425CE3; Tue, 9 Jul 2019 10:58:23 +0100 (BST) In-Reply-To: <9ce589fb-e1e4-4e55-8a29-a6c16d548d4a@www.fastmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e 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:15621 Archived-At: On Tue, 09 Jul 2019 11:40:02 +0200 Linus Bj=F6rnstam wrote: > Sorry, I didn't see that macro. I was referring to my macro that Erik > linked to [1], which is a syntax rules macro that also allows for <> > argument placeholders: >=20 > (~> 1 1+ (/ 10 <>) iota (+ <...>)) =3D> 10 >=20 > It defaults to left insert, so >=20 > (~> 10 (/ 2)) =3D> 5 >=20 > but also (like the syntax rules macro i posted) also supports functions w= ithout parents as you can see in the first example. >=20 > That's what I get for trying to.follow the discussion in an unthreaded mo= bile app :) >=20 > [1]: https://bitbucket.org/bjoli/guile-threading-macros/src/default/ I thought your module/library was impressive. My little macro (as it now turns out, defective in hygiene, although it has served me well for some time) was something I use frequently because I like the pipeline idiom. It inserts to the right only, because that is what I am used to: it sort-of imitates the reverse application of a partially applied curried function. I think your module is based on clojure macros, about which I know little.