<dnhester26>
Hi, I'm trying to use a library that uses with-open-file and I'm passing it a pathname that I want a file to be created there. Why am I getting an error of "The path does not exist"? That's exactly what I want, for it to be created
<ixelp>
salza2/user.lisp at master · xach/salza2 · GitHub
<dnhester26>
That's the line of using with-open-file
<dnhester26>
I am passing it `(SALZA2:GZIP-FILE #P"static/hello.txt" #P"bin/cache/static/hello.txt")` which defaults to `(SALZA2:GZIP-FILE #P"static/hello.txt" #P"bin/cache/static/hello.txt" :IF-EXISTS :SUPERSEDE)` in the debugger
synaps3 has quit [Remote host closed the connection]
chomwitt has quit [Ping timeout: 252 seconds]
<dnhester26>
Figured out the issue, intermediate directories didn't exist. I had to wrap the pathname with a (uiop:ensure-pathname pathname :want-pathname T :ensure-dorectories-exist T)
puke has quit [Quit: WeeChat 3.8]
<Shinmera>
dnhester26: or without uiop: (ensure-directories-exist pathname)
<Shinmera>
(why does everyone try to use uiop for everything)
gilberth has joined #commonlisp
<Shinmera>
(don't answer that)
<dnhester26>
Shinmera: in my case I just don't know what the normal way of doing it is and since I'm dealing with the filesystem and I want to make it portable, I just thought to default to using whatever uiop provides. Though I am planning on using your https://shinmera.github.io/file-attributes/ for checking on when the files where modified in a portable way
<Shinmera>
as for portability, there's also pathname-utils and filesystem-utils
<Shinmera>
so many choices, hooray
yitzi has joined #commonlisp
jadzi has quit [Ping timeout: 252 seconds]
alcor has joined #commonlisp
NotThatRPG has joined #commonlisp
zlqrvx_ has quit [Ping timeout: 252 seconds]
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
mm007emko has quit [Ping timeout: 244 seconds]
<dnhester26>
haha thanks
lucasta has quit [Quit: Leaving]
<dnhester26>
what's the benefit of pathname-utils and filesystem-utils? smaller libraries instead of uiop?
mm007emko has joined #commonlisp
wacki has joined #commonlisp
zlqrvx has joined #commonlisp
yitzi has quit [Remote host closed the connection]
chomwitt has joined #commonlisp
vitez has joined #commonlisp
vitez_na_belom has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
younder has joined #commonlisp
mm007emko has quit [Ping timeout: 252 seconds]
vitez_na_belom has quit [Quit: Leaving]
vitez has quit [Quit: Leaving]
yitzi has joined #commonlisp
mm007emko has joined #commonlisp
chomwitt has quit [Ping timeout: 265 seconds]
mm007emko has quit [Ping timeout: 244 seconds]
amb007 has quit [Ping timeout: 246 seconds]
amb007 has joined #commonlisp
mgl has joined #commonlisp
awlygj has quit [Quit: leaving]
mm007emko has joined #commonlisp
yitzi has quit [Remote host closed the connection]
Akbar-Birbal has left #commonlisp [#commonlisp]
dnhester26 has joined #commonlisp
<kagevf_>
younder: you could use (push #p"your-path" asdf:*central-registry*) ... no emacs restart required. Also, note that *central-registry* is supposed to be deprecated? so there might be an even better way ...
kagevf_ is now known as kagevf
<Shinmera>
dnhester26: I don't like uiop much. They also have different feature sets
<dnhester26>
Shinmera: becuase it's too bloated?
<dnhester26>
I noticed you split the functionality into multiple systems instead
<Shinmera>
no, I just don't like the way it's written
<Shinmera>
fs-utils has a cffi dependency, which is why it's separate.
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
mm007emko has quit [Ping timeout: 246 seconds]
jonatack has joined #commonlisp
mm007emko has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
synaps3 has joined #commonlisp
jadzi has joined #commonlisp
overclucker_ has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #commonlisp
drewjose has quit [Ping timeout: 246 seconds]
overclucker has joined #commonlisp
drewjose has joined #commonlisp
<younder>
Well I notice Swank pushed several directories onto *central-registry* so if they remove it the whole Emacs integration would have to be rewritten.
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
<younder>
The important thing was contrib as well as slynk are required.
<younder>
Must say the whole startup process seems a bit -magical- to me. Me I'd build a Lisp server with the slynk code and bind to that. But sly gets around all of that.
<bike>
central registry is "deprecated" but too convenient. the sanctioned way to do it is to configure ASDF with the whole configuration DSL, or just put everything (or symlinks to everything) in the default directories.
shka has quit [Remote host closed the connection]
<alcor>
Uh, wait? When did asdf:*central-registry* get deprecated? Even ocicl uses that.
<bike>
i think asdf 2, which is several years old
shka has joined #commonlisp
<alcor>
The "sanctioned" way is as comfortable as punching a porcupine. We need something to put in our .sbclrc to tell asdf where to find project-local systems. Putting everything into the default directories or "using the configuration DSL" won't do here.
chomwitt has joined #commonlisp
<bike>
i'm not telling you to use the DSL. somebody mentioned the central registry being deprecated and i figured that ought to be elaborated on a little.
<bike>
that said, i think you can do whatever new configuration thing in your rc. not that i know how. central registry's way easier.
jadzi has quit [Ping timeout: 265 seconds]
<alcor>
Okay, I'm not sure the DSL supports dynamic lisp forms though. Fwiw I'm looking to replace (pushnew (uiop:getcwd) asdf:*central-registry* :test 'equalp) but https://asdf.common-lisp.dev/asdf/Configuration-DSL.html is not clear whether referring to the cwd is possible.
<bike>
which is just a function, so you can do whatever you want to construct that
aadcg has quit [Ping timeout: 255 seconds]
<bike>
looking at the docs, i think there's :here for the cwd, though it phrases it in terms of a configuration file rather than using initialize-source-registry
<bike>
i mean, that's not the shell cwd or anything, though
<bike>
oh, no, "(or *default-pathname-defaults*, if invoked interactively)", there you go then
<alcor>
I want it to also work non-interactively though :)
<alcor>
Would be mildly annoying if it only works in Swank/SLIME.
aadcg has joined #commonlisp
yitzi has joined #commonlisp
JuanDaugherty has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.4]
<alcor>
Unfortunately, (:source-registry (:directory :here) :inherit-configuration) does not work with ocicl+SLIME :(
puke has joined #commonlisp
attila_lendvai_ has joined #commonlisp
random-nick has quit [Ping timeout: 276 seconds]
attila_lendvai has quit [Ping timeout: 272 seconds]
mwnaylor has joined #commonlisp
mwnaylor` has joined #commonlisp
mwnaylor` has quit [Remote host closed the connection]
synaps3 has quit [Remote host closed the connection]
meaty has joined #commonlisp
random-nick has joined #commonlisp
<alcor>
OTOH, (asdf:initialize-source-registry (list :source-registry (list :directory (uiop:getcwd)) :inherit-configuration)) in ~/.sbclrc seems to work. Thanks bike!
<bike>
you are welcome
traxex has joined #commonlisp
synaps3 has joined #commonlisp
X-Scale has quit [Quit: Client closed]
aadcg has quit [Ping timeout: 252 seconds]
shka has quit [Ping timeout: 276 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
yitzi has quit [Remote host closed the connection]
attila_lendvai_ has quit [Ping timeout: 244 seconds]
paddymahoney has quit [Ping timeout: 248 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
paddymahoney has joined #commonlisp
<_death>
day has come to let github account go..
uhuh has joined #commonlisp
<bjorkintosh>
_death: are you announcing the death of github account?
<_death>
bjorkintosh: yes.. there won't be any activity on my part.. people are free to fork the projects etc.
synaps3 has quit [Remote host closed the connection]
<NotThatRPG>
jackdaniel: ping?
<NotThatRPG>
alcor: If you are still there: what do you mean "does not work with ocicl + SLIME"? In what way does it not work?
mgl has quit [Ping timeout: 255 seconds]
skeemer has quit [Ping timeout: 252 seconds]
<alcor>
NotThatRPG: ocicl is similar to npm in the sense that it saves per-project dependencies into a systems/ directory in the project root. ASDF must know about this so it can find the dependencies. A simple static ASDF configuration file in ~/.config/common-lisp/source-registry.conf won't work because the notion "current directory" or "project directory" is not defined in the ASDF DSL.
<alcor>
NotThatRPG: So if you want to avoid using the legacy asdf:*central-registry*, you need to construct the configuration at runtime in ~/.sbclrc and pass it to asdf:initialize-source-registry, like I did in my example above.
jonatack has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
alcor has quit [Ping timeout: 264 seconds]
mwnaylor has quit [Read error: Connection reset by peer]
mwnaylor has joined #commonlisp
<NotThatRPG>
alcor: So as bike pointed out, there's the `:here` directive to handle that problem. E.g., `(:source-registry (:tree :here) :inherit-configuration)`. :here should be interpreted relative to the file containing the configuration.
<NotThatRPG>
So if you stored a configuration file in the project root, that should work. I thought you said specifically it didn't work when `initialize-source-registry` was invoked from the REPL, and I was wondering what "didn't work" meant.
<NotThatRPG>
Did not do what you expected or encountered an error?
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonatack has quit [Read error: Connection reset by peer]