metsomedog has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Alfr has quit [Quit: Leaving]
jmdaemon has quit [Ping timeout: 260 seconds]
jonatack has joined #commonlisp
czy has joined #commonlisp
ronald has quit [Ping timeout: 264 seconds]
<skin>
UIOP has this `safe-read-file-form`. I wish it had something like `spit-file-form`, some ability to write a form out in one function call. Thoughts?
seok has joined #commonlisp
ronald has joined #commonlisp
bilegeek has joined #commonlisp
Kyuvi has joined #commonlisp
<NotThatRPG>
skin: why isn't that just `prog1` or `progc`?
<skin>
You mean `prin1` and `princ`?
<skin>
Yeah that's the route I'm taking at this time.
<NotThatRPG>
Yes, sorry! Possibly wrapped in uiop:with-output-file
<NotThatRPG>
And possibly also wrapped in a let that binds *package* ...
yitzi has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
NicknameJohn has quit [Ping timeout: 255 seconds]
skin has quit [Ping timeout: 276 seconds]
<aeth>
personally, I write s-expressions to a file manually so it looks like a human wrote it... I suppose with Emacs+SLIME integration you could have it exactly match the autoindent
puke has quit [Read error: Connection reset by peer]
puke has joined #commonlisp
josrr has quit [Remote host closed the connection]
Alfr has joined #commonlisp
amb007 has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
pyooque has joined #commonlisp
puke is now known as Guest8345
Guest8345 has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
pyooque is now known as puke
waleee has quit [Ping timeout: 240 seconds]
amb007 has quit [Ping timeout: 264 seconds]
rtypo has joined #commonlisp
jmdaemon has joined #commonlisp
rgherdt has quit [Quit: Leaving]
Gleefre has quit [Remote host closed the connection]
triffid has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
decweb has quit [Ping timeout: 276 seconds]
zyd has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
igemnace has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
jmdaemon has quit [Ping timeout: 260 seconds]
jmdaemon has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
Kyuvi has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
davidt has joined #commonlisp
chiselfuse has quit [Ping timeout: 240 seconds]
ronald has quit [Ping timeout: 245 seconds]
chiselfuse has joined #commonlisp
ronald has joined #commonlisp
ryuslash has joined #commonlisp
herjazz has joined #commonlisp
chiselfuse has quit [Ping timeout: 240 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
Demosthe1ex has joined #commonlisp
Demosthenex has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
Demosthenex has joined #commonlisp
Demosthe1ex has quit [Ping timeout: 252 seconds]
igemnace has quit [Quit: WeeChat 4.1.2]
AndreiDuma has joined #commonlisp
_cymew_ has joined #commonlisp
shka has joined #commonlisp
attila_lendvai has joined #commonlisp
treflip has joined #commonlisp
dcb has quit [Quit: Connection closed for inactivity]
dino_tutter has joined #commonlisp
davidt has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
AndreiDuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
metsomedog has joined #commonlisp
AndreiDuma has joined #commonlisp
jmdaemon has quit [Ping timeout: 245 seconds]
Gleefre has joined #commonlisp
mgl_ has joined #commonlisp
khrbtxyz has quit [Ping timeout: 256 seconds]
khrbtxyz has joined #commonlisp
bilegeek has quit [Quit: Leaving]
ym has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
McParen has joined #commonlisp
cmack has quit [Remote host closed the connection]
cmack has joined #commonlisp
chiselfuse has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
decweb has joined #commonlisp
random-nick has joined #commonlisp
josrr has joined #commonlisp
tyson2 has joined #commonlisp
<jcowan>
aeth: it would be a public service to translate SRFI 125 into CL
anthk_ has joined #commonlisp
cage has joined #commonlisp
herjazz has quit [Quit: leaving]
amb007 has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 264 seconds]
dcb has joined #commonlisp
yitzi has joined #commonlisp
Inline has quit [Quit: Leaving]
traidare has joined #commonlisp
Kyuvi has joined #commonlisp
random-jellyfish has quit [Ping timeout: 264 seconds]
rtypo has quit [Ping timeout: 245 seconds]
<metsomedog>
Anyone familiar with bordeaux-threads with-timeout macro? Even with ignore-errors the timeout error will go to the debugger. Simple example: https://paste.debian.net/1304077/ (seems indentation got messed up a bit in the paste btw)
<ixelp>
debian Pastezone
<jcowan>
For your Sunday morning amusement, this sentence from the writeup on issue COMPILER-DIAGNOSTICS: "Introducing the STYLE-WARNING condition allows handlers to distinguish between potentially serious problems and mere kibitzing on the part of the compiler."
<jcowan>
(Although I personally would not use "kibitz" this way.)
akoana has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
dnhester26 has joined #commonlisp
waleee has joined #commonlisp
Kyuvi has quit [Ping timeout: 250 seconds]
<dnhester26>
CLOS Question: if I'm making a constructor and I only want to pass in to the make instance optional keyed arguments if they were passed in, however, if they are not passed in, I want the default initform, how can I check if the NIL value is because it was passed in or not?
<beach>
You attach a "supplied-p" parameter to the key parameter.
<dnhester26>
beach: thanks, I remembered we spoke about it, just couldn't find where
<beach>
Check the sections on lambda lists.
<dnhester26>
ah, can I skip the initform?
<beach>
No.
<beach>
Put NIL if you don't want it.
<dnhester26>
lambda lists, got it, thanks.
<dnhester26>
ok
<beach>
You will then always check the supplied-p parameter first, so the value of the main parameter won't matter if supplied-p is false.
<dnhester26>
perfect, thank you so much!
<beach>
Sure.
<aeth>
jcowan: oh, 125 (hash tables), not 105 (infix).
<beach>
dnhester26: Another trick you might need is how to "default" certain parameters...
Inline has joined #commonlisp
mgl_ has quit [Ping timeout: 264 seconds]
<dnhester26>
beach: by that you mean initform in the defclass?
<beach>
No.
<beach>
I meant the second element of the list defining a &KEY parameter, in any lambda list.
<dnhester26>
ah, the initform you wrote about above, just before the supplied-p-parameter
<beach>
Yes.
<beach>
dnhester26: To "default" a parameter you can define an :AROUND method like this: (defmethod mumble :around (... &rest initargs &key (thing <default-value>)) (apply #'call-next-method :thing thing initargs))
<dnhester26>
I feel like I'm missing something though: I want to make a simple constructor that can optionally take in values, however, if it doesn't take in the optional values, I would like it to just default to the make-instace default behavior of no arguments provided which is using the initforms
<beach>
If the thing parameter was supplied, then it will appear in initargs as well, but the first occurrence then takes precedence.
<dnhester26>
What's the simple way of doing this without having to make a bunch of conditionals?
<dnhester26>
Or just forget about the constructor and use make-instance instead?
<beach>
I advice against creating explicit constructors.
<dnhester26>
beach: because of this problem I'm facing?
<beach>
Among others.
<beach>
From reading the CLIM II specification, I am now convinced that the initargs of a class are part of the protocol. They are not necessarily for slots.
<dnhester26>
initargs I thought was the key to read write slots? what else do you mean by part of the protocol?
waleee has quit [Ping timeout: 245 seconds]
<beach>
You can catch the initarg in (say) INITIALIZE-INSTANCE and do what you want with it.
<beach>
It is not necessarily for a slot.
<beach>
So you can say (make-instance 'person :age 33) and still set the slot YEAR-OF-BIRTH.
<beach>
The fact that the initarg can be given in a slot specification is just a convenience.
<younder>
In the old days Meta object protocol had to support flavors and common loops as well as CLOS. I guess they were less reluctant to mess with MOP back in the 1980's when they defined CLIM.
waleee has joined #commonlisp
<beach>
younder: From talking to Scott, I understand that the MOP wasn't very stable when they wrote the CLIM II specification. That's why McCLIM has a better implementation of presentation types that commercial CLIM implementations.
<beach>
... because when Tim Moore wrote the code for McCLIM presentation types, the MOP was mature.
<beach>
younder: But that's not very related to dnhester26's questions.
<beach>
<dnhester26>
thanks for the explanation. I am due to read the CLIM and Eclector specifications for learning, it's just that I have a deadline for a project to deliver... so it's in the back burner for now
<beach>
Of course.
<beach>
dnhester26: When you design a protocol, consider what the client needs to do to initialize objects and manipulate them after creation. Don't think slots at that point.
<beach>
Slots are implementation details that can change later, and that shouldn't matter to client code.
<beach>
Like for PERSON, you can allow either :YEAR-OF-BIRTH or :AGE, but perhaps rule out that both are used simultaneously.
<beach>
Whether you then store the age or the date of birth doesn't matter to client code.
<dnhester26>
right, I was trying to provide simple functions without the client having to worry about slots, just a function that takes a message and I deal with setting all the slots if it's an error, or data and I set all the slots
<beach>
I am not sure what that means, but I take your word for it.
<dnhester26>
I basically just simplied that function and removed all the optional slots, leaving just message. If someone wants to deal with the slots, then they'll have to use the make-instance and that's it. to keep it simple
<dnhester26>
ok, thanks
<beach>
That sounds a lot like you expose the slots to client code.
<dnhester26>
it was good to relearn about the supplied-p-arguments but what I got from it was basically to simplify my function and if someone needs something more specific they can just use the make-instance
<beach>
And I don't know what you mean by removing slots. That would require redefining the class.
azimut has joined #commonlisp
<dnhester26>
well ideally the client should just use the provided function, not anything else
<dnhester26>
oh sorry I meant I removed the optional key arguments from the function that was setting the slots conditionally
<beach>
Sure, but if the function documentation mentions slots, then you still expose slots.
<dnhester26>
right, now it doesn't, it just accepts one argument and that's it. everything else is not exported in the package nor available in the function
<beach>
OK.
<younder>
beach: I guess my point is that when you use MOP and change CLOS behavior (which is complex as it is) it makes it harder to intuit how it behaves.
<beach>
younder: Did anyone suggest doing that?
mesaoptimizer has quit [Quit: mesaoptimizer]
<beach>
younder: Or was that some unrelated thinking on your part?
<younder>
WTF is CLIM doing..
<beach>
It absolutely does not modify CLOS behavior. I am not sure where you got that idea.
<beach>
... at least not as far as I know.
josrr has quit [Ping timeout: 256 seconds]
<beach>
younder: Can you point me to a section in the CLIM II specification that mentions modifying CLOS behavior?
puke has quit [Ping timeout: 276 seconds]
mhcat has joined #commonlisp
attila_lendvai has joined #commonlisp
jonatack has quit [Ping timeout: 264 seconds]
jonatack has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
jonatack has quit [Ping timeout: 255 seconds]
mhcat has quit [Remote host closed the connection]
<metsomedog>
can someone confirm that the following raises an error to the debugger in sbcl? (ignore-errors (error (make-condition 'sb-ext:timeout)))
<anthk_>
Timeout occurred.
<anthk_>
[Condition of type TIMEOUT]
<metsomedog>
I don't understand why the timeout error is not being handled by ignore-errors
<fe[nl]ix>
metsomedog: bt:timeout is not a subclass of cl:error, so ignore-errors will have no effect
<metsomedog>
fe[nl]ix: oh, I see, so need handler-case or similar?
<fe[nl]ix>
I suspect the same holds for sb-ext:timeout
<fe[nl]ix>
yes, use handler-case
<metsomedog>
this works, ty; (handler-case (error (make-condition 'sb-ext:timeout)) (condition (c) (format t "caught condition ~a~%" c) :resumed))
notzmv has joined #commonlisp
<metsomedog>
speaking of which, when to prefer handler-case over handler-bind?
<beach>
metsomedog: Errors are "signaled" in Common Lisp, not "raised". You should use handler-bind when you don't want the stack to be unwound automatically.
azimut has quit [Ping timeout: 240 seconds]
<beach>
metsomedog: Like if you propose a restart.
<metsomedog>
beach: thank you
<beach>
Sure.
dnhester26 has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
donleo has joined #commonlisp
NicknameJohn has joined #commonlisp
yitzi has quit [Ping timeout: 260 seconds]
yitzi has joined #commonlisp
azimut has joined #commonlisp
AndreiDuma has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Ping timeout: 268 seconds]
younder has quit [Remote host closed the connection]
amb007 has joined #commonlisp
younder has joined #commonlisp
Algernon69 has joined #commonlisp
Algernon69 has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
dnhester26 has joined #commonlisp
tyson2 has joined #commonlisp
jmdaemon has quit [Ping timeout: 252 seconds]
skin has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
toadlicker has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
<NotThatRPG>
I'm a fan of handler-bind, because the syntax for handler-case is so complicated and fussy. H-B is just simpler
NicknameJohn has quit [Ping timeout: 246 seconds]
skin has quit [Quit: Leaving.]
skin has joined #commonlisp
azimut has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pranavats has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
<mfiano>
How can I, with uiop:launch-program or similar, invoke an external process which infinitely logs output to stdout, and be able to 1) incrementally parse each line as they arrive, and 2) allow exited the external process when finished. For #1, I'm just not sure how to set up the stream correctly, and for #2, the process will not exit even when the invocation of the synchronous uiop:run-program
<mfiano>
is stopped.
<mfiano>
"finished" is defined when the user wants to quit, as this is an infinite logging process
khrbtxyz has quit [Ping timeout: 256 seconds]
mgl_ has joined #commonlisp
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
khrbtxyz has joined #commonlisp
<jcowan>
beach: CLOS classes, like most classes, have two protocols: a protocol for instantiation and a protocol for extension. Slots are not part of the former, but are part of the latter
<bike>
mfiano: you should be able to use :output :stream to get an input stream to parse. #2 depends on how you're supposed to shut down this logger. signal?
<jcowan>
That is, you cannot create a subclass without knowing the names of the slots in the superclass.
attila_lendvai has quit [Ping timeout: 252 seconds]
<mfiano>
bike: Yes, that's what I did. I am not quite sure how to wait for new input to parse/ensure i am not at the end.
yitzi has quit [Ping timeout: 252 seconds]
yitzi has joined #commonlisp
<mfiano>
As for #2, I just want to call a function that starts the parsing/external process, and stop everything when the debugger aborts it. For now it's a large REPL driven project
<bike>
you can use listen to tell if there's input to read on a stream
<bike>
what i'm saying for #2 is that it depends on how you stop this external process. that's defined by the external process.
dnhester26 has joined #commonlisp
<mfiano>
Ugh, out of my control...intended to be run indefinitely as a daemon, so I'd have to kill it manually.
<bike>
that's what i mean, yes. if the process won't shut itself down it's on you to do it.
<mfiano>
Ok, so there is no PID or anything stored, and I must invoke another shell command to find/kill it, like pkill?
amb007 has quit [Ping timeout: 264 seconds]
skin has quit [Quit: Leaving.]
amb007 has joined #commonlisp
<bike>
you can use process-info-pid
<bike>
which doesn't seem to be documented, annoying, but it's exported
<bike>
there's also terminate-process
<mfiano>
Aha
<bike>
which does either TERM or KILL
<bike>
(based on reading the source)
<mfiano>
I am having a hard time reading from the stream
<mfiano>
I will have to re-read about streams tomorrow
Kyuvi has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
metsomedog has quit [Remote host closed the connection]
zxcvz has joined #commonlisp
jonatack has joined #commonlisp
yitzi has quit [Ping timeout: 260 seconds]
yitzi has joined #commonlisp
yitzi has quit [Remote host closed the connection]
Inline has quit [Quit: Leaving]
amb007 has quit [Ping timeout: 268 seconds]
rendar has quit [Ping timeout: 264 seconds]
Pixel_Outlaw has joined #commonlisp
Inline has joined #commonlisp
varjag has joined #commonlisp
khrbtxyz has quit [Ping timeout: 260 seconds]
khrbtxyz has joined #commonlisp
tyson2 has joined #commonlisp
treflip has quit [Quit: Quit]
<beach>
jcowan: Why are you telling me this?
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
<beach>
jcowan: I mean, do you think I don't know most of CLOS?
mgl_ has quit [Ping timeout: 256 seconds]
<jcowan>
You've often said that slots are an implementation detail, most recently today (my time). I'm pointing out that that is incomplete.
khrbtxyz has quit [Ping timeout: 264 seconds]
khrbtxyz has joined #commonlisp
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
<Pixel_Outlaw>
Eventually I need to dig into the MOP but the CLOS' design has served me well enough. Any cool parlor tricks to be done in the MOP?
mesaoptimizer has joined #commonlisp
metsomedog has joined #commonlisp
jonatack has quit [Ping timeout: 246 seconds]
cosimone has joined #commonlisp
mgl_ has joined #commonlisp
<jcowan>
Given some non-portable CL code (it runs on SBCL currently), which other CLs would it be good to provide it for, given that some effort will be involved? This is not a question of whether it *can* be made to run on them, but as a matter of policy, which CLs are worth providing for?
<Mondenkind>
why is it non-portable?
NicknameJohn has joined #commonlisp
<NotThatRPG>
My highest priorities are always SBCL, CCL, and Allegro. Lispworks comes in fourth.
luna-is-here has joined #commonlisp
<jcowan>
I haven't tried them, but I think Lispworks and Allegro will be trivial.
<jcowan>
NotThatRPG: Why CCL (and for that matter, why not ECL)?
<jcowan>
Mondenkind: For $REASONS.
cosimone has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
<Mondenkind>
¯\_(ツ)_/¯
<Mondenkind>
the reasons always matter
<jcowan>
In this case I want an a priori judgment of which CLs to provide for.
<Mondenkind>
for that matter, it matters why you want to make it more portable
lucasta has joined #commonlisp
<jcowan>
My own itch is sufficiently scratched by SBCL. But there is no unanimity in the CL community, and I want to trade off between raising barriers and making extra work.
<jcowan>
(to other people and for myself, respectively)
<Mondenkind>
the amount of work required obviously depends on what's non-portable about the code
AndreiDuma has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
dnhester26 has quit [Remote host closed the connection]
azimut has joined #commonlisp
szkl has joined #commonlisp
dnhester26 has joined #commonlisp
epony has quit [Remote host closed the connection]
yitzi has joined #commonlisp
epony has joined #commonlisp
AndreiDuma has quit [Read error: Connection reset by peer]
yottabyte has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
attila_lendvai has joined #commonlisp
Lycurgus has joined #commonlisp
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
cage has quit [Client Quit]
yitzi has quit [Remote host closed the connection]
seok has quit [Quit: Client closed]
Inline has quit [Quit: Leaving]
LispTyro has quit [Quit: leaving]
tyson2 has quit [Read error: Connection reset by peer]
icebarf has quit [Remote host closed the connection]
_cymew_ has quit [Ping timeout: 252 seconds]
icebarf has joined #commonlisp
icebarf has quit [Remote host closed the connection]
icebarf has joined #commonlisp
kevingal has joined #commonlisp
samebchase has quit [Quit: Ping timeout (120 seconds)]
mesaoptimizer has quit [Ping timeout: 246 seconds]
mgl_ has quit [Ping timeout: 264 seconds]
bubblegum has quit [Ping timeout: 260 seconds]
qhong_ has joined #commonlisp
qhong has quit [Ping timeout: 252 seconds]
khrbtxyz has quit [Ping timeout: 256 seconds]
khrbtxyz has joined #commonlisp
lucasta has quit [Quit: Leaving]
bubblegum has joined #commonlisp
mesaoptimizer has joined #commonlisp
Gleefre has quit [Ping timeout: 250 seconds]
ronald has quit [Ping timeout: 255 seconds]
mesaoptimizer has quit [Read error: Connection reset by peer]
tyson2 has joined #commonlisp
traidare has quit [Ping timeout: 264 seconds]
ronald has joined #commonlisp
Odin-LAP has quit [Quit: What's this button do?]
Gleefre has joined #commonlisp
luna-is-here has quit [Ping timeout: 240 seconds]
ronald has quit [Ping timeout: 240 seconds]
tyson2 has quit [Remote host closed the connection]
Inline has joined #commonlisp
bubblegum has quit [Ping timeout: 245 seconds]
NicknameJohn has quit [Ping timeout: 245 seconds]
dino_tutter has quit [Remote host closed the connection]
Kyuvi has quit [Ping timeout: 250 seconds]
mgl_ has joined #commonlisp
dra has joined #commonlisp
shka has quit [Ping timeout: 240 seconds]
dnhester26 has quit [Remote host closed the connection]
mgl_ has quit [Ping timeout: 264 seconds]
bubblegum has joined #commonlisp
mesaoptimizer_ has joined #commonlisp
yottabyte has quit [Quit: Connection closed for inactivity]
khrbtxyz has quit [Ping timeout: 264 seconds]
tyson2 has joined #commonlisp
metsomedog has quit [Remote host closed the connection]
donleo has quit [Ping timeout: 252 seconds]
Inline has quit [Read error: Connection reset by peer]