From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51658: [PATCH] Haiku port (again) Date: Wed, 10 Nov 2021 20:56:10 +0800 Message-ID: <87o86s41at.fsf@yahoo.com> References: <87ee7surtv.fsf.ref@yahoo.com> <87ee7surtv.fsf@yahoo.com> <83mtmd43fa.fsf@gnu.org> <87ilx0yj52.fsf@yahoo.com> <83czn8424l.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: 51658@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 10 13:57:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mknAB-0008V9-VK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Nov 2021 13:57:16 +0100 Original-Received: from localhost ([::1]:42800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mknAA-0004im-Qh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Nov 2021 07:57:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkn9y-0004er-5T for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 07:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mkn9x-00052x-Tm for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 07:57:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mkn9x-000325-Tg for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 07:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Nov 2021 12:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51658 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51658-submit@debbugs.gnu.org id=B51658.163654898511613 (code B ref 51658); Wed, 10 Nov 2021 12:57:01 +0000 Original-Received: (at 51658) by debbugs.gnu.org; 10 Nov 2021 12:56:25 +0000 Original-Received: from localhost ([127.0.0.1]:37262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkn9M-00031F-Uh for submit@debbugs.gnu.org; Wed, 10 Nov 2021 07:56:25 -0500 Original-Received: from sonic304-21.consmr.mail.ne1.yahoo.com ([66.163.191.147]:38457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkn9J-000312-Vd for 51658@debbugs.gnu.org; Wed, 10 Nov 2021 07:56:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636548976; bh=Wuo0+AAmR4lxKXVenbMcLuG3g03gR47k64hROpK39ac=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=cWYHKa/PKi85C53qLuslVc27xLy8YmUvNYXVv+I9F7ZMbs3diBXIIFWQO6oradj9xywYhn2QrExQIV4OskO/y+Z5E2t2M6U647FtE+bpDouleoseG5yUebcQyteLaagO8mglOcIE46G3lOmbtQryv/Tw2WEzxeW3G99xEr6fo1VuBWABJiOZnGBJknRH4SHmyQ8R4pAsa0qqw270Tv/7xes2OyCrMXBAhKVU/4H7Mlxenx2It5YOkKDMjxCvgiY4Qof3HT1x2m0bzBtITjnjbnnoImYjp8LpOsyjMIOr5+dhIKARGnmgA9YNgAegD2SkAHyLk5Rfz/39qpEDN90tTg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636548976; bh=WIUeHgRj7Mm4rl5nt0E4q84KbCXKyQkf6rNz4kT4Xpq=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=J7q0pFtv5JWQT84WlStRi7Wk0pv/MEEJDO7qqWVTM0YXSq1Gpgma5Nr5aAVXlLwm4qbOhR7m5qCz6M2GOcOeq6y55VxVScQ06n+nOHULbUBE4Bjn/Q8ux4LL0wZ2avTSITPCwgacHcOx6zuyUWyyb3Gimg2jcdkWE2kqqHiFIHqYJkbAmcrv3AuaXBULXeCFa49XMF+Kr8XtRcUodz8okXMzoQyh0q3FUcWQ2wLGr4pRtjtIqn2q/maDEOYBWBqNyEaAPfbJVtwcjXrs7H74WggSHwNelzQmzFs8jdaK55PIs5gYb2AuS0jWp+8GCavee5xlMhPQ8ZR1/m+PSE7vxw== X-YMail-OSG: nPzffPEVM1kl9p0Wc7wBP867RxnGWGetpMukN7oBl543z4lykyX65lFAglH30nz G78.3sKh4jiU11.0Vp.Rl9wU8eS7iPoOFC_sOSU1a.ARraLRoWXGW7uZSTwirf476FGW1serkeDi FAMjnAuxANcC6iLSsL5RoCH7B05yovOuICY_ZryyVhvyNz7vUE8BQ406KvYK.uiqS2n6m_yP0_VQ g0WgXZpRtCoTAsqwQ.MT6T53RUjdPcNr2hHu38X_cThvHMVqI79abysEdYNVFQwvZkNxBU_AmndV h3TxGWZhey0UB_HqEhASVLTVFhiWLO6QsP8DjLuWPm2gLq85fX7_OWQhlhN3ziwQA_pDS95tXQw5 hB6wZpWaVTpqY2MCKM2maSWvFbgh0cLWFq0TlvnyoTQkZaAuULWdnfBbeeHVDi1gFTC494.z4_qk 8GbT_z0h2KIQLFNDOhtxPfBRDEDPw1E93..aZiBD0xqzqy9DlaHoGSXxQBZpp.lQK939fCWptqWx c2n75zwOdO48OW2Q9y.nWEDPASt098BWUFmtE58KKSlWDn1Habv33vz5QS1wrFEMa8YrCcrEZrvF UsI3Y5xLondwHppqZhFjY7nvcRQpM0cG1UIC9rYZ.nz9aSkzBhNsUV4g2NkcaUC40wsTgV8fQRS_ u32.9s8KKYliZcASuLsMNVD5jYDu1.YEt1SsSzbQPRBBzRv8S_7AOOxLRxVlbNLFUvJGYegCMHCs .BKvyIQ4n9EgE5oVosrXSCt7pIm5mO3.jfOnwmO0QvwTCBI0eQ9ocRkd_thco5DDw2u0WMT2nnh5 Fq6kCl_HD3EnB_PeAKm_x8lYUkvwPGdMAiOBtvplEQ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Wed, 10 Nov 2021 12:56:16 +0000 Original-Received: by kubenode511.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 4644336a679f1f49ed49469bf094610e; Wed, 10 Nov 2021 12:56:13 +0000 (UTC) In-Reply-To: <83czn8424l.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 10 Nov 2021 14:38:18 +0200") X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219539 Archived-At: Eli Zaretskii writes: > Too bad. IMNSHO, that's a ticking time bomb, and it will certainly > bite us at some point, since mixing C and C++ is tricky and requires a > lot of diligence. It also means that you will probably be unable to > use any compiler but GCC (or whatever is currently supported by > Haiku), since different C++ compilers are generally > binary-incompatible. AFAIU, the Haiku developers only support GCC for compiling C++ code, as they have a requirement to keep support for old BeOS software, which depends on the GCC ABI. If that changes in the future, it would only be alongside a major change in the operating system's other aspects, that would break the build anyway. > Since you later say Cairo is unreliable, why not drop Cairo? What I meant by "unreliable" is that the Haiku developers tend to tweak their Cairo package in various manners, which breaks the Emacs build. People building Cairo themselves won't experience this problem, but building the BeOS cairo backend is... tricky, to say the least. I managed to get it to work, but there is a lot of pain involved in it that I wouldn't want to repeat. The Haiku developers have a package repository and build automation system that would make this easy, should they ship the Haiku port of Emacs in the future. (At present, they only ship Emacs built to run in a TTY.) So it is useful to have Cairo around, for people whom it is useful, but if not, it would be good to have something to fall back to. > And that still leaves us with 3 backends, IIUC. Why not just one? Well, one of those backends is simply a HarfBuzz variant of the other, which is how xftfont and ftcrfont do it, and IIUC, that's how it works under MS-Windows too. So, if we keep only the haikufont backend (for Haiku users who don't want to install FreeType or Cairo), and one of `ftbe' or cairo font support, there will really just be two font backends. (haikufont.c and related support functions in haiku_font_support.cc use the BFont API, which is the native font API on Haiku, but doesn't support fancy text shaping or HarfBuzz, not unlike X11 Core Fonts.) Aside from not depending on Cairo or FreeType, which are not always available on Haiku, it also comes with the advantage of being fast even on remote sessions (not unlike X11 remote access), as characters drawn are sent down the wire as plain text, instead of as bitmap data, which is very slow when operating over a remote connection. So I think it will be useful as a fallback in many cases. > Let me clarify why I insist on those issues: this port's usability > will depend crucially on its support by the developers who are > interested in Haiku, and that's for now just you. Any decrease in the > level of support will most probably mean the port will bitrot and die, > given the fast pace of Emacs development. So every feature that > doesn't absolutely have to be there is better removed, because having > too many supported configurations makes the code difficult to > understand and test, and thus fewer people will be able to support it. > Please keep this in mind when you insist on optional non-essential > features. From experience, a port or a feature that is not supported > well enough bitrots very quickly around here. Thanks, I understand the problem. I was tempted to add many features, but refrained from doing so for precisely this reason. > So my suggestion is to choose wisely which features you really need to > keep. Yes, thanks.