freenode/lisp - IRC Chatlog
Search
18:37:42
aeth
ralt: yes, and then you can write something like this: (apply #'path-from-dir (funcall lookup-function) (append (if org-name (list org-name)) (list app-name)))
18:38:57
aeth
ralt: that should get you "professional" looking usage of ~/.local/share/ (or whatever the #'xdg-data-home happens to be configured as) where it's ~/.local/share/your-organization/your-app/ or ~/.local/share/your-app/
18:42:15
aeth
(In that case, #'path-from-dir is in turn just a trivial wrapper over uiop:merge-pathnames*)
19:05:37
aeth
ralt: doing (uiop:xdg-data-home #P"foo" #P"bar") I get ~/.local/share/bar rather than ~/.local/share/foo/bar
19:08:26
aeth
ralt: You also need to reverse the order, since the optional part (the parent directory) comes first.
19:09:19
aeth
What I mean is, you want to input "bar" "foo" or "bar" NIL and get #P"foo/" #P"bar/" or #P"bar/"
19:13:13
ralt
#p"foo" is a pathname that represents a file, so when you try to use it and don't get it as part of a folder... that's expected
19:14:05
aeth
ralt: This is slightly improved: (apply lookup-function (append (if org-name (list (uiop:make-pathname* :directory `(:relative ,org-name))) nil) (list (uiop:make-pathname* :directory `(:relative ,app-name)))))
19:18:50
aeth
i.e. (funcall lookup-function (make-pathname* :directory `(:relative ,@(if org-name (list org-name) nil) ,app-name)))
19:39:04
aeth
This should be simple enough... maybe I should move it to my utils: https://gitlab.com/zombie-raptor/zombie-raptor/-/blob/e50f8366e2ec24258a436fa8f4b2ec0f7627fc6e/data/data-path.lisp
1:05:18
charles`
Can someone help me understand ~/.cache/common-lisp/ ? Does that allow me to compile a system once, then next time I load it, asdf will just load the already compiled version?
1:20:32
charles`
So should I be able to use quicklisp to install a system, then restart lisp, then load using asdf without quicklisp or recompilation?
1:22:07
aeth
For the most part, Quicklisp is used because it will download something if it hasn't already been download it.
1:22:42
Xach
charles`: if you don't load quicklisp at all, it's possible that the directory it's found in is not known to asdf, and it won't necessarily load
1:26:54
charles`
Do I need to configure asdf to look at ~/.cache to find them? is ~/.cache an asdf thing or quicklisp thing. I can't find ~/.cache in asdf manual
1:29:45
aeth
It should be something along the lines of (uiop:merge-pathnames* #P"common-lisp/" (uiop:xdg-config-home))
1:31:51
charles`
If my compiled files are in cache, why does asdf still need quicklisp to find them? It can find the main project, but can't find the systems that were pulled in by quicklisp (but are still in cache)
1:32:39
aeth
charles`: My guess is Quicklisp adds some directories, like ~/quicklisp/local-projects/, that aren't default directories in ASDF.
1:33:57
Xach
Finding systems to load, and loading their cached compiled fasls, are very distinct operations.
1:35:31
Xach
charles`: yes, but there are exceptions there too, like monofasls. that gets into some territory i don't know much about.
1:37:09
Alfr
charles`, you'll likely also need to keep whole system around, e.g. sbcl will refuse to load fasls not output with the exact same build.
1:44:08
Alfr
charles`, you want monolithic-compile-bundle-op I think. You can also dump a (executable) image of a loaded system, if you prefer that.
2:21:03
dbotton
What is the term used in the Lisp world for an interface in lisp for a c api? In the Ada world we call it a binding for example a binding to the win32 api.
2:23:37
Alfr
dbotton, also called a foreign function interface, covering more than only functions though.
2:24:28
dbotton
Xach what is considered the appropriate level of stability for a project to be in quickslip?
2:25:11
Xach
i do not reject anything on quality or maturity or stability grounds. if you want it to be part of quicklisp, and it builds, it will very likely become part of quicklisp.
2:28:56
Xach
if it's really hard for me to install prerequisite foreign libraries that can be a stumbling block
2:30:23
dbotton
Since it is a "live" connection to a browser window (or a browser control say in an Xcode project on Mac etc)
2:32:46
dbotton
http://office.botton.com:8080 wrote a game demo I have up for the moment - all code is LISP not html or javascript
2:48:20
dbotton
A number of factors push Ada to just be a very very niche "product" so despite my love of the language that bought me here
3:14:38
dbotton
Working well in my tests so far, clog-connections is fairly decoupled, so should be easy to switch
3:30:27
dbotton
You should already with what is there in the CLOG project be able to write a Web App, use ecl to embedded in an Android app and iOS using a browser control, then use sbcl or another to take the same app and embed in an Xcode project, and MS new app whatever they call them this month, and a GTK app with a webkit window on Linux.
3:53:47
moon-child
if you just want everything in a vector: (with-open-file (fp fn :direction :input :if-does-not-exist :error :element-type '(unsigned-byte 8)) (let ((buf (make-array (file-length fp) :element-type '(unsigned-byte 8)))) (read-sequence buf fp) buf))
3:54:38
loke[m]
moon-child: What you said is correct, but the idea of using FILE-LENGTH to determine the amount of data to read is problematic.
4:00:43
moon-child
loke[m]: what's wrong with using file-length for that purpose? And what would be better?
4:02:25
loke[m]
You can use FILE-LENGTH to determine the initial size of the array, then make the array adjustable, and read until there is nothing else to read.
4:10:57
Oladon
In case anyone has lost the unlocking devices for their automobile, I just found them in my code. :)
5:07:15
asarch
I'm doing a small web server with Caveman2 in order to send files from my cellphone to my laptop, and in the POST request, the content of the file is a type of RAW-BODY: #<CIRCULAR-STREAMS:CIRCULAR-INPUT-STREAM {1007C409E3}>, how could I send it to a WRITE-SEQUENCE?
5:20:23
loke[m]
If you want to copy an input stream to an output stream, you can use UIOP:COPY-STREAM-TO-STREAM.
6:03:22
v3ga
so are sly-stickers useful when debugging? or whats the best way to go about stepping through a function or procedure with sbcl/sly?
6:06:03
charles`
then it will break when it reaches your sticker without having to add (break) and recompile
6:08:49
v3ga
charles`: ahh ok, I see now. that's how they're used... ok i'll write something longer and play with it
6:09:22
charles`
I really wish you could start single stepping after encountering a break, but I haven't figured that out yet
6:13:34
v3ga
also with step....i'm using the gentle introduction to symbolic comp book. they're using a different lisp implementation but surrounding a function with (step ...) doesn't give the same feedback as the book.
6:16:40
v3ga
yeah i do get that much, maybe i'm misinterpreting what the book shows. i was expecting even for this small function for it to go through each bit. ah well. it's late, maybe i'm senile for the night