freenode/#lisp - IRC Chatlog
Search
17:55:33
markasoftware
How might I simplify (setf (nth (third node) to-return) (nconc (nth (third node) to-return) (list i))) ?
17:56:10
markasoftware
to-return is a list. I want to append the element i to the end of a certain sub-list of to-return
17:56:55
markasoftware
i can't just use nconc and rely on its mutation, because if (nth (third node) to-return) is null, it obviously can't modify nil.
17:58:07
pjb
markasoftware: you write an appendf modifier macro (or use one from a library, but since it's a one-liner…)
18:12:11
markasoftware
is there any reason i should use (append) instead of (nconc) as the function passed to define-modify-macro?
18:12:51
pfdietz
Safety? A common source of bugs is destructive modification of things that share structure with other things.
18:22:16
antonv
hi, is there a way to run a lisp in rowsell in non-standard readtable case? Like modern Allegro mode.
18:36:46
markasoftware
is the lambda-list for define-modify-macro exclusively for the purpose of limiting the number of arguments?
18:55:28
markasoftware
when a global variable is bound, what exactly is it bound to? Does it have its own name, or is it simply bound to a symbol, and uses the symbol's name?
18:58:16
jackdaniel
markasoftware: when you have the object with slots, some of them may be not bound
18:59:24
jackdaniel
also please see the glossary entry for "unbound variable" here http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_u.htm#unbound_variable
19:00:31
jackdaniel
I've mixed slots and variables here because I was looking for an examples of unbound places
19:04:52
markasoftware
if a variable can be directly bound to a value, why do we need a value cell on symbols?
19:29:35
peey
Is there any syntax in lisp which lets you use a symbol before its definition? e.g. something like (where (set-union s1 s2) (define s1 ....) (define s2 ...))
19:31:21
Bike
(defmacro where (form &rest bindings) `(let (,@bindings) ,form)), then (where (set-union s1 s2) (s1 ...) (s2 ...))
19:33:44
peey
Bike: Good enough. This should be a package. I think I'm remembering this because it's a standard way to write things in haskell
20:24:35
Shinmera
I recommend writing code in the conventions established in that language. Trying to carry over conventions from other languages will only prevent you from truly learning the new one, and will hinder others reading your code.