libera/commonlisp - IRC Chatlog
Search
21:49:38
prxq
you really notice the different in finish quality between our libs and, say, python libs. There are some very good lisp libraries but the density of buggy ones is definitively higher with CL than with Python.
21:52:56
aeth
on the other hand, Python has exactly the same issue that I just described because duck typing is Pythonic
22:29:57
fiddlerwoaroof
I dunno, I tend to find Lisp libraries higher quality than the typical library in other languages
22:33:17
aeth
But everyone seems to make the decision of no CHECK-TYPEs for you. Few packages export their custom type/class names.
22:35:53
aeth
but any string can just become a reader macro instead if you want to really annoy people and break all tools
22:56:04
cpli
_death i plan to use it specifically to `(when-let (key (remove-wrap "+key_" "+" sym)) ;...`
23:15:17
cpli
_death this is actually to `do-symbols` and generate a `case` to convert between (c enum) constants in a package and keywords
23:17:52
cpli
basically the `#:libevdev` package contains many `+key_<name>+` and i want a very long case statement which converts by `(case evdev-key-code (libevdev:+key_a+ :a) (libevdev:+key_b+ :b) #|...|# (libevdev:+key_<name>+ :<name>) ;...`
23:28:20
_death
you could also have some procedural code that checks if it's a symbol belonging to the libevdev package and its name having the right form and if so translate it on the fly
5:50:54
cpli
_death ~512 cases, right here: https://git.sr.ht/~cpli/clayboard/tree/dev/item/claybd/device.lisp#L24-32
8:18:37
cpli
i don't know why there even is a different macro for LET* if it makes LET entirely superfluous
8:24:58
hayley
LET provides "parallel" evaluation. Not as in that the values of the bound variables are produced in parallel, but that they don't observe each other.
8:25:04
beach
It doesn't make LET superfluous. You might want something like (LET ((X ...) (Y (F X))) to make X refer to an outer binding.
8:26:05
beach
cpli: But for this particular case, i.e., when the initform in a binding refers to a variable in a previous binding, LET* is the thing to use.
8:35:02
hayley
(We only have LET and LETREC in the system I'm co-designing; the latter behaves "close enough", except for when it doesn't, of course.)