freenode/#lisp - IRC Chatlog
Search
20:10:00
fiveop
deriving from asdf:downward-operation I got where I wanted: perform called for my-op on all dependencies of the system
20:10:23
fiveop
(asdf:clear-system :alexandria) allowed me to run the op multiple times with full effects
21:38:33
mfiano
(serapeum:dict :a 1 :b 2 :c (serapeum:dict :a 10 :b 20 :c 30)) (serapeum:href * :c :b) ; => 20
21:46:41
aeth
I use the word "hash" for literal hash-tables, which matches Racket's API iirc. So e.g. (hash :foo 42)
21:48:03
aeth
If you don't want to pull in a massive utility library, it's very tiny, and it could even be done in 3 lines if you wanted to do it in a more straightforward but less reliable way: https://gitlab.com/zombie-raptor/zombie-raptor/blob/754bbc15bab6486d58e1ce848ba2782f78ca5e83/util/util.lisp#L559-577
21:49:05
aeth
href is another thing that looks trivial. I could probably spin this off into a micro-library.
21:50:22
aeth
TMA: The problem is it's not standard and it's not (afaik) in alexandria so everyone writes it themselves because it's so trivial.
21:51:31
aeth
I've seen several #h reader macros, too, but ime the regular macro is simpler because you don't have to worry about the editor doing things like messing up the indentation
21:53:24
mfiano
or doing it correctly by using named-readtables and annotating each file that needs to alter the read table
21:53:50
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=425a64dd will be valid until 22:00 UTC.
21:55:09
aeth
mfiano: Does using named-readtables stop the editor from taking a multiline #h(:foo 42 :bar 43) and aligning the :bar indentation with 42 instead of with :foo? I don't think it does, unless that has changed since I last tried to use a macro like that.
21:57:13
mfiano
That doesn't occur for me even without named-readtables. keywords are aligned. There is a slime/sly option for it if it's not the default
21:57:45
mfiano
and no, named-readtables would need to be aware of that process or use shinmera's trivial indent to add portable rules
21:58:15
aeth
mfiano: that is weird... maybe it did change to be reader-macro-aware since I last tried it, which was years ago
21:58:27
mfiano
I use Sly though, so could be why it's different. It fixes a lot of strangeness with slime and has better defaults
21:59:35
aeth
I just did a test with my example and :bar aligns with :foo now, which it didn't used to do. I must've last tried this many years ago, though.
22:08:43
edgar-rft
aeth: it's not your fault, it's the real world that has moved away from the knowledge
22:09:42
aeth
edgar-rft: Well, I can tell you for sure that if you're a time traveller or if time moves backwards for you, then you shouldn't use reader macros where you want plists to align properly.
3:33:59
no-defun-allowed
I have a very silly function (defun f (y) (let ((x (/ y))) 2)). Evidently the variable X is never used, but shouldn't it not be removed because it could signal a condition if I call (y 0)?
3:36:00
no-defun-allowed
On SBCL it does optimizing for (safety 3), but not on default declaimations.
3:42:42
edgar-rft
no-defun-allowed: I think signalling conditions for wrong aguments should be done with CHECK-TYPE or ASSERT, I wouldn't expect that the compiler cares about silly code.
3:43:52
no-defun-allowed
True, but should a compiler be able to optimise out useless code that may signal a condition like that?
4:59:08
Godel[m]
Hi, does anybody know why alambda macro is not included in the "anaphora" package on quicklisp? Is there in any other package on quicklisp that includes it?