freenode/#lisp - IRC Chatlog
Search
23:04:15
Bike
seeing systems t hat define sequence methods beyond the core and iteration protocol would be interesting. if anyone happens to know any. if they even exist
23:09:27
jasom
Does CFFI have a type for a function pointer, or does it just assume that function pointers and data pointers are compatible?
23:35:00
_death
seems I got it working.. (bar (list 'a '(1 2 3 4))) => (A (4 3 2 1)) (with bar returning a foo with reversed array contents)
23:40:28
_death
I see some cffi tests failing, but it seems some unmodified cffi tests are failing as well
0:50:10
no-defun-allowed
Means the CR in CRLF isn't being handled as part of the newline separator somewhere.
0:53:25
pilne
I recently had to go back to windows for various reasons, and portacle has been a blessing so far
2:06:12
sjl
In hindsight, this (for ... matching ...) iterate driver may have been overkill, but at least it'll help make advent of code input parsing less tedious https://hg.sr.ht/~sjl/cl-losh/browse/default/src/iterate.lisp#L890
2:11:58
_death
sjl: last year I started writing utilities for AoC as well.. since I don't like to use regular expressions in code, back in 2018 I came up with this: https://gist.github.com/death/4ed89bf10404f5c71f1fb8f2a95a0f13
2:12:46
_death
incidentally, "slhelper" stands for "(Santa|Satan)'s Little Helpers" .. regexes in names are fine :)
2:18:43
_death
btw I found another bug, this time in cffi-libffi.. (defcfun foo :string) will try to foreign-string-to-lisp the pointer to the string pointer instead of the string pointer itself... other types may also have this issue, but I fixed it for foreign-string-type at least
2:21:46
_death
LdBeth: yes, a C string is a pointer to char.. cffi type :string automatically converts between foreign and lisp strings
2:32:29
pjb
LdBeth: I use (merge-pathnames (make-pathname :directory '(:relative) :name "ccl-init" :type "lisp") (user-homedir-pathname)) so it works everywhere!
2:34:35
pjb
LdBeth: a string is a vector of character. It's way more sophisticated than what C proposes.
2:35:19
no-defun-allowed
'<char>' is just syntactic sugar for the integer with the same value as the character's codepoint.
4:57:38
White_Flame
is there some sort of asdf extension out there that lets you place dependencies inside the individual .lisp files instead of in the .asd?
5:58:16
anlsh
When I do (ql:quickload :alexandria) I get the following error: The name "ALEXANDRIA.1.0.0" does not designate any package.
6:41:07
no-defun-allowed
ACTION waits for fully inferred systems, where hypothetically any time an undefined variable or function is used, its definition is searched for and the file containing its definition is loaded
8:22:40
beach
You would have to do it yourself, like (unwind-protect ... (let ((old (fdefinition ...))) (setf (fdefinition ...) #'...) etc.
8:32:34
reepca
aye, just a little tedious to go around swapping out (read-byte ...) with (funcall *read-byte* ...) because I didn't read and memorize the full spec before I started writing
8:33:22
Shinmera
also, it seems to me that you would very likely be better off with GFs than dynamically bound functions.
8:33:51
Shinmera
as in, define the generic function protocol, then pass around the object that implements it.
8:33:58
anlsh
How do I get frame restarts working in sly/slime? Every time I press the "r" key I just get a message about the frame being compiled, and I'm not sure what to change to fix that
8:35:24
reepca
does it work to have a generic function with the same name as an existing CL function?
8:37:55
specbot
Constraints on the COMMON-LISP Package for Conforming Programs: http://www.lispworks.com/reference/HyperSpec/Body/11_abab.htm
9:10:17
pjb
reepca: (defvar *foo*) (defun foo (&rest args) (apply *foo* args)) (defun g () (foo 1 2 3)) (let ((*foo* (lambda (&rest args) (reduce '+ args)))) (g)) #| --> 6 |#
9:10:41
ck_
Shinmera: you're running irclog.tymoon.eu, is that right? Are you open to a small feature request?
9:11:55
ck_
I'd sometimes like to switch channels at or around the timestamp I'm currently looking at
9:14:21
pjb
White_Flame: it has probably bit-rotten a little, since I don't use it anymore. Putting dependencies in asd files is better.
9:14:34
Shinmera
I could maybe turn the channel header into an option list instead to do the switching. I'll think about it.
9:14:45
ck_
well, the first thing I looked for was a time input field at the channel view, to navigate to a point in history that way. I'll just add a bookmarklet to get there quicker
9:14:50
pjb
White_Flame: but the principle applies: scan the files to build the dependencies yourself, and generate an asd file.
9:15:42
Shinmera
ck_: The software running is open source too, so if you have time you could have a go at fixing it yourself. https://github.com/shirakumo/chatlog
9:17:18
Shinmera
Time input did exist in a previous version, but it became too cluttered, especially for mobile, so I removed it in the streamlining process.