From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Newsgroups: gmane.emacs.devel Subject: Re: Emacs rewrite in a maintainable language Date: Sun, 18 Oct 2015 19:06:22 +0200 Message-ID: <878u70qf75.fsf@T420.taylan> References: <561A19AB.5060001@cumego.com> <87oag4jk74.fsf@wanadoo.es> <87k2qrki45.fsf@wanadoo.es> <8737xf9je9.fsf@fencepost.gnu.org> <87pp0fm0j3.fsf@gnu.org> <87r3kusx8z.fsf@fencepost.gnu.org> <83lhb26eb9.fsf@gnu.org> <876126key3.fsf@gnu.org> <83fv1a6bfu.fsf@gnu.org> <87d1weo7u9.fsf@gnu.org> <83zizi3qr0.fsf@gnu.org> <87lhb1n81y.fsf@gnu.org> <83si594wt3.fsf@gnu.org> <87io64iigs.fsf@gnu.org> <87r3kso1gr.fsf@fencepost.gnu.org> <87wpuks5ek.fsf@T420.taylan> <83vba4i1z3.fsf@gnu.org> <87pp0cqgjf.fsf@T420.taylan> <83twpoi0sp.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445188511 16313 80.91.229.3 (18 Oct 2015 17:15:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2015 17:15:11 +0000 (UTC) Cc: ludo@gnu.org, dak@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 18 19:15:11 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZnrY5-0006d6-Ev for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 19:15:09 +0200 Original-Received: from localhost ([::1]:34810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnrY5-0006w4-09 for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 13:15:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnrPf-0001os-Cd for emacs-devel@gnu.org; Sun, 18 Oct 2015 13:06:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnrPd-0001hw-Rs for emacs-devel@gnu.org; Sun, 18 Oct 2015 13:06:27 -0400 Original-Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:34759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnrPd-0001hp-Iv; Sun, 18 Oct 2015 13:06:25 -0400 Original-Received: by wikq8 with SMTP id q8so22158463wik.1; Sun, 18 Oct 2015 10:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=JbiBZXsgHkrDwGErwG455oNI3ujqPjQWkbSEpxJRF2w=; b=VIJxnrgu6GZksN4eCM7eLAhiF8lP0hL6rUJFfJPsxg3pAGb0UhFG+MoG+jJYzi2XN+ hoSI0eo8MYeqVE/w15yA9rn1Ad0otF+dvap0e5Ub5r79IDQ0T028f1JTbmpwxBhyTGNK Q7VGkQ1eoiBp0kW+YGXV9MkKuz2BW+c4Z2YreNKd+fnQ9X/sV+8Hjhh8JM2oOAGdMXvf jERF8Z0+M4Ixp3LKx9gBsQxxlRLrCGeNlnQTFTsaYn5Lnd7E27d1iQeRnfyRiPY9c9NL M9xrqPu3lZinYyFTYJdJFtYsHjgTuKUhm5Q+ovLPM/H9VW5FIufe7tGn2ojqeFH28GvZ KtGA== X-Received: by 10.180.87.71 with SMTP id v7mr7445211wiz.77.1445187984563; Sun, 18 Oct 2015 10:06:24 -0700 (PDT) Original-Received: from T420.taylan ([2a02:908:c32:4740:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id ub7sm11573950wib.17.2015.10.18.10.06.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2015 10:06:23 -0700 (PDT) In-Reply-To: <83twpoi0sp.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Oct 2015 19:44:38 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191978 Archived-At: Eli Zaretskii writes: >> From: taylanbayirli@gmail.com (Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer) >> Date: Sun, 18 Oct 2015 18:37:24 +0200 >> Cc: ludo@gnu.org, dak@gnu.org, emacs-devel@gnu.org >>=20 >> Eli Zaretskii writes: >>=20 >> >> From: taylanbayirli@gmail.com (Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer) >> >> Cc: ludo@gnu.org (Ludovic Court=C3=A8s), Eli Zaretskii >> >> , emacs-devel@gnu.org >> >> Date: Sun, 18 Oct 2015 14:54:59 +0200 >> >>=20 >> >> Guile's string library is for working with strings (surprise!), not >> >> arbitrary byte vectors. >> >>=20 >> >> For arbitrary byte vectors, Guile has bytevectors (surprise!!). >> > >> > One of the major lessons Emacs development learned since Emacs 20.1 is >> > that raw bytes happen as part of text (a.k.a. "strings"), and >> > therefore there's a need to support a mixture of these two in the same >> > buffer/string. I think that's something Guile should support as well, >> > as that will make it a more powerful and flexible extension language, >> > able to deal with a wider range of real-life situations. >>=20 >> Text as understood by a user of a text editor does not necessarily >> correspond to strings as understood by a programmer. > > It doesn't matter how this data type is called, what's important is > that it should support both human-readable text and raw bytes in the > same contiguous stream of "characters". > >> Though that doesn't seem to be an absolute requirement for letting >> libguile compile Elisp, since it can just treat Elisp strings as a >> separate data type, as GuileEmacs currently does. > > That'd be an inconvenience, since it will require a translation layer > between Emacs strings and Guile strings, and that will hamper > performance. I'm not sure in what situations such a translation would be necessary. I don't think GuileEmacs currently does any such translations. See e.g. the "can I script Emacs in Scheme already" examples here: http://www.emacswiki.org/emacs/GuileEmacs If one passed Elisp strings to a Scheme API or Scheme strings to an Elisp API there, it would raise an invalid type error. This is akin to how one cannot interchange C integers with Elisp integers and all that stuff which one needs to know while working on the C code of Emacs, except 1. in this case it only applies to strings, and 2. it cleanly raises a type error instead of doing something funny. (The other day I was hit by this issue while working on Guile's C code, where I forgot that a scm_blahblah_p predicate will return SCM_FALSE which is not 0 thus not false in C. Like Qnil in Emacs.) Taylan