From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: Static, pure Scheme internationalization Date: Sat, 21 Dec 2024 21:36:22 +0900 Message-ID: References: <8381a20ada723b92a0630ee395fa30ea17796465.camel@planete-kraus.eu> 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="15579"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Vivien Kraus Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Dec 21 13:37:12 2024 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 1tOyjH-0003ro-5S for guile-user@m.gmane-mx.org; Sat, 21 Dec 2024 13:37:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOyim-0002we-Pr; Sat, 21 Dec 2024 07:36:40 -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 1tOyil-0002wH-9g for guile-user@gnu.org; Sat, 21 Dec 2024 07:36:39 -0500 Original-Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOyii-0007nr-BO for guile-user@gnu.org; Sat, 21 Dec 2024 07:36:39 -0500 Original-Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2ef748105deso1985397a91.1 for ; Sat, 21 Dec 2024 04:36:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734784595; x=1735389395; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fTv0MqxHIDl3g73V9XGdOkFAvZ8N+xiibQbOmvcL68c=; b=BYL7ysBQ9PuFpltLbtPcHnFNQ7pg5ldu4VEBXxh3ZZ6pXdn09z5Zx51tL7Qc2+JVLl oI2t75wLzBgt+2ElVxgUCXuFvzNRnsoX1sraEU7OrCmsl9WubMf8gM9IAWXYjy8vf6zO c8Bra78yDAx+4p5taynLnw9eKM/m2Yz9wsM0b9+Xt1vX/IMUBoqGE3pFUWcZeNFXRrsJ Q4XyWj7a3I10wwUFg93qUNB2K14kdIA3zrOo6SjW1XONtlFYpzzNSe9xDB11OGD0DI/a BxAJwKiIXcrBm6oBH/tsSH1hWF6AAbnqGAvltxxduaZYugA4D1DEIDyrJmqiPql1PZQh RdqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734784595; x=1735389395; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fTv0MqxHIDl3g73V9XGdOkFAvZ8N+xiibQbOmvcL68c=; b=Rl9wTSN74X7q4rmYaFx2iJAxTyJsRwsUWnOQJdGQfWrYi4HM5AiDdYfa3nBMsPLXsA WEJz/MuLwwEfBeMn3l7iS573rHtnAW1rl4unXNbZYihsOpX9V52guNF03eRydnUmik+N qZuNt955F5OqTxUP/whPK5LAyGlQxGJ9qSKecfFc6FYWtbtUnC3uzIV676DRDG0qtXxB S/EisvAmOVlf9jqvhZ/3yZ0zttmhYc42bcgOZsGKNa8kV0JtM6lGzoMuVSebiKy38aqX sjl65MmjIqkOjAuc20PNfdeTBuTd68lZykrohlW4tXaO9O/lYO/MBIpVUH8Uf5+6Z3qk IG+A== X-Gm-Message-State: AOJu0YwYW7b3nqo9/KXN2arauZ1hKFJ0CWhofBSuZufqqIUWH0yE20PL Fi4IKsm1dlJ6iYFrRI1qbwiUJsGM9Uvnny+nqekH3fschqz6vyIUwpItMnhoPyZC0HQ+AEpsrcm D9KEYacTSAVmAVyXWsHp0N6IsY4d5y7D6KSA= X-Gm-Gg: ASbGncu2r9qAlou65+yghpZ0mvspik/l35KdfLERZuxOM7mOLIhHHdqUMCPwIKmYuQN n7ICEKqlr5rrgklPEzsBfd1f8R8PZtNf1MFSXeb8= X-Google-Smtp-Source: AGHT+IGgIAvSvGEKyjPbqST8WrwMcf2R/hb7PudvJNnTQZGhJqLoQcVfavnzoGPGStd4SA77MFsD7aTMGuPRvlEPWxM= X-Received: by 2002:a17:90b:520a:b0:2ee:96a5:721c with SMTP id 98e67ed59e1d1-2f452e38d67mr8464859a91.21.1734784594641; Sat, 21 Dec 2024 04:36:34 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=nalaginrut@gmail.com; helo=mail-pj1-x1029.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.29 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:20026 Archived-At: For this part, maybe there's more efficient way: ---------------------------------------------------------------- (define (get-bytevector-u32 port) "Read a 4-byte big-endian number." (car (bytevector->uint-list (get-bytevector-n port 4) (current-endianness) 4))) ------------------------------------ (bytevector-u32-ref (get-bytevector-n port 4) 0 (native-endianess)) If you want to base on Hoot, maybe it's OK to implement your own (current-endianess) as you showed. And I think it's Hoot's work to compile it to WASM Not sure if it's possible to just reuse (native-endianess) of Guile. On Sat, Dec 21, 2024 at 9:14=E2=80=AFPM Nala Ginrut = wrote: > I see, it's in *unimplemented-bindings of guile.scm, that's why I grep > 'gettext' and it exists! > > Best regards. > > On Sat, Dec 21, 2024 at 8:46=E2=80=AFPM Vivien Kraus > wrote: > >> Hello! >> >> Le samedi 21 d=C3=A9cembre 2024 =C3=A0 20:18 +0900, Nala Ginrut a =C3=A9= crit : >> > Maybe not complete yet, but it contains gettext, and G_ is its short >> > hand. >> > I saw you implemented a simple G_ macro, is there any reason that it >> > can't meet your requirements? Or you just happend to not know it >> > exited in Hoot? >> >> Maybe I did not look in the correct place? As far as I understand, the >> implementation in Hoot for (ice-9 i18n) is this: >> >> https://gitlab.com/spritely/guile-hoot/-/blob/main/lib/ice-9/i18n.scm?re= f_type=3Dheads >> >> It does not contain any meaningful implementation of gettext, and this >> file claims that i18n is not supported yet. >> >> Vivien >> >