freenode/lisp - IRC Chatlog
Search
14:00:21
Shinmera
I don't remember if it was fixed in ASDF completely and/or whether that made it into SBCL again.
14:17:26
francogrex
yes it is in sbcl 1.4.5 unfortunately. thanks now I realize it's not just me. I hope it gets fixed
14:26:57
Bike
if X is a macro, then when the compiler sees a form (X ...), it calls X's macro function with the form and the lexical environment, and then compiles the resulting form instead
14:34:02
sjl
Let Over Lambda covers macros pretty heavily. Not everyone likes the book though — there are some weird style choices, and the tone is a bit much sometimes.
14:36:26
sjl
Shinmera: how about https://www.amazon.com/Large-Himalayan-Salt-Animals-Horses/dp/B00KAD811C/
14:37:25
Shinmera
Ah, perfect, even includes a rope to hang yourself with when you can't take the constant jerkoff in the book anymore.
14:50:53
Shinmera
I remember when SBCL made that change to their backquote implementation. One dude got really furious about it.
14:51:27
sjl
didi: yeah, that's it. part of it is available online I guess, so you can try before you buy.
14:54:44
Bike
it defines this macro that's supposed to let you define macros such that in their body, g!name is replaced with a gensym
14:55:20
didi
"Only the top percentile of programmers use lisp and if you can understand this book you are in the top percentile of lisp programmers." Hihi.
14:58:34
sjl
well, that's a bad example because it doesn't actually prove it's a gensym... but: `foo#
15:00:38
sjl
per syntax-quote, so if you need to unquote and requote you have to do it the old fashioned way
15:01:17
sjl
LOL has o! to replace ONCE-ONLY too. I prefer just using the with-gensyms and once-only macros myself.
15:01:36
Bike
Have your ` replacement bind the translation table, and then ! or whatever does the replacement
15:06:13
drmeister
ACTION doesn't like those kinds of salt licks. He never knows who's been licking it before him.
15:08:07
schweers
how come g! and o! in LOL are broken? I use defmacro! from a package someone made from the LOL code (on quicklisp) and it seems to be working fine.
15:13:00
schweers
oh. because what (read-from-string "`(foo bar)") returns is implementation defined?
15:20:58
schweers
I don’t think it is. I’ve never used it, I’m just trying to see how defmacro! is broken, and whether the version I’m using is broken too: https://github.com/thephoeron/let-over-lambda
15:21:27
schweers
I don’t think the use of parse-body fixes this issue. But no, I don’t think its bad. I should be using it more myself :D
15:21:37
Bike
https://github.com/thephoeron/let-over-lambda/blob/master/let-over-lambda.lisp#L93-L95 here. this part.
16:17:25
comborico1611
Is it customary to put the key or the list first, in the order of parameters?
16:19:43
Shinmera
However, usually the thing you're looking for is more important or interesting, so it coming first makes more sense in my opinion.
16:21:05
didi
I like to go as it would read in English: (find x list) => Find the element X in the list LIST
16:22:56
didi
Of course one could argue for: (find list x) -> Find, in the list LIST, the element X. But I think it's awkward.
16:22:57
Shinmera
In some cases where what you are retrieving is more of a property, the "container key" order can make more sense since it implies a "depth".
16:23:37
pjb
comborico1611: it doesn't matter, anyways you should define your own functional abstractions, so you can use your own conventions.
16:32:21
pjb
Scientists: syntax highlighting doesn't support software developers enough <https://medium.com/jexia/requirements-mislead-and-undermine-good-design-e065ab5cae80>
16:33:10
pjb
Sorry, the right url is: https://link.springer.com/epdf/10.1007/s10664-017-9579-0?author_access_token=k4oGeJTmqhJxzIPaaGED3Pe4RwlQNchNByi7wbcMAY6Fle4EoE8tIdI693hz9UVo8vGkF1TVHbc2IJokKLOhdq50VzjP4FAgDEGKnm-UbZjyZL01APX6JwWNERV0wYZnjidayHG9bj7AFWhFo0NyYw%3D%3D&utm_campaign=Revue%20newsletter&utm_medium=Newsletter&utm_source=Coding%20Insights%20from%20Scientists
16:50:08
Xach
scymtym_: Ok. I think I will think that it is superfluous for now, but am open to persuasion otherwise.
16:51:01
Xach
My thinking today is that package-local nicknames must be implemented without adding any new packages or functions, only new arguments and return values to standard functions, if they are to be really useful. No compatibility layers.
16:51:33
Xach
package-local nicknames are in a good place among theoretical extensions to be done that way
16:52:01
vtomole
How big do your function definitions need to be before you need to break it into helper functions? Is there a general rule or is it up to the programmer?
16:52:35
beach
vtomole: A good heuristic is that the function must fit on a screen so that it can be read entirely by the maintainer.
16:53:28
scymtym_
Xach: i assume the overwhelming majority of cases would only involve the :LOCAL-NICKNAMES option to DEFPACKAGE
16:53:32
TMA
vtomole: other than that, if you find yourself asking 'shall I split this?' you probably should
16:53:41
schweers
I can’t help but wonder why it is so often brought up with lisp. This should probably be done in lesser languages too.
16:54:13
Xach
scymtym_: but that must also carry over into make-package, find-package, rename-package, and package-nicknames.
16:54:57
vtomole
https://github.com/robert-strandh/SICL/blob/master/Code/Reader/Fast/read.lisp read-upcase-downcase-preserve-decimal is huge here. I know there are always exceptions.
16:55:35
scymtym_
Xach: of course, but wouldn't those mostly change behavior without changing signatures?
16:58:15
scymtym_
Xach: oh, are you suggesting all information (e.g. the local nicknames established by a package) should be available without adding new functions?
16:58:37
Xach
one possibility: make-package needs :local-nicknames, find-package needs :global as a new argument and a new secondary value indicating local vs global, rename-package needs a second optional value, and package-nicknames needs a :local argument
16:59:35
beach
vtomole: In this particular case, I only recently decided that I wasn't going to pursue this direction.
17:26:40
sigjuice
I have several versions of alexandria in ~/quicklisp/dists/quicklisp/software from continued use of (ql:update-dist "quicklisp"). How does quicklisp know which one to use?
17:27:08
Xach
sigjuice: you can remove the old copies with (ql-dist:clean (ql-dist:dist "quicklisp"))
23:10:13
Shinmera
My slide show app is coming along. https://www.youtube.com/watch?v=bB0BlN8ORiA&feature=youtu.be
23:25:29
hjudt
are there any best practices naming accessors? if i have a class "box" with a slot "id", should i call the accessor box-id or simply id? is there any advantage doing the former?
23:31:39
Xach
hjudt: I find it useful to think of the protocol of generic functions first, and then use defclass to fill in the easy blanks of specific methods. in that context it doesn't make sense to name the generic functions with the class name (usually).
0:24:23
didi
Wonder: Why isn't the syntax of `let' the same of `setf'? i.e. (let (a a-value b b-value) ...)
0:26:11
fiddlerwoaroof
didi: clpjure does that, it's a bit annoying because it's more difficult to delete a binding/value pair
0:29:09
fiddlerwoaroof
I have actually experimented with writing a wrapper macro for setf that looks like (setf* (a a-value) (b b-value))
0:31:09
Bike
i don't think there's much particular reason either way. of course, if you do write a let like that it's short for ((a nil) (a-value nil) (b nil) (b-value nil))
0:34:08
fiddlerwoaroof
didi: it's nice, but I'm always hesitant to introduce new things for such a trivial reason
0:50:49
Zhivago
I think the savings with setf are minimal -- with let it makes more sense since it would otherwise introduce one scope per variable.