From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.user Subject: Re: Need help with macro Date: Thu, 13 Dec 2018 10:15:19 -0800 Message-ID: <20181213181519.GB3186@joshua.dnsalias.com> References: <20181213003015.GA1247@joshua.dnsalias.com> <87y38ufbp5.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1544724842 7346 195.159.176.226 (13 Dec 2018 18:14:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Dec 2018 18:14:02 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: guile-user@gnu.org To: Alex Vong Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Dec 13 19:13:57 2018 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 1gXVUj-0001nK-45 for guile-user@m.gmane.org; Thu, 13 Dec 2018 19:13:57 +0100 Original-Received: from localhost ([::1]:54093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXVWp-0007Kw-T8 for guile-user@m.gmane.org; Thu, 13 Dec 2018 13:16:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXVWF-0007Ju-Gm for guile-user@gnu.org; Thu, 13 Dec 2018 13:15:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXVWA-0002HW-KL for guile-user@gnu.org; Thu, 13 Dec 2018 13:15:31 -0500 Original-Received: from sonic302-22.consmr.mail.ne1.yahoo.com ([66.163.186.148]:45053) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXVWA-0002H1-Er for guile-user@gnu.org; Thu, 13 Dec 2018 13:15:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1544724925; bh=A3pqhjbDtOL50uU5mtDhs5+GFDhGiEtmY7BxtjcYQQQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=BogJnzlA1s2IGK2f8/ZFQABZvFc7wnwW/eQN8i3VApbfxX/uq6WKrkcFs546CLk4OoHyFeCAxVk1+wAq8u0B3BmBJ+K/QQVR7CNRzNO3ear+FcaezXJkKmSaWaNx7+7HC2Sp4AEp5XBe6/o1K6Rn5eUnWCyRDkjVnMz5ynsCNmzgtQMjQqId1q2BZAb7y2phh+/zdJWDC5MJD8p4qI16ySuaQ4Ft/QVUn2x/bietzz/dC9YbDYtT/LCJY7HjA1nhKpc7M6tic3FWBZn9Vl+OCj8f01wZbvOeA/zVQnTLeVawoKgWPEcFiHpeGPpjuA14iLgqh+plJ/FJIgeH3egFbQ== X-YMail-OSG: nx5xnmYVM1kJGeBamcPVQ6tPuM0GDKeWDx5PEjX_Cius9B9Xhsw9ohWVElzDdLS 0IK1A0779OLYY8cG_jf2HKgmRU3srOaaW6bexHlqjN7pD2UGdbgkDofP3QE5ttWG7_o6DlBC6cP_ KcSFznUWQ4MfgCcNdxO.WjIjFZ8W1xPipNJZbspVy9Vd_VTGp5Dhm27L.vjZwaVC7R68Ye_j4XT_ FlWn3Rp2xJ7OGk3FebfAd7CQn9hYwCuTFcnqd2j1X9WG4pnH9SZ_wcouB2.Zv0lWjmVl5xG2ENYW 06wR1EnsyUNzExHNugC5FzZwMcd9IMovZlaXiGytMd_cQNBrIECuDaLSnDavSWl1bK5Rilk8oRcC UH7DjafIvzP9KPDHwcTT_UxhbkRBFTYMVeTKWUUrPcjH0i2Gnjbw606pIb1MLLnx0qMpP8WGnPRJ L5CXVE4yC8ZYblxgncZ9Vcz4edUYkd9jFvnh1CaJ7GY8E5bnRA.4W1xqTv35rHJ.12OCc4gK8jXF lQZLksxKlNfQS5LtfSFQp5U4geI6L1XhpfgkI8VBIleNSf32RAy5J4enEygNOlTIvf_mLLZGeTK0 lYvtJRm4MpbGmEsSErA2DwDdUKu00zRFBdE_xLjQsBFRj77WEjJb3rXQ.qDOJ7dlZ.vdBfSJWdQV LxJAPt8cLvK3v7Y5W60_abEcx2k4MtI7mRUk3XRu7rjq3pHq1QiWshYz7O0vV3QPD3EMnzs3K2WU KbMVZcVoiZMptmOr80YT1bwDsid9ZqPT0Dl0DQbnfOce8Fd_6ezAsk5vXtLNAANcZPwE0fNtxHOM .iSyiQDCQ1UAVxiAclHDSYgZ7KX7BPPHceLODbMrY0 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Thu, 13 Dec 2018 18:15:25 +0000 Original-Received: from 162-197-224-133.lightspeed.irvnca.sbcglobal.net (EHLO joshua.dnsalias.com) ([162.197.224.133]) by smtp415.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 57e1b92b3062e711ae8695698d105b08; Thu, 13 Dec 2018 18:15:21 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87y38ufbp5.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 66.163.186.148 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:15076 Archived-At: > > I think this would work: > > (define-syntax-rule (send self (method args ...)) > (call-method self > (symbol->string 'method) > (list args ...))) > > For example, > > (send date (set-dmy 1 1 2018)) > > will be expanded to > > (call-method date > (symbol->string 'set-dmy) > (list 1 1 2018)) > > which is equivalent to > > (call-method date "set-dmy" (list 1 1 2018)) > Thanks for your help! -Mike Gran