freenode/#lisp - IRC Chatlog
Search
13:27:07
pjb
phoe: it's probably valid: find-method searches then for an EQL specifier with those cons objects. Not found -> NIL. :errorp t -> error.
13:31:08
pjb
(find-method #'print-object '() (list (list (find-class t)) (list (find-class t)))) is a valid call, you're looking for 2 EQL specializers.
13:31:30
pjb
(find-method #'print-object '() (list (list (find-class t)) (list (find-class t)))) #| ERROR: Unknown specializer form (#<built-in-class t>) |#
13:34:30
pjb
So yes, (find-method #'print-object '() (list (list (find-class t)) (list (find-class t)))) is not valid.
13:34:35
pjb
(find-method #'print-object '() (list (list (find-class t)) (list (find-class t)))) #| ERROR: Unknown specializer form (#<built-in-class t>) |#
13:38:02
pjb
phoe: congratulation, you found a sbcl bug. Post an ISSUE if there's not already one about it! ;-)
14:18:10
jmercouris
hi everyone, I'm trying to do something like the following: https://pastebin.com/uArY7zFn
14:18:49
jmercouris
however, I can't see how to do it without writing a recursive function to traverse the sexp and evaluate whatever sexp has a car of :raw
14:19:43
jmercouris
I'm trying to generate elisp code, where I can put raw Common Lisp that will evaluate to some value
14:23:21
phoe
(subst "https://foo/bar" '(:RAW URL) '(PROGN (IF T (PRINT (:RAW URL)) (PRINT "false"))) :test #'equal)
14:24:42
jmercouris
I'm used to the term backtick, I'll have to remember its called backquote in those context, thanks
14:28:11
jcowan
pjb: Your argument (like many of your arguments) proves too much. CL programs that use threads or sockets are commonplace. Using a shim library makes them reasonably portable, but you are still "at the mercy of the implementers" in the sense that any or indeed all of them could remove either functionality next week.
14:28:51
jcowan
There is a difference between non-standardized behavior and undocumented behavior. My author is not proposing to rely on the latter in any way.
14:31:04
_death
I suppose some elisp syntax won't fit so well.. so you could use CL syntax and use an elisp pprint dispatch table
14:43:07
_death
if you want to generate and pretty print code, you should get to know the pretty printer a bit better.. I recommend the hyperspec and chapter 27 in CLtL2.. perhaps also Waters's Lisp Pointers articles
15:10:21
jmercouris
what happens now is all functions are prefixed with the packge (NEXT::FUCNTION-NAME ...)
15:10:35
jmercouris
is there a way to avoid that? as obviously I want to be calling some elisp, where the next package doesn't exist
15:11:09
jmercouris
for example `(youtube-dl-url ,url) --> (PROGN ('NEXT::YOUTUBE-DL-URL \"https://next.atlas.engineer/start\"))
15:19:23
jcowan
that's how various format ~ directives actually work: they rebind one of the printer's variables
15:43:17
specbot
Package Prefixes for Symbols: http://www.lispworks.com/reference/HyperSpec/Body/22_acca.htm
22:14:56
dim
if I (push :pgloader-image *features*) from a file where then I call sb-ext:save-lisp-and-die, should I expect the image built as a result to have #+pgloader-image?
22:34:04
dim
basically I want some handler-bind, lparallel:task-handler-bind and handler-case to act differently when in an interactive SLIME session and when in an image, to help me with debug facilities (empty condition handling) and to print something non-interactive when /usr/bin/pgloader is being used by a non CL developer
22:34:34
dim
seems I'm missing some things here and there still in the new save.lisp that I intend to use instead of buildapp when it's ready
23:52:11
sjl
Is there something like POSITION-IF that would give me a list of ALL positions that satisfy the predicate, instead of just the first?
23:52:26
sjl
(I can (already have) easily write my own, just wondering if there's something clever built-in I could use)
23:58:15
sjl
I think http://paste.stevelosh.com/8f7bed46c7fb4ca8bf8038741ed6f7e3bb4a6261 is probably good enough for what I need
0:18:03
verisimilitude
You can simply MAP the predicate and then have a SEQUENCE of where it does and doesn't aply, sjl.
0:19:03
verisimilitude
You could easily transform such a SEQUENCE into positional numbers or skip this intermediate step entirely.
0:21:14
sjl
Preferably it should use O(elements that satisfy the predicate) memory too, though I could live without that
0:21:52
sjl
Mapping the entire thing and transforming will allocate memory even for stuff that doesn't satisfy the predicate, which is a waste if only a couple of things do
0:23:51
verisimilitude
I write LOOP assuming COLLECTING is O(1), which any decent implementation would use.
0:24:36
sjl
But yeah, I'll just use my util function that I pasted earlier. It's efficient and works
0:24:44
verisimilitude
This is, again, just a basic implementation, of course; it works for what you want.
0:24:52
sjl
and it's not like I don't already have a giant utils library. what's one more function thrown on the pile