jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | offtopic --> #lispcafe
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
igemnace has joined #lisp
orivej has joined #lisp
Nilby has quit [Ping timeout: 245 seconds]
aeth_ is now known as aeth
kmeow has joined #lisp
MetaYan_ has quit [Ping timeout: 240 seconds]
karlosz has joined #lisp
notzmv has joined #lisp
perrier-jouet has joined #lisp
notzmv is now known as Guest13599
rumbler31 has joined #lisp
Codaraxis has joined #lisp
renzhi has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
kmeow has quit [Remote host closed the connection]
Spawns_Carpeting has joined #lisp
contrapunctus has joined #lisp
aartaka has joined #lisp
skapata has quit [Remote host closed the connection]
Guest13599 has quit [Ping timeout: 252 seconds]
monolithic has quit [Remote host closed the connection]
edvardo_ has quit [Quit: Leaving]
agumonkey has quit [Ping timeout: 252 seconds]
wxie has joined #lisp
whosit has joined #lisp
aartaka_d has joined #lisp
LispSporks has joined #lisp
rumbler31 has quit [Remote host closed the connection]
Sheilong has quit [Quit: Connection closed for inactivity]
rumbler31 has joined #lisp
aartaka has quit [Ping timeout: 268 seconds]
shifty has joined #lisp
nij has joined #lisp
<nij> Hello #lisp! I'm trying to understand how CL extension got bootstrapped. One specific example I'm looking at is sbcl's timer. In CLHS, there's no timer; while in sbcl, there's timer. However, sbcl bootstraps itself.. but the support for timer must come somewhere. After digging into the repo, it seems that the magic is #'alien-funcall. However, I fail to dig more into it. Could someone explain or provide some hint - how are extension
<nij> bootstrapped?
renzhi has quit [Ping timeout: 250 seconds]
<Bike> it's not really a matter of bootstrapping. alien-funcall is an extension to call C ABI functions.
<nij> I see. Does CLHS have C ABI calling support?
gaqwas has quit [Ping timeout: 240 seconds]
<Bike> no, it's an extension.
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
<no-defun-allowed> SBCL doesn't use timers as part of bootstrapping, so it's perfectly reasonable.
<nij> Right, Bike showed that it's C ABI calling that's more primitive.
<nij> Hmm.. then how did SBCL add C ABI calling into it?
<no-defun-allowed> Yes, once there is an SBCL compiler running, it can generate the code to ALIEN-FUNCALL.
srhm has quit [Quit: Konversation terminated!]
<Bike> The compiler is written to translate alien-funcall into appropriate machine code
<nij> Oh! Finally it makes sense. Thank you :D
orivej has quit [Ping timeout: 252 seconds]
skapata has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
<nij> Hmm.. just found out that bd threads on sbcl are just some alias of sb threads.. why should i use bd-threads then? For portability?
<nij> If it's for portability, I still have to worry if bd thread is correctly implemented over other implementations..
shifty has joined #lisp
<Bike> for portability, yes.
<no-defun-allowed> Yes, Bordeaux-threads should be used for portability, and it is implemented correctly for any implementation I have used.
<Bike> if you use sb threads you know that no other implementation implements them, sooooo
<nij> Which is more responsible.. I'd say.
<nij> Oh actually no. Those using other implementations should understand what bd gives them.
<Bike> knowing it won't work at all is more responsible?
<no-defun-allowed> If you want to argue that, the threading implementation in SBCL could be broken too. And then you'd have to fix up all your code to work on another implementation.
<nij> I should only say that it's tested and designed for sbcl.. it might behave unexpectedly for other impls.
<Bike> that's true of literally any code you write
<nij> no-defun-allowed: you're right.
<nij> Sin from abstraction!
<nij> Is there any system-level timer abstraction? For sbcl we have its timer.. but while sb-threads are abstracted by bd-threads, sb-timers do not seem to be.
<no-defun-allowed> Of course SB-THREAD would only work on SBCL, but (as I understand it) the Bordeaux thread protocol is derived from B.2 and B.3 of the CLIM specification (Multi-processing and Locks respectively).
<Bike> there's a trivial-timer library
<nij> Bike, does trivial-timer call system timer? Or it's an abstraction over bd-threads? Based on its dependency, I don't see how it calls system timers.
<Bike> dunno
<no-defun-allowed> I recall that handled ERROR strangely on Clozure, because it would fall back to creating a new thread which has none of the condition handlers set up.
<no-defun-allowed> Oh, that was some time-out library, not timer.
edgar-rft has quit [Quit: Leaving]
edgar-rft has joined #lisp
<no-defun-allowed> nij: It uses SBCL's timers on SBCL, but falls back to a portable thread implementation.
shifty has quit [Ping timeout: 265 seconds]
<nij> Hmm.. for common lisp to "grow", we cannot alter the standard (ie those described by CLHS). Instead, we should implement them in new implementations. But then after a period of time, someone should come out and unify them, like bd-threads for threads.. right?
shifty has joined #lisp
<nij> If this is the case, then where is CL moving toward?
<nij> no-defun-allowed: If trivial-timer is portable, then what timers does it call on other implementations?
<no-defun-allowed> nij: It uses another thread to run timer functions.
zeroish has joined #lisp
<nij> Oh.. so on sbcl it's sbcl's.. but on other implementations it abstracts over threads to make a timer.
<nij> In particular, in the later case, it's not calling native system timers.
Oladon has joined #lisp
LispSporks has quit [Ping timeout: 245 seconds]
<nij> Hmm.. suppose I have a function (lambda () ...), how do I call it with all outputs redirected to some file?
shifty has quit [Ping timeout: 260 seconds]
<no-defun-allowed> (with-open-file (*standard-output* pathname :direction :output ...) (funcall function))
<nij> Oh I see. The macro with-open-file changes *standard-output* locally. That makes sense.
<Bike> of course if you output to some other stream that won't be redirected, but *standard-output* is the default output stream
<nij> Make sense make sense! All the pieces are coming together tonight :-D
entre-parenteses has quit [Ping timeout: 250 seconds]
LispSporks has joined #lisp
<beach> Good morning everyone!
<nij> hi beach
gabiruh has quit [Remote host closed the connection]
gabiruh has joined #lisp
asarch has quit [Quit: Leaving]
entre-parenteses has joined #lisp
Josh_2 has quit [Ping timeout: 252 seconds]
zeroish has quit [Ping timeout: 252 seconds]
nij has left #lisp ["ERC (IRC client for Emacs 27.1)"]
xkapastel has quit [Quit: Connection closed for inactivity]
muyinliu_ has joined #lisp
LispSporks has quit [Ping timeout: 276 seconds]
semz has quit [Ping timeout: 276 seconds]
<muyinliu_> cl-disruptor, a high performance inter-thread messaging library, a port of LMAX Disruptor in Common Lisp, https://github.com/muyinliu/cl-disruptor
<Bike> oh ho, more atomics. have you seen shinmera's portability library?\
<muyinliu_> Y
<muyinliu_> different purpose
<Bike> oh, i meant in relation to the cl-atomic thing there.
mindCrime_ has quit [Ping timeout: 252 seconds]
semz has joined #lisp
semz has quit [Changing host]
semz has joined #lisp
Stanley00 has joined #lisp
muyinliu_ has quit [Quit: Textual IRC Client: www.textualapp.com]
DHARMAKAYA has joined #lisp
lonjil has quit [Quit: No Ping reply in 180 seconds.]
hendursaga has quit [Ping timeout: 240 seconds]
paul0 has quit [Remote host closed the connection]
paul0 has joined #lisp
lonjil has joined #lisp
hendursaga has joined #lisp
mindCrime_ has joined #lisp
opcode has quit [Quit: leaving]
sp41 has quit [Ping timeout: 252 seconds]
mindCrime_ has quit [Ping timeout: 268 seconds]
srandon111 has quit [Remote host closed the connection]
imode has joined #lisp
narimiran has joined #lisp
entre-parenteses has quit [Quit: ERC (IRC client for Emacs 27.2)]
Bike has quit [Quit: Lost terminal]
ggoes has quit [Ping timeout: 268 seconds]
shifty has joined #lisp
gaqwas has quit [Ping timeout: 260 seconds]
shifty has quit [Ping timeout: 240 seconds]
ggoes has joined #lisp
shifty has joined #lisp
DHARMAKAYA has quit [Quit: Turning off a portion of this simulation.]
theothor` has joined #lisp
theothor` has quit [Remote host closed the connection]
Inline has joined #lisp
opcode has joined #lisp
hhdave_ has quit [Ping timeout: 268 seconds]
Sauvin has joined #lisp
kmeow has joined #lisp
Inline has quit [Remote host closed the connection]
Inline has joined #lisp
waleee-cl has quit [Quit: Connection closed for inactivity]
DHARMAKAYA has joined #lisp
DHARMAKAYA has quit [Quit: Turning off a portion of this simulation.]
andrei-n has joined #lisp
skapata has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 252 seconds]
opcode has quit [Quit: WeeChat 2.3]
shifty has joined #lisp
hypercube has quit [Quit: WeeChat 3.1]
opcode has joined #lisp
andreyorst` has joined #lisp
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
<phoe> good morning
monolithic has joined #lisp
<beach> Hello phoe.
<beach> Today I'll try to figure out whether the problems with my sound have to do with the microphone or with OBS.
hiroaki has joined #lisp
<phoe> OK - if you need any support, please let me know
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
<beach> Thanks. I'll keep that in mind.
<phoe> today is the worst day of the year
orivej has joined #lisp
<phoe> maximum number of days until the next ELS
Oladon has quit [Quit: Leaving.]
<flip214> phoe: it's not that bad, only 7½ months till winter solstice ;)
aindilis` has quit [Ping timeout: 246 seconds]
varjag has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
imode has quit [Ping timeout: 240 seconds]
mtd_ has quit [Ping timeout: 248 seconds]
irc_user has joined #lisp
theothornhill has joined #lisp
shifty has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
<beach> phoe: There is nothing wrong with my microphone. I just used Audacity to record my voice and the sound is quite good. So the problem is with OBS then.
narimiran has quit [Ping timeout: 240 seconds]
<beach> I'll try OBS again, but holding the microphone closer....
<easye> Morning all. Is there a pure ANSI CL library someone might recommend to convert JSON to YAML?
narimiran has joined #lisp
narimiran has quit [Ping timeout: 240 seconds]
lawt has quit [Ping timeout: 260 seconds]
lawt has joined #lisp
cchristiansen has quit [Ping timeout: 240 seconds]
narimiran has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
dickbarends has joined #lisp
lowryder has quit [Ping timeout: 268 seconds]
lowryder has joined #lisp
<MichaelRaskin> easye: isn't JSON a subset of YAML in the first place?
<easye> MichaelRaskin: moments ago I just learned this from p_l Still digesting the various libraries.
Lycurgus has joined #lisp
agumonkey has joined #lisp
<easye> My ultimate need is a JSON Schema validator in pure ANSI that works well for recursively defined schemas.
<p_l> easye: there is a swagger implementation hiding somewhere on github in pure CL
<p_l> it might have useful bits and pieces
<easye> p_l: ACK will review.
* easye feels a blog post brewing here (eventually)
<Lycurgus> in a related, is ANSI currently relevant to CL?
<easye> Lycurgus: see the Monday panel from ELS2021 ;)
<Lycurgus> is it online already?
<p_l> Lycurgus: as in ANSI CL? Yes
<Lycurgus> no I meant the panel
<easye> What I mean by ANSI CL is sort of a shorthand for saying "portable across contemporary ANSI CL implementations)
<Lycurgus> also last I knew ANSI standards were priced
<easye> Lycurgus: the full twitch stream is available, for which you have to seek to the right spot.
<easye> The ad-hoc ELS tech crew will be editing it into bite-sized YouTube chunks as time permits.
<Lycurgus> ah, thx for clarification
<easye> <https://www.twitch.tv/videos/1009429697> at roughly 7h47m
duuqnd has joined #lisp
<p_l> easye: btw, have you seen https://gitlab.com/Gnuxie/json-schema2/ ?
shifty has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
<easye> p_l: no, that looks like better code than cl-json-schema that is in Quicklisp
<easye> Thanks!
<p_l> easye: I believe it's second edition of cl-json-schema
<easye> Ah, yes. And using CLOS, which is quite reasonable.
<easye> Thanks again.
shifty has quit [Ping timeout: 246 seconds]
ljavorsk has joined #lisp
surabax has joined #lisp
klltkr has joined #lisp
lowryder has quit [Ping timeout: 252 seconds]
lowryder has joined #lisp
asarch has joined #lisp
anticrisis has quit [Read error: Connection reset by peer]
CrashTestDummy2 has quit [Read error: Connection reset by peer]
Inline has quit [Ping timeout: 260 seconds]
<asarch> How would you remove entirely a SBCL that has been compiled/installed using the tarball from the project site?
<asarch> I cannot find the "make uninstall" command
pve has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
hendursaga has joined #lisp
<flip214> asarch: run "install.sh" again and check which files are written to?
retropikzel has quit [Ping timeout: 245 seconds]
xsperry has quit []
<asarch> Ok. Thank you
<asarch> Thank you very much :-)
CrashTestDummy has joined #lisp
xsperry has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
kevingal has joined #lisp
Lycurgus has quit [Quit: Exeunt]
zacts has joined #lisp
yonkunas has quit [Quit: Connection closed for inactivity]
asarch has quit [Quit: Leaving]
andreyorst` has joined #lisp
undvrainbowvita8 has quit [Read error: Connection reset by peer]
heisig has joined #lisp
<zacts> hello #lisp
<beach> Hello zacts.
andreyorst` has quit [Read error: Connection reset by peer]
andreyorst` has joined #lisp
irc_user has quit [Quit: Connection closed for inactivity]
kmeow has quit [Ping timeout: 250 seconds]
dickbarends has quit []
theothornhill has quit [Remote host closed the connection]
theothornhill has joined #lisp
actuallybatman has quit [Ping timeout: 252 seconds]
hhdave has joined #lisp
OlCe has joined #lisp
nij has joined #lisp
kmeow has joined #lisp
nij has quit [Client Quit]
nicktick has quit [Ping timeout: 260 seconds]
cchristiansen has joined #lisp
CrashTestDummy2 has joined #lisp
nicktick has joined #lisp
CrashTestDummy has quit [Ping timeout: 240 seconds]
muyinliu_ has joined #lisp
cosimone has joined #lisp
mokulus has joined #lisp
<Shinmera> Our first Lisp game is now available for purchase on Steam! https://store.steampowered.com/app/1605720/Eternia_Pet_Whisperer/?beta=0
<Shinmera> To my knowledge that's the first Lisp game on steam at all :)
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vegansbane6963 has quit [Quit: The Lounge - https://thelounge.chat]
ukari has quit [Remote host closed the connection]
mokulus has quit [Quit: WeeChat 3.1]
muyinliu_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Codaraxis_ has joined #lisp
<jdz> Shinmera: How's your collaboration with the publisher? :D
retropikzel has joined #lisp
<Shinmera> My publisher is in pretty dire straits and needs more money
aartaka has joined #lisp
zaquest has quit [Quit: Leaving]
Codaraxis has quit [Ping timeout: 240 seconds]
ghard`` has joined #lisp
zaquest has joined #lisp
<heisig> Bought it. Thanks Shinmera!
<Shinmera> Thank you for your support! :D
aartaka_d has quit [Ping timeout: 240 seconds]
nij has joined #lisp
ghard` has quit [Ping timeout: 250 seconds]
karlosz has quit [Quit: karlosz]
<nij> Hello! I hope to launch a thread that should run indefinitely. It doesn't seem that there would be an unhandled case. But no one can be 100% on this, I think. So, what should I do for it to move on if it happens to have any conditions, and log every thing in the same time?
<phoe> (loop (tagbody :continue (handler-bind ((error (lambda (c) (log-error c) (go :continue))) (do-thing)))
hiroaki has quit [Ping timeout: 260 seconds]
<phoe> Shinmera: bought it! thank you!
<Shinmera> No, thank /you/!
<phoe> No, thank //you//!
<phoe> (let's hope this recursion terminates)
<Shinmera> :)
<flip214> wouldn't be a problem with tail calls... lifetime of the universe will stop most things eventually
<ghard``> Shinmera: bought!
karlosz has joined #lisp
<Shinmera> Thanks!
<nij> phoe: does that only handle errors? How about other unexpected condition?
<phoe> nij: do you want to handle warnings?
<phoe> via muffle-warning or something?
<phoe> you can do that too
<phoe> and why would you want to handle non-error non-warning conditions in bulk?
<nij> I don't really know how many kinds of conditions are out there. I want to handle them.
<phoe> why?
<nij> The point is that I want them to run indefinitely, without my paying attention to it constantly.
<phoe> I mean, why handle all conditions
<nij> Maybe I can come back 6 months later, read the log, and fix the case.
<nij> Because.. hmm.. iirc if some conditions aren't handled, the thread will pause there.
<phoe> that is, errors
<phoe> if a condition is passed to the ERROR function, which does SIGNAL and then INVOKE-DEBUGGER
<phoe> the latter causes a pause
<nij> Uh.. I must misunderstand something. Aren't errors in CL yet another condition, which is some object people can create?
<phoe> they are
<ghard``> shinmera: FYI it crashes on M1 mac mini
<Shinmera> Oh dear. Well, I don't have the hardware to test that.
<nij> phoe: only unhandled errors may pause the thread, but others conditions won't?
<phoe> more or less
<Shinmera> Can't say I'm surprised, though :/
<nij> :|
<ghard``> Indeed macOS is a spiky beast
<phoe> unless someone does silly stuff like calling SIGNAL with an error condition that should not proceed with execution
<phoe> or calling ERROR with a non-error condition, or calling INVOKE-DEBUGGER directly
<phoe> but that's stuff that you shouldn't care about as a library user
<phoe> so: yes, only unhandled errors can cause the thread to enter the debugger unless the code explicitly does something extraordinary
<phoe> and that's most likely a bug if it does.
<nij> I see..
<nij> Maybe this is what I want - I want to suppress all debuggers and just let it logged. Is that possible?
hiroaki has joined #lisp
<ghard``> not much useful info in the stack either
<phoe> nij: instead of handler-bind, you can bind *debugger-hook*
<phoe> to log the thing and then perform a non-local jump like via GO
<phoe> would be slightly overkill, IMO, but would also work
<nij> However, when a debugger is supposed to be on, usually it will present a list of options. Which option should I let my thread choose automatically in order to proceed?
<phoe> none
<phoe> if you tell your *debugger-hook* to perform a jump then you'll never enter the proper debugger
<phoe> so you don't need to pick a restart
ghard`` has quit [Quit: cleanup]
<nij> I see. Thanks :D I think I'm now ready to write a type called "service".
ghard has joined #lisp
<nij> Before doing that, I just want to make sure it's not obviously done yet.. as I think it should be there already..
<phoe> loop over tagbody over handler-bind should be enough
<nij> So a service is just a wrapped function, which will be fired as a thread. But after it's fired, it must log every output to some file, and does the error handling stuff I say above.
<phoe> alternatively loop over restart-case over handler-bind with invoke-restart
<phoe> which is the same, just using the restart subsystem
duuqnd has quit [Ping timeout: 240 seconds]
<nij> Is there a "safe" thread, meaning a thread that completely logs all output, and skip (but log) any errors when it's running?
<phoe> what do you mean, safe?
<phoe> and what do you mean, "skip any errors"?
<Shinmera> skipping errors by definition is not safe :)
<nij> By a "safe" thread I mean a thread that does (1) all logging (2) all things I asked above automatically.
<nij> I do intend for it to skip (but still be aware of, and log) any error it encounters.
<phoe> what do you mean by skipping an error
<nij> This ==> (loop (tagbody :continue (handler-bind ((error (lambda (c) (log-error c) (go :continue))) (do-thing)))
<phoe> just spawn such a thread yourself then
<phoe> and if an error is signaled, it'll log it and then jump back to the toplevel loop
<nij> OK! I
<_death> handler-case
<nij> oops) am just double check that it hasn't been there. I will write my own.
<phoe> _death: no
<phoe> handler-case will destroy stacktrace information
<phoe> by the time control reaches the handler there'll be no stacktrace to log anymore
<flip214> handler-bind keeps the stack
<_death> phoe: ok
<phoe> there's a variant of handler-case that I described in one of the TCLCS appendices that executes the handler and only then unwinds, but it's not standard
vegansbane6963 has joined #lisp
cosimone has quit [Ping timeout: 240 seconds]
duuqnd has joined #lisp
OlCe has quit [Ping timeout: 240 seconds]
zacts has quit [Quit: bbl]
theothornhill has quit [Read error: Connection reset by peer]
theothornhill has joined #lisp
shifty has joined #lisp
cchristiansen has quit [Remote host closed the connection]
srhm has joined #lisp
v88m has quit [Ping timeout: 252 seconds]
jnewton has joined #lisp
<beach> Hello jnewton.
<beach> Welcome to #lisp.
<phoe> jnewton: gasp! finally!
<jnewton> hello
<phoe> after all the years you're here
<phoe> hello :D
<heisig> Hi jnewton!
<Xach> jnewton is ici
<phoe> ici?
<phoe> minion: what does ici mean?
<minion> Indubitable Collectivism Inburnt
* phoe thinks
<jnewton> ici is french for here
<phoe> oooh, thanks
<beach> I am responsible for convincing jnewton to try IRC.
* beach hopes he won't regret it.
<jnewton> I have a few ideas about ELS 2022. hope not to right the boat too much.
<jackdaniel> hey o/
<beach> I am off for a lunch break. Have a nice discussion.
<phoe> beach: :D
<flip214> jnewton: yeah, better to have left it early before it goes down under ;)
rumbler31 has quit [Ping timeout: 252 seconds]
duuqnd has quit [Ping timeout: 240 seconds]
kiwi_36 has joined #lisp
duuqnd has joined #lisp
yoonkn has joined #lisp
kiwi_36 has quit [Remote host closed the connection]
notzmv has joined #lisp
notzmv is now known as Guest78827
yoonkn has quit [Client Quit]
karlosz has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Codaraxis has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
orivej has joined #lisp
amb007 has joined #lisp
Codaraxis_ has quit [Ping timeout: 240 seconds]
OlCe has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Nilby has joined #lisp
<jnewton> join #els2021
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
* jdz would expect either #elsconf or #els2022
<jdz> But what do I know.
<phoe> we haven't created the latter yet
<phoe> and the former has all the people who organized els2021
<jdz> Oh, the secret club.
<phoe> yes
duuqnd has quit [Quit: Duuqnd]
amb007 has quit [Read error: Connection reset by peer]
ukari has joined #lisp
amb007 has joined #lisp
duuqnd has joined #lisp
andreyorst` has quit [Read error: Connection reset by peer]
varjag has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
yoonkn has joined #lisp
andreyorst` has joined #lisp
rodriga has joined #lisp
xTriixrx has joined #lisp
xTriixrx has quit [Client Quit]
yoonkn has left #lisp ["ERC (IRC client for Emacs 28.0.50)"]
Guest78827 is now known as notzmv
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
renzhi has joined #lisp
hiroaki has quit [Ping timeout: 260 seconds]
Bike has joined #lisp
lotuseater has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
<beach> jnewton: Here is the link to the document about a Lisp OS that I mentioned on the phone: http://metamodular.com/closos.pdf
<beach> scymtym: Do you have a link to documentation for Eclector?
<beach> jnewton: That link is for you as well.
<beach> scymtym: Thanks!
<scymtym> sure
hiroaki has joined #lisp
andreyorst` has quit [Ping timeout: 240 seconds]
Stanley00 has quit [Remote host closed the connection]
ljavorsk has quit [Ping timeout: 268 seconds]
andreyorst` has joined #lisp
<pjb> nij: if log error doesn't use implementation specific API to collect and report the backtrace, then you can use handler-case instead of handler-bind. (loop (handler-case (do-thing) ((error (c) (log-error c)))))
<pjb> Sorry: (loop (handler-case (do-thing) (error (c) (log-error c))))
kali123 has joined #lisp
<kali123> salutare
<nij> Is there a tiny project that uses CFFI? I'm new to it and hope to see it working in action. Thanks :)
<nij> pjb: thanks:)
<kali123> saluatre
<semz> nij: CFFI's manual has a tutorial project that fits this description
leeren has quit [Quit: leeren]
<semz> I wish the reference part of the manual was more comprehensive...
<pjb> nij: it wraps a pkcs11 library in a low-level lisp package and a high-level lisp package, which is rather a classic way to do it.
DarthMIF is now known as MIF
leeren has joined #lisp
<pjb> nij: pcks11-cffi gives the low-level wrapping (contains the defcfun declarations, etc.
<pjb> nij: and pcks11.lisp wraps the low-level C function calls in lisp calls, processing error handling and parameter conversions, etc.
<pjb> type checking.
attila_lendvai_ has joined #lisp
attila_lendvai has quit [Ping timeout: 260 seconds]
<pjb> nij: notably, when you have a library with a consistent API, you can write macros to perform the work in a consistent way, so wrapping over is easy: https://github.com/informatimago/lisp/blob/master/clext/pkcs11/pkcs11.lisp#L2011
<pjb> nij: an example of usage of this library is in https://github.com/informatimago/scquery (sources-cl, not sources, which contains the C version).
<beach> Hello kali123.
<nij> pjb: Wow seems cool! (but a bit complicated)
<pjb> The complication is only in the subject library really.
<beach> kali123: Are you new here? I don't recognize your nick.
<kali123> hello all :D
<kali123> how are you ?
<kali123> how change nick ?
<pjb> nij: I guess we could give a hello world example, but this wouldn't teach you anything more than the cffi manual.
<beach> kali123: /nick ...
<kali123> ok?
<kali123> nick
<kali123> no change ..this command not good
<beach> First a slash then the word `nick' then the new nick you like.
<semz> yes
<beach> kali123: Like: /nick my-new-nick and be sure the slash is the first character on the line.
<nij> I found cffi hard to grok.. maybe it's due to my lack of grasp of C..
<kali123> :P
<beach> nij: I strongly recommend you use Common Lisp exclusively if you possibly can. Using FFI makes everything much harder.
<kali123> pff
<kali123> no change :(
<splittist> nij: how is asking questions about it on irc going to help you? I usually find trying things out - and with lisp that's usually very easy - much more likely to illuminate the particular areas of ignorance I want to address.
<pjb> nij: what didn't you understand in cffi?
<nij> splittist: I never know. Sometimes on some topics there will be super helpful advises. Sometimes no..
<pjb> nij: for example, there's a clock() -> long (actually clock_t but it's a long) function in libc. (cffi:defcfun (clock "clock") :long) #| --> clock |# (clock) #| --> 147584979 |# (- (clock) (progn (sleep 1) (clock))) #| --> -110 |#
yonkunas has joined #lisp
<kali123> 😎️
kali123 has quit [Quit: kali123]
NO_Name has joined #lisp
zeroish has joined #lisp
<NO_Name> 🤩️
<nij> pjb: why wouldn't the answer be -60, but -110?
<pjb> nij: another example, always in libc, there's a int chmod(const char*path,int mode) function: (cffi:defcfun (change-file-mode "chmod") :int (path :string) (mode :int)) (change-file-mode "/tmp/foo.c" #o444) #| --> 0 |# ls -l /tmp/foo.c # --> -r--r--r-- 1 pjb wheel 29 May 4 05:08 /tmp/foo.c
<pjb>
<pjb> nij: overhead.
<nij> I tried it and it utters different value everytime.
<pjb> nij: and it depends on the value of the C macro: CLOCKS_PER_SEC
<pjb> So you would have to read the C header file, or write a little C function to get it: #include <time.h> long clocks_per_sec(){return CLOCKS_PER_SEC;} and use cffi to call it.
<pjb> nij: C APIs are often not designed to be used in foreign code, so they use things like C macros and other stuff that goes thru difficultly. You may have to write some C portability code sometimes.
<pjb> nij: of course, there are more complex cases, eg. out or inout parameters. Then you may have to allocate temporary storage for them, and convert the data. See the pcks11 example for that.
attila_lendvai_ has quit [Ping timeout: 240 seconds]
<nij> How about when the output of a C function are some strange structures?
<pjb> nij: you can declare structures in cffi too.
<nij> In the first example you gave, the output was an integer, which is easy to translate to Lisp.
<pjb> nij: but there are special cases. For example, macOS uses some structures with #pragma packed , and cffi doesn't deal with that.
<nij> I see. Say I'm using a function in some C library, I need to translate the structures defined in that C library by myself?
<pjb> nij: so I find it easier and safer, to refer structures are mere memory blocks, and specify the offsets to the fields myself.
<nij> I see. Thank you so much!
<Nilby> defcstruct
<pjb> nij: note: this file was generated by swig.
<nij> Nilby: yeah. but most of the time I must translate the structures in to Lisp by using defcstruct, right?
<Nilby> nij: You don't have to translate. But it depends how you want to use them. If you want to use them conveniently in Lisp code that doesn't use CFFI, then yes. Usually one would provide a higher level interface to C code.
ukari has quit [Ping timeout: 240 seconds]
<nij> Nilby: I see. Thanks :)
snits has quit [Ping timeout: 260 seconds]
srandon111 has joined #lisp
dickbarends has joined #lisp
<pjb> It depends on the C API really. Sometimes, they use complex structures to be created by the client code, then it's more convenient to do that in lisp, and provide code to convert between lisp an C structures. Sometimes they use function calls to manipulate an internal state, and then it is easier, you just have to deal with the functions.
<pjb> void* make_point(); void point_set_x(void* pt,int x); void point_set_y(void* pt,int y); int point_x(void* pt); int point_y(void* pt);
<pjb> vs. typedef struct point {int x,y; } point_t; point_t* make_point(); void use_point(point_t* pt);
<pjb> using point_set_x is simplier from a FFI point of view than having to know how the struct point is laid out, and how to store or read it.
fourier has joined #lisp
fourier has quit [Changing host]
<pjb> Also, in terms of API, when the structure point evolves (they may add fields, or want to reorder them), code using point_set_x will always work, while code setting directly a structure may become incompatible.
theothornhill has quit [Read error: Connection reset by peer]
theothornhill has joined #lisp
snits has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
monolithic has quit [Read error: Connection reset by peer]
monolithic has joined #lisp
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
theothornhill has joined #lisp
jurov_ has quit [Ping timeout: 240 seconds]
jurov has joined #lisp
Inline has joined #lisp
theothornhill has quit [Ping timeout: 265 seconds]
theothornhill has joined #lisp
random-nick has joined #lisp
actuallybatman has joined #lisp
orivej has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
<jmercouris> so I have in my compiled image a REPL exposed
<jmercouris> and I did (asdf:load-asd "/home/jmercouris/Source/Lisp/some.asd")
aeth has quit [Ping timeout: 260 seconds]
<jmercouris> then I did (asdf:load-system :some-system) which was defined in some.asd
<jmercouris> however, this forces recompilation of systems on disk which are in NOT writable directories
<jmercouris> looking through the documentation I found *immutable-systems*
<jmercouris> so I figured, OK
<jmercouris> (map () 'asdf:register-immutable-system (asdf:already-loaded-systems))
<jmercouris> however, it doesn't seem to respect this
<jmercouris> and when I go to (asdf:load-system :some-system) it AGAIN tries to recompile
<jackdaniel> you want to mark them as preloaded
<jackdaniel> not as immutable
<jackdaniel> (after loading them of course)
<jmercouris> is there a register-preloaded?
<jmercouris> it seems there is
<jmercouris> 'register-preloaded-system'
aeth has joined #lisp
<jmercouris> (map () 'asdf:register-preloaded-system (asdf:already-loaded-systems))
<jmercouris> let me try that
<jmercouris> hm, it is still trying to compile things
shifty has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
<jackdaniel> you may want to try harder to provide a reproducible test case; ("foo" "bar") is indeed an illegal function call
<jmercouris> It sure is, but notice that it found that in a ASD
<jmercouris> it doesn't matter *what* I try to load
<jmercouris> it is always failing on trying to recompile cl-containers
<jackdaniel> asdf claims that it does some magic parsing of asd files, but it in reality reads them
<jackdaniel> s/reads/loads/
<jackdaniel> with a package bound to asdf-user preasumbly
theothornhill has joined #lisp
<jmercouris> who knows
<jackdaniel> it is easy to find out so probably someone does. /me goes afk
<Nilby> I've been living with the same problem for years. It's especially trouble when your not in control of the filesystem or quicklisp setup for the resulting images, and the REPL user may _want_ to reload some systems. I figured someday I would force asdf to do what I want.
<jmercouris> I'll try marking things before I dump the image
<jmercouris> I don't think that will matter
<jmercouris> but, maybe it does
theothornhill has quit [Ping timeout: 265 seconds]
delta has joined #lisp
jurov has quit [Ping timeout: 246 seconds]
<delta> Hello! I am trying to spawn multiple infinite-running processes and then, at an input from a user, send sigint to all of those processes and then exit the program. Can I get some help? I've found inferior-shell to launch processes and bordeaux-threads to make threads, but I'm not sure how to achieve exactly what I want.
theothornhill has joined #lisp
<beach> delta: Bordeaux threads will not create Unix processes. Only threads.
<beach> delta: Presumably, to fork a process from a Common Lisp image, you would need to use some implementation-specific function, like the POSIX interface of SBCL.
<delta> Right, but I can make a thread and then spawn a process from that thread using inferior-shell, right?
<delta> Perhaps I'm getting myself turned around and should move back to square one and just spawn a regular unix process.
<beach> I don't know what inferior-shell is. Sorry. You would typically have a Common Lisp REPL, and you don't have to create a thread from there to fork a process.
<beach> So you are not trying to "spawn a regular unix process"? What other kinds of processes are there?
<beach> What we today call "threads" used to be called "processes" in the Lisp world.
<beach> If threads are what you want, then Bordeaux threads can do it.
theothornhill has quit [Ping timeout: 252 seconds]
<delta> inferior-shell is just a library I found from googling how to run a shell command basically. I am trying to spawn a regular unix process, I'm just trying to execute an infinitely running process and interrupt it when I choose to. I think I reached for Bordeaux too quickly because it seems to be the de facto multiprocessing thing, but really what I wanted all a long was to just fork and store the PID to eventually send SIGINT to.
<delta> TIL about "threads" and "processes" also :) thanks
<beach> I see no reason to use a shell at all. You should be able to use the implementation-specific POSIX system to fork the Common Lisp process itself.
Sheilong has joined #lisp
<delta> Oh, gotcha. Great. Thank you!
<beach> Sure. Or maybe IUOP has something that will work for you.
<beach> Try (apropos "process") to the REPL.
<Nilby> With sbcl you can use run-program with :wait nil which usually puts them in the background, save the process-pid, and then call sb-posix:kill on them
<jmercouris> is there a way to override the value of a constant?
<delta> Wonderful! I think I've found what I needed with UIOP. Thank you all!
<jmercouris> I used (alexandria:define-constant ..) and now I want to override it in the REPL
<jmercouris> is it possible?
<Bike> you want to set it to an actually different value? your implementation might offer a restart for it
<Bike> redefining a constant is dicey because the compiler might be using the value, i.e. previously compiled code referencing the constant will still be using the old value
<jmercouris> SBCL seemingly does not offer this
<Bike> sure it does, it's the continue restart
<Bike> it looks like with alexandria:define-constant you'll need to continue twice
<Bike> once for alexandria and once for sbcl
kslt1 has quit [Read error: Connection reset by peer]
<jmercouris> I tried (setf constant 123) and it just says "retry" or ignore
<jmercouris> it's OK, I will change it
<Bike> oh, i mean, you have to do another defconstant
<jmercouris> thanks anyways Bike
<jmercouris> Ah... that's something else
<Bike> (defconstant +foo+ 3) (defconstant +foo+ 5)
Stanley00 has joined #lisp
<jmercouris> ah, that has worked
<jmercouris> thank you
<Bike> no problem
<Nilby> I seem to end up using the constant changing restart a lot. It doesn't always work. Worse, if you save images a lot it's possible to multiple generations of different wrong constants.
undvrainbowvita8 has joined #lisp
pfdietz has joined #lisp
Stanley00 has quit [Ping timeout: 240 seconds]
maxwilliamson has quit [Quit: Bye.]
maxwilliamson has joined #lisp
theothornhill has joined #lisp
<pjb> why use a constant if it's a variable?
<pjb> π, e, c are constants. (note PI, E and C are not, in implementations when the size of long-floats can be changed at run-time ;-))
<pjb> ASCII:BEL #| --> 7 |# is a constant, ok. But little else is.
attila_lendvai_ has joined #lisp
flazh has quit [Ping timeout: 276 seconds]
hypercube has joined #lisp
retropikzel has quit [Quit: Leaving]
uhuh has joined #lisp
uhuh has quit [Max SendQ exceeded]
jasom has quit [Ping timeout: 250 seconds]
theothornhill has quit [Ping timeout: 246 seconds]
uhuh has joined #lisp
uhuh has quit [Max SendQ exceeded]
jasom has joined #lisp
theothornhill has joined #lisp
attila_lendvai_ is now known as attila_lendvai
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
dhil has joined #lisp
jurov has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
<Nilby> There's only a few standard Lisp character names, so I was surprised when one day instead of beeping I saw: 🔔
theothornhill has quit [Ping timeout: 252 seconds]
liberliver has quit [Ping timeout: 260 seconds]
aartaka_d has joined #lisp
flazh has joined #lisp
aartaka has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
<jnewton> I heard someone (don't remember who) that someone (don't remember who) claimed to be working on a Common Lisp like condition system in Python. Who said it and who said it?
<easye> Kent Pitman!
<jnewton> ahhhh, I was thinking Kenny Tilton.
<easye> (to be featured in an Online Lisp Meeting soonish)
NO_Name has quit [Quit: NO_Name]
<jackdaniel> quite a leap from "don't remember who" to "you know who" ,)
<beach> But who was the one he heard? phoe maybe?
LiamH has joined #lisp
<beach> jnewton: Are you also aware that phoe gave a presentation to the Webassembly people concerning the control structures that are needed for a condition system?
theothornhill has joined #lisp
<jnewton> @beach, no but I recently realized that I don't understand the condition system when trying to figure out how to implement it in Scala. I wanted to have something in Scala to present to Scala experts to demonstrate why there are important exceptional situations other than Errors.
<beach> Did you read phoe's book on the topic?
<jnewton> I didn't know that such a book exists.
<beach> *sigh* that's what you get for being absent from IRC.
<agumonkey> jnewton: was it at the lib level or reworking the interpreter/bytecode ?
<jnewton> lib level.
jurov has quit [Ping timeout: 252 seconds]
<beach> jnewton: The book is called "The Common Lisp Condition System" and it's on Apress.
MetaYan_ has joined #lisp
<nij> *sigh* I'm on IRC but still haven't read phoe's wonderful book.
* nij should be kicked out.
nij has left #lisp ["ERC (IRC client for Emacs 27.2)"]
<beach> nij: But at least you are aware of its existence, and that you need to read it.
<beach> Does anyone have a link for phoe's book?
<agumonkey> phoe recently said he might rewrite it a bit (after some voices saying the style needed work)
<jnewton> I saw an announcement for the CL algorithms book, but I've never seen an announcement for the Condition System book. I sense that keeping it a secret on IRC is counterproductive
theothornhill has quit [Ping timeout: 260 seconds]
<MetaYan_> nick MetaYan
<MetaYan_> sorry
<agumonkey> it's been mentioned on a few big sites (hn, reddit) IIRC
<agumonkey> but i may be hallucinating
<beach> jnewton: It is easy (but unproductive) for IRC-ers to assume that when it has been announced here, everybody knows it.
<jnewton> :-)
<jnewton> how can I like a message on IRC?
hiroaki has joined #lisp
<jackdaniel> beach: your friendly neighborhood moderator looked it up for you on the vast internet: https://www.apress.com/gp/book/9781484261330
frgo_ has joined #lisp
<jnewton> also, and can I edit a message which has already been sent?
<beach> jackdaniel: You beat me to it. Thanks!
<jackdaniel> jnewton: that's not how real conversations work, is it? :) no, it is not slack, no time travel nor annotations of past messages
<jnewton> @beach: I found the book on amazon. and apparently there's also a new lisp blockchain book.
MetaYan_ has quit [Client Quit]
<beach> I see.
frgo has quit [Ping timeout: 240 seconds]
<jnewton> @phoe, do you recommend I buy the book or wait for the 2nd edition?
<beach> jnewton: The @ convention is not used on IRC, just type the nick of the person (using completion) followed by `:'.
MetaYan has joined #lisp
<beach> jnewton: Get both. I am sure you can get your employer to pay.
<beach> phoe is a busy person, and he has other projects too.
<jnewton> is there enough info in the book to implement the condition system in a JVM hosted language? If so, it could be really practical.
<jnewton> BTW congratulations phoe: on your book release
<beach> Pretty sure all the information is there.
<jnewton> beach: have you read it yet?
<beach> Partly.
aartaka has joined #lisp
imode has joined #lisp
<jnewton> is there a way to make the condition system work with lazily evaluated code? I.e., you might define an anonymous function within a certain stackframe, but when the function is called, the stackframe is long gone. This is one of the problems with dynamic variables and also of exception handling in both Scala and Clojure.
jurov has joined #lisp
aartaka_d has quit [Ping timeout: 252 seconds]
<Odin-> Huh. I was not aware of that book, which is nevertheless very much within my field of interest.
theothornhill has joined #lisp
<beach> jnewton: You are right, the dynamic environment is then long gone.
<loli> phoe's book is very nice
theothornhill has quit [Ping timeout: 240 seconds]
nij has joined #lisp
<agumonkey> not sure it's right what you asked for jnewton but https://github.com/IGJoshua/farolero is a condition system for clojure
theothornhill has joined #lisp
OlCe has quit [Ping timeout: 260 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
kevingal has quit [Remote host closed the connection]
<srandon111> people anyone know why sbcl on netbsd is not threaded ?
sp41 has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
<nij> threaded?
<jnewton> as I understand agumonkey, there are many conditions systems for clojure, many of which are inspired by CL. The problem (as I understand) is they are not compatible with each other, therefore no library wants to use one. If Library A used one, then the user might also include library B which uses a different one.
<jackdaniel> srandon111: maybe they don't truthfully implement the posix threads api?
zups has quit [Quit: WeeChat 3.1]
<Nilby> srandon111: I don't know, but I do have lots of other trouble running sbcl on netbsd.
<beach> nij: I think srandon111 means "allows multiple threads"
zups has joined #lisp
<Nilby> Java has throw and catch, which is really all that's required. CL style conditions have to be able to be sometimes handled before the throw, which is of course possible, just not what Java usually does.
<jnewton> nilby: aren't dynamic variables also necessary?
<nij> NiJ: oh oh
<beach> jnewton: They can kind of be implemented using unwind-protect.
<beach> At least in the single-thread case.
<Nilby> They help, but you could simulate them with global variables, or any variables if need be.
<jnewton> nilby: you need to somehow be able to look up the stack to find handlers and restarts.
<beach> jnewton: You use a global variable to simulate shallow binding.
<Nilby> Java has some stack introspection ability.
<jackdaniel> perhaps you could use threadlocal variables to simulate dynamic variables
<jnewton> There is a Scala class called DynamicVariable which uses sort of an unwind-protect mechansims. the variables are lexical, so you can only reference them within a scope where it is lexically visible, but the value is dynamic.
<jackdaniel> (global thread local variables that is)
<beach> jnewton: When you want to bind a dynamic variable, you assign its value to a lexical one and then you modify the global value.
<jnewton> There are two reasons I wanted to implement it. 1. because I'd like to show it to other Scala programmers. and 2. because implementing it would make me understand it.
<beach> That way, you can access it anywhere.
<beach> It doesn't work so well for implementing the full semantics of Common Lisp dynamic variables in the presence of threads.
long4mud has quit [Ping timeout: 260 seconds]
<Nilby> Even if you just have catch and throw, unwind-protect is just like a todo list before you throw or after normal return.
<White_Flame> beach: or modify the thread-local one on write, and on read check if the thread-local one is unbound (some unique default singleton) and read the global value if it is
<jnewton> The reason I stopped was because I didn't know what type all the objects needed to be. You need to somehow do it so the code is well typed. the task was beyond my capacity at the time. I'd on my list of things to revisit.
delta has quit [Quit: Leaving]
<White_Flame> s/write/bind/
<beach> White_Flame: That might work.
<White_Flame> that's SBCL's asm-level implementation
hiroaki has joined #lisp
<White_Flame> although it probably does the TLS slot allocation at compile-time
<beach> White_Flame: I kind of designed the SBCL technique. :)
<White_Flame> heh
<agumonkey> jnewton: subtle issue indee
<agumonkey> d*
<beach> White_Flame: Dan Barlow and I worked it out at LSM/RMLL in 2000 or 2001 or so.
<White_Flame> well then, it should be quite self-explanatory! ;)
<White_Flame> and of course another wrinkle in java would be the unwind mechanics around the binding scope
theothornhill has joined #lisp
<White_Flame> but that's basic try/finally
<beach> The LSM/RMLL meetings are also the reason for the name Bordeaux thread.
<beach> threads.
<beach> And I don't know why Krystof said "almost 20 years". I am pretty sure he was there in 2000, which would make it 21 years this year.
<jackdaniel> there are people who think that 2000 was 10y ago ,)
<White_Flame> there are people who think the 1980s were 20y ago :-P
<jackdaniel> think is the wrong word
<jackdaniel> "feel"
<beach> Ah, the "fast" thinking module, unable to do math. :)
andreyorst[m] has joined #lisp
<Odin-> beach: Cache invalidation is tricky.
theothornhill has quit [Ping timeout: 260 seconds]
<beach> Indeed.
<White_Flame> but anyway, given java's thread local storage, is there any material difference to SBCL's strategy in implementing special variable bindings?
<jackdaniel> cache invalidatation and off by one errors are three of the hardest problems in programming
* Odin- thought there were only two hard problems: Naming things, cache invalidation and off-by-one errors.
<beach> jackdaniel: Heh.
<jnewton> beach: I don't find irc intuitive. Do I need to give it more time to sink in?
<nij> Without reading phoe's book.. here am I asking a dumb question directly. I intend to let the error be echoed (using format) without triggering the debugger. But that's not the case. Why? https://bpa.st/6ZGQ
<jackdaniel> nij: handler-bind allows you to do things in a dynamic context of the error and carry on with handling the error
<Odin-> jnewton: You could think of it as an ephemeral shared append-only text file, rather than as similar to the modern bells-and-whistles systems.
<nij> It didn't carry on, but instead inboke a debugger..
<jackdaniel> basically to continue after the error you must wrap each place so the program knows where to resume
mindCrime_ has joined #lisp
<jackdaniel> carry on is invoking the debugger in this case
<beach> jnewton: Probably. It might be a bit overwhelming when there are multiple discussion threads going on simultaneously.
<nij> Hmm.. what should I do for it to proceed without debugger, but report any info that a debugger would provide?
<jackdaniel> (progn (handler-case (/ 1 0) (serious-condition (c) (Print c)) (print "after!"))
<jackdaniel> well, that's not right
<jackdaniel> because the stack is unwound in your handler
<beach> jnewton: Oh, and one more important thing. You quickly learn what people are likely to say things you are interested in, and what people you can safely ignore.
<Odin-> nij: 'error' invokes the debugger if the handler doesn't perform a non-local exit.
* Odin- is mostly in that second category.
<jackdaniel> (progn (block hi! (handler-bind … (lambda (c) (print c) (return-from hi!)))) (print "bye")
* Nilby can be safely ignored.
* nij is too.. probably the third.
<jackdaniel> I'm one of the noise generators ,-)
<jackdaniel> nij: you could have a macro that wraps each form in the body in such handler-bind, but it doesn't make much sense
<jackdaniel> because when your form errors then it means, that your program basically doesn't work and requires special attention
<nij> Oh finally, jackdaniel, I got something working. Thanks!'
theothornhill has joined #lisp
<nij> => (progn (block hi! (handler-bind ((error (lambda (c) (print c) (return-from hi!)))) (/ 1 0))) (print "bye"))
<jackdaniel> sure
OlCe has joined #lisp
<Odin-> If you want to _generally_ just print the condition object and carry on, couldn't you intercept the debugger entry?
<nij> Odin-: what do you mean by intercepting the deb entry?
<Odin-> *debugger-hook*
amb007 has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
* Odin- had to look it up, hasn't used it...
amb007 has joined #lisp
<jackdaniel> Odin-: and how exactly do you return to the place "after" the form?
theothornhill has quit [Ping timeout: 252 seconds]
andrei-n has quit [Read error: Connection reset by peer]
<Odin-> jackdaniel: Oh, right. Me being silly, ignore.
<nij> Odin-: I dunno how to hack *debugger-hook*..
<jackdaniel> (defmacro with-foolhardy-forms (&body body) `(let ((*debugger-hook* (lambda (c s) (print c s) (throw :foo)))) ,@(loop for form in body collect `(catch :foo ,form))))
skapata has joined #lisp
<Nilby> Just please don't mess with the global value of the *debugger-hook* or you could disble people's debuggers.
<nij> Sounds worse than having a global warming.
<nij> Hmm.. now suppose my main body is (repeat 3 (/ 1 0)).
<nij> I want that to be executed 3 times, each time barfing the error.. what should I do?
<nij> With the code above, it throws me out of hi! immediately after the first error.
<pjb> (defmacro repeat (n &body body) `(loop :repeat ,n :do (ignore-errors (progn ,@body))))
<pjb> (repeat 3 (/ 0)) #| --> nil |#
<nij> pjb: but I want the debugger message to be output somewhere.
<nij> ignore-errors throw everything away
<pjb> nij: if log error doesn't use implementation specific API to collect and report the backtrace, then you can use handler-case instead of handler-bind. (loop (handler-case (do-thing) (error (c) (log-error c))))
zeroish has quit [Ping timeout: 260 seconds]
<pjb> (defmacro repeat (n &body body) `(loop :repeat ,n :do (handler-case (progn ,@body) (error (err) (princ err *error-output*) (terpri *error-output*)))))
<nij> I have the impression that handler-case is more general and could capture more error message.. is that correct?
<nij> And thus I was trying to use handler-bind.
<pjb> (repeat 3 (/ 0)) #| --> nil |# with division-by-zero detected performing / on (1 0) three times on *error-output*.
<pjb> no, the difference is when the handler is executed.
<pjb> handler-case it's executed AFTER unwinding the stack. handler-bind it's executed BEFORE.
<pjb> usually you will use handler-case. Only if you want to do something in the context where the error is detected you will use handler-bind.
<nij> I want to let the procedure move on, but capture all logs.
<pjb> And what don't you like in my solution???
<pjb> give like, 4 hours ago.
<pjb> +n
<pjb> and what does letting the procedure move on? At what point do you want to resume?
aeth has quit [Ping timeout: 240 seconds]
<pjb> (+ 1 (/ 0)) if we resume afer (/ 0), what value should we use for (+ 1 ?)
<pjb> since we cannot answer this question in general, you have to write restart points in the procedure!
<nij> nil
<nij> So we have (+ 1 nil), which leads to another error.
<nij> And the answer is again nil.
aeth has joined #lisp
<pjb> (handler-bind ((error (lambda (c) (invoke-restart 'continue)))) (with-simple-restart (continue "Continue") (+ 1 (with-simple-restart (continue "Continue") (/ 0))))) #| --> nil ; t |#
<pjb> But you need to wrap the continue restarts yourself.
<pjb> Note: there's little point in continuing willy-nilly. It can be dangerous.
<saturn2> any sensible compiler will rely on the assumption that it's impossible to return normally from an error
Stanley00 has joined #lisp
<pjb> (handler-bind ((error (lambda (c) (invoke-restart 'continue)))) (with-simple-restart (continue "Continue") (if (with-simple-restart (continue "Continue") (/ 0)) 'ok 'send-the-missile))) #| --> send-the-missile |#
theothornhill has joined #lisp
<pjb> So it cannot be automatic. You have to manage it yourself!
<nij> I .. see.. I'm avoiding to do something that I must do.
<nij> Namely, if there's an error, either ignore it, or handle it. I basically just want to ignore it, and hope the procedure goes on. But that's not possible in general.
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
<pjb> nij: ignoring the error still means that you will skip to the point of ignorance.
Stanley00 has quit [Ping timeout: 240 seconds]
theothornhill has quit [Ping timeout: 252 seconds]
<pjb> When there is an error, you want to avoid continuing doing blindly what you were doing, because it's useless or dangerous. Instead, you want to continue from a point where you know what consistent state you are in.
<pjb> Hence ignore-error or handler-case.
<pjb> handler-bind is for when you want to enter the debugger, or invoke a restart, which are continuation points that have been designed in the program, that may be inside the scope of the handler-bind form.
<nij> What does ignore-errors do when encountering an error? Stop the process, and return nil?
<pjb> nothing is stopped. It just performs a non-local exit to its scope and return nil and the error.
<pjb> have you read my paste?
<nij> Yes but tbh I can't fully understand..
<pjb> (macroexpand-1 '(ignore-errors (/ 0))) #| --> (handler-case (progn (/ 0)) (error (condition) (values nil condition))) ; t |#
<nij> You mean the one with with-debugger-disabled?
<pjb> ie. (defmacro ignore-errors (&body body) `(handler-case (progn ,@body) (error (err) (values nil err))))
<nij> Oh that one is fine.
<pjb> Yes.
<jcowan> pjb: Not always. In a server, for example, you probably want to abandon th thread on an error, not the whole program.
<nij> It touches *debugger-hook* which I decide to take a look after considering handler-bind.
<pjb> When we ask to disable the debugger, it's not the same as when we as to ignore the errors.
<pjb> jcowan: this is not what ignore-errors does!
<pjb> If you want to do that, you have to code it!
<pjb> nij: don't. Use handler-case!
waleee-cl has joined #lisp
<jcowan> In the sense that you want to have a handler wrapped around the thread.
<pjb> nij: Reading TCLCS: https://www.apress.com/us/book/9781484261330 should help.
<pjb> jcowan: in the sense that this is meaningless. You wrap handlers around scopes of code. There's no consideration of threads.
<jcowan> Typically there is a scope of code in which a thread runs.
<pjb> (wrap-handler-around-thread (current-thread)) implementwrap-handler-around-thread !
<jcowan> I agree that makes no sense
<pjb> The current thread may be finished long before wrap-handler-around-thread even starts…
<jcowan> I was talking about (make-thread (handler-case ... (foo)), where the handler-case traps errors.
<pjb> But again, you're forgetting that make-thread takes a function, not a form.
DHARMAKAYA has joined #lisp
<pjb> (make-thread (lambda () (handler-case (foo) (error (err) (princ err) (terpri)))))
<pjb> vs. eg. (make-thread (lambda () (loop (handler-case (foo) (error (err) (princ err) (terpri))))))
andrei-n has joined #lisp
<pjb> As you can see, often you will want to wrap the body of the loop, not the body of the whole function called by the thread.
rumbler31 has joined #lisp
<pjb> It's not because handling a request failed, that the request handling should stop, is it?
<nij> I see. I'll just use (handler-case (/ 0) (error (c) (print c) (values nil c)))
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<pjb> Yes.
shifty has quit [Ping timeout: 260 seconds]
<pjb> Now one problem is that in more complex functions, there are a lot of places where a given error may occur. So just printing the error message may be insufficient.
rodriga has quit [Ping timeout: 246 seconds]
<pjb> nij: you may want to print the backtrace too.
<pjb> In that case you want handler-bind.
shifty has joined #lisp
jprajzne has quit [Ping timeout: 260 seconds]
<pjb> nij: eg. (block try (handler-bind ((error (lambda (c) (princ c) (terpri) (print-backtrace) (return-from try nil)))) (body)))
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
theothornhill has joined #lisp
mindCrime_ has quit [Ping timeout: 240 seconds]
theothornhill has quit [Ping timeout: 240 seconds]
theothornhill has joined #lisp
hendursaga has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
hendursaga has joined #lisp
gitgood has joined #lisp
amb007 has joined #lisp
<nij> pjb, it's much closer than what I want! Cool :-)
amb007 has quit [Read error: Connection reset by peer]
<nij> However, in the print-backtrace, some part was elided. Can I print FULL backtrace?
<nij> Eg it currently prints: (loop for x in (l... {100222A02F}>) #<NULL-LEXENV>)
amb007 has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
v88m has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<Odin-> I'd presume that to be implementation-dependent stuff.
<Shinmera> Colleen: tell nij about dissect
<Colleen> nij: Unknown command. Possible matches: 8, set, say, mop, get, about self, logout, grant, block, award,
<Shinmera> ugh
<Shinmera> Colleen: tell nij look up dissect
<Colleen> nij: About dissect https://shinmera.github.io/dissect
gendl__ has left #lisp [#lisp]
asdflkj has quit [Ping timeout: 258 seconds]
gendl has joined #lisp
asdflkj has joined #lisp
jprajzne has joined #lisp
cosimone has joined #lisp
theothornhill has joined #lisp
Sauvin has quit [Ping timeout: 265 seconds]
kslt1_ has joined #lisp
andreyorst` has joined #lisp
kslt1_ has left #lisp [#lisp]
theothornhill has quit [Ping timeout: 252 seconds]
undvrainbowvita8 has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
theothornhill has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
theothornhill has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<pjb> nij: (block done (handler-bind ((error (lambda (err) (uiop:print-backtrace :stream *error-output* :count 10 :condition err) (return-from done)))) (/ 0)))
amb007 has quit [Read error: Connection reset by peer]
<nij> Thanks Shinmera, pjb :)
amb007 has joined #lisp
Jachy has joined #lisp
theothornhill has joined #lisp
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
andreyorst` has quit [Ping timeout: 246 seconds]
Spawns_Carpeting has joined #lisp
andreyorst` has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
theothornhill has quit [Remote host closed the connection]
amb007 has joined #lisp
theothornhill has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
nicktick has quit [Ping timeout: 260 seconds]
theothornhill has quit [Ping timeout: 240 seconds]
jnewton has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
theothornhill has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
White_Flame has quit [Ping timeout: 260 seconds]
amb007 has joined #lisp
White_Flame has joined #lisp
theothornhill has quit [Ping timeout: 260 seconds]
rumbler31 has quit [Remote host closed the connection]
theothornhill has joined #lisp
rumbler31 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
CrashTestDummy3 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
OlCe has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
CrashTestDummy2 has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
CrazyPython has joined #lisp
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
theothornhill has joined #lisp
jnewton has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
theothornhill has quit [Ping timeout: 260 seconds]
amb007 has joined #lisp
OlCe has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
theothornhill has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
aindilis has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
theothornhill has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
undvrainbowvita8 has joined #lisp
amb007 has joined #lisp
Stanley00 has joined #lisp
CL-ASHOK has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<CL-ASHOK> Is there a way to define a function which modifies the value of the parameter passed in?
<CL-ASHOK> e.g. (defun modify-this (parameter) .....) where .... modifies parameter. Or do I need to do (setf parameter (modify-this parameter))
<pjb> (defun modify-this (parameter) (setf parameter 42) (assert (= 42 parameter)) parameter) (modify-this 33) #| --> 42 |#
<Bike> No. The function parameter is a new binding and that's what setf will modify.
attila_lendvai_ has joined #lisp
<pjb> CL-ASHOK: the parameter a the variable local to the function that contains the value of the argument passed to the function.
<CL-ASHOK> Bike: Yes, that's what I thought
<pjb> CL-ASHOK: if what you want to mutate is a lexical variable outside of the scope of the function, then no, there's no direct way.
Stanley00 has quit [Ping timeout: 260 seconds]
<pjb> CL-ASHOK: but note that you can create closures that can mutate a lexical variable, INSIDE the scope of the variable.
<CL-ASHOK> pjb: Thanks - what's the suggested way to do it?
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<pjb> CL-ASHOK: (defun modify-fun (writer) (funcall writer 42)) (let ((variable 33)) (modify-fun (lambda (new-value) (setf variable new-value))) variable) #| --> 42 |#
<pjb> CL-ASHOK: it is not suggested to do it!!!
<pjb> But this a way to do it.
cosimone has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Ping timeout: 252 seconds]
<pjb> CL-ASHOK: the question is more what you are trying to do?
<pjb> on a higher leve?
<pjb> level
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<CL-ASHOK> pjb: I have a CLOS object that I want to modify. So currently I am re-creating it with the new values, but it would be easier if I could just edit the slot that I want to edit
amb007 has quit [Read error: Connection reset by peer]
<pjb> CL-ASHOK: so you don't want to modify a variable. You want to modify an object.
<pjb> Then just do that.
amb007 has joined #lisp
<CL-ASHOK> but the object is passed in a function, so if I modify it, only the local copy is modified
<pjb> (defclass c () ((foo :initform 3 :accessor foo))) (defun modify-object (o) (setf (foo o) 42)) (let ((o (make-instance 'c))) (modify-object o) (foo o)) #| --> 42 |#
<pjb> CL-ASHOK: no, the object itself is not copied!
<pjb> The value that is passed is the reference to the object.
<pjb> It's not the variable O that is passed, it's the VALUE of the variable O. The VALUE of the variable or is a reference to the instance.
theothornhill has joined #lisp
<CL-ASHOK> Oh, so if I have (defun modify-this (object-a) ... (setf (object-name object-a) "David"))
<CL-ASHOK> object-a is actually modified - so I don't need to keep copying it to a new object?
<saturn2> objects are not copied when they are passed to a function
<CL-ASHOK> Thanks for that
<pjb> CL-ASHOK: there are very few lisp object types that are not mutable: numbers and characters. Even symbols who have an immutable name, are mutable: you can change the symbol-package, the symbol-value, the symbol-function, the symbol-plist.
cage_ has joined #lisp
<CL-ASHOK> that helps alot
<pjb> "object-a is actually modified" is ambiguous.
<pjb> The symbol OBJET-A names a variable (the parameter of the function named by the symbol MODIFY-THIS).
<pjb> the variable named OBJET-A is bound to a lisp object. This lisp object is the VALUE of the variable named OBJET-A.
<Nilby> You can also define a setf method or a defsetf
jnewton has quit [Ping timeout: 252 seconds]
<pjb> When you evaluate (setf (object-name object-a) "David"), the value of the variable named OBJECT-A, ie. a reference to the objeect, is passed to the function named (SETF OBJECT-NAME).
theothornhill has quit [Ping timeout: 240 seconds]
<saturn2> if you want to be able to mutate a single value, you can also wrap it in another object, like an array e.g. (defun modify-this (parameter) (setf (aref parameter) 42)) (let ((container (make-array nil))) (modify-this container) (aref container)))
<pjb> CL-ASHOK: in short, lisp uses pass by value, but all the values are references to objects. So you can still mutate mutable objects.
<pjb> But you cannot mutate the variables. Variables are not lisp objects.
<pjb> They are places.
<pjb> slots too are places (in objects, structures or arrays).
<CL-ASHOK> pjb: Thanks, I think that makes sense. Will need to read it a couple more times
<pjb> You cannot mutate the number 42. numbers are immutable.
<pjb> But you can mutate a place where the number 42 is bound to.
pfdietz has quit [Quit: Connection closed]
<pjb> CL-ASHOK: really, the model is very simple: places are litle boxes, references are little arrows stored in those boxes, pointing to the referenced lisp object.
<pjb> Lisp objects contain slots which are places, ie. little boxes.
ntqz has quit [Remote host closed the connection]
<CL-ASHOK> because in a "normal" parameter, bindings are created with lexical scope (not sure if that is the right terminology)
<CL-ASHOK> but when we pass in CLOS objects, those bindings don't occur?
<pjb> Some lisp objects such as number and characters don't contain places, they don't have any arrow going from them.
<Bike> the kind of object you pass is irrelevant to what bindings are done
<Bike> the rules are the same for standard objects, conses, symbols, whatever
<pjb> (defun f (p) …) (let ((a 42)) (f a)) when evaluating f (in the …) we have 2 references to the number 42: a:[*]--->42<---[*]:p
<pjb> in the place A and the place P. What has been copied, it is the *--> that was in A, to P. Hence the 2 arrows.
<pjb> But the lisp object, 42 in this case, is not copied.
<CL-ASHOK> Ah so when we change a to 43, then we are repointing a to a new value, whereas when we change an object
<CL-ASHOK> we are are modifying the object directly and not the pointer?
<CL-ASHOK> hence it works?
<pjb> Yes.
<CL-ASHOK> Thanks! Very helpful :)
<pjb> eg. a vector with 3 slots: v:[*]-->{[1][2][3]} passed to a function (defun m (w) (setf (aref w 1) 42) …) v:[*]-->{[1][42][3]}<--[*]:w in the …
<pjb> when we return from the function the parameter w is destroyed, but there remain the reference from v: v:[*]-->{[1][42][3]}
<CL-ASHOK> Got it!
sixpiece has joined #lisp
<CL-ASHOK> So does the compiler or interpreter maintain a list of lisp objects, and if there are repeated references to them, then multiple variables point to the same object?
<pjb> CL-ASHOK: now, to delete an element from a list (destructively), we can mutate the CDR of the previous cell. Even if we want to delete the first element, we can move the CAR and the CDR of the second cell to the first cell. But what we cannot do, is to transform the last cons cell into the symbol NIL. Since NIL represents the empty list when we delete the last, element, we need a way to mutate the place that contained the ref
<pjb> to the first (and last) cell of the list.
<pjb> CL-ASHOK: this is why with functions like DELETE we use (setf list (delete element list)).
<sixpiece> hello what is the compiler I should use and what is the link?
<pjb> It's to handle the case: (let ((list (list 1))) (values (delete 1 list) list)) #| --> nil ; (1) |#
<sixpiece> for the lessons
<pjb> sixpiece: what lessons?
<sixpiece> like to get start with lisp
<pjb> sixpiece: I like ccl, Clozure CL.
<CL-ASHOK> sixpence: how much programming background do you have?
Codaraxis_ has joined #lisp
<pjb> sixpiece: on what system are you working?
theothornhill has joined #lisp
<CL-ASHOK> pjb: Thanks
Codaraxis has quit [Ping timeout: 252 seconds]
CL-ASHOK has quit [Quit: Connection closed]
CL-ASHOK has joined #lisp
<CL-ASHOK> How much % of your code do you write functionally vs imperatively?
pseudonymous has joined #lisp
theothornhill has quit [Ping timeout: 265 seconds]
<CL-ASHOK> I found I'm getting into the habits of using a lot of lets, which is effectively an imperative style
<CL-ASHOK> just easier to understand
<pseudonymous> I have a function which, somehow, returns a namespaced (?) symbol..? All in all it looks like this `(package::foo ...)` and I expected `(foo ...)` - this result comes when calling the relevant function from another package.. Ideas ?
<Bike> does your function use intern or find-symbol or the like?
<pjb> CL-ASHOK: no, let is not imperative.
<pjb> CL-ASHOK: if you don't use SETF, it's functional.
<pjb> (let ((x v)) (f x)) <=> ((lambda (x) (f x)) v)
<CL-ASHOK> pjb: I basically have let* and then define 10 variables, with the final one being the answer
<pjb> Yes. Still purely functionnal.
<pjb> let or let*, without setf, is purely naming of subsexpression.
<CL-ASHOK> pjb: Oh I see
<pseudonymous> Bike: hey :) Not that I'm aware, but CL is not my strong suit. Had a break, but mainly coming from Clojure with a bit of Racket years back. Can I show you a paste ? If so, which paste site(s) are acceptable on this channel ?
kevingal has joined #lisp
<pjb> any; I like http://termbin.com
<Bike> any pastebin is probably fine. I guess the "native" one is plaster.tymoon.eu
<pjb> ~/bin/tb: #!/bin/bash \n nc termbin.com 9999 | tr -d '\000'
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<sixpiece> ?
<pjb> then: tb < foo.lisp or in emacs, mark a region, and M-! tb RET
<Bike> sixpiece: http://sbcl.org/ here's one
<sixpiece> thanks
<pjb> sixpiece: if you are on macOS, Closure CL is superior.
<pjb> Even on linux… I still find a lot of bugs in sbcl.
jnewton has joined #lisp
<sixpiece> hello
sixpiece has left #lisp ["WeeChat 3.1"]
<saturn2> is there anything sbcl does better than ccl?
kpoeck has joined #lisp
sixpiece has joined #lisp
<sixpiece> hello does someone have a tutorial where to start?
<pseudonymous> Bike: https://plaster.tymoon.eu/view/2431#2431 - the actual function is at the top, the function it's called through right below, the example output in the bottom :) Appreciate it!
theothornhill has joined #lisp
<Bike> okay, well, that looks usual. if *package* is some other package than xyz, when you print an internal symbol from xyz it will be qualified like this.
<Bike> Since *package* was xyz when you defined rr/prop-access, the prop symbol it uses is in the xyz package.
<pjb> One solution would be to export this symbol from xyz.
<pjb> Another solution would be to use a keyword instead.
<pjb> But the best solution is to ignore the problem. Use ~A to print instead of ~S !
zeroish has joined #lisp
<pseudonymous> Going to digest that :D
<Bike> basically what package you're in when you run these functions won't affect the results, it's just that the results are displayed differently.
theothornhill has quit [Ping timeout: 240 seconds]
sixpiece has quit [Ping timeout: 260 seconds]
<pseudonymous> Ah, well, it does cause some issues in my tests. Strangely enough, the other functions I have which return syntax have managed to avoid this issue until now.
<Bike> It could be for example that your test refers to its own 'prop, which will effectively be xyz/tests::prop, which is a distinct symbol from xyz::prop.
<pseudonymous> Hehe.. I suspect it's because I'm returning (and comparing) forms like `(lambda ...) and `(let ...) and I'm guessing both packages agree on these symbols :D
<Bike> if they both use the CL package, they are yes.
nij has quit [Quit: ERC (IRC client for Emacs 27.2)]
karlosz has joined #lisp
<Krystof> I am 90% certain I wasn't at RMLL in 2000
<Krystof> beach: my first bug report to SBCL was in 2001; my first commit to SBCL cvs was 2002
andreyorst[m] has quit [Remote host closed the connection]
<Krystof> I was at Dartington International Summer School in 2000
theothornhill has joined #lisp
<Krystof> beach: https://web.archive.org/web/20170630054304/http://www.advogato.org/person/crhodes/diary/24.html puts my (I think) first RMLL appearance in 2002
<Krystof> but it might have been my second, possibly? Certainly not my third
anticrisis has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
jnewton has quit [Ping timeout: 260 seconds]
theothornhill has joined #lisp
CL-ASHOK has quit [Ping timeout: 240 seconds]
theothornhill has quit [Ping timeout: 246 seconds]
gaqwas has quit [Ping timeout: 252 seconds]
narimiran has quit [Ping timeout: 268 seconds]
kpoeck has quit [Quit: Connection closed]
jnewton has joined #lisp
theothornhill has joined #lisp
kpoeck has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
cage_ has quit [Quit: Leaving]
theothornhill has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
andreyorst` has quit [Quit: andreyorst`]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
pfdietz has joined #lisp
gitgoood has joined #lisp
heisig has quit [Quit: Leaving]
gitgoood has quit [Remote host closed the connection]
gitgoood has joined #lisp
gitgood has quit [Ping timeout: 268 seconds]
flazh has quit [Ping timeout: 252 seconds]
theothornhill has joined #lisp
LiamH has quit [Quit: Leaving.]
theothornhill has quit [Ping timeout: 265 seconds]
xkapastel has joined #lisp
jasom has quit [Ping timeout: 245 seconds]
jasom has joined #lisp
gaqwas has quit [Ping timeout: 246 seconds]
flazh has joined #lisp
flazh has quit [Client Quit]
flazh has joined #lisp
theothornhill has joined #lisp
andrei-n has quit [Quit: Leaving]
<srandon111> sorry i lost some messages
<srandon111> i was wondering why sbcl does not support threading in netbsd
theothornhill has quit [Ping timeout: 240 seconds]
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
aartaka_d has joined #lisp
<Nilby> srandon111: I like netbsd, but I have some troubles with sbcl on it. I've been working on trying to fix it. Maybe if I figure it out, I'll work on threads.
shka_ has quit [Ping timeout: 240 seconds]
irc_user has joined #lisp
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #lisp
theothornhill has joined #lisp
kpoeck has left #lisp [#lisp]
aartaka_d has quit [Ping timeout: 268 seconds]
v0|d has quit [Remote host closed the connection]
tophullyte has joined #lisp
theothornhill has quit [Ping timeout: 260 seconds]
notzmv has quit [Ping timeout: 240 seconds]
jfb4 has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
notzmv has joined #lisp
notzmv is now known as Guest43271
aartaka has quit [Ping timeout: 240 seconds]
kevingal has quit [Remote host closed the connection]
theothornhill has joined #lisp
kevingal has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
kevingal has quit [Remote host closed the connection]
theothornhill has joined #lisp
ukari has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
random-nick has quit [Ping timeout: 240 seconds]
surabax has quit [Quit: Leaving]
aartaka has joined #lisp
theothornhill has joined #lisp
Inline has quit [Ping timeout: 260 seconds]
theothornhill has quit [Ping timeout: 240 seconds]
aartaka has quit [Ping timeout: 265 seconds]
Maniaku has joined #lisp
dhil has quit [Ping timeout: 252 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 252 seconds]
tophullyte has quit [Quit: Leaving]
tophullyte has joined #lisp
Maniaku has quit [Quit: Leaving]
theothornhill has joined #lisp
hypercube has quit [Ping timeout: 258 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
sbodin has joined #lisp
<phoe> jnewton: the second edition of TCLCS might not even appear
<phoe> so I guess buy it now, mostly because I don't know if asking you to wait for a new edition is asking you to wait forever
<antoszka> phoe: what's tclcs?
<phoe> The Common Lisp Condition System
theothornhill has quit [Ping timeout: 240 seconds]
ebrasca has quit [Remote host closed the connection]
Guest43271 has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 240 seconds]
theothornhill has joined #lisp
hiroaki has joined #lisp
agumonkey has quit [Ping timeout: 246 seconds]
theothornhill has quit [Ping timeout: 260 seconds]
attila_lendvai_ has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
contrapunctus has joined #lisp
monolithic has quit [Remote host closed the connection]
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
attila_lendvai_ has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
theothornhill has joined #lisp
frgo has joined #lisp
pve has quit [Quit: leaving]
frgo_ has quit [Ping timeout: 240 seconds]
theothornhill has quit [Ping timeout: 240 seconds]
sbodin has left #lisp [#lisp]
attila_lendvai_ has quit [Quit: Leaving]
White_Flame has quit [Ping timeout: 250 seconds]
notzmv has joined #lisp
White_Flame has joined #lisp
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
srhm has quit [Quit: Konversation terminated!]
Oladon has joined #lisp