rotateq has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
yauhsien has joined #commonlisp
Madsy has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
Arthur has quit [Ping timeout: 240 seconds]
causal has quit [Quit: WeeChat 3.5]
pranavats has left #commonlisp [Error from remote client]
samboli has joined #commonlisp
yauhsien has quit [Ping timeout: 246 seconds]
Josh_2 has joined #commonlisp
<Josh_2>
Hey
<dlowe_>
hi
<Josh_2>
Does anyone have an example of using multiple :around methods combined with call-next-method?
<Josh_2>
I only just realized that call-next-method when inside of an :around looks for the next most applicable :around method before executing the primary (by default) :facepalm:
Guest5282 has joined #commonlisp
hashfuncd0e has quit [Ping timeout: 248 seconds]
Guest74 has joined #commonlisp
dlowe_ has quit [Remote host closed the connection]
zacque has joined #commonlisp
<zacque>
Josh_2: You can play around with it using hierarchical classes like animal, dog, poodle, cat, persian-cat
<zacque>
Then define a generic function like MAKE-SOUND or PRINT-NAME for specialising it on different classes
<zacque>
The trick in understanding the `Standard Method Combination` is to understand the interplay of "shadowing" and "accumulative" effects for both primary and auxiliary methods
<Josh_2>
I understand primary and auxiliary methods
<Josh_2>
and the other method combinations
<zacque>
Great =D
<Josh_2>
I though (call-next-method) invokes the primary method when in :around, but it doesn't, it looks for the next most applicable :around and if it doesn't find one then it calls the most applicable primary
<Josh_2>
which is crazy imo
<zacque>
Well, it makes sense since :around method has overriding/shadowing effect
<Josh_2>
I just want to see an example
<Josh_2>
a non trivial example simple az
<zacque>
Also, I suppose you can always define a "non-crazy" order with DEFINE-METHOD-COMBINATION
<Josh_2>
Yes
<Bike>
i don't know what an example would tell you that you don't already know?
<Josh_2>
Just wanna see it in practice. Theory != practice
<Bike>
but usually if i don't understand a method combination thing i just figure out what the form looks like based on the method combination definition
<Bike>
like if your applicable methods are two arounds, two primaries, a before, and an after, what you get is (call-method #<around1> #<around2> (make-method (progn (call-method #<before>) (multiple-value-prog1 (call-method #<primary1> #<primary2>) (call-method #<after>)))))
<Bike>
more or less
<Bike>
in other words, if you use call-next-method and the next method is an around, you call that, but otherwise you call the whole before/primary/after situation
<Josh_2>
Okay thanks
<Josh_2>
the call-method tree example is quite helpful
<Josh_2>
I hadn't thought about it like that
<Bike>
I don't think I have a nontrivial c-n-m usage on hand for you though, sorry
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
samboli has quit [Quit: Lost terminal]
aartaka has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 248 seconds]
tyson2 has quit [Remote host closed the connection]
Bike has quit [Quit: sleepy]
frgo has quit [Ping timeout: 248 seconds]
pranavats has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
slowButPresent has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
zacque has quit [Quit: Goodbye :D]
yauhsien has joined #commonlisp
hineios has quit [*.net *.split]
hirez has quit [*.net *.split]
stylewarning has quit [*.net *.split]
jmercouris has quit [*.net *.split]
iquites has quit [*.net *.split]
hubvu_ has quit [*.net *.split]
iisi has quit [*.net *.split]
iisi has joined #commonlisp
iquites has joined #commonlisp
hubvu_ has joined #commonlisp
stylewarning has joined #commonlisp
stylewarning has quit [Changing host]
stylewarning has joined #commonlisp
jmercouris has joined #commonlisp
hirez has joined #commonlisp
robin has quit [*.net *.split]
mmk2410 has quit [*.net *.split]
mmk2410 has joined #commonlisp
robin has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
yauhsien has quit [Ping timeout: 240 seconds]
trev has joined #commonlisp
Guest5282 has quit [Quit: Client closed]
pfd has quit [Ping timeout: 252 seconds]
rotateq has joined #commonlisp
shka has joined #commonlisp
rotateq has quit [Remote host closed the connection]
Posterdati has quit [Ping timeout: 260 seconds]
xaotuk has joined #commonlisp
Posterdati has joined #commonlisp
xaotuk has quit [Ping timeout: 260 seconds]
Cymew has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 276 seconds]
yauhsien has joined #commonlisp
varjag has joined #commonlisp
Arthur has joined #commonlisp
random-nick has joined #commonlisp
rotateq has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
MajorBiscuit has joined #commonlisp
MajorBiscuit has quit [Client Quit]
MajorBiscuit has joined #commonlisp
MajorBiscuit has quit [Client Quit]
analogsalad has joined #commonlisp
attila_lendvai has joined #commonlisp
analog_salad has joined #commonlisp
analogsalad has quit [Ping timeout: 272 seconds]
attila_lendvai has quit [Ping timeout: 272 seconds]
lisp123 has joined #commonlisp
MajorBiscuit has joined #commonlisp
lisp123 has quit [Ping timeout: 248 seconds]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
tyson2 has joined #commonlisp
Arthur has quit [Ping timeout: 260 seconds]
yauhsien has joined #commonlisp
Arthur has joined #commonlisp
lisp123 has joined #commonlisp
xaotuk has joined #commonlisp
lisp123_ has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
lisp123 has quit [Ping timeout: 240 seconds]
aeth has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
lisp123 has joined #commonlisp
lisp123_ has quit [Ping timeout: 260 seconds]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
xaotuk has quit [Ping timeout: 248 seconds]
xaotuk has joined #commonlisp
yauhsien has quit [Ping timeout: 240 seconds]
yauhsien has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 248 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Oddity has quit [Ping timeout: 248 seconds]
<mfiano>
What is a good way to transform a string repeatedly given a list of cons of translation characters. For example given the list ((#\, . #\-) (#\; . #\:)) and the string "foo,bar;baz", it should produce "foo-bar:baz"
<semz>
mfiano: Is reduce + substitute too expensive due to intermediates?
<mfiano>
Hmm, probably not.
<semz>
Although this may run into issues if one character is replaced with another character that is to be replaced later
<lisp123>
i'd probably separate the list to (, ;) and (- :) if the string is large enough
<mfiano>
Yeah that's no good.
<mfiano>
So it seems I have to do single-pass
<mfiano>
with #'(setf char) or whatnot
<lisp123>
this week going to have about 5000 people using my CL app (for a few minutes each at a conf)
<mfiano>
Much more concise and more readable. I think I'll go with that.
<mfiano>
Thanks
<jackdaniel>
sure
<jackdaniel>
there is always map-into
<jackdaniel>
if you are not interested in retaining the old string
<mfiano>
I am :)
<lisp123>
how to reload a file in sbcl repl
<jackdaniel>
(load <file>) would be one way
<lisp123>
thanks!
<jackdaniel>
sure
<lisp123>
So CLISP has a better repl than SBCL?
<jackdaniel>
try linedit for similar capabilities
varjag has quit [Quit: ERC (IRC client for Emacs 26.3)]
<jackdaniel>
clisp payed a dear price for rlwrap integration - it had to change its own license
<lisp123>
oh it was rlwrap that caused CLISP to be GPL?
<jackdaniel>
yes, I think that an email conversation is linked from clisp website
<jackdaniel>
they've reached a mutal understanding after some back and fro
<lisp123>
yeah I read that but not the details
<jackdaniel>
(Bruno Haible and Richard Stallman - afair)
<lisp123>
i was reading recently on how ECL's roots are quite good
<lisp123>
first CL implementation built ground up from the specificaiton
<jackdaniel>
technically it was KCL ,)
<lisp123>
yah
<jackdaniel>
and KCL has more descendants than ECL
<Mrtn[m]>
jackdaniel: Cool. I like the GPL.
<mfiano>
and CLASP is derived from ECL afaik :)
<jackdaniel>
only core runtime, not the compiler
<jackdaniel>
(and parts of the core runtime written in C were rewritten in C++)
yauhsien has quit [Remote host closed the connection]
<lisp123>
one day I will learn C
yauhsien has joined #commonlisp
Sankalp has joined #commonlisp
Bike has joined #commonlisp
<Mrtn[m]>
<lisp123> "one day I will learn C" <- What will you do in the afternoon of that day?
<Mrtn[m]>
Hey Bike, good afternoon.
<lisp123>
Mrtn[m]: Learn RUST #FAST #SAFE
lisp123 has quit [Quit: Leaving...]
<Bike>
gday
slowButPresent has joined #commonlisp
<jackdaniel>
o/
<trev>
i had just watched a talk by the creator of clasp
<trev>
amazing how much work he has done, plus the chemistry stuff
xaotuk has quit [Ping timeout: 240 seconds]
<jackdaniel>
drmeister: your are being praised ^
<rotateq>
trev: It's really one of the most impressive talks I know, due to the idea of translating the metaprogramming for chemistry.
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 248 seconds]
<mfiano>
jackdaniel: How would you modify your example such that if the cdr is nil, it means trim the original character without replacing (shorter string)?
yauhsien has joined #commonlisp
treflip has joined #commonlisp
frgo has joined #commonlisp
<jackdaniel>
I wouldn't, (map 'string) doesn't work like this.
<jackdaniel>
I'd probably have a string with a fill pointer along with the index closed over (map nil …)
<jackdaniel>
or use loop/other iterative construct
<jackdaniel>
or, instead of an index variable - push-extend
<trev>
i should also say that it made me feel like a total loser after watching, and now i am contemplating my entire purpose in life!
<beach>
Wow! Why?
yauhsien has joined #commonlisp
Cymew has quit [Ping timeout: 272 seconds]
<trev>
beach, cause it was awesome stuff and when you are just working a mildly interesting day job just for money, it is easy to envy academia
<beach>
I see.
<jackdaniel>
you should start putting easter eggs in the day job, then it will be for money *and* for easter eggs :)
<trev>
i should embed a lisp compiler into the product
<trev>
i think that is what you are getting at jackdaniel
<jackdaniel>
sounds like fun
<jackdaniel>
press tilde for instance repl
<jackdaniel>
s/instance/instant/
<dlowe>
see how well that worked for web browsers
<Bike>
do i understand correctly that conspack can't do multidimensional arrays?
ec has quit [Remote host closed the connection]
frgo has joined #commonlisp
<Bike>
relatedly, what de/serialization libraries are good. i tried marshal first, and that works okay, but i'd have to devise my own efficient output format and the code is a bit ugly in parts
<Bike>
conspack seems pretty good, but i do actually want to handle complicated arrays
<mfiano>
I am not sure. I used it quite a bit, but not for multi-dimensional arrays. Relatedly, the conspack author left Lisp some years ago, but I am still in contact with him. If you want to hack in support for that, I can see about transferring the repo to sharplispers etc.
<Bike>
i was thinking about that, but hold off until i actually do something, heh
<mfiano>
Ok
<mfiano>
It really is my favorite serde library.
<Bike>
thanks. good to know i'm on the right track
<mfiano>
iirc it uses fastio under the hood for fast buffered reads/writes
<Bike>
indeed it does. i'm more concerned with compactness than speed here, but that's still nice
<mfiano>
it's firly good at compactness too with back references etc
<mfiano>
fairly*
<Bike>
it is absolutely better than what i'm doing with marshal right now
<mfiano>
I never used anything but conspack and cl-store, and elephant...i experienced corruption with the latter two.
<mfiano>
But this was like a decade ago, so that might have changed
<Bike>
well that's three more than i have
<Bike>
it looks like i might be able to hack in md arrays through tmaps without actually altering the encoding... that would be convenient
<mfiano>
Nice
Lycurgus has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
analog_salad has quit [Quit: bye]
yauhsien has quit [Read error: Connection reset by peer]
<Guest74>
I've been thinking of how to provide game/character saves in a format that isn't trivially hacked to cheat. Seems like this conspack could provide at least one layer of obscurity.
<mfiano>
Could always encrypt it with a load-time-value generated pk or something
<mfiano>
So they can't really search for string literals
<dlowe>
just rot13 string literals
<semz>
Guest74: This is completely futile.
<semz>
If it's a singleplayer game, it doesn't matter - let them ruin their own fun if they want. If it's a multiplayer game, you shouldn't be doing that kind of security client-side in the first place.
<Guest74>
for the determined person sure, but i think it would deter some people that see the save file is just a struct.
tyson2 has quit [Remote host closed the connection]
<dlowe>
I think if you're making a game, then until you have a game, this save file encryption is a complete distraction :)
<mfiano>
^
<mfiano>
Very few have finished a game of any significance. Too many distractions.
<dlowe>
People think the hard part of programming is the math, or the problem solving, or learning the technologies. But the actual hard part is managing your enthusiasm, your focus, and other people
<Guest74>
well, mainly writing the engine and not a specific game. The example is already a 'game' and I already handle saving of character by just writing out their slots.
<beach>
Another game engine! Yay!
<mfiano>
I'll check back in on you in a decade.
<Guest74>
This one is better Beach: , only text!
ec has joined #commonlisp
<Bike>
conspack hack for mdarrays looks like it works. neat.
<Guest74>
I've already got simple saving in since if you develop within the system instead of using an editor you don't want to lose your work.
<Bike>
i do have to alter a little of its code, but oh well
<mfiano>
Bike: Well this project deserves to be moved to a publicly writable community repository in any case. I'll see what the dev says. He transferred some of the gamedev libs to me in the past.
<Bike>
i was thinking of rolling my own serialization based on my experience staring at make-load-form, but it's probably better to at least start with what already exists
<Bike>
mfiano: for the time being i'll just do a regular ol fork
<Guest74>
I've been thinking about the possibility of using irc to build a multiuser whiteboard. Anybody know of anything like that being done before?
Lycurgus has quit [Quit: Exeunt]
<Bike>
dunno about irc, but i've used a couple collaborative editors before, if that's what you mean
<Bike>
eg etherpad or just google docs
<jackdaniel>
sometimes I wonder whether we have more common lisp implementations or game engines in common lisp
<Guest74>
Something like that. it's seems like an easy infrastructure to use.
<Guest74>
jackdaniel: but how many text engines?
<jackdaniel>
rendering to text is just a simple matter of code
<Guest74>
simple, sure...
<jackdaniel>
check out the phrase "small matter of code" (I've mispelled)
<jackdaniel>
even better, it should be "small matter of programming", heh
<Guest74>
Ibf, most of it is really simple. Understanding the user and generating novel character responses is another thing entirely.
<jackdaniel>
I'm waiting eagerly for when you publish it, until then I'll hold of my enthusiasm :) if you want to obfuscate saved game state, then put it in parenthesis, I've heard that they make code unreadable
<mfiano>
dlowe: I have a question for you
<Guest74>
I'm taking a bit of a break to play Zork. I want to implement it in my engine but I haven't finished it yet. reading the source is one big spoiler.
<mfiano>
Does local-time have anything that just outputs the date/time. I'm not sure what the number after the "." is in rfc3339: (lt:format-rfc3339-timestring t (lt:now)) ;; => "2022-05-16T12:10:12.739015-04:00"
xaotuk has joined #commonlisp
<jackdaniel>
you may pass the format to format-timestring
<jackdaniel>
there are a few predefined constants, but you may add your own specification
<Guest74>
i quite enjoy the y-m-d--h-m-s format.
<mfiano>
Aha, this does what I want: (lt:format-timestring t (lt:now) :format '(:year #\- :month #\- :day #\_ :hour #\: :min #\: :sec))
<mfiano>
Hmm, but I also need to parse it, and parse-timestring doesn't seem to take a format argument
MajorBiscuit has quit [Ping timeout: 248 seconds]
<splittist>
mfiano: clearly you need printfcl and scanfcl (:
<mfiano>
umm ok
<Guest74>
There should be parsers for the formats it produces from what I recall. The format I mentionned is a standard.
<mfiano>
I don't want a standard one.
<Guest74>
clearly you need printfcl and scanfcl then.
<mfiano>
Attempting to add :timezone to FMT produces a NIL is not a number error
<mfiano>
I want the 2 values to have the same contents
<Guest74>
and this is why I wrote my own, I couldn't figure a simple way to do what I wanted with local-time.
<jackdaniel>
while having parse accept the string format the same as the format- function does, is there really a problem? maintain the timestamp in native format, and when you need to serialize/deserialize it use rfc-whatever while for user printing use +custom-format+
kpoeck has quit [Quit: Client closed]
<mfiano>
There is no user printing. I am creating filesystem snapshots named as timestamps, and then later during retention cleanup, I need to delete the last N days etc, so I need to map the custom timestamp format I created back to the same local time.
pfd has quit [Quit: Client closed]
tyson2 has joined #commonlisp
frgo has quit [Ping timeout: 252 seconds]
<mfiano>
I need to convert a custom timestamp filename back to the local-time object it refers to, with the same offset it was created with.
<mfiano>
This is for local use, so I shouldn't have to deal with global timezone offsets, not that I can figure out how to parse it as such anyway
yauhsien has joined #commonlisp
pfd has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
<Bike>
i am apparently not understanding how to use conspack's circularity detection in relation to standard objects. if i have foo1 containing a foo2 in a slot, and foo2 contains that foo1, i can encode, but if i decode i get objects with cpk::forward-refs in them
<Bike>
this is with a tracking-refs around the encode and one around the decode
<mfiano>
Ok, that was a bit unexpected, but I figured out how to do it.
<mfiano>
adding :gmt-offset to the format is what I needed, not :timezone
yauhsien has joined #commonlisp
frgo has quit [Ping timeout: 240 seconds]
<mfiano>
parse-timestring gets very confused and reaches the end of string too early when using :timezone
<mfiano>
That might be a bug, or just my blind trial and error doing things I'm not supposed to
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #commonlisp
<Guest74>
I've been thinking of dropping human readable date/time formats and just going with universal time for things like logs.
<dlowe>
humans. who needs em.
cage has joined #commonlisp
<yitzi>
dlowe: soylent green needs em.
<trev>
just get used to reading unix timestamps in u64
Arthur has quit [Changing host]
Arthur has joined #commonlisp
Arthur is now known as cl-arthur
<jackdaniel>
no no, declare it as a fixnum, so it breaks in interesting ways on 32bit systems ,)
* trev
screams and claps
frgo has joined #commonlisp
trev has quit [Remote host closed the connection]
<cl-arthur>
I'd like to run some code when starting up slime. I've found https://slime.common-lisp.dev/doc/html/Multiple-Lisps.html, and thought to use that to set up an "env", but the function supplied to init-function is an elisp/emacs one. Does someone know how to call common lisp code (over slime) from the elisp/emacs code? My google-fu's failing me.
<Alfr>
cl-arthur, put it into ~/.swank.lisp .
matt` has joined #commonlisp
<imjim>
am I mad for developing my baby programs in emacs with no slime?
<cl-arthur>
alfr: that looks like it'd solve 'run some code when starting up slime' but not 'conditionally run some code when starting up slime'
Dynom has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
notzmv has quit [Ping timeout: 248 seconds]
<Guest74>
dlowe: i personally think crawling through a filesystem reading dates on files is pretty inhumane way to read your logs. Just write an interface that displays the information in any user customizable way.
szkl has quit [Quit: Connection closed for inactivity]
kpoeck has joined #commonlisp
<cl-arthur>
slime-load-file supplies a way to run stuff, thanks
frgo has quit [Ping timeout: 272 seconds]
kpoeck has quit [Quit: Client closed]
kpoeck has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
frgo has joined #commonlisp
tyson2 has joined #commonlisp
attila_lendvai has joined #commonlisp
<dlowe>
Guest74: you don't have to sell me on structure log formats
frgo has quit [Ping timeout: 260 seconds]
yauhsien has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
yauhsien has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
paul0 has quit [Read error: Connection reset by peer]
paul0 has joined #commonlisp
_paul0 has joined #commonlisp
paul0 has quit [Remote host closed the connection]
yauhsien has quit [Ping timeout: 272 seconds]
yauhsien has joined #commonlisp
xaotuk has quit [Read error: Connection reset by peer]
xaotuk has joined #commonlisp
xaotuk has quit [Client Quit]
<Guest74>
is there a way to get emacs to save all changed buffers?
<Guest74>
It's annoying when you change desktops.
<Bike>
like M-x save-some-buffers?
<Shinmera>
Guest74: C-x s !
<Guest74>
thanks Bike: that looks like it might do the right thing, I don't have any buffers need saving though.
<Shinmera>
No thanks for me? :(
<Guest74>
that only save your current buffer.
<Guest74>
afaik
treflip has quit [Quit: zzz]
<Guest74>
I've made the, perhaps unwise, decision to allow my lisp to control emacs and I quite abuse the desktop thing.
aartaka has quit [Ping timeout: 260 seconds]
rogersm has joined #commonlisp
matt` has quit [Remote host closed the connection]
aartaka has joined #commonlisp
<Guest74>
ok, that works a treat. Now if I could just control the layout from lisp...
matt` has joined #commonlisp
kpoeck has quit [Ping timeout: 252 seconds]
kpoeck has joined #commonlisp
Guest74 has quit [Quit: Connection closed]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
Oddity has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
rogersm has quit [Quit: Leaving...]
<Bike>
conspack cannot handle circularity within objects, even though the actual data format does. that's unfortunate, but maybe not too bad to fix
<dlowe>
what was the thing extracted from Rucksack? That was pretty good.
dra has joined #commonlisp
notzmv has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
lawt has quit [Ping timeout: 250 seconds]
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
lawt has joined #commonlisp
kpoeck has quit [Quit: Client closed]
orestarod has joined #commonlisp
<Shinmera>
::notify Guest74 No, you're thinking of C-x C-s. C-x s ! does save all buffers with changes.
<Colleen>
Shinmera: Got it. I'll let Guest74 know as soon as possible.
frgo has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
Dynom has quit [Quit: WeeChat 3.5]
yauhsien has quit [Remote host closed the connection]
aeth_ has joined #commonlisp
aeth has quit [Ping timeout: 240 seconds]
Brucio-61 has quit [Remote host closed the connection]
szkl has joined #commonlisp
frgo has quit [Ping timeout: 276 seconds]
scymtym has quit [Ping timeout: 240 seconds]
yauhsien has joined #commonlisp
matt` has quit [Remote host closed the connection]
hashfunc16f7 has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
<mfiano>
What is the most idiomatic way to handle an external package's error condition being signalled, and signal a custom error condition in its place?
<Bike>
(here i'm just encapsulating all kinds of errors, but you can obviously do this more specifically
<Bike>
)
<mfiano>
In my case, I'm writing a program that is expected to be run as an executable image with the debugger disabled, and I just handler-case my USER-ERROR condition that is a subtype of SIMPLE-ERROR: https://gist.github.com/mfiano/ae565e7710d3fcc41115d78164989de6
yauhsien has quit [Remote host closed the connection]
<mfiano>
But I want to treat external dependent library errors as user-error's to give a more meaningful message.
<mfiano>
So I think handler-case is what I want.
yauhsien has joined #commonlisp
<Bike>
is there a reason you don't just handler-case ERROR and print the error?
<Bike>
i mean, if all you're going to do with the error is dump it, encapsulating it in a new condition doesn't seem necessary
cl-arthur has quit [Ping timeout: 240 seconds]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
<mfiano>
Bike: The error comes from UIOP:RUN-PROGRAM, with no meaningful report, but for each process I call, I know what the user wants to see as a report. In this particular one I want to handle, the only possible error according to the exit status code, would be that ZFS filesystem permissions weren't delegated to the user running the program.
<Bike>
well i mean, can you not just handle that particular condition in your handler-case.
<Bike>
to print whatever message
paul0 has joined #commonlisp
<mfiano>
I don't see how, considering uiop:run-program is used for all sorts of process calls, and I only know the context to produce the correct report at that call site.
_paul0 has quit [Ping timeout: 240 seconds]
aeth_ has quit [Ping timeout: 272 seconds]
<Bike>
oh, at the call site. i see. in that case yeah.
<mfiano>
I mean I could do some nasty catch/throw stuff, but that wouldn't be great
aeth has joined #commonlisp
greaser|q has joined #commonlisp
greaser|q has joined #commonlisp
greaser|q has quit [Changing host]
greaser|q is now known as GreaseMonkey
<Bike>
yeah, no, if you control the call site just the handler-case you described makes sense to me
<Bike>
the cleavir code i linked is for a different situation, where we call some function that we don't control and which can do literally anything
<mfiano>
Yeah, I'm breaking my Lisp tradition here, of writing a program designed to be run from cron. Any error should exit the program, optionally u-w-p'ing a cleanup form, and writing the message to the job's log file.
* mfiano
is rewriting a few thousand line shell script he wrote 6 months ago that outgrew its host language by...a few thousand lines.
<mfiano>
Bugs galore, and my least favorite language to get it to do what I want.
ec has quit [Ping timeout: 240 seconds]
frgo has joined #commonlisp
karlosz has joined #commonlisp
yewscion has joined #commonlisp
<gjvc>
few thousand line shell script
<gjvc>
damn
yauhsien has quit [Remote host closed the connection]
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #commonlisp
<dbotton>
Do those of you deploying CL webservers do you tend to have each site in a different lisp image or all in one?
hashfunc16f7 has quit [Ping timeout: 240 seconds]
yauhsien has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
frgo has quit [Ping timeout: 276 seconds]
karlosz has quit [Quit: karlosz]
frgo has joined #commonlisp
orestarod has quit [Ping timeout: 240 seconds]
random-nick has quit [Ping timeout: 240 seconds]
paul0 has quit [Remote host closed the connection]
paul0 has joined #commonlisp
frgo has quit [Ping timeout: 246 seconds]
cl-arthur has joined #commonlisp
<lagash>
mfiano: it's in Scheme but have you tried mcron yet?
<mfiano>
I only use CL
frgo has joined #commonlisp
<mfiano>
I also try to avoid as much GPL-licensed software as I can. But this is all largely off-topic here.
tyson2 has quit [Remote host closed the connection]
karlosz has joined #commonlisp
shka has quit [Ping timeout: 260 seconds]
dra has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
psf has quit [Ping timeout: 252 seconds]
psf has joined #commonlisp
tyson2 has joined #commonlisp
asarch has joined #commonlisp
frgo has quit [Ping timeout: 276 seconds]
yauhsien has quit [Remote host closed the connection]