From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Linas Vepstas Newsgroups: gmane.lisp.guile.user Subject: Re: guile can't find a chinese named file Date: Tue, 14 Feb 2017 14:10:19 -0600 Message-ID: References: <874m0gd3z4.fsf@gnu.org> <87wpdc8rx7.fsf@elektro.pacujo.net> <87poj4r04c.fsf@fencepost.gnu.org> <87k29c8q3b.fsf@elektro.pacujo.net> <87h94gqz34.fsf@fencepost.gnu.org> <87fuk0ctve.fsf@elektro.pacujo.net> <878tpsqtzl.fsf@fencepost.gnu.org> <87zii8bcdw.fsf@elektro.pacujo.net> <87y3xspcux.fsf@fencepost.gnu.org> Reply-To: linasvepstas@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1487103081 22707 195.159.176.226 (14 Feb 2017 20:11:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2017 20:11:21 +0000 (UTC) Cc: Guile User To: David Kastrup Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Feb 14 21:11:16 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdjRT-0005JQ-94 for guile-user@m.gmane.org; Tue, 14 Feb 2017 21:11:15 +0100 Original-Received: from localhost ([::1]:36965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdjRV-0001Jm-J8 for guile-user@m.gmane.org; Tue, 14 Feb 2017 15:11:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdjQz-0001ID-1u for guile-user@gnu.org; Tue, 14 Feb 2017 15:10:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdjQx-0007wr-8I for guile-user@gnu.org; Tue, 14 Feb 2017 15:10:44 -0500 Original-Received: from mail-qt0-x22b.google.com ([2607:f8b0:400d:c0d::22b]:34902) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cdjQv-0007wG-57; Tue, 14 Feb 2017 15:10:41 -0500 Original-Received: by mail-qt0-x22b.google.com with SMTP id x49so120793757qtc.2; Tue, 14 Feb 2017 12:10:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cwjUlsgWyYL1w/sp4buN1NxKDX8RcU7Tfx0at0FQW6Y=; b=CcQ+QCcyLOOwFqdEUEvDY99AfQSwA4zyE8M7XZHOF5G5lT47eYDpA7pRvzpfdrFoX9 9PgePhtTfr4WFK233X+dBlYmaDSCAX+cbJxqM5+N5ntKAttmWikWfswjTat08EPfAcA4 2DZy0mZn/eCUcWGIa7e2+mdmWHpht6jMr3V4ioSAgr/aX6vXkZSoLu/c+q3JjiuZTNa4 xNLZAOm1bULTRMpLYH9b6usmM0QgH9ac6io52jDuoYUxzhreqDhELotc6MdQBRcjoRJA Yo9nijwki8bFYaXBGS7mo/q/eRNbqdKlUksrB9RHMTybA/T4TDNs+wPiwXlnMHwhbzM+ nJhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=cwjUlsgWyYL1w/sp4buN1NxKDX8RcU7Tfx0at0FQW6Y=; b=JB046OOmGcZeNXPjv2nUzD5wpkhXReSzXa3eQvFnodM0Jkx41jTXZSMyyN/aFZAtmP 0+jJEkO5+DIlfz3SJTdKarmVT+0hbpm77E2YPRC0bGFhw+tE6Q+0at4ieDckjUnOV6hx ZSSNjyWTKwBEXdj0DQaj3cQqMXg7nJ8/emTGswF/NV9mdmlo8jtJUE2/mdFrBPQ+4Tz4 Sm8qadwzJuLzPnCTKuA4FEPCQISF7IvM9d4zZ5qSdAXf276PX5hDhCrHq4AOpXdFLHcd 8ifqJ8zy0N+6B116YxmEdiGD/LzoaRQEp7+GZTFhjAS3zOJpdp4x3tAjHDaaYoDKJHXq wlOQ== X-Gm-Message-State: AMke39n7h1trg7d+anRM1EiFfIZW5wHdNHU6I2oZPGeakjkfpXT37828tzQMsJZ2Iu3KAqUhDGxNgZfsNwYRNQ== X-Received: by 10.200.42.227 with SMTP id c32mr28422002qta.70.1487103040295; Tue, 14 Feb 2017 12:10:40 -0800 (PST) Original-Received: by 10.12.174.231 with HTTP; Tue, 14 Feb 2017 12:10:19 -0800 (PST) In-Reply-To: <87y3xspcux.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::22b X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13201 Archived-At: On Mon, Jan 30, 2017 at 1:27 PM, David Kastrup wrote: > Marko Rauhamaa writes: >> David Kastrup : >>> Marko Rauhamaa writes: >>>> Guile's mistake was to move to Unicode strings in the operating system >>>> interface. >>> >>> Emacs uses an UTF-8 based encoding internally [...] >> >> C uses 8-bit characters. That is a model worth emulating. > > That's Guile-1.8. Guile-2 uses either Latin-1 or UCS-32 in its string > internals, either Latin-1 or UTF-8 in its string API, and UTF-8 in its > string port internals. Which seems to be a bad decision. I've got strings, 10MBytes long, holding chinese in UTF8, and guile converts these internally, to UCS-32 which is a complete and total waste of CPU time. WTF. It then has to convert them back to UTF8 before passing them to my C++ code that actually does stuff with them. All I get for this design decision is poor performance, and endless complaints from boehm-gc: "GC Warning: Repeated allocation of very large block (appr. size 3944448): May lead to memory leak and poor performance." Its just not very friendly. Although I am complaining, I do have vague plans on submitting patches to fix this; I've read through the guile source, and can see where the code does this. Reading the code, it's written in a late-night-not-thinking-clearly coding style, and should be relatively easy to fix. --linas