From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Some dynamic module questions Date: Fri, 27 Nov 2020 13:59:51 +0100 Message-ID: References: <83zh33neyv.fsf@gnu.org> 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="23446"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: p.stephani2@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 27 14:02:31 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kidOP-0005ud-Em for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Nov 2020 14:02:29 +0100 Original-Received: from localhost ([::1]:34988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kidOO-0007k9-6f for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Nov 2020 08:02:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kidLy-0005w1-Ox for emacs-devel@gnu.org; Fri, 27 Nov 2020 08:00:00 -0500 Original-Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:40288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kidLv-0006rx-RD; Fri, 27 Nov 2020 07:59:58 -0500 Original-Received: by mail-ej1-x636.google.com with SMTP id x16so353701ejj.7; Fri, 27 Nov 2020 04:59:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=3tbjD+9bFTKBGKdHTkiwSmWgM5uLNSBULrzOE3WyQ9I=; b=kLLAOrKJ3Zz8Ar3JhgJT3bz6mez7EP+ZTsPLw5ioUVD2YoNORO3CceGasARtn7W4Bc eEo6SLQEbsynUzSo3nrtn8m3UzMyb5K8W9PI3JYcKF5qe4Vqolol1QhDn+slkg71EY6V uNV2A1pZIPQLSrLnfT+mCn4d+q4p3iPQGsuo+aZccGJuAyYC6FlC1DygfTyEQn+sViNM ipV5bqRhsNeMCbLfEfQ1NUnddn4irKXNWy3A73jZG/zkd3ZxrkYcw4R8RBMGoPOswwIZ 4Fb1CpG4/UyYRs8h5gGDxb0k1mk+UI2DeOmlB9tMFKPgBxEcB7Nw68txiDRP56xUsHEg 5x6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=3tbjD+9bFTKBGKdHTkiwSmWgM5uLNSBULrzOE3WyQ9I=; b=GeZPYaZapG72bG/CUKvRKa1kjP8SjPYBSguit6CyK0cRYwezEt7d9NUrH2eCEoG5Jq hqel85W7ydZ5Vcw+jDIv1IKqS/g98QJUb3XJXw/Pf+c34swmkzWQXXN0RzFreRqaq/Pa DBJhMxBDYoMeAE8akW1sLOvxRJOP88x60hYWtBrIfFvFneqRC1ZMul2kt4yNaPRgKanN FoIrGoJJrurS+a0qQg3n0Rl1nJ95TQRFJQAq+omgc5lhH69nEkLorCqsRsachh0WG5gZ q3QpjwykOfeKe2VSKd73x+8OYIOsT2EEGh1264wduyn6hsA+2S/GvIUkVLkZnLjc2gha hvDw== X-Gm-Message-State: AOAM531j123GxDuMtEe0X3fgSNqx43ZCq7qBrX70/CDB6ztnkwlqTpf0 6yriGa9vnRhbTSqiqmcnNR5Mwl3fer8= X-Google-Smtp-Source: ABdhPJwHQyJHYtN3r0RM0lGcCcfuIq1F9qqTs+y6T9cW5Nh/tP2TmHStJISTMRIHOesQEMstecN+Uw== X-Received: by 2002:a17:906:174f:: with SMTP id d15mr7540948eje.15.1606481993684; Fri, 27 Nov 2020 04:59:53 -0800 (PST) Original-Received: from caladan ([92.243.146.180]) by smtp.gmail.com with ESMTPSA id pk19sm2533883ejb.32.2020.11.27.04.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 04:59:53 -0800 (PST) In-Reply-To: <83zh33neyv.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Nov 2020 14:47:52 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=eller.helmut@gmail.com; helo=mail-ej1-x636.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, 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: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259881 Archived-At: On Fri, Nov 27 2020, Eli Zaretskii wrote: >> But that's only for passing bytes from C to Lisp. What about the other >> direction? > > Why do you need that? The concept of unibyte vs multibyte strings > exists only in Lisp; in C you just have a sequence of 'char' bytes, > and the way you interpret it depends on your C code. > > If you have some specific use case where this looks like a necessity, > can you describe that use case? I'm writing (or trying to write) ELisp bindings for Cap=E2=80=99n Proto[1], which is an RPC system along with a data interchange format. Cap'n Proto has (among other things[2]) these two data types: - Text: is always UTF-8 encoded and NUL-terminated. - Data: is a completely arbitrary sequence of bytes. My plan is to map Text to Elisp (multibyte)strings and Data to unibyte strings. Helmut [1] https://capnproto.org/ [2] https://capnproto.org/language.html