From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Damien Mattei <damien.mattei@gmail.com>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: symbol is nested in #{ ...... }#
Date: Thu, 4 Jan 2024 20:20:21 +0000 [thread overview]
Message-ID: <d1d3ab58-ef89-4882-8bb0-5aaeec035e9b@posteo.de> (raw)
In-Reply-To: <CADEOaddDkXsr8a1fxeJn9qdaipcAXLK-RxJKvtKPADo1KOmsbA@mail.gmail.com>
Hello Damien,
That is probably, because keywords themselves can look different in Kawa and Racket.
https://www.gnu.org/software/kawa/Keywords.html (mentions both syntaxes, but
also mentions #:name being more portable)
https://docs.racket-lang.org/guide/keywords.html (only mentions #:name syntax).
Regards,
Zelphir
On 1/4/24 21:12, Damien Mattei wrote:
> i understand not all.
> i suppose it makes sense .
> in fact my problem was parsing a scheme program to generate another scheme
> program.
> So i'm in the realm of simple text and as i was just searching the good
> display i did not understand more the problem.
>
> and even between kawa and racket behavior differs on keywords as in this
> example:
>
> #|kawa:1|# (string->keyword "apple")
> apple:
>
> Racket:
>> (string->keyword "apple")
> '#:apple
>
> Damien
>
> On Thu, Jan 4, 2024 at 8:05 PM Thompson, David <dthompson2@worcester.edu>
> wrote:
>
>> On Thu, Jan 4, 2024 at 6:36 AM Damien Mattei <damien.mattei@gmail.com>
>> wrote:
>>> thank you very much Tomas,
>>> it solved my problem:
>>> (symbol->keyword (list->symbol ....
>>> me too i was digging the manual for 2 hours :-)
>>> Damien
>>> note: seems a bit weird anyway that guile react differently in this case
>>> than Kawa and Racket
>> Guile's behavior makes sense to me. #{...}# is syntax for symbols, not
>> keywords. Symbols can contain any arbitrary characters. Starting a
>> symbol with "#:" doesn't make it a keyword. Would you expect
>> (string->symbol "#:hello") to return a keyword? I wouldn't.
>>
>> - Dave
>>
--
repositories: https://notabug.org/ZelphirKaltstahl
prev parent reply other threads:[~2024-01-04 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 10:15 symbol is nested in #{ ...... }# Damien Mattei
2024-01-04 10:40 ` Tomas Volf
2024-01-04 11:35 ` Damien Mattei
2024-01-04 19:04 ` Thompson, David
2024-01-04 20:12 ` Damien Mattei
2024-01-04 20:20 ` Zelphir Kaltstahl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1d3ab58-ef89-4882-8bb0-5aaeec035e9b@posteo.de \
--to=zelphirkaltstahl@posteo.de \
--cc=damien.mattei@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).