From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei Newsgroups: gmane.lisp.guile.user Subject: Re: define anywhere Date: Fri, 11 Jun 2021 10:07:30 +0200 Message-ID: References: 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="37712"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri Jun 11 10:08:10 2021 Return-path: Envelope-to: guile-user@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 1lrcD3-0009a7-Tl for guile-user@m.gmane-mx.org; Fri, 11 Jun 2021 10:08:09 +0200 Original-Received: from localhost ([::1]:35862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrcD2-0004iL-8K for guile-user@m.gmane-mx.org; Fri, 11 Jun 2021 04:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrcCg-0004gg-CE for guile-user@gnu.org; Fri, 11 Jun 2021 04:07:46 -0400 Original-Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]:33755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrcCe-0000Vu-JN for guile-user@gnu.org; Fri, 11 Jun 2021 04:07:46 -0400 Original-Received: by mail-io1-xd33.google.com with SMTP id a6so30057999ioe.0 for ; Fri, 11 Jun 2021 01:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h17yrbaOXBIAFJPM0NzyesJBJmGqcCxwTXFs4XK4nSQ=; b=FFk+m0IdRIAZ3AVVfEEJ+6bq0V/sJ844htLHl0bYLrVDGVfUc6Qa1MoeQpzJPaX7Ah 6+Q5Do7ec2jyO+wEauDhvhBPXAR3kNj/klR/3Aw/pP5DUD7nDybvPA/fgaUjyz4w1Hzr jASM7oytyUBrM9PKIix3FJDGVDorJnAdYkbwVEL7fbAsZLHM0kNhq9rutxJuutHUYzzR DWWqMLG33UW3z1f1GkQdIHvsuNm+gpZbTuyOwVMfN+t6e16mE0uryHv6t1ckTXsJGmjh xjUoF9dwqF2sZRfIDAET3oa5AVsa7P/JZ2tVneODXVQGh92rLZvGtjot8sY70Q+3NaDa 3Mew== 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=h17yrbaOXBIAFJPM0NzyesJBJmGqcCxwTXFs4XK4nSQ=; b=CdLver4FBkP39ISarDxLPuKCgxQUl5M3VJJOQ6pKA1yFT1phv7Nbo/JLwLj6AF3W+I K3Txdr+ghB3Zag2sp2oHVFZTcoMjUoEm3Htn1DCn37d8ZozKMfn7N7sBjUCL3vzD6vPz 7zxoJgEER8Xh+dX8JTe78NICUOo0ueiDFI0/MopBcQZGdkVqDMHbKO44U5gHzmtAv3Cz HnFqgOZpl2ehGY7RoaRlUt2+688OVRUD4BhTsPqShmowNMBBcDaUL073pUYWsW+AwF0N 5L+oMK2y+0BdxgDHyX5tkmCLQJSvGofZ5y0lH8uxgAise8GncrD/Wf9jyGOI6EIFU7hB ilEA== X-Gm-Message-State: AOAM5329qyJsN2DyHJPIrJg4eVznTz7jZj4LgGpGy0NJTCcleFQRf4Rw agTYnOQ5LoAgndFf1FK4VlRNSNx+qQgQBhq+2lCaieAu6CE= X-Google-Smtp-Source: ABdhPJxrhsZZd0h43xyWODD+A6siQ9qk5pJ0muBcFn4fY6xVbzpbTORdRwammzstswq5A+sKd1mwaWXPDRCx9y78eHM= X-Received: by 2002:a05:6602:2587:: with SMTP id p7mr2285330ioo.12.1623398862524; Fri, 11 Jun 2021 01:07:42 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d33; envelope-from=damien.mattei@gmail.com; helo=mail-io1-xd33.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17592 Archived-At: i did not noticed there was an attachment link :-( i read your code, great work... i will read it more later Damien On Sat, Jun 5, 2021 at 5:24 PM Linus Bj=C3=B6rnstam wrote: > I implemented this hack before guile 3 got defines in function bodies: > https://hg.sr.ht/~bjoli/guile-define > > Even I guile 3 it allows a more liberal placement of define, but it won't > work for things like bodies of imported macros (like match) > -- > Linus Bj=C3=B6rnstam > > On Sat, 5 Jun 2021, at 00:27, Damien Mattei wrote: > > hello, > > i'm was considering that i want to be able to define a variable > > anywhere in > > code, the way Python do. Few scheme can do that (Bigloo i know) > > ( the list here is not exact: > > > https://www.reddit.com/r/scheme/comments/b73fdz/placement_of_define_insid= e_lambda_bodies_in/ > > ) > > is it possible in guile to do it? i do not know, so could it be added > > to > > the language specification for future release? > > > > regards, > > Damien > > >