From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Reuleaux Newsgroups: gmane.lisp.guile.user Subject: hashmark in symbols Date: Mon, 02 Jan 2023 02:27:25 +0000 Message-ID: <87y1qlvfg2.fsf@laptop> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20911"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Jan 02 03:27:18 2023 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 1pCAXk-0005Ar-GX for guile-user@m.gmane-mx.org; Mon, 02 Jan 2023 03:27:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCAXG-0006UI-4p; Sun, 01 Jan 2023 21:26:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCAXE-0006Tn-GD for guile-user@gnu.org; Sun, 01 Jan 2023 21:26:44 -0500 Original-Received: from sender4-of-o51.zoho.com ([136.143.188.51]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCAXC-00077d-Jm for guile-user@gnu.org; Sun, 01 Jan 2023 21:26:43 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1672626397; cv=none; d=zohomail.com; s=zohoarc; b=kbSbGV2Lb55fnpNy7Ujr6I8j2G2YJlqDHVeb3C/qCd6DaKc81FzBhk9vEtaXrvM1B676tIsRpzAg9PIpIy30DZgVWgzg5J1FdQqNBic3/aK0IQgF1zx7/RBa6GisiBsIdMElmi37rFgaWo0EPnS0b1YN/8bZ3XWAJcUrtFjUcRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672626397; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=oQIjjz7SrlLsCJ901DvmPQIDhxkmtCb0aYPbx47UBAY=; b=LKRQbqW4atc0kS6wuI0pjiahs/xSACDLgt/r8oPHaaBNO/KyCZFrhNWmdaK/nSgFdkrDPiPFCbT1Cb6m2bnVNCYiV/yR99uEy9kwc7tCW1w/CwVEjdFurTMBbacrHuUAaKqNezYOxd2IFWKkTmcfLk8Mz8KrHewr677P1O8Qdlk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=a-rx.info; spf=pass smtp.mailfrom=rx@a-rx.info; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1672626397; s=zoho; d=a-rx.info; i=rx@a-rx.info; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To:Cc; bh=oQIjjz7SrlLsCJ901DvmPQIDhxkmtCb0aYPbx47UBAY=; b=YRvQmsSnKH7f3K1K/f8QPRFwFmZyS3xiB8CaN9BBWmatUeB4oUgADcoyIF54JMtt CxcLCIgq9eFnNbiwL9QMCBJssD0UI7HNhmeg34TcLYGJPiIL3Y7OHzGr1Ztgpa4eFTY V6tO+JqHhw0trgNNdDFRp2EdT3ToHMUDGq+40E0g= Original-Received: from laptop (85.255.237.49 [85.255.237.49]) by mx.zohomail.com with SMTPS id 1672626396097472.9813160622157; Sun, 1 Jan 2023 18:26:36 -0800 (PST) Original-Received: from rx by laptop with local (Exim 4.96) (envelope-from ) id 1pCAXt-0027oO-1i for guile-user@gnu.org; Mon, 02 Jan 2023 02:27:25 +0000 X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rx@a-rx.info; helo=sender4-of-o51.zoho.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, 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-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 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-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:18816 Archived-At: Hi, in common lisp I get e.g. --8<---------------cut here---------------start------------->8--- * (format nil "~a" '\#444) "#444" --8<---------------cut here---------------end--------------->8--- (assuming #444 is a css color - that is my use case anyway - and thus likewise for any other color) Now, apparently in Guile this is not the case: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (format #f "~a" '\#444) $158 = "#{\\#444}#" --8<---------------cut here---------------end--------------->8--- And likewise --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (symbol->string '\#444) $159 = "\\#444" --8<---------------cut here---------------end--------------->8--- Now I am tempted to case split (after (symbol->string ...) as above): if the resulting string starts with \\# then cut off the \\ part otherwise ... but this seems overly complicated!? And is not really what I want! Is there any other (readable) way to specify the hashmark in a symbol (assuming \hashmark here, but this is wrong of course), so that --8<---------------cut here---------------start------------->8--- (symbol->string '\hashmark444) --8<---------------cut here---------------end--------------->8--- just works: results in "#444" (not "\\#444") ? PS: I am experimenting with #\x0023, like so --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> #\x0023 $181 = #\# --8<---------------cut here---------------end--------------->8--- but I still have no clue, how to write a simple symbol, that when translated to a string, results in "#444". Thanks in advance, -A