chapter12 code modification

33 views
Skip to first unread message

jojo 0

unread,
Oct 14, 2017, 1:24:31 PM10/14/17
to Land of Lisp
Hello my name is jo, 
I have reached to chapter 12 examples and had trouble execute the code with-open-file
to make temporal file name "data.txt"

code:
(with-open-file (my-stream "data.txt" :direction :output)
  (print "my data" my-stream))

It seems that the path of the data.txt needs to be modified as "/tmp/data.txt".

Does anyone knows why? 

Anyway, hope it's helpful.

John de la Garza

unread,
Oct 15, 2017, 11:15:31 AM10/15/17
to land-o...@googlegroups.com
On Sat, Oct 14, 2017 at 10:24:30AM -0700, jojo 0 wrote:
> Hello my name is jo,
> I have reached to chapter 12 examples and had trouble execute the code
> with-open-file
> to make temporal file name "data.txt"
>
> code:
> (with-open-file (my-stream "data.txt" :direction :output)
> (print "my data" my-stream))
>
> It seems that the path of the data.txt needs to be modified as
> "/tmp/data.txt".

I don't need to do that. I mean I evaluated the code you pasted and
got a file called data.txt in my working directory.

What are the permissions for the current working directory from where
you are running this?

Edward Kenworthy

unread,
Oct 16, 2017, 12:25:33 PM10/16/17
to land-o...@googlegroups.com

Hi Jojo

 

Not many, if any, other people on this list any more.

 

I suggest going to www.reddit.com/r/lisp and posting your question there.

 

Edward

--
You received this message because you are subscribed to the Google Groups "Land of Lisp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to land-of-lisp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Reply all
Reply to author
Forward
0 new messages