freenode/#lisp - IRC Chatlog
Search
19:51:16
White_Flame
dbotton: btw, uoip is a part of asdf, so if you're loading via asdf, you shouldn't have to check if it's there
19:53:29
Xach
having uiop does not mean the things you may want to run will be present and run, though.
19:54:24
White_Flame
oh, I thought the implication was testing if uiop was present, might have misread
23:01:40
didi
People, people. Hear me: use `with-standard-io-syntax' when printing sexps to a file and save yourself from the pain.
1:26:15
nij
Reading let over lambda, which refers to assembly code every now and then. Any suggestion on getting started with the minimal amount of assembly, so i can enjoy LOL more? :-) thanks!
1:27:20
pfdietz
Xach: yes, a standalone library for LZW. The use case is compressive similarity of strings.
1:28:23
pfdietz
That is, you can estimate how similar two strings are by knowing how much compressing one helps you compress the other.
3:02:15
Nilby
Is calling your unpublished package something like com.flipper-zapper.floop really the only way avoid future clashes? Or is there a better way?
3:14:12
Nilby
I like package-local-nicknames, but it seems I still have rename every existing package to have those long names.
3:40:31
ldb
Nilby: I think it is supposed that while the package author gives a long name, a nickname should also be given
3:44:32
azrazalea
I know i've done this before but i'm blanking on how. I want to create a macro that defines a new class then stores some extra metadata on the class definition symbol (not on the instance). Essentially extra named documentation. Then later retrieve that metadata elsewhere in my program. It's been too long, can someone point me to the docs I need to review for this? I'm struggling to find it.
3:46:53
Nilby
ldb: Hmmm. I guess one can suggest a package-local-nickname in documentation. But a regular nickname can't clash either.
3:48:17
azrazalea
ldb: Once I have the symbol yes, but classes are in a different symbol namespace right? Sorry if terms are wrong, it has been a couple years
3:49:46
Nilby
azrazalea: You could always look up the extra doc in a hash table of the class name symbols. Otherwise you might have to do something more complicated like subclassing standard-object.
3:58:22
Nilby
I always forget about symbol-plists. It's even easier than the hash table way: (setf (get 'boo :extra-doc) "This is cool.") (get 'boo :extra-doc)
3:58:55
azrazalea
Yeah, that's what I'm aiming for but I'm missing something to get the symbol for the class definition and it's probably something obvious lol
6:22:14
asarch
(setf value (or (foo) "Not defined")) <- How can I test (foo) in order that, if "" then the value would be "Not defined"?
6:31:51
Nilby
How about (let ((foo (foo))) (if (or (null foo) (zerop (length foo))) "Not defined" foo))
6:40:50
Nilby
If you don't mind calling (foo) twice, you can just say: (if (zerop (length (foo))) "Not defined" (foo))
7:05:23
azrazalea
I feel like such a beginner again after so long. So I got my whole metadata thing working and everything but now I'm getting an error on my generic function call where it says that there isn't a method specializing with the arguments given but as far as I can tell there is! See sly debug screenshots here: https://imgur.com/a/WZ3PAyA. I am confused. My guess is I'm doing something wrong with how I have my packages setup.
7:06:44
azrazalea
https://gitlab.com/azrazalea/lair-bot/-/tree/commands-refactor is the code, specifically https://gitlab.com/azrazalea/lair-bot/-/blob/commands-refactor/src/main.lisp#L118 for the function call, and https://gitlab.com/azrazalea/lair-bot/-/blob/commands-refactor/src/commands/ping.lisp#L12 for the implementation
7:09:38
azrazalea
Unless I'm reading the output wrong, in the sly debug screenshots the 4th arg is "ping" but it has it on the same line as the 3rd arg
7:10:57
azrazalea
The second half of the second screenshot is the specialization list for the method I am trying to call
7:11:57
azrazalea
My best guess is I somehow have my packages messed up to where my function call isn't "seeing" the defined methods properly
7:19:02
Nilby
It seems correct, so maybe the types got out of sync due to dependencies? Does a re-load of the whole thing help?
7:22:58
Nilby
I'm not really familiar with defmethod*, but could it be somehow specializing on the :void return value?
7:23:31
azrazalea
Yeah, I should probably remove defstar as a potential issue let me try that (and I did reload everything a couple times)
7:27:09
azrazalea
I'm passing the class definition object of my command, not an instance of my command. Duh. Sleepy me
7:32:20
Nilby
Sometimes I wish every project would list the flattened indirect dependencies. It's good to know before you quickload.
7:34:39
Nilby
Nice. It took me writing a dependency viewer before I could figure that out for myself.
7:35:02
azrazalea
I used (remove-duplicates (mapcar #'ql-dist:short-description (flatten (append (ql-dist:dependency-tree :lispcord) (ql-dist:dependency-tree :str) (ql-dist:dependency-tree :local-time) (ql-dist:dependency-tree :defstar) (ql-dist:dependency-tree :iterate)))))
7:37:26
azrazalea
It is one of those things that I technically did for myself but then put in the readme because it is also useful for users.
7:39:18
azrazalea
Sadly it works through quicklisp not asdf so unless your project is on quicklisp you have to do it like I did above