From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.user Subject: Re: guile can't find a chinese named file Date: Mon, 27 Feb 2017 13:09:45 +0100 Organization: Organization?!? Message-ID: <87r32jomwm.fsf@fencepost.gnu.org> 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> <578885360.4452806.1487105647708@mail.yahoo.com> <87inoc5npq.fsf@fencepost.gnu.org> <8737f0tzs0.fsf@pobox.com> <87zih8ngm8.fsf@fencepost.gnu.org> <87innvsxqj.fsf@pobox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488197446 30581 195.159.176.226 (27 Feb 2017 12:10:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2017 12:10:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Feb 27 13:10:42 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 1ciK8W-0007TR-Gy for guile-user@m.gmane.org; Mon, 27 Feb 2017 13:10:40 +0100 Original-Received: from localhost ([::1]:52091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciK8c-0005bP-Gv for guile-user@m.gmane.org; Mon, 27 Feb 2017 07:10:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciK85-0005Za-VC for guile-user@gnu.org; Mon, 27 Feb 2017 07:10:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciK7z-0006fI-PE for guile-user@gnu.org; Mon, 27 Feb 2017 07:10:13 -0500 Original-Received: from [195.159.176.226] (port=57307 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciK7z-0006dW-IY for guile-user@gnu.org; Mon, 27 Feb 2017 07:10:07 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ciK7l-0003DI-FN for guile-user@gnu.org; Mon, 27 Feb 2017 13:09:53 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@blaine.gmane.org X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw Cancel-Lock: sha1:dPwDCyoo0/PvY/KQVoEM2yTfroM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:13331 Archived-At: Andy Wingo writes: > On Mon 27 Feb 2017 10:10, David Kastrup writes: > >>> String ports have nothing to do with the discussion AFAIU. (Ports in >>> Guile are sequences of bytes also. They may be accessed using >>> textual interfaces as well. >> >> They can _only_ be accessed using textual interfaces. They are >> character-in/character-out. > > You misunderstand what Guile ports are. The topic was "string ports". String ports and soft ports operate on characters and strings in Guile's encoding which makes a separate reencoding pass both error-prone as well as inefficient. In particular since one use of string ports is reading sexps which involves frequent peek/unget operations for which Guile reencodes characters only to decode them right again on the next read. > I seriously invite you to read the fine manual, specifically the first > four subsections of this node: > > https://www.gnu.org/software/guile/docs/master/guile.html/Input-and-Output.html The number of errors I reported with regard to Guile's string and port handling (and which ultimately got fixed) as well as the fact that I did all of the low-level work for migrating probably the largest existing Guile-based application from Guile-1.8 to Guile-2.0 makes it somewhat unlikely that my thoughts are merely the outcome of incompetency. Where in (with-output-to-string (format #t "~s\n" (make-list 42))) do you see an encoding inherent? From the Scheme side of things, it is characters and strings which are involved here exclusively. Reencoding into an external coding system does not make sense here. The situation is similar for soft ports. -- David Kastrup