1

Hello I am brand new to programming with Lisp and I have been following a tutorial on YouTube.(https://www.youtube.com/watch?time_continue=56&v=ymSq4wHrqyU&feature=emb_logo) I am using clisp. When I type clisp in the terminal I can code with lisp but I want to be able to use TextEdit to save my file and I have created a file in TextEdit with the extension ".lisp" However, when I try to execute it from the terminal I am met with this message:

Renes-MBP-2:~ renegutierrez$ clisp test.lisp *** - EVAL: variable |{rTF1aNSIaNSICPG1252cOCOARTF2511| has no value

The only thing in my file is: (print "Hello World")

Any help would be much appreciated thank you so much.

2
  • 1
    If you write a bug report it is always helpful to mention what you are using: operating system + version, Lisp system and version. Commented Apr 18, 2020 at 7:27
  • Don't write code with TextEdit, use a programmer's editor. The tutorial you're following uses TextWrangler, which is no longer produced, but its (superior and also free) relative BBEdit has been popular among Mac users for many years. See here for details. Commented Apr 18, 2020 at 15:35

2 Answers 2

1

With the little information you give, it's difficult to diagnose, but I will give it a shot.
TextEdit uses a BOM (byte-order mark), that is a few invisible bytes at the beginning of the file which tells the editor how to decode the data in it. However, CLISP might get confused with these bytes and return an error. The solution in this case would be to tell TextEdit to save only text. To do that, in TextEdit go to TextEdit -> Preferences and select Format Plain Text. Save your file again with these new settings and see if now it loads in CLISP.

Sign up to request clarification or add additional context in comments.

1 Comment

That fixed my issue thank you so much! Sorry I thought I had given enough I'm still brand new to all of this. But thank you again for the information.
0

With the initial default settings, TextEdit writes RTF (Rich Text Format) by default. When you look at the file through the Terminal, you'll notice that your file starts with

{\rtf1\ansi\ansicpg1252\cocoartf2511

Make sure to convert the file to plain text, through the Format menu.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.