Search found 94 matches
- Sat Jun 25, 2011 3:45 am
- Forum: Common Lisp
- Topic: Literal Lists
- Replies: 19
- Views: 16804
Re: Literal Lists
It's not just a matter of coalescing it with other similar lists, the file compiler can do other things, like putting it in read-only memory...but the REPL can never do such things (Emphasis mine.) I don't believe the spec says that. See below. so in fact you can modify "literals"; it's p...
- Fri Jun 24, 2011 4:06 am
- Forum: Common Lisp
- Topic: Literal Lists
- Replies: 19
- Views: 16804
Re: Literal Lists
Presumably you're supposed to be typing this at the REPL, so there is no problem (the results are perfectly well defined as long as you don't file-compile it). Well... “The consequences are undefined if literal objects (including quoted objects) are destructively modified.†( CLHS, Special Oper...
- Tue Jun 14, 2011 5:34 am
- Forum: Common Lisp
- Topic: Comma operator and macros
- Replies: 4
- Views: 5660
Re: Comma operator and macros
Also note that, while I don't know what it is you're trying to accomplish, and higher-order macrology (i.e., macro-generating macros) is generally quite fine and sometimes necessary, the particular case you cited can easily be handled without this kind of complexity, since object-mult doesn't seem t...
- Thu Apr 21, 2011 2:28 pm
- Forum: Common Lisp
- Topic: Preventing lifetime analysis
- Replies: 6
- Views: 6388
Re: Preventing lifetime analysis
This made things run smoothly, but I'd have a nagging feeling about some smart compiler noticing the subterfuge ... You may want to declare the variable SPECIAL, which will at least prevent the compiler from determining statically that the declared variable is not needed. In that case, you can also...
- Tue Apr 19, 2011 8:59 am
- Forum: Common Lisp
- Topic: Preventing lifetime analysis
- Replies: 6
- Views: 6388
Re: Preventing lifetime analysis
You could temporarily put the wrapper somewhere the GC will notice it, such as a multiset (FSet calls this a “bagâ€) referenced by some global variable, and remove it again at the end of the context. Of course, in case your code is multi-threaded, you will have to make sure that access to the dat...
- Thu Apr 14, 2011 9:45 am
- Forum: Common Lisp
- Topic: make source executable
- Replies: 12
- Views: 21964
Re: make source executable
Are there conventions for dot files (I saw reference to a ".clc" but no info on what should be put therein)? The directory ~/.clc/systems/ is where CLC looks for .asd files. (Note that you must symlink them there from their original directories, not copy them.) In fact, I've been using th...
- Wed Mar 23, 2011 8:54 am
- Forum: Common Lisp
- Topic: The top 5 CL links
- Replies: 7
- Views: 6653
Re: The top 5 CL links
For Scheme, I nominate schemers.org and the Community Scheme Wiki.
- Fri Mar 18, 2011 5:09 am
- Forum: Common Lisp
- Topic: ANN: cl-json-template
- Replies: 0
- Views: 4327
ANN: cl-json-template
Summary I've written an implementation of (most of) JSON Template in the course of rewriting my website. JSON Template is a minimalistic, declarative template language. Downloading You can fetch the Mercurial repository using the following command: hg clone http://matthias.benkard.de/code/cl-json-t...
- Tue Mar 15, 2011 4:49 pm
- Forum: Common Lisp
- Topic: Problem with destructuring-bind in a macro
- Replies: 6
- Views: 5699
Re: Problem with destructuring-bind in a macro
(let ((a 1) (b 2)) (destructuring-bind (#:a1 #:b2) '(4 5) (setf b #:b2 a #:a1))) Note that this piece of textual representation of code alone doesn't say much: The printed representation of uninterned symbols is ambiguous. In the above code, for instance, the two occurrences of #:a1 may or may not ...
- Fri Mar 04, 2011 6:22 am
- Forum: Scheme
- Topic: List Struture Equality
- Replies: 10
- Views: 32126
Re: List Struture Equality
Scheme calls it pair?. Other than that, it should work the same way.gugamilare wrote:Anyway, Scheme should also have the function consp, so I guess that is a yes