synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
brokkoli_origin has quit [Remote host closed the connection]
brokkoli_origin has joined #commonlisp
synchrom1 has joined #commonlisp
synchromesh has quit [Ping timeout: 246 seconds]
annamalai has quit [Ping timeout: 276 seconds]
<Bubblegumdrop>
How do you update your long running apps? package up a zip and restart the process?
Pixel_Outlaw has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
<beach>
Paul Graham apparently made a fortune by not having to restart long-running applications.
decweb has quit [Ping timeout: 248 seconds]
troojg has quit [Ping timeout: 245 seconds]
zwr has quit [Ping timeout: 252 seconds]
<jfloren_>
Can't figure out how to google this... if I have #P"/tmp/foo/bar.txt", how can I turn that into #P"/tmp/foo/"?
<aeth>
Bubblegumdrop: you have to make sure you can reload quickly to serialized state where everything relevant is saved
<aeth>
and that you can start up from a fresh start without issues
<jfloren_>
oops I misspoke, I'm not starting with #P"/tmp/foo/bar.txt", it's just a string "/tmp/foo/bar.txt"
<aeth>
Bubblegumdrop: on one extreme, you can have an image-based dev-in-prod recompile-function environment where there's no source code based source of truth at all, but that doesn't seem common in CL
mishoo has joined #commonlisp
<aeth>
Bubblegumdrop: But as to getting the thing there, the two most common ways are probably rsync (push to the server directly) or git (pull from a repo somewhere)
<aeth>
neither of which require you turn it into one compressed archive file first
<aeth>
When restarting, if saving everything to text and then loading it is too much (and you should save even when not restarting in case it goes down), then you need a proper database
<beach>
jfloren_: Try MAKE-PATHNAME.
<beach>
,(make-pathname :name "/tmp/foo")
<ixelp>
=> #P"\\/tmp\\/foo"
Pixel_Outlaw has quit [Quit: Leaving]
zwr has joined #commonlisp
<shawnw>
With CL, can't you just reload all the changed files without restarting?
<beach>
That's what Paul Graham did I think.
<beach>
You have to be a bit careful, of course.
<beach>
If some function changes its lambda list, then you had better make sure that there is not an existing executing function that calls it according to its old lambda list.
<beach>
jfloren_: Did that work?
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
<aeth>
In my personal experience, it's easier to restart than to keep a list in my head about the edge cases of an image-based system. In particular, calling a function that was renamed so it keeps calling the stale version instead of the new name.
<aeth>
In a system where you absolutely must not restart, you'd just have to alias names in that case, which would result in uglier code.
<aeth>
But there are a bunch of those things, not just calling a function that was renamed (which has some functionality change in addition to being renamed, perhaps prompting the rename).
<aeth>
You probably have to restart at least once a week/month/quarter/whatever for the kernel updates of the OS, anyway. The '90s cared less about security than today and all of the ways to patch an OS without rebooting don't seem to be active anymore? Maybe on some niche OS. Since it's all in VMs these days, you probably could come up with some Lisp-based OS that doesn't require restarting, but you'd have to
<aeth>
write that first.
<aeth>
I assume clouds have some way to migrate VMs without exposing that they themselves are doing kernel updates on the host so it would have a similar effect to never restarting.
<aeth>
But if you never restart, then you may find that your application doesn't actually work from a fresh start when the VM for some reason requires restarting, which will probably happen eventually.
<beach>
It really sucks that you have to restart your applications just because you update your operating system.
wacki has joined #commonlisp
mishoo has quit [Ping timeout: 260 seconds]
ftzm has joined #commonlisp
<beach>
aeth: Bubblegumdrop and jfloren_ must be so impressed by all the advice given that they don't know what to say.
rtypo has quit [Ping timeout: 246 seconds]
<jfloren_>
beach: sorry, had to step away from the computer
<jfloren_>
but... sorry, I guess my question wasn't very clear. Given a string, I want to treat it as a Unix filename and strip off the last component, the file, to get the directory which *contains* the specified file
amb007 has joined #commonlisp
<jfloren_>
More specifically, I'm getting a string pointing at an mp3 file: /media/Music/Artist/Album/Song.mp3, where of course the artist and album names are going to change, and I want to open "cover.jpg" in the same directory
<younder>
Cranking out that old cffi interface for a interface to kitty and that all spanking new graphics protocol for consoles.
meaty has quit [Ping timeout: 248 seconds]
<younder>
Ill support the sphinks protocol as well.
<younder>
Anyhow for all you terminal lovers oft there prepare to update from vt220 to vt340 or so.
gioyik has joined #commonlisp
decweb has joined #commonlisp
tfb has joined #commonlisp
<McParen>
younder: sounds interesting, can you give me a link to take a look at whatever youre doing there?
<younder>
not yet. Wait a week or so and I should have a working version.
<McParen>
no hurry
tfb has quit [Quit: died]
mishoo has joined #commonlisp
<Josh_2>
We do a little lisping
pranav has quit [Read error: Connection reset by peer]
McParen has left #commonlisp [#commonlisp]
<Josh_2>
:use just bit me in the arse
<Josh_2>
Why dont I listen :skull:
<Josh_2>
Retroactive :import-from is such a pita
<Josh_2>
SBCL needs a flag to stop the auto creation of generic functions when it runs into a defmethod :(
reb has quit [Remote host closed the connection]
yitzi has joined #commonlisp
<younder>
In truth the whole package system is fucked. We have just learned how to live with it.
<beach>
In what way is the package system bad?
<younder>
Common Lisp is a lisp " yeas so why does that package system pretend it is a lisp 1. I mean I export the variable 'whatever' as well as the function 'watever'
<beach>
You are essentially accusing the package system of not being a module system. But that does not mean the package system is bad, just that we still lack a module system.
<younder>
I'm not sure I understand the difference
<yitzi>
Just because CL lisp-2 (or whatever) does not mean there are different symbols. There is only one symbol and multiple "cells" for each symbol.
<yitzi>
s/CL lisp-2/CL is lisp-2/
<beach>
A package system handles symbols, but a module system handles precisely the objects you are referring to, i.e., functions, classes, etc.
<younder>
I get that but I want the function I export to be different from some local variable name
<beach>
younder: That's the role of a module system, which we don't have.
<beach>
younder: Check out first-class global environments. That's what they do.
<beach>
Maybe one day most Common Lisp implementations with support first-class global environments just as they now support package-local nicknames.
<younder>
Package local nicknames is one of life's small blessings. They make life a lot easier
<Josh_2>
I have never used PLN
<beach>
Josh_2: No wonder you have problems with :IMPORT-FROM.
<Josh_2>
True :joy:
<yitzi>
Obviously I'm in the minority, :use and :import-from should be exceedingly rare, and meh on PLNs.
<Josh_2>
How can :import-from be rare?
<beach>
I never use it myself.
<Josh_2>
Unless you explicitly use <package>:<sym> ?
<yitzi>
Just use the full package name.
<yitzi>
Of course. It makes the code more understandable, imho.
<beach>
Josh_2: Yes, exactly, with the package name or with a package-local nickname.
<beach>
That article totally misses the point, it seems.
<yitzi>
There is nothing wrong with shadow. It is very useful sometimes.
<yitzi>
I agree with beach, the article is baloney.
<Josh_2>
:thumbsup:
<yitzi>
We use SHADOW in ansi-test to test extrinsic systems. It can be very usefule.
<younder>
I don't like the fact I need to use :clim-user to avoid a to of warnings of redefined symbols
<beach>
Josh_2: Since we are talking first-class global environments, the Clostrum system implements variants of standard Common Lisp operators that take an additional argument in the form of a first-class global environment. We obviously name those operators FDEFINITION, FIND-CLASS, FBOUNDP, etc. It would be silly to invent new names for them, because it would be less obvious what they do.
<younder>
I would want to use :cl
<Josh_2>
beach: ofcourse
skin has joined #commonlisp
skin has quit [Client Quit]
skin has joined #commonlisp
<beach>
And that article seems to assume that you use SHADOW in combination with EXPORT, but a frequent scenario is that a library want to use a name for its own internal stuff and that name happens to be a Common Lisp symbol. Then SHADOW comes in handy.
shawnw has quit [Ping timeout: 248 seconds]
tfeb has joined #commonlisp
tfeb has quit [Client Quit]
skeemer has joined #commonlisp
annamalai has quit [Ping timeout: 248 seconds]
yitzi has quit [Ping timeout: 245 seconds]
yitzi has joined #commonlisp
dilaver_7 is now known as dilaver_
annamalai has joined #commonlisp
shawnw has joined #commonlisp
skin has quit [Quit: leaving]
jadzi has joined #commonlisp
treflip` has joined #commonlisp
annamalai has quit [Ping timeout: 260 seconds]
annamalai has joined #commonlisp
zwr has joined #commonlisp
luna-is-here has quit []
gioyik has quit [Ping timeout: 260 seconds]
spdegabrielle has joined #commonlisp
X-Scale has joined #commonlisp
rtypo has joined #commonlisp
gioyik has joined #commonlisp
<Bubblegumdrop>
aeth beach I think we are in different time zones. Thanks for the tips on upgrade the running image. I'm currently using Docker containers and writing an A/B thingy but not sure if I'm wasting my time. I ended up coming up with a general purpose A/B upgrade thingy (you can use it with more than just docker), I've yet to publish it.
awlygj has quit [Quit: leaving]
<Bubblegumdrop>
in my major applications the real "data" is stored in an SQL database so there's nothing to "serialize" you just deploy the new application and run the SQL migrations and it's good to go
istewart has joined #commonlisp
gioyik has quit [Ping timeout: 260 seconds]
<younder>
beach is CET same as me
<younder>
not sure about aeth
<younder>
Glad you SQL app is working
<beach>
I would personally go to a lot of trouble before using SQL, given the mismatch between it and the Common Lisp object model. But I guess it might work for simple things like numbers and strings.
<Bubblegumdrop>
I have run into some issues
<Bubblegumdrop>
overall it's usable
<Bubblegumdrop>
mito kind of glosses over all of the headaches but intorduces some of its own in doing so https://github.com/fukamachi/mito
<ixelp>
GitHub - fukamachi/mito: An ORM for Common Lisp with migrations, relationships and PostgreSQL support
<beach>
Ah, Fukamachiware.
<jfloren_>
kagevf: thank you, directory-namestring looks great
<shawnw>
How do you tell asdf to look in the current working directory for systems?
<Bubblegumdrop>
shawnw try something like this: (pushnew (uiop:getcwd) asdf:*central-registry*)
<shawnw>
That worked. Thanks.
annamalai has quit [Ping timeout: 276 seconds]
treflip`` has joined #commonlisp
treflip` has quit [Ping timeout: 248 seconds]
istewart has quit [Quit: Konversation terminated!]
treflip`` has quit [Ping timeout: 246 seconds]
Akbar-Birbal has left #commonlisp [#commonlisp]
kevingal has joined #commonlisp
annamalai has joined #commonlisp
meaty has joined #commonlisp
<jackdaniel>
younder: you can use :cl and it will work; it is just in the same compilation unit define-presentation-type won't be aware that there is a class defined of the same name
<jackdaniel>
clim applications work perfectly fine even when you don't use clim-lisp; patching defclass is one of few shadows that are in fact shadowed
troojg has joined #commonlisp
simendsjo has joined #commonlisp
ingeniot has joined #commonlisp
wacki has joined #commonlisp
troojg has quit [Ping timeout: 272 seconds]
jadzi has quit [Ping timeout: 252 seconds]
yitzi has quit [Remote host closed the connection]
<aeth>
the safest way to reload is probably through ASDF, since it will be able to know that changing a "base" dependency will have to recompile a bunch of stuff
<ixelp>
The package-inferred-system extension (ASDF Manual)
<aeth>
because that will give ASDF more flexibility into what to reload or not with essentially having a dependency graph even of your large application's internals
<aeth>
but engineering around reloading is not trivial, and requires you to think about and handle the edge cases (but in other languages it's harder because there aren't edge cases, "hot reloading" _is_ the edge case to implement in those languages)
<aeth>
(note that quickloading a ~/quicklisp/local-projects project and ASDF loading are equivalent so you can do it "through ASDF" and still use Quicklisp)
neuroevolutus has joined #commonlisp
ingeniot has quit [Quit: Client closed]
spdegabrielle has quit [Quit: Connection closed for inactivity]
JuanDaugherty has joined #commonlisp
neuroevolutus has quit [Ping timeout: 256 seconds]
<aeth>
Oh, the disadvantage for package-inferred-system here is that DEFPACKAGE contains a bunch of these edge cases on redefinition. At least in SBCL, you have to manually remove symbols if the old DEFPACKAGE exported more symbols and you try to redefine a package at the same name that doesn't. And the inferred system makes you have a lot more packages.
<cow_2001>
where's screwtape/screwlisp?
<cow_2001>
wait
<cow_2001>
no, still downloading the moo dependencies
mishoo has quit [Ping timeout: 244 seconds]
pve has quit [Quit: leaving]
prokhor has quit [Remote host closed the connection]
X-Scale has quit [Quit: Client closed]
amb007 has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]