libera/#commonlisp - IRC Chatlog
Search
16:33:20
nij-
Anyone uses parenscript? While it supports some lisp constructs (e.g. let, defun, loop), it misses some too (e.g. mapc, mapcar). Is there a way to extend parenscript to support those without hacking the code base?
16:46:16
phoe
(parenscript:ps (defun mapcar (function list) (loop for element in list collect (funcall function element))) (mapcar (lambda (x) (+ x 10)) '(1 2 3)))
16:52:36
josrr
ACTION nij-: there is the runtime library https://parenscript.common-lisp.dev/reference.html#section-runtime-library
17:10:09
nij-
Well.. the lib only contains 7 functions. I suppose I need to write some of the ones i like.
17:25:51
foxfromabyss
hi! is it possible to get something like `:a :b` as a result of a macro expansion, is opposed to `(:a :b)` ?
17:32:57
beach
Unfortunately I can't stick around. I need to go fix dinner for my (admittedly small) family. Sorry.
17:33:14
foxfromabyss
`(splice-into-outer (x y z)` `=>` `:x x :y y :z z`, where the keys have the same name as the variables, and it supports multiple variables
17:34:21
phoe
in particular, something like (list 1 (foo) 3) then this is always a list of length 3 - (FOO) can only expand to a single Lisp value
17:36:22
phoe
doesn't jsown have some sort of semiautomated facility to turn json objects into CL instances?
17:37:15
Josh_2
foxfromabyss: you do not need to remove the list from (:x x ..) you can simply use (apply #'make-instance <your plist>)
17:38:11
Josh_2
(apply #'make-instance '%api-call-failure '(:object 1 :processor 1 :hash 1 :c 1)) => <%API-CALL-FAILURE {1008694863}>
18:37:17
foxfromabyss
`(apply #'make-instance 'testobj (:x 5))` this fails with `:x` being an undefined function
18:37:18
foxfromabyss
i can quote it it this example, but if i do smth like `(apply #'make-instance 'testobj (get-values-for-x))`, i can't quote the values for `apply` :(
18:40:42
Xach
Someone keeps emailing me questions about Vecto and fonts, but their email box is full and my replies keep getting held up :(
18:40:42
skeemer
what common lisp library do you suggest to plot stuff... i need something similar to matplotlib, or ggplot
19:17:16
edgar-rft
skeemer: I usually write gnuplot data into a file and then use gnuplot from the commandline, but here are some other alternatives -> https://www.cliki.net/plotting
19:32:05
phoe
literate programming time - https://github.com/phoe/articles/blob/main/2022-01-29-static-let/static-let.md
19:37:25
White_Flame
isn't literate programming usually about being documentation with code interspersed?
19:40:08
phoe
White_Flame: I think it is - I kind of abuse this idea to also include stuff that teaches writing Lisp in general
19:51:23
moon-child
phoe: 'we did not supply the second argument to LOAD-TIME-VALUE, which creates constant data' I think this would be clearer as 'we did not supply a second argument to LOAD-TIME-VALUE, which lets us create constant data'
19:52:23
moon-child
I'm also not sure if the use of the uninterned symbol clarifies or obscures intent. Depends on your audience, probably, but
22:39:01
phoe
flip214: https://github.com/armedbear/abcl/issues/433 looks like Alexandria might need to adjust its TYPE= tests for cases where one SUBTYPEP returns T T and the inverse SUBTYPEP returns NIL NIL
0:06:09
etimmons
Shinmera: trivial gray streams has file-position, and I'm pretty sure it works on most implementations
2:49:32
Guest74
is there a way to add/view documentation for a specific method of a generic function?
3:00:32
dbotton
if there a popular library for doing text templates? I am looking to generate "scaffolding" for projects, ie. an asdf file, some basic lisp files, etc. much of which a simple replace of some symbol would do.
3:01:48
White_Flame
it would be nice if backquoted forms could be passed around, but they can't. You could use a macro for an active template
3:03:52
dbotton
The idea is to have a set of files and just replace some text in each and write them out to some directory
3:04:11
Guest74
I don't see how typing out exactly what the page says is any help when I said I don't understand what is on the page.
3:04:47
mfiano
Common Lisp is a class-based language. If you don't know the function for getting a method instance, it is find-method
3:05:07
mfiano
I'm sorry, but I can't write code for you right now. Those are the signatures you need.
3:05:18
EdLangley[m]
I’m not at my laptop at the moment, and the details here are implementation-dependent
3:05:31
White_Flame
dbotton: here's a functional, short, but janky way of using backquotes: https://plaster.tymoon.eu/view/2898#2898
3:07:35
White_Flame
there's really no difference in having that sort of literal backquoted form, and a macro body I guess
3:08:48
EdLangley[m]
But, if you’re generating lisp source it’d be better to take advantage of lisp’s builtin templating mechanisms.
3:10:51
EdLangley[m]
(let ((*print-case* :downcase)) (pprint `(asdf:defsystem ,name . . .) *file-stream*))
3:23:49
mfiano
I was about to direct them to #clschool. I can't remember all the guests that come here.
3:55:18
dbotton
Is there a simple tutorial on presentations in CLIM/McCLIM around? Something very practical?
3:57:58
beach
dbotton: But most participants are probably still asleep, and jackdaniel is not quite well yet, perhaps.
3:59:21
mfiano
beach: Do you think it is worth reading for an experienced Common Lisper? I am getting the vibe that it was Symbolics marketing for what OOP should be, and I'm unsure if I would learn anything from it.,
4:00:41
beach
If you already use CLOS, then probably no. And I didn't much like the book, mainly because the (in my opinion) badly chosen examples.
4:03:43
beach
mfiano: I read the Keene book and didn't understand much of how to use CLOS. Then I read the CLIM II specification, and I understood a lot more.