freenode/lisp - IRC Chatlog
Search
6:07:21
jeosol
Hi beach. Been a while. Hope you are doing well with all this pandemic stuff going on.
6:08:36
jeosol
side topic: As I am learning french, I was able to follow some French debat regarding chloroquinine use. Interesting how the french debate on TV.
6:11:22
jeosol
Regarding CL, I wanted to discuss merits of different ways of organizing defmethods. I recently updated to SBCL 2.0.3 and noticed some errors that were not caught with previous version. It was mainly package errors where I am implement a defmethod for class a file but prefaced with the package name where the defgeneric is defined.
6:39:05
jeosol
I think there was an issue loading my systems. Before the recent changes, I was referencing some functions via the package names in some other files (I know bad design) and it complained about that. In another case (my question) above, my defmethods are scattered across several files
6:41:54
jeosol
And a system that needed a specific defmethod (specialized on eql) could not be found
6:42:43
beach
There is nothing bad about having different methods defined in different files and different packages.
6:42:55
jeosol
It was my fault not SBCL's. except that it wasn't caught in the previous version. Perhaps I need another tutorial
6:43:22
jeosol
beach: I agree, that's the functionality I used through my project. It helps me keeps better separated.
6:45:28
jeosol
As things get larger and larger, I think I am not doing a good job with my system loading. It's probably getting sloppier.
6:46:18
jeosol
I had a discussion with Fare about extracting ASDF dependency graph with POIU but he said it will some amount work to do that.
7:35:30
hajovonta
From a macro, I need to generate something like this: (mypackage::foo param1 param2)
7:37:36
phoe
hajovonta: in the worst case, `(,(or (find-symbol "FOO" "MYPACKAGE") (error "Macro error - symbol not found")) param1 param2)
7:39:59
hajovonta
the problem is when I'm (in-package) and run the macro from there, I lose the package qualifier
7:43:27
phoe
then you either need to print from a package that has an empty :USE or create your own printer
7:43:52
phoe
the former hack causes all symbols to be explicitly qualified, which should be enough for symbols
7:44:29
phoe
(defpackage #:my-print-package (:use)) (let ((*package* (find-package #:my-print-package))) (print-stuff-to-string))
7:49:24
phoe
Krystof: is that the proper page? this one only mentions keywords in context of printing them with a preceding colon, so :FOO instead of KEYWORD:FOO
7:49:56
Krystof
if the keyword package is the current package, normally you would print a keyword without a package prefix
7:50:35
Krystof
so without that special-case you can't use the keyword package to guarantee readable package prefixes on all symbols; with it, you can
9:19:35
splittist
Any suggestions for lisp-related papers to read while the ACM library is free to access?
9:24:19
aeth
splittist: You might want to ask in #scheme (for Schmes) and ##lisp (for all the Lisps) because a lot of the papers wouldn't be specific to Common Lisp.
9:54:18
phoe
White_Flame: "/pub/garbage on cs.utexas.edu holds papers about garbage collection, persistence, and memory hierarchy implementation."
10:06:25
no-defun-allowed
If they interleave that with actually useful work (provided they don't study memory management for work), it might be incremental.
11:21:51
phoe
Is there a portability library that defines a common condition type for errors signaled by no-applicable-method?
11:22:46
phoe
or should I write my own method for #'no-applicable-method and signal my own error if I want it?
12:47:25
dokma
How do I alter (add-hook 'cuda-mode-hook 'linum-mode) to set linum-mode to relative ??
12:55:35
splittist
dokma: (serapeum:add-hook hook fun &key append) . You can see the implementation here: https://github.com/ruricolist/serapeum/blob/64f0c4a161bbbda7c275012ca1415b4293b9e169/hooks.lisp#L6 . Or it could be - and has been - implemented in CL many different ways.
12:58:59
scymtym
dokma: common lisp has the builtin macroexpand hook which works differently compared to emacs' concept of hooks. there are libraries for hooks in common lisp as pointed out by splittist. the emacs lisp code you are looking for might be (add-hook 'cuda-mode-hook (lambda () (display-line-numbers-mode 1) (setf display-line-numbers 'relative)))
14:27:15
phoe
There was a slime command that evaluated an expression and inserted the eval result next to it. What was it?
15:29:20
sabrac
why does ironclad:prng-random-data open /dev/urandom and never provide a way to close it? Or am I missing something?
15:38:10
_death
a common criticism of /dev/urandom is that it can become unavailable when there are no file descriptors available
15:38:33
sabrac
stress testing an update to postmodern triggered a "too many open files to /dev/urandom" error. And it became unavailable as you just said.
15:41:05
sabrac
Yes. If I do not, I trigger another error claiming a private thread violation. Still trying to figure that one out.
15:41:24
_death
indeed the code in that file looks a bit strange, since it creates one for each thread :/
16:00:28
_death
(I believe it's safe for multiple threads to read from the same urandom fd.. see also https://stackoverflow.com/questions/12245054/linux-3-5-safe-to-read2-from-same-fd-open2-dev-urandom-from-multiple )