freenode/#lisp - IRC Chatlog
Search
4:57:03
tourjin
on windows10, windowsemacs with slime, if i run this it creates output file on c:\users\choij not on d:\home where can I check the settings for default file creation?
4:59:22
no-defun-allowed
Probably where you started your Lisp implementation. You may want merge-pathnames and user-homedir-pathname to ensure you are writing to your home directory.
4:59:49
no-defun-allowed
e.g (with-open-file (stream (merge-pathnames "testfile.txt" (user-homedir-pathname)) ...) ...)
5:00:50
no-defun-allowed
Josh_2: I don't wear glasses surprisingly, but if it ticks you off, I can polish them all day.
5:09:06
tourjin
no-defun-allowed , your tip worked fine . thanks. ck_ your tip shows #P"c:/Users/choij". is it determined by emacs? or by slime? how can I change it permanantly to d:/home?
5:09:41
no-defun-allowed
The CLHS page states "An implementation-dependent pathname, typically in the working directory that was current when Common Lisp was started up."
7:09:44
ArthurStrong
It's character name from the TV series. https://en.wikipedia.org/wiki/Count_Arthur_Strong_(TV_series)
10:41:31
froggey
can (locally (declare (type fixnum *unbound-special-variable*)) nil) signal an unbound variable error?
10:41:40
froggey
from the TYPE declaration page: "The meaning of a type declaration is equivalent to [...] executing (the typespec var) at the moment the scope of the declaration is entered."
11:04:06
froggey
(locally (the fixnum *unbound-special*) nil) does, which I'd expect to be equivalent
11:06:50
phoe
froggey: in that case file a SBCL issue, since it's likely an issue with SBCL's approach "treat type declarations as assertions"
11:14:15
froggey
it's not just SBCL, this is how other implementation behave too. (the <type> *unbound*) signals an error, but (declare (type <type> *unbound*)) doesn't
11:14:57
froggey
I'm wondering if it is reasonable for an implementation to have the declare signal an unbound variable error too
11:19:53
phoe
only if the variable is tried to be accessed an unbound variable error is to be signaled
11:21:27
froggey
it's equivalent to (defun foo () (the fixnum *foo*) (if (frob) (the fixnum *foo*) *bar*))
11:22:09
froggey
on variable reads, writes, *and* on entry to the scope that the declaration applies to
11:23:14
phoe
so it is normal that at the entry to the function toplevel SBCL complains about unbound variable
11:23:53
phoe
you want (defun foo () (if (frob) (locally (declare (fixnum *foo*)) *foo* *bar)) instead
11:26:13
froggey
SBCL *currently* does (defun foo () (if (frob) (the fixnum *foo*) *bar*)), not what I said
11:26:42
froggey
I'm wondering if my reading of the spec, which would allow an implementation to do (defun foo () (the fixnum *foo*) (if (frob) (the fixnum *foo*) *bar*)), is correct