Page 1 of 1

"defvar:command not found"

Posted: Fri Oct 07, 2011 2:54 am
by dragmnl123
Hello everyone.
I'm a novice in Lisp and I'm following a course at university.

I just installed cygwin + the packet "clisp" (I suppose the last version avalaible).
I open cygwin, then I write "clisp"..Enter..and clisp starts.
But when I try:
(defvar *db* nil)

It says:
bash: "defvar:command not found"

I know "defvar" is a macro,but I remember I did the same with clisp at university and I got no problems.

Do you know why?

Thanks

Re: "defvar:command not found"

Posted: Fri Oct 07, 2011 8:39 am
by smithzv
I don't, but it sure seems like CLISP isn't receiving your input, as bash (the shell) is giving the error. You might just post exactly was shows on screen because either CLISP is quiting and you don't notice or Bash+Cygwin is doing something funny where it is grabbing your commands before they get to CLISP. For instance, I can almost get what you got if I, for some reason, decided to start CLISP in the background (using &):

Code: Select all

smithzv@ciabatta:~$ clisp &
[1] 22394
smithzv@ciabatta:~$   i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Welcome to GNU CLISP 2.48 (2009-07-28) <http://clisp.cons.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2009

Type :h and hit Enter for context help.

;; Loading file /home/smithzv/.clisprc.lisp ...
;;  Loading file /home/smithzv/quicklisp/setup.lisp ...
;;  Loaded file /home/smithzv/quicklisp/setup.lisp
;; Loaded file /home/smithzv/.clisprc.lisp
[1]> (defvar *hi* 5)
defvar: command not found
Maybe Cygwin is forcing CLISP into the background??

Re: "defvar:command not found"

Posted: Fri Oct 07, 2011 6:06 pm
by wvxvw
On top of what smithzv said, you may use CLISP on Windows w/o Cygwin (unless you use Cygwin because it makes things comfortable for you). Or just install some real Linux, if you needed the advanced command line interaction. (You could try Wubi - it's a version of Ubuntu running as Windows application).