Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.lisp > #59552

Re: Synonym Streams

Path csiph.com!weretis.net!feeder6.news.weretis.net!border-3.nntp.ord.giganews.com!border-4.nntp.ord.giganews.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date Fri, 19 Apr 2024 17:44:58 +0000
From steve <sgonedes1977@gmail.com>
Newsgroups comp.lang.lisp
Subject Re: Synonym Streams
References <6pd1+E7bUWxwHGM59@bongo-ra.co> <uqtv0o$1fckl$2@dont-email.me> <23FZrFyCKlaZfJP1R@bongo-ra.co> <20240219092306.348@kylheku.com> <867cj0qfbq.fsf_-_@williamsburg.bawden.org> <8734roez2s.fsf@gmail.com> <uvhtj1$3th0n$7@dont-email.me>
Date Fri, 19 Apr 2024 13:44:57 -0400
Message-ID <87frvhl012.fsf@gmail.com> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13)
Cancel-Lock sha1:L49SE/PHG48pJvZ2Ors8ypYx+Sc=
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Lines 27
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-vK8qKAiVyThbuWGyPPUGBTOQ3u8pZI7xVxEOJ+cK4bmTm2NyL2mMCnEfG5I1pJwboByamBbWflhaSB3!PR4pt7cTOCQDvZfSVbWmGbvFCEN2OaIqome8B/K2KsWNPw==
X-Complaints-To abuse@giganews.com
X-DMCA-Notifications http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
Xref csiph.com comp.lang.lisp:59552

Show key headers only | View raw


Lawrence D'Oliveiro <ldo@nz.invalid> writes:

> On Sun, 14 Apr 2024 11:36:11 -0400, steve wrote:
>
< > *Bivalent Streams*
< >      A type of stream that can read and write both ‘character’ and
< >      ‘(unsigned-byte 8)’ values.
>
> How is that supposed to work, exactly? Is each stream item tagged in some 
> way to identify it as a “character” versus an “unsigned-byte 8”?

I don't have any code at the moment - you could use 'base-char which
includes


(with-open-file (out "/home/steve/file.txt"  :direction :output :element-type 'base-char :if-exists :overwrite)
                (write-string "this" out)
                (terpri out)
                (write out :stream out))
#<SB-SYS:FD-STREAM for "file /home/steve/file.txt" {1002E2A943}>
CL-USER>

File : 
this
#<SB-SYS:FD-STREAM for "file /home/steve/file.txt" {1002E2A943}>

hope this helps...

Back to comp.lang.lisp | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

CLHS on *DEBUG-IO* and others Spiros Bousbouras <spibou@gmail.com> - 2024-02-17 14:08 +0000
  Re: CLHS on *DEBUG-IO* and others Kaz Kylheku <433-929-6894@kylheku.com> - 2024-02-17 16:34 +0000
  Re: CLHS on *DEBUG-IO* and others Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-02-18 22:06 +0000
    Re: CLHS on *DEBUG-IO* and others Spiros Bousbouras <spibou@gmail.com> - 2024-02-19 12:09 +0000
      Re: CLHS on *DEBUG-IO* and others Kaz Kylheku <433-929-6894@kylheku.com> - 2024-02-19 17:40 +0000
        Synonym Streams Alan Bawden <alan@csail.mit.edu> - 2024-02-19 17:06 -0500
          Re: Synonym Streams Spiros Bousbouras <spibou@gmail.com> - 2024-02-20 17:54 +0000
          Re: Synonym Streams steve <sgonedes1977@gmail.com> - 2024-04-14 11:36 -0400
            Re: Synonym Streams Alan Bawden <alan@csail.mit.edu> - 2024-04-14 18:49 -0400
            Re: Synonym Streams Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-15 00:49 +0000
              Re: Synonym Streams steve <sgonedes1977@gmail.com> - 2024-04-19 13:44 -0400
        Re: CLHS on *DEBUG-IO* and others Spiros Bousbouras <spibou@gmail.com> - 2024-02-20 17:47 +0000
          Re: CLHS on *DEBUG-IO* and others Kaz Kylheku <433-929-6894@kylheku.com> - 2024-02-20 18:18 +0000

csiph-web