Re: bug: :if-exists :append
Jean Louis <[email protected]>
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Feb 13, 2017 at 04:18:12PM -0500, Sam Steingold wrote: > > * Jean Louis <[email protected]> [2017-02-13 22:20:58 +0300]: > > > > On Mon, Feb 13, 2017 at 01:51:10PM -0500, Sam Steingold wrote: > >> When I click on "Create Ticket" on https://sourceforge.net/p/clisp/bugs/, > >> I am redirected to https://sourceforge.net/p/clisp/bugs/new/ > >> What happens to you? > > > > I guess I don't have account there. I have account only on mailing > > list. Not that I am fond of sourceforge especially for GNU projects. > > Indeed, you need an account. > Please do get it. > We appreciate your bug reports. OK, will do. > > OK, if you happen to know how to get file descriptor by sys:: let me > > know. Or how to append to file which is chattr +a > > (require "linux") > (defparameter *my-stream* > (ext:make-stream (linux:open filename (logior linux::O_APPEND linux::O_RDONLY) 0) > :direction :append ...)) I cannot require "linux" for some reason, using 2.49+ development version which is too hard to compile. > > I have tried that with SBCL and it appended to the file > > interesting - what does my lisp code below do in SBCL? > > > >> --8<---------------cut here---------------start------------->8--- > >> (with-open-file (s "my-append-only-file" :direction :output :if-exists :append) > >> (let ((pos (file-position s))) > >> (write-string "foo" s) > >> (file-position s (- pos 3)) > >> (write-string "bar" s))) > >> --8<---------------cut here---------------end--------------->8--- debugger invoked on a TYPE-ERROR in thread #<THREAD "main thread" RUNNING {10028DE633}>: The value -3 is not of type (OR UNSIGNED-BYTE (MEMBER NIL :END :START)) anyway, I cannot test it. For me, I just know, I don't get result. Jean ----- End forwarded message ----- ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list