libera/#commonlisp - IRC Chatlog
Search
6:22:40
^[
leo_song: It depends on your threat model. Some might argue that it's not safe to run Quicklisp anywhere, because it doesn't use TLS or verify downloaded packages.
6:43:08
pjb
leo_song: what is not safe is to execute code that you haven't checked and validated. So ftp+asdf can be as unsafe as quicklisp, if you don't add an audit in the middle.
6:44:00
pjb
leo_song: now arguably, quicklisp doesn't have an audit hook between transfer and asdf (and asdf itself is already executing code from the asd file), so quicklisp is fundamentaly more unsafe than ftp+audit+asdf.
6:45:38
pjb
leo_song: the security model adopted here is the herd security. You just keep your ear open, and listen if somebody else has had a problem. And you'll react in that case. But it may be you… https://www.youtube.com/watch?v=Q2KwRPtEjco
6:50:01
moon-child
I guess the specific concern (given public wifi) is mitm. The question then is whether asdf uses a secure transport layer and/or does signature checking
7:44:55
kakuhen
but this time it's for a really reason: turns out the placement of your assets folder matters A LOT if you use cl-sdl2... the wrong placement of the binary will give you "unrecoverable stack overflow error" and drop you to the kernel debugger
16:22:25
MichaelRaskin
macroexpand and macroexpand-1 perform the expansion but do not evaluate the result of the expansion
16:23:06
gin
beach: I have a macro add-key-value to add a key value pair to an alist. I wrote a macro for this because that is the only way I see to implement something like (add-key-value "name" "Harry" alist) type of calls.
16:23:07
beach
gin: Macros are usually compile-time features. It doesn't make much sense to "invoke" them at run time.
16:23:59
gin
beach: So the problem I have having is that if I have another function that takes alist and uses add-key-value, this function should also become a macro now to avoid alist being copied by value to this function.
16:25:26
gin
beach: how can I implement function add-key-value so that (add-key-value "name" "Harry" alist) works then. With a function, I see the alist I pass never sees the change done within add-key-value
16:27:33
beach
gin: So you don't mean that you add things to an alist. You mean that you modify the place that contains the alist.
16:28:13
gin
beach: yes. but I was originally looking to modify the alist itself. when I could not do that I modified the place containing the alist using defmacro
16:29:42
beach
gin: I suggest you turn your alist into an abstract data type that you can then modify with a function.
16:30:25
beach
gin: Alists and lists in general, are not abstract data types. They should mostly be used as building blocks for abstract data types. Not so much be used by themselves for things like this.
16:30:42
beach
gin: If you insist on using alists, then use the return value of your addition function.
16:33:40
beach
gin: Then (defun add-key-value (key value dictionary) (push (cons key value) (contents dictionary)))
16:55:40
pjb
gin: notice how (let ((a '())) (values (setf (aget a :key) 42) a)) #| --> 42 ; ((:key . 42)) |# (setf aget) both returns the new value 42, and mutates the place A (which could be more complex than just a mere variable reference, and still handled correctly thanks to get-setf-expander and define-setf-expander).
16:56:37
pjb
gin: of course, you can s/aget/key-value/g and (setf (key-value person-alist :name) "Harry")
17:34:12
char
hyperspec says set is depricated. It also seems that both set and symbol-value cannot access the lexical value of a symbol
17:36:51
Xach
char: that means it's time to think about a different approach, like maybe having a lookup table keyed by symbols instead.
17:43:38
char
it is for my tailrec macro, someone told me to stop using destructuring-bind and set the variables manually (to avoid code duplication in macroexpandsion). So I have quoted symbols (that were present in the original lambda list and used in the body of the function, and I have their values stored in a list in a (gensymed) symbol. I was thinking "just (mapc 'set ',params ,args)", but since the params are lexically bound, it is almost as