freenode/#lisp - IRC Chatlog
Search
21:19:29
_death
it's more like (set 'bla value), except that since lexical variables were introduced it's not
21:19:41
MichaelRaskin
And Common Lisp set… well, read the Hyperspec page of it. When you feel you are ready to read it once again, read it again. If you want to use it — well, maybe it does fit your use case.
21:21:18
MichaelRaskin
By the way, let*/let can create a dynamic-extent binding for a special variable
21:22:00
random9899
so what's the difference betweeen declare special and declare dynamic-extent in a let/let* then ?
21:23:09
random9899
wait, dynamic-extent in a lexical scope will make it's stack in-place rewritable ?
21:37:12
aeth
(setf (elt l 3) 0) is understating what setf can do. You can define your own setf in three ways. defun (setf foo), defsetf foo, and define-setf-expander. And defsetf is elaborate. You can take in multiple values, e.g. (setf (foo 42) (values 1 2 3 4))
21:42:03
aeth
I use it for array stuff. You can make fairly elaborate accessors (reader/writer pairs). The reader (the function) returns multiple values. The setf sets when given multiple values. So you can say (setf (array-row-of-4 foo 42) (array-of-4 bar)) and that will set (foo 42 i) where i is 0 through 3 with the first four elements of bar.
21:42:45
aeth
(It doesn't actually have to be a row of length 4 or an array of length 4... They'll just take/set the first four.)
21:50:04
aeth
Unfortunately, it doesn't seem to work with &rest so you can't have an arbitrary number of values
21:59:07
aeth
I'm not sure. Putting in a printf in the middle, it always is (#:new1 #:new2) no matter how many values are fed in. At least in SBCL. And in CCL (#:G25710 #:G25711)
23:53:48
ricky____
hello, all. can anyone tell me why this let form returns NIL? `(defparameter instruction-map (let (ht (make-hash-table)) ht))`
23:54:05
beardio
is it possible to sort a list '(a n b h l k e)...I know sort on a list of integer with the predicate #'<, I am trying to figure out how for characters
23:57:41
White_Flame
you defined 2 bindings, ht, and the local variable make-hash-table. You need another set of parens
23:58:34
White_Flame
there's no defined sort order for symbols, because they include a package by default, too
0:00:55
aeth
Both are ways to get nil bindings, it's just that the order you put them in made it look like you were doing a non-nil binding
2:33:27
aeth
Is there a way to detect if I'm no longer using any symbols from a package that I am importing from? Yes, there's no way to detect this perfectly because you can basically do whatever, but I'm sure I probably am importing from some packages unnecessarily.
2:34:15
aeth
e.g. if I only was using a package for some constants or deftypes that then got moved to another package
3:39:52
jlarocco
FWIW, in that conversation a few hours ago, (sort '(a d b f e c) #'string<) is legal because #'string< takes string designators, and symbols are string designators
3:41:47
mfiano
jibanes: We already discussed that, and that's not the problem we were referring to :)
4:34:41
edgar-rft
ealfonso, you can FMAKUNBOUND the LDB function in your Lisp code before you're dumping the image.
4:43:18
phoe
edgar-rft: I do not think he means #'LDB but rather he means SBCL's low level debugger.
6:14:24
phoe
Do I want to treat my RDBMS as plain old data store, and therefore have all logic on the Lisp side
6:15:43
phoe
I'll learn PL/PGSQL that way, and then end up writing the same in Lisp nonetheless because hell, I prefer to debug Lisp rather than to debug procedural SQL.
6:17:53
phoe
I was initially thinking about performance, but then remembered that premature optimization is the sqrt of all evil and it's easy to speculate about something that does not yet exist.
7:09:57
phoe
I need a Common Lisp utility that, given some kind of lambda list with annotated types, and a function's return value, will give me a valid DECLAIM FTYPE form.
7:11:14
phoe
Something like ((foo string) bar (baz (or symbol number))) (values t boolean) as input, and (function (string t (or symbol number)) (values t boolean)) as output.