v88m has quit [Read error: Connection reset by peer]
random-nick has quit [Ping timeout: 252 seconds]
<green_>
I'm just starting to use ecl. In sbcl, when I have '(defparameter +version+ (uiop:read-file-form "version.sexp"))' and dump the core/create an executable, +version+ is all good. I don't read version.sexp. With ecl, I can create an executable, but no matter what I try, it always wants to read version.sexp. How do I fix this?
<green_>
(I mean, read version.sexp at runtime. I want it baked into the executable.)
pfdietz has quit [Quit: Client closed]
herjazz has joined #commonlisp
rtypo has quit [Ping timeout: 264 seconds]
pfdietz has joined #commonlisp
lucasta has joined #commonlisp
<green_>
ugh.. I solved it with macros
ethanxxxl has quit [Ping timeout: 252 seconds]
josrr has quit [Remote host closed the connection]
akoana has joined #commonlisp
edgar-rft has quit [Quit: don't waste your life by reading this]
daox has joined #commonlisp
daox has quit [Ping timeout: 260 seconds]
ethanxxxl has joined #commonlisp
amb007 has joined #commonlisp
v88m has joined #commonlisp
ethanxxxl has quit [Ping timeout: 264 seconds]
amb007 has quit [Ping timeout: 268 seconds]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
<kanuba>
green_: Just put a #. before the (uiop:...). Also, reserve +foo+ for constants, not special dynamic variables; earmuffs are intended to convey the specialness message in this case.
<aeth>
yes, sometiems in build or testing you need to do things that otherwise have a code smell, such as the #. read eval
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
v88m has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
decweb has quit [Ping timeout: 272 seconds]
v88m has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
lucasta has quit [Quit: Leaving]
ethanxxxl has joined #commonlisp
metsomedog has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
akoana has quit [Quit: leaving]
daox has joined #commonlisp
daox has quit [Ping timeout: 260 seconds]
v88m has joined #commonlisp
Jach has quit [Quit: Leaving.]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
triffid has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
cam-Guest123456 has joined #commonlisp
ethanxxxl has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
holycow has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
v88m has quit [Read error: Connection reset by peer]
v88m has quit [Read error: Connection reset by peer]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
daox has quit [Ping timeout: 240 seconds]
amb007 has quit [Ping timeout: 252 seconds]
danza has joined #commonlisp
amb007 has joined #commonlisp
v88m has joined #commonlisp
ocra8 has quit [Quit: WeeChat 4.2.2]
<green_>
ugh.. homebrew for Linux can't handle sbcl-dumped executables, because it rewrites the ELF files in a way that loses the image core.
<green_>
you can have apps with external core files, but don't they have to be updated every time sbcl is updated? I don't understand the sbcl core compatibility story.
herjazz has quit [Quit: leaving]
<beach>
At which point is the ELF file modified?
<green_>
patchelf.rb after the formula's install step
v88m has quit [Read error: Connection reset by peer]
<green_>
why doesn't sbcl just add an ELF section to the binary with the core instead of doing the weird thing it does?
<beach>
I don't quite understand. What is the "formula's install step"?
v88m has joined #commonlisp
<green_>
formulas are homebrew's equivalent to rpm spec files. you write ruby code to install your app. then it rewrites the installed ELF files to fix up various things.
<beach>
Oh wow!
<beach>
And what is the "weird thing [SBCL] does"?
<beach>
Sorry for being so ignorant.
<green_>
It takes an ELF binary and just appends the lisp core image to end of it. A nice enough hack, I suppose, but it is non-standard. ELF provides a way to include arbitrary sections in binaries.
<green_>
You can just slap it in with one of the binutils tools.
<beach>
Yes, I see. Thanks for the explanation.
<green_>
SBCL even seems to look for a "lisp.core" section. Maybe I can do this myself?
<Shinmera>
green_: don't run strip on the binaries
<Shinmera>
any build system should have an option to disable binary stripping
wacki has joined #commonlisp
tfeb has joined #commonlisp
tfeb has quit [Client Quit]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
tok has quit [Ping timeout: 260 seconds]
varjag has quit [Ping timeout: 252 seconds]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pawa2 has quit [Quit: leaving]
wacki has joined #commonlisp
danza has quit [Remote host closed the connection]
danza has joined #commonlisp
danza has quit [Remote host closed the connection]
dom2 has joined #commonlisp
puchacz has joined #commonlisp
v88m has quit [Read error: Connection reset by peer]
varjag has joined #commonlisp
v88m has joined #commonlisp
daox has joined #commonlisp
daox has quit [Ping timeout: 272 seconds]
bjorkint0sh has joined #commonlisp
bjorkintosh has quit [Ping timeout: 240 seconds]
ocra8 has joined #commonlisp
char has joined #commonlisp
<alcor>
Are there any guidelines on when to use defparameter/defvar in CL vs. using some other abstraction? I remember there was an article from many years ago that explained how to use dynamic scoping to replace some Java/C++ish "OOP patterns", but I can't seem to find it.
<beach>
One reason for using special variables is when you have a long call chain of functions but only the leaf needs the information. With function parameters, you would then have to pass the information in each call.
<alcor>
Is it idiomatic to use them as replacement for the decorator pattern (aka for hooks) in CL? This is done a lot in Emacs Lisp, where a (funcall *something-hook* …) is placed deep in a leaf call to allow callers up the stack to inject some behavior.
<beach>
I use CLOS for that kind of stuff, like generic functions with auxiliary methods.
<alcor>
CLOS method combinations only work with generic functions though. They can't be used with freestanding `defun'-defined procedures.
<beach>
Sure, but that's a reason to use generic functions over ordinary functions
amb007 has quit [Ping timeout: 260 seconds]
<alcor>
Hmm, that's an interesting idea. The functions I want to decorate/"advice" don't really make any use of polymorphic dispatch. In that case there would be at most only one defmethod for the defgeneric. But it might be worth it if it allows that kind of customization via method combinations.
<alcor>
So, Pros: It's standard. Cons: It (kind of) looks strange.
kevingal has quit [Ping timeout: 264 seconds]
<alcor>
It's definitely cleaner than using elisp-style special variable hooks though.
v88m has quit [Read error: Connection reset by peer]
<bike>
i think it depends. if there's genuinely no dispatch, that might pose a problem. you don't want a situation where two different libraries using yours decide they want a hook, and to do that they define unspecialized :before methods
<bike>
they would clash
<alcor>
bike: Right, I forgot about that. Hooks compose better, if you define the hook variable to be a list of funcallables.
v88m has joined #commonlisp
<bike>
technically you could work through that with a custom method combination
<bike>
but i think that's more trouble than it's worth
<bike>
(in this particular situation. custom method combinations are useful sometimes)
v88m has quit [Read error: Connection reset by peer]
varjag has quit [Remote host closed the connection]
puke has quit [Remote host closed the connection]
varjag has joined #commonlisp
puke has joined #commonlisp
puke has quit [Max SendQ exceeded]
puke has joined #commonlisp
<alcor>
bjorkint0sh++ – thanks, I think this was the one 👍. Didn't know it was written by Norvig.
rogersm has joined #commonlisp
nybble has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
varjag has quit [Ping timeout: 252 seconds]
metsomedog has joined #commonlisp
yitzi has joined #commonlisp
cam-Guest123456 has quit [Ping timeout: 250 seconds]
rgherdt has left #commonlisp [Leaving]
<green_>
Shinmera: I think the stripping is a side effect of relocating rpaths with patchelf.rb in homebrew for linux. Doesn't appear to be any way to prevent this.